7b15104ad5
- migliorie varie per modalità solo anta e modalità assemblato.
214 lines
5.7 KiB
VB.net
214 lines
5.7 KiB
VB.net
Imports System.ComponentModel
|
|
Imports System.Collections.ObjectModel
|
|
Imports EgtUILib
|
|
'Imports System.Text.RegularExpressions
|
|
|
|
Public Class PartPageVM
|
|
Implements INotifyPropertyChanged
|
|
|
|
Friend bSetChange As Boolean = False
|
|
Private m_CurrPart As Part
|
|
Public Property CurrPart As Part
|
|
Get
|
|
Return m_CurrPart
|
|
End Get
|
|
Set(value As Part)
|
|
m_CurrPart = value
|
|
If Not IsNothing(m_CurrPart) Then
|
|
m_CurrPart.SetVarSize()
|
|
End If
|
|
NotifyPropertyChanged("CurrPart")
|
|
End Set
|
|
End Property
|
|
|
|
Private m_OrderButtonVisibility As Visibility = Visibility.Visible
|
|
Public ReadOnly Property OrderButtonVisibility As Visibility
|
|
Get
|
|
SetOrderButtonVisibility()
|
|
Return m_OrderButtonVisibility
|
|
End Get
|
|
End Property
|
|
Public Sub SetOrderButtonVisibility()
|
|
If OptionModule.m_ConfigurationSoftware = ConfigType.Door Then
|
|
m_OrderButtonVisibility = Visibility.Visible
|
|
Else
|
|
m_OrderButtonVisibility = Visibility.Collapsed
|
|
End If
|
|
End Sub
|
|
|
|
Sub New()
|
|
Map.SetRefDoorParametersVM(Me)
|
|
Part.m_rfModifyTitle = AddressOf Map.refMainWindowVM.ModifyTitle
|
|
End Sub
|
|
|
|
#Region "Messages"
|
|
|
|
'General'
|
|
|
|
Public ReadOnly Property EdgeMsg As String
|
|
Get
|
|
Return EgtMsg(50044)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property OverMaterialMsg As String
|
|
Get
|
|
Return EgtMsg(50045)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property GeneralMsg As String
|
|
Get
|
|
Return EgtMsg(50040)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property WidthMsg As String
|
|
Get
|
|
Return EgtMsg(50001)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property HeightMsg As String
|
|
Get
|
|
Return EgtMsg(50002)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property ThicknessMsg As String
|
|
Get
|
|
Return EgtMsg(50003)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property SwingMsg As String
|
|
Get
|
|
Return EgtMsg(50004)
|
|
End Get
|
|
End Property
|
|
|
|
'Profiles'
|
|
Public ReadOnly Property LockedgeMsg As String
|
|
Get
|
|
Return EgtMsg(50005)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property HingeedgeMsg As String
|
|
Get
|
|
Return EgtMsg(50006)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property TopMsg As String
|
|
Get
|
|
Return EgtMsg(50007)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property BottomMsg As String
|
|
Get
|
|
Return EgtMsg(50008)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property DeleteBtnMsg As String
|
|
Get
|
|
Return EgtMsg(50126)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property WeightMsg As String
|
|
Get
|
|
Return EgtMsg(50047)
|
|
End Get
|
|
End Property
|
|
#End Region
|
|
|
|
Public ReadOnly Property DeleteCompoToolTip As String
|
|
Get
|
|
Return EgtMsg(50142)
|
|
End Get
|
|
End Property
|
|
|
|
Private m_IsReadOnly As Boolean
|
|
Public Property IsRaedOnly As Boolean
|
|
Get
|
|
Return m_IsReadOnly
|
|
End Get
|
|
Set(value As Boolean)
|
|
m_IsReadOnly = value
|
|
NotifyPropertyChanged("IsRaedOnly")
|
|
End Set
|
|
End Property
|
|
|
|
Public ReadOnly Property OrderMsg As String
|
|
Get
|
|
Return "Order"
|
|
End Get
|
|
End Property
|
|
|
|
' definizione comando
|
|
Private m_EnterRefreshCmd As ICommand
|
|
Private m_F1GuideCmd As ICommand
|
|
Private m_cmdOrderBtn As ICommand
|
|
|
|
#Region "COMMANDS"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do New.
|
|
''' </summary>
|
|
Public ReadOnly Property RefreshCmd As ICommand
|
|
Get
|
|
If m_EnterRefreshCmd Is Nothing Then
|
|
m_EnterRefreshCmd = New Command(AddressOf EnterRefresh)
|
|
End If
|
|
Return m_EnterRefreshCmd
|
|
End Get
|
|
End Property
|
|
|
|
Public Sub EnterRefresh()
|
|
Map.refSceneManagerVM.RefreshBtn()
|
|
End Sub
|
|
|
|
' Comando Guida
|
|
Public ReadOnly Property GuideCmd As ICommand
|
|
Get
|
|
If m_F1GuideCmd Is Nothing Then
|
|
m_F1GuideCmd = New Command(AddressOf F1Guide)
|
|
End If
|
|
Return m_F1GuideCmd
|
|
End Get
|
|
End Property
|
|
|
|
Public Sub F1Guide()
|
|
Dim rfGuideVM As New GuideVM
|
|
If String.IsNullOrEmpty(GuideVM.m_AddressGuide) Then
|
|
GuideVM.m_AddressGuide = "Test.html"
|
|
End If
|
|
Map.refProjectManagerVM.Guide()
|
|
End Sub
|
|
|
|
Public ReadOnly Property OrderCmd As ICommand
|
|
Get
|
|
If m_cmdOrderBtn Is Nothing Then
|
|
m_cmdOrderBtn = New Command(AddressOf Map.refAssemblyPageVM.ShowOrder)
|
|
End If
|
|
Return m_cmdOrderBtn
|
|
End Get
|
|
End Property
|
|
|
|
#End Region ' Command
|
|
|
|
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
|
|
|
|
Public Sub NotifyPropertyChanged(propName As String)
|
|
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
|
|
End Sub
|
|
|
|
End Class
|
|
|
|
Public Class DoorVisibilityConverter
|
|
Implements IValueConverter
|
|
|
|
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As System.Globalization.CultureInfo) As Object Implements IValueConverter.Convert
|
|
Dim DoorList As ObservableCollection(Of String) = DirectCast(value, ObservableCollection(Of String))
|
|
Return If(DoorList.Count = 0, Visibility.Collapsed, Visibility.Visible)
|
|
End Function
|
|
|
|
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As System.Globalization.CultureInfo) As Object Implements IValueConverter.ConvertBack
|
|
Throw New NotImplementedException
|
|
End Function
|
|
|
|
End Class |