e2cdd82d63
-> correzione apertura ddf in modalità assemblato -> conversione di porte in assembalto -> gestione dei materiali e delle proprietà
213 lines
5.5 KiB
VB.net
213 lines
5.5 KiB
VB.net
Imports System.ComponentModel
|
|
Imports EgtUILib
|
|
Imports EgtWPFLib5
|
|
|
|
Public Class RefreshPanelVM
|
|
Inherits VMBase
|
|
|
|
Private m_ErrorVisibility As Visibility = Visibility.Collapsed
|
|
Public Property ErrorVisibility As Visibility
|
|
Get
|
|
Return m_ErrorVisibility
|
|
End Get
|
|
Set(value As Visibility)
|
|
m_ErrorVisibility = value
|
|
NotifyPropertyChanged("ErrorVisibility")
|
|
End Set
|
|
End Property
|
|
|
|
Private m_DimensionVisibility As Visibility = Visibility.Collapsed
|
|
Public Property DimensionVisibility As Visibility
|
|
Get
|
|
Return m_DimensionVisibility
|
|
End Get
|
|
Set(value As Visibility)
|
|
m_DimensionVisibility = value
|
|
NotifyPropertyChanged("DimensionVisibility")
|
|
End Set
|
|
End Property
|
|
|
|
Private m_ButtonVisibility As Visibility = Visibility.Collapsed
|
|
Public Property ButtonVisibility As Visibility
|
|
Get
|
|
Return m_ButtonVisibility
|
|
End Get
|
|
Set(value As Visibility)
|
|
m_ButtonVisibility = value
|
|
NotifyPropertyChanged("ButtonVisibility")
|
|
End Set
|
|
End Property
|
|
|
|
Private m_AssemblyIsChecked As Boolean = True
|
|
Public Property AssemblyIsChecked As Boolean
|
|
Get
|
|
Return m_AssemblyIsChecked
|
|
End Get
|
|
Set(value As Boolean)
|
|
If value <> m_AssemblyIsChecked Then
|
|
m_AssemblyIsChecked = value
|
|
If value Then
|
|
Map.refSceneManagerVM.AssemblyBtn()
|
|
End If
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_ExplodedIsChecked As Boolean = False
|
|
Public Property ExplodedIsChecked As Boolean
|
|
Get
|
|
Return m_ExplodedIsChecked
|
|
End Get
|
|
Set(value As Boolean)
|
|
If value <> m_ExplodedIsChecked Then
|
|
m_ExplodedIsChecked = value
|
|
If value Then
|
|
Map.refSceneManagerVM.ExlpodedBtn()
|
|
End If
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_DisposedIsChecked As Boolean = False
|
|
Public Property DisposedIsChecked As Boolean
|
|
Get
|
|
Return m_DisposedIsChecked
|
|
End Get
|
|
Set(value As Boolean)
|
|
If value <> m_DisposedIsChecked Then
|
|
m_DisposedIsChecked = value
|
|
If value Then
|
|
Map.refSceneManagerVM.DisposedBtn()
|
|
End If
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Public ReadOnly Property EnableRefreschPanel As Boolean
|
|
Get
|
|
If Not IsNothing(Map.refInstrumentPanelVM) Then
|
|
Return Map.refInstrumentPanelVM.EnablePage
|
|
Else
|
|
Return True
|
|
End If
|
|
End Get
|
|
End Property
|
|
|
|
#Region "Messages"
|
|
|
|
Public ReadOnly Property RefreshMsg As String
|
|
Get
|
|
Return EgtMsg(50301)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property ErrMsg As String
|
|
Get
|
|
Return EgtMsg(50101)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property AssemblyMsg As String
|
|
Get
|
|
Return "Assembly"
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property ExplodedMsg As String
|
|
Get
|
|
Return "Exploded"
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property DispositionMsg As String
|
|
Get
|
|
Return "Disposed"
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property DimensionToolTip As String
|
|
Get
|
|
Return "Dimension"
|
|
End Get
|
|
End Property
|
|
|
|
#End Region
|
|
|
|
#Region "ToolTip"
|
|
|
|
Public ReadOnly Property RefreshToolTip As String
|
|
Get
|
|
Return EgtMsg(50301)
|
|
End Get
|
|
End Property
|
|
|
|
#End Region
|
|
|
|
Private m_CmdRefresh As ICommand
|
|
Private m_CmdShowError As ICommand
|
|
Private m_CmdDimension As ICommand
|
|
|
|
Sub New()
|
|
Map.SetRefRefreshPanelVM(Me)
|
|
ButtonVisibility = If(OptionModule.m_ConfigurationSoftware = ConfigType.Door, Visibility.Collapsed, Visibility.Visible)
|
|
End Sub
|
|
|
|
#Region "COMMAND"
|
|
|
|
#Region "Refresh"
|
|
|
|
Public ReadOnly Property Refresh_Command As ICommand
|
|
Get
|
|
If m_CmdRefresh Is Nothing Then
|
|
' Richiamo il comando che già esiste
|
|
m_CmdRefresh = New Command(AddressOf Map.refSceneManagerVM.RefreshBtn)
|
|
End If
|
|
Return m_CmdRefresh
|
|
End Get
|
|
End Property
|
|
|
|
#End Region ' Refresh
|
|
|
|
#Region "ShowError"
|
|
|
|
Public ReadOnly Property ShowError_Command As ICommand
|
|
Get
|
|
If m_CmdShowError Is Nothing Then
|
|
m_CmdShowError = New Command(AddressOf ShowErrorBtn)
|
|
End If
|
|
Return m_CmdShowError
|
|
End Get
|
|
End Property
|
|
|
|
Public Sub ShowErrorBtn()
|
|
MessageBox.Show(Map.refSceneManagerVM.GraphicError, Map.refSceneManagerVM.GraphicErrorType, MessageBoxButton.OK, MessageBoxImage.Error)
|
|
End Sub
|
|
|
|
#End Region ' ShowError
|
|
|
|
#Region "DimensionPart"
|
|
|
|
Public ReadOnly Property Dimension_Command As ICommand
|
|
Get
|
|
If m_CmdDimension Is Nothing Then
|
|
m_CmdDimension = New Command(AddressOf DimensionBtn)
|
|
End If
|
|
Return m_CmdDimension
|
|
End Get
|
|
End Property
|
|
|
|
Public Sub DimensionBtn()
|
|
Dim HardwarePartWindow As New HardwarePartWindowV
|
|
HardwarePartWindow.Height = 280
|
|
HardwarePartWindow.Width = 550
|
|
HardwarePartWindow.DataContext = New HardwarePartWindowVM(new HardwarePartVM)
|
|
HardwarePartWindow.Owner = Application.Current.MainWindow
|
|
HardwarePartWindow.ShowDialog()
|
|
End Sub
|
|
|
|
#End Region ' DimensionPart
|
|
|
|
#End Region ' COMMAND
|
|
|
|
End Class
|