From 4b8f4e9679f18fd4023d00dcab210bbb38bda8fa Mon Sep 17 00:00:00 2001 From: Demetrio Cassarino Date: Thu, 25 Jul 2024 10:12:29 +0200 Subject: [PATCH] -aggiunto finestre personalizzate messagebox e colorpicker --- Application.xaml.vb | 3 +- CurrSetUp/CurrSetUpVM.vb | 10 +- EgtCAM5.vbproj | 26 ++ EgtColorPicker/EgtColorPickerV.xaml | 266 ++++++++++++++++ EgtColorPicker/EgtColorPickerV.xaml.vb | 68 ++++ EgtMessageBox/EgtMessageBoxV.xaml | 49 +++ EgtMessageBox/EgtMessageBoxV.xaml.vb | 109 +++++++ MachGroupPanel/MyMachGroupPanelVM.vb | 20 +- MachinePanel/MyMachinePanelVM.vb | 18 +- .../InputExpander/InputExpanderV.xaml | 2 +- .../ManageLayerExpanderVM.vb | 5 +- .../EstimationsExpander.vb | 15 +- .../MachiningTreeExpanderVM.vb | 3 +- .../FixtureParameters/FixtureParametersVM.vb | 3 +- .../MachiningParameterExpanderVM.vb | 9 +- .../MachiningOpListBoxItem.vb | 6 +- .../OperationsListExpanderV.xaml | 9 +- .../OperationsListExpanderVM.vb | 33 +- .../SimulationExpanderVM.vb | 69 ++-- OptionsWindow/OptionModule.vb | 3 +- OptionsWindow/OptionWindowVM.vb | 301 ++++++++++-------- Project/ProjectVM.vb | 73 +++-- Resources/EgtMessageBox/Error.png | Bin 0 -> 3263 bytes Resources/EgtMessageBox/Information.png | Bin 0 -> 2689 bytes Resources/EgtMessageBox/Question.png | Bin 0 -> 2950 bytes Resources/EgtMessageBox/Warning.png | Bin 0 -> 2223 bytes SetUp/SetUpVM.vb | 17 +- SetUpDb/SetUpDbVM.vb | 18 +- Special-BeamWall/Beam.vb | 3 +- Special-BeamWall/Wall.vb | 3 +- Special-Doors/DoorPanelVM.vb | 16 +- Special-Doors/Doors.vb | 12 +- Special-Doors/MTableDbVM.vb | 25 +- Special-Doors/MTableListBox.vb | 5 +- Special-Doors/TableUtility.vb | 3 +- Special-GunStock/GunStock.vb | 30 +- Special-GunStock/GunStockWndV.xaml.vb | 6 +- ToolsDbWindow/MyToolDbWindowVM.vb | 6 +- TopCommandBar/TopCommandBarVM.vb | 24 +- Utility/Dictionary.xaml | 105 ++++++ Utility/MachineModel.vb | 6 +- 41 files changed, 1066 insertions(+), 313 deletions(-) create mode 100644 EgtColorPicker/EgtColorPickerV.xaml create mode 100644 EgtColorPicker/EgtColorPickerV.xaml.vb create mode 100644 EgtMessageBox/EgtMessageBoxV.xaml create mode 100644 EgtMessageBox/EgtMessageBoxV.xaml.vb create mode 100644 Resources/EgtMessageBox/Error.png create mode 100644 Resources/EgtMessageBox/Information.png create mode 100644 Resources/EgtMessageBox/Question.png create mode 100644 Resources/EgtMessageBox/Warning.png diff --git a/Application.xaml.vb b/Application.xaml.vb index 9a9a772..b12c40d 100644 --- a/Application.xaml.vb +++ b/Application.xaml.vb @@ -210,7 +210,8 @@ Class Application Friend Const GUNSTOCKMODIF As String = "GunStockModif" Private Sub Application_DispatcherUnhandledException(ByVal sender As System.Object, ByVal e As System.Windows.Threading.DispatcherUnhandledExceptionEventArgs) - MessageBox.Show(e.Exception.Message) + 'MessageBox.Show(e.Exception.Message) + EgtMessageBoxV.Show(Application.Current.MainWindow, e.Exception.Message) e.Handled = True End Sub diff --git a/CurrSetUp/CurrSetUpVM.vb b/CurrSetUp/CurrSetUpVM.vb index 7570fc5..6267704 100644 --- a/CurrSetUp/CurrSetUpVM.vb +++ b/CurrSetUp/CurrSetUpVM.vb @@ -161,7 +161,8 @@ Public Class CurrSetUpVM sFilePath = SaveFileDialogViewVM.FileName If Not m_SetUpVM.Save(sFilePath) Then EgtOutLog("Error in setup saving: can't find the directory") - MessageBox.Show("Error in saving Setup.", "Error", MessageBoxButton.OK, MessageBoxImage.Error) + 'MessageBox.Show("Error in saving Setup.", "Error", MessageBoxButton.OK, MessageBoxImage.Error) + EgtMessageBoxV.Show(Application.Current.MainWindow, "Error in saving Setup.", "Error", MessageBoxButton.OK, MessageBoxImage.Error) End If End Sub @@ -256,14 +257,15 @@ Public Class CurrSetUpVM ' Verifico se l'attrezzaggio è stato modificato If m_SetUpVM.IsAppliedSetUp() Then ' se modificato chiedo se salvarlo prima di uscire - If MessageBox.Show(EgtMsg(MSG_SETUP + 6), EgtMsg(MSG_SETUP + 2), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then + 'If MessageBox.Show(EgtMsg(MSG_SETUP + 6), EgtMsg(MSG_SETUP + 2), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then + If EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(MSG_SETUP + 6), EgtMsg(MSG_SETUP + 2), MessageBoxButton.YesNo, MessageBoxImage.Question) = MessageBoxResult.Yes Then ' lo salvo Apply() End If End If - ' Resetto tutti i delegate usati - ExitToolAssociation.m_delIsModifiedSetUp = Nothing + ' Resetto tutti i delegate usati + ExitToolAssociation.m_delIsModifiedSetUp = Nothing ' Reset lua EgtLuaResetGlobVar("STU") diff --git a/EgtCAM5.vbproj b/EgtCAM5.vbproj index 2da8add..e089165 100644 --- a/EgtCAM5.vbproj +++ b/EgtCAM5.vbproj @@ -161,6 +161,12 @@ CurrSetUpV.xaml + + EgtColorPickerV.xaml + + + EgtMessageBoxV.xaml + LeftTrayV.xaml @@ -455,6 +461,14 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -1034,6 +1048,18 @@ + + + + + + + + + + + + IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtCAM5\EgtCAM5R32.exe diff --git a/EgtColorPicker/EgtColorPickerV.xaml b/EgtColorPicker/EgtColorPickerV.xaml new file mode 100644 index 0000000..0ba6f8c --- /dev/null +++ b/EgtColorPicker/EgtColorPickerV.xaml @@ -0,0 +1,266 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +