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