Changes for issue #89
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
Private bFolderSave As Boolean
|
||||
Private sFileType As String
|
||||
Private sExcludeList As String
|
||||
Private bMonitorOnly As Boolean
|
||||
Private oTags As List(Of Tag)
|
||||
|
||||
Property Name As String
|
||||
@@ -81,6 +82,15 @@
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property MonitorOnly As Boolean
|
||||
Set(value As Boolean)
|
||||
bMonitorOnly = value
|
||||
End Set
|
||||
Get
|
||||
Return bMonitorOnly
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property Tags As List(Of Tag)
|
||||
Get
|
||||
Return oTags
|
||||
|
||||
@@ -866,6 +866,26 @@ Public Class frmGameManager
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub MonitorOnlyModeHandler()
|
||||
If chkMonitorOnly.Checked Then
|
||||
chkFolderSave.Enabled = False
|
||||
chkCleanFolder.Enabled = False
|
||||
chkTimeStamp.Enabled = False
|
||||
lblSavePath.Enabled = False
|
||||
txtSavePath.Enabled = False
|
||||
btnInclude.Enabled = False
|
||||
btnExclude.Enabled = False
|
||||
Else
|
||||
chkFolderSave.Enabled = True
|
||||
chkCleanFolder.Enabled = True
|
||||
chkTimeStamp.Enabled = True
|
||||
lblSavePath.Enabled = True
|
||||
txtSavePath.Enabled = True
|
||||
btnInclude.Enabled = True
|
||||
btnExclude.Enabled = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ModeChange()
|
||||
IsLoading = True
|
||||
|
||||
@@ -1263,7 +1283,7 @@ Public Class frmGameManager
|
||||
Return False
|
||||
End If
|
||||
|
||||
If chkFolderSave.Checked = False And txtFileType.Text = String.Empty Then
|
||||
If (chkFolderSave.Checked = False And txtFileType.Text = String.Empty) And Not chkMonitorOnly.Checked Then
|
||||
mgrCommon.ShowMessage(frmGameManager_ErrorNoItems, MsgBoxStyle.Exclamation)
|
||||
btnInclude.Focus()
|
||||
Return False
|
||||
@@ -1351,7 +1371,7 @@ Public Class frmGameManager
|
||||
|
||||
For Each oData In lstGames.SelectedItems
|
||||
oGame = DirectCast(GameData(oData.Key), clsGame)
|
||||
BackupList.Add(oGame)
|
||||
If Not oGame.MonitorOnly Then BackupList.Add(oGame)
|
||||
Next
|
||||
|
||||
If BackupList.Count = 1 Then
|
||||
@@ -1729,4 +1749,8 @@ Public Class frmGameManager
|
||||
Private Sub frmGameManager_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
|
||||
txtQuickFilter.Focus()
|
||||
End Sub
|
||||
|
||||
Private Sub chkMonitorOnly_CheckedChanged(sender As Object, e As EventArgs) Handles chkMonitorOnly.CheckedChanged
|
||||
MonitorOnlyModeHandler()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -269,13 +269,15 @@ Public Class mgrCommon
|
||||
End Function
|
||||
|
||||
'Calculate the current size of a folder
|
||||
Public Shared Function GetFolderSize(ByVal sPath As String, ByVal sInclude As String(), ByVal sExclude As String())
|
||||
Public Shared Function GetFolderSize(ByVal sPath As String, ByVal sInclude As String(), ByVal sExclude As String()) As Long
|
||||
Dim oFolder As DirectoryInfo
|
||||
Dim bInclude As Boolean
|
||||
Dim bExclude As Boolean
|
||||
Dim lSize As Long = 0
|
||||
|
||||
Try
|
||||
If Not Directory.Exists(sPath) Then Return lSize
|
||||
|
||||
oFolder = New DirectoryInfo(sPath)
|
||||
|
||||
'Files
|
||||
|
||||
@@ -630,6 +630,7 @@ Public Class mgrMonitorList
|
||||
oGame.FolderSave = CBool(dr("FolderSave"))
|
||||
If Not IsDBNull(dr("FileType")) Then oGame.FileType = CStr(dr("FileType"))
|
||||
If Not IsDBNull(dr("ExcludeList")) Then oGame.ExcludeList = CStr(dr("ExcludeList"))
|
||||
oGame.MonitorOnly = CBool(dr("MonitorOnly"))
|
||||
If Not IsDBNull(dr("Parameter")) Then oGame.Parameter = CStr(dr("Parameter"))
|
||||
oGame.Tags = mgrGameTags.GetTagsByGameForExport(sID)
|
||||
oList.Add(oGame)
|
||||
|
||||
@@ -28,6 +28,7 @@ Public Class mgrXML
|
||||
oGame.FolderSave = g.FolderSave
|
||||
oGame.FileType = g.FileType
|
||||
oGame.ExcludeList = g.ExcludeList
|
||||
oGame.MonitorOnly = g.MonitorOnly
|
||||
oGame.Parameter = g.Parameter
|
||||
For Each t As Tag In g.Tags
|
||||
oGame.ImportTags.Add(t)
|
||||
|
||||
Reference in New Issue
Block a user