diff --git a/CadCuts/NestPageUC.xaml b/CadCuts/NestPageUC.xaml index ee74b07..d1ee8d6 100644 --- a/CadCuts/NestPageUC.xaml +++ b/CadCuts/NestPageUC.xaml @@ -157,7 +157,7 @@ - + diff --git a/CadCuts/NestPageUC.xaml.vb b/CadCuts/NestPageUC.xaml.vb index ec71902..85f9efd 100644 --- a/CadCuts/NestPageUC.xaml.vb +++ b/CadCuts/NestPageUC.xaml.vb @@ -149,15 +149,24 @@ Public Class NestPageUC UG0.Columns = nColumnIn_UG0 ' Gestione dei comandi di parcheggio e selezione (UniformGrid2) - '... + If GetPrivateProfileInt(S_GENERAL, K_ENABLEDXFPARK, 0, m_MainWindow.GetIniFile) = 0 Then + ParkIndBtn.Visibility = Visibility.Collapsed + UG2.Columns = 2 + End If End Sub + Dim ImageConverter As New ImageSourceConverter + Private Sub NestPage_Loaded(sender As Object, e As RoutedEventArgs) m_bActive = True LoadParams() - Dim ListparkInd As New List(Of ParkInd) - SelParkIndWD.LoadParkInd(ListparkInd) - If ListparkInd.Count > 2 Then ParkIndBtn.IsChecked = True + Dim nCpuntParkInd As Integer = UpdateImageParkInd() + If nCpuntParkInd > 2 Then + If GetPrivateProfileInt(S_GENERAL, K_ENABLEDXFPARK, 0, m_MainWindow.GetIniFile) = 0 Then + EgtOutLog("ATTENZIONE: Attivare gestione parcheggio per progetti DXF e riavviare il programma") + End If + ParkIndBtn.IsChecked = True + End If ParkIndBtn_Click() EgtZoom(ZM.ALL) End Sub @@ -2810,9 +2819,7 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then ' Aggiorno vista EgtZoom(ZM.ALL) ' Aggiorno la lista dei parcheggi - If ParkIndBtn.IsChecked Then - m_SelParkInd.UpdateList() - End If + ReloadListParkInd() End Sub ' ripulisco la lista dei pezzi in parcheggio @@ -2985,8 +2992,28 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then If ParkIndBtn.IsChecked Then m_SelParkInd.UpdateList() End If + UpdateImageParkInd() End Sub + ' Aggiorna immagine e restituisce il numero di parcheggi (+1) disponibili (+1 perchè conto anche il comando All_Off) + Private Function UpdateImageParkInd() As Integer + Dim nCount As Integer = 0 + ' Se il comando è abilitato allora provvedo ad aggiornare l'immagine + If GetPrivateProfileInt(S_GENERAL, K_ENABLEDXFPARK, 0, m_MainWindow.GetIniFile) <> 0 Then + Dim s As String = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\Parking.png" + Dim ListparkInd As New List(Of ParkInd) + SelParkIndWD.LoadParkInd(ListparkInd) + If ListparkInd.Count > 1 Then + s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_Busy.png" + Else + s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_Empty.png" + End If + ParkIndImg.Source = ImageConverter.ConvertFromString(s) + nCount = ListparkInd.Count + End If + Return nCount + End Function + Private Sub DeleteBridgeAssociated(nMyId As Integer) ' verifico se esistono dei ponticelli associati al pezzo indicato ' recuoero il gruppo di lavorazione corrente @@ -3130,6 +3157,7 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then If Not IsNothing(m_SelParkInd) Then m_SelParkInd.UpdateList() End If + UpdateImageParkInd() End Sub diff --git a/DrawImport/DrawPageUC.xaml.vb b/DrawImport/DrawPageUC.xaml.vb index ddbfb50..1dbdd44 100644 --- a/DrawImport/DrawPageUC.xaml.vb +++ b/DrawImport/DrawPageUC.xaml.vb @@ -1174,10 +1174,6 @@ Public Class DrawPageUC If m_ActiveComponentPage = Pages.CompoDimension And m_bInternalCompo Then Return ' Se errore esco If Not m_bDrawOk Then Return - - ' Attivo il parcheggio dei pezzi Draw (per il corretto posizionamento nella scena) - ActivateParkIndZero() - ' Nome pezzo Dim sPartName As String = PartNameTxBx.Text ' Leggo numero di pezzi da inserire @@ -1189,6 +1185,8 @@ Public Class DrawPageUC Else MakeMultipleInsert(InsNbr, sPartName) End If + ' Attivo il parcheggio dei pezzi Draw (per il corretto posizionamento nella scena) + ActivateParkIndZero() Dim bExitPage As Boolean = GetPrivateProfileInt(S_GENERAL, K_QUITDRAWPAGE, 1, m_MainWindow.GetIniFile) <> 0 ' Se Shift premuto eseguo il contrario If Keyboard.Modifiers And ModifierKeys.Shift Then diff --git a/MainWindow.xaml.vb b/MainWindow.xaml.vb index 51889ba..f6145d8 100644 --- a/MainWindow.xaml.vb +++ b/MainWindow.xaml.vb @@ -345,8 +345,8 @@ Class MainWindow ' Verifico abilitazione nesting automatico m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey) ' Recupero opzioni della chiave - Dim bKey As Boolean = EgtGetKeyLevel(9423, 2701, 1, m_nKeyLevel) And - EgtGetKeyOptions(9423, 2701, 1, m_nKeyOptions) + Dim bKey As Boolean = EgtGetKeyLevel(9423, 2702, 1, m_nKeyLevel) And + EgtGetKeyOptions(9423, 2702, 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 a9ad02d..dc0a784 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -62,5 +62,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/OmagCUT.vbproj b/OmagCUT.vbproj index 2b02cd0..e8ac517 100644 --- a/OmagCUT.vbproj +++ b/OmagCUT.vbproj @@ -1396,6 +1396,22 @@ + + + + + + + + + + + + + + + + IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagCUT\OmagCUTR32.exe diff --git a/OmagCUTDarkDictionary.xaml b/OmagCUTDarkDictionary.xaml index dac15df..d047669 100644 --- a/OmagCUTDarkDictionary.xaml +++ b/OmagCUTDarkDictionary.xaml @@ -11,185 +11,191 @@ x:Class="OmagCUTDarkDictionary"> - + - - - - + + + + - 9.5 - - - 0.5 - 4,0,8,0 + 9.5 + + + 0.5 + 4,0,8,0 - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + - ./Resources/Fonts/#Roboto - - - + + + + - - + + + + + + + + + + + + + + + + + + + - + ./Resources/Fonts/#Roboto - - + + + + - + + + - + + + - + - + - + - + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - + - + + + + + + + + + + + - + - + - + - - - + + + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/Project/CurrentProjectPageUC.xaml.vb b/Project/CurrentProjectPageUC.xaml.vb index 00201c1..898ed47 100644 --- a/Project/CurrentProjectPageUC.xaml.vb +++ b/Project/CurrentProjectPageUC.xaml.vb @@ -436,21 +436,29 @@ Public Class CurrentProjectPageUC ' prima di parcheggiare svuoto dei pezzi in parcheggio sia vuota m_MainWindow.m_CadCutPageUC.m_NestPage.ResetListOfGruopInPark() ' Parcheggio correttamente i pezzi precedentemente salvati + Dim nIdList As New List(Of Integer) + Dim nStatList As New List(Of Integer) Dim nId2 As Integer = EgtGetFirstPart() While nId2 <> GDB_ID.NULL + ' Forzo lo stato per avere il giusto calcolo delle posizioni per evitare sovrapposizioni + EgtSetStatus(nId2, GDB_ST.ON_) ' Inserisco correttamente in parcheggio m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nId2, True) ' Aggiorno lo stato di visualizzazione Dim nInfoStatus As Integer = 1 ' Salvo lo stato (per gestire la navigazione) EgtGetInfo(nId2, INFO_PARKSTATUS, nInfoStatus) - ' Imposto lo stato - EgtSetStatus(nId2, nInfoStatus) + ' Salvo l'Id e lo stato da impostare successivamente al posizionamento + nIdList.Add(nId2) + nStatList.Add(nInfoStatus) ' Notifica a WeinMatching per modifica Id VeinMatching.UpdatePart(nId2) ' Passo al pezzo successivo nId2 = EgtGetNextPart(nId2) End While + For IndIndex As Integer = 0 To nIdList.Count - 1 + EgtSetStatus(nIdList(IndIndex), nStatList(IndIndex)) + Next ' Aggiorno Aree totale e da lavorare dei pezzi SetTotalArea(dTotArea) UpdateToProduceArea() diff --git a/Project/SceneButtonsUC.xaml b/Project/SceneButtonsUC.xaml index 238c07a..921f6d2 100644 --- a/Project/SceneButtonsUC.xaml +++ b/Project/SceneButtonsUC.xaml @@ -39,6 +39,43 @@ + + + + + + + + + diff --git a/Project/SceneButtonsUC.xaml.vb b/Project/SceneButtonsUC.xaml.vb index 5274ea3..48430b7 100644 --- a/Project/SceneButtonsUC.xaml.vb +++ b/Project/SceneButtonsUC.xaml.vb @@ -5,6 +5,10 @@ Public Class SceneButtonsUC 'Riferimento alla MainWindow Dim m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow) + Private Sub Init() Handles Me.Initialized + TopViewBtn.ToolTip = "Top View" & vbCrLf & "Select View (Shift)" + End Sub + Private Sub MeasureBtn_Checked(sender As Object, e As RoutedEventArgs) Handles MeasureBtn.Checked GetCurrScene.SetStatusGetDistance() Dim ptRef1 As Point3d @@ -75,7 +79,35 @@ Public Class SceneButtonsUC End Sub Private Sub TopViewBtn_Click(sender As Object, e As RoutedEventArgs) Handles TopViewBtn.Click - EgtSetView(VT.TOP) + If (Keyboard.Modifiers And ModifierKeys.Shift) > 0 Then + If ViewPopUp.IsOpen Then + ViewPopUp.IsOpen = False + Else + ViewPopUp.IsOpen = True + End If + Else + EgtSetView(VT.TOP) + End If + End Sub + + Private Sub BottomViewBtn_Click(sender As Object, e As RoutedEventArgs) Handles BottomViewBtn.Click + EgtSetView(VT.BOTTOM) + End Sub + + Private Sub FrontViewBtn_Click(sender As Object, e As RoutedEventArgs) Handles FrontViewBtn.Click + EgtSetView(VT.FRONT) + End Sub + + Private Sub BackViewBtn_Click(sender As Object, e As RoutedEventArgs) Handles BackViewBtn.Click + EgtSetView(VT.BACK) + End Sub + + Private Sub LeftViewBtn_Click(sender As Object, e As RoutedEventArgs) Handles LeftViewBtn.Click + EgtSetView(VT.LEFT) + End Sub + + Private Sub RightViewBtn_Click(sender As Object, e As RoutedEventArgs) Handles RightViewBtn.Click + EgtSetView(VT.RIGHT) End Sub Private Function GetCurrScene() As EgtUILib.Scene diff --git a/Resources/NewIcons/Park_Busy.png b/Resources/NewIcons/Park_Busy.png new file mode 100644 index 0000000..a4bf19c Binary files /dev/null and b/Resources/NewIcons/Park_Busy.png differ diff --git a/Resources/NewIcons/icoBack-3D.png b/Resources/NewIcons/icoBack-3D.png new file mode 100644 index 0000000..3d65640 Binary files /dev/null and b/Resources/NewIcons/icoBack-3D.png differ diff --git a/Resources/NewIcons/icoBottom-3D.png b/Resources/NewIcons/icoBottom-3D.png new file mode 100644 index 0000000..5086c24 Binary files /dev/null and b/Resources/NewIcons/icoBottom-3D.png differ diff --git a/Resources/NewIcons/icoFront-3D.png b/Resources/NewIcons/icoFront-3D.png new file mode 100644 index 0000000..dc61742 Binary files /dev/null and b/Resources/NewIcons/icoFront-3D.png differ diff --git a/Resources/NewIcons/icoLeft-3D.png b/Resources/NewIcons/icoLeft-3D.png new file mode 100644 index 0000000..c4476ec Binary files /dev/null and b/Resources/NewIcons/icoLeft-3D.png differ diff --git a/Resources/NewIcons/icoRight-3D.png b/Resources/NewIcons/icoRight-3D.png new file mode 100644 index 0000000..38585bf Binary files /dev/null and b/Resources/NewIcons/icoRight-3D.png differ