EgtDOORCreator 2.1j2:
-> correzioni creazione nuovo progetto.
This commit is contained in:
@@ -235,14 +235,6 @@ Public Class ProjectManagerVM
|
||||
Dim SaveFileDialogWnd As New EgtWPFLib5.SaveFileDialogV(Application.Current.MainWindow, SaveFileDialog)
|
||||
SaveFileDialog.Title = EgtMsg(50304)
|
||||
SaveFileDialog.Directory = IniFile.m_MyProjectDir
|
||||
' carico l'indirizzo dell'ultimo direttorio aperto, altrimenti mantegno quello delle impostazioni
|
||||
If File.Exists(OptionModule.m_sLastProject) Then
|
||||
SaveFileDialog.Directory = Path.GetDirectoryName(OptionModule.m_sLastProject)
|
||||
ElseIf Path.HasExtension(OptionModule.m_sLastProject) AndAlso Directory.Exists(Path.GetDirectoryName(OptionModule.m_sLastProject)) Then
|
||||
SaveFileDialog.Directory = Path.GetDirectoryName(OptionModule.m_sLastProject)
|
||||
ElseIf Not Path.HasExtension(OptionModule.m_sLastProject) AndAlso Directory.Exists(OptionModule.m_sLastProject) Then
|
||||
SaveFileDialog.Directory = OptionModule.m_sLastProject
|
||||
End If
|
||||
SaveFileDialog.Extension = "\"
|
||||
' se annullo la creazione di un nuovo direttorio, rimango in quello attuale (verifico che l'ultimo file non sia già in lettura)
|
||||
If Not SaveFileDialogWnd.ShowDialog Then
|
||||
@@ -486,6 +478,9 @@ Public Class ProjectManagerVM
|
||||
If Directory.Exists(sFilePath) AndAlso bIsSingleDoor Then
|
||||
m_MruFiles.Remove(sFilePath)
|
||||
bValidPath = False
|
||||
ElseIf Directory.Exists(sFilePath) AndAlso Not bIsSingleDoor Then
|
||||
sFilePathComplete = sFilePath
|
||||
bValidPath = true
|
||||
ElseIf File.Exists(sFilePath) Then
|
||||
sFilePathComplete = sFilePath
|
||||
sFilePath = Path.GetDirectoryName(sFilePath)
|
||||
@@ -617,6 +612,7 @@ Public Class ProjectManagerVM
|
||||
' SELEZIONE FILE DA ELENCO
|
||||
' Notifico aggiornamento DoorList per aggiornare la grafica
|
||||
CurrProject.NotifyPropertyChanged("AssemblyList")
|
||||
Utility.UnLockDir()
|
||||
' Se c'è almeno una porta la visualizzo
|
||||
If CurrProject.AssemblyList.Count > 0 Then
|
||||
Dim bAssemblyIsSelected As Boolean = False
|
||||
@@ -650,10 +646,11 @@ Public Class ProjectManagerVM
|
||||
EgtZoom(ZM.ALL)
|
||||
End If
|
||||
|
||||
Utility.OutLog("Apertura file : " & CurrProject.SelAssemblyName.Name)
|
||||
' carico il nome del direttorio e la visbilità della lista delle porte
|
||||
If bIsSingleDoor Then
|
||||
Map.refMainWindowVM.ProjectNameMsg = CurrProject.SelAssemblyName.Name
|
||||
If Not IsNothing(CurrProject.SelAssemblyName.Name) then
|
||||
Map.refMainWindowVM.ProjectNameMsg = CurrProject.SelAssemblyName.Name
|
||||
End If
|
||||
Map.refAssemblyManagerVM.VisibilityDoorList = Visibility.Collapsed
|
||||
Else
|
||||
Map.refMainWindowVM.ProjectNameMsg = CurrProject.Name
|
||||
@@ -732,7 +729,7 @@ Public Class ProjectManagerVM
|
||||
|
||||
Public Sub Save()
|
||||
' Verifico esista elemento selezionato
|
||||
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) Then
|
||||
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) orelse IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.Name) Then
|
||||
' Impossibile savare un file se non esiste una porta! Errore
|
||||
MessageBox.Show(EgtMsg(50128), EgtMsg(50101), MessageBoxButton.OK, MessageBoxImage.Exclamation)
|
||||
Return
|
||||
@@ -916,6 +913,7 @@ Public Class ProjectManagerVM
|
||||
End If
|
||||
Else
|
||||
Map.refMainWindowVM.SelectedPage = MainWindowVM.ListPageEnum.nNothingSelected
|
||||
Map.refAssemblyManagerVM.VisibilityDoorList = Visibility.Collapsed
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user