Merge branch 'v104' of https://github.com/MikeMaximus/gbm into v104

This commit is contained in:
Michael J. Seiferling
2017-09-23 15:21:23 -06:00
5 changed files with 51 additions and 15 deletions
+10
View File
@@ -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
+30 -8
View File
@@ -1044,6 +1044,27 @@ Public Class frmGameManager
VerifyCleanFolder()
End Sub
Private Sub MonitorOnlyModeChange()
If chkMonitorOnly.Checked Then
chkFolderSave.Enabled = False
chkTimeStamp.Enabled = False
lblSavePath.Enabled = False
txtSavePath.Enabled = False
btnSavePathBrowse.Enabled = False
btnInclude.Enabled = False
btnExclude.Enabled = False
Else
chkFolderSave.Enabled = True
chkTimeStamp.Enabled = True
lblSavePath.Enabled = True
txtSavePath.Enabled = True
btnSavePathBrowse.Enabled = True
btnInclude.Enabled = True
btnExclude.Enabled = True
End If
VerifyCleanFolder()
End Sub
Private Sub TimeStampModeChange()
If chkTimeStamp.Checked Then
nudLimit.Visible = True
@@ -1058,7 +1079,7 @@ Public Class frmGameManager
Private Sub VerifyCleanFolder()
If Not bIsLoading Then
If chkFolderSave.Checked = True And txtExclude.Text = String.Empty And txtSavePath.Text <> String.Empty Then
If (chkFolderSave.Checked = True And txtExclude.Text = String.Empty And txtSavePath.Text <> String.Empty) And Not chkMonitorOnly.Checked Then
chkCleanFolder.Enabled = True
Else
chkCleanFolder.Checked = False
@@ -1263,7 +1284,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 +1372,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
@@ -1388,17 +1409,14 @@ Public Class frmGameManager
If lstGames.SelectedItems.Count > 0 Then
RestoreList.Clear()
If lstGames.SelectedItems.Count = 1 Then
RestoreList.Add(CurrentGame, CurrentBackupItem)
Else
For Each oData In lstGames.SelectedItems
If oRemoteBackupData.Contains(oData.Value) Then
oGame = DirectCast(GameData(oData.Key), clsGame)
oBackup = DirectCast(oRemoteBackupData(oData.Value), clsBackup)
RestoreList.Add(oGame, oBackup)
If Not oGame.MonitorOnly Then RestoreList.Add(oGame, oBackup)
End If
Next
End If
If RestoreList.Count = 1 Then
bDoRestore = True
@@ -1729,4 +1747,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
MonitorOnlyModeChange()
End Sub
End Class
+3 -1
View File
@@ -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
+1
View File
@@ -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)
+1
View File
@@ -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)