bca8754b82
- Migliorie varie.
62 lines
1.7 KiB
VB.net
62 lines
1.7 KiB
VB.net
Imports EgtUILib
|
|
|
|
Namespace EgtCAM5
|
|
|
|
Public Class InfoExpanderViewModel
|
|
Inherits ViewModelBase
|
|
|
|
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
|
|
OnPropertyChanged("InfoBox")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private 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
|
|
|
|
End Class
|
|
|
|
End Namespace |