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

📄 frmmain.vb

📁 用VB.NET开发的GeoMedia一个实例
💻 VB
📖 第 1 页 / 共 5 页
字号:
Imports GisVbNet.Common
Imports GisVbNet.Common.GeometryOP

Class FrmMain
    Inherits System.Windows.Forms.Form
    Public objSmartLocSvrc As New PBasic.SmartLocateService()
    Public objMeas As New PClient.MeasurementService()
    Public objUOM As New PCSS.UnitsOfMeasure()
    Public objLocatedObjects As New PView.LocatedObjectsCollection()
    Public objEventServer As New PBasic.EventServer()
    Public objPntGeom As New PBasic.PointGeometry()
    Public NewLine As New PBasic.PolylineGeometry()
    Public NewArea As New PBasic.PolygonGeometry()
    Public objPnt As New PBasic.point()
    Public gobjPnt As New PBasic.point()
    Public ZoomRect As New PBasic.RectangleGeometry()   '该对象在缩放时使用的矩形对象
    Public ZoomLineStyle As New PView.LinearStyle()
    Public ZoomRectX1, ZoomRectY1, ZoomRectZ1, ZoomRectX2, ZoomRectY2, ZoomRectZ2 As Double
    Public MouseAction As String
    Public RecordsetOutputTable As GDO.GRecordset
    Public bHighlight, bCenter As Boolean
    Public frmOption1 As FrmOption
    Public frmMeasureDistance1 As FrmMeasureDistance
    Public goEventServer As New PBasic.EventServer()
    Private NewText As New PBasic.TextPointGeometry()         '设置TextGeometry供插入文本用
    Private NewPoint As New PBasic.PointGeometry()
    Private objGeomEditLogo1 As New PClient.GeometryEditService()
    Private objGeomEditLogo2 As New PClient.GeometryEditService()
    Private objGeomEditLogo3 As New PClient.GeometryEditService()
    Private objGeomEditLogo4 As New PClient.GeometryEditService()
    Private objGeoText As New PBasic.TextPointGeometry()
    Private objPoint As New PBasic.OrientedPointGeometry()
    Private objGeoline As New PBasic.LineGeometry()
    Private bForward As Boolean
    Private sAngle As Single
    Private dEachStepLen As Double
    Private objSymbol As PView.SymbolFontStyle




    '设置PointGeometry供插入文本用


