From f319409261771d61211f9c88a8558cb97d008829 Mon Sep 17 00:00:00 2001 From: NicolaP Date: Wed, 10 Aug 2022 09:16:09 +0200 Subject: [PATCH 1/9] Inizio gestione lettura direttorio di appartenenza macchina --- EgtStoneLib/CurrentMachine.vb | 10 +++++++ MachinePanel/MyMachinePanelVM.vb | 4 ++- MainWindow/MainWindowM.vb | 40 +++++++++++++++++++++++++- MyMachGroupPanel/MyMachGroupPanelVM.vb | 4 +++ MySceneHost/MySceneHostVM.vb | 4 +++ 5 files changed, 60 insertions(+), 2 deletions(-) diff --git a/EgtStoneLib/CurrentMachine.vb b/EgtStoneLib/CurrentMachine.vb index c95557d..1efb345 100644 --- a/EgtStoneLib/CurrentMachine.vb +++ b/EgtStoneLib/CurrentMachine.vb @@ -1415,6 +1415,16 @@ Friend Property sCurrMillNoTip As String OmagOFFICEMap.refMachinePanelVM.NotifyPropertyChanged(NameOf(OmagOFFICEMap.refMachinePanelVM.WjDb_Visibility)) End Sub + ' recupro dalla lista delle macchine l'oggetto associato al nome indicato + Public Sub GetMachineClass(sMachineName As String) + For Each Item In OmagOFFICEMap.refMachinePanelVM.MachineList + If Item.Name = sMachineName Then + OmagOFFICEMap.refMachinePanelVM.SelectedMachine = Item + Exit For + End If + Next + End Sub + Public Sub LoadWJMaterial(Optional bIsStart As Boolean = False) Dim TempCurrMat As Material = CurrMat ' Svuoto l'attuale lista di materiali e delle qualità diff --git a/MachinePanel/MyMachinePanelVM.vb b/MachinePanel/MyMachinePanelVM.vb index 959b536..a6eda5b 100644 --- a/MachinePanel/MyMachinePanelVM.vb +++ b/MachinePanel/MyMachinePanelVM.vb @@ -96,7 +96,9 @@ Public Class MyMachinePanelVM ' recupero cartella radice delle macchine m_sMachinesRoot = OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot ' Carica macchine da cartella delle macchine - Machine.MachineListInit(m_sMachinesRoot, MachineList) + For Each MachDir In OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRootList + Machine.MachineListInit(MachDir, MachineList) + Next ' Inizializzo valori visibilità parametri Db utensili e lavorazioni OmagOFFICETMDbParamVisibility.Init() End Sub diff --git a/MainWindow/MainWindowM.vb b/MainWindow/MainWindowM.vb index cd6d1c4..4a26a99 100644 --- a/MainWindow/MainWindowM.vb +++ b/MainWindow/MainWindowM.vb @@ -86,13 +86,29 @@ Public Class MainWindowM Return m_sTempDir End Get End Property + + '------------------INIZIO Gestione elenco direttori macchine ------------------ + + Private m_sMachinesRootList As New List(Of String) + Friend ReadOnly Property sMachinesRootList As List(Of String) + Get + Return m_sMachinesRootList + End Get + End Property + + '------------------FINE Gestione elenco direttori macchine ------------------ + Private m_sMachinesRoot As String - Friend ReadOnly Property sMachinesRoot As String + Friend Property sMachinesRoot As String Get Return m_sMachinesRoot End Get + Set(value As String) + m_sMachinesRoot = value + End Set End Property Private m_sToolMakersDir As String + Friend ReadOnly Property sToolMakersDir As String Get Return m_sToolMakersDir @@ -172,6 +188,18 @@ Public Class MainWindowM If GetMainPrivateProfileString(S_MACH, K_MACHINESDIR, "", m_sMachinesRoot) = 0 Then m_sMachinesRoot = m_sDataRoot & "\" & MACHINES_DFL_DIR End If + + ' carico eleco dei direttori + If Not String.IsNullOrEmpty(m_sMachinesRoot) Then m_sMachinesRootList.Add(m_sMachinesRoot) + Dim nIndexDir As Integer = 1 + Dim sCurrMachineDir As String = String.Empty + While GetMainPrivateProfileString(S_MACH, K_MACHINESDIR & nIndexDir.ToString, "", sCurrMachineDir) <> 0 + If VerifyMachineIsUnique(sCurrMachineDir) Then + m_sMachinesRootList.Add(sCurrMachineDir) + End If + nIndexDir += 1 + End While + ' Impostazione direttorio per toolmakers If GetMainPrivateProfileString(S_MACH, K_TOOLMAKERSDIR, "", m_sToolMakersDir) = 0 Then m_sToolMakersDir = m_sDataRoot & "\" & TOOLMAKERS_DFL_DIR @@ -279,6 +307,16 @@ Public Class MainWindowM EgtPHOTOLib.MainData.SetKey(sIdKey) End Sub + ' verifico che il nome da inserire non esista già in elenco + Private Function VerifyMachineIsUnique(sMachDir As String) As Boolean + For Each sDir As String In m_sMachinesRootList + If sDir.ToLower.Trim = sMachDir.ToLower.Trim Then + Return False + End If + Next + Return True + End Function + Private Sub ManageInstance() Dim bCreated As Boolean Try diff --git a/MyMachGroupPanel/MyMachGroupPanelVM.vb b/MyMachGroupPanel/MyMachGroupPanelVM.vb index 9ba82b1..b1180ed 100644 --- a/MyMachGroupPanel/MyMachGroupPanelVM.vb +++ b/MyMachGroupPanel/MyMachGroupPanelVM.vb @@ -99,6 +99,8 @@ Public Class MyMachGroupPanelVM ' Salvo macchina del gruppo come nuovo default Dim sCurrMachName As String = String.Empty EgtGetCurrMachineName(sCurrMachName) + CurrentMachine.GetMachineClass(sCurrMachName) + OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot = Path.GetDirectoryName(OmagOFFICEMap.refMachinePanelVM.SelectedMachine.DirPath) WriteMainPrivateProfileString(S_MACH, K_CURRMACH, sCurrMachName) ' Ricarico la macchina corrente InitCurrentMachine(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, sCurrMachName, @@ -152,6 +154,8 @@ Public Class MyMachGroupPanelVM Public Overrides Function OnPostSetCurrMachGroup() As Boolean ' Imposto vista solo tavola EgtSetMachineLook(MCH_LOOK.TAB) + CurrentMachine.GetMachineClass(SelectedMachGroup.Machine) + OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot = Path.GetDirectoryName(OmagOFFICEMap.refMachinePanelVM.SelectedMachine.DirPath) ' Ricarico la macchina corrente InitCurrentMachine(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, SelectedMachGroup.Machine, OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.PRODUCTION_LINE), diff --git a/MySceneHost/MySceneHostVM.vb b/MySceneHost/MySceneHostVM.vb index ff08e90..2f0b583 100644 --- a/MySceneHost/MySceneHostVM.vb +++ b/MySceneHost/MySceneHostVM.vb @@ -314,6 +314,8 @@ Public Class MySceneHostVM Dim sMachine As String = String.Empty EgtGetInfo(nMchGrpId, "Machine", sMachine) If Not String.IsNullOrEmpty(sMachine) Then + CurrentMachine.GetMachineClass(sMachine) + OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot = Path.GetDirectoryName(OmagOFFICEMap.refMachinePanelVM.SelectedMachine.DirPath) InitCurrentMachine(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, sMachine, OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.PRODUCTION_LINE), OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_MILL), @@ -347,6 +349,8 @@ Public Class MySceneHostVM ' Salvo il file If Not EgtSaveFile(sFileDest, NGE.CMPTEXT) Then bOk = False Next + CurrentMachine.GetMachineClass(CurrentSelectedMachGroup) + OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot = Path.GetDirectoryName(OmagOFFICEMap.refMachinePanelVM.SelectedMachine.DirPath) ' reimposto la macchina corrente InitCurrentMachine(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, CurrentSelectedMachGroup, OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.PRODUCTION_LINE), From 090e930a0febd976d4c9e2f135c61b71c9898d5b Mon Sep 17 00:00:00 2001 From: DarioS Date: Thu, 11 Aug 2022 10:45:51 +0200 Subject: [PATCH 2/9] OmagOFFICE 2.4g1 : - cambio di versione. --- My Project/AssemblyInfo.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index bd8943d..8cf8fa0 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -69,6 +69,6 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + From d33a976d3bf6669e1e9cfc7762e1014a70841120 Mon Sep 17 00:00:00 2001 From: NicolaP Date: Wed, 31 Aug 2022 17:41:28 +0200 Subject: [PATCH 3/9] Gestione costruzione ponticelli WJ --- EgtStoneLib/CamAuto.vb | 8 + OptionPanel/MachiningTab/SplitModeV.xaml | 53 ++-- OptionPanel/MachiningTab/SplitModeVM.vb | 343 ++++++++++++++++++++++- OptionPanel/NestingTab/NestingTabVM.vb | 4 + Utility/OmagOFFICEDictionary.xaml | 6 +- 5 files changed, 390 insertions(+), 24 deletions(-) diff --git a/EgtStoneLib/CamAuto.vb b/EgtStoneLib/CamAuto.vb index bbe6d52..4eec3ba 100644 --- a/EgtStoneLib/CamAuto.vb +++ b/EgtStoneLib/CamAuto.vb @@ -149,6 +149,14 @@ Friend Module CamAuto Return bOk End Function + Friend Function ResetAllBridges() As Boolean + Dim bOk As Boolean = True + Dim nMachGroup As Integer = EgtGetCurrMachGroup() + Dim nBridgesGroup As Integer = EgtGetFirstNameInGroup(nMachGroup, "Bridges") + bOk = EgtErase(nBridgesGroup) + Return bOk + End Function + ' verifico che il contorno passato non sia stato separato Friend Function VerifyOutLoopIsClosed(nIdLayerOutLoop As Integer) As Boolean Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop) diff --git a/OptionPanel/MachiningTab/SplitModeV.xaml b/OptionPanel/MachiningTab/SplitModeV.xaml index 99c4c99..ddbcfe3 100644 --- a/OptionPanel/MachiningTab/SplitModeV.xaml +++ b/OptionPanel/MachiningTab/SplitModeV.xaml @@ -69,23 +69,38 @@ - -