Correzione apertura progetti Frame

This commit is contained in:
NicolaP
2022-03-10 11:53:41 +01:00
parent f66e5d6da9
commit bda614bd65
4 changed files with 29 additions and 38 deletions
+2 -2
View File
@@ -758,8 +758,8 @@ Class MainWindow
m_ActivePage = Pages.FrameCut
Case Pages.Photo, Pages.RawPart, Pages.Draw, Pages.Import, Pages.CSV
' Pages.Simulation: quando sono nella simulazione devo uscire dalla pagina
CadCutBtn.IsChecked = True
FrameCutBtn.IsChecked = False
CadCutBtn.IsChecked = False
FrameCutBtn.IsChecked = True
Case Pages.FrameCut
FrameCutBtn.IsChecked = True
Case Pages.Machine
+2 -2
View File
@@ -62,5 +62,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.4.2.3")>
<Assembly: AssemblyFileVersion("2.4.2.3")>
<Assembly: AssemblyVersion("2.4.3.1")>
<Assembly: AssemblyFileVersion("2.4.3.1")>
+18 -31
View File
@@ -180,42 +180,12 @@ Public Class CurrentProjectPageUC
EgtInitMachMgr(m_MainWindow.GetMachinesRootDir(), m_MainWindow.GetToolMakersDir())
m_bFirst = False
' ------------------ SELEZIONE AVVIO -----------------------------
' apro la finstra di selezione di avvio del programma
'StartProgram()
' ------------------ SELEZIONE AVVIO -----------------------------
'' Se richiesto, carico ultimo progetto
'Dim bAutoLoadLast As Boolean = GetPrivateProfileInt(S_GENERAL, K_AUTOLOADLASTPROJ, 0, m_MainWindow.GetIniFile()) <> 0
'If bAutoLoadLast Then
' m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
' Dim sPath As String = m_MainWindow.GetSaveDir() & "\" & m_nCurrProj.ToString("D4") & ".nge"
' If Not LoadProject(sPath, False) Then
' NewProject()
' End If
' EgtResetModified()
' 'Altrimenti ne imposto uno nuovo
'Else
' m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
' NewProject()
'End If
' creo nuovo progetto
m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
'NewProject()
' Nascondo progress per fotografia
PhotoProgress.Visibility = Windows.Visibility.Hidden
' Carico sottopagina opportuna
If GetProjectType() <> PRJ_TYPE.FRAMES Then
CurrentProjectPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC)
m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut
m_MainWindow.CadCutBtn.IsChecked = True
Else
CurrentProjectPageGrid.Children.Add(m_MainWindow.m_FrameCutPageUC)
m_MainWindow.m_ActivePage = MainWindow.Pages.FrameCut
m_MainWindow.FrameCutBtn.IsChecked = True
End If
Else
EgtSetCurrentContext(CurrentProjectScene.GetCtx())
@@ -274,8 +244,10 @@ Public Class CurrentProjectPageUC
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_OpenPage)
m_MainWindow.m_ActivePage = MainWindow.Pages.Open
' inizializzo gli oggetti della pagina (non passo dalla funzione Load!)
m_MainWindow.m_CadCutPageUC.m_ProjectMgr.SetReference()
' seleziono il file dalla lista della finestra (= 4)
' seleziono il file dalla lista della finestra (= 4)
ElseIf MyStartLancherWD.CurrSelection = MODE_LAUNCHER.SelectedProject Then
NewProject()
Dim sCurrDir As String = Path.GetDirectoryName(MyStartLancherWD.SelPath)
@@ -304,6 +276,21 @@ Public Class CurrentProjectPageUC
End If
End If
' 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
CurrentProjectPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC)
m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut
m_MainWindow.CadCutBtn.IsChecked = True
Else
CurrentProjectPageGrid.Children.Add(m_MainWindow.m_FrameCutPageUC)
m_MainWindow.m_ActivePage = MainWindow.Pages.FrameCut
m_MainWindow.FrameCutBtn.IsChecked = True
End If
End If
End Sub
' questo metodo è direttamente richiamato in caso di selezione della regione sinistra della pagina
+7 -3
View File
@@ -34,9 +34,7 @@ Public Class ProjectMgrUC
Private Sub ProjectMgrUC_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
' Impostazioni
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
m_CurrMachine = m_MainWindow.m_CurrentMachine
m_CurrNcComm = m_MainWindow.m_CNCommunication
SetReference()
' Se richiesto carico finestra per VeinMatching e ultimo intarsio
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.MAN_PHOTO) And
@@ -55,6 +53,12 @@ Public Class ProjectMgrUC
End If
End Sub
Public Sub SetReference()
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
m_CurrMachine = m_MainWindow.m_CurrentMachine
m_CurrNcComm = m_MainWindow.m_CNCommunication
End Sub
Private Sub NewBtn_Click(sender As Object, e As RoutedEventArgs) Handles NewBtn.Click
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False