1158fa4d9f
- modifiche e migliorie varie.
69 lines
2.4 KiB
VB.net
69 lines
2.4 KiB
VB.net
Imports System.ComponentModel
|
|
Imports EgtUILib
|
|
|
|
Public Class InstrumentPanelViewModel
|
|
Implements INotifyPropertyChanged
|
|
'riferimento alla scena
|
|
Private m_rfSceneManagerViewModel As SceneManagerViewModel
|
|
|
|
#Region "FIELDS & PROPERTIES"
|
|
|
|
#Region "ToolTip"
|
|
|
|
Public ReadOnly Property GetDistToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_GRIDVIEWPANEL + 18)
|
|
End Get
|
|
End Property
|
|
|
|
#End Region ' ToolTip
|
|
|
|
Private m_GetDistIsChecked As Boolean = True
|
|
Public Property GetDistIsChecked As Boolean
|
|
Get
|
|
GetDistance(m_GetDistIsChecked)
|
|
Return m_GetDistIsChecked
|
|
End Get
|
|
Set(value As Boolean)
|
|
If value <> m_GetDistIsChecked Then
|
|
m_GetDistIsChecked = value
|
|
NotifyPropertyChanged("GetDistIsChecked")
|
|
End If
|
|
|
|
End Set
|
|
End Property
|
|
|
|
' se il bottone è selezionato (true) allora misura, altrimenti no (false)
|
|
Public Sub GetDistance(bGetDistanceIsChecked As Boolean)
|
|
If bGetDistanceIsChecked Then
|
|
m_rfSceneManagerViewModel.ProjectScene.SetStatusGetDistance()
|
|
'If DirectCast(m_rfSceneManagerViewModel.StatusBar.DataContext, StatusBarViewModel).ButtonVisibility = Visibility.Visible Then
|
|
' DirectCast(m_rfSceneManagerViewModel.StatusBar.DataContext, StatusBarViewModel).ButtonVisibility = Visibility.Collapsed
|
|
'End If
|
|
Else
|
|
m_rfSceneManagerViewModel.ProjectScene.ResetStatusGetDistance()
|
|
m_rfSceneManagerViewModel.ProjectScene.SetStatusNull()
|
|
Dim rfStatusBarViewModel As StatusBarViewModel = DirectCast(m_rfSceneManagerViewModel.StatusBar.DataContext, StatusBarViewModel)
|
|
rfStatusBarViewModel.StatusOutput = String.Empty
|
|
'' controllo che non ci siano errori nel disegno
|
|
'm_rfSceneManagerViewModel.ShowGraphicError()
|
|
End If
|
|
End Sub
|
|
|
|
#End Region ' FIELDS & PROPERTIES
|
|
|
|
#Region "CONSTRUCTOR"
|
|
|
|
Sub New(ByRef SceneManagerViewModel As SceneManagerViewModel)
|
|
m_rfSceneManagerViewModel = SceneManagerViewModel
|
|
End Sub
|
|
|
|
#End Region ' CONSTRUCTOR
|
|
|
|
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
|
|
|
|
Public Sub NotifyPropertyChanged(propName As String)
|
|
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
|
|
End Sub
|
|
|
|
End Class |