Compare commits

...

6 Commits

Author SHA1 Message Date
Nicola Pievani 0cc673b047 Nuova gestione chiave di protezione CUT_LIGHT 2024-02-09 17:58:33 +01:00
Nicola Pievani acc1365fd2 Correzione init chiave per CUT_LIGHT 2024-02-09 15:38:37 +01:00
Nicola Pievani 7dcf1fe8dc Inserita lettura Flag CUT_LIGHT 2024-02-09 15:09:53 +01:00
Nicola Pievani cd748dea7a Cambio nome variabile 2024-02-08 09:32:02 +01:00
Nicola Pievani c2f03a883a Inserito commeto per gestione chiave di protezione 2024-02-07 18:11:40 +01:00
Nicola Pievani 9b09eeaa9c Aggiunta variabile per gestione OnlyFrame 2024-02-07 18:04:59 +01:00
2 changed files with 44 additions and 5 deletions
+43 -4
View File
@@ -23,6 +23,9 @@ Class MainWindow
' Coefficiente di scalatura della finestra rispetto a standard
Friend m_dMWinScale As Double = 1
' Variabile che definisce l'avvio forzato in modalità FRAME
Friend m_OnlyFrame As Boolean = False
' Dichiarazione delle Page UserControl
Friend m_WorkInProgressPageUC As WorkInProgressPageUC
Friend m_CurrentProjectPageUC As CurrentProjectPageUC
@@ -101,6 +104,7 @@ Class MainWindow
REGISTRATION = 2 ^ 20 ' 1048576
SIMPLESTATISTICS = 2 ^ 21 ' 2097152
COMPOFRAME = 2 ^ 22 ' 4194304
CUT_LIGHT = 2 ^ 23 ' 8388608
End Enum
' Opzione nesting automatico
Private m_bAutoNest As Boolean = False
@@ -343,6 +347,12 @@ Class MainWindow
EgtGetKeyOptions(9423, 2512, 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
If Not bProd Then
m_OnlyFrame = GetKeyOption(KEY_OPT.CUT_LIGHT)
End If
' Inizializzazione generale di EgtInterface
m_nDebug = GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0, m_sIniFile)
m_sVersion = My.Application.Info.Version.Major.ToString() & "." &
@@ -1132,7 +1142,7 @@ Class MainWindow
End If
' Inizio la chiusura del programma (se NUM_OLD verifico di aver terminato il processo DripFeed)
EgtOutLog("Iniziato processo di chiusura programma")
m_IsClosingApplication = If( m_CNCommunication.m_nNCType = 1, 1, 2)
m_IsClosingApplication = If(m_CNCommunication.m_nNCType = 1, 1, 2)
Dim nCount As Integer = 0
While m_IsClosingApplication <> 2
If nCount > 5 Then
@@ -1270,7 +1280,11 @@ Class MainWindow
m_ProdLineTimer.Start()
End If
' di default attivo la pagina CadCut
m_ActivePage = MainWindow.Pages.CadCut
If m_OnlyFrame Then
m_ActivePage = MainWindow.Pages.FrameCut
Else
m_ActivePage = MainWindow.Pages.CadCut
End If
' seleziono il tipo di avvio
m_CurrentProjectPageUC.StartProgram()
' aggiorno la grafica
@@ -1307,8 +1321,33 @@ Class MainWindow
Dim bHeadH1 As Boolean = (EgtGetHeadId("H1") <> GDB_ID.NULL)
EgtSetCurrentContext(nCurrCtx)
' Aggiorno interfaccia
CadCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FRAMES)
FrameCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FLATS) AndAlso bHeadH1
If m_OnlyFrame Then
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS And m_ActivePage <> Pages.RawPart Then
Dim FrameWnd As New EgtMsgBox(Me, "NON PUOI", "La tua licenza non è abilitata CAD", EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
'' Gestione stato FastGrid
'm_CadCutPageUC.m_FastGridSlabManager.OnPreNewProject()
' Cancello progetto salvato con nome da file ini
WritePrivateProfileString(S_GENERAL, K_LASTNAMEPROJ, "", GetIniFile())
' Scelta tavola della macchina
Dim nTabInd As Integer = m_CadCutPageUC.m_ProjectMgr.ChooseTable()
' Creo nuovo progetto
m_CurrentProjectPageUC.NewProject(nTabInd, False)
'' Gestione stato FastGrid
'm_CadCutPageUC.m_FastGridSlabManager.OnPostNewProject()
FrameCutBtn_Click(Nothing, Nothing)
CadCutBtn.IsEnabled = False
Else
FrameCutBtn.IsEnabled = True
CadCutBtn.IsEnabled = False
' Attivo il pulsante FRAME
'FrameCutBtn.IsChecked = True
'CadCutBtn.IsChecked = False
End If
Else
CadCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FRAMES)
FrameCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FLATS) AndAlso bHeadH1
End If
' DirectCutBtn.IsEnabled = bHeadH1
End Sub
+1 -1
View File
@@ -276,7 +276,7 @@ Public Class CurrentProjectPageUC
' se apro la finestra "OpenFolder" l'assegnazione dei Children è fatta direttamente nella classe ProjectMgrUC
If MyStartLancherWD.CurrSelection <> MODE_LAUNCHER.OpenFolder Then
' Carico sottopagina opportuna
If GetProjectType() <> PRJ_TYPE.FRAMES Then
If GetProjectType() <> PRJ_TYPE.FRAMES And Not m_MainWindow.m_OnlyFrame Then
CurrentProjectPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC)
m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut
m_MainWindow.CadCutBtn.IsChecked = True