- aggiunta gestione archiviazione progetti

This commit is contained in:
Emmanuele Sassi
2023-08-25 11:53:04 +02:00
parent 92f347cd7e
commit b7a127c1cd
7 changed files with 157 additions and 181 deletions
@@ -359,6 +359,18 @@ Public MustInherit Class NewOpenProjectFileDialogVM
NotifyPropertyChanged(NameOf(bIsEditNameActive))
End Sub
Private m_bViewArchived As Boolean
Public Property bViewArchived As Boolean
Get
Return m_bViewArchived
End Get
Set(value As Boolean)
m_bViewArchived = value
WriteMainPrivateProfileString(S_OPENFILEDIALOG, K_VIEWARCHIVED, If(bViewArchived, 1, 0))
RefreshProjectList()
End Set
End Property
#Region "Messages"
Public ReadOnly Property Title As String
@@ -418,6 +430,11 @@ Public MustInherit Class NewOpenProjectFileDialogVM
Return EgtMsg(30006)
End Get
End Property
Public ReadOnly Property Archive_Msg As String
Get
Return EgtMsg(61981)
End Get
End Property
Public ReadOnly Property Delete_Msg As String
Get
Return EgtMsg(61823)
@@ -441,11 +458,18 @@ Public MustInherit Class NewOpenProjectFileDialogVM
End Get
End Property
Public ReadOnly Property ViewArchived_Msg As String
Get
Return EgtMsg(61982)
End Get
End Property
#End Region
' Definizione comandi
Private m_cmdProjectDoubleClick As ICommand
Private m_cmdDelete As ICommand
Private m_cmdArchive As ICommand
Private m_cmdModifyName As ICommand
#End Region ' FIELDS & PROPERTIES
@@ -479,6 +503,7 @@ Public MustInherit Class NewOpenProjectFileDialogVM
m_dtEndDate = If(lEndDate > 0, DateTime.FromFileTimeUtc(lEndDate), DateTime.Today)
m_Date_Visibility = Visibility.Visible
End Select
m_bViewArchived = GetMainPrivateProfileInt(S_OPENFILEDIALOG, K_VIEWARCHIVED, 0) <> 0
End Sub
#Region "METHODS"
@@ -603,6 +628,28 @@ Public MustInherit Class NewOpenProjectFileDialogVM
#End Region ' ProjectDoubleClick
#Region "Archive"
''' <summary>
''' Returns a command that do New.
''' </summary>
Public ReadOnly Property Archive_Command As ICommand
Get
If m_cmdArchive Is Nothing Then
m_cmdArchive = New Command(AddressOf Archive)
End If
Return m_cmdArchive
End Get
End Property
''' <summary>
''' Execute the New. This method is invoked by the NewCommand.
''' </summary>
Public Overridable Sub Archive()
End Sub
#End Region ' Archive
#Region "Delete"
''' <summary>
@@ -623,7 +670,7 @@ Public MustInherit Class NewOpenProjectFileDialogVM
Public Overridable Sub Delete()
End Sub
#End Region ' ModifyName
#End Region ' Delete
#Region "ModifyName"
@@ -703,11 +750,20 @@ Public Class ProdItem
End Get
End Property
Sub New(ProdFileVM As ProjectFileVM, ProjFileVM As ProjectFileVM)
Sub New(ProdFileVM As ProdFileVM, ProjFileVM As ProjFileVM)
m_ProdFileVM = ProdFileVM
m_ProjFileList.Add(ProjFileVM)
End Sub
Sub New(ProjFileVM As ProjFileVM)
m_ProjFileList = New List(Of ProjectFileVM)({ProjFileVM})
End Sub
Sub New(ProdFileVM As ProjectFileVM, ProjFileVMList As List(Of ProjectFileVM))
m_ProdFileVM = ProdFileVM
m_ProjFileList = ProjFileVMList
End Sub
End Class
'Public Class ProjItem