⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmseriesproperties.frm

📁 一个不错的插件
💻 FRM
📖 第 1 页 / 共 3 页
字号:
               Top             =   990
               Width           =   2925
            End
            Begin VB.OptionButton optExtent 
               Caption         =   "Variable - Fit the tiles to the data frame"
               Height          =   225
               Index           =   0
               Left            =   120
               TabIndex        =   13
               Top             =   270
               Width           =   3045
            End
            Begin VB.TextBox txtMargin 
               Height          =   315
               Left            =   1050
               TabIndex        =   12
               Top             =   540
               Width           =   855
            End
            Begin VB.ComboBox cmbMargin 
               Height          =   315
               Left            =   1950
               Style           =   2  'Dropdown List
               TabIndex        =   11
               Top             =   540
               Width           =   1215
            End
            Begin VB.TextBox txtFixed 
               Height          =   315
               Left            =   930
               TabIndex        =   10
               Top             =   1290
               Width           =   945
            End
            Begin VB.ComboBox cmbDataDriven 
               Height          =   315
               Left            =   420
               Style           =   2  'Dropdown List
               TabIndex        =   9
               Top             =   2190
               Width           =   2655
            End
            Begin VB.Label Label4 
               Caption         =   "1:"
               Height          =   255
               Index           =   2
               Left            =   780
               TabIndex        =   41
               Top             =   1320
               Width           =   195
            End
            Begin VB.Label Label4 
               Caption         =   " specified in this index layer field:"
               Height          =   255
               Index           =   0
               Left            =   360
               TabIndex        =   17
               Top             =   1920
               Width           =   2595
            End
            Begin VB.Label Label4 
               Caption         =   "Margin"
               Height          =   255
               Index           =   1
               Left            =   480
               TabIndex        =   16
               Top             =   570
               Width           =   495
            End
         End
         Begin VB.Frame fraOptions 
            Caption         =   "Options"
            Height          =   2865
            Left            =   3450
            TabIndex        =   2
            Top             =   450
            Width           =   3255
            Begin VB.CheckBox chkOptions 
               Caption         =   "Select tile when drawing?"
               Height          =   225
               Index           =   4
               Left            =   90
               TabIndex        =   45
               Top             =   2520
               Width           =   2865
            End
            Begin VB.CheckBox chkOptions 
               Caption         =   "Cross-hatch data outside tile?"
               Height          =   225
               Index           =   3
               Left            =   360
               TabIndex        =   42
               Top             =   1260
               Width           =   2565
            End
            Begin VB.CheckBox chkOptions 
               Caption         =   "Rotate data using value from this field:"
               Height          =   225
               Index           =   0
               Left            =   120
               TabIndex        =   7
               Top             =   270
               Width           =   3045
            End
            Begin VB.ComboBox cmbRotateField 
               Height          =   315
               Left            =   390
               Style           =   2  'Dropdown List
               TabIndex        =   6
               Top             =   570
               Width           =   2655
            End
            Begin VB.CheckBox chkOptions 
               Caption         =   "Clip data to the outline of the tile"
               Height          =   225
               Index           =   1
               Left            =   90
               TabIndex        =   5
               Top             =   990
               Width           =   3045
            End
            Begin VB.CheckBox chkOptions 
               Caption         =   "Label neighboring tiles?"
               Height          =   225
               Index           =   2
               Left            =   90
               TabIndex        =   4
               Top             =   1710
               Width           =   3045
            End
            Begin VB.CommandButton cmdLabelProps 
               Caption         =   "Properties..."
               Height          =   345
               Left            =   420
               TabIndex        =   3
               Top             =   2010
               Width           =   1125
            End
         End
         Begin VB.Label Label1 
            Caption         =   "The Map Series provides several different options for fitting a tile to the data frame."
            Height          =   315
            Index           =   2
            Left            =   90
            TabIndex        =   18
            Top             =   180
            Width           =   5955
         End
      End
   End
End
Attribute VB_Name = "frmSeriesProperties"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

' Copyright 2006 ESRI
'
' All rights reserved under the copyright laws of the United States
' and applicable international laws, treaties, and conventions.
'
' You may freely redistribute and use this sample code, with or
' without modification, provided you include the original copyright
' notice and use restrictions.
'
' See use restrictions at /arcgis/developerkit/userestrictions.

Option Explicit

Public m_pApp As IApplication
Private m_pSeriesOptions As IDSMapSeriesOptions
Private m_pSeriesOptions2 As IDSMapSeriesOptions2
Private m_pSeriesOptions3 As IDSMapSeriesOptions3 'Added 11/23/04
Private m_bWasSelecting As Boolean                           'Added 11/23/04
Private m_pTextSym As ISimpleTextSymbol

Private Sub chkOptions_Click(Index As Integer)
  Select Case Index
  Case 0  'Rotate
25:     If chkOptions(0).value = 0 Then
26:       cmbRotateField.Enabled = False
27:     Else
28:       cmbRotateField.Enabled = True
29:     End If
  Case 1  'Clip to outline
