Imports System.Windows.Forms.Integration Imports System.Collections.ObjectModel Imports System.IO Imports EgtUILib Public Class MachiningDbWindowVM Inherits VMBase Friend Shared m_bActive As Boolean = False Friend Shared m_ProjectSceneContext As Integer = 0 Public Shared m_sMachineIniPath As String = String.Empty Friend Shared m_bVisibleSysNotes As Boolean = False Public Event m_CloseWindow(bDialogResult As Boolean) #Region "NEW INTERFACE PROPERTIES" Private m_bPersonalInterface As Boolean = False Public Property bPersonalInterface As Boolean Get Return m_bPersonalInterface End Get Set(value As Boolean) m_bPersonalInterface = value End Set End Property Private m_BorderBrushIsMouseOver As Brush Public Property BorderBrushIsMouseOver As Brush Get Return m_BorderBrushIsMouseOver End Get Set(value As Brush) m_BorderBrushIsMouseOver = value End Set End Property Private m_GeneralBorderBrush As Brush Public Property GeneralBorderBrush As Brush Get Return m_GeneralBorderBrush End Get Set(value As Brush) m_GeneralBorderBrush = value End Set End Property Private m_BorderBrushIsFocused As Brush Public Property BorderBrushIsFocused As Brush Get Return m_BorderBrushIsFocused End Get Set(value As Brush) m_BorderBrushIsFocused = value End Set End Property Private m_BackgroundBrdEnable As Brush Public Property BackgroundBrdEnable As Brush Get Return m_BackgroundBrdEnable End Get Set(value As Brush) m_BackgroundBrdEnable = value End Set End Property Private m_BackgroundBrdDisable As Brush Public Property BackgroundBrdDisable As Brush Get Return m_BackgroundBrdDisable End Get Set(value As Brush) m_BackgroundBrdDisable = value End Set End Property Private m_BackgroundTxBlDisable As Brush Public Property BackgroundTxBlDisable As Brush Get Return m_BackgroundTxBlDisable End Get Set(value As Brush) m_BackgroundTxBlDisable = value End Set End Property Private m_ForegroundTxBlEnable As Brush Public Property ForegroundTxBlEnable As Brush Get Return m_ForegroundTxBlEnable End Get Set(value As Brush) m_ForegroundTxBlEnable = value End Set End Property Private m_ForegroundTxBlDisable As Brush Public Property ForegroundTxBlDisable As Brush Get Return m_ForegroundTxBlDisable End Get Set(value As Brush) m_ForegroundTxBlDisable = value End Set End Property Private m_GeneralForeground As Brush Public Property GeneralForeground As Brush Get Return m_GeneralForeground End Get Set(value As Brush) m_GeneralForeground = value End Set End Property Private m_GeneralBackground As Brush Public Property GeneralBackground As Brush Get Return m_GeneralBackground End Get Set(value As Brush) m_GeneralBackground = value End Set End Property Private m_MyBorderGrbThickness As Double Public Property MyBorderGrbThickness As Double Get Return m_MyBorderGrbThickness End Get Set(value As Double) m_MyBorderGrbThickness = value End Set End Property Private m_MyForegroundGrbColor As Brush Public Property MyForegroundGrbColor As Brush Get Return m_MyForegroundGrbColor End Get Set(value As Brush) m_MyForegroundGrbColor = value End Set End Property Private m_BackgroundCmBxTxBl As Brush Public Property BackgroundCmBxTxBl As Brush Get Return m_BackgroundCmBxTxBl End Get Set(value As Brush) m_BackgroundCmBxTxBl = value End Set End Property Private m_BackgroundListCmBxTxBl As Brush Public Property BackgroundListCmBxTxBl As Brush Get Return m_BackgroundListCmBxTxBl End Get Set(value As Brush) m_BackgroundListCmBxTxBl = value End Set End Property Private m_ForegroundCmBxTxBl As Brush Public Property ForegroundCmBxTxBl As Brush Get Return m_ForegroundCmBxTxBl End Get Set(value As Brush) m_ForegroundCmBxTxBl = value End Set End Property Private m_BorderThicknessCmBxTxBl As Thickness Public Property BorderThicknessCmBxTxBl As Thickness Get Return m_BorderThicknessCmBxTxBl End Get Set(value As Thickness) m_BorderThicknessCmBxTxBl = value End Set End Property Private m_BorderBrushCmBxTxBl As Brush Public Property BorderBrushCmBxTxBl As Brush Get Return m_BorderBrushCmBxTxBl End Get Set(value As Brush) m_BorderBrushCmBxTxBl = value End Set End Property Private m_VerticalContentAlignmentCmBxTxBl As String Public Property VerticalContentAlignmentCmBxTxBl As String Get Return m_VerticalContentAlignmentCmBxTxBl End Get Set(value As String) m_VerticalContentAlignmentCmBxTxBl = value End Set End Property Private m_HeightCmBxTxBl As String Public Property HeightCmBxTxBl As String Get Return m_HeightCmBxTxBl End Get Set(value As String) m_HeightCmBxTxBl = value End Set End Property Private m_WidthCmBxTxBl As String Public Property WidthCmBxTxBl As String Get Return m_WidthCmBxTxBl End Get Set(value As String) m_WidthCmBxTxBl = value End Set End Property Private m_ForegroundTextBoxCmBxTxBl As Brush Public Property ForegroundTextBoxCmBxTxBl As Brush Get Return m_ForegroundTextBoxCmBxTxBl End Get Set(value As Brush) m_ForegroundTextBoxCmBxTxBl = value End Set End Property Private m_BackgroundIsChecked As Brush Public Property BackgroundIsChecked As Brush Get Return m_BackgroundIsChecked End Get Set(value As Brush) m_BackgroundIsChecked = value End Set End Property Private m_ForegroundIsChecked As Brush Public Property ForegroundIsChecked As Brush Get Return m_ForegroundIsChecked End Get Set(value As Brush) m_ForegroundIsChecked = value End Set End Property Private m_BorderBrushIsChecked As Brush Public Property BorderBrushIsChecked As Brush Get Return m_BorderBrushIsChecked End Get Set(value As Brush) m_BorderBrushIsChecked = value End Set End Property Private m_BorderThicknessIsChecked As Thickness Public Property BorderThicknessIsChecked As Thickness Get Return m_BorderThicknessIsChecked End Get Set(value As Thickness) m_BorderThicknessIsChecked = value End Set End Property Private m_OpacityIsChecked As Double Public Property OpacityIsChecked As Double Get Return m_OpacityIsChecked End Get Set(value As Double) m_OpacityIsChecked = value End Set End Property Private m_HeaderVisibility As DataGridHeadersVisibility Public Property HeaderVisibility As DataGridHeadersVisibility Get Return m_HeaderVisibility End Get Set(value As DataGridHeadersVisibility) m_HeaderVisibility = value End Set End Property Private m_BackgroundDataGrid As Brush Public Property BackgroundDataGrid As Brush Get Return m_BackgroundDataGrid End Get Set(value As Brush) m_BackgroundDataGrid = value End Set End Property Private m_BackGroundHeader As Brush Public Property BackGroundHeader As Brush Get Return m_BackGroundHeader End Get Set(value As Brush) m_BackGroundHeader = value End Set End Property Private m_ForegroundHeader As Brush Public Property ForegroundHeader As Brush Get Return m_ForegroundHeader End Get Set(value As Brush) m_ForegroundHeader = value End Set End Property Private m_BorderBrushHeader As Brush Public Property BorderBrushHeader As Brush Get Return m_BorderBrushHeader End Get Set(value As Brush) m_BorderBrushHeader = value End Set End Property Private m_BorderThicknessHeader As Thickness Public Property BorderThicknessHeader As Thickness Get Return m_BorderThicknessHeader End Get Set(value As Thickness) m_BorderThicknessHeader = value End Set End Property Private m_FontWeightHeader As FontWeight Public Property FontWeightHeader As FontWeight Get Return m_FontWeightHeader End Get Set(value As FontWeight) m_FontWeightHeader = value End Set End Property Private m_BorderBrushDataGrid As Brush Public Property BorderBrushDataGrid As Brush Get Return m_BorderBrushDataGrid End Get Set(value As Brush) m_BorderBrushDataGrid = value End Set End Property Private m_BackgroundDataGridRow As Brush Public Property BackgroundDataGridRow As Brush Get Return m_BackgroundDataGridRow End Get Set(value As Brush) m_BackgroundDataGridRow = value End Set End Property Private m_ForegroundDataGridRow As Brush Public Property ForegroundDataGridRow As Brush Get Return m_ForegroundDataGridRow End Get Set(value As Brush) m_ForegroundDataGridRow = value End Set End Property Private m_BorderBrushDataGridRow As Brush Public Property BorderBrushDataGridRow As Brush Get Return m_BorderBrushDataGridRow End Get Set(value As Brush) m_BorderBrushDataGridRow = value End Set End Property Private m_BorderThicknessDataGridRow As Thickness Public Property BorderThicknessDataGridRow As Thickness Get Return m_BorderThicknessDataGridRow End Get Set(value As Thickness) m_BorderThicknessDataGridRow = value End Set End Property Private m_BorderBrushDataGridCell As Brush Public Property BorderBrushDataGridCell As Brush Get Return m_BorderBrushDataGridCell End Get Set(value As Brush) m_BorderBrushDataGridCell = value End Set End Property Private m_BorderThicknessDataGridCell As Thickness Public Property BorderThicknessDataGridCell As Thickness Get Return m_BorderThicknessDataGridCell End Get Set(value As Thickness) m_BorderThicknessDataGridCell = value End Set End Property Private m_MyForegroundChColor As Brush Public Property MyForegroundChColor As Brush Get Return m_MyForegroundChColor End Get Set(value As Brush) m_MyForegroundChColor = value End Set End Property #End Region ' New interface properties #Region "MESSAGES" Private m_Title As String Public ReadOnly Property Title As String Get Return EgtMsg(MSG_MAINWINDOW + 4) End Get End Property Public ReadOnly Property NewMsg As String Get Return EgtMsg(31701) End Get End Property Public ReadOnly Property SaveMsg As String Get Return EgtMsg(31702) End Get End Property Public ReadOnly Property RemoveMsg As String Get Return EgtMsg(31703) End Get End Property Public ReadOnly Property ImportMsg As String Get Return EgtMsg(31450) End Get End Property Public ReadOnly Property ExportMsg As String Get Return EgtMsg(31451) End Get End Property Public ReadOnly Property ResetMsg As String Get Return EgtMsg(31456) End Get End Property #End Region ' Messages ' Lista delle lavorazioni Private m_MachiningsList As New ObservableCollection(Of FamilyMachiningTreeViewItem) Public Property MachiningsList As ObservableCollection(Of FamilyMachiningTreeViewItem) Get Return m_MachiningsList End Get Set(value As ObservableCollection(Of FamilyMachiningTreeViewItem)) m_MachiningsList = value End Set End Property Public ReadOnly Property SelMachining As MachiningTreeViewItem Get For Each Family In m_MachiningsList Dim Machining As InheritableTreeViewItem = Family.Items.FirstOrDefault(Function(x) x.IsSelected) If Not IsNothing(Machining) Then Return DirectCast(Machining, MachiningTreeViewItem) End If Next Return Nothing End Get End Property Private m_IsEnabledNewBtn As Boolean Public ReadOnly Property IsEnabledNewBtn As Boolean Get Return m_IsEnabledNewBtn End Get End Property Private m_IsEnabledSaveBtn As Boolean Public ReadOnly Property IsEnabledSaveBtn As Boolean Get Return m_IsEnabledSaveBtn End Get End Property Private m_IsEnabledRemoveBtn As Boolean Public ReadOnly Property IsEnabledRemoveBtn As Boolean Get Return m_IsEnabledRemoveBtn End Get End Property Private StoneDrillParamPageV As StoneDrillingParamPageV Private WoodDrillParamPageV As WoodDrillingParamPageV Private StoneSawParamPageV As StoneSawingParamPageV Private WoodSawParamPageV As WoodSawingParamPageV Private StoneMillParamPageV As StoneMillingParamPageV Private WoodMillParamPageV As WoodMillingParamPageV Private BeamMillParamPageV As BeamMillingParamPageV Private PocketParamPageV As PocketingParamPageV Private MortiseParamPageV As MortisingParamPageV Private StoneSawRoughParamPageV As StoneSawRoughingParamPageV Private StoneSawFinishParamPageV As StoneSawFinishingParamPageV Private GenMachinParamPageV As GenMachiningParamPageV Private ChiselParamPageV As ChiselingParamPageV Private SurfFinishParamPageV As SurfFinishingParamPageV Private WjParamPageV As WaterjettingParamPageV Private Stone5DrillParamPageV As Stone5DrillingParamPageV Private Stone5SawParamPageV As Stone5SawingParamPageV Private Stone5MillParamPageV As Stone5MillingParamPageV Private Stone5SawRoughParamPageV As Stone5SawRoughingParamPageV Private Stone5SawFinishParamPageV As Stone5SawFinishingParamPageV Private Stone5WjParamPageV As Stone5WaterjettingParamPageV Private FiveAxParamPageV As FiveAxisMachinigParamPageV Private SurfRoughParamPageV As SurfRoughingParamPageV Public ReadOnly Property ParamPageV As ContentControl Get Dim selMachiningFamily As FamilyMachiningTreeViewItem = Nothing Dim selMachining As MachiningTreeViewItem = Nothing For Each MachiningFamily In MachiningsList For Each Machining In MachiningFamily.Items If Machining.IsSelected Then selMachining = DirectCast(Machining, MachiningTreeViewItem) Exit For End If Next If Not IsNothing(selMachining) Then Exit For Next If IsNothing(selMachining) Then Return Nothing Select Case selMachining.Type Case MCH_MY.DRILLING If MachiningTreeViewItem.m_MatType = MaterialType.STONE5 Then If IsNothing(Stone5DrillParamPageV) Then Stone5DrillParamPageV = New Stone5DrillingParamPageV Stone5DrillParamPageV.DataContext = selMachining Return Stone5DrillParamPageV ElseIf MachiningTreeViewItem.m_MatType = MaterialType.STONE Then If IsNothing(StoneDrillParamPageV) Then StoneDrillParamPageV = New StoneDrillingParamPageV StoneDrillParamPageV.DataContext = selMachining ' Recupero lo stile da programma chiamante, Altrienti imposto i colori di Default If Not m_bPersonalInterface Then 'texbox m_GeneralBackground = StoneDrillingParamPageV.GetGeneralBackground(StoneDrillParamPageV) m_GeneralForeground = StoneDrillingParamPageV.GetGeneralForeground(StoneDrillParamPageV) m_GeneralBorderBrush = StoneDrillingParamPageV.GetGeneralBorderBrush(StoneDrillParamPageV) m_BorderBrushIsMouseOver = StoneDrillingParamPageV.GetBorderBrushIsMouseOver(StoneDrillParamPageV) m_BorderBrushIsFocused = StoneDrillingParamPageV.GetBorderBrushIsFocused(StoneDrillParamPageV) m_BackgroundBrdEnable = StoneDrillingParamPageV.GetBackgroundBrdEnable(StoneDrillParamPageV) m_BackgroundBrdDisable = StoneDrillingParamPageV.GetBackgroundBrdDisable(StoneDrillParamPageV) m_ForegroundTxBlEnable = StoneDrillingParamPageV.GetForegroundTxBlEnable(StoneDrillParamPageV) m_ForegroundTxBlDisable = StoneDrillingParamPageV.GetForegroundTxBlDisable(StoneDrillParamPageV) m_BackgroundTxBlDisable = StoneDrillingParamPageV.GetBackgroundTxBlDisable(StoneDrillParamPageV) 'combobox m_BackgroundCmBxTxBl = StoneDrillingParamPageV.GetBackgroundCmBxTxBl(StoneDrillParamPageV) m_BackgroundListCmBxTxBl = StoneDrillingParamPageV.GetBackgroundListCmBxTxBl(StoneDrillParamPageV) m_ForegroundCmBxTxBl = StoneDrillingParamPageV.GetForegroundCmBxTxBl(StoneDrillParamPageV) m_BorderThicknessCmBxTxBl = StoneDrillingParamPageV.GetBorderThicknessCmBxTxBl(StoneDrillParamPageV) m_BorderBrushCmBxTxBl = StoneDrillingParamPageV.GetBorderBrushCmBxTxBl(StoneDrillParamPageV) m_VerticalContentAlignmentCmBxTxBl = StoneDrillingParamPageV.GetVerticalContentAlignmentCmBxTxBl(StoneDrillParamPageV) m_HeightCmBxTxBl = StoneDrillingParamPageV.GetHeightCmBxTxBl(StoneDrillParamPageV) m_WidthCmBxTxBl = StoneDrillingParamPageV.GetWidthCmBxTxBl(StoneDrillParamPageV) m_ForegroundTextBoxCmBxTxBl = StoneDrillingParamPageV.GetForegroundTextBoxCmBxTxBl(StoneDrillParamPageV) 'groupbox m_MyBorderGrbThickness = StoneDrillingParamPageV.GetMyBorderGrbThickness(StoneDrillParamPageV) m_MyForegroundGrbColor = StoneDrillingParamPageV.GetMyForegroundGrbColor(StoneDrillParamPageV) 'togglebutton m_BackgroundIsChecked = StoneDrillingParamPageV.GetBackgroundIsChecked(StoneDrillParamPageV) m_ForegroundIsChecked = StoneDrillingParamPageV.GetForegroundIsChecked(StoneDrillParamPageV) m_BorderBrushIsChecked = StoneDrillingParamPageV.GetBorderBrushIsChecked(StoneDrillParamPageV) m_BorderThicknessIsChecked = StoneDrillingParamPageV.GetBorderThicknessIsChecked(StoneDrillParamPageV) m_OpacityIsChecked = StoneDrillingParamPageV.GetOpacityIsChecked(StoneDrillParamPageV) 'Imposto stile datagird m_HeaderVisibility = StoneDrillingParamPageV.GetHeaderVisibility(StoneDrillParamPageV) m_BackgroundDataGrid = StoneDrillingParamPageV.GetBackgroundDataGrid(StoneDrillParamPageV) m_BorderBrushDataGrid = StoneDrillingParamPageV.GetBorderBrushDataGrid(StoneDrillParamPageV) m_BackGroundHeader = StoneDrillingParamPageV.GetBackGroundHeader(StoneDrillParamPageV) m_ForegroundHeader = StoneDrillingParamPageV.GetForegroundHeader(StoneDrillParamPageV) m_BorderBrushHeader = StoneDrillingParamPageV.GetBorderBrushHeader(StoneDrillParamPageV) m_BorderThicknessHeader = StoneDrillingParamPageV.GetBorderThicknessHeader(StoneDrillParamPageV) m_FontWeightHeader = StoneDrillingParamPageV.GetFontWeightHeader(StoneDrillParamPageV) m_BackgroundDataGridRow = StoneDrillingParamPageV.GetBackgroundDataGridRow(StoneDrillParamPageV) m_ForegroundDataGridRow = StoneDrillingParamPageV.GetForegroundDataGridRow(StoneDrillParamPageV) m_BorderBrushDataGridRow = StoneDrillingParamPageV.GetBorderBrushDataGridRow(StoneDrillParamPageV) m_BorderThicknessDataGridRow = StoneDrillingParamPageV.GetBorderThicknessDataGridRow(StoneDrillParamPageV) m_BorderBrushDataGridCell = StoneDrillingParamPageV.GetBorderBrushDataGridCell(StoneDrillParamPageV) m_BorderThicknessDataGridCell = StoneDrillingParamPageV.GetBorderThicknessDataGridCell(StoneDrillParamPageV) 'imposto stile checkbox m_MyForegroundChColor = StoneDrillingParamPageV.GetMyForegroundChColor(StoneDrillParamPageV) End If 'Imposto stile groupbox StoneDrillParamPageV.MyBorderGrbThickness = m_MyBorderGrbThickness StoneDrillParamPageV.MyForegroundGrbColor = m_MyForegroundGrbColor ' Imposto il colore delle TextBlock (definito nel programma chimamante) StoneDrillParamPageV.BorderBrushIsMouseOver = m_BorderBrushIsMouseOver StoneDrillParamPageV.GeneralBorderBrush = m_GeneralBorderBrush StoneDrillParamPageV.BorderBrushIsFocused = m_BorderBrushIsFocused StoneDrillParamPageV.BackgroundBrdEnable = m_BackgroundBrdEnable StoneDrillParamPageV.BackgroundBrdDisable = m_BackgroundBrdDisable StoneDrillParamPageV.BackgroundTxBlDisable = m_BackgroundTxBlDisable StoneDrillParamPageV.ForegroundTxBlEnable = m_ForegroundTxBlEnable StoneDrillParamPageV.ForegroundTxBlDisable = m_ForegroundTxBlDisable StoneDrillParamPageV.GeneralForeground = m_GeneralForeground StoneDrillParamPageV.GeneralBackground = m_GeneralBackground 'Imposto stile combobox StoneDrillParamPageV.BackgroundCmBxTxBl = m_BackgroundCmBxTxBl StoneDrillParamPageV.BackgroundListCmBxTxBl = m_BackgroundListCmBxTxBl StoneDrillParamPageV.ForegroundCmBxTxBl = m_ForegroundCmBxTxBl StoneDrillParamPageV.BorderBrushCmBxTxBl = m_BorderBrushCmBxTxBl StoneDrillParamPageV.BorderThicknessCmBxTxBl = m_BorderThicknessCmBxTxBl StoneDrillParamPageV.BorderBrushCmBxTxBl = m_BorderBrushCmBxTxBl StoneDrillParamPageV.VerticalContentAlignmentCmBxTxBl = m_VerticalContentAlignmentCmBxTxBl StoneDrillParamPageV.HeightCmBxTxBl = m_HeightCmBxTxBl StoneDrillParamPageV.WidthCmBxTxBl = m_WidthCmBxTxBl StoneDrillParamPageV.ForegroundTextBoxCmBxTxBl = m_ForegroundTextBoxCmBxTxBl 'Imposto stile togglebutton StoneDrillParamPageV.BackgroundIsChecked = m_BackgroundIsChecked StoneDrillParamPageV.ForegroundIsChecked = m_ForegroundIsChecked StoneDrillParamPageV.BorderBrushIsChecked = m_BorderBrushIsChecked StoneDrillParamPageV.BorderThicknessIsChecked = m_BorderThicknessIsChecked StoneDrillParamPageV.OpacityIsChecked = m_OpacityIsChecked 'Imposto stile datagird StoneDrillParamPageV.HeaderVisibility = m_HeaderVisibility StoneDrillParamPageV.BackgroundDataGrid = m_BackgroundDataGrid StoneDrillParamPageV.BorderBrushDataGrid = m_BorderBrushDataGrid StoneDrillParamPageV.BackGroundHeader = m_BackGroundHeader StoneDrillParamPageV.ForegroundHeader = m_ForegroundHeader StoneDrillParamPageV.BorderBrushHeader = m_BorderBrushHeader StoneDrillParamPageV.BorderThicknessHeader = m_BorderThicknessHeader StoneDrillParamPageV.FontWeightHeader = m_FontWeightHeader StoneDrillParamPageV.BackgroundDataGridRow = m_BackgroundDataGridRow StoneDrillParamPageV.ForegroundDataGridRow = m_ForegroundDataGridRow StoneDrillParamPageV.BorderBrushDataGridRow = m_BorderBrushDataGridRow StoneDrillParamPageV.BorderThicknessDataGridRow = m_BorderThicknessDataGridRow StoneDrillParamPageV.BorderBrushDataGridCell = m_BorderBrushDataGridCell StoneDrillParamPageV.BorderThicknessDataGridCell = m_BorderThicknessDataGridCell 'imposto stile checkbox StoneDrillParamPageV.ForegroundChxTxBl = m_MyForegroundChColor Return StoneDrillParamPageV ElseIf MachiningTreeViewItem.m_MatType = MaterialType.WOOD Or MachiningTreeViewItem.m_MatType = MaterialType.BEAM Then If IsNothing(WoodDrillParamPageV) Then WoodDrillParamPageV = New WoodDrillingParamPageV WoodDrillParamPageV.DataContext = selMachining Return WoodDrillParamPageV End If Case MCH_MY.SAWING If MachiningTreeViewItem.m_MatType = MaterialType.STONE5 Then If IsNothing(Stone5SawParamPageV) Then Stone5SawParamPageV = New Stone5SawingParamPageV Stone5SawParamPageV.DataContext = selMachining Return Stone5SawParamPageV ElseIf MachiningTreeViewItem.m_MatType = MaterialType.STONE Then If IsNothing(StoneSawParamPageV) Then StoneSawParamPageV = New StoneSawingParamPageV StoneSawParamPageV.DataContext = selMachining ' Recupero lo stile da programma chiamante, Altrienti imposto i colori di Default If Not m_bPersonalInterface Then 'texbox m_GeneralBackground = StoneSawingParamPageV.GetGeneralBackground(StoneSawParamPageV) m_GeneralForeground = StoneSawingParamPageV.GetGeneralForeground(StoneSawParamPageV) m_GeneralBorderBrush = StoneSawingParamPageV.GetGeneralBorderBrush(StoneSawParamPageV) m_BorderBrushIsMouseOver = StoneSawingParamPageV.GetBorderBrushIsMouseOver(StoneSawParamPageV) m_BorderBrushIsFocused = StoneSawingParamPageV.GetBorderBrushIsFocused(StoneSawParamPageV) m_BackgroundBrdEnable = StoneSawingParamPageV.GetBackgroundBrdEnable(StoneSawParamPageV) m_BackgroundBrdDisable = StoneSawingParamPageV.GetBackgroundBrdDisable(StoneSawParamPageV) m_ForegroundTxBlEnable = StoneSawingParamPageV.GetForegroundTxBlEnable(StoneSawParamPageV) m_ForegroundTxBlDisable = StoneSawingParamPageV.GetForegroundTxBlDisable(StoneSawParamPageV) m_BackgroundTxBlDisable = StoneSawingParamPageV.GetBackgroundTxBlDisable(StoneSawParamPageV) 'combobox m_BackgroundCmBxTxBl = StoneSawingParamPageV.GetBackgroundCmBxTxBl(StoneSawParamPageV) m_BackgroundListCmBxTxBl = StoneSawingParamPageV.GetBackgroundListCmBxTxBl(StoneSawParamPageV) m_ForegroundCmBxTxBl = StoneSawingParamPageV.GetForegroundCmBxTxBl(StoneSawParamPageV) m_BorderThicknessCmBxTxBl = StoneSawingParamPageV.GetBorderThicknessCmBxTxBl(StoneSawParamPageV) m_BorderBrushCmBxTxBl = StoneSawingParamPageV.GetBorderBrushCmBxTxBl(StoneSawParamPageV) m_VerticalContentAlignmentCmBxTxBl = StoneSawingParamPageV.GetVerticalContentAlignmentCmBxTxBl(StoneSawParamPageV) m_HeightCmBxTxBl = StoneSawingParamPageV.GetHeightCmBxTxBl(StoneSawParamPageV) m_WidthCmBxTxBl = StoneSawingParamPageV.GetWidthCmBxTxBl(StoneSawParamPageV) m_ForegroundTextBoxCmBxTxBl = StoneSawingParamPageV.GetForegroundTextBoxCmBxTxBl(StoneSawParamPageV) 'groupbox m_MyBorderGrbThickness = StoneSawingParamPageV.GetMyBorderGrbThickness(StoneSawParamPageV) m_MyForegroundGrbColor = StoneSawingParamPageV.GetMyForegroundGrbColor(StoneSawParamPageV) 'togglebutton m_BackgroundIsChecked = StoneSawingParamPageV.GetBackgroundIsChecked(StoneSawParamPageV) m_ForegroundIsChecked = StoneSawingParamPageV.GetForegroundIsChecked(StoneSawParamPageV) m_BorderBrushIsChecked = StoneSawingParamPageV.GetBorderBrushIsChecked(StoneSawParamPageV) m_BorderThicknessIsChecked = StoneSawingParamPageV.GetBorderThicknessIsChecked(StoneSawParamPageV) m_OpacityIsChecked = StoneSawingParamPageV.GetOpacityIsChecked(StoneSawParamPageV) 'Imposto stile datagird m_HeaderVisibility = StoneSawingParamPageV.GetHeaderVisibility(StoneSawParamPageV) m_BackgroundDataGrid = StoneSawingParamPageV.GetBackgroundDataGrid(StoneSawParamPageV) m_BorderBrushDataGrid = StoneSawingParamPageV.GetBorderBrushDataGrid(StoneSawParamPageV) m_BackGroundHeader = StoneSawingParamPageV.GetBackGroundHeader(StoneSawParamPageV) m_ForegroundHeader = StoneSawingParamPageV.GetForegroundHeader(StoneSawParamPageV) m_BorderBrushHeader = StoneSawingParamPageV.GetBorderBrushHeader(StoneSawParamPageV) m_BorderThicknessHeader = StoneSawingParamPageV.GetBorderThicknessHeader(StoneSawParamPageV) m_FontWeightHeader = StoneSawingParamPageV.GetFontWeightHeader(StoneSawParamPageV) m_BackgroundDataGridRow = StoneSawingParamPageV.GetBackgroundDataGridRow(StoneSawParamPageV) m_ForegroundDataGridRow = StoneSawingParamPageV.GetForegroundDataGridRow(StoneSawParamPageV) m_BorderBrushDataGridRow = StoneSawingParamPageV.GetBorderBrushDataGridRow(StoneSawParamPageV) m_BorderThicknessDataGridRow = StoneSawingParamPageV.GetBorderThicknessDataGridRow(StoneSawParamPageV) m_BorderBrushDataGridCell = StoneSawingParamPageV.GetBorderBrushDataGridCell(StoneSawParamPageV) m_BorderThicknessDataGridCell = StoneSawingParamPageV.GetBorderThicknessDataGridCell(StoneSawParamPageV) 'imposto stile checkbox m_MyForegroundChColor = StoneSawingParamPageV.GetForegroundChxTxBl(StoneSawParamPageV) End If 'Imposto stile groupbox StoneSawParamPageV.MyBorderGrbThickness = m_MyBorderGrbThickness StoneSawParamPageV.MyForegroundGrbColor = m_MyForegroundGrbColor ' Imposto il colore delle TextBlock (definito nel programma chimamante) StoneSawParamPageV.BorderBrushIsMouseOver = m_BorderBrushIsMouseOver StoneSawParamPageV.GeneralBorderBrush = m_GeneralBorderBrush StoneSawParamPageV.BorderBrushIsFocused = m_BorderBrushIsFocused StoneSawParamPageV.BackgroundBrdEnable = m_BackgroundBrdEnable StoneSawParamPageV.BackgroundBrdDisable = m_BackgroundBrdDisable StoneSawParamPageV.BackgroundTxBlDisable = m_BackgroundTxBlDisable StoneSawParamPageV.ForegroundTxBlEnable = m_ForegroundTxBlEnable StoneSawParamPageV.ForegroundTxBlDisable = m_ForegroundTxBlDisable StoneSawParamPageV.GeneralForeground = m_GeneralForeground StoneSawParamPageV.GeneralBackground = m_GeneralBackground 'Imposto stile combobox StoneSawParamPageV.BackgroundCmBxTxBl = m_BackgroundCmBxTxBl StoneSawParamPageV.BackgroundListCmBxTxBl = m_BackgroundListCmBxTxBl StoneSawParamPageV.ForegroundCmBxTxBl = m_ForegroundCmBxTxBl StoneSawParamPageV.BorderBrushCmBxTxBl = m_BorderBrushCmBxTxBl StoneSawParamPageV.BorderThicknessCmBxTxBl = m_BorderThicknessCmBxTxBl StoneSawParamPageV.BorderBrushCmBxTxBl = m_BorderBrushCmBxTxBl StoneSawParamPageV.VerticalContentAlignmentCmBxTxBl = m_VerticalContentAlignmentCmBxTxBl StoneSawParamPageV.HeightCmBxTxBl = m_HeightCmBxTxBl StoneSawParamPageV.WidthCmBxTxBl = m_WidthCmBxTxBl StoneSawParamPageV.ForegroundTextBoxCmBxTxBl = m_ForegroundTextBoxCmBxTxBl 'Imposto stile togglebutton StoneSawParamPageV.BackgroundIsChecked = m_BackgroundIsChecked StoneSawParamPageV.ForegroundIsChecked = m_ForegroundIsChecked StoneSawParamPageV.BorderBrushIsChecked = m_BorderBrushIsChecked StoneSawParamPageV.BorderThicknessIsChecked = m_BorderThicknessIsChecked StoneSawParamPageV.OpacityIsChecked = m_OpacityIsChecked 'Imposto stile datagird StoneSawParamPageV.HeaderVisibility = m_HeaderVisibility StoneSawParamPageV.BackgroundDataGrid = m_BackgroundDataGrid StoneSawParamPageV.BorderBrushDataGrid = m_BorderBrushDataGrid StoneSawParamPageV.BackGroundHeader = m_BackGroundHeader StoneSawParamPageV.ForegroundHeader = m_ForegroundHeader StoneSawParamPageV.BorderBrushHeader = m_BorderBrushHeader StoneSawParamPageV.BorderThicknessHeader = m_BorderThicknessHeader StoneSawParamPageV.FontWeightHeader = m_FontWeightHeader StoneSawParamPageV.BackgroundDataGridRow = m_BackgroundDataGridRow StoneSawParamPageV.ForegroundDataGridRow = m_ForegroundDataGridRow StoneSawParamPageV.BorderBrushDataGridRow = m_BorderBrushDataGridRow StoneSawParamPageV.BorderThicknessDataGridRow = m_BorderThicknessDataGridRow StoneSawParamPageV.BorderBrushDataGridCell = m_BorderBrushDataGridCell StoneSawParamPageV.BorderThicknessDataGridCell = m_BorderThicknessDataGridCell 'imposto stile checkbox StoneSawParamPageV.ForegroundChxTxBl = m_MyForegroundChColor Return StoneSawParamPageV ElseIf MachiningTreeViewItem.m_MatType = MaterialType.WOOD Or MachiningTreeViewItem.m_MatType = MaterialType.BEAM Then If IsNothing(WoodSawParamPageV) Then WoodSawParamPageV = New WoodSawingParamPageV WoodSawParamPageV.DataContext = selMachining Return WoodSawParamPageV End If Case MCH_MY.MILLING If MachiningTreeViewItem.m_MatType = MaterialType.STONE5 Then If IsNothing(Stone5MillParamPageV) Then Stone5MillParamPageV = New Stone5MillingParamPageV Stone5MillParamPageV.DataContext = selMachining Return Stone5MillParamPageV ElseIf MachiningTreeViewItem.m_MatType = MaterialType.STONE Then If IsNothing(StoneMillParamPageV) Then StoneMillParamPageV = New StoneMillingParamPageV StoneMillParamPageV.DataContext = selMachining ' Recupero lo stile da programma chiamante, Altrienti imposto i colori di Default If Not m_bPersonalInterface Then 'texbox m_GeneralBackground = StoneMillingParamPageV.GetGeneralBackground(StoneMillParamPageV) m_GeneralForeground = StoneMillingParamPageV.GetGeneralForeground(StoneMillParamPageV) m_GeneralBorderBrush = StoneMillingParamPageV.GetGeneralBorderBrush(StoneMillParamPageV) m_BorderBrushIsMouseOver = StoneMillingParamPageV.GetBorderBrushIsMouseOver(StoneMillParamPageV) m_BorderBrushIsFocused = StoneMillingParamPageV.GetBorderBrushIsFocused(StoneMillParamPageV) m_BackgroundBrdEnable = StoneMillingParamPageV.GetBackgroundBrdEnable(StoneMillParamPageV) m_BackgroundBrdDisable = StoneMillingParamPageV.GetBackgroundBrdDisable(StoneMillParamPageV) m_ForegroundTxBlEnable = StoneMillingParamPageV.GetForegroundTxBlEnable(StoneMillParamPageV) m_ForegroundTxBlDisable = StoneMillingParamPageV.GetForegroundTxBlDisable(StoneMillParamPageV) m_BackgroundTxBlDisable = StoneMillingParamPageV.GetBackgroundTxBlDisable(StoneMillParamPageV) 'combobox m_BackgroundCmBxTxBl = StoneMillingParamPageV.GetBackgroundCmBxTxBl(StoneMillParamPageV) m_BackgroundListCmBxTxBl = StoneMillingParamPageV.GetBackgroundListCmBxTxBl(StoneMillParamPageV) m_ForegroundCmBxTxBl = StoneMillingParamPageV.GetForegroundCmBxTxBl(StoneMillParamPageV) m_BorderBrushCmBxTxBl = StoneMillingParamPageV.GetBorderBrushCmBxTxBl(StoneMillParamPageV) m_BorderThicknessCmBxTxBl = StoneMillingParamPageV.GetBorderThicknessCmBxTxBl(StoneMillParamPageV) m_VerticalContentAlignmentCmBxTxBl = StoneMillingParamPageV.GetVerticalContentAlignmentCmBxTxBl(StoneMillParamPageV) m_HeightCmBxTxBl = StoneMillingParamPageV.GetHeightCmBxTxBl(StoneMillParamPageV) m_WidthCmBxTxBl = StoneMillingParamPageV.GetWidthCmBxTxBl(StoneMillParamPageV) m_ForegroundTextBoxCmBxTxBl = StoneMillingParamPageV.GetForegroundTextBoxCmBxTxBl(StoneMillParamPageV) 'groupbox m_MyBorderGrbThickness = StoneMillingParamPageV.GetMyBorderGrbThickness(StoneMillParamPageV) m_MyForegroundGrbColor = StoneMillingParamPageV.GetMyForegroundGrbColor(StoneMillParamPageV) 'togglebutton m_BackgroundIsChecked = StoneMillingParamPageV.GetBackgroundIsChecked(StoneMillParamPageV) m_ForegroundIsChecked = StoneMillingParamPageV.GetForegroundIsChecked(StoneMillParamPageV) m_BorderBrushIsChecked = StoneMillingParamPageV.GetBorderBrushIsChecked(StoneMillParamPageV) m_BorderThicknessIsChecked = StoneMillingParamPageV.GetBorderThicknessIsChecked(StoneMillParamPageV) m_OpacityIsChecked = StoneMillingParamPageV.GetOpacityIsChecked(StoneMillParamPageV) 'Imposto stile datagird m_HeaderVisibility = StoneMillingParamPageV.GetHeaderVisibility(StoneMillParamPageV) m_BackgroundDataGrid = StoneMillingParamPageV.GetBackgroundDataGrid(StoneMillParamPageV) m_BorderBrushDataGrid = StoneMillingParamPageV.GetBorderBrushDataGrid(StoneMillParamPageV) m_BackGroundHeader = StoneMillingParamPageV.GetBackGroundHeader(StoneMillParamPageV) m_ForegroundHeader = StoneMillingParamPageV.GetForegroundHeader(StoneMillParamPageV) m_BorderBrushHeader = StoneMillingParamPageV.GetBorderBrushHeader(StoneMillParamPageV) m_BorderThicknessHeader = StoneMillingParamPageV.GetBorderThicknessHeader(StoneMillParamPageV) m_FontWeightHeader = StoneMillingParamPageV.GetFontWeightHeader(StoneMillParamPageV) m_BackgroundDataGridRow = StoneMillingParamPageV.GetBackgroundDataGridRow(StoneMillParamPageV) m_ForegroundDataGridRow = StoneMillingParamPageV.GetForegroundDataGridRow(StoneMillParamPageV) m_BorderBrushDataGridRow = StoneMillingParamPageV.GetBorderBrushDataGridRow(StoneMillParamPageV) m_BorderThicknessDataGridRow = StoneMillingParamPageV.GetBorderThicknessDataGridRow(StoneMillParamPageV) m_BorderBrushDataGridCell = StoneMillingParamPageV.GetBorderBrushDataGridCell(StoneMillParamPageV) m_BorderThicknessDataGridCell = StoneMillingParamPageV.GetBorderThicknessDataGridCell(StoneMillParamPageV) 'imposto stile checkbox m_MyForegroundChColor = StoneMillingParamPageV.GetMyForegroundChColor(StoneMillParamPageV) End If 'Imposto stile groupbox StoneMillParamPageV.MyBorderGrbThickness = m_MyBorderGrbThickness StoneMillParamPageV.MyForegroundGrbColor = m_MyForegroundGrbColor ' Imposto il colore delle TextBlock (definito nel programma chimamante) StoneMillParamPageV.BorderBrushIsMouseOver = m_BorderBrushIsMouseOver StoneMillParamPageV.GeneralBorderBrush = m_GeneralBorderBrush StoneMillParamPageV.BorderBrushIsFocused = m_BorderBrushIsFocused StoneMillParamPageV.BackgroundBrdEnable = m_BackgroundBrdEnable StoneMillParamPageV.BackgroundBrdDisable = m_BackgroundBrdDisable StoneMillParamPageV.BackgroundTxBlDisable = m_BackgroundTxBlDisable StoneMillParamPageV.ForegroundTxBlEnable = m_ForegroundTxBlEnable StoneMillParamPageV.ForegroundTxBlDisable = m_ForegroundTxBlDisable StoneMillParamPageV.GeneralForeground = m_GeneralForeground StoneMillParamPageV.GeneralBackground = m_GeneralBackground 'Imposto stile combobox StoneMillParamPageV.BackgroundCmBxTxBl = m_BackgroundCmBxTxBl StoneMillParamPageV.BackgroundListCmBxTxBl = m_BackgroundListCmBxTxBl StoneMillParamPageV.ForegroundCmBxTxBl = m_ForegroundCmBxTxBl StoneMillParamPageV.BorderBrushCmBxTxBl = m_BorderBrushCmBxTxBl StoneMillParamPageV.BorderThicknessCmBxTxBl = m_BorderThicknessCmBxTxBl StoneMillParamPageV.VerticalContentAlignmentCmBxTxBl = m_VerticalContentAlignmentCmBxTxBl StoneMillParamPageV.HeightCmBxTxBl = m_HeightCmBxTxBl StoneMillParamPageV.WidthCmBxTxBl = m_WidthCmBxTxBl StoneMillParamPageV.ForegroundTextBoxCmBxTxBl = m_ForegroundTextBoxCmBxTxBl 'Imposto stile togglebutton StoneMillParamPageV.BackgroundIsChecked = m_BackgroundIsChecked StoneMillParamPageV.ForegroundIsChecked = m_ForegroundIsChecked StoneMillParamPageV.BorderBrushIsChecked = m_BorderBrushIsChecked StoneMillParamPageV.BorderThicknessIsChecked = m_BorderThicknessIsChecked StoneMillParamPageV.OpacityIsChecked = m_OpacityIsChecked 'Imposto stile datagird StoneMillParamPageV.HeaderVisibility = m_HeaderVisibility StoneMillParamPageV.BackgroundDataGrid = m_BackgroundDataGrid StoneMillParamPageV.BorderBrushDataGrid = m_BorderBrushDataGrid StoneMillParamPageV.BackGroundHeader = m_BackGroundHeader StoneMillParamPageV.ForegroundHeader = m_ForegroundHeader StoneMillParamPageV.BorderBrushHeader = m_BorderBrushHeader StoneMillParamPageV.BorderThicknessHeader = m_BorderThicknessHeader StoneMillParamPageV.FontWeightHeader = m_FontWeightHeader StoneMillParamPageV.BackgroundDataGridRow = m_BackgroundDataGridRow StoneMillParamPageV.ForegroundDataGridRow = m_ForegroundDataGridRow StoneMillParamPageV.BorderBrushDataGridRow = m_BorderBrushDataGridRow StoneMillParamPageV.BorderThicknessDataGridRow = m_BorderThicknessDataGridRow StoneMillParamPageV.BorderBrushDataGridCell = m_BorderBrushDataGridCell StoneMillParamPageV.BorderThicknessDataGridCell = m_BorderThicknessDataGridCell 'imposto stile checkbox StoneMillParamPageV.ForegroundChxTxBl = m_MyForegroundChColor Return StoneMillParamPageV ElseIf MachiningTreeViewItem.m_MatType = MaterialType.WOOD Then If IsNothing(WoodMillParamPageV) Then WoodMillParamPageV = New WoodMillingParamPageV WoodMillParamPageV.DataContext = selMachining Return WoodMillParamPageV ElseIf MachiningTreeViewItem.m_MatType = MaterialType.BEAM Then If IsNothing(BeamMillParamPageV) Then BeamMillParamPageV = New BeamMillingParamPageV BeamMillParamPageV.DataContext = selMachining Return BeamMillParamPageV End If Case MCH_MY.POCKETING If IsNothing(PocketParamPageV) Then PocketParamPageV = New PocketingParamPageV PocketParamPageV.DataContext = selMachining Return PocketParamPageV Case MCH_MY.MORTISING If IsNothing(MortiseParamPageV) Then MortiseParamPageV = New MortisingParamPageV MortiseParamPageV.DataContext = selMachining Return MortiseParamPageV Case MCH_MY.SAWROUGHING If MachiningTreeViewItem.m_MatType = MaterialType.STONE5 Then If IsNothing(Stone5SawRoughParamPageV) Then Stone5SawRoughParamPageV = New Stone5SawRoughingParamPageV Stone5SawRoughParamPageV.DataContext = selMachining Return Stone5SawRoughParamPageV ElseIf MachiningTreeViewItem.m_MatType = MaterialType.STONE Then If IsNothing(StoneSawRoughParamPageV) Then StoneSawRoughParamPageV = New StoneSawRoughingParamPageV StoneSawRoughParamPageV.DataContext = selMachining ' Recupero lo stile da programma chiamante, Altrienti imposto i colori di Default If Not m_bPersonalInterface Then 'texbox m_GeneralBackground = StoneSawRoughingParamPageV.GetGeneralBackground(StoneSawRoughParamPageV) m_GeneralForeground = StoneSawRoughingParamPageV.GetGeneralForeground(StoneSawRoughParamPageV) m_GeneralBorderBrush = StoneSawRoughingParamPageV.GetGeneralBorderBrush(StoneSawRoughParamPageV) m_BorderBrushIsMouseOver = StoneSawRoughingParamPageV.GetBorderBrushIsMouseOver(StoneSawRoughParamPageV) m_BorderBrushIsFocused = StoneSawRoughingParamPageV.GetBorderBrushIsFocused(StoneSawRoughParamPageV) m_BackgroundBrdEnable = StoneSawRoughingParamPageV.GetBackgroundBrdEnable(StoneSawRoughParamPageV) m_BackgroundBrdDisable = StoneSawRoughingParamPageV.GetBackgroundBrdDisable(StoneSawRoughParamPageV) m_ForegroundTxBlEnable = StoneSawRoughingParamPageV.GetForegroundTxBlEnable(StoneSawRoughParamPageV) m_ForegroundTxBlDisable = StoneSawRoughingParamPageV.GetForegroundTxBlDisable(StoneSawRoughParamPageV) m_BackgroundTxBlDisable = StoneSawRoughingParamPageV.GetBackgroundTxBlDisable(StoneSawRoughParamPageV) 'combobox m_BackgroundCmBxTxBl = StoneSawRoughingParamPageV.GetBackgroundCmBxTxBl(StoneSawRoughParamPageV) m_BackgroundListCmBxTxBl = StoneSawRoughingParamPageV.GetBackgroundListCmBxTxBl(StoneSawRoughParamPageV) m_ForegroundCmBxTxBl = StoneSawRoughingParamPageV.GetForegroundCmBxTxBl(StoneSawRoughParamPageV) m_BorderBrushCmBxTxBl = StoneSawRoughingParamPageV.GetBorderBrushCmBxTxBl(StoneSawRoughParamPageV) m_BorderThicknessCmBxTxBl = StoneSawRoughingParamPageV.GetBorderThicknessCmBxTxBl(StoneSawRoughParamPageV) m_VerticalContentAlignmentCmBxTxBl = StoneSawRoughingParamPageV.GetVerticalContentAlignmentCmBxTxBl(StoneSawRoughParamPageV) m_HeightCmBxTxBl = StoneSawRoughingParamPageV.GetHeightCmBxTxBl(StoneSawRoughParamPageV) m_WidthCmBxTxBl = StoneSawRoughingParamPageV.GetWidthCmBxTxBl(StoneSawRoughParamPageV) m_ForegroundTextBoxCmBxTxBl = StoneSawRoughingParamPageV.GetForegroundTextBoxCmBxTxBl(StoneSawRoughParamPageV) 'groupbox m_MyBorderGrbThickness = StoneSawRoughingParamPageV.GetMyBorderGrbThickness(StoneSawRoughParamPageV) m_MyForegroundGrbColor = StoneSawRoughingParamPageV.GetMyForegroundGrbColor(StoneSawRoughParamPageV) 'togglebutton m_BackgroundIsChecked = StoneSawRoughingParamPageV.GetBackgroundIsChecked(StoneSawRoughParamPageV) m_ForegroundIsChecked = StoneSawRoughingParamPageV.GetForegroundIsChecked(StoneSawRoughParamPageV) m_BorderBrushIsChecked = StoneSawRoughingParamPageV.GetBorderBrushIsChecked(StoneSawRoughParamPageV) m_BorderThicknessIsChecked = StoneSawRoughingParamPageV.GetBorderThicknessIsChecked(StoneSawRoughParamPageV) m_OpacityIsChecked = StoneSawRoughingParamPageV.GetOpacityIsChecked(StoneSawRoughParamPageV) 'Imposto stile datagird m_HeaderVisibility = StoneSawRoughingParamPageV.GetHeaderVisibility(StoneSawRoughParamPageV) m_BackgroundDataGrid = StoneSawRoughingParamPageV.GetBackgroundDataGrid(StoneSawRoughParamPageV) m_BorderBrushDataGrid = StoneSawRoughingParamPageV.GetBorderBrushDataGrid(StoneSawRoughParamPageV) m_BackGroundHeader = StoneSawRoughingParamPageV.GetBackGroundHeader(StoneSawRoughParamPageV) m_ForegroundHeader = StoneSawRoughingParamPageV.GetForegroundHeader(StoneSawRoughParamPageV) m_BorderBrushHeader = StoneSawRoughingParamPageV.GetBorderBrushHeader(StoneSawRoughParamPageV) m_BorderThicknessHeader = StoneSawRoughingParamPageV.GetBorderThicknessHeader(StoneSawRoughParamPageV) m_FontWeightHeader = StoneSawRoughingParamPageV.GetFontWeightHeader(StoneSawRoughParamPageV) m_BackgroundDataGridRow = StoneSawRoughingParamPageV.GetBackgroundDataGridRow(StoneSawRoughParamPageV) m_ForegroundDataGridRow = StoneSawRoughingParamPageV.GetForegroundDataGridRow(StoneSawRoughParamPageV) m_BorderBrushDataGridRow = StoneSawRoughingParamPageV.GetBorderBrushDataGridRow(StoneSawRoughParamPageV) m_BorderThicknessDataGridRow = StoneSawRoughingParamPageV.GetBorderThicknessDataGridRow(StoneSawRoughParamPageV) m_BorderBrushDataGridCell = StoneSawRoughingParamPageV.GetBorderBrushDataGridCell(StoneSawRoughParamPageV) m_BorderThicknessDataGridCell = StoneSawRoughingParamPageV.GetBorderThicknessDataGridCell(StoneSawRoughParamPageV) 'imposto stile checkbox m_MyForegroundChColor = StoneSawRoughingParamPageV.GetMyForegroundChColor(StoneSawRoughParamPageV) End If 'Imposto stile groupbox StoneSawRoughParamPageV.MyBorderGrbThickness = m_MyBorderGrbThickness StoneSawRoughParamPageV.MyForegroundGrbColor = m_MyForegroundGrbColor ' Imposto il colore delle TextBlock (definito nel programma chimamante) StoneSawRoughParamPageV.BorderBrushIsMouseOver = m_BorderBrushIsMouseOver StoneSawRoughParamPageV.GeneralBorderBrush = m_GeneralBorderBrush StoneSawRoughParamPageV.BorderBrushIsFocused = m_BorderBrushIsFocused StoneSawRoughParamPageV.BackgroundBrdEnable = m_BackgroundBrdEnable StoneSawRoughParamPageV.BackgroundBrdDisable = m_BackgroundBrdDisable StoneSawRoughParamPageV.BackgroundTxBlDisable = m_BackgroundTxBlDisable StoneSawRoughParamPageV.ForegroundTxBlEnable = m_ForegroundTxBlEnable StoneSawRoughParamPageV.ForegroundTxBlDisable = m_ForegroundTxBlDisable StoneSawRoughParamPageV.GeneralForeground = m_GeneralForeground StoneSawRoughParamPageV.GeneralBackground = m_GeneralBackground 'Imposto stile combobox StoneSawRoughParamPageV.BackgroundCmBxTxBl = m_BackgroundCmBxTxBl StoneSawRoughParamPageV.BackgroundListCmBxTxBl = m_BackgroundListCmBxTxBl StoneSawRoughParamPageV.ForegroundCmBxTxBl = m_ForegroundCmBxTxBl StoneSawRoughParamPageV.BorderBrushCmBxTxBl = m_BorderBrushCmBxTxBl StoneSawRoughParamPageV.BorderThicknessCmBxTxBl = m_BorderThicknessCmBxTxBl StoneSawRoughParamPageV.VerticalContentAlignmentCmBxTxBl = m_VerticalContentAlignmentCmBxTxBl StoneSawRoughParamPageV.HeightCmBxTxBl = m_HeightCmBxTxBl StoneSawRoughParamPageV.WidthCmBxTxBl = m_WidthCmBxTxBl StoneSawRoughParamPageV.ForegroundTextBoxCmBxTxBl = m_ForegroundTextBoxCmBxTxBl 'Imposto stile togglebutton StoneSawRoughParamPageV.BackgroundIsChecked = m_BackgroundIsChecked StoneSawRoughParamPageV.ForegroundIsChecked = m_ForegroundIsChecked StoneSawRoughParamPageV.BorderBrushIsChecked = m_BorderBrushIsChecked StoneSawRoughParamPageV.BorderThicknessIsChecked = m_BorderThicknessIsChecked StoneSawRoughParamPageV.OpacityIsChecked = m_OpacityIsChecked 'Imposto stile datagird StoneSawRoughParamPageV.HeaderVisibility = m_HeaderVisibility StoneSawRoughParamPageV.BackgroundDataGrid = m_BackgroundDataGrid StoneSawRoughParamPageV.BorderBrushDataGrid = m_BorderBrushDataGrid StoneSawRoughParamPageV.BackGroundHeader = m_BackGroundHeader StoneSawRoughParamPageV.ForegroundHeader = m_ForegroundHeader StoneSawRoughParamPageV.BorderBrushHeader = m_BorderBrushHeader StoneSawRoughParamPageV.BorderThicknessHeader = m_BorderThicknessHeader StoneSawRoughParamPageV.FontWeightHeader = m_FontWeightHeader StoneSawRoughParamPageV.BackgroundDataGridRow = m_BackgroundDataGridRow StoneSawRoughParamPageV.ForegroundDataGridRow = m_ForegroundDataGridRow StoneSawRoughParamPageV.BorderBrushDataGridRow = m_BorderBrushDataGridRow StoneSawRoughParamPageV.BorderThicknessDataGridRow = m_BorderThicknessDataGridRow StoneSawRoughParamPageV.BorderBrushDataGridCell = m_BorderBrushDataGridCell StoneSawRoughParamPageV.BorderThicknessDataGridCell = m_BorderThicknessDataGridCell 'imposto stile checkbox StoneSawRoughParamPageV.ForegroundChxTxBl = m_MyForegroundChColor Return StoneSawRoughParamPageV End If Case MCH_MY.SAWFINISHING If MachiningTreeViewItem.m_MatType = MaterialType.STONE5 Then If IsNothing(Stone5SawFinishParamPageV) Then Stone5SawFinishParamPageV = New Stone5SawFinishingParamPageV Stone5SawFinishParamPageV.DataContext = selMachining Return Stone5SawFinishParamPageV ElseIf MachiningTreeViewItem.m_MatType = MaterialType.STONE Then If IsNothing(StoneSawFinishParamPageV) Then StoneSawFinishParamPageV = New StoneSawFinishingParamPageV StoneSawFinishParamPageV.DataContext = selMachining ' Recupero lo stile da programma chiamante, Altrienti imposto i colori di Default If Not m_bPersonalInterface Then 'texbox m_GeneralBackground = StoneSawFinishingParamPageV.GetGeneralBackground(StoneSawFinishParamPageV) m_GeneralForeground = StoneSawFinishingParamPageV.GetGeneralForeground(StoneSawFinishParamPageV) m_GeneralBorderBrush = StoneSawFinishingParamPageV.GetGeneralBorderBrush(StoneSawFinishParamPageV) m_BorderBrushIsMouseOver = StoneSawFinishingParamPageV.GetBorderBrushIsMouseOver(StoneSawFinishParamPageV) m_BorderBrushIsFocused = StoneSawFinishingParamPageV.GetBorderBrushIsFocused(StoneSawFinishParamPageV) m_BackgroundBrdEnable = StoneSawFinishingParamPageV.GetBackgroundBrdEnable(StoneSawFinishParamPageV) m_BackgroundBrdDisable = StoneSawFinishingParamPageV.GetBackgroundBrdDisable(StoneSawFinishParamPageV) m_ForegroundTxBlEnable = StoneSawFinishingParamPageV.GetForegroundTxBlEnable(StoneSawFinishParamPageV) m_ForegroundTxBlDisable = StoneSawFinishingParamPageV.GetForegroundTxBlDisable(StoneSawFinishParamPageV) m_BackgroundTxBlDisable = StoneSawFinishingParamPageV.GetBackgroundTxBlDisable(StoneSawFinishParamPageV) 'combobox m_BackgroundCmBxTxBl = StoneSawFinishingParamPageV.GetBackgroundCmBxTxBl(StoneSawFinishParamPageV) m_BackgroundListCmBxTxBl = StoneSawFinishingParamPageV.GetBackgroundListCmBxTxBl(StoneSawFinishParamPageV) m_ForegroundCmBxTxBl = StoneSawFinishingParamPageV.GetForegroundCmBxTxBl(StoneSawFinishParamPageV) m_BorderBrushCmBxTxBl = StoneSawFinishingParamPageV.GetBorderBrushCmBxTxBl(StoneSawFinishParamPageV) m_BorderThicknessCmBxTxBl = StoneSawFinishingParamPageV.GetBorderThicknessCmBxTxBl(StoneSawFinishParamPageV) m_VerticalContentAlignmentCmBxTxBl = StoneSawFinishingParamPageV.GetVerticalContentAlignmentCmBxTxBl(StoneSawFinishParamPageV) m_HeightCmBxTxBl = StoneSawFinishingParamPageV.GetHeightCmBxTxBl(StoneSawFinishParamPageV) m_WidthCmBxTxBl = StoneSawFinishingParamPageV.GetWidthCmBxTxBl(StoneSawFinishParamPageV) m_ForegroundTextBoxCmBxTxBl = StoneSawFinishingParamPageV.GetForegroundTextBoxCmBxTxBl(StoneSawFinishParamPageV) 'groupbox m_MyBorderGrbThickness = StoneSawFinishingParamPageV.GetMyBorderGrbThickness(StoneSawFinishParamPageV) m_MyForegroundGrbColor = StoneSawFinishingParamPageV.GetMyForegroundGrbColor(StoneSawFinishParamPageV) 'togglebutton m_BackgroundIsChecked = StoneSawFinishingParamPageV.GetBackgroundIsChecked(StoneSawFinishParamPageV) m_ForegroundIsChecked = StoneSawFinishingParamPageV.GetForegroundIsChecked(StoneSawFinishParamPageV) m_BorderBrushIsChecked = StoneSawFinishingParamPageV.GetBorderBrushIsChecked(StoneSawFinishParamPageV) m_BorderThicknessIsChecked = StoneSawFinishingParamPageV.GetBorderThicknessIsChecked(StoneSawFinishParamPageV) m_OpacityIsChecked = StoneSawFinishingParamPageV.GetOpacityIsChecked(StoneSawFinishParamPageV) 'Imposto stile datagird m_HeaderVisibility = StoneSawFinishingParamPageV.GetHeaderVisibility(StoneSawFinishParamPageV) m_BackgroundDataGrid = StoneSawFinishingParamPageV.GetBackgroundDataGrid(StoneSawFinishParamPageV) m_BorderBrushDataGrid = StoneSawFinishingParamPageV.GetBorderBrushDataGrid(StoneSawFinishParamPageV) m_BackGroundHeader = StoneSawFinishingParamPageV.GetBackGroundHeader(StoneSawFinishParamPageV) m_ForegroundHeader = StoneSawFinishingParamPageV.GetForegroundHeader(StoneSawFinishParamPageV) m_BorderBrushHeader = StoneSawFinishingParamPageV.GetBorderBrushHeader(StoneSawFinishParamPageV) m_BorderThicknessHeader = StoneSawFinishingParamPageV.GetBorderThicknessHeader(StoneSawFinishParamPageV) m_FontWeightHeader = StoneSawFinishingParamPageV.GetFontWeightHeader(StoneSawFinishParamPageV) m_BackgroundDataGridRow = StoneSawFinishingParamPageV.GetBackgroundDataGridRow(StoneSawFinishParamPageV) m_ForegroundDataGridRow = StoneSawFinishingParamPageV.GetForegroundDataGridRow(StoneSawFinishParamPageV) m_BorderBrushDataGridRow = StoneSawFinishingParamPageV.GetBorderBrushDataGridRow(StoneSawFinishParamPageV) m_BorderThicknessDataGridRow = StoneSawFinishingParamPageV.GetBorderThicknessDataGridRow(StoneSawFinishParamPageV) m_BorderBrushDataGridCell = StoneSawFinishingParamPageV.GetBorderBrushDataGridCell(StoneSawFinishParamPageV) m_BorderThicknessDataGridCell = StoneSawFinishingParamPageV.GetBorderThicknessDataGridCell(StoneSawFinishParamPageV) 'imposto stile checkbox m_MyForegroundChColor = StoneSawFinishingParamPageV.GetForegroundChxTxBl(StoneSawFinishParamPageV) End If 'Imposto stile groupbox StoneSawFinishParamPageV.MyBorderGrbThickness = m_MyBorderGrbThickness StoneSawFinishParamPageV.MyForegroundGrbColor = m_MyForegroundGrbColor ' Imposto il colore delle TextBlock (definito nel programma chimamante) StoneSawFinishParamPageV.BorderBrushIsMouseOver = m_BorderBrushIsMouseOver StoneSawFinishParamPageV.GeneralBorderBrush = m_GeneralBorderBrush StoneSawFinishParamPageV.BorderBrushIsFocused = m_BorderBrushIsFocused StoneSawFinishParamPageV.BackgroundBrdEnable = m_BackgroundBrdEnable StoneSawFinishParamPageV.BackgroundBrdDisable = m_BackgroundBrdDisable StoneSawFinishParamPageV.BackgroundTxBlDisable = m_BackgroundTxBlDisable StoneSawFinishParamPageV.ForegroundTxBlEnable = m_ForegroundTxBlEnable StoneSawFinishParamPageV.ForegroundTxBlDisable = m_ForegroundTxBlDisable StoneSawFinishParamPageV.GeneralForeground = m_GeneralForeground StoneSawFinishParamPageV.GeneralBackground = m_GeneralBackground 'Imposto stile combobox StoneSawFinishParamPageV.BackgroundCmBxTxBl = m_BackgroundCmBxTxBl StoneSawFinishParamPageV.BackgroundListCmBxTxBl = m_BackgroundListCmBxTxBl StoneSawFinishParamPageV.ForegroundCmBxTxBl = m_ForegroundCmBxTxBl StoneSawFinishParamPageV.BorderBrushCmBxTxBl = m_BorderBrushCmBxTxBl StoneSawFinishParamPageV.BorderThicknessCmBxTxBl = m_BorderThicknessCmBxTxBl StoneSawFinishParamPageV.VerticalContentAlignmentCmBxTxBl = m_VerticalContentAlignmentCmBxTxBl StoneSawFinishParamPageV.HeightCmBxTxBl = m_HeightCmBxTxBl StoneSawFinishParamPageV.WidthCmBxTxBl = m_WidthCmBxTxBl StoneSawFinishParamPageV.ForegroundTextBoxCmBxTxBl = m_ForegroundTextBoxCmBxTxBl 'Imposto stile togglebutton StoneSawFinishParamPageV.BackgroundIsChecked = m_BackgroundIsChecked StoneSawFinishParamPageV.ForegroundIsChecked = m_ForegroundIsChecked StoneSawFinishParamPageV.BorderBrushIsChecked = m_BorderBrushIsChecked StoneSawFinishParamPageV.BorderThicknessIsChecked = m_BorderThicknessIsChecked StoneSawFinishParamPageV.OpacityIsChecked = m_OpacityIsChecked 'Imposto stile datagird StoneSawFinishParamPageV.HeaderVisibility = m_HeaderVisibility StoneSawFinishParamPageV.BackgroundDataGrid = m_BackgroundDataGrid StoneSawFinishParamPageV.BorderBrushDataGrid = m_BorderBrushDataGrid StoneSawFinishParamPageV.BackGroundHeader = m_BackGroundHeader StoneSawFinishParamPageV.ForegroundHeader = m_ForegroundHeader StoneSawFinishParamPageV.BorderBrushHeader = m_BorderBrushHeader StoneSawFinishParamPageV.BorderThicknessHeader = m_BorderThicknessHeader StoneSawFinishParamPageV.FontWeightHeader = m_FontWeightHeader StoneSawFinishParamPageV.BackgroundDataGridRow = m_BackgroundDataGridRow StoneSawFinishParamPageV.ForegroundDataGridRow = m_ForegroundDataGridRow StoneSawFinishParamPageV.BorderBrushDataGridRow = m_BorderBrushDataGridRow StoneSawFinishParamPageV.BorderThicknessDataGridRow = m_BorderThicknessDataGridRow StoneSawFinishParamPageV.BorderBrushDataGridCell = m_BorderBrushDataGridCell StoneSawFinishParamPageV.BorderThicknessDataGridCell = m_BorderThicknessDataGridCell 'imposto stile checkbox StoneSawFinishParamPageV.ForegroundChxTxBl = m_MyForegroundChColor Return StoneSawFinishParamPageV End If Case MCH_MY.GENMACHINING If IsNothing(GenMachinParamPageV) Then GenMachinParamPageV = New GenMachiningParamPageV GenMachinParamPageV.DataContext = selMachining Return GenMachinParamPageV Case MCH_MY.CHISELING If IsNothing(ChiselParamPageV) Then ChiselParamPageV = New ChiselingParamPageV ChiselParamPageV.DataContext = selMachining Return ChiselParamPageV Case MCH_MY.SURFFINISHING If IsNothing(SurfFinishParamPageV) Then SurfFinishParamPageV = New SurfFinishingParamPageV SurfFinishParamPageV.DataContext = selMachining Return SurfFinishParamPageV Case MCH_MY.WATERJETTING If MachiningTreeViewItem.m_MatType = MaterialType.STONE5 Then If IsNothing(Stone5WjParamPageV) Then Stone5WjParamPageV = New Stone5WaterjettingParamPageV Stone5WjParamPageV.DataContext = selMachining Return Stone5WjParamPageV ElseIf MachiningTreeViewItem.m_MatType = MaterialType.STONE Then If IsNothing(WjParamPageV) Then WjParamPageV = New WaterjettingParamPageV WjParamPageV.DataContext = selMachining ' Recupero lo stile da programma chiamante, Altrienti imposto i colori di Default If Not m_bPersonalInterface Then 'texbox m_GeneralBackground = WaterjettingParamPageV.GetGeneralBackground(WjParamPageV) m_GeneralForeground = WaterjettingParamPageV.GetGeneralForeground(WjParamPageV) m_GeneralBorderBrush = WaterjettingParamPageV.GetGeneralBorderBrush(WjParamPageV) m_BorderBrushIsMouseOver = WaterjettingParamPageV.GetBorderBrushIsMouseOver(WjParamPageV) m_BorderBrushIsFocused = WaterjettingParamPageV.GetBorderBrushIsFocused(WjParamPageV) m_BackgroundBrdEnable = WaterjettingParamPageV.GetBackgroundBrdEnable(WjParamPageV) m_BackgroundBrdDisable = WaterjettingParamPageV.GetBackgroundBrdDisable(WjParamPageV) m_ForegroundTxBlEnable = WaterjettingParamPageV.GetForegroundTxBlEnable(WjParamPageV) m_ForegroundTxBlDisable = WaterjettingParamPageV.GetForegroundTxBlDisable(WjParamPageV) m_BackgroundTxBlDisable = WaterjettingParamPageV.GetBackgroundTxBlDisable(WjParamPageV) 'combobox m_BackgroundCmBxTxBl = WaterjettingParamPageV.GetBackgroundCmBxTxBl(WjParamPageV) m_BackgroundListCmBxTxBl = WaterjettingParamPageV.GetBackgroundListCmBxTxBl(WjParamPageV) m_ForegroundCmBxTxBl = WaterjettingParamPageV.GetForegroundCmBxTxBl(WjParamPageV) m_BorderBrushCmBxTxBl = WaterjettingParamPageV.GetBorderBrushCmBxTxBl(WjParamPageV) m_BorderThicknessCmBxTxBl = WaterjettingParamPageV.GetBorderThicknessCmBxTxBl(WjParamPageV) m_VerticalContentAlignmentCmBxTxBl = WaterjettingParamPageV.GetVerticalContentAlignmentCmBxTxBl(WjParamPageV) m_HeightCmBxTxBl = WaterjettingParamPageV.GetHeightCmBxTxBl(WjParamPageV) m_WidthCmBxTxBl = WaterjettingParamPageV.GetWidthCmBxTxBl(WjParamPageV) m_ForegroundTextBoxCmBxTxBl = WaterjettingParamPageV.GetForegroundTextBoxCmBxTxBl(WjParamPageV) 'groupbox m_MyBorderGrbThickness = WaterjettingParamPageV.GetMyBorderGrbThickness(WjParamPageV) m_MyForegroundGrbColor = WaterjettingParamPageV.GetMyForegroundGrbColor(WjParamPageV) 'togglebutton m_BackgroundIsChecked = WaterjettingParamPageV.GetBackgroundIsChecked(WjParamPageV) m_ForegroundIsChecked = WaterjettingParamPageV.GetForegroundIsChecked(WjParamPageV) m_BorderBrushIsChecked = WaterjettingParamPageV.GetBorderBrushIsChecked(WjParamPageV) m_BorderThicknessIsChecked = WaterjettingParamPageV.GetBorderThicknessIsChecked(WjParamPageV) m_OpacityIsChecked = WaterjettingParamPageV.GetOpacityIsChecked(WjParamPageV) 'Imposto stile datagird m_HeaderVisibility = WaterjettingParamPageV.GetHeaderVisibility(WjParamPageV) m_BackgroundDataGrid = WaterjettingParamPageV.GetBackgroundDataGrid(WjParamPageV) m_BorderBrushDataGrid = WaterjettingParamPageV.GetBorderBrushDataGrid(WjParamPageV) m_BackGroundHeader = WaterjettingParamPageV.GetBackGroundHeader(WjParamPageV) m_ForegroundHeader = WaterjettingParamPageV.GetForegroundHeader(WjParamPageV) m_BorderBrushHeader = WaterjettingParamPageV.GetBorderBrushHeader(WjParamPageV) m_BorderThicknessHeader = WaterjettingParamPageV.GetBorderThicknessHeader(WjParamPageV) m_FontWeightHeader = WaterjettingParamPageV.GetFontWeightHeader(WjParamPageV) m_BackgroundDataGridRow = WaterjettingParamPageV.GetBackgroundDataGridRow(WjParamPageV) m_ForegroundDataGridRow = WaterjettingParamPageV.GetForegroundDataGridRow(WjParamPageV) m_BorderBrushDataGridRow = WaterjettingParamPageV.GetBorderBrushDataGridRow(WjParamPageV) m_BorderThicknessDataGridRow = WaterjettingParamPageV.GetBorderThicknessDataGridRow(WjParamPageV) m_BorderBrushDataGridCell = WaterjettingParamPageV.GetBorderBrushDataGridCell(WjParamPageV) m_BorderThicknessDataGridCell = WaterjettingParamPageV.GetBorderThicknessDataGridCell(WjParamPageV) 'imposto stile checkbox m_MyForegroundChColor = WaterjettingParamPageV.GetForegroundChxTxBl(WjParamPageV) End If 'Imposto stile groupbox WjParamPageV.MyBorderGrbThickness = m_MyBorderGrbThickness WjParamPageV.MyForegroundGrbColor = m_MyForegroundGrbColor ' Imposto il colore delle TextBlock (definito nel programma chimamante) WjParamPageV.BorderBrushIsMouseOver = m_BorderBrushIsMouseOver WjParamPageV.GeneralBorderBrush = m_GeneralBorderBrush WjParamPageV.BorderBrushIsFocused = m_BorderBrushIsFocused WjParamPageV.BackgroundBrdEnable = m_BackgroundBrdEnable WjParamPageV.BackgroundBrdDisable = m_BackgroundBrdDisable WjParamPageV.BackgroundTxBlDisable = m_BackgroundTxBlDisable WjParamPageV.ForegroundTxBlEnable = m_ForegroundTxBlEnable WjParamPageV.ForegroundTxBlDisable = m_ForegroundTxBlDisable WjParamPageV.GeneralForeground = m_GeneralForeground WjParamPageV.GeneralBackground = m_GeneralBackground 'Imposto stile combobox WjParamPageV.BackgroundCmBxTxBl = m_BackgroundCmBxTxBl WjParamPageV.BackgroundListCmBxTxBl = m_BackgroundListCmBxTxBl WjParamPageV.ForegroundCmBxTxBl = m_ForegroundCmBxTxBl WjParamPageV.BorderBrushCmBxTxBl = m_BorderBrushCmBxTxBl WjParamPageV.BorderThicknessCmBxTxBl = m_BorderThicknessCmBxTxBl WjParamPageV.VerticalContentAlignmentCmBxTxBl = m_VerticalContentAlignmentCmBxTxBl WjParamPageV.HeightCmBxTxBl = m_HeightCmBxTxBl WjParamPageV.WidthCmBxTxBl = m_WidthCmBxTxBl WjParamPageV.ForegroundTextBoxCmBxTxBl = m_ForegroundTextBoxCmBxTxBl 'Imposto stile togglebutton WjParamPageV.BackgroundIsChecked = m_BackgroundIsChecked WjParamPageV.ForegroundIsChecked = m_ForegroundIsChecked WjParamPageV.BorderBrushIsChecked = m_BorderBrushIsChecked WjParamPageV.BorderThicknessIsChecked = m_BorderThicknessIsChecked WjParamPageV.OpacityIsChecked = m_OpacityIsChecked 'Imposto stile datagird WjParamPageV.HeaderVisibility = m_HeaderVisibility WjParamPageV.BackgroundDataGrid = m_BackgroundDataGrid WjParamPageV.BorderBrushDataGrid = m_BorderBrushDataGrid WjParamPageV.BackGroundHeader = m_BackGroundHeader WjParamPageV.ForegroundHeader = m_ForegroundHeader WjParamPageV.BorderBrushHeader = m_BorderBrushHeader WjParamPageV.BorderThicknessHeader = m_BorderThicknessHeader WjParamPageV.FontWeightHeader = m_FontWeightHeader WjParamPageV.BackgroundDataGridRow = m_BackgroundDataGridRow WjParamPageV.ForegroundDataGridRow = m_ForegroundDataGridRow WjParamPageV.BorderBrushDataGridRow = m_BorderBrushDataGridRow WjParamPageV.BorderThicknessDataGridRow = m_BorderThicknessDataGridRow WjParamPageV.BorderBrushDataGridCell = m_BorderBrushDataGridCell WjParamPageV.BorderThicknessDataGridCell = m_BorderThicknessDataGridCell 'imposto stile checkbox WjParamPageV.ForegroundChxTxBl = m_MyForegroundChColor Return WjParamPageV End If Case MCH_MY.FIVEAXISMILLING If IsNothing(FiveAxParamPageV) Then FiveAxParamPageV = New FiveAxisMachinigParamPageV FiveAxParamPageV.DataContext = selMachining Return FiveAxParamPageV Case MCH_MY.SURFROUGHING If IsNothing(SurfRoughParamPageV) Then SurfRoughParamPageV = New SurfRoughingParamPageV SurfRoughParamPageV.DataContext = selMachining Return SurfRoughParamPageV End Select Return Nothing End Get End Property ' Definizione comandi Private m_cmdNew As ICommand Private m_cmdSave As ICommand Private m_cmdRemove As ICommand Private m_cmdImport As ICommand Private m_cmdExport As ICommand Private m_cmdReloadMachining As ICommand Private m_cmdCloseMachiningsDb As ICommand #Region "CONSTRUCTOR" Sub New(sMachineIniPath As String, ProjectSceneContext As Integer, Optional sMatType As String = "Wood", Optional bVisibleSysNotes As Boolean = False, Optional bIsEgtCAM5 As Boolean = False) m_bActive = True m_ProjectSceneContext = ProjectSceneContext m_sMachineIniPath = sMachineIniPath m_bVisibleSysNotes = bVisibleSysNotes EgtUILib.GetPrivateProfileString(S_GENERAL, K_MATERIAL, sMatType, sMatType, sMachineIniPath) Select Case sMatType Case "Stone" If bIsEgtCAM5 Then ' Se bIsEgtCAM5 è True vuol dire che il Db Lav è stato aperto da EgtCAM5 perciò dovranno essere usate ' delle pagine dedicate (con prefisso "Stone5"), attraverso l'assegnazione del valore STONE5 a MatType MachiningTreeViewItem.m_MatType = MaterialType.STONE5 Else MachiningTreeViewItem.m_MatType = MaterialType.STONE End If Case "Wood" MachiningTreeViewItem.m_MatType = MaterialType.WOOD Case "Beam" MachiningTreeViewItem.m_MatType = MaterialType.BEAM Case "Additive" MachiningTreeViewItem.m_MatType = MaterialType.WOOD Case Else ' Se il materiale spcificato nel file INI della macchina non corrisponde a STONE, WOOD o BEAM (STONE5 è ' comunque STONE nell'INI ma prevede pagine esclusive per EgtCAM5) viene emesso un messaggio di errore MachiningTreeViewItem.m_MatType = Nothing MsgBox(EgtMsg(31409), MsgBoxStyle.Exclamation, EgtMsg(31551)) Exit Sub End Select ' Passo all'item della lista il delegato alla funzuione che permette di cancellare una lavorazione MachiningTreeViewItem.m_delRemoveMachining = AddressOf RemoveMachining ' Passo all'item della lista il delegato alla funzuione che permette di disattivare la lista delle lavorazioni MachiningTreeViewItem.m_delErrorOnMachining = AddressOf ErrorOnMachining ' Passo all'item della lista il delegato alla funzuione che permette di disattivare la lista delle lavorazioni MachiningTreeViewItem.m_delIsEnabledBtns = AddressOf IsEnabledBtns FamilyMachiningTreeViewItem.m_delIsEnabledBtns = AddressOf IsEnabledBtns MachiningTreeViewItem.m_delNotifyPropertyChanged = AddressOf ccc FamilyMachiningTreeViewItem.m_delNotifyPropertyChanged = AddressOf ccc MachiningTreeViewItem.m_delGetSelectedMachining = AddressOf GetSelectedMaching ' Carico la lista delle lavorazioni della macchina selezionata LoadSelectedMachineMachinings() NotifyPropertyChanged("ParamPageV") End Sub #End Region ' Constructor #Region "METHODS" Private Function GetSelectedMaching() As MachiningTreeViewItem For Each MachiningFamily In m_MachiningsList For Each Machining In MachiningFamily.Items If Machining.m_IsSelected Then Return DirectCast(Machining, MachiningTreeViewItem) End If Next Next Return Nothing End Function Private Sub ccc() NotifyPropertyChanged("ParamPageV") End Sub Private Sub IsEnabledBtns(bIsEnabledNewBtn As Boolean, bIsEnabledSaveBtn As Boolean, bIsEnabledDeleteBtn As Boolean) m_IsEnabledNewBtn = bIsEnabledNewBtn m_IsEnabledSaveBtn = bIsEnabledSaveBtn m_IsEnabledRemoveBtn = bIsEnabledDeleteBtn NotifyPropertyChanged("IsEnabledNewBtn") NotifyPropertyChanged("IsEnabledSaveBtn") NotifyPropertyChanged("IsEnabledRemoveBtn") End Sub ' Quando chiamato, disattiva tutti gli item dell'albero o li riattiva a seconda che ci sia o meno un errore Private Sub ErrorOnMachining(bIsEnabled As Boolean) For Each FamilyMachiningItem In MachiningsList FamilyMachiningItem.IsEnabled = Not bIsEnabled Next End Sub ''' ''' Method that search the machines in the correct folder and add to the MachinesList those valid. ''' Public Overridable Sub LoadSelectedMachineMachinings() EgtSetCurrentContext(m_ProjectSceneContext) Dim ActiveMachiningsTypes() As MachiningsType = MachineUtility.ReadMachiningFamilies(m_sMachineIniPath) For Each MachiningsType In ActiveMachiningsTypes Dim FamilyTreeView As New FamilyMachiningTreeViewItem(MachiningsType.Name, MachiningsType.Id, Nothing) MachiningsList.Add(FamilyTreeView) Dim MachiningName As String = String.Empty EgtMdbGetFirstMachining(MachiningsType.Id, MachiningName) While Not String.IsNullOrWhiteSpace(MachiningName) ' recupero tuuid EgtMdbSetCurrMachining(MachiningName) Dim sCurrMachTUUID As String = String.Empty EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sCurrMachTUUID) FamilyTreeView.Items.Add(New MachiningTreeViewItem(MachiningName, MachiningsType.Id, ToolDbUtility.IsToolInDb(sCurrMachTUUID), FamilyTreeView)) EgtMdbGetNextMachining(MachiningsType.Id, MachiningName) End While FamilyTreeView.VerifyMachiningValidity() Next ' Se esiste almeno una famiglia di lavorazioni, la seleziono If MachiningsList.Count > 0 Then MachiningsList(0).IsSelected = True MachiningsList(0).NotifyPropertyChanged("IsSelected") End If End Sub ''' ''' Method that search imported Machinings for the currently selected Machine and add it to the MachiningsList. ''' Private Sub LoadImportedMachineMachinings(vsImportedMachinings As String()) ' Leggo tutte le lavorazioni presenti nella Macchina (quindi anche quelli appena importati). Dim ActiveMachiningsFamilies() As MachiningsType = MachineUtility.ReadMachiningFamilies(m_sMachineIniPath) Dim MachiningsFamilyIndex As Integer = 0 For Each MachiningsFamily In ActiveMachiningsFamilies Dim FamilyTreeView As New FamilyMachiningTreeViewItem(MachiningsFamily.Name, MachiningsFamily.Id, Nothing) Dim MachiningFamilyItem = MachiningsList.FirstOrDefault(Function(MachiningFamily) MachiningFamily.MachiningType = FamilyTreeView.MachiningType) If IsNothing(MachiningFamilyItem) Then MachiningsList.Insert(MachiningsFamilyIndex, FamilyTreeView) End If Dim nType As Integer = 0 Dim MachiningName As String = String.Empty Dim MachiningIndex As Integer = 0 EgtSetCurrentContext(MachiningDbWindowVM.m_ProjectSceneContext) Dim bFound As Boolean = EgtMdbGetFirstMachining(MachiningsFamily.Id, MachiningName) While bFound Dim MachiningItem = MachiningsList(MachiningsFamilyIndex).Items.FirstOrDefault(Function(Machining) Machining.Name = MachiningName) Dim bInList As Boolean = vsImportedMachinings.Contains(MachiningName) If bInList Then ' Se una lavorazione è presente nella MachiningsList visualizzata ma nel contempo è nell'array vsImported ' vuol dire che è stata sovrascritta perciò la rimuovo MachiningsList(MachiningsFamilyIndex).Items.Remove(MachiningsList(MachiningsFamilyIndex).Items.FirstOrDefault(Function(Machining) Machining.Name = MachiningName)) End If If bInList OrElse IsNothing(MachiningItem) Then ' recupero tuuid EgtMdbSetCurrMachining(MachiningName) Dim sCurrMachTUUID As String = String.Empty EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sCurrMachTUUID) ' aggiungo la lavorazione importata MachiningsList(MachiningsFamilyIndex).Items.Insert(MachiningIndex, New MachiningTreeViewItem(MachiningName, MachiningsFamily.Id, ToolDbUtility.IsToolInDb(sCurrMachTUUID), FamilyTreeView)) End If MachiningIndex += 1 bFound = EgtMdbGetNextMachining(MachiningsFamily.Id, MachiningName) End While MachiningsFamilyIndex += 1 Next End Sub ' Funzione che verifica modifica lavorazione selezionata ed eventualmente chiede se salvarla Public Function VerifySelectedMachiningModification() As Boolean ' Se non c'è lavorazione selezionata, esco con continuazione If IsNothing(SelMachining) Then Return True ' Se lavorazione selezionata non valida, esco con blocco If Not SelMachining.IsValid Then Return False ' Verifico salvataggio SelMachining.WriteMachiningParam() If EgtMdbIsCurrMachiningModified() Or SelMachining.m_IsModifiedName Or SelMachining.NewMachining Then Select Case MsgBox(EgtMsg(MSG_MACHININGDBERRORS + 1), MsgBoxStyle.YesNoCancel, EgtMsg(MSG_MACHININGDBERRORS + 2)) Case MsgBoxResult.Yes SelMachining.NewMachining = False SelMachining.m_Name = SelMachining.m_Name.Trim() SelMachining.WriteMachiningName() EgtMdbSaveCurrMachining() Case MsgBoxResult.No If SelMachining.NewMachining Then RemoveMachining(SelMachining) ElseIf SelMachining.m_IsModifiedName Then Dim DbName As String = String.Empty EgtMdbGetCurrMachiningParam(MCH_MP.NAME, DbName) SelMachining.NamePar = DbName End If Case MsgBoxResult.Cancel Return False End Select End If Return True End Function #End Region ' Methods #Region "COMMANDS" #Region "NewCommand" ''' ''' Returns a command that create a new machining. ''' Public ReadOnly Property NewCommand As ICommand Get If m_cmdNew Is Nothing Then m_cmdNew = New Command(AddressOf NewPar) End If Return m_cmdNew End Get End Property ''' ''' Creata the new machining. This method is invoked by the NewCommand. ''' Public Overridable Sub NewPar(ByVal param As Object) ' Verifico se sia selezionata una famiglia Dim NewMachiningItem As MachiningTreeViewItem If TypeOf param Is FamilyMachiningTreeViewItem Then Dim MachiningFamily As FamilyMachiningTreeViewItem = DirectCast(param, FamilyMachiningTreeViewItem) Dim NewName As String = MachiningFamily.Name EgtMdbGetMachiningNewName(NewName) If EgtMdbAddMachining(NewName, MachiningFamily.MachiningType) Then NewMachiningItem = New MachiningTreeViewItem(NewName, MachiningFamily.MachiningType, False, MachiningFamily) MachiningFamily.Items.Add(NewMachiningItem) EgtMdbSaveCurrMachining() NewMachiningItem.NewMachining = True If Not MachiningFamily.IsExpanded Then MachiningFamily.IsExpanded = True NewMachiningItem.IsSelected = True NewMachiningItem.NotifyPropertyChanged("IsSelected") ' Se il Materiale della nuova Lav. è Stone setto Lato Testa e Lato Lavoro a Destra di default If NewMachiningItem.MatType = MaterialType.STONE Then NewMachiningItem.SelectedHeadSide = IdNameStruct.IndFromId(MCH_SAW_HS.RIGHT, NewMachiningItem.HeadSideList) NewMachiningItem.SelectedWorkSide = IdNameStruct.IndFromId(MCH_SAW_WS.RIGHT, NewMachiningItem.WorkSideList) End If End If ' Verifico se sia selezionata una lavorazione ElseIf TypeOf param Is MachiningTreeViewItem Then Dim MachiningCopied As MachiningTreeViewItem = DirectCast(param, MachiningTreeViewItem) Dim NewName As String = MachiningCopied.Name EgtMdbGetMachiningNewName(NewName) If EgtMdbCopyMachining(MachiningCopied.Name, NewName) Then Dim CurrType As Integer EgtMdbGetCurrMachiningParam(MCH_MP.TYPE, CurrType) For Each MachiningFamily In MachiningsList If (MachiningFamily.MachiningType And CurrType) <> 0 Then NewMachiningItem = New MachiningTreeViewItem(NewName, MachiningFamily.MachiningType, False, MachiningFamily) MachiningFamily.Items.Add(NewMachiningItem) EgtMdbSaveCurrMachining() NewMachiningItem.NewMachining = True ' Reimposto la lavorazione vecchia nel Db per deselezionarla e fare le verifiche correttamente EgtMdbSetCurrMachining(MachiningCopied.Name) MachiningCopied.IsSelected = False MachiningCopied.NotifyPropertyChanged("IsSelected") NewMachiningItem.IsSelected = True Exit For End If Next End If End If End Sub #End Region ' NewCommand #Region "SaveCommand" ''' ''' Returns a command that save the current selected machining. ''' Public ReadOnly Property SaveCommand() As ICommand Get If m_cmdSave Is Nothing Then m_cmdSave = New Command(AddressOf Save) End If Return m_cmdSave End Get End Property ''' ''' Saves the current machining. This method is invoked by the SaveCommand. ''' Public Sub Save(ByVal param As Object) Dim CurrMachining As MachiningTreeViewItem = DirectCast(param, MachiningTreeViewItem) CurrMachining.WriteMachiningParam() CurrMachining.m_Name = CurrMachining.m_Name.Trim() CurrMachining.WriteMachiningName() EgtMdbSaveCurrMachining() CurrMachining.NewMachining = False CurrMachining.IsModifiedReset() IsEnabledBtns(CurrMachining.IsValid And Not CurrMachining.IsModified, CurrMachining.IsValid, True) End Sub #End Region ' SaveCommand #Region "RemoveCommand" ''' ''' Returns a command that remove the current selected machining. ''' Public ReadOnly Property RemoveCommand() As ICommand Get If m_cmdRemove Is Nothing Then m_cmdRemove = New Command(AddressOf Remove) End If Return m_cmdRemove End Get End Property ''' ''' Remove the current selected machining from Db and TreeView. This method is invoked by the RemoveCommand. ''' Public Sub Remove(ByVal param As Object) EgtSetCurrentContext(m_ProjectSceneContext) Dim MachiningToRemove As MachiningTreeViewItem = DirectCast(param, MachiningTreeViewItem) ' Chiedo conferma cancellazione lavorazione If MessageBox.Show(EgtMsg(MSG_MACHININGDBERRORS + 5) & " " & MachiningToRemove.Name & EgtMsg(MSG_MACHININGDBERRORS + 6), EgtMsg(MSG_MACHININGDBERRORS + 7), MessageBoxButton.YesNo, MessageBoxImage.Question) <> MessageBoxResult.Yes Then Return End If RemoveMachining(MachiningToRemove) End Sub Public Sub RemoveMachining(MachiningToRemove As MachiningTreeViewItem) ' Salvo il tipo di lavorazione per poterla cancellare Dim MachiningType As Integer = MachiningToRemove.Type ' Cancello la lavorazione Dim CurrMachiningOriginalName As String = String.Empty EgtMdbGetMachiningFromUUID(MachiningToRemove.Uuid, CurrMachiningOriginalName) EgtMdbRemoveMachining(CurrMachiningOriginalName) ' Rimuovo il nome dall'albero For Each MachiningFamily In MachiningsList If (MachiningFamily.MachiningType And MachiningType) <> 0 Then MachiningFamily.Items.Remove(MachiningToRemove) End If Next ErrorOnMachining(False) End Sub #End Region ' RemoveCommand #Region "ImportCommand" ''' ''' Returns a command that remove the current selected machining. ''' Public ReadOnly Property ImportCommand() As ICommand Get If m_cmdImport Is Nothing Then m_cmdImport = New Command(AddressOf ImportMachining) End If Return m_cmdImport End Get End Property ''' ''' Manage the MachiningDb closing. This method is invoked by the CloseMachiningDbCommand. ''' Public Sub ImportMachining(param As Object) EgtSetCurrentContext(MachiningDbWindowVM.m_ProjectSceneContext) ' Se c'è lavorazione selezionata, ne verifico salvataggio If Not VerifySelectedMachiningModification() Then Return ' apro dialogo di scelta file Dim ImportFileDlg As New Microsoft.Win32.OpenFileDialog() With { .Title = EgtMsg(31161) & " " & EgtMsg(31163), .DefaultExt = ".data", .Filter = "Machinings (.data)|*.data", .CheckFileExists = True, .ValidateNames = True } If ImportFileDlg.ShowDialog() <> True Then Return Dim ImportFilePath As String = ImportFileDlg.FileName ' recupero liste lavorazioni da importare Dim ImportFileMachiningNameList As String() Dim ImportFileMachiningFamilyList As Integer() EgtMdbToBeImported(ImportFilePath, ImportFileMachiningNameList, ImportFileMachiningFamilyList) ' li inserisco in lista per finestra di scelta Dim MachiningToImportList As New ObservableCollection(Of ImpExpMachiningFamily) ' creo famiglie di lavorazioni in base a quelle trovate in lista importata If Not IsNothing(ImportFileMachiningNameList) AndAlso Not IsNothing(ImportFileMachiningFamilyList) Then For MachiningIndex As Integer = 0 To ImportFileMachiningNameList.Count - 1 Dim MachiningName As String = ImportFileMachiningNameList(MachiningIndex) Dim MachiningFamily As Integer = ImportFileMachiningFamilyList(MachiningIndex) MachiningFamily = MachiningFamily And (MCH_MY.DRILLING Or MCH_MY.DRILLING Or MCH_MY.SAWING Or MCH_MY.MILLING Or MCH_MY.POCKETING Or MCH_MY.MORTISING Or MCH_MY.SAWROUGHING Or MCH_MY.SAWFINISHING Or MCH_MY.GENMACHINING Or MCH_MY.CHISELING Or MCH_MY.SURFROUGHING Or MCH_MY.SURFFINISHING Or MCH_MY.WATERJETTING Or MCH_MY.FIVEAXISMILLING) Dim bFounded As Boolean = False For Each MachiningToImportFamily In MachiningToImportList If (MachiningFamily = MachiningToImportFamily.FamilyType) Then MachiningToImportFamily.MachiningList.Add(New ImpExpMachiningItem(MachiningName, AlreadyExist(MachiningName))) bFounded = True Exit For End If Next If Not bFounded Then Dim NewFamily As New ImpExpMachiningFamily(GetMachiningFamilyName(MachiningFamily), MachiningFamily) NewFamily.MachiningList.Add(New ImpExpMachiningItem(MachiningName, AlreadyExist(MachiningName))) MachiningToImportList.Add(NewFamily) End If Next End If Dim ImportWndVM As New ImportExportMachiningWindowVM(MachiningToImportList, False, ImportFilePath, ImportFileMachiningNameList) Dim ImportWnd As New ImportExportMachiningWindowV(Application.Current.MainWindow, ImportWndVM) If ImportWnd.ShowDialog() Then ' Aggiungo all'albero visualizzato le lavorazioni appena importate LoadImportedMachineMachinings(ImportWndVM.vsImported) End If End Sub Private Function AlreadyExist(MachiningName As String) As Boolean For Each MachiningFamily In m_MachiningsList For Each MachiningItem As MachiningTreeViewItem In MachiningFamily.Items If MachiningName = MachiningItem.Name Then Return True End If Next Next Return False End Function Private Function GetMachiningFamilyName(NewMachiningFamily As Integer) As String For Each MachiningFamily In m_MachiningsList If NewMachiningFamily = MachiningFamily.MachiningType Then Return MachiningFamily.Name End If Next Return "" End Function #End Region ' ImportCommand #Region "ExportCommand" ''' ''' Returns a command that remove the current selected machining. ''' Public ReadOnly Property ExportCommand() As ICommand Get If m_cmdExport Is Nothing Then m_cmdExport = New Command(AddressOf ExportMachining) End If Return m_cmdExport End Get End Property ''' ''' Manage the MachiningDb closing. This method is invoked by the CloseMachiningDbCommand. ''' Public Sub ExportMachining(param As Object) EgtSetCurrentContext(MachiningDbWindowVM.m_ProjectSceneContext) ' Se c'è lavorazione selezionata, ne verifico salvataggio If Not VerifySelectedMachiningModification() Then Return ' creo lista lavorazioni per esportazione Dim MachiningToExportList As New ObservableCollection(Of ImpExpMachiningFamily) For Each Family In m_MachiningsList Dim ImpExpMachiningFamily As New ImpExpMachiningFamily(Family.Name, Family.MachiningType) For Each Machining In Family.Items ImpExpMachiningFamily.MachiningList.Add(New ImpExpMachiningItem(Machining.Name, False)) Next MachiningToExportList.Add(ImpExpMachiningFamily) Next Dim ExportWndVM As New ImportExportMachiningWindowVM(MachiningToExportList, True) Dim ExportWnd As New ImportExportMachiningWindowV(Application.Current.MainWindow, ExportWndVM) ExportWnd.ShowDialog() End Sub #End Region ' ExportCommand #Region "ReloadMachiningCommand" ''' ''' Returns a command that reload the current selected tool. ''' Public ReadOnly Property ReloadMachiningCommand() As ICommand Get If m_cmdReloadMachining Is Nothing Then m_cmdReloadMachining = New Command(AddressOf ReloadMachining) End If Return m_cmdReloadMachining End Get End Property ''' ''' Reload the current selected tools. This method is invoked by the RemoveCommand. ''' Public Sub ReloadMachining(ByVal param As Object) If TypeOf param Is FamilyMachiningTreeViewItem Then Return ' Verifico se sia selezionata una lavorazione ElseIf TypeOf param Is MachiningTreeViewItem Then Dim MachiningToReload As MachiningTreeViewItem = DirectCast(param, MachiningTreeViewItem) EgtSetCurrentContext(m_ProjectSceneContext) MachiningToReload.ReadMachiningParam() MachiningToReload.ReadMachiningName() MachiningToReload.IsModifiedReset() End If End Sub #End Region ' ReloadMachiningCommand #Region "CloseMachiningsDbCommand" ''' ''' Returns a command that remove the current selected machining. ''' Public ReadOnly Property CloseMachiningsDbCommand() As ICommand Get If m_cmdCloseMachiningsDb Is Nothing Then m_cmdCloseMachiningsDb = New Command(AddressOf CloseMachiningsDb) End If Return m_cmdCloseMachiningsDb End Get End Property ''' ''' Manage the MachiningDb closing. This method is invoked by the CloseMachiningDbCommand. ''' Public Sub CloseMachiningsDb(param As Object) If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then Return End If m_bActive = False ' Se selezionata una lavorazione, verifico salvataggio If TypeOf param Is MachiningTreeViewItem Then Dim CurrMachining As MachiningTreeViewItem = DirectCast(param, MachiningTreeViewItem) If CurrMachining.IsValid Then CurrMachining.WriteMachiningParam() If EgtMdbIsCurrMachiningModified() Or CurrMachining.m_IsModifiedName Or CurrMachining.NewMachining Then Select Case MsgBox(EgtMsg(MSG_MACHININGDBERRORS + 1), MsgBoxStyle.YesNo, EgtMsg(MSG_MACHININGDBERRORS + 2)) Case MsgBoxResult.Yes CurrMachining.NewMachining = False CurrMachining.m_Name = CurrMachining.m_Name.Trim() CurrMachining.WriteMachiningName() EgtMdbSaveCurrMachining() Case MsgBoxResult.No If CurrMachining.NewMachining Then RemoveMachining(CurrMachining) ElseIf CurrMachining.m_IsModifiedName Then Dim DbName As String = String.Empty EgtMdbGetCurrMachiningParam(MCH_MP.NAME, DbName) CurrMachining.NamePar = DbName End If End Select End If Else 'Lavorazione non valida, correggerla o cancellarla prima di uscire. - Errore MessageBox.Show(EgtMsg(31410), EgtMsg(31126)) Return End If End If ' Salvataggio DB lavorazioni EgtMdbSave() '' ''Application.Msn.NotifyColleagues(Application.UPDATEOPERATIONMACHININGLIST) ??? DA SISTEMARE PER EGTCAM5 ' Verifico se ci sono lavorazioni senza utensile o con utensile cancellato ' Chiusura finestra MachiningTreeViewItem.m_delRemoveMachining = Nothing MachiningTreeViewItem.m_delErrorOnMachining = Nothing MachiningTreeViewItem.m_delIsEnabledBtns = Nothing FamilyMachiningTreeViewItem.m_delIsEnabledBtns = Nothing RaiseEvent m_CloseWindow(True) End Sub #End Region ' CloseMachiningDbCommand #End Region ' Commands End Class