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

📄 frmseriesproperties.frm

📁 使用VB和ArcObject结合的程序
💻 FRM
📖 第 1 页 / 共 3 页
字号:
            End
            Begin VB.OptionButton optExtent 
               Caption         =   "Fixed - Always draw at this scale:"
               Height          =   285
               Index           =   1
               Left            =   120
               TabIndex        =   14
               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          =   2565
            Left            =   3450
            TabIndex        =   2
            Top             =   750
            Width           =   3255
            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            =   120
               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 1995-2004 ESRI

' All rights reserved under the copyright laws of the United States.

' You may freely redistribute and use this sample code, with or without modification.

' Disclaimer: THE SAMPLE CODE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 
' WARRANTIES, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
' FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ESRI OR 
' CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 
' OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
' SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
' INTERRUPTION) SUSTAINED BY YOU OR A THIRD PARTY, HOWEVER CAUSED AND ON ANY 
' THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ARISING IN ANY 
' WAY OUT OF THE USE OF THIS SAMPLE CODE, EVEN IF ADVISED OF THE POSSIBILITY OF 
' SUCH DAMAGE.

' For additional information contact: Environmental Systems Research Institute, Inc.

' Attn: Contracts Dept.

' 380 New York Street

' Redlands, California, U.S.A. 92373 

' Email: contracts@esri.com

Option Explicit

Public m_pApp As IApplication
Private m_pSeriesOptions As IDSMapSeriesOptions
Private m_pSeriesOptions2 As IDSMapSeriesOptions2
Private m_pTextSym As ISimpleTextSymbol

Private Sub chkOptions_Click(Index As Integer)
  Select Case Index
  Case 0  'Rotate
11:     If chkOptions(0).Value = 0 Then
12:       cmbRotateField.Enabled = False
13:     Else
14:       cmbRotateField.Enabled = True
15:     End If
  Case 1  'Clip to outline
17:     If chkOptions(1).Value = 0 Then
18:       chkOptions(3).Value = 0
19:       chkOptions(3).Enabled = False
20:     Else
21:       chkOptions(3).Enabled = True
22:     End If
  Case 2  'Label neighboring tiles
24:     If chkOptions(2).Value = 0 Then
25:       cmdLabelProps.Enabled = False
26:     Else
27:       cmdLabelProps.Enabled = True
28:     End If
29:   End Select
End Sub

Private Sub cmdCancel_Click()
33:   Unload Me
End Sub

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

Private Sub cmdOK_Click()
On Error GoTo ErrHand:
  Dim pDoc As IMxDocument, pActive As IActiveView
  
  '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
55:   If chkOptions(1).Value = 1 Then    'Clip
56:     If chkOptions(3).Value = 0 Then   'clip without cross hatch
      'Make sure we don't leave the clip element
58:       If m_pSeriesOptions2.ClipData = 2 Then RemoveClipElement m_pApp.Document
59:       m_pSeriesOptions2.ClipData = 1
60:     Else
61:       m_pSeriesOptions2.ClipData = 2
62:       Set pDoc = m_pApp.Document
63:       pDoc.FocusMap.ClipGeometry = Nothing
64:     End If
'    m_pSeriesOptions.ClipData = True
66:   Else
    'Make sure we don't leave the clip element
68:     If m_pSeriesOptions2.ClipData = 2 Then RemoveClipElement m_pApp.Document
69:     m_pSeriesOptions2.ClipData = 0
'    m_pSeriesOptions.ClipData = False
    'Make sure clipping is turned off for the data frame
72:     Set pDoc = m_pApp.Document
73:     pDoc.FocusMap.ClipGeometry = Nothing
74:   End If
  
76:   If chkOptions(0).Value = 1 Then     'Rotation
77:     If m_pSeriesOptions.RotateFrame = False Or m_pSeriesOptions.RotationField <> cmbRotateField.Text Then
78:       UpdatePageValues "ROTATION", cmbRotateField.Text
79:     End If
80:     m_pSeriesOptions.RotateFrame = True
81:     m_pSeriesOptions.RotationField = cmbRotateField.Text
82:   Else
83:     m_pSeriesOptions.RotateFrame = False
    'Make sure rotation is turned off for the data frame
85:     Set pDoc = m_pApp.Document
86:     Set pActive = pDoc.FocusMap
87:     If pActive.ScreenDisplay.DisplayTransformation.Rotation <> 0 Then
88:       pActive.ScreenDisplay.DisplayTransformation.Rotation = 0
89:       pActive.Refresh
90:     End If
91:   End If
92:   If chkOptions(2).Value = 1 Then    'Label Neighbors
93:     m_pSeriesOptions.LabelNeighbors = True
94:   Else
95:     m_pSeriesOptions.LabelNeighbors = False
96:     RemoveLabels pDoc
97:     g_bLabelNeighbors = False
98:   End If
99:   Set m_pSeriesOptions.LabelSymbol = m_pTextSym
  
  'Set the extent properties
102:   If optExtent(0).Value Then         'Variable
103:     m_pSeriesOptions.ExtentType = 0
104:     If txtMargin.Text = "" Then
105:       m_pSeriesOptions.Margin = 0

⌨️ 快捷键说明

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