zoukankan      html  css  js  c++  java
  • pageLayoutControl与Mapcontrol同步(VB)

    Option Explicit

    Implements esriCarto.IMaps

    Public m_Collection As Collection

    Private Sub Class_Initialize()

      Set m_Collection = New Collection

    End Sub

    '----------------IMaps接口的方法及属性的实现--------------------

    '得到collection中的元素的个数

    Private Property Get IMaps_Count() As Long

      IMaps_Count = m_Collection.count

    End Property

    '通过指定索引得到map

    Private Property Get IMaps_Item(ByVal mapIndex As Long) As IMap

      If mapIndex > m_Collection.count Or mapIndex < 0 Then

        MsgBox "BSMaps::Item:\r\n索引超出界限!"

        Exit Property

      End If

      Set IMaps_Item = m_Collection.Item(mapIndex + 1)

    End Property

    '向集合中添加map对象

    Private Sub IMaps_Add(ByVal map As IMap)

      If isNull(map) Or map Is Nothing Then

        MsgBox "Maps::Add:\r\n对象还没有初始化!"

        Exit Sub

      End If

      m_Collection.Add map

    End Sub

    '新建一个Map对象

    Private Function IMaps_Create() As IMap

      Dim newMap As IMap

      Set newMap = New map

      m_Collection.Add newMap

      Set IMaps_Create = newMap

    End Function

    '清除collection中所有元素

    Private Sub IMaps_reset()

      Dim idx As Integer

      For idx = 1 To m_Collection.count

        m_Collection.Remove idx

      Next idx

    End Sub

    '通过指定索引移除map

    Private Sub IMaps_remove(ByVal map As IMap)

      If mapIndex > m_Collection.count Or mapIndex <= 0 Then

        MsgBox "BSMaps::RemoveAt:\r\n索引超出界限!"

        Exit Sub

      End If

      m_Collection.Remove mapIndex

    End Sub

    Private Sub IMaps_removeAt(ByVal idx As Long)

    '

    End Sub

  • 相关阅读:
    ethtool 命令输出的注意点--网卡参数
    centos7.2+zabbix3.2+sedmail邮件告警
    vscode monokai
    SQL SERVER 常用命令
    数据库问题6-將系統資料表對應至系統檢視
    数据库问题5-SYS.SYSPROCESSES使用和查找死锁
    select * from sys.sysprocesses
    【SQL Server学习笔记】事务、锁定、阻塞、死锁 sys.sysprocesses
    使用DMV调优性能 --Burgess_Liu
    sql server线程等待信息
  • 原文地址:https://www.cnblogs.com/bluemaplestudio/p/1675168.html
Copyright © 2011-2022 走看看