2033 lines
64 KiB
VB.net
2033 lines
64 KiB
VB.net
Imports System.Collections.ObjectModel
|
|
Imports System.IO
|
|
Imports System.Drawing.Text
|
|
Imports System.ComponentModel
|
|
Imports EgtUILib
|
|
Imports EgtWPFLib5
|
|
|
|
Public Class OptionsVM
|
|
Implements INotifyPropertyChanged
|
|
|
|
' serve per definire l'indirizzo per la guida (senza aggiungere l'estenzione!)
|
|
Dim m_Chapter As String
|
|
|
|
#Region "HARDWARE PART"
|
|
|
|
Private m_HardwarePartV As HardwarePartV
|
|
Private m_HardwarePartVM As HardwarePartVM
|
|
|
|
Private m_UnitMeasureList As List(Of String) = New List(Of String)({"mm", "inch", EgtMsg(6545)})
|
|
Public ReadOnly Property UnitMeasureList As List(Of String)
|
|
Get
|
|
Return m_UnitMeasureList
|
|
End Get
|
|
End Property
|
|
|
|
Private m_FontList As New ObservableCollection(Of String)
|
|
Public ReadOnly Property FontList As ObservableCollection(Of String)
|
|
Get
|
|
Dim sNfeDir As String = String.Empty
|
|
GetMainPrivateProfileString(S_GEOMDB, K_NFEFONTDIR, "", sNfeDir)
|
|
Dim EgtFontList As String() = Directory.GetFiles(sNfeDir)
|
|
For i = 0 To EgtFontList.Count - 1
|
|
m_FontList.Add(Path.GetFileName(EgtFontList(i)))
|
|
Next
|
|
Dim fonts As New InstalledFontCollection
|
|
For i = 0 To fonts.Families.Count - 1
|
|
m_FontList.Add(fonts.Families(i).Name)
|
|
Next
|
|
Return m_FontList
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property HardwarePart As ContentControl
|
|
Get
|
|
Return m_HardwarePartV
|
|
End Get
|
|
End Property
|
|
|
|
' se sono nel DOORCreator disabilito il tab dell'HardwarePart
|
|
Public Readonly Property IsEnableHarwarePart As Boolean
|
|
Get
|
|
If Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nHardwarePage then
|
|
Return true
|
|
End If
|
|
Return false
|
|
End Get
|
|
End Property
|
|
|
|
' suggerisco il tabcontrol in funzione della schermata in lettura
|
|
Private m_SelectedTab As Integer = 0
|
|
Public Property SelectedTab As Integer
|
|
Get
|
|
If Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nAssemblyPage then
|
|
Return 2
|
|
ElseIf Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nHardwarePage then
|
|
Return 1
|
|
Else
|
|
Return 0
|
|
End If
|
|
End Get
|
|
Set (value as integer)
|
|
m_SelectedTab = value
|
|
End Set
|
|
End Property
|
|
|
|
Private m_SelectedTabGeneral As Integer = 0
|
|
Public Property SelectedTabGeneral As Integer
|
|
Get
|
|
Return m_SelectedTabGeneral
|
|
End Get
|
|
Set(value As Integer)
|
|
m_SelectedTabGeneral = value
|
|
End Set
|
|
End Property
|
|
|
|
|
|
#End Region ' Hardware_part
|
|
|
|
Public ReadOnly Property LanguageList As ObservableCollection(Of Language)
|
|
Get
|
|
Return OptionModule.m_LanguageList
|
|
End Get
|
|
End Property
|
|
|
|
Public Property SelectedLanguage As Language
|
|
Get
|
|
Return OptionModule.m_SelectedLanguage
|
|
End Get
|
|
Set(value As Language)
|
|
If value IsNot OptionModule.m_SelectedLanguage Then
|
|
OptionModule.m_SelectedLanguage = value
|
|
WriteMainPrivateProfileString(S_GENERAL, K_MESSAGES, m_SelectedLanguage.Name)
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Public ReadOnly Property MeasureUnitList As List(Of String)
|
|
Get
|
|
Return OptionModule.m_MeasureUnitList
|
|
End Get
|
|
End Property
|
|
|
|
Public Property SelectedMeasureUnit As String
|
|
Get
|
|
Return OptionModule.m_SelectedMeasureUnit
|
|
End Get
|
|
Set(value As String)
|
|
If value IsNot OptionModule.m_SelectedMeasureUnit Then
|
|
OptionModule.m_bIsMmUnit = (value = OptionModule.m_MeasureUnitList(0))
|
|
EgtSetUiUnits(OptionModule.m_bIsMmUnit)
|
|
WriteMainPrivateProfileString(S_SCENE, K_MMUNITS, If(OptionModule.m_bIsMmUnit, "1", "0"))
|
|
OptionModule.m_SelectedMeasureUnit = value
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Public ReadOnly Property OptionLauncher As List(Of String)
|
|
Get
|
|
Return OptionModule.m_OptionLauncherList
|
|
End Get
|
|
End Property
|
|
|
|
Public Property SelectedOptionLauncher As Integer
|
|
Get
|
|
Return OptionModule.m_SelectedOptionLauncher
|
|
End Get
|
|
Set(value As Integer)
|
|
If value <> OptionModule.m_SelectedOptionLauncher Then
|
|
OptionModule.m_SelectedOptionLauncher = value
|
|
Select Case OptionModule.m_SelectedOptionLauncher
|
|
Case LauncherOpt.Open_window
|
|
WriteMainPrivateProfileString(S_LAUNCHERWINDOW, K_LAUNCHER, "0")
|
|
Case LauncherOpt.Open_last_project
|
|
WriteMainPrivateProfileString(S_LAUNCHERWINDOW, K_LAUNCHER, "1")
|
|
Case Else
|
|
WriteMainPrivateProfileString(S_LAUNCHERWINDOW, K_LAUNCHER, "2")
|
|
End Select
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Public ReadOnly Property DispositionIsEnable As Boolean
|
|
Get
|
|
Return OptionModule.DispositionBoolean
|
|
End Get
|
|
End Property
|
|
|
|
' Carico i parametri associati al Bevel Up
|
|
Public Property BevelUpIsChecked As Boolean
|
|
Get
|
|
If OptionModule.m_bBevelUp = Visibility.Visible Then
|
|
Return True
|
|
Else
|
|
Return False
|
|
End If
|
|
End Get
|
|
Set(value As Boolean)
|
|
' se sto accendendo o spegmemdo un bevel
|
|
If QuestionSetBevel(CheckBevel(OptionModule.m_bBevelUp, value), ConstGen.BEVEL_UP) Then
|
|
If value Then
|
|
OptionModule.m_bBevelUp = Visibility.Visible
|
|
Else
|
|
OptionModule.m_bBevelUp = Visibility.Collapsed
|
|
End If
|
|
|
|
If value Then
|
|
DefaultWritePrivateProfileString(S_EDGE, K_BEVELU_INI, "1")
|
|
Else
|
|
DefaultWritePrivateProfileString(S_EDGE, K_BEVELU_INI, "0")
|
|
End If
|
|
RefreshEdgeTypeList()
|
|
Else
|
|
Return
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
' Carico i parametri associati al Bevel Down
|
|
Public Property BevelDownIsChecked As Boolean
|
|
Get
|
|
If OptionModule.m_bBevelDown = Visibility.Visible Then
|
|
Return True
|
|
Else
|
|
Return False
|
|
End If
|
|
End Get
|
|
Set(value As Boolean)
|
|
If QuestionSetBevel(CheckBevel(OptionModule.m_bBevelDown, value), ConstGen.BEVEL_DOWN) Then
|
|
If value Then
|
|
OptionModule.m_bBevelDown = Visibility.Visible
|
|
Else
|
|
OptionModule.m_bBevelDown = Visibility.Collapsed
|
|
End If
|
|
If value Then
|
|
DefaultWritePrivateProfileString(S_EDGE, K_BEVELD_INI, "1")
|
|
Else
|
|
DefaultWritePrivateProfileString(S_EDGE, K_BEVELD_INI, "0")
|
|
End If
|
|
RefreshEdgeTypeList()
|
|
Else
|
|
Return
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
#Region "Dimensionig"
|
|
|
|
Public Property ExtLineLen As String
|
|
Get
|
|
Return LenToString(OptionModule.m_ExtLineLen, 5)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dVal As Double = 0
|
|
If StringToLen(value, dVal) AndAlso dVal > 0 Then
|
|
OptionModule.m_ExtLineLen = dVal
|
|
EgtSetCurrDimensionStyle(m_ExtLineLen, m_ArrowLen, m_TextDist, m_LenIsMM, m_DecDigit, m_Font, m_TextHeight)
|
|
WriteMainPrivateProfileString(S_DIMENSIONSTYLE, K_EXTLINELEN, DoubleToString(OptionModule.m_ExtLineLen, 5))
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Public Property ArrowLen As String
|
|
Get
|
|
Return LenToString(OptionModule.m_ArrowLen, 5)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dVal As Double = 0
|
|
If StringToLen(value, dVal) AndAlso dVal > 0 Then
|
|
OptionModule.m_ArrowLen = dVal
|
|
EgtSetCurrDimensionStyle(m_ExtLineLen, m_ArrowLen, m_TextDist, m_LenIsMM, m_DecDigit, m_Font, m_TextHeight)
|
|
WriteMainPrivateProfileString(S_DIMENSIONSTYLE, K_ARROWLEN, DoubleToString(OptionModule.m_ArrowLen, 5))
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Public Property TextDist As String
|
|
Get
|
|
Return LenToString(OptionModule.m_TextDist, 5)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dVal As Double = 0
|
|
If StringToLen(value, dVal) AndAlso dVal > 0 Then
|
|
OptionModule.m_TextDist = dVal
|
|
EgtSetCurrDimensionStyle(m_ExtLineLen, m_ArrowLen, m_TextDist, m_LenIsMM, m_DecDigit, m_Font, m_TextHeight)
|
|
WriteMainPrivateProfileString(S_DIMENSIONSTYLE, K_TEXTDIST, DoubleToString(OptionModule.m_TextDist, 5))
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Public Property SelectedUnitMeasure As String
|
|
Get
|
|
If OptionModule.m_LenIsMM = 0 Then
|
|
Return "inch"
|
|
ElseIf OptionModule.m_LenIsMM = 1 Then
|
|
Return "mm"
|
|
Else
|
|
Return EgtMsg(6545)
|
|
End If
|
|
End Get
|
|
Set(value As String)
|
|
Dim nVal As Integer = 2
|
|
If value = "inch" Then
|
|
nVal = 0
|
|
ElseIf value = "mm" Then
|
|
nVal = 1
|
|
End If
|
|
OptionModule.m_LenIsMM = nVal
|
|
EgtSetCurrDimensionStyle(m_ExtLineLen, m_ArrowLen, m_TextDist, m_LenIsMM, m_DecDigit, m_Font, m_TextHeight)
|
|
WriteMainPrivateProfileString(S_DIMENSIONSTYLE, K_LENISMM, OptionModule.m_LenIsMM.ToString())
|
|
End Set
|
|
End Property
|
|
|
|
Public Property DecDigit As String
|
|
Get
|
|
Return OptionModule.m_DecDigit.ToString()
|
|
End Get
|
|
Set(value As String)
|
|
Dim nVal As Integer = 0
|
|
If Integer.TryParse(value, nVal) AndAlso nVal > 0 Then
|
|
OptionModule.m_DecDigit = nVal
|
|
EgtSetCurrDimensionStyle(m_ExtLineLen, m_ArrowLen, m_TextDist, m_LenIsMM, m_DecDigit, m_Font, m_TextHeight)
|
|
WriteMainPrivateProfileString(S_DIMENSIONSTYLE, K_DECDIGIT, OptionModule.m_DecDigit.ToString())
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Public Property SelectedFont As String
|
|
Get
|
|
Return m_FontList(m_FontList.IndexOf(OptionModule.m_Font))
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_Font = value
|
|
EgtSetCurrDimensionStyle(m_ExtLineLen, m_ArrowLen, m_TextDist, m_LenIsMM, m_DecDigit, m_Font, m_TextHeight)
|
|
WriteMainPrivateProfileString(S_DIMENSIONSTYLE, K_DIMFONT, OptionModule.m_Font)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property TextHeight As String
|
|
Get
|
|
Return LenToString(OptionModule.m_TextHeight, 5)
|
|
End Get
|
|
Set(value As String)
|
|
Dim dVal As Double = 0
|
|
If StringToLen(value, dVal) AndAlso dVal > 0 Then
|
|
OptionModule.m_TextHeight = dVal
|
|
EgtSetCurrDimensionStyle(m_ExtLineLen, m_ArrowLen, m_TextDist, m_LenIsMM, m_DecDigit, m_Font, m_TextHeight)
|
|
WriteMainPrivateProfileString(S_DIMENSIONSTYLE, K_TEXTHEIGHT, DoubleToString(OptionModule.m_TextHeight, 5))
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
#End Region ' Dimensioning
|
|
|
|
' Carico i valori di Default della porta
|
|
Public Property WidthValue As String
|
|
Get
|
|
Return OptionModule.m_Width
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_Width = value
|
|
ConvertToCompoConfig(value)
|
|
DefaultWritePrivateProfileString(S_SIZE, K_WIDTH_INI, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property HeightValue As String
|
|
Get
|
|
Return OptionModule.m_Height
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_Height = value
|
|
ConvertToCompoConfig(value)
|
|
DefaultWritePrivateProfileString(S_SIZE, K_HEIGHT_INI, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property ThicknessValue As String
|
|
Get
|
|
Return OptionModule.m_Thickness
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_Thickness = value
|
|
ConvertToCompoConfig(value)
|
|
DefaultWritePrivateProfileString(S_SIZE, K_THICKNESS_INI, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property WeightValue As String
|
|
Get
|
|
Return OptionModule.m_Weight
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_Weight = value
|
|
DefaultWritePrivateProfileString(S_SIZE, K_WEIGHT_INI, OptionModule.m_Weight)
|
|
End Set
|
|
End Property
|
|
|
|
Public Shared Property IsCheckedWeight As Boolean
|
|
Get
|
|
If Part.IsCheckedWeight = Visibility.Visible Then
|
|
Return True
|
|
Else
|
|
Return False
|
|
End If
|
|
End Get
|
|
Set(value As Boolean)
|
|
If value Then
|
|
Part.IsCheckedWeight = Visibility.Visible
|
|
DefaultWritePrivateProfileString(S_SIZE, K_WEIGHTISCHECKED_INI, "1")
|
|
Else
|
|
If Part.IsCheckedWeight = Visibility.Visible Then
|
|
If MessageBox.Show(EgtMsg(50153), EgtMsg(50110), MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) = MessageBoxResult.Yes Then
|
|
Part.IsCheckedWeight = Visibility.Collapsed
|
|
DefaultWritePrivateProfileString(S_SIZE, K_WEIGHTISCHECKED_INI, "0")
|
|
Else
|
|
Return
|
|
End If
|
|
End If
|
|
End If
|
|
If Not IsNothing(Map.refAssemblyManagerVM.CurrProject) AndAlso Not IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) Then
|
|
Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified = True
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Public Shared Sub SetIsCheckedWeight(IsChecked As Boolean)
|
|
If IsChecked Then
|
|
Part.IsCheckedWeight = Visibility.Visible
|
|
DefaultWritePrivateProfileString(S_SIZE, K_WEIGHTISCHECKED_INI, "1")
|
|
Else
|
|
Part.IsCheckedWeight = Visibility.Collapsed
|
|
DefaultWritePrivateProfileString(S_SIZE, K_WEIGHTISCHECKED_INI, "0")
|
|
End If
|
|
End Sub
|
|
|
|
Public ReadOnly Property SwingTypeList As List(Of String)
|
|
Get
|
|
Return OptionModule.m_SwingTypeList
|
|
End Get
|
|
End Property
|
|
|
|
Public Property SwingValue As String
|
|
Get
|
|
Dim SwingAlias As SwingItemTypeList = Nothing
|
|
SetCurrSwing(SwingAlias, OptionModule.m_Swing)
|
|
OptionModule.m_Swing = SwingAlias.AliasName
|
|
Return OptionModule.m_Swing
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_Swing = value
|
|
Dim SwingAlias As SwingItemTypeList = Nothing
|
|
SetCurrSwing(SwingAlias, value)
|
|
OptionModule.m_Swing = SwingAlias.AliasName
|
|
DefaultWritePrivateProfileString(S_SIZE, K_SWING_INI, SwingAlias.Name)
|
|
End Set
|
|
End Property
|
|
|
|
Public Shared ReadOnly Property LockEdgeTypeList As ObservableCollection(Of EdgeType)
|
|
Get
|
|
Return Part.m_LockEdgeTypeList
|
|
End Get
|
|
End Property
|
|
|
|
Public Shared ReadOnly Property HingeEdgeTypeList As ObservableCollection(Of EdgeType)
|
|
Get
|
|
Return Part.m_HingeEdgeTypeList
|
|
End Get
|
|
End Property
|
|
|
|
Public Shared ReadOnly Property TopEdgeTypeList As ObservableCollection(Of EdgeType)
|
|
Get
|
|
Return Part.m_TopEdgeTypeList
|
|
End Get
|
|
End Property
|
|
|
|
Public Shared ReadOnly Property BottomEdgeTypeList As ObservableCollection(Of EdgeType)
|
|
Get
|
|
Return Part.m_BottomEdgeTypeList
|
|
End Get
|
|
End Property
|
|
|
|
Public Shared ReadOnly Property FrameEdgeTypeList As ObservableCollection(Of EdgeType)
|
|
Get
|
|
Return Assembly.m_FrameEdgeTypeList
|
|
End Get
|
|
End Property
|
|
|
|
|
|
Public Property LockEdgeType As EdgeType
|
|
Get
|
|
If m_LockEdgeType.IsActive = Visibility.Collapsed Then
|
|
m_LockEdgeType = LockEdgeTypeList(0)
|
|
End If
|
|
Return m_LockEdgeType
|
|
End Get
|
|
Set(value As EdgeType)
|
|
OptionModule.m_LockEdgeType = value
|
|
DefaultWritePrivateProfileString(S_EDGE, K_LOCKEDGE_INI, OptionModule.m_LockEdgeType.Name)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property HingeEdgeType As EdgeType
|
|
Get
|
|
If m_HingeEdgeType.IsActive = Visibility.Collapsed Then
|
|
m_HingeEdgeType = HingeEdgeTypeList(0)
|
|
End If
|
|
Return m_HingeEdgeType
|
|
End Get
|
|
Set(value As EdgeType)
|
|
m_HingeEdgeType = value
|
|
DefaultWritePrivateProfileString(S_EDGE, K_HINGEDGE_INI, OptionModule.m_HingeEdgeType.Name)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property TopType As EdgeType
|
|
Get
|
|
If m_TopType.IsActive = Visibility.Collapsed Then
|
|
m_TopType = TopEdgeTypeList(0)
|
|
Else
|
|
Try
|
|
m_TopType = TopEdgeTypeList.First(Function(x) x.Name = m_TopType.Name)
|
|
Catch ex As Exception
|
|
m_TopType = TopEdgeTypeList(0)
|
|
End Try
|
|
End If
|
|
Return m_TopType
|
|
End Get
|
|
Set(value As EdgeType)
|
|
OptionModule.m_TopType = value
|
|
DefaultWritePrivateProfileString(S_EDGE, K_TOPEDGE_INI, OptionModule.m_TopType.Name)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property BottomType As EdgeType
|
|
Get
|
|
If m_BottomType.IsActive = Visibility.Collapsed Then
|
|
m_BottomType = BottomEdgeTypeList(0)
|
|
Else
|
|
Try
|
|
m_BottomType = BottomEdgeTypeList.First(Function(x) x.Name = m_BottomType.Name)
|
|
Catch ex As Exception
|
|
m_BottomType = BottomEdgeTypeList(0)
|
|
End Try
|
|
End If
|
|
Return m_BottomType
|
|
End Get
|
|
Set(value As EdgeType)
|
|
OptionModule.m_BottomType = value
|
|
DefaultWritePrivateProfileString(S_EDGE, K_BOTTOMEDGE_INI, OptionModule.m_BottomType.Name)
|
|
End Set
|
|
End Property
|
|
|
|
' is Checked
|
|
Public Property LockEdgeIsChecked As Boolean
|
|
Get
|
|
Return OptionModule.m_LockEdgeMachining
|
|
End Get
|
|
Set(value As Boolean)
|
|
OptionModule.m_LockEdgeMachining = value
|
|
If value Then
|
|
DefaultWritePrivateProfileString(S_MACHINING, K_LOCKEDGEISCHECKED_INI, "1")
|
|
Else
|
|
DefaultWritePrivateProfileString(S_MACHINING, K_LOCKEDGEISCHECKED_INI, "0")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Public Property HingeEdgeIsChecked As Boolean
|
|
Get
|
|
Return OptionModule.m_HingeEdgeMachining
|
|
End Get
|
|
Set(value As Boolean)
|
|
OptionModule.m_HingeEdgeMachining = value
|
|
If value Then
|
|
DefaultWritePrivateProfileString(S_MACHINING, K_HINGEDGEEISCHECKED_INI, "1")
|
|
Else
|
|
DefaultWritePrivateProfileString(S_MACHINING, K_HINGEDGEEISCHECKED_INI, "0")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Public Property TopIsChecked As Boolean
|
|
Get
|
|
Return OptionModule.m_TopMachining
|
|
End Get
|
|
Set(value As Boolean)
|
|
OptionModule.m_TopMachining = value
|
|
If value Then
|
|
DefaultWritePrivateProfileString(S_MACHINING, K_TOPISCHECKED_INI, "1")
|
|
Else
|
|
DefaultWritePrivateProfileString(S_MACHINING, K_TOPISCHECKED_INI, "0")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Public Property BottomIsChecked As Boolean
|
|
Get
|
|
Return OptionModule.m_BottomMachining
|
|
End Get
|
|
Set(value As Boolean)
|
|
OptionModule.m_BottomMachining = value
|
|
If value Then
|
|
DefaultWritePrivateProfileString(S_MACHINING, K_BOTTOMISCHECKED_INI, "1")
|
|
Else
|
|
DefaultWritePrivateProfileString(S_MACHINING, K_BOTTOMISCHECKED_INI, "0")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
' OverMaterial
|
|
Public Property LockEdgeOverMaterialValue As String
|
|
Get
|
|
Return OptionModule.m_LockEdgeOverMaterial
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_LockEdgeOverMaterial = value
|
|
ConvertToCompoConfig(value)
|
|
DefaultWritePrivateProfileString(S_OVERMATERIAL, K_LOCKEDGEOVERMATERIAL_INI, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property HingeEdgeOverMaterialValue As String
|
|
Get
|
|
Return OptionModule.m_HingeEdgeOverMaterial
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_HingeEdgeOverMaterial = value
|
|
ConvertToCompoConfig(value)
|
|
DefaultWritePrivateProfileString(S_OVERMATERIAL, K_HINGEDGEOVERMATERIAL_INI, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property TopOverMaterialValue As String
|
|
Get
|
|
Return OptionModule.m_TopOverMaterial
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_TopOverMaterial = value
|
|
ConvertToCompoConfig(value)
|
|
DefaultWritePrivateProfileString(S_OVERMATERIAL, K_TOPOVERMATERIAL_INI, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property BottomOverMaterialValue As String
|
|
Get
|
|
Return OptionModule.m_BottomOverMaterial
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_BottomOverMaterial = value
|
|
ConvertToCompoConfig(value)
|
|
DefaultWritePrivateProfileString(S_OVERMATERIAL, K_BOTTOMOVERMATERIAL_INI, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property MyProjectDir As String
|
|
Get
|
|
Return IniFile.m_MyProjectDir
|
|
End Get
|
|
Set(value As String)
|
|
If value IsNot IniFile.m_MyProjectDir Then
|
|
IniFile.m_MyProjectDir = value
|
|
WriteMainPrivateProfileString(S_DOORS, K_MYPROJECTDIR, value)
|
|
End If
|
|
NotifyPropertyChanged("MyProjectDir")
|
|
End Set
|
|
End Property
|
|
|
|
Public Property MachinDir As String
|
|
Get
|
|
Return IniFile.m_MachinProject
|
|
End Get
|
|
Set(value As String)
|
|
If value IsNot IniFile.m_MachinProject Then
|
|
IniFile.m_MachinProject = value
|
|
WriteMainPrivateProfileString(S_DOORS, K_MACHINDIR, value)
|
|
End If
|
|
NotifyPropertyChanged("MachinDir")
|
|
End Set
|
|
End Property
|
|
|
|
'----------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
'Public ReadOnly Property EnableAssembly As Boolean
|
|
' Get
|
|
' Return (OptionModule.m_ConfigurationSoftware = ConfigType.Assembly)
|
|
' End Get
|
|
'End Property
|
|
|
|
Public Property LightUp As String
|
|
Get
|
|
Return OptionModule.m_LightUp
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_LightUp = value
|
|
ConvertToCompoConfig(value)
|
|
DefaultWritePrivateProfileString(S_LIGHT, K_LIGHTUP, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property LightBottom As String
|
|
Get
|
|
Return OptionModule.m_LightBottom
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_LightBottom = value
|
|
ConvertToCompoConfig(value)
|
|
' modifico le dimensioni dei Jambs
|
|
DefaultWritePrivateProfileString(S_LIGHT, K_LIGHTBOTTOM, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property LightHinge As String
|
|
Get
|
|
Return OptionModule.m_LightHinge
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_LightHinge = value
|
|
ConvertToCompoConfig(value)
|
|
DefaultWritePrivateProfileString(S_LIGHT, K_LIGHTHINGE, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property LightLock As String
|
|
Get
|
|
Return OptionModule.m_LightLock
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_LightLock = value
|
|
ConvertToCompoConfig(value)
|
|
DefaultWritePrivateProfileString(S_LIGHT, K_LIGHTLOCK, value)
|
|
End Set
|
|
End Property
|
|
|
|
' spessore del jamb della testa
|
|
Public Property ThicknessHead As String
|
|
Get
|
|
Return OptionModule.m_ThicknessHead
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_ThicknessHead = value
|
|
ConvertToCompoConfig(value)
|
|
DefaultWritePrivateProfileString(S_SIZEJAMB, K_THICKNESSHEAD, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property OverlapHinge As String
|
|
Get
|
|
Return OptionModule.m_OverlapHinge
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_OverlapHinge = value
|
|
ConvertToCompoConfig(value)
|
|
DefaultWritePrivateProfileString(S_OVERLAP, K_OVERLAPHINGE, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property OverlapLock As String
|
|
Get
|
|
Return OptionModule.m_OverlapLock
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_OverlapLock = value
|
|
ConvertToCompoConfig(value)
|
|
DefaultWritePrivateProfileString(S_OVERLAP, K_OVERLAPLOCK, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property OverlapTop As String
|
|
Get
|
|
Return OptionModule.m_OverlapTop
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_OverlapTop = value
|
|
ConvertToCompoConfig(value)
|
|
DefaultWritePrivateProfileString(S_OVERLAP, K_OVERLAPTOP, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property DeltaThickness As String
|
|
Get
|
|
Return OptionModule.m_DeltaThickness
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_DeltaThickness = value
|
|
ConvertToCompoConfig(value)
|
|
DefaultWritePrivateProfileString(S_OVERLAP, K_DELTAT, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property Exterior As Boolean
|
|
Get
|
|
Return OptionModule.m_Exterior
|
|
End Get
|
|
Set(value As Boolean)
|
|
OptionModule.m_Exterior = value
|
|
If OptionModule.m_Exterior Then
|
|
DefaultWritePrivateProfileString(S_THRESHOLD, K_EXTERIOR, "1")
|
|
Else
|
|
DefaultWritePrivateProfileString(S_THRESHOLD, K_EXTERIOR, "0")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Public Property TotalDimension As Boolean
|
|
Get
|
|
If OptionModule.m_TotalDimension Then
|
|
DefaultWritePrivateProfileString(S_TOTALDIMENSION, K_STATIC, "1")
|
|
Else
|
|
DefaultWritePrivateProfileString(S_TOTALDIMENSION, K_STATIC, "0")
|
|
End If
|
|
Return OptionModule.m_TotalDimension
|
|
End Get
|
|
Set(value As Boolean)
|
|
OptionModule.m_TotalDimension = value
|
|
NotifyPropertyChanged("TotalDimension")
|
|
' aggiorno la grafica
|
|
If Not IsNothing(Map.refAssemblyPageVM) AndAlso Not IsNothing(Map.refAssemblyPageVM.CurrAssembly) Then
|
|
Map.refAssemblyPageVM.CurrAssembly.Dimension = OptionModule.m_TotalDimension
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Public Property TotalHeight As String
|
|
Get
|
|
'If Not IsNothing(Map.refAssemblyPageVM) AndAlso Not IsNothing(Map.refAssemblyPageVM.CurrAssembly) Then
|
|
' If Not IsNothing(Map.refAssemblyManagerVM.ReserchPartDoor("FL_")) Then
|
|
' OptionModule.m_TotalHeight = Map.refAssemblyManagerVM.ReserchPartDoor("FL_").Door.Height
|
|
' Else
|
|
' TotalDimension = False
|
|
' End If
|
|
'End If
|
|
DefaultWritePrivateProfileString(S_TOTALDIMENSION, K_TOTALHEIGHT, OptionModule.m_TotalHeight)
|
|
Return OptionModule.m_TotalHeight
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_TotalHeight = value
|
|
NotifyPropertyChanged("TotalHeight")
|
|
'If Not IsNothing(Map.refAssemblyPageVM) AndAlso Not IsNothing(Map.refAssemblyPageVM.CurrAssembly) Then
|
|
' Map.refAssemblyPageVM.CurrAssembly.SetDimension("Height")
|
|
' Map.refSceneManagerVM.RefreshBtn()
|
|
'End If
|
|
End Set
|
|
End Property
|
|
|
|
Public Property TotalWidth As String
|
|
Get
|
|
'If Not IsNothing(Map.refAssemblyPageVM) AndAlso Not IsNothing(Map.refAssemblyPageVM.CurrAssembly) Then
|
|
' Dim DO_1 As PartDoor = Map.refAssemblyManagerVM.ReserchPartDoor("DO_1")
|
|
' Dim DO_2 As PartDoor = Map.refAssemblyManagerVM.ReserchPartDoor("DO_2")
|
|
' Dim LL As String = Map.refAssemblyPageVM.CurrAssembly.LightLock
|
|
' Dim LH As String = Map.refAssemblyPageVM.CurrAssembly.LightHinge
|
|
' Dim JW As String = Map.refAssemblyPageVM.CurrAssembly.Width
|
|
' If Not IsNothing(DO_1) Then
|
|
' Dim nDO_1Width As Double = 0
|
|
' Dim nDO_2Width As Double = 0
|
|
' StringToDouble(DO_1.Door.Width, nDO_1Width)
|
|
' Dim nJW As Double = 0
|
|
' StringToDouble(JW, nJW)
|
|
' Dim nLL As Double = 0
|
|
' StringToDouble(LL, nLL)
|
|
' Dim nLH As Double = 0
|
|
' StringToDouble(LH, nLH)
|
|
' If Not IsNothing(DO_2) Then
|
|
' StringToDouble(DO_2.Door.Width, nDO_2Width)
|
|
' OptionModule.m_TotalWidth = DoubleToString(nDO_1Width + nDO_2Width + nLL + nLH * 2 + 2 * nJW, 4)
|
|
' Else
|
|
' OptionModule.m_TotalWidth = DoubleToString(nDO_1Width + nLL + nLH + 2 * nJW, 4)
|
|
' End If
|
|
' Else
|
|
' TotalDimension = False
|
|
' End If
|
|
'End If
|
|
DefaultWritePrivateProfileString(S_TOTALDIMENSION, K_TOTALWIDTH, OptionModule.m_TotalWidth)
|
|
Return OptionModule.m_TotalWidth
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_TotalWidth = value
|
|
NotifyPropertyChanged("TotalWidth")
|
|
End Set
|
|
End Property
|
|
|
|
|
|
Public Property ThicknessJamb As String
|
|
Get
|
|
Return OptionModule.m_ThicknessJamb
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_ThicknessJamb = value
|
|
ConvertToCompoConfig(value)
|
|
DefaultWritePrivateProfileString(S_SIZEJAMB, K_THICKNESS, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property WidthJamb As String
|
|
Get
|
|
Return OptionModule.m_WidthJamb
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_WidthJamb = value
|
|
ConvertToCompoConfig(value)
|
|
DefaultWritePrivateProfileString(S_SIZEJAMB, K_WIDTH, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public ReadOnly Property DoorListNumber As List(Of String)
|
|
Get
|
|
Return OptionModule.m_DoorsListNumber
|
|
End Get
|
|
End Property
|
|
|
|
Public Property DoorNumber As String
|
|
Get
|
|
Return OptionModule.m_DoorsNumber
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_DoorsNumber = value
|
|
DefaultWritePrivateProfileString(S_DOORSNUMBER, K_DOORSELECTEDTNUMBER, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property LockEdgeTypeAssembly As EdgeType
|
|
Get
|
|
If m_LockEdgeTypeAssembly.IsActive = Visibility.Collapsed Then
|
|
OptionModule.m_LockEdgeTypeAssembly = FrameEdgeTypeList(0)
|
|
End If
|
|
Return OptionModule.m_LockEdgeTypeAssembly
|
|
End Get
|
|
Set(value As EdgeType)
|
|
OptionModule.m_LockEdgeTypeAssembly = value
|
|
DefaultWritePrivateProfileString(S_EDGEASSEMBLY, K_LOCKEDGE, OptionModule.m_LockEdgeTypeAssembly.Name)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property HingeEdgeTypeAssembly As EdgeType
|
|
Get
|
|
If m_HingeEdgeTypeAssembly.IsActive = Visibility.Collapsed Then
|
|
OptionModule.m_HingeEdgeTypeAssembly = FrameEdgeTypeList(0)
|
|
End If
|
|
Return OptionModule.m_HingeEdgeTypeAssembly
|
|
End Get
|
|
Set(value As EdgeType)
|
|
OptionModule.m_HingeEdgeTypeAssembly = value
|
|
DefaultWritePrivateProfileString(S_EDGEASSEMBLY, K_HINGEDGE_INI, OptionModule.m_HingeEdgeTypeAssembly.Name)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property TopTypeAssembly As EdgeType
|
|
Get
|
|
If m_TopTypeAssembly.IsActive = Visibility.Collapsed Then
|
|
OptionModule.m_TopTypeAssembly = FrameEdgeTypeList(0)
|
|
End If
|
|
Return OptionModule.m_TopTypeAssembly
|
|
End Get
|
|
Set(value As EdgeType)
|
|
OptionModule.m_TopTypeAssembly = value
|
|
DefaultWritePrivateProfileString(S_EDGEASSEMBLY, K_TOPEDGE_INI, OptionModule.m_TopTypeAssembly.Name)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property BottomTypeAssembly As EdgeType
|
|
Get
|
|
If m_BottomTypeAssembly.IsActive = Visibility.Collapsed Then
|
|
OptionModule.m_BottomTypeAssembly = FrameEdgeTypeList(0)
|
|
End If
|
|
Return OptionModule.m_BottomTypeAssembly
|
|
End Get
|
|
Set(value As EdgeType)
|
|
OptionModule.m_BottomTypeAssembly = value
|
|
DefaultWritePrivateProfileString(S_EDGEASSEMBLY, K_BOTTOMEDGE_INI, OptionModule.m_BottomTypeAssembly.Name)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property OverlapBottom As String
|
|
Get
|
|
Return OptionModule.m_OverlapBottom
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_OverlapBottom = value
|
|
ConvertToCompoConfig(value)
|
|
DefaultWritePrivateProfileString(S_THRESHOLD, K_OVERLAPBOTTOM, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property ThickinessBottom As String
|
|
Get
|
|
Return OptionModule.m_ThicknessBottom
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_ThicknessBottom = value
|
|
ConvertToCompoConfig(value)
|
|
DefaultWritePrivateProfileString(S_THRESHOLD, K_THICKNESSBOTTOM, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property DepthBottom As String
|
|
Get
|
|
Return OptionModule.m_DepthBottom
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_DepthBottom = value
|
|
ConvertToCompoConfig(value)
|
|
DefaultWritePrivateProfileString(S_THRESHOLD, K_DEPTHBOTTOM, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property DeltaBottom As String
|
|
Get
|
|
Return OptionModule.m_DeltaBottom
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_DeltaBottom = value
|
|
ConvertToCompoConfig(value)
|
|
DefaultWritePrivateProfileString(S_THRESHOLD, K_DELTABOTTOM, value)
|
|
End Set
|
|
End Property
|
|
|
|
#Region "Machining Assembly"
|
|
Public Property LockEdgeMachiningAssembly As Boolean
|
|
Get
|
|
Return OptionModule.m_LockEdgeMachiningAssembly
|
|
End Get
|
|
Set(value As Boolean)
|
|
OptionModule.m_LockEdgeMachiningAssembly = value
|
|
If value Then
|
|
DefaultWritePrivateProfileString(S_MACHININGASSEMBLY, K_LOCKEDGEISCHECKED_INI, "1")
|
|
Else
|
|
DefaultWritePrivateProfileString(S_MACHININGASSEMBLY, K_LOCKEDGEISCHECKED_INI, "0")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Public Property LockEdgeOverMaterialAssembly As String
|
|
Get
|
|
Return OptionModule.m_LockEdgeOverMaterialAssembly
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_LockEdgeOverMaterialAssembly = value
|
|
ConvertToCompoConfig(value)
|
|
DefaultWritePrivateProfileString(S_OVERMATERIALASSEMBLY, K_LOCKEDGEOVERMATERIAL_INI, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property HingeEdgeMachiningAssembly As Boolean
|
|
Get
|
|
Return OptionModule.m_HingeEdgeMachiningAssembly
|
|
End Get
|
|
Set(value As Boolean)
|
|
OptionModule.m_HingeEdgeMachiningAssembly = value
|
|
If value Then
|
|
DefaultWritePrivateProfileString(S_MACHININGASSEMBLY, K_HINGEDGEEISCHECKED_INI, "1")
|
|
Else
|
|
DefaultWritePrivateProfileString(S_MACHININGASSEMBLY, K_HINGEDGEEISCHECKED_INI, "0")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Public Property HingeEdgeOverMaterialAssembly As String
|
|
Get
|
|
Return OptionModule.m_HingeEdgeOverMaterialAssembly
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_HingeEdgeOverMaterialAssembly = value
|
|
ConvertToCompoConfig(value)
|
|
DefaultWritePrivateProfileString(S_OVERMATERIALASSEMBLY, K_HINGEDGEOVERMATERIAL_INI, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property TopMachiningAssembly As Boolean
|
|
Get
|
|
Return OptionModule.m_TopMachiningAssembly
|
|
End Get
|
|
Set(value As Boolean)
|
|
OptionModule.m_TopMachiningAssembly = value
|
|
If value Then
|
|
DefaultWritePrivateProfileString(S_MACHININGASSEMBLY, K_TOPISCHECKED_INI, "1")
|
|
Else
|
|
DefaultWritePrivateProfileString(S_MACHININGASSEMBLY, K_TOPISCHECKED_INI, "0")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Public Property TopOverMaterialAssembly As String
|
|
Get
|
|
Return OptionModule.m_TopOverMaterialAssembly
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_TopOverMaterialAssembly = value
|
|
ConvertToCompoConfig(value)
|
|
DefaultWritePrivateProfileString(S_OVERMATERIALASSEMBLY, K_TOPOVERMATERIAL_INI, value)
|
|
End Set
|
|
End Property
|
|
|
|
Public Property BottomMachiningAssembly As Boolean
|
|
Get
|
|
Return OptionModule.m_BottomMachiningAssembly
|
|
End Get
|
|
Set(value As Boolean)
|
|
OptionModule.m_BottomMachiningAssembly = value
|
|
If value Then
|
|
DefaultWritePrivateProfileString(S_MACHININGASSEMBLY, K_BOTTOMISCHECKED_INI, "1")
|
|
Else
|
|
DefaultWritePrivateProfileString(S_MACHININGASSEMBLY, K_BOTTOMISCHECKED_INI, "0")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Public Property BottomOverMaterialAssembly As String
|
|
Get
|
|
Return OptionModule.m_BottomOverMaterialAssembly
|
|
End Get
|
|
Set(value As String)
|
|
OptionModule.m_BottomOverMaterialAssembly = value
|
|
ConvertToCompoConfig(value)
|
|
DefaultWritePrivateProfileString(S_OVERMATERIALASSEMBLY, K_BOTTOMOVERMATERIAL_INI, value)
|
|
End Set
|
|
End Property
|
|
|
|
#End Region ' Machining Assembly
|
|
|
|
'-------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
' Definizione comandi
|
|
Private m_cmdCloseOptions As ICommand
|
|
Private m_cmdBrowse As ICommand
|
|
Private m_F1GuideCmd As ICommand
|
|
|
|
#Region "Messages"
|
|
|
|
Public ReadOnly Property Title As String
|
|
Get
|
|
Dim sTitle As String = EgtMsg(MSG_MAINWINDOW + 209)
|
|
If Map.refMainWindowVM.SelectedPage =MainWindowVM.ListPageEnum.nDDFPage then
|
|
sTitle = "DOOR - " & sTitle
|
|
else
|
|
sTitle = "HARDWARE - " & sTitle
|
|
End If
|
|
Return sTitle
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property StartUpMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MAINWINDOW + 210)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property CurrentLanguageMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_OPTIONPAGE + 1)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property LanguageAdvertMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_OPTIONPAGE + 2)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property MeasureUnit As String
|
|
Get
|
|
Return EgtMsg(50211)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property DirectoryMsg As String
|
|
Get
|
|
Return EgtMsg(50212)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property MachinDirectoryMsg As String
|
|
Get
|
|
' Directory Machine
|
|
Return EgtMsg(50306)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property ConfigurationSoftwareMsg As String
|
|
Get
|
|
Return "Assembly"
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property General As String
|
|
Get
|
|
Return EgtMsg(MSG_MAINWINDOW + 201)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property OptionStart As String
|
|
Get
|
|
Return EgtMsg(50213)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property CurrentUnitMeasure As String
|
|
Get
|
|
Return EgtMsg(50200)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property CurrentDirectiry As String
|
|
Get
|
|
Return EgtMsg(50214)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property CurrentMachinDirectiry As String
|
|
Get
|
|
'Machine
|
|
Return EgtMsg(50307)
|
|
End Get
|
|
End Property
|
|
|
|
|
|
Public ReadOnly Property DoorMsg As String
|
|
Get
|
|
'Door
|
|
Return EgtMsg(50308)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property HardwarePartMsg As String
|
|
Get
|
|
'HardwarePart
|
|
Return EgtMsg(50712)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property WidthMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MAINWINDOW + 1)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property EdgeMsg As String
|
|
Get
|
|
Return EgtMsg(50215)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property OverMaterialMsg As String
|
|
Get
|
|
Return EgtMsg(50216)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property HeightMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MAINWINDOW + 2)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property ThicknessMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MAINWINDOW + 3)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property SwingMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MAINWINDOW + 4)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property LockEdgeMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MAINWINDOW + 5)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property HingeEdgeMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MAINWINDOW + 6)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property TopMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MAINWINDOW + 7)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property WeightMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MAINWINDOW + 47)
|
|
End Get
|
|
End Property
|
|
|
|
|
|
Public ReadOnly Property BottomMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_MAINWINDOW + 8)
|
|
End Get
|
|
End Property
|
|
|
|
' Machinig
|
|
Public ReadOnly Property LockEdgeOverMaterial As String
|
|
Get
|
|
Return EgtMsg(MSG_MAINWINDOW + 202)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property HingeEdgeOverMaterial As String
|
|
Get
|
|
Return EgtMsg(MSG_MAINWINDOW + 203)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property TopOverMaterial As String
|
|
Get
|
|
Return EgtMsg(MSG_MAINWINDOW + 204)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property BottomOverMaterial As String
|
|
Get
|
|
Return EgtMsg(MSG_MAINWINDOW + 205)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property MsgBrowse As String
|
|
Get
|
|
Return EgtMsg(50217)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property MsgClose As String
|
|
Get
|
|
Return EgtMsg(50218)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property MachMsg As String
|
|
Get
|
|
' Mach.
|
|
Return EgtMsg(50711)
|
|
End Get
|
|
End Property
|
|
|
|
' BevelMsg
|
|
Public ReadOnly Property BevelMsg As String
|
|
Get
|
|
Return EgtMsg(50219)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property BevelUpMsg As String
|
|
Get
|
|
Return EgtMsg(50220)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property BevelDownMsg As String
|
|
Get
|
|
Return EgtMsg(50221)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property MachinePositionMsg As String
|
|
Get
|
|
Return EgtMsg(50222)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property GeneralOption As String
|
|
Get
|
|
' 50729=General
|
|
Return EgtMsg(50729)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property GeneralCam As String
|
|
Get
|
|
' 50730=Report
|
|
Return EgtMsg(50730)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property ExtLineLenMsg As String
|
|
Get
|
|
' Estensione linea
|
|
Return EgtMsg(6537)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property ArrowLenMsg As String
|
|
Get
|
|
' Dimensione freccia
|
|
Return EgtMsg(6538)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property TextDistMsg As String
|
|
Get
|
|
' Distanza messaggio
|
|
Return EgtMsg(6539)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property LenIsMMMsg As String
|
|
Get
|
|
' Unità di misura
|
|
Return EgtMsg(6540)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property DecDigitMsg As String
|
|
Get
|
|
' Numero dicmali
|
|
Return EgtMsg(6541)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property FontMsg As String
|
|
Get
|
|
' Caretteri
|
|
Return EgtMsg(6542)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property TextHeightMsg As String
|
|
Get
|
|
' Dimensione testo
|
|
Return EgtMsg(6543)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property DimensionMsg As String
|
|
Get
|
|
' Quotatura
|
|
Return EgtMsg(6544)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property DispConfiguration As String
|
|
Get
|
|
Dim Msg As String = String.Empty
|
|
If OptionModule.m_sDisposition = ConstGen.BEVEL_UP Then
|
|
'Wide Side Down (BU)
|
|
Msg = EgtMsg(50309)
|
|
m_BevelConfiguration = Visibility.Visible
|
|
m_BySwingConfiguration = Visibility.Collapsed
|
|
ElseIf OptionModule.m_sDisposition = ConstGen.BEVEL_DOWN Then
|
|
'Wide Side Up (BD)
|
|
Msg = EgtMsg(50310)
|
|
m_BevelConfiguration = Visibility.Visible
|
|
m_BySwingConfiguration = Visibility.Collapsed
|
|
Else
|
|
m_BevelConfiguration = Visibility.Collapsed
|
|
m_BySwingConfiguration = Visibility.Visible
|
|
End If
|
|
Return Msg
|
|
End Get
|
|
End Property
|
|
|
|
' Template
|
|
Public ReadOnly Property TemplateMsg As String
|
|
Get
|
|
' Template
|
|
Return EgtMsg(50227)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property EnableTemplateMsg As String
|
|
Get
|
|
' Enable template
|
|
Return EgtMsg(50228)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property OrderMsg As String
|
|
Get
|
|
' Order
|
|
Return EgtMsg(50068)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property EnableOrderMsg As String
|
|
Get
|
|
' Enable Order
|
|
Return EgtMsg(50229)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property ProjectMsg As String
|
|
Get
|
|
' Prject
|
|
Return EgtMsg(50547)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property EnableSingleDoorMsg As String
|
|
Get
|
|
' Enable single door.
|
|
Return EgtMsg(50546)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property ImpTempMsg As String
|
|
Get
|
|
' Open template door
|
|
Return EgtMsg(50230)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property OpenOrderMsg As String
|
|
Get
|
|
' Open window order
|
|
Return EgtMsg(50231)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property SingleDoorMsg As String
|
|
Get
|
|
' The new configuration will take effect after restart.
|
|
Return EgtMsg(50548)
|
|
End Get
|
|
End Property
|
|
|
|
Private m_BySwingConfiguration As Visibility
|
|
Public ReadOnly Property BySwingConfiguration As Visibility
|
|
Get
|
|
Return m_BySwingConfiguration
|
|
End Get
|
|
End Property
|
|
'---------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
'tab2
|
|
Public ReadOnly Property AssemblyMsg As String
|
|
Get
|
|
Return EgtMsg(50713)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property LightUpMsg As String
|
|
Get
|
|
' Light Up
|
|
Return EgtMsg(50056)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property LightLockMsg As String
|
|
Get
|
|
' Light Lock
|
|
Return EgtMsg(50057)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property LightBottomMsg As String
|
|
Get
|
|
Return EgtMsg(50058)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property LightHingeMsg As String
|
|
Get
|
|
Return EgtMsg(50059)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property ThicknessHeadMsg As String
|
|
Get
|
|
Return EgtMsg(50060)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property OverlapHingeMsg As String
|
|
Get
|
|
Return EgtMsg(50061)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property OverlapLockMsg As String
|
|
Get
|
|
Return EgtMsg(50062)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property OverlapTopMsg As String
|
|
Get
|
|
Return EgtMsg(50063)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property DeltaTMsg As String
|
|
Get
|
|
Return EgtMsg(50064)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property ExteriorMsg As String
|
|
Get
|
|
Return EgtMsg(50065)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property DoorNumberMsg As String
|
|
Get
|
|
Return EgtMsg(50066)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property JambsAndDoorsMsg As String
|
|
Get
|
|
Return EgtMsg(50067)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property TotalDimesionMsg As String
|
|
Get
|
|
Return EgtMsg(50714)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property TotalHeightMsg As String
|
|
Get
|
|
Return EgtMsg(50002)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property TotalWidthMsg As String
|
|
Get
|
|
Return EgtMsg(50001)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property OverlapBottomMsg As String
|
|
Get
|
|
' 50716=Overlap Bottom
|
|
Return EgtMsg(50716)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property ThicknessBottomMsg As String
|
|
Get
|
|
' 50717=Thickness Bottom
|
|
Return EgtMsg(50717)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property DepthBottomMsg As String
|
|
Get
|
|
' 50718=Depth Bottom
|
|
Return EgtMsg(50718)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property DeltaBottomMsg As String
|
|
Get
|
|
' 50719=Delta Bottom
|
|
Return EgtMsg(50719)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property DepthMsg As String
|
|
Get
|
|
' 50715=Depth
|
|
Return EgtMsg(50715)
|
|
End Get
|
|
End Property
|
|
|
|
#End Region
|
|
|
|
Private m_BevelConfiguration As Visibility
|
|
Public ReadOnly Property BevelConfiguration As Visibility
|
|
Get
|
|
Return m_BevelConfiguration
|
|
End Get
|
|
End Property
|
|
|
|
Private m_EnableTemplate As Boolean = Not OptionModule.m_DisableTemplate
|
|
Public Property EnableTemplate As Boolean
|
|
Get
|
|
Return m_EnableTemplate
|
|
End Get
|
|
Set(value As Boolean)
|
|
m_EnableTemplate = value
|
|
If Not value Then
|
|
WriteMainPrivateProfileString(S_GENERAL, "DisableTemplate", "1")
|
|
Else
|
|
WriteMainPrivateProfileString(S_GENERAL, "DisableTemplate", "0")
|
|
End If
|
|
OptionModule.m_DisableTemplate = Not value
|
|
NotifyPropertyChanged("EnableTemplate")
|
|
End Set
|
|
End Property
|
|
|
|
Private m_EnableOrder As Boolean = Not OptionModule.m_DisableWindowOrder
|
|
Public Property EnableOrder As Boolean
|
|
Get
|
|
Return m_EnableOrder
|
|
End Get
|
|
Set(value As Boolean)
|
|
m_EnableOrder = value
|
|
If Not value Then
|
|
WriteMainPrivateProfileString(S_GENERAL, "DisableOrder", "1")
|
|
Else
|
|
WriteMainPrivateProfileString(S_GENERAL, "DisableOrder", "0")
|
|
End If
|
|
OptionModule.m_DisableWindowOrder = Not value
|
|
NotifyPropertyChanged("EnableOrder")
|
|
End Set
|
|
End Property
|
|
|
|
Private m_EnableSingleDoor As Boolean = OptionModule.m_SingleDoor
|
|
Public Property EnableSingleDoor As Boolean
|
|
Get
|
|
Return m_EnableSingleDoor
|
|
End Get
|
|
Set(value As Boolean)
|
|
m_EnableSingleDoor = value
|
|
If Not value Then
|
|
WriteMainPrivateProfileString(S_GENERAL, K_SINGLEDOOR, "0")
|
|
Else
|
|
WriteMainPrivateProfileString(S_GENERAL, K_SINGLEDOOR, "1")
|
|
End If
|
|
NotifyPropertyChanged("EnableSingleDoor")
|
|
End Set
|
|
End Property
|
|
|
|
Private m_VisibilityConfiguration As Visibility = Visibility.Collapsed
|
|
Public ReadOnly Property VisibilityConfiguration As Visibility
|
|
Get
|
|
If (GetMainPrivateProfileInt(S_GENERAL, "Debug", 0) > 4) Then
|
|
m_VisibilityConfiguration = Visibility.Visible
|
|
End If
|
|
Return m_VisibilityConfiguration
|
|
End Get
|
|
End Property
|
|
|
|
Private m_EnableAssembly As Boolean = If(OptionModule.m_ConfigurationSoftware = ConfigType.Assembly, True, False)
|
|
Public Property EnableAssembly As Boolean
|
|
Get
|
|
Return m_EnableAssembly
|
|
End Get
|
|
Set(value As Boolean)
|
|
m_EnableAssembly = value
|
|
WriteMainPrivateProfileString(S_GENERAL, K_RUNAS, If(m_EnableAssembly, "1", "0"))
|
|
OptionModule.m_ConfigurationSoftware = If(m_EnableAssembly, ConfigType.Assembly, ConfigType.Door)
|
|
NotifyPropertyChanged("EnableAssembly")
|
|
End Set
|
|
End Property
|
|
|
|
' Controllo di eliminare un bevel dalla lista: 1 se accendo un bevel, 2 se spengo un bevel, -1 tutti i casi che non sono questi
|
|
Private Function CheckBevel(VisibilityBevel As Visibility, bValue As Boolean) As Integer
|
|
Dim bAnser As Integer
|
|
Dim bBevel As Boolean
|
|
' converto il parametro di visibilità in un booleano
|
|
If VisibilityBevel = Visibility.Visible Then
|
|
bBevel = True
|
|
Else
|
|
bBevel = False
|
|
End If
|
|
If bBevel And Not bValue Then
|
|
' significa che sta togliendo dalla lista
|
|
bAnser = 1
|
|
ElseIf Not bBevel And bValue Then
|
|
' sto aggiungendo un bevel alla lista
|
|
bAnser = 2
|
|
Else
|
|
' non accade nulla
|
|
bAnser = -1
|
|
End If
|
|
Return bAnser
|
|
End Function
|
|
|
|
' chiedo se vuole continuare: vero se cambia li lista
|
|
Private Function QuestionSetBevel(bCheckBevel As Integer, sBevel As String) As Boolean
|
|
If Not IsNothing(Map.refPartPageVM.CurrPart) Or IsNothing(Map.refAssemblyPageVM.CurrAssembly) Then
|
|
' se la porta esiste
|
|
If bCheckBevel = 1 Then
|
|
' controllo se sto eliminando da uno degli elementi della lista: se si chiedo di continuare
|
|
If Map.refPartPageVM.CurrPart.DispositionItem.Name = sBevel Then
|
|
' Se blocco tutto non accade nulla -- It is the bevel of the current door. Do You want to proced?
|
|
If MessageBox.Show(EgtMsg(50154), EgtMsg(50115), MessageBoxButton.YesNo, MessageBoxImage.Asterisk, MessageBoxResult.No) = MessageBoxResult.No Then
|
|
Return False
|
|
Else
|
|
' se decido di continuare
|
|
Return True
|
|
End If
|
|
Else
|
|
' se non sono presenti elementi nella lista procedo nella eliminazione
|
|
Return True
|
|
End If
|
|
' se sto attivando un bevel nella lista
|
|
ElseIf bCheckBevel = 2 Then
|
|
Return True
|
|
Else
|
|
' per tutti gli altri casi (-1) non accade nulla
|
|
Return False
|
|
End If
|
|
|
|
Else
|
|
Return True
|
|
End If
|
|
End Function
|
|
|
|
' aggiorno la visibilità dei bevel Up e Down
|
|
Public Sub RefreshEdgeTypeList()
|
|
'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
' aggiorno la lista delle disposizioni
|
|
For IndexBeveDisp As Integer = 0 To Part.m_DispositionList.Count - 1
|
|
If Part.m_DispositionList(IndexBeveDisp).Name = ConstGen.BEVEL_UP Then
|
|
Part.m_DispositionList(IndexBeveDisp).IsActive = OptionModule.m_bBevelUp
|
|
ElseIf Part.m_DispositionList(IndexBeveDisp).Name = ConstGen.BEVEL_DOWN Then
|
|
Part.m_DispositionList(IndexBeveDisp).IsActive = OptionModule.m_bBevelDown
|
|
End If
|
|
Next
|
|
' aggiorno la lista
|
|
Map.refPartPageVM.CurrPart.NotifyPropertyChanged("DispositionList")
|
|
' verifico che l'elemento selezionato nella option page non sia stato disattivato
|
|
If Not IsNothing(Map.refPartPageVM.CurrPart) Then
|
|
If Map.refPartPageVM.CurrPart.DispositionItem.IsActive = Visibility.Collapsed Then Map.refPartPageVM.CurrPart.DispositionItem = Part.m_DispositionList(2)
|
|
End If
|
|
End Sub
|
|
|
|
' creo le liste dei bevel e delle siposizioni
|
|
Public Shared Sub CreateEdgeTypeList()
|
|
'----------------------------------------------------------------------------------------------------------
|
|
' carico la lista dei bevel da mostrare sugli spigoli Lock, Hinge
|
|
If Part.m_LockEdgeTypeList.Count = 0 Then
|
|
LockHingeEdge(Part.m_LockEdgeTypeList)
|
|
End If
|
|
If Part.m_HingeEdgeTypeList.Count = 0 Then
|
|
LockHingeEdge(Part.m_HingeEdgeTypeList)
|
|
End If
|
|
'----------------------------------------------------------------------------------------------------------
|
|
' caricare gli spigoli top e bottom
|
|
If Part.m_TopEdgeTypeList.Count = 0 Then
|
|
TopBottomEdge(Part.m_TopEdgeTypeList)
|
|
End If
|
|
If Part.m_BottomEdgeTypeList.Count = 0 Then
|
|
TopBottomEdge(Part.m_BottomEdgeTypeList)
|
|
End If
|
|
'----------------------------------------------------------------------------------------------------------
|
|
' caricare gli spigoli dei frame
|
|
TopBottomEdge(Assembly.m_FrameEdgeTypeList)
|
|
'----------------------------------------------------------------------------------------------------------
|
|
' carico la lista che contiene la disposizione in macchina
|
|
Part.m_DispositionList.Add(New EdgeType(ConstGen.BEVEL_UP, OptionModule.m_bBevelUp))
|
|
Part.m_DispositionList.Add(New EdgeType(ConstGen.BEVEL_DOWN, OptionModule.m_bBevelDown))
|
|
Part.m_DispositionList.Add(New EdgeType(ConstGen.BEVEL_BYSWING, Visibility.Visible))
|
|
' assegno il valore della disposizione letto dal file Config.ini
|
|
If IsNothing(OptionModule.m_Disposition) Then
|
|
OptionModule.m_Disposition = Part.m_DispositionList(2)
|
|
ElseIf OptionModule.m_Disposition.Name <> ConstGen.BEVEL_UP AndAlso OptionModule.m_Disposition.Name <> ConstGen.BEVEL_DOWN Then
|
|
OptionModule.m_Disposition = Part.m_DispositionList(2)
|
|
End If
|
|
End Sub
|
|
|
|
' carica la lista con tutte le lavorazioni legate agli spigoli Lock e Hinge
|
|
Public Shared Sub LockHingeEdge(ByVal EdgeList As ObservableCollection(Of EdgeType))
|
|
For Index = 0 To m_StaticEdgeTypeList.Count - 1
|
|
If m_StaticEdgeTypeList(Index) = ConstGen.BEVEL_UP OrElse
|
|
m_StaticEdgeTypeList(Index) = ConstGen.BEVEL_DOWN OrElse
|
|
m_StaticEdgeTypeList(Index) = ConstGen.BEVEL_GRAPHIC OrElse
|
|
m_StaticEdgeTypeList(Index) = ConstGen.BEVEL_SQUARED Then
|
|
Else
|
|
EdgeList.Add(New EdgeType(m_StaticEdgeTypeList(Index), Visibility.Visible))
|
|
End If
|
|
Next
|
|
EdgeList.Insert(0, New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
|
|
EdgeList.Insert(0, New EdgeType(ConstGen.BEVEL_GRAPHIC, Visibility.Visible))
|
|
End Sub
|
|
|
|
' carica la lista con tutte le lavorazioni legate agli spigoli Top e Bottom e Frame
|
|
Public Shared Sub TopBottomEdge(ByVal EdgeList As ObservableCollection(Of EdgeType))
|
|
Try
|
|
' controllo che nella configurazione sia presente il Bevel BV
|
|
EdgeList.Add(EdgeList.First(Function(x) x.Name = ConstGen.BEVEL_SQUARED))
|
|
Catch ex As Exception
|
|
EdgeList.Add(New EdgeType(ConstGen.BEVEL_SQUARED, Visibility.Visible))
|
|
End Try
|
|
Try
|
|
' controllo che nella configurazione sia presente il Bevel BV
|
|
EdgeList.Add(EdgeList.First(Function(x) x.Name = ConstGen.BEVEL_GRAPHIC))
|
|
Catch ex As Exception
|
|
EdgeList.Add(New EdgeType(ConstGen.BEVEL_GRAPHIC, Visibility.Visible))
|
|
End Try
|
|
End Sub
|
|
|
|
Sub New()
|
|
Map.SetRefOptionsVM(Me)
|
|
If IsEnableHarwarePart then
|
|
m_HardwarePartVM = New HardwarePartVM
|
|
m_HardwarePartV = New HardwarePartV(m_HardwarePartVM)
|
|
End if
|
|
End Sub
|
|
|
|
#Region "COMMANDS"
|
|
|
|
#Region "CloseOptionsCommand"
|
|
|
|
Public ReadOnly Property CloseOptionsCommand() As ICommand
|
|
Get
|
|
If m_cmdCloseOptions Is Nothing Then
|
|
m_cmdCloseOptions = New Command(AddressOf CloseOptions)
|
|
End If
|
|
Return m_cmdCloseOptions
|
|
End Get
|
|
End Property
|
|
|
|
Public Sub CloseOptions()
|
|
' Chiusura finestra
|
|
For Each Window In Application.Current.Windows
|
|
If TypeOf Window Is OptionsV Then
|
|
Dim OptionsWindow As OptionsV = DirectCast(Window, OptionsV)
|
|
' se eseguo una modifica prima di avere una porta...controllo bene!!
|
|
If Not IsNothing(Map.refPartPageVM.CurrPart) Then
|
|
Map.refPartPageVM.CurrPart.VisibilityWeight = Part.IsCheckedWeight
|
|
Map.refPartPageVM.CurrPart.NotifyPropertyChanged("Weight")
|
|
Map.refPartPageVM.CurrPart.NotifyPropertyChanged("VisibilityWeight")
|
|
End If
|
|
OptionsWindow.Close()
|
|
End If
|
|
Next
|
|
End Sub
|
|
|
|
#End Region ' CloseOptionsCommand
|
|
|
|
Public ReadOnly Property BrowseCommand() As ICommand
|
|
Get
|
|
If m_cmdBrowse Is Nothing Then
|
|
m_cmdBrowse = New Command(AddressOf Browse)
|
|
End If
|
|
Return m_cmdBrowse
|
|
End Get
|
|
End Property
|
|
|
|
Public Sub Browse(param As Object)
|
|
Dim SelectButton As String = (CStr(param))
|
|
Select Case SelectButton
|
|
Case "MyProject"
|
|
Dim FolderBrowserDialog As New System.Windows.Forms.FolderBrowserDialog
|
|
FolderBrowserDialog.SelectedPath = IniFile.m_MyProjectDir
|
|
' mostriamo la finestra di dialogo aperta fino alla directory MyProjects
|
|
If FolderBrowserDialog.ShowDialog <> Forms.DialogResult.OK Then
|
|
' se la risposta è diversa da OK esce
|
|
Return
|
|
End If
|
|
MyProjectDir = FolderBrowserDialog.SelectedPath
|
|
Case "MachinDir"
|
|
Dim FolderBrowserDialog As New System.Windows.Forms.FolderBrowserDialog
|
|
FolderBrowserDialog.SelectedPath = IniFile.m_MachinProject
|
|
' mostriamo la finestra di dialogo aperta fino alla directory MyProjects
|
|
If FolderBrowserDialog.ShowDialog <> Forms.DialogResult.OK Then
|
|
' se la risposta è diversa da OK esce
|
|
Return
|
|
End If
|
|
MachinDir = FolderBrowserDialog.SelectedPath
|
|
End Select
|
|
|
|
End Sub
|
|
|
|
Public ReadOnly Property OptionGuideCmd 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
|
|
End Sub
|
|
|
|
#End Region ' COMMANDS
|
|
|
|
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 EdgeType
|
|
Implements INotifyPropertyChanged
|
|
|
|
Private m_Name As String
|
|
Public Property Name As String
|
|
Get
|
|
Return m_Name
|
|
End Get
|
|
Set(value As String)
|
|
m_Name = value
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsActive As Visibility
|
|
Public Property IsActive As Visibility
|
|
Get
|
|
Return m_IsActive
|
|
End Get
|
|
Set(value As Visibility)
|
|
m_IsActive = value
|
|
NotifyPropertyChanged("IsActive")
|
|
End Set
|
|
End Property
|
|
|
|
Private m_BevelDDF As String
|
|
Public Property BevelDDF As String
|
|
Get
|
|
Return m_BevelDDF
|
|
End Get
|
|
Set(value As String)
|
|
m_BevelDDF = value
|
|
End Set
|
|
End Property
|
|
|
|
Sub New(sName As String, bIsActive As Visibility)
|
|
m_Name = sName
|
|
m_IsActive = bIsActive
|
|
End Sub
|
|
|
|
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 SwingItemTypeList
|
|
|
|
Private m_Name As String
|
|
Public Property Name As String
|
|
Get
|
|
Return m_Name
|
|
End Get
|
|
Set(value As String)
|
|
m_Name = value
|
|
End Set
|
|
End Property
|
|
|
|
Private m_AliasList As New List(Of String)
|
|
Public Property AliasList As List(Of String)
|
|
Get
|
|
Return m_AliasList
|
|
End Get
|
|
Set(value As List(Of String))
|
|
m_AliasList = value
|
|
End Set
|
|
End Property
|
|
|
|
Private m_AliasName As String
|
|
Public Property AliasName As String
|
|
Get
|
|
Return m_AliasName
|
|
End Get
|
|
Set(value As String)
|
|
m_AliasName = value
|
|
End Set
|
|
End Property
|
|
|
|
Private m_VisibilityName As Visibility = Visibility.Visible
|
|
Public Property VisibilityName As Visibility
|
|
Get
|
|
Return m_VisibilityName
|
|
End Get
|
|
Set(value As Visibility)
|
|
m_VisibilityName = value
|
|
End Set
|
|
End Property
|
|
|
|
Sub New(sNameSwing As String)
|
|
m_Name = sNameSwing
|
|
End Sub
|
|
End Class |