Merge commit '301ec52bf3225311f9098b0083c7f24e3f3330e7' into Nuovo_Tema
This commit is contained in:
@@ -690,8 +690,8 @@ Public Class ProjectManagerVM
|
||||
fd.InitialDirectory = IniFile.m_MyProjectDir
|
||||
End If
|
||||
' seleziono il filtro di apertura
|
||||
fd.Filter = "(*.ddt) |*.ddt|(*.ddf) |*.ddf"
|
||||
fd.FilterIndex = 2
|
||||
fd.Filter = "(*.ddf) |*.ddf|(*.ddt) |*.ddt"
|
||||
fd.FilterIndex = GetCurrentFilter()
|
||||
fd.RestoreDirectory = True
|
||||
' apro la finestra di dialogo
|
||||
If fd.ShowDialog() <> System.Windows.Forms.DialogResult.OK Then
|
||||
@@ -706,6 +706,8 @@ Public Class ProjectManagerVM
|
||||
sFilePath = Path.GetDirectoryName(fd.FileName)
|
||||
' salvo il nome completo del file
|
||||
sFilePathComplete = fd.FileName
|
||||
' salvo l'estensione dell'ultimo progetto aperto
|
||||
WriteMainPrivateProfileString("General", "LastExtensionOpened", Path.GetExtension(fd.FileName))
|
||||
' se esiste un file in lettura con questo nome allora blocco tutto
|
||||
If Utility.IsFileLocked(sFilePath, Path.GetFileNameWithoutExtension(sFilePathComplete)) Then
|
||||
If Not IsNothing(Map.refAssemblyManagerVM.CurrProject) AndAlso Not IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) Then
|
||||
@@ -849,6 +851,21 @@ Public Class ProjectManagerVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function GetCurrentFilter() As Integer
|
||||
Dim nFilter As Integer = 1
|
||||
Dim sExt As String = String.Empty
|
||||
GetMainPrivateProfileString("General", "LastExtensionOpened", "ddf", sExt)
|
||||
sExt = sExt.Replace("."c, "")
|
||||
sExt = sExt.Trim
|
||||
Select Case sExt
|
||||
Case = "ddf"
|
||||
nFilter = 1
|
||||
Case = "ddt"
|
||||
nFilter = 2
|
||||
End Select
|
||||
Return nFilter
|
||||
End Function
|
||||
|
||||
#End Region ' OpenCommand
|
||||
|
||||
#Region "OpenMruFileCommand"
|
||||
|
||||
Reference in New Issue
Block a user