EgtDOORCreator 2.3c1:

-> passando da HardwareManager a DoorCreator ripristino l'ultimo Part visualizzato.
This commit is contained in:
Nicola Pievani
2021-03-15 15:24:32 +00:00
parent cd6dbc010a
commit a46d38bc35
8 changed files with 41 additions and 19 deletions
+2
View File
@@ -12,6 +12,8 @@ Public Class Assembly
Public bIsNewAssembly As Boolean = False
Public Shared FirstReadingWeight As Boolean = False
Public Shared Refreshing As Boolean = True
Public bOldVersion As Boolean = False
' è usata per abilitare la TextBox associata all'OverlapLock
+18 -9
View File
@@ -22,6 +22,9 @@ Public Class AssemblyPageVM
Private m_EnterRefreshCmd As ICommand
Private m_CmdOrderBtn As ICommand
' all'avvio del programma definisco come pagina impostata quella dell'Assemblato (altrimenti dovrei definire "FR_", "FL_"..)
Public Property SlectedPart As String = "AssemblyPage"
' Costruttore
Sub New()
Map.SetRefJambPageVM(Me)
@@ -247,20 +250,22 @@ Public Class AssemblyPageVM
Public Sub JambBtn(param As Object)
' il parametro param arriva direttamente dal Jamb del bottone, quindi è gia scritto nella forma FL_ (le porte no! sono passate da binding)
Dim SelectPart As String = (CStr(param))
SlectedPart = SelectPart
Dim bOkSelection As Boolean = False
' In questa fase manca la gestione degli swing dei Jamb
Select Case SelectPart
Case ConstGen.PART_FRAME_LEFT
LoadSelectedPartDoor(ConstGen.PART_FRAME_LEFT, OptionModule.m_CompoPanelFrameVisibility, True)
bOkSelection = LoadSelectedPartDoor(ConstGen.PART_FRAME_LEFT, OptionModule.m_CompoPanelFrameVisibility, True)
Case ConstGen.PART_FRAME_RIGHT
LoadSelectedPartDoor(ConstGen.PART_FRAME_RIGHT, OptionModule.m_CompoPanelFrameVisibility, True)
bOkSelection = LoadSelectedPartDoor(ConstGen.PART_FRAME_RIGHT, OptionModule.m_CompoPanelFrameVisibility, True)
Case ConstGen.PART_FRAME_TOP
LoadSelectedPartDoor(ConstGen.PART_FRAME_TOP, OptionModule.m_CompoPanelFrameVisibility, True)
bOkSelection = LoadSelectedPartDoor(ConstGen.PART_FRAME_TOP, OptionModule.m_CompoPanelFrameVisibility, True)
Case ConstGen.PART_FRAME_BOTTOM
LoadSelectedPartDoor(ConstGen.PART_FRAME_BOTTOM, OptionModule.m_CompoPanelFrameVisibility, True)
bOkSelection = LoadSelectedPartDoor(ConstGen.PART_FRAME_BOTTOM, OptionModule.m_CompoPanelFrameVisibility, True)
Case Else
LoadSelectedPartDoor(SelectPart, Visibility.Visible, False)
bOkSelection = LoadSelectedPartDoor(SelectPart, Visibility.Visible, False)
End Select
Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nDDFPage
If bOkSelection Then Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nDDFPage
' aggiorno elenco quotature
Map.refDimensioningPanelVM.LoadHardwareDimList()
Map.refSceneManagerVM.RefreshBtn()
@@ -311,6 +316,9 @@ Public Class AssemblyPageVM
' ricevuto il nome dell'oggetto di tipo Part restituisce il PartDoor che lo contiene
Public Function ReserchPartDoor(TypePart As String) As PartDoor
Dim PD As PartDoor = Nothing
If IsNothing(CurrAssembly) OrElse IsNothing(CurrAssembly.ListPartDoor) Then
Return PD
End If
For IndexPartDoor As Integer = 0 To CurrAssembly.ListPartDoor.Count - 1
If CurrAssembly.ListPartDoor(IndexPartDoor).Door.TypePart.Contains(TypePart) Then
PD = CurrAssembly.ListPartDoor(IndexPartDoor)
@@ -321,16 +329,17 @@ Public Class AssemblyPageVM
End Function
' carica a video l'ogetto di cui è passato il nome (TypePart)
Private Sub LoadSelectedPartDoor(TypePart As String, CompoPanelVisibility As Visibility, PartPageIsReadOnly As Boolean)
Private Function LoadSelectedPartDoor(TypePart As String, CompoPanelVisibility As Visibility, PartPageIsReadOnly As Boolean) As Boolean
Dim Local_PD As PartDoor = ReserchPartDoor(TypePart)
If IsNothing(Local_PD) Then Return
If IsNothing(Local_PD) Then Return False
DdfFile.WriteDDFPart(Local_PD.Door, IniFile.m_sTempDir & "\" & TEMP_FILE, True, False)
ExecDoors(Map.refSceneManagerVM.ProjectScene, IniFile.m_sTempDir & "\" & TEMP_FILE, False)
Map.refPartPageVM.CurrPart = Local_PD.Door
Map.refCompoPanelVM.IsVisible = CompoPanelVisibility
Map.refPartPageVM.NotifyPropertyChanged("VisibilityTopShape")
Map.refPartPageVM.IsRaedOnly = PartPageIsReadOnly
End Sub
Return True
End Function
Sub SetStatusPage()
NotifyPropertyChanged("EnablePageAssembly")
+1 -1
View File
@@ -987,7 +987,7 @@ Public Class AssemblyManagerVM
PrintWndVM.TurnDimensioningLayer(HardwareDimension.NameLayer, HardwareDimension.SelectedLayer)
Next
'ExecDoors(Map.refSceneManagerVM.ProjectScene, sTempFile, False)
EgtZoom(ZM.ALL)
If Assembly.Refreshing Then EgtZoom(ZM.ALL)
m_CurrProject.SelAssemblyName.SelAssembly.MatchCompo()
m_CurrProject.SelAssemblyName.SelAssembly.UpDateAllOrigValue()
Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nAssemblyPage
+1
View File
@@ -170,6 +170,7 @@ Public Class CompoPanelVM
' aggiorno lista hardware di quotatura
Map.refDimensioningPanelVM.LoadHardwareDimList()
Map.refSceneManagerVM.RefreshBtn()
Map.refAssemblyPageVM.SlectedPart = "AssemblyPage"
Else
Map.refCompoPanelVM.GoBackVisibility = Visibility.Collapsed
Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nDDFPage
+1 -1
View File
@@ -751,7 +751,7 @@
</TextBlock.Style>
</TextBlock>
<TextBox Text="{Binding Value,UpdateSourceTrigger=PropertyChanged}"
<TextBox Text="{Binding Value,UpdateSourceTrigger=PropertyChanged}"
Name="TxTData"
Style="{StaticResource DoorParamsTxBx}"
Margin="0,0,0,2"
+2 -2
View File
@@ -57,8 +57,8 @@ Friend Class MainWindowModel
EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
EgtSetKey(sKey)
' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2301, 1, IniFile.m_nKeyLevel) And
EgtGetKeyOptions(3279, 2301, 1, IniFile.m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(3279, 2303, 1, IniFile.m_nKeyLevel) And
EgtGetKeyOptions(3279, 2303, 1, IniFile.m_nKeyOptions)
'Inizializzazione generale di EgtInterface
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
Dim sLogFile As String = IniFile.m_sTempDir & "\" & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
+3 -3
View File
@@ -32,7 +32,7 @@ Imports System.Windows
<Assembly: AssemblyCompany("EgalTech s.r.l.")>
<Assembly: AssemblyProduct("EgtDOORCreator")>
<Assembly: AssemblyCopyright("Copyright © 2016-2020 by EgalTech s.r.l.")>
<Assembly: AssemblyCopyright("Copyright © 2016-2021 by EgalTech s.r.l.")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(false)>
@@ -72,5 +72,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.3.1.1")>
<Assembly: AssemblyFileVersion("2.3.1.1")>
<Assembly: AssemblyVersion("2.3.3.1")>
<Assembly: AssemblyFileVersion("2.3.3.1")>
+13 -3
View File
@@ -10,6 +10,8 @@ Public Class ProjectManagerHardwareVM
#Region "FIELDS & PROPERTIES"
Friend Shared StopRefresh As Boolean = True
Private m_IsModified As Boolean = False
Public Property IsModified As Boolean
Get
@@ -550,7 +552,7 @@ Public Class ProjectManagerHardwareVM
Map.refCompoPanelVM.GoBackVisibility = Visibility.Collapsed
Map.refMainWindowVM.ProjectNameMsg = ""
End If
Map.refRefreshPanelVM.DimensionVisibility = Visibility.Collapsed
'Map.refRefreshPanelVM.DimensionVisibility = Visibility.Collapsed
' elimino i riferimenti all'hardware corrente
Map.refHardwarePageVM.CurrHardware = Nothing
' spengo il focus su tutti i bottoni
@@ -561,12 +563,20 @@ Public Class ProjectManagerHardwareVM
'ShowDimensionCommand = Visibility.Collapsed
' apro l'ultimo progetto
LauncherModule.InitLauncherModule()
Map.refProjectManagerVM.DoorIsChecked = true
Map.refProjectManagerVM.DoorIsChecked = True
Assembly.Refreshing = False
Map.refProjectManagerVM.OpenLastProject()
Map.refSceneManagerVM.RefreshBtn()
Assembly.Refreshing = True
' controllo quale pagina deve essere avviata
If OptionModule.m_ConfigurationSoftware = ConfigType.Assembly AndAlso Map.refMainWindowVM.SelectedPage <> MainWindowVM.ListPageEnum.nNothingSelected Then
Map.refAssemblyPageVM.JambBtn(Map.refAssemblyPageVM.SlectedPart)
Else
Map.refSceneManagerVM.RefreshBtn()
End If
Map.refInstrumentPanelVM.DimensionVisibility = OptionModule.m_DimensionDoor
Map.refInstrumentPanelVM.SaveImgHardware = OptionModule.m_DimensionDoor
Map.refProjectManagerVM.NotifyPropertyChanged("VisibilityCreateAssembly")
Map.refRefreshPanelVM.DimensionVisibility = Visibility.Collapsed
CompoMatch.ResetSTU()
End Sub