Files
EgtCAM5/ProjectPage/OptionPanel/DrawOptionPanel/DrawOptionPanelViewModel.vb
T
Emmanuele Sassi 6233d89e0f EgtCAM5 :
- primo rilascio.
2016-07-06 09:46:23 +00:00

150 lines
4.4 KiB
VB.net

Imports System.Collections.ObjectModel
Namespace EgtCAM5
Public Class DrawOptionPanelViewModel
Inherits ViewModelBase
' GRAPHICAL ELEMENTS
Private m_ManageLayerExpander As ManageLayerExpanderView
Public ReadOnly Property ManageLayerExpander As ManageLayerExpanderView
Get
If IsNothing(m_ManageLayerExpander) Then
m_ManageLayerExpander = New ManageLayerExpanderView
m_ManageLayerExpander.DataContext = New ManageLayerExpanderViewModel
End If
Return m_ManageLayerExpander
End Get
End Property
Private m_InputExpander As InputExpanderView
Public ReadOnly Property InputExpander As InputExpanderView
Get
If IsNothing(m_InputExpander) Then
m_InputExpander = New InputExpanderView
m_InputExpander.DataContext = New InputExpanderViewModel
End If
Return m_InputExpander
End Get
End Property
Private m_InfoExpander As InfoExpanderView
Public ReadOnly Property InfoExpander As InfoExpanderView
Get
If IsNothing(m_InfoExpander) Then
m_InfoExpander = New InfoExpanderView
m_InfoExpander.DataContext = New InfoExpanderViewModel
End If
Return m_InfoExpander
End Get
End Property
Private m_Title As String
Public Property Title As String
Get
Return m_Title
End Get
Set(value As String)
m_Title = value
OnPropertyChanged("Title")
End Set
End Property
Private m_TextBlock As String
Public Property TextBlock As String
Get
Return m_TextBlock
End Get
Set(value As String)
m_TextBlock = value
OnPropertyChanged("TextBlock")
End Set
End Property
Private m_TextBox As String
Public Property TextBox As String
Get
Return m_TextBox
End Get
Set(value As String)
m_TextBox = value
OnPropertyChanged("TextBox")
End Set
End Property
Private m_CheckBoxText As String
Public Property CheckBoxText As String
Get
Return m_CheckBoxText
End Get
Set(value As String)
m_CheckBoxText = value
OnPropertyChanged("CheckBoxText")
End Set
End Property
Private m_ComboItemsList As ObservableCollection(Of String)
Public Property ComboItemsList As ObservableCollection(Of String)
Get
Return m_ComboItemsList
End Get
Set(value As ObservableCollection(Of String))
m_ComboItemsList = value
OnPropertyChanged("ComboItemsList")
End Set
End Property
Private m_ComboSelectedItem As String
Public Property ComboSelectedItem As String
Get
Return m_ComboSelectedItem
End Get
Set(value As String)
m_ComboSelectedItem = value
OnPropertyChanged("ComboSelectedItem")
End Set
End Property
Private m_ShowVisibility As Boolean
Public Property ShowVisibility As Boolean
Get
Return m_ShowVisibility
End Get
Set(value As Boolean)
m_ShowVisibility = value
OnPropertyChanged("ShowVisibility")
End Set
End Property
Sub New()
Application.Msn.NotifyColleagues(Application.NOTIFYINPUTTEXT, TextBox)
End Sub
Private Sub PrepareInputBox(ByRef sTitle As String, ByRef sLabel As String, ByRef sCheckLabel As String,
ByVal bShowCombo As Boolean, ByVal bShowBtn As Boolean)
Title = sTitle
TextBlock = sLabel
TextBox = ""
If sCheckLabel <> "" Then
CheckBoxText = sCheckLabel
End If
If bShowCombo Then
ComboItemsList.Clear()
End If
If bShowBtn Then
ShowVisibility = True
End If
'InputText.Focus()
End Sub
Private Sub ResetInputBox()
'InputBox.Hide()
'InputCheck.Hide()
'InputCombo.Hide()
'btnShow.Hide()
'Scene1.Focus()
End Sub
End Class
End Namespace