#Region " Windows 窗体设计器生成的代码 "

    Public Sub New()
        MyBase.New()

        '该调用是 Windows 窗体设计器所必需的。
        InitializeComponent()
        Form_Initialize_Renamed()
        '在 InitializeComponent() 调用之后添加任何初始化

    End Sub

    '窗体重写处置以清理组件列表。
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Windows 窗体设计器所必需的
    Private components As System.ComponentModel.IContainer

    '注意:以下过程是 Windows 窗体设计器所必需的
    '可以使用 Windows 窗体设计器修改此过程。
    '不要使用代码编辑器修改它。
    Public WithEvents MainMenu1 As System.Windows.Forms.MainMenu
    Public WithEvents mnuFile As System.Windows.Forms.MenuItem
    Public WithEvents mnuFileOpen As System.Windows.Forms.MenuItem
    Public WithEvents mnuFileExit As System.Windows.Forms.MenuItem
    Public WithEvents mnuView As System.Windows.Forms.MenuItem
    Public WithEvents mnuViewZoomIn As System.Windows.Forms.MenuItem
    Public WithEvents mnuViewZoomOut As System.Windows.Forms.MenuItem
    Public WithEvents mnuViewPan As System.Windows.Forms.MenuItem
    Public WithEvents mnuViewFit As System.Windows.Forms.MenuItem
    Public WithEvents mnuViewLegend As System.Windows.Forms.MenuItem
    Public WithEvents mnuDisplayFeature As System.Windows.Forms.MenuItem
    Public WithEvents mnuViewProperty As System.Windows.Forms.MenuItem
    Friend WithEvents ToolBar1 As System.Windows.Forms.ToolBar
    Friend WithEvents ToolTip1 As System.Windows.Forms.ToolTip
    Friend WithEvents OpenFileDialog1 As System.Windows.Forms.OpenFileDialog
    Friend WithEvents mnuViewOption As System.Windows.Forms.MenuItem
    Friend WithEvents mnuCenter As System.Windows.Forms.MenuItem
    Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem
    Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem
    Friend WithEvents TreeView1 As System.Windows.Forms.TreeView
    Friend WithEvents Splitter1 As System.Windows.Forms.Splitter
    Friend WithEvents Panel1 As System.Windows.Forms.Panel
    Friend WithEvents ImageList1 As System.Windows.Forms.ImageList
    Friend WithEvents mnuTool As System.Windows.Forms.MenuItem
    Friend WithEvents mnuToolQuery As System.Windows.Forms.MenuItem
    Friend WithEvents MenuItem13 As System.Windows.Forms.MenuItem
    Friend WithEvents mnuEdit As System.Windows.Forms.MenuItem
    Friend WithEvents mnuEditMoveFeature As System.Windows.Forms.MenuItem
    Friend WithEvents mnuEditDeleteFeature As System.Windows.Forms.MenuItem
    Friend WithEvents mnuEditEditGeometry As System.Windows.Forms.MenuItem
    Friend WithEvents MenuItem3 As System.Windows.Forms.MenuItem
    Friend WithEvents mnuNewFeature As System.Windows.Forms.MenuItem
    Friend WithEvents Fit As System.Windows.Forms.ToolBarButton
    Friend WithEvents ZoomIn As System.Windows.Forms.ToolBarButton
    Friend WithEvents ZoomOut As System.Windows.Forms.ToolBarButton
    Friend WithEvents Pan As System.Windows.Forms.ToolBarButton
    Friend WithEvents Selection As System.Windows.Forms.ToolBarButton
    Friend WithEvents ProPerties As System.Windows.Forms.ToolBarButton
    Friend WithEvents cbNewFeature As System.Windows.Forms.ComboBox
    Friend WithEvents tbNewText As System.Windows.Forms.TextBox
    Friend WithEvents mnuToolMeasure As System.Windows.Forms.MenuItem
    Friend WithEvents mnuToolMeasureDistance As System.Windows.Forms.MenuItem
    Friend WithEvents mnuToolMeasureArea As System.Windows.Forms.MenuItem
    Friend WithEvents StatusBar1 As System.Windows.Forms.StatusBar
    Friend WithEvents StatusBarPanelMessage As System.Windows.Forms.StatusBarPanel
    Friend WithEvents StatusBarPanelPointLocation As System.Windows.Forms.StatusBarPanel
    Friend WithEvents ContextMenu1 As System.Windows.Forms.ContextMenu
    Friend WithEvents contmnuZoomIn As System.Windows.Forms.MenuItem
    Friend WithEvents contmnuZoomOut As System.Windows.Forms.MenuItem
    Friend WithEvents contmnuFit As System.Windows.Forms.MenuItem
    Friend WithEvents contmnuPan As System.Windows.Forms.MenuItem
    Friend WithEvents contmnuProperty As System.Windows.Forms.MenuItem
    Friend WithEvents MenuItem9 As System.Windows.Forms.MenuItem
    Friend WithEvents contmnuLegend As System.Windows.Forms.MenuItem
    Friend WithEvents MenuItem4 As System.Windows.Forms.MenuItem
    Friend WithEvents Timer1 As System.Windows.Forms.Timer
    Friend WithEvents AddLegend As System.Windows.Forms.ToolBarButton
    Friend WithEvents Legend As System.Windows.Forms.ToolBarButton
    Friend WithEvents Timer2 As System.Windows.Forms.Timer
    Friend WithEvents ContextMenu2 As System.Windows.Forms.ContextMenu
    Friend WithEvents contmnuLocate As System.Windows.Forms.MenuItem
    Friend WithEvents contmnuProperty2 As System.Windows.Forms.MenuItem
    Friend WithEvents ImageList2 As System.Windows.Forms.ImageList
    Friend WithEvents GMMapView1 As AxMapviewLib.AxGMMapView
    Friend WithEvents EventControl1 As AxGMEventControlLib.AxEventControl

    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container()
        Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(FrmMain))
        Me.MainMenu1 = New System.Windows.Forms.MainMenu()
        Me.mnuFile = New System.Windows.Forms.MenuItem()
        Me.mnuFileOpen = New System.Windows.Forms.MenuItem()
        Me.mnuFileExit = New System.Windows.Forms.MenuItem()
        Me.mnuEdit = New System.Windows.Forms.MenuItem()
        Me.mnuEditMoveFeature = New System.Windows.Forms.MenuItem()
        Me.mnuEditDeleteFeature = New System.Windows.Forms.MenuItem()
        Me.MenuItem13 = New System.Windows.Forms.MenuItem()
        Me.mnuEditEditGeometry = New System.Windows.Forms.MenuItem()
        Me.mnuNewFeature = New System.Windows.Forms.MenuItem()
        Me.mnuView = New System.Windows.Forms.MenuItem()
        Me.mnuViewZoomIn = New System.Windows.Forms.MenuItem()
        Me.mnuViewZoomOut = New System.Windows.Forms.MenuItem()
        Me.mnuViewPan = New System.Windows.Forms.MenuItem()
        Me.mnuViewFit = New System.Windows.Forms.MenuItem()
        Me.mnuCenter = New System.Windows.Forms.MenuItem()
        Me.MenuItem1 = New System.Windows.Forms.MenuItem()
        Me.MenuItem4 = New System.Windows.Forms.MenuItem()
        Me.mnuViewLegend = New System.Windows.Forms.MenuItem()
        Me.mnuDisplayFeature = New System.Windows.Forms.MenuItem()
        Me.MenuItem2 = New System.Windows.Forms.MenuItem()
        Me.mnuViewProperty = New System.Windows.Forms.MenuItem()
        Me.mnuViewOption = New System.Windows.Forms.MenuItem()
        Me.mnuTool = New System.Windows.Forms.MenuItem()
        Me.mnuToolQuery = New System.Windows.Forms.MenuItem()
        Me.MenuItem3 = New System.Windows.Forms.MenuItem()
        Me.mnuToolMeasure = New System.Windows.Forms.MenuItem()
        Me.mnuToolMeasureDistance = New System.Windows.Forms.MenuItem()
        Me.mnuToolMeasureArea = New System.Windows.Forms.MenuItem()
        Me.ToolBar1 = New System.Windows.Forms.ToolBar()
        Me.Selection = New System.Windows.Forms.ToolBarButton()
        Me.ZoomIn = New System.Windows.Forms.ToolBarButton()
        Me.ZoomOut = New System.Windows.Forms.ToolBarButton()
        Me.Fit = New System.Windows.Forms.ToolBarButton()
        Me.Pan = New System.Windows.Forms.ToolBarButton()
        Me.ProPerties = New System.Windows.Forms.ToolBarButton()
        Me.AddLegend = New System.Windows.Forms.ToolBarButton()
        Me.Legend = New System.Windows.Forms.ToolBarButton()
        Me.ImageList1 = New System.Windows.Forms.ImageList(Me.components)
        Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
        Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog()
        Me.TreeView1 = New System.Windows.Forms.TreeView()
        Me.ImageList2 = New System.Windows.Forms.ImageList(Me.components)
        Me.Splitter1 = New System.Windows.Forms.Splitter()
        Me.Panel1 = New System.Windows.Forms.Panel()
        Me.GMMapView1 = New AxMapviewLib.AxGMMapView()
        Me.EventControl1 = New AxGMEventControlLib.AxEventControl()
        Me.ContextMenu1 = New System.Windows.Forms.ContextMenu()
        Me.contmnuZoomIn = New System.Windows.Forms.MenuItem()
        Me.contmnuZoomOut = New System.Windows.Forms.MenuItem()
        Me.contmnuFit = New System.Windows.Forms.MenuItem()
        Me.contmnuPan = New System.Windows.Forms.MenuItem()
        Me.MenuItem9 = New System.Windows.Forms.MenuItem()
        Me.contmnuProperty = New System.Windows.Forms.MenuItem()
        Me.contmnuLegend = New System.Windows.Forms.MenuItem()
        Me.cbNewFeature = New System.Windows.Forms.ComboBox()
        Me.tbNewText = New System.Windows.Forms.TextBox()
        Me.StatusBar1 = New System.Windows.Forms.StatusBar()
        Me.StatusBarPanelMessage = New System.Windows.Forms.StatusBarPanel()
        Me.StatusBarPanelPointLocation = New System.Windows.Forms.StatusBarPanel()
        Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
        Me.Timer2 = New System.Windows.Forms.Timer(Me.components)
        Me.ContextMenu2 = New System.Windows.Forms.ContextMenu()
        Me.contmnuLocate = New System.Windows.Forms.MenuItem()
        Me.contmnuProperty2 = New System.Windows.Forms.MenuItem()
        Me.Panel1.SuspendLayout()
        CType(Me.GMMapView1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.EventControl1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.StatusBarPanelMessage, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.StatusBarPanelPointLocation, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'MainMenu1
        '
        Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuFile, Me.mnuEdit, Me.mnuView, Me.mnuTool})
        '
        'mnuFile
        '
        Me.mnuFile.Index = 0
        Me.mnuFile.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuFileOpen, Me.mnuFileExit})
        Me.mnuFile.Text = "文件(&F)"
        '
        'mnuFileOpen
        '
        Me.mnuFileOpen.Index = 0
        Me.mnuFileOpen.Text = "打开(&O)..."
        '
        'mnuFileExit
        '
        Me.mnuFileExit.Index = 1
        Me.mnuFileExit.Text = "退出(&X)"
        '
        'mnuEdit
        '
        Me.mnuEdit.Index = 1
        Me.mnuEdit.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuEditMoveFeature, Me.mnuEditDeleteFeature, Me.MenuItem13, Me.mnuEditEditGeometry, Me.mnuNewFeature})
        Me.mnuEdit.Text = "编辑(&E)"
        '
        'mnuEditMoveFeature
        '
        Me.mnuEditMoveFeature.Enabled = False
        Me.mnuEditMoveFeature.Index = 0
        Me.mnuEditMoveFeature.Text = "移动(&M)"
        '
        'mnuEditDeleteFeature
        '
        Me.mnuEditDeleteFeature.Enabled = False
        Me.mnuEditDeleteFeature.Index = 1
        Me.mnuEditDeleteFeature.Text = "删除(&D)"
        '
        'MenuItem13
        '
        Me.MenuItem13.Index = 2
        Me.MenuItem13.Text = "-"
        '
        'mnuEditEditGeometry
        '
        Me.mnuEditEditGeometry.Enabled = False
        Me.mnuEditEditGeometry.Index = 3
        Me.mnuEditEditGeometry.Text = "编辑(&U)"
        '
        'mnuNewFeature
        '
        Me.mnuNewFeature.Enabled = False
        Me.mnuNewFeature.Index = 4
        Me.mnuNewFeature.Text = "插入(&N)"
        '
        'mnuView
        '
        Me.mnuView.Index = 2
        Me.mnuView.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuViewZoomIn, Me.mnuViewZoomOut, Me.mnuViewPan, Me.mnuViewFit, Me.mnuCenter, Me.MenuItem1, Me.MenuItem4, Me.mnuViewLegend, Me.mnuDisplayFeature, Me.MenuItem2, Me.mnuViewProperty, Me.mnuViewOption})
        Me.mnuView.Text = "查看(&V)"
        '
        'mnuViewZoomIn
        '
        Me.mnuViewZoomIn.Enabled = False
        Me.mnuViewZoomIn.Index = 0
        Me.mnuViewZoomIn.Text = "放大(&I)"
        '
        'mnuViewZoomOut
        '
        Me.mnuViewZoomOut.Enabled = False
        Me.mnuViewZoomOut.Index = 1
        Me.mnuViewZoomOut.Text = "缩小(&O)"
        '
        'mnuViewPan
        '
        Me.mnuViewPan.Enabled = False
        Me.mnuViewPan.Index = 2
        Me.mnuViewPan.Text = "平移(&P)"
        '

⌨️ 快捷键说明

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