136 lines
4.5 KiB
VB.net
136 lines
4.5 KiB
VB.net
Imports EgtUILib
|
|
Public Class EditTopKitchenVM
|
|
Inherits SceneUserControlVM
|
|
|
|
#Region "FIELDS & PROPERTIES"
|
|
|
|
Private ReadOnly m_MsgList As New List(Of String)({TopBar_Msg_Stg0, TopBar_Msg_Stg1, TopBar_Msg_Stg2, Msg_Paragraph1, Msg_Paragraph2})
|
|
Public ReadOnly Property MsgList As List(Of String)
|
|
Get
|
|
Return m_MsgList
|
|
End Get
|
|
End Property
|
|
|
|
Private m_Stage As EditTopKStage = EditTopKStage.SelectPart
|
|
Private Property Stage As EditTopKStage
|
|
Get
|
|
Return m_Stage
|
|
End Get
|
|
Set(value As EditTopKStage)
|
|
m_Stage = value
|
|
DirectCast(ParamList(0), _TextBlockParam).MsgValue = MsgList(m_Stage)
|
|
End Set
|
|
End Property
|
|
|
|
' id del part selezionato per essere modificato
|
|
Private m_nIdPart As Integer = GDB_ID.NULL
|
|
Public Property nIdPart As Integer
|
|
Get
|
|
Return m_nIdPart
|
|
End Get
|
|
Set(value As Integer)
|
|
If m_nIdPart <> GDB_ID.NULL Then SceneCmd.DeselectAll()
|
|
m_nIdPart = value
|
|
End Set
|
|
End Property
|
|
|
|
#Region "Messages"
|
|
|
|
Public ReadOnly Property TopBar_Msg_Stg0 As String
|
|
Get
|
|
Return EgtMsg(110040) ' Seleziona il Part che vuoi modificare
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property TopBar_Msg_Stg1 As String
|
|
Get
|
|
Return EgtMsg(110041) ' Inserisci i nuovi parametri
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property TopBar_Msg_Stg2 As String
|
|
Get
|
|
Return EgtMsg(110042) ' Conferma, modifica con altri parametri o annulla
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property Msg_Paragraph1 As String
|
|
Get
|
|
Return EgtMsg(110038) ' Frontalino
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property Msg_Paragraph2 As String
|
|
Get
|
|
Return EgtMsg(110039) ' Fondo
|
|
End Get
|
|
End Property
|
|
|
|
#End Region ' Messages
|
|
|
|
#End Region ' Fields & Properties
|
|
|
|
#Region "CONSTRUCTOR"
|
|
|
|
Public Sub New()
|
|
MyBase.New()
|
|
Title = "Modifica Contorno Pezzo".ToUpper()
|
|
If Map.refSceneHostVM.m_nIdPart <> GDB_ID.NULL Then
|
|
nIdPart = Map.refSceneHostVM.m_nIdPart
|
|
Stage = EditTopKStage.SelectEdge
|
|
End If
|
|
|
|
LoadParamList()
|
|
End Sub
|
|
|
|
#End Region ' Constructor
|
|
|
|
#Region "METHODS"
|
|
Public Overrides Sub LoadParamList()
|
|
AddGenericParam(New _TextBlockParam("Messaggio", MsgList(0), ParamType.STR, Visibility.Visible))
|
|
' sezione paretina
|
|
AddGenericParam(New _TextBlockParam("Messaggio", MsgList(3), ParamType.STR, Visibility.Collapsed))
|
|
Dim dH As Double = 200
|
|
AddGenericParam(New _TextBoxParam("Altezza", dH, ParamType.LEN, Visibility.Visible))
|
|
Dim dTh As Double = 20
|
|
AddGenericParam(New _TextBoxParam("Spessore", dTh, ParamType.LEN, Visibility.Visible))
|
|
Dim nJunctionType As Integer = 0
|
|
Dim JunctionTypeList As New List(Of ParamCmBx)({New ParamCmBx("Trim Start"), New ParamCmBx("Trim End"), New ParamCmBx("Angle"), New ParamCmBx("Trim Both")})
|
|
AddGenericParam(New _ComboBoxParam("Tipo Giunzione", JunctionTypeList, nJunctionType))
|
|
|
|
' sezione fondello
|
|
AddGenericParam(New _TextBlockParam("Messaggio", MsgList(4), ParamType.STR, Visibility.Collapsed))
|
|
AddGenericParam(New _TextBoxParam("Spessore", 10, ParamType.LEN, Visibility.Collapsed))
|
|
AddGenericParam(New _TextBoxParam("Inclinazione", 0.1, ParamType.DOUB, Visibility.Collapsed))
|
|
AddGenericParam(New _TextBoxParam("Diametro foro", 30, ParamType.LEN, Visibility.Collapsed))
|
|
|
|
' checkbox
|
|
AddGenericParam(New _CheckBoxParam("ModificaAdiacenti", "Modifica anche altre paretine dello stesso tipo", Visibility.Visible))
|
|
End Sub
|
|
|
|
Public Overrides Sub Conferma()
|
|
' aggiorno la lista dei partSolid
|
|
SolidManagerM.CreatePartSolid()
|
|
' chiudo lo user control
|
|
Close()
|
|
End Sub
|
|
|
|
Public Overrides Sub Annulla()
|
|
Map.refSceneHostVM.m_nIdPart = GDB_ID.NULL
|
|
SceneCmd.DeselectAll()
|
|
' chiudo lo user control
|
|
Close()
|
|
End Sub
|
|
|
|
Private Sub Close()
|
|
SolidManagerM.ResetOperationMarks(Map.refSceneHostVM.m_nIdPart)
|
|
EgtDraw()
|
|
Dim Btn As SceneBtn = Map.refSceneButtonVM.GetButton(EGT_EDIT_PANEL)
|
|
If TypeOf (Btn) Is _ToggleButton Then
|
|
DirectCast(Btn, _ToggleButton).IsChecked = False
|
|
Else
|
|
EgtOutLog("CONFIG ERR: Il pulsante di Edit Panel è stato definito come Button anziché ToggleButton")
|
|
End If
|
|
' rimuovo lo UC dalla griglia
|
|
Map.refSceneButtonVM.RemoveUC(Map.refSceneButtonVM.m_EditPanelUC)
|
|
SolidManagerM.ManageUndoRedo()
|
|
End Sub
|
|
#End Region
|
|
End Class
|