VERSION 1.0 CLASS BEGIN MultiUse = -1 'True Persistable = 0 'NotPersistable DataBindingBehavior = 0 'vbNone DataSourceBehavior = 0 'vbNone MTSTransactionMode = 0 'NotAnMTSObject END Attribute VB_Name = "Events" Attribute VB_GlobalNameSpace = True Attribute VB_Creatable = True Attribute VB_PredeclaredId = False Attribute VB_Exposed = True Dim m_Commands As Commands ' GetLibraryName Public Function GetLibraryName() As String GetLibraryName = LoadResString(204) End Function ' ExternalMenuItem Public Function ExternalMenuItem(ByVal number As Integer, itemType As Integer, command As Integer) As String itemType = 1 'MENUITEM' Select Case number Case 1 ExternalMenuItem = LoadResString(301) command = 1 Case 2 ExternalMenuItem = LoadResString(302) command = 2 Case 3 ExternalMenuItem = LoadResString(303) command = 3 Case 4 ExternalMenuItem = LoadResString(304) command = 4 Case 5 ExternalMenuItem = LoadResString(305) command = 5 Case 6 ExternalMenuItem = LoadResString(306) command = 6 Case 7 ExternalMenuItem = LoadResString(307) command = 7 Case 8 ExternalMenuItem = LoadResString(308) command = 8 Case 9 ExternalMenuItem = LoadResString(309) command = 9 Case 10 ExternalMenuItem = LoadResString(310) command = 10 Case 11 ExternalMenuItem = LoadResString(311) command = 11 Case 12 ExternalMenuItem = LoadResString(312) command = 12 Case 13 ExternalMenuItem = LoadResString(313) command = 13 Case 14 ExternalMenuItem = LoadResString(314) command = 14 Case 15 ExternalMenuItem = LoadResString(315) command = 15 Case 16 ExternalMenuItem = LoadResString(316) command = 16 Case 17 ExternalMenuItem = LoadResString(317) command = 17 Case 18 ExternalMenuItem = LoadResString(318) command = 18 Case 19 ExternalMenuItem = LoadResString(319) command = 19 Case 20 ExternalMenuItem = LoadResString(320) command = 20 Case 21 itemType = 3 'ENDMENU' ExternalMenuItem = "" command = -1 End Select End Function 'ExternalGetToolBarId Public Function ExternalGetToolBarId(ByVal barType As Long, index As Long) As Long ExternalGetToolBarId = -1 If barType = 0 And index = 0 Then ExternalGetToolBarId = 203 End If End Function ' ExternalRunCommand Public Sub ExternalRunCommand(ByVal command As Integer, ByVal mode As Integer, ByVal Kompas As Object) If m_Commands Is Nothing Then Set m_Commands = New Commands End If If m_Commands.iKompasObject Is Nothing Then Set m_Commands.iKompasObject = Kompas End If If m_Commands.iKompasObject Is Nothing Then Exit Sub End If Select Case command Case 1 m_Commands.Command1 ' Комманда 1 Case 2 m_Commands.Command2 ' Комманда 2 Case 3 m_Commands.Command3 ' Комманда 3 Case 4 m_Commands.Command4 ' Комманда 4 Case 5 m_Commands.Command5 ' Комманда 5 Case 6 m_Commands.Command6 ' Комманда 6 Case 7 m_Commands.Command7 ' Комманда 7 Case 8 m_Commands.Command8 ' Комманда 8 Case 9 m_Commands.Command9 ' Комманда 9 Case 10 m_Commands.Command10 ' Комманда 10 Case 11 m_Commands.Command11 ' Комманда 11 Case 12 m_Commands.Command12 ' Комманда 12 Case 13 m_Commands.Command13 ' Комманда 13 Case 14 m_Commands.Command14 ' Комманда 14 Case 15 m_Commands.Command15 ' Комманда 15 Case 16 m_Commands.Command16 ' Комманда 16 Case 17 m_Commands.Command17 ' Комманда 17 Case 18 m_Commands.Command18 ' Комманда 18 Case 19 m_Commands.Command19 ' Комманда 19 Case 20 m_Commands.Command20 ' Комманда 20 End Select m_Commands.iKompasObject.ksMessageBoxResult End Sub 'LibInterfaceNotifyEntry Public Function LibInterfaceNotifyEntry(ByVal Kompas As Object) As Boolean If m_Commands Is Nothing Then Set m_Commands = New Commands End If If m_Commands.iKompasObject Is Nothing Then Set m_Commands.iKompasObject = Kompas End If End Function Private Sub Class_Terminate() Set m_Commands = Nothing End Sub