From 4ab7811b50e72cb716abfca74c60e4f3c586d6f5 Mon Sep 17 00:00:00 2001 From: Nicola Pievani Date: Tue, 8 Oct 2024 18:28:48 +0200 Subject: [PATCH] Correzione DoubleClick OnOff scena --- CadCuts/MoveRawPartPage.xaml.vb | 3 +- CadCuts/NestPageUC.xaml.vb | 4 +++ CadCuts/SplitPageUC.xaml.vb | 60 ++++++++++++++++----------------- MainWindow.xaml.vb | 4 +-- My Project/AssemblyInfo.vb | 4 +-- 5 files changed, 40 insertions(+), 35 deletions(-) diff --git a/CadCuts/MoveRawPartPage.xaml.vb b/CadCuts/MoveRawPartPage.xaml.vb index ada5235..6dafd48 100644 --- a/CadCuts/MoveRawPartPage.xaml.vb +++ b/CadCuts/MoveRawPartPage.xaml.vb @@ -932,6 +932,7 @@ Public Class MoveRawPartPage ' Mantengo la fase che è stata creata e passo a gestire solo la visualizzazione dei bottoni RefreshVisibility() EgtZoom(ZM.ALL, True) + End Sub Private Sub StepMoveTxBx_EgtClosed(sender As Object, e As EventArgs) Handles StepMoveTxBx.EgtClosed @@ -1367,7 +1368,7 @@ Public Class MoveRawPartPage Return End If - ' ------- VISUALIZZAZIONE ------- + ' ------- VISUALIZZAZIONE (navigazione tra le fasi) ------- If m_SplitPage.m_bShow Then ' verifico se la fase successiva è uno scarico frontale If NextOperationIsUnloading(m_nCurrDisposition) Then diff --git a/CadCuts/NestPageUC.xaml.vb b/CadCuts/NestPageUC.xaml.vb index 9a9fd86..c22838a 100644 --- a/CadCuts/NestPageUC.xaml.vb +++ b/CadCuts/NestPageUC.xaml.vb @@ -220,17 +220,21 @@ Public Class NestPageUC m_nCountSpot = 0 m_nCountSpotCUT = 0 End If + EgtOutLog("Numero di SPOT caricati da OFFICE: " & m_nCountSpot.ToString) ' Se nel progetto non sono inseriti punti SpotReg disabilito i comandi If m_nCountSpot < 1 Then UG0_Reg.IsEnabled = False UG1_Reg.IsEnabled = False + EgtOutLog(" Abilito comandi gestione SPOT") Else UG0_Reg.IsEnabled = True UG1_Reg.IsEnabled = True + EgtOutLog(" Disabilito comandi gestione SPOT") End If ' Se nel progetto non sono inseriti punti SpotRegCUT provvedo ad aggiungerli If m_nCountSpotCUT < 1 Then InsertSpotRegistration() + EgtOutLog(" Creo SPOT_CUT") End If ' Se necessario riabilito impostazione modificato diff --git a/CadCuts/SplitPageUC.xaml.vb b/CadCuts/SplitPageUC.xaml.vb index aabf014..954caef 100644 --- a/CadCuts/SplitPageUC.xaml.vb +++ b/CadCuts/SplitPageUC.xaml.vb @@ -457,21 +457,7 @@ Public Class SplitPageUC #End Region ' Bridge Private Sub OnMyMouseDownScene_DoubleClick(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene_DoubleClick - If MachiningLsBx.SelectedItems.Count = 1 Then - OnMyMouseDownScene(sender, e) - Dim x As NameIdLsBxItem = DirectCast(MachiningLsBx.SelectedItems(0), NameIdLsBxItem) - Dim nI As Integer = x.Ind - If m_MachiningList(nI).m_bEnabled Then - m_MachiningList(nI).m_bEnabled = False - x.bIsActive = False - Else - m_MachiningList(nI).m_bEnabled = True - x.bIsActive = True - End If - ColorMachining(m_MachiningList(nI)) - ColorNumberArrow(nI) - EgtDraw() - End If + OnOffCut() End Sub Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene @@ -756,20 +742,7 @@ Public Class SplitPageUC Private Sub MachiningLsBx_MouseDoubleClick(sender As Object, e As MouseEventArgs) Handles MachiningLsBx.MouseDoubleClick If m_IsCtrlKeyDown Or m_IsShiftKeyDown Then Return - If MachiningLsBx.SelectedItems.Count = 1 Then - Dim x As NameIdLsBxItem = DirectCast(MachiningLsBx.SelectedItems(0), NameIdLsBxItem) - Dim nI As Integer = x.Ind - If m_MachiningList(nI).m_bEnabled Then - m_MachiningList(nI).m_bEnabled = False - x.bIsActive = False - Else - m_MachiningList(nI).m_bEnabled = True - x.bIsActive = True - End If - ColorMachining(m_MachiningList(nI)) - ColorNumberArrow(nI) - EgtDraw() - End If + OnOffCut() End Sub Private Sub MoveUpBtn_Click(sender As Object, e As RoutedEventArgs) Handles MoveUpBtn.Click @@ -1890,7 +1863,7 @@ Public Class SplitPageUC End Sub Private Sub NextBtn_Click(sender As Object, e As RoutedEventArgs) Handles NextBtn.Click - ' ------- VISUALIZZAZIONE ------- + ' ------- VISUALIZZAZIONE (navigazione tra le fasi) ------- If m_bShow Then Dim CurrDisposition As Integer = EgtGetPhaseDisposition(m_nCurrPhase) ' recupero l'operazione successiva @@ -2199,6 +2172,33 @@ Public Class SplitPageUC End Sub + Private Sub OnOffCut() + If MachiningLsBx.SelectedItems.Count = 1 Then + Dim x As NameIdLsBxItem = DirectCast(MachiningLsBx.SelectedItems(0), NameIdLsBxItem) + Dim nI As Integer = x.Ind + If m_MachiningList(nI).m_bEnabled Then + m_MachiningList(nI).m_bEnabled = False + x.bIsActive = False + Else + m_MachiningList(nI).m_bEnabled = True + x.bIsActive = True + End If + ColorMachining(m_MachiningList(nI)) + ColorNumberArrow(nI) + EgtDraw() + ' Imposto flag di modifica + m_bModified = True + ' recupero l'elenco degli elementi selezionati + Dim ItemList As New List(Of NameIdLsBxItem) + For Each Item As NameIdLsBxItem In MachiningLsBx.SelectedItems + ItemList.Add(Item) + Next + VerifyHomogenousMachining(ItemList) + ' Abilitazione bottone Next + EnableButtons() + End If + End Sub + Private Sub VerifyHomogenousMachining(ItemList As List(Of NameIdLsBxItem)) If IsNothing(ItemList) OrElse ItemList.Count = 0 Then m_MainWindow.m_CurrentProjectPageUC.ClearMessage() diff --git a/MainWindow.xaml.vb b/MainWindow.xaml.vb index d01e5ac..df3e70e 100644 --- a/MainWindow.xaml.vb +++ b/MainWindow.xaml.vb @@ -343,8 +343,8 @@ Class MainWindow ' Verifico abilitazione nesting automatico m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey) ' Recupero opzioni della chiave - Dim bKey As Boolean = EgtGetKeyLevel(9423, 2609, 1, m_nKeyLevel) And - EgtGetKeyOptions(9423, 2609, 1, m_nKeyOptions) + Dim bKey As Boolean = EgtGetKeyLevel(9423, 2610, 1, m_nKeyLevel) And + EgtGetKeyOptions(9423, 2610, 1, m_nKeyOptions) ' Verifico abilitazione prodotto Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE) ' Impostazione per programma OnlyFrame: solo se CUT_BASE non attivo diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 2e2d49f..d9904cc 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -62,5 +62,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + +