Imports EgtUILib Public Class InfoExpanderVM Inherits ViewModelBase #Region "Messages" Public ReadOnly Property PropertiesMsg As String Get Return EgtMsg(MSG_DRAWOPTION + 1) End Get End Property #End Region Private m_IsExpanded As Boolean Public Property IsEnabled As Boolean Get Return m_IsExpanded End Get Set(value As Boolean) If value <> m_IsExpanded Then m_IsExpanded = value OnPropertyChanged("IsEnabled") End If End Set End Property Private m_InfoBox As String Public Property InfoBox As String Get Return m_InfoBox End Get Set(value As String) If value <> m_InfoBox Then m_InfoBox = value If value <> String.Empty Then IsEnabled = True Else IsEnabled = False End If OnPropertyChanged("InfoBox") End If End Set End Property Sub New() ' Creo riferimento a questa classe in EgtCAM5Map Map.SetRefInfoExpanderVM(Me) End Sub Friend Sub UpdateObjDataInObjTree(ByVal nId As Integer) ' recupero il tipo del nuovo oggetto Dim nType As Integer = EgtGetType(nId) ' stampa dei dati dell'oggetto Dim sDump As String = String.Empty If nType = GDB_TY.NONE Then InfoBox = String.Empty ElseIf nType = GDB_TY.GROUP Then If EgtGroupDump(nId, sDump) Then InfoBox = sDump IsEnabled = True Else InfoBox = String.Empty IsEnabled = False End If Else If EgtGeoObjDump(nId, sDump) Then InfoBox = sDump IsEnabled = True Else InfoBox = String.Empty IsEnabled = False End If End If End Sub Friend Sub SetInfoBox(sString As String) InfoBox = sString End Sub End Class