5106b8ef80
- aggiunta finestra ImportDxf - gestione unità di misura - gestione cambio lingua - varie migliorie.
97 lines
3.0 KiB
VB.net
97 lines
3.0 KiB
VB.net
Imports System.Collections.ObjectModel
|
|
Imports EgtUILib
|
|
Imports EgtWPFLib5
|
|
|
|
Public Class OptionWindowVM
|
|
|
|
#Region "FIELDS & PROPERTIES"
|
|
|
|
' Riferimento al proprio modello che a differenza della finestra che si apre e si chiude, rimane sempre lo stesso
|
|
Private m_refOptionWindowM As OptionWindowM
|
|
|
|
Public ReadOnly Property LanguageList As List(Of Language)
|
|
Get
|
|
Return m_refOptionWindowM.m_LanguageList
|
|
End Get
|
|
End Property
|
|
|
|
Public Property SelLanguage As Language
|
|
Get
|
|
Return m_refOptionWindowM.m_SelLanguage
|
|
End Get
|
|
Set(value As Language)
|
|
If value IsNot m_refOptionWindowM.m_SelLanguage Then
|
|
m_refOptionWindowM.m_SelLanguage = value
|
|
WriteMainPrivateProfileString(S_GENERAL, K_MESSAGES, m_refOptionWindowM.m_SelLanguage.Name)
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Public ReadOnly Property MeasureUnitList As List(Of String)
|
|
Get
|
|
Return m_refOptionWindowM.m_MeasureUnitList
|
|
End Get
|
|
End Property
|
|
|
|
Public Property SelMeasureUnit As Integer
|
|
Get
|
|
Return If(EgtUiUnitsAreMM(), MeasureUnitOpt.MM, MeasureUnitOpt.INCH)
|
|
End Get
|
|
Set(value As Integer)
|
|
' salvo unità di misura precedente
|
|
Dim PrevMeasureUnit As MeasureUnitOpt = If(EgtUiUnitsAreMM(), MeasureUnitOpt.MM, MeasureUnitOpt.INCH)
|
|
If value <> PrevMeasureUnit Then
|
|
' cambio unità di misura
|
|
EgtSetUiUnits(DirectCast(value, MeasureUnitOpt) = MeasureUnitOpt.MM)
|
|
OmagOFFICEMap.refStatusBarVM.SetMeasureUnit(value)
|
|
WriteMainPrivateProfileString(S_GENERAL, K_MMUNITS, value.ToString())
|
|
' aggiorno le unità di misura nelle Tab
|
|
OmagOFFICEMap.refRawPartTabVM.Refresh(PrevMeasureUnit)
|
|
OmagOFFICEMap.refNestingTabVM.Refresh(PrevMeasureUnit)
|
|
OmagOFFICEMap.refMoveRawModeVM.Refresh(PrevMeasureUnit)
|
|
OmagOFFICEMap.refSimulTabVM.Refresh(PrevMeasureUnit)
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
#Region "Messages"
|
|
|
|
Public ReadOnly Property Title As String
|
|
Get
|
|
Return EgtMsg(MSG_OPTIONSPAGEUC + 1)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property CurrentLanguageMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_OPTIONSPAGEUC + 1)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property LanguageAdvertMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_OPTIONSPAGEUC + 2)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property MeasureUnitMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_OPTIONSPAGEUC + 3)
|
|
End Get
|
|
End Property
|
|
|
|
#End Region
|
|
|
|
#End Region ' FIELDS & PROPERTIES
|
|
|
|
#Region "CONSTRUCTOR"
|
|
|
|
Sub New()
|
|
' Creo riferimento a questa classe in OmagOFFICEMap
|
|
OmagOFFICEMap.SetRefOptionWindowVM(Me)
|
|
' recupero riferimento al OptionWindowM dalla MainWindow
|
|
m_refOptionWindowM = OmagOFFICEMap.refMainWindowVM.refOptionWindowM
|
|
End Sub
|
|
|
|
#End Region ' CONSTRUCTOR
|
|
|
|
End Class
|