31:     If chkOptions(1).value = 0 Then
32:       chkOptions(3).value = 0
33:       chkOptions(3).Enabled = False
34:     Else
35:       chkOptions(3).Enabled = True
36:     End If
  Case 2  'Label neighboring tiles
38:     If chkOptions(2).value = 0 Then
39:       cmdLabelProps.Enabled = False
40:     Else
41:       cmdLabelProps.Enabled = True
42:     End If
43:   End Select
End Sub

Private Sub cmdCancel_Click()
47:   Unload Me
End Sub

Private Sub cmdLabelProps_Click()
On Error GoTo ErrHand:
  Dim bChanged As Boolean, pTextSymEditor As ITextSymbolEditor
53:   Set pTextSymEditor = New TextSymbolEditor
54:   bChanged = pTextSymEditor.EditTextSymbol(m_pTextSym, m_pApp.hwnd)
55:   Me.SetFocus
  
  Exit Sub
ErrHand:
59:   MsgBox "cmdLabelProps_Click - " & Err.Description
End Sub

Private Sub cmdOK_Click()
On Error GoTo ErrHand:
  Dim pDoc As IMxDocument, pActive As IActiveView
  Dim pFeatSel As IFeatureSelection, pMap As IMap, pSeriesProps As IDSMapSeriesProps
  
  'Apply updates (only the Options can be updated, so we only need to look at those)
  'Set the clip and rotate properties
  'Update 6/18/03 to support cross hatching of clip area
70:   If chkOptions(1).value = 1 Then    'Clip
71:     If chkOptions(3).value = 0 Then   'clip without cross hatch
      'Make sure we don't leave the clip element
73:       If m_pSeriesOptions2.ClipData = 2 Then RemoveClipElement m_pApp.Document
74:       m_pSeriesOptions2.ClipData = 1
75:     Else
76:       m_pSeriesOptions2.ClipData = 2
77:       Set pDoc = m_pApp.Document
78:       pDoc.FocusMap.ClipGeometry = Nothing
79:     End If
'    m_pSeriesOptions.ClipData = True
81:   Else
    'Make sure we don't leave the clip element
83:     If m_pSeriesOptions2.ClipData = 2 Then RemoveClipElement m_pApp.Document
84:     m_pSeriesOptions2.ClipData = 0
'    m_pSeriesOptions.ClipData = False
    'Make sure clipping is turned off for the data frame
87:     Set pDoc = m_pApp.Document
88:     pDoc.FocusMap.ClipGeometry = Nothing
89:   End If
  
91:   If chkOptions(0).value = 1 Then     'Rotation
92:     If m_pSeriesOptions.RotateFrame = False Or m_pSeriesOptions.RotationField <> cmbRotateField.Text Then
93:       UpdatePageValues "ROTATION", cmbRotateField.Text
94:     End If
95:     m_pSeriesOptions.RotateFrame = True
96:     m_pSeriesOptions.RotationField = cmbRotateField.Text
97:   Else
98:     m_pSeriesOptions.RotateFrame = False
    'Make sure rotation is turned off for the data frame
100:     Set pDoc = m_pApp.Document
101:     Set pActive = pDoc.FocusMap
102:     If pActive.ScreenDisplay.DisplayTransformation.Rotation <> 0 Then
103:       pActive.ScreenDisplay.DisplayTransformation.Rotation = 0
104:       pActive.Refresh
105:     End If
106:   End If
107:   If chkOptions(2).value = 1 Then    'Label Neighbors
108:     m_pSeriesOptions.LabelNeighbors = True
109:   Else
110:     m_pSeriesOptions.LabelNeighbors = False
111:     RemoveLabels pDoc
112:     g_bLabelNeighbors = False
113:   End If
114:   Set m_pSeriesOptions.LabelSymbol = m_pTextSym
  
116:   If chkOptions(4).value = 1 Then  'Select tile when drawing
117:     m_pSeriesOptions3.SelectTile = True
118:   Else
119:     m_pSeriesOptions3.SelectTile = False
120:     If m_bWasSelecting Then   'If there were previously selecting tiles, then we need to clear the selection
121:       Set pSeriesProps = m_pSeriesOptions
122:       Set pMap = pActive
123:       Set pFeatSel = FindLayer(pSeriesProps.IndexLayerName, pMap)
124:       If Not pFeatSel Is Nothing Then
125:         pFeatSel.Clear
126:         pActive.PartialRefresh esriViewGeoSelection, Nothing, pActive.Extent
127:       End If
128:     End If
129:   End If
  
  'Set the extent properties
132:   If optExtent(0).value Then         'Variable
133:     m_pSeriesOptions.ExtentType = 0
134:     If txtMargin.Text = "" Then
135:       m_pSeriesOptions.Margin = 0
136:     Else
137:       m_pSeriesOptions.Margin = CDbl(txtMargin.Text)
138:     End If

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -