From 65f8d6936135987e1739020369ad3c527c8085b2 Mon Sep 17 00:00:00 2001 From: Demetrio Cassarino Date: Mon, 18 Sep 2023 17:56:38 +0200 Subject: [PATCH] Gestione interfaccia --- MachinePanel/MyMachinePanelVM.vb | 84 ++++++++++++++++++++++++++------ 1 file changed, 68 insertions(+), 16 deletions(-) diff --git a/MachinePanel/MyMachinePanelVM.vb b/MachinePanel/MyMachinePanelVM.vb index 9b9f666..e67be29 100644 --- a/MachinePanel/MyMachinePanelVM.vb +++ b/MachinePanel/MyMachinePanelVM.vb @@ -127,6 +127,57 @@ Public Class MyMachinePanelVM Dim BackBotColor As New Color3d(BackTopColor) GetMainPrivateProfileColor(S_SCENE, K_BACKBOTTOM, BackBotColor) ToolDbWindowVM.SetBackgroundColor(BackTopColor, BackBotColor) + + ToolDbWindowVM.bPersonalInterface = True + + ' Collegata allo stile della GroupBox + ToolDbWindowVM.MyBorderGrbThickness = 0.25 + ToolDbWindowVM.MyForegroundGrbColor = Brushes.White + + ' Definisco lo stile della pagina + ToolDbWindowVM.BorderBrushIsMouseOver = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush) + ToolDbWindowVM.GeneralBorderBrush = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush) + ToolDbWindowVM.BorderBrushIsFocused = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush) + ToolDbWindowVM.BackgroundBrdEnable = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush) + ToolDbWindowVM.BackgroundBrdDisable = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush) + ToolDbWindowVM.BackgroundTxBlDisable = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush) + ToolDbWindowVM.ForegroundTxBlEnable = Brushes.White + ToolDbWindowVM.ForegroundTxBlDisable = Brushes.White + ToolDbWindowVM.GeneralForeground = Brushes.White + ToolDbWindowVM.GeneralBackground = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush) + + ' Definisco lo stile della ComboBox + ToolDbWindowVM.BackgroundCmBxTxBl = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush) + ToolDbWindowVM.ForegroundCmBxTxBl = Brushes.White + ToolDbWindowVM.BorderThicknessCmBxTxBl = 1.0 + ToolDbWindowVM.VerticalContentAlignmentCmBxTxBl = "Center" + ToolDbWindowVM.HeightCmBxTxBl = "25" + ToolDbWindowVM.WidthCmBxTxBl = "Auto" + ToolDbWindowVM.ForegroundTextBoxCmBxTxBl = Brushes.White + + 'Definisco lo stile del Button + ToolDbWindowVM.BackgroundButton = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush) + ToolDbWindowVM.ForegroundButton = Brushes.White + ToolDbWindowVM.BorderBrushButton = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush) + ToolDbWindowVM.BorderThicknessButton = 1.0 + + ''Definisco lo stile della DataGrid + 'ToolDbWindowVM.HeaderVisibility = DataGridHeadersVisibility.Column + 'ToolDbWindowVM.BackgroundDataGrid = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush) + 'ToolDbWindowVM.BackGroundHeader = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush) + 'ToolDbWindowVM.ForegroundHeader = Brushes.White + 'ToolDbWindowVM.BorderBrushHeader = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush) + 'ToolDbWindowVM.BorderThicknessHeader = 0.0 + 'ToolDbWindowVM.FontWeightHeader = FontWeights.Bold + 'ToolDbWindowVM.BackgroundDataGrid = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush) + 'ToolDbWindowVM.BorderBrushDataGrid = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush) + 'ToolDbWindowVM.BackgroundDataGridRow = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush) + 'ToolDbWindowVM.ForegroundDataGridRow = Brushes.White + 'ToolDbWindowVM.BorderBrushDataGridRow = Brushes.DarkGray + 'ToolDbWindowVM.BorderThicknessDataGridRow = "0 0 0 1" + 'ToolDbWindowVM.BorderBrushDataGridCell = Brushes.DarkGray + 'ToolDbWindowVM.BorderThicknessDataGridCell = "0 0 1 0" + ' Dim ToolDbWindowV As New ToolDbWindowV(Application.Current.MainWindow, ToolDbWindowVM) Dim ToolDbWindowV As New MyToolDbWindowV(Application.Current.MainWindow, ToolDbWindowVM) If ToolDbWindowVM.MatType <> 0 Then @@ -159,6 +210,8 @@ Public Class MyMachinePanelVM Dim MachDbWindowVM As New EgtWPFLib5.MachiningDbWindowVM(CurrentMachine.sMachIniFile, OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx(), "Stone", OmagOFFICEMap.refMainWindowVM.MainWindowM.nUserLevel > 5) ' Dim MachDbWindowV As New EgtWPFLib5.MachiningDbWindowV(Application.Current.MainWindow, MachDbWindowVM) + MachDbWindowVM.bPersonalInterface = True + ' Collegata allo stile della GroupBox MachDbWindowVM.MyBorderGrbThickness = 0.25 MachDbWindowVM.MyForegroundGrbColor = Brushes.White @@ -180,7 +233,7 @@ Public Class MyMachinePanelVM MachDbWindowVM.ForegroundCmBxTxBl = Brushes.White MachDbWindowVM.BorderThicknessCmBxTxBl = 1.0 MachDbWindowVM.VerticalContentAlignmentCmBxTxBl = "Center" - MachDbWindowVM.HeightCmBxTxBl = "30" + MachDbWindowVM.HeightCmBxTxBl = "25" MachDbWindowVM.WidthCmBxTxBl = "Auto" MachDbWindowVM.ForegroundTextBoxCmBxTxBl = Brushes.White @@ -192,21 +245,20 @@ Public Class MyMachinePanelVM MachDbWindowVM.OpacityIsChecked = 0.25 'Definisco lo stile della DataGrid - MachDbWindowVM.HeaderVisibility = DataGridHeadersVisibility.Column - MachDbWindowVM.BackgroundDataGrid = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush) - MachDbWindowVM.BackGroundHeader = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush) - MachDbWindowVM.ForegroundHeader = Brushes.White - MachDbWindowVM.BorderBrushHeader = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush) - MachDbWindowVM.BorderThicknessHeader = 0.0 - MachDbWindowVM.FontWeightHeader = FontWeights.Bold - MachDbWindowVM.BackgroundDataGrid = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush) - MachDbWindowVM.BorderBrushDataGrid = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush) - MachDbWindowVM.BackgroundDataGridRow = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush) - MachDbWindowVM.ForegroundDataGridRow = Brushes.White - MachDbWindowVM.BorderBrushDataGridRow = Brushes.DarkGray - MachDbWindowVM.BorderThicknessDataGridRow = "0 0 0 1" - MachDbWindowVM.BorderBrushDataGridCell = Brushes.DarkGray - MachDbWindowVM.BorderThicknessDataGridCell = "0 0 1 0" + 'MachDbWindowVM.HeaderVisibility = DataGridHeadersVisibility.Column + 'MachDbWindowVM.BackgroundDataGrid = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#484D55"), Brush) + 'MachDbWindowVM.BackGroundHeader = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#484D55"), Brush) + 'MachDbWindowVM.ForegroundHeader = Brushes.White + 'MachDbWindowVM.BorderBrushHeader = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush) + 'MachDbWindowVM.BorderThicknessHeader = 0.0 + 'MachDbWindowVM.FontWeightHeader = FontWeights.Bold + 'MachDbWindowVM.BorderBrushDataGrid = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush) + 'MachDbWindowVM.BackgroundDataGridRow = DirectCast(New System.Windows.Media.BrushConverter().ConvertFromString("#1C1D22"), Brush) + 'MachDbWindowVM.ForegroundDataGridRow = Brushes.White + 'MachDbWindowVM.BorderBrushDataGridRow = Brushes.DarkGray + 'MachDbWindowVM.BorderThicknessDataGridRow = "0 0 0 1" + 'MachDbWindowVM.BorderBrushDataGridCell = Brushes.DarkGray + 'MachDbWindowVM.BorderThicknessDataGridCell = "0 0 1 0" Dim MachDbWindowV As New MyMachiningDbWindowV(Application.Current.MainWindow, MachDbWindowVM)