Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e82024c29 | ||
|
|
89aa57e6d6 | ||
|
|
44fdc4160e | ||
|
|
b5859d6541 | ||
|
|
d3d6482bfd | ||
|
|
9c8cbad7d5 | ||
|
|
e09e38a5c4 | ||
|
|
f245dee781 | ||
|
|
fd815f0c46 | ||
|
|
708e9ce1fe | ||
|
|
a68d2b718f | ||
|
|
d11f468add | ||
|
|
ef6997a2ab | ||
|
|
9386da4a2a | ||
|
|
d4210053ad | ||
|
|
41d11cca8e | ||
|
|
22df153513 | ||
|
|
2548d0dceb | ||
|
|
4b0d4a62c8 | ||
|
|
11d8e4594c | ||
|
|
7259f92ec1 | ||
|
|
024f17abe9 | ||
|
|
97cf2618e3 | ||
|
|
5fa746da8e | ||
|
|
91b9554f40 | ||
|
|
b5c977e66c | ||
|
|
15c33ca039 | ||
|
|
aa3237d0fa | ||
|
|
1f291bbcd8 | ||
|
|
9cd786c303 | ||
|
|
e701d67d79 | ||
|
|
be8cb66136 | ||
|
|
50563e3be0 |
Vendored
+2
@@ -186,3 +186,5 @@ FakesAssemblies/
|
|||||||
GeneratedArtifacts/
|
GeneratedArtifacts/
|
||||||
_Pvt_Extensions/
|
_Pvt_Extensions/
|
||||||
ModelManifest.xml
|
ModelManifest.xml
|
||||||
|
/.vs/slnx.sqlite
|
||||||
|
/.vs/VSWorkspaceState.json
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
Public Class Game
|
Public Class Game
|
||||||
Private sGameName As String
|
Private sGameName As String
|
||||||
Private sProcessName As String
|
Private sProcessName As String
|
||||||
|
Private sParameter As String
|
||||||
Private sPath As String
|
Private sPath As String
|
||||||
Private bAbsolutePath As Boolean
|
Private bAbsolutePath As Boolean
|
||||||
Private bFolderSave As Boolean
|
Private bFolderSave As Boolean
|
||||||
@@ -26,6 +27,15 @@
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Property Parameter As String
|
||||||
|
Set(value As String)
|
||||||
|
sParameter = value
|
||||||
|
End Set
|
||||||
|
Get
|
||||||
|
Return sParameter
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Property Path As String
|
Property Path As String
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
sPath = value
|
sPath = value
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
Private sGameID As String = Guid.NewGuid.ToString
|
Private sGameID As String = Guid.NewGuid.ToString
|
||||||
Private sGameName As String = String.Empty
|
Private sGameName As String = String.Empty
|
||||||
Private sProcessName As String = String.Empty
|
Private sProcessName As String = String.Empty
|
||||||
|
Private sParameter As String = String.Empty
|
||||||
Private sPath As String = String.Empty
|
Private sPath As String = String.Empty
|
||||||
Private bAbsolutePath As Boolean = False
|
Private bAbsolutePath As Boolean = False
|
||||||
Private bFolderSave As Boolean = False
|
Private bFolderSave As Boolean = False
|
||||||
@@ -74,6 +75,15 @@
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Property Parameter As String
|
||||||
|
Set(value As String)
|
||||||
|
sParameter = value
|
||||||
|
End Set
|
||||||
|
Get
|
||||||
|
Return sParameter
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Property Path As String
|
Property Path As String
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
sPath = mgrPath.ReverseSpecialPaths(value)
|
sPath = mgrPath.ReverseSpecialPaths(value)
|
||||||
@@ -248,6 +258,26 @@
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
ReadOnly Property IncludeArray As String()
|
||||||
|
Get
|
||||||
|
If FileType = String.Empty Then
|
||||||
|
Return New String() {}
|
||||||
|
Else
|
||||||
|
Return FileType.Split(":")
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
ReadOnly Property ExcludeArray As String()
|
||||||
|
Get
|
||||||
|
If ExcludeList = String.Empty Then
|
||||||
|
Return New String() {}
|
||||||
|
Else
|
||||||
|
Return ExcludeList.Split(":")
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Public Function SyncEquals(obj As Object, eSyncFields As eOptionalSyncFields) As Boolean
|
Public Function SyncEquals(obj As Object, eSyncFields As eOptionalSyncFields) As Boolean
|
||||||
Dim oGame As clsGame = TryCast(obj, clsGame)
|
Dim oGame As clsGame = TryCast(obj, clsGame)
|
||||||
If oGame Is Nothing Then
|
If oGame Is Nothing Then
|
||||||
@@ -263,6 +293,9 @@
|
|||||||
If ProcessName <> oGame.ProcessName Then
|
If ProcessName <> oGame.ProcessName Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
If Parameter <> oGame.Parameter Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
If Path <> oGame.Path Then
|
If Path <> oGame.Path Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
Public Class clsSavedPath
|
||||||
|
Private sPathName As String = String.Empty
|
||||||
|
Private sPath As String = String.Empty
|
||||||
|
|
||||||
|
Property PathName As String
|
||||||
|
Get
|
||||||
|
Return sPathName
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
sPathName = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Property Path As String
|
||||||
|
Get
|
||||||
|
Return sPath
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
sPath = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
End Class
|
||||||
@@ -425,8 +425,8 @@ Public Class frmAddWizard
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
sNewPath = mgrCommon.OpenFileBrowser(frmAddWizard_ChooseProcess, "exe",
|
sNewPath = mgrCommon.OpenFileBrowser("Wizard_Process_Path", frmAddWizard_ChooseProcess, "exe",
|
||||||
frmAddWizard_Executable, sDefaultFolder, False)
|
frmAddWizard_Executable, sDefaultFolder, False, False)
|
||||||
|
|
||||||
If sNewPath <> String.Empty Then txtProcessPath.Text = sNewPath
|
If sNewPath <> String.Empty Then txtProcessPath.Text = sNewPath
|
||||||
End Sub
|
End Sub
|
||||||
@@ -442,7 +442,7 @@ Public Class frmAddWizard
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
sNewPath = mgrCommon.OpenFolderBrowser(frmAddWizard_ChooseSavePath, sDefaultFolder, False)
|
sNewPath = mgrCommon.OpenFolderBrowser("Wizard_Save_Path", frmAddWizard_ChooseSavePath, sDefaultFolder, False, False)
|
||||||
|
|
||||||
If sNewPath <> String.Empty Then txtSavePath.Text = sNewPath
|
If sNewPath <> String.Empty Then txtSavePath.Text = sNewPath
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
Generated
+33
-11
@@ -28,6 +28,8 @@ Partial Class frmGameManager
|
|||||||
Me.btnBackup = New System.Windows.Forms.Button()
|
Me.btnBackup = New System.Windows.Forms.Button()
|
||||||
Me.btnClose = New System.Windows.Forms.Button()
|
Me.btnClose = New System.Windows.Forms.Button()
|
||||||
Me.grpConfig = New System.Windows.Forms.GroupBox()
|
Me.grpConfig = New System.Windows.Forms.GroupBox()
|
||||||
|
Me.txtParameter = New System.Windows.Forms.TextBox()
|
||||||
|
Me.lblParameter = New System.Windows.Forms.Label()
|
||||||
Me.chkCleanFolder = New System.Windows.Forms.CheckBox()
|
Me.chkCleanFolder = New System.Windows.Forms.CheckBox()
|
||||||
Me.lblLimit = New System.Windows.Forms.Label()
|
Me.lblLimit = New System.Windows.Forms.Label()
|
||||||
Me.nudLimit = New System.Windows.Forms.NumericUpDown()
|
Me.nudLimit = New System.Windows.Forms.NumericUpDown()
|
||||||
@@ -152,6 +154,8 @@ Partial Class frmGameManager
|
|||||||
'grpConfig
|
'grpConfig
|
||||||
'
|
'
|
||||||
Me.grpConfig.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
Me.grpConfig.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||||
|
Me.grpConfig.Controls.Add(Me.txtParameter)
|
||||||
|
Me.grpConfig.Controls.Add(Me.lblParameter)
|
||||||
Me.grpConfig.Controls.Add(Me.chkCleanFolder)
|
Me.grpConfig.Controls.Add(Me.chkCleanFolder)
|
||||||
Me.grpConfig.Controls.Add(Me.lblLimit)
|
Me.grpConfig.Controls.Add(Me.lblLimit)
|
||||||
Me.grpConfig.Controls.Add(Me.nudLimit)
|
Me.grpConfig.Controls.Add(Me.nudLimit)
|
||||||
@@ -178,13 +182,29 @@ Partial Class frmGameManager
|
|||||||
Me.grpConfig.TabStop = False
|
Me.grpConfig.TabStop = False
|
||||||
Me.grpConfig.Text = "Configuration"
|
Me.grpConfig.Text = "Configuration"
|
||||||
'
|
'
|
||||||
|
'txtParameter
|
||||||
|
'
|
||||||
|
Me.txtParameter.Location = New System.Drawing.Point(333, 45)
|
||||||
|
Me.txtParameter.Name = "txtParameter"
|
||||||
|
Me.txtParameter.Size = New System.Drawing.Size(150, 20)
|
||||||
|
Me.txtParameter.TabIndex = 7
|
||||||
|
'
|
||||||
|
'lblParameter
|
||||||
|
'
|
||||||
|
Me.lblParameter.AutoSize = True
|
||||||
|
Me.lblParameter.Location = New System.Drawing.Point(269, 48)
|
||||||
|
Me.lblParameter.Name = "lblParameter"
|
||||||
|
Me.lblParameter.Size = New System.Drawing.Size(58, 13)
|
||||||
|
Me.lblParameter.TabIndex = 6
|
||||||
|
Me.lblParameter.Text = "Parameter:"
|
||||||
|
'
|
||||||
'chkCleanFolder
|
'chkCleanFolder
|
||||||
'
|
'
|
||||||
Me.chkCleanFolder.AutoSize = True
|
Me.chkCleanFolder.AutoSize = True
|
||||||
Me.chkCleanFolder.Location = New System.Drawing.Point(329, 101)
|
Me.chkCleanFolder.Location = New System.Drawing.Point(329, 101)
|
||||||
Me.chkCleanFolder.Name = "chkCleanFolder"
|
Me.chkCleanFolder.Name = "chkCleanFolder"
|
||||||
Me.chkCleanFolder.Size = New System.Drawing.Size(136, 17)
|
Me.chkCleanFolder.Size = New System.Drawing.Size(136, 17)
|
||||||
Me.chkCleanFolder.TabIndex = 11
|
Me.chkCleanFolder.TabIndex = 13
|
||||||
Me.chkCleanFolder.Text = "Delete folder on restore"
|
Me.chkCleanFolder.Text = "Delete folder on restore"
|
||||||
Me.chkCleanFolder.UseVisualStyleBackColor = True
|
Me.chkCleanFolder.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
@@ -194,7 +214,7 @@ Partial Class frmGameManager
|
|||||||
Me.lblLimit.Location = New System.Drawing.Point(375, 130)
|
Me.lblLimit.Location = New System.Drawing.Point(375, 130)
|
||||||
Me.lblLimit.Name = "lblLimit"
|
Me.lblLimit.Name = "lblLimit"
|
||||||
Me.lblLimit.Size = New System.Drawing.Size(68, 13)
|
Me.lblLimit.Size = New System.Drawing.Size(68, 13)
|
||||||
Me.lblLimit.TabIndex = 14
|
Me.lblLimit.TabIndex = 16
|
||||||
Me.lblLimit.Text = "Backup Limit"
|
Me.lblLimit.Text = "Backup Limit"
|
||||||
Me.lblLimit.Visible = False
|
Me.lblLimit.Visible = False
|
||||||
'
|
'
|
||||||
@@ -204,7 +224,7 @@ Partial Class frmGameManager
|
|||||||
Me.nudLimit.Minimum = New Decimal(New Integer() {2, 0, 0, 0})
|
Me.nudLimit.Minimum = New Decimal(New Integer() {2, 0, 0, 0})
|
||||||
Me.nudLimit.Name = "nudLimit"
|
Me.nudLimit.Name = "nudLimit"
|
||||||
Me.nudLimit.Size = New System.Drawing.Size(40, 20)
|
Me.nudLimit.Size = New System.Drawing.Size(40, 20)
|
||||||
Me.nudLimit.TabIndex = 13
|
Me.nudLimit.TabIndex = 15
|
||||||
Me.nudLimit.Value = New Decimal(New Integer() {2, 0, 0, 0})
|
Me.nudLimit.Value = New Decimal(New Integer() {2, 0, 0, 0})
|
||||||
Me.nudLimit.Visible = False
|
Me.nudLimit.Visible = False
|
||||||
'
|
'
|
||||||
@@ -213,7 +233,7 @@ Partial Class frmGameManager
|
|||||||
Me.btnExclude.Location = New System.Drawing.Point(9, 125)
|
Me.btnExclude.Location = New System.Drawing.Point(9, 125)
|
||||||
Me.btnExclude.Name = "btnExclude"
|
Me.btnExclude.Name = "btnExclude"
|
||||||
Me.btnExclude.Size = New System.Drawing.Size(175, 23)
|
Me.btnExclude.Size = New System.Drawing.Size(175, 23)
|
||||||
Me.btnExclude.TabIndex = 9
|
Me.btnExclude.TabIndex = 11
|
||||||
Me.btnExclude.Text = "E&xclude Items..."
|
Me.btnExclude.Text = "E&xclude Items..."
|
||||||
Me.btnExclude.UseVisualStyleBackColor = True
|
Me.btnExclude.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
@@ -222,7 +242,7 @@ Partial Class frmGameManager
|
|||||||
Me.btnInclude.Location = New System.Drawing.Point(9, 97)
|
Me.btnInclude.Location = New System.Drawing.Point(9, 97)
|
||||||
Me.btnInclude.Name = "btnInclude"
|
Me.btnInclude.Name = "btnInclude"
|
||||||
Me.btnInclude.Size = New System.Drawing.Size(175, 23)
|
Me.btnInclude.Size = New System.Drawing.Size(175, 23)
|
||||||
Me.btnInclude.TabIndex = 8
|
Me.btnInclude.TabIndex = 10
|
||||||
Me.btnInclude.Text = "In&clude Items..."
|
Me.btnInclude.Text = "In&clude Items..."
|
||||||
Me.btnInclude.UseVisualStyleBackColor = True
|
Me.btnInclude.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
@@ -241,13 +261,13 @@ Partial Class frmGameManager
|
|||||||
Me.btnSavePathBrowse.Location = New System.Drawing.Point(489, 71)
|
Me.btnSavePathBrowse.Location = New System.Drawing.Point(489, 71)
|
||||||
Me.btnSavePathBrowse.Name = "btnSavePathBrowse"
|
Me.btnSavePathBrowse.Name = "btnSavePathBrowse"
|
||||||
Me.btnSavePathBrowse.Size = New System.Drawing.Size(30, 20)
|
Me.btnSavePathBrowse.Size = New System.Drawing.Size(30, 20)
|
||||||
Me.btnSavePathBrowse.TabIndex = 7
|
Me.btnSavePathBrowse.TabIndex = 9
|
||||||
Me.btnSavePathBrowse.Text = "..."
|
Me.btnSavePathBrowse.Text = "..."
|
||||||
Me.btnSavePathBrowse.UseVisualStyleBackColor = True
|
Me.btnSavePathBrowse.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
'btnProcessBrowse
|
'btnProcessBrowse
|
||||||
'
|
'
|
||||||
Me.btnProcessBrowse.Location = New System.Drawing.Point(489, 45)
|
Me.btnProcessBrowse.Location = New System.Drawing.Point(225, 44)
|
||||||
Me.btnProcessBrowse.Name = "btnProcessBrowse"
|
Me.btnProcessBrowse.Name = "btnProcessBrowse"
|
||||||
Me.btnProcessBrowse.Size = New System.Drawing.Size(30, 20)
|
Me.btnProcessBrowse.Size = New System.Drawing.Size(30, 20)
|
||||||
Me.btnProcessBrowse.TabIndex = 5
|
Me.btnProcessBrowse.TabIndex = 5
|
||||||
@@ -305,7 +325,7 @@ Partial Class frmGameManager
|
|||||||
Me.chkTimeStamp.Location = New System.Drawing.Point(190, 129)
|
Me.chkTimeStamp.Location = New System.Drawing.Point(190, 129)
|
||||||
Me.chkTimeStamp.Name = "chkTimeStamp"
|
Me.chkTimeStamp.Name = "chkTimeStamp"
|
||||||
Me.chkTimeStamp.Size = New System.Drawing.Size(133, 17)
|
Me.chkTimeStamp.Size = New System.Drawing.Size(133, 17)
|
||||||
Me.chkTimeStamp.TabIndex = 12
|
Me.chkTimeStamp.TabIndex = 14
|
||||||
Me.chkTimeStamp.Text = "Save multiple backups"
|
Me.chkTimeStamp.Text = "Save multiple backups"
|
||||||
Me.chkTimeStamp.UseVisualStyleBackColor = True
|
Me.chkTimeStamp.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
@@ -315,7 +335,7 @@ Partial Class frmGameManager
|
|||||||
Me.chkFolderSave.Location = New System.Drawing.Point(190, 101)
|
Me.chkFolderSave.Location = New System.Drawing.Point(190, 101)
|
||||||
Me.chkFolderSave.Name = "chkFolderSave"
|
Me.chkFolderSave.Name = "chkFolderSave"
|
||||||
Me.chkFolderSave.Size = New System.Drawing.Size(109, 17)
|
Me.chkFolderSave.Size = New System.Drawing.Size(109, 17)
|
||||||
Me.chkFolderSave.TabIndex = 10
|
Me.chkFolderSave.TabIndex = 12
|
||||||
Me.chkFolderSave.Text = "Save entire folder"
|
Me.chkFolderSave.Text = "Save entire folder"
|
||||||
Me.chkFolderSave.UseVisualStyleBackColor = True
|
Me.chkFolderSave.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
@@ -324,13 +344,13 @@ Partial Class frmGameManager
|
|||||||
Me.txtSavePath.Location = New System.Drawing.Point(69, 71)
|
Me.txtSavePath.Location = New System.Drawing.Point(69, 71)
|
||||||
Me.txtSavePath.Name = "txtSavePath"
|
Me.txtSavePath.Name = "txtSavePath"
|
||||||
Me.txtSavePath.Size = New System.Drawing.Size(414, 20)
|
Me.txtSavePath.Size = New System.Drawing.Size(414, 20)
|
||||||
Me.txtSavePath.TabIndex = 6
|
Me.txtSavePath.TabIndex = 8
|
||||||
'
|
'
|
||||||
'txtProcess
|
'txtProcess
|
||||||
'
|
'
|
||||||
Me.txtProcess.Location = New System.Drawing.Point(69, 45)
|
Me.txtProcess.Location = New System.Drawing.Point(69, 45)
|
||||||
Me.txtProcess.Name = "txtProcess"
|
Me.txtProcess.Name = "txtProcess"
|
||||||
Me.txtProcess.Size = New System.Drawing.Size(414, 20)
|
Me.txtProcess.Size = New System.Drawing.Size(150, 20)
|
||||||
Me.txtProcess.TabIndex = 4
|
Me.txtProcess.TabIndex = 4
|
||||||
'
|
'
|
||||||
'txtName
|
'txtName
|
||||||
@@ -941,4 +961,6 @@ Partial Class frmGameManager
|
|||||||
Friend WithEvents cmsDeleteOne As ToolStripMenuItem
|
Friend WithEvents cmsDeleteOne As ToolStripMenuItem
|
||||||
Friend WithEvents cmsDeleteAll As ToolStripMenuItem
|
Friend WithEvents cmsDeleteAll As ToolStripMenuItem
|
||||||
Friend WithEvents chkCleanFolder As CheckBox
|
Friend WithEvents chkCleanFolder As CheckBox
|
||||||
|
Friend WithEvents txtParameter As TextBox
|
||||||
|
Friend WithEvents lblParameter As Label
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
+94
-20
@@ -7,6 +7,7 @@ Public Class frmGameManager
|
|||||||
Private bPendingRestores As Boolean = False
|
Private bPendingRestores As Boolean = False
|
||||||
Private oCurrentBackupItem As clsBackup
|
Private oCurrentBackupItem As clsBackup
|
||||||
Private oCurrentGame As clsGame
|
Private oCurrentGame As clsGame
|
||||||
|
Private oTagsToSave As New List(Of KeyValuePair(Of String, String))
|
||||||
Private bDisableExternalFunctions As Boolean = False
|
Private bDisableExternalFunctions As Boolean = False
|
||||||
Private bTriggerBackup As Boolean = False
|
Private bTriggerBackup As Boolean = False
|
||||||
Private bTriggerRestore As Boolean = False
|
Private bTriggerRestore As Boolean = False
|
||||||
@@ -287,8 +288,8 @@ Public Class frmGameManager
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
sNewPath = mgrCommon.OpenFileBrowser(frmGameManager_ChooseExe, "exe",
|
sNewPath = mgrCommon.OpenFileBrowser("GM_Process", frmGameManager_ChooseExe, "exe",
|
||||||
frmGameManager_Executable, sDefaultFolder, False)
|
frmGameManager_Executable, sDefaultFolder, False, False)
|
||||||
|
|
||||||
If sNewPath <> String.Empty Then
|
If sNewPath <> String.Empty Then
|
||||||
txtAppPath.Text = Path.GetDirectoryName(sNewPath)
|
txtAppPath.Text = Path.GetDirectoryName(sNewPath)
|
||||||
@@ -308,7 +309,7 @@ Public Class frmGameManager
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
sNewPath = mgrCommon.OpenFolderBrowser(frmGameManager_ChooseExePath, sDefaultFolder, False)
|
sNewPath = mgrCommon.OpenFolderBrowser("GM_Process_Path", frmGameManager_ChooseExePath, sDefaultFolder, False, False)
|
||||||
|
|
||||||
If sNewPath <> String.Empty Then txtAppPath.Text = sNewPath
|
If sNewPath <> String.Empty Then txtAppPath.Text = sNewPath
|
||||||
End Sub
|
End Sub
|
||||||
@@ -324,7 +325,7 @@ Public Class frmGameManager
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
sNewPath = mgrCommon.OpenFolderBrowser(frmGameManager_ChooseSaveFolder, sDefaultFolder, False)
|
sNewPath = mgrCommon.OpenFolderBrowser("GM_Save_Path", frmGameManager_ChooseSaveFolder, sDefaultFolder, False, False)
|
||||||
|
|
||||||
If sNewPath <> String.Empty Then
|
If sNewPath <> String.Empty Then
|
||||||
txtSavePath.Text = sNewPath
|
txtSavePath.Text = sNewPath
|
||||||
@@ -345,11 +346,11 @@ Public Class frmGameManager
|
|||||||
|
|
||||||
'Unix Handler
|
'Unix Handler
|
||||||
If Not mgrCommon.IsUnix Then
|
If Not mgrCommon.IsUnix Then
|
||||||
sNewPath = mgrCommon.OpenFileBrowser(frmGameManager_ChooseCustomIcon, "ico",
|
sNewPath = mgrCommon.OpenFileBrowser("GM_Icon", frmGameManager_ChooseCustomIcon, "ico",
|
||||||
frmGameManager_Icon, sDefaultFolder, False)
|
frmGameManager_Icon, sDefaultFolder, False, False)
|
||||||
Else
|
Else
|
||||||
sNewPath = mgrCommon.OpenFileBrowser(frmGameManager_ChooseCustomIcon, "png",
|
sNewPath = mgrCommon.OpenFileBrowser("GM_Icon", frmGameManager_ChooseCustomIcon, "png",
|
||||||
"PNG", sDefaultFolder, False)
|
"PNG", sDefaultFolder, False, False)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If sNewPath <> String.Empty Then
|
If sNewPath <> String.Empty Then
|
||||||
@@ -402,9 +403,19 @@ Public Class frmGameManager
|
|||||||
oList.Sort(AddressOf mgrCommon.CompareByListBoxItemByValue)
|
oList.Sort(AddressOf mgrCommon.CompareByListBoxItemByValue)
|
||||||
|
|
||||||
lstGames.BeginUpdate()
|
lstGames.BeginUpdate()
|
||||||
lstGames.DataSource = oList
|
|
||||||
lstGames.ValueMember = "Key"
|
lstGames.ValueMember = "Key"
|
||||||
lstGames.DisplayMember = "Value"
|
lstGames.DisplayMember = "Value"
|
||||||
|
|
||||||
|
'Due to a control bug with Mono we need to fill the list box differently on Linux
|
||||||
|
If mgrCommon.IsUnix Then
|
||||||
|
lstGames.Items.Clear()
|
||||||
|
For Each kp As KeyValuePair(Of String, String) In oList
|
||||||
|
lstGames.Items.Add(kp)
|
||||||
|
Next
|
||||||
|
Else
|
||||||
|
lstGames.DataSource = oList
|
||||||
|
End If
|
||||||
|
|
||||||
lstGames.EndUpdate()
|
lstGames.EndUpdate()
|
||||||
lstGames.ClearSelected()
|
lstGames.ClearSelected()
|
||||||
IsLoading = False
|
IsLoading = False
|
||||||
@@ -526,17 +537,30 @@ Public Class frmGameManager
|
|||||||
Dim oApp As clsGame
|
Dim oApp As clsGame
|
||||||
Dim sMonitorIDs As New List(Of String)
|
Dim sMonitorIDs As New List(Of String)
|
||||||
|
|
||||||
|
If eCurrentMode = eModes.Add Then
|
||||||
|
'Use a dummy ID
|
||||||
|
sMonitorIDs.Add(Guid.NewGuid.ToString)
|
||||||
|
frm.GameName = txtName.Text
|
||||||
|
frm.NewMode = True
|
||||||
|
frm.TagList = oTagsToSave
|
||||||
|
Else
|
||||||
For Each oData In lstGames.SelectedItems
|
For Each oData In lstGames.SelectedItems
|
||||||
oApp = DirectCast(AppData(oData.Key), clsGame)
|
oApp = DirectCast(AppData(oData.Key), clsGame)
|
||||||
sMonitorIDs.Add(oApp.ID)
|
sMonitorIDs.Add(oApp.ID)
|
||||||
Next
|
Next
|
||||||
|
frm.GameName = CurrentGame.Name
|
||||||
|
frm.NewMode = False
|
||||||
|
End If
|
||||||
|
|
||||||
frm.IDList = sMonitorIDs
|
frm.IDList = sMonitorIDs
|
||||||
frm.GameName = CurrentGame.Name
|
|
||||||
frm.ShowDialog()
|
frm.ShowDialog()
|
||||||
|
|
||||||
|
If eCurrentMode = eModes.Add Then
|
||||||
|
oTagsToSave = frm.TagList
|
||||||
|
FillTagsbyList(frm.TagList)
|
||||||
|
Else
|
||||||
'Only update visible tags if one item is selected
|
'Only update visible tags if one item is selected
|
||||||
If lstGames.SelectedItems.Count = 1 Then FillTags(CurrentGame.ID)
|
If lstGames.SelectedItems.Count = 1 Then FillTagsbyID(CurrentGame.ID)
|
||||||
|
|
||||||
'If a tag filter is enabled, reload list to reflect changes
|
'If a tag filter is enabled, reload list to reflect changes
|
||||||
If optCustom.Checked Then
|
If optCustom.Checked Then
|
||||||
@@ -546,6 +570,8 @@ Public Class frmGameManager
|
|||||||
'If the selected game(s) no longer match the filter, disable the form
|
'If the selected game(s) no longer match the filter, disable the form
|
||||||
If lstGames.SelectedIndex = -1 Then eCurrentMode = eModes.Disabled
|
If lstGames.SelectedIndex = -1 Then eCurrentMode = eModes.Disabled
|
||||||
ModeChange()
|
ModeChange()
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub UpdateBackupInfo(ByVal sManifestID As String)
|
Private Sub UpdateBackupInfo(ByVal sManifestID As String)
|
||||||
@@ -557,7 +583,7 @@ Public Class frmGameManager
|
|||||||
sFileName = BackupFolder & CurrentBackupItem.FileName
|
sFileName = BackupFolder & CurrentBackupItem.FileName
|
||||||
|
|
||||||
If File.Exists(sFileName) Then
|
If File.Exists(sFileName) Then
|
||||||
lblBackupFileData.Text = Path.GetFileName(CurrentBackupItem.FileName) & " (" & mgrCommon.GetFileSize(sFileName) & ")"
|
lblBackupFileData.Text = Path.GetFileName(CurrentBackupItem.FileName) & " (" & mgrCommon.FormatDiskSpace(mgrCommon.GetFileSize(sFileName)) & ")"
|
||||||
Else
|
Else
|
||||||
lblBackupFileData.Text = frmGameManager_ErrorNoBackupExists
|
lblBackupFileData.Text = frmGameManager_ErrorNoBackupExists
|
||||||
End If
|
End If
|
||||||
@@ -599,7 +625,7 @@ Public Class frmGameManager
|
|||||||
btnDeleteBackup.Enabled = True
|
btnDeleteBackup.Enabled = True
|
||||||
|
|
||||||
If File.Exists(sFileName) Then
|
If File.Exists(sFileName) Then
|
||||||
lblBackupFileData.Text = Path.GetFileName(CurrentBackupItem.FileName) & " (" & mgrCommon.GetFileSize(sFileName) & ")"
|
lblBackupFileData.Text = Path.GetFileName(CurrentBackupItem.FileName) & " (" & mgrCommon.FormatDiskSpace(mgrCommon.GetFileSize(sFileName)) & ")"
|
||||||
Else
|
Else
|
||||||
lblBackupFileData.Text = frmGameManager_ErrorNoBackupExists
|
lblBackupFileData.Text = frmGameManager_ErrorNoBackupExists
|
||||||
End If
|
End If
|
||||||
@@ -711,6 +737,7 @@ Public Class frmGameManager
|
|||||||
txtID.Text = oApp.ID
|
txtID.Text = oApp.ID
|
||||||
txtName.Text = oApp.Name
|
txtName.Text = oApp.Name
|
||||||
txtProcess.Text = oApp.TrueProcess
|
txtProcess.Text = oApp.TrueProcess
|
||||||
|
txtParameter.Text = oApp.Parameter
|
||||||
txtSavePath.Text = oApp.Path
|
txtSavePath.Text = oApp.Path
|
||||||
txtFileType.Text = oApp.FileType
|
txtFileType.Text = oApp.FileType
|
||||||
txtExclude.Text = oApp.ExcludeList
|
txtExclude.Text = oApp.ExcludeList
|
||||||
@@ -731,7 +758,7 @@ Public Class frmGameManager
|
|||||||
txtVersion.Text = oApp.Version
|
txtVersion.Text = oApp.Version
|
||||||
txtIcon.Text = oApp.Icon
|
txtIcon.Text = oApp.Icon
|
||||||
|
|
||||||
FillTags(oData.Key)
|
FillTagsbyID(oData.Key)
|
||||||
|
|
||||||
'Icon
|
'Icon
|
||||||
If IO.File.Exists(oApp.Icon) Then
|
If IO.File.Exists(oApp.Icon) Then
|
||||||
@@ -756,7 +783,7 @@ Public Class frmGameManager
|
|||||||
IsLoading = False
|
IsLoading = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub FillTags(ByVal sID As String)
|
Private Sub FillTagsbyID(ByVal sID As String)
|
||||||
Dim hshTags As Hashtable
|
Dim hshTags As Hashtable
|
||||||
Dim oTag As clsTag
|
Dim oTag As clsTag
|
||||||
Dim sTags As String = String.Empty
|
Dim sTags As String = String.Empty
|
||||||
@@ -772,6 +799,17 @@ Public Class frmGameManager
|
|||||||
lblTags.Text = sTags.TrimEnd(cTrim)
|
lblTags.Text = sTags.TrimEnd(cTrim)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub FillTagsbyList(ByVal oList As List(Of KeyValuePair(Of String, String)))
|
||||||
|
Dim sTags As String = String.Empty
|
||||||
|
Dim cTrim() As Char = {",", " "}
|
||||||
|
|
||||||
|
For Each kp As KeyValuePair(Of String, String) In oList
|
||||||
|
sTags &= "#" & kp.Value & ", "
|
||||||
|
Next
|
||||||
|
|
||||||
|
lblTags.Text = sTags.TrimEnd(cTrim)
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub DirtyCheck_ValueChanged(sender As Object, e As EventArgs)
|
Private Sub DirtyCheck_ValueChanged(sender As Object, e As EventArgs)
|
||||||
If Not IsLoading And Not eCurrentMode = eModes.MultiSelect Then
|
If Not IsLoading And Not eCurrentMode = eModes.MultiSelect Then
|
||||||
IsDirty = True
|
IsDirty = True
|
||||||
@@ -817,6 +855,7 @@ Public Class frmGameManager
|
|||||||
|
|
||||||
Select Case eCurrentMode
|
Select Case eCurrentMode
|
||||||
Case eModes.Add
|
Case eModes.Add
|
||||||
|
oTagsToSave.Clear()
|
||||||
grpFilter.Enabled = False
|
grpFilter.Enabled = False
|
||||||
lstGames.Enabled = False
|
lstGames.Enabled = False
|
||||||
lblQuickFilter.Enabled = False
|
lblQuickFilter.Enabled = False
|
||||||
@@ -844,8 +883,9 @@ Public Class frmGameManager
|
|||||||
btnOpenRestorePath.Enabled = False
|
btnOpenRestorePath.Enabled = False
|
||||||
chkEnabled.Checked = True
|
chkEnabled.Checked = True
|
||||||
chkMonitorOnly.Checked = False
|
chkMonitorOnly.Checked = False
|
||||||
btnTags.Enabled = False
|
btnTags.Enabled = True
|
||||||
lblTags.Visible = False
|
lblTags.Text = String.Empty
|
||||||
|
lblTags.Visible = True
|
||||||
btnInclude.Text = frmGameManager_btnInclude
|
btnInclude.Text = frmGameManager_btnInclude
|
||||||
btnExclude.Text = frmGameManager_btnExclude
|
btnExclude.Text = frmGameManager_btnExclude
|
||||||
btnImport.Enabled = False
|
btnImport.Enabled = False
|
||||||
@@ -1053,6 +1093,22 @@ Public Class frmGameManager
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SaveTags(ByVal sID As String)
|
||||||
|
Dim oGameTag As clsGameTag
|
||||||
|
Dim oGameTags As List(Of clsGameTag)
|
||||||
|
|
||||||
|
If oTagsToSave.Count > 0 Then
|
||||||
|
oGameTags = New List(Of clsGameTag)
|
||||||
|
For Each kp As KeyValuePair(Of String, String) In oTagsToSave
|
||||||
|
oGameTag = New clsGameTag
|
||||||
|
oGameTag.MonitorID = sID
|
||||||
|
oGameTag.TagID = kp.Key
|
||||||
|
oGameTags.Add(oGameTag)
|
||||||
|
Next
|
||||||
|
mgrGameTags.DoGameTagAddBatch(oGameTags)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub SaveApp()
|
Private Sub SaveApp()
|
||||||
Dim oData As KeyValuePair(Of String, String)
|
Dim oData As KeyValuePair(Of String, String)
|
||||||
Dim oApp As New clsGame
|
Dim oApp As New clsGame
|
||||||
@@ -1071,6 +1127,7 @@ Public Class frmGameManager
|
|||||||
Else
|
Else
|
||||||
oApp.ProcessName = txtProcess.Text
|
oApp.ProcessName = txtProcess.Text
|
||||||
End If
|
End If
|
||||||
|
oApp.Parameter = txtParameter.Text
|
||||||
oApp.Path = txtSavePath.Text
|
oApp.Path = txtSavePath.Text
|
||||||
'Only do a simple root check here in case the user doesn't really understand creating a proper configuration
|
'Only do a simple root check here in case the user doesn't really understand creating a proper configuration
|
||||||
oApp.AbsolutePath = Path.IsPathRooted(txtSavePath.Text)
|
oApp.AbsolutePath = Path.IsPathRooted(txtSavePath.Text)
|
||||||
@@ -1093,6 +1150,7 @@ Public Class frmGameManager
|
|||||||
If CoreValidatation(oApp) Then
|
If CoreValidatation(oApp) Then
|
||||||
bSuccess = True
|
bSuccess = True
|
||||||
mgrMonitorList.DoListAdd(oApp)
|
mgrMonitorList.DoListAdd(oApp)
|
||||||
|
SaveTags(oApp.ID)
|
||||||
eCurrentMode = eModes.View
|
eCurrentMode = eModes.View
|
||||||
End If
|
End If
|
||||||
Case eModes.Edit
|
Case eModes.Edit
|
||||||
@@ -1118,8 +1176,16 @@ Public Class frmGameManager
|
|||||||
If bSuccess Then
|
If bSuccess Then
|
||||||
IsDirty = False
|
IsDirty = False
|
||||||
LoadData()
|
LoadData()
|
||||||
|
If eCurrentMode = eModes.View Then
|
||||||
|
lstGames.SelectedItem = New KeyValuePair(Of String, String)(oApp.ID, oApp.Name)
|
||||||
|
Else
|
||||||
ModeChange()
|
ModeChange()
|
||||||
If eCurrentMode = eModes.View Then lstGames.SelectedValue = oApp.ID
|
End If
|
||||||
|
'If the addition doesn't match the current filter we should go into disabled mode as it can't be selected to view
|
||||||
|
If lstGames.SelectedIndex = -1 Then
|
||||||
|
eCurrentMode = eModes.Disabled
|
||||||
|
ModeChange()
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1193,6 +1259,13 @@ Public Class frmGameManager
|
|||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If oApp.Parameter <> String.Empty Then
|
||||||
|
If mgrMonitorList.DoDuplicateParameterCheck(oApp.ProcessName, oApp.Parameter, , oApp.ID) Then
|
||||||
|
mgrCommon.ShowMessage(frmGameManager_ErrorProcessParameterDupe, MsgBoxStyle.Exclamation)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -1346,7 +1419,7 @@ Public Class frmGameManager
|
|||||||
Private Sub ImportGameListFile()
|
Private Sub ImportGameListFile()
|
||||||
Dim sLocation As String
|
Dim sLocation As String
|
||||||
|
|
||||||
sLocation = mgrCommon.OpenFileBrowser(frmGameManager_ChooseImportXML, "xml", frmGameManager_XML, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), False)
|
sLocation = mgrCommon.OpenFileBrowser("XML_Import", frmGameManager_ChooseImportXML, "xml", frmGameManager_XML, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), False)
|
||||||
|
|
||||||
If sLocation <> String.Empty Then
|
If sLocation <> String.Empty Then
|
||||||
If mgrMonitorList.DoImport(sLocation) Then
|
If mgrMonitorList.DoImport(sLocation) Then
|
||||||
@@ -1359,7 +1432,7 @@ Public Class frmGameManager
|
|||||||
Private Sub ExportGameList()
|
Private Sub ExportGameList()
|
||||||
Dim sLocation As String
|
Dim sLocation As String
|
||||||
|
|
||||||
sLocation = mgrCommon.SaveFileBrowser(frmGameManager_ChooseExportXML, "xml", frmGameManager_XML, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), frmGameManager_DefaultExportFileName & " " & Date.Now.ToString("dd-MMM-yyyy"))
|
sLocation = mgrCommon.SaveFileBrowser("XML_Export", frmGameManager_ChooseExportXML, "xml", frmGameManager_XML, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), frmGameManager_DefaultExportFileName & " " & Date.Now.ToString("dd-MMM-yyyy"))
|
||||||
|
|
||||||
If sLocation <> String.Empty Then
|
If sLocation <> String.Empty Then
|
||||||
mgrMonitorList.ExportMonitorList(sLocation)
|
mgrMonitorList.ExportMonitorList(sLocation)
|
||||||
@@ -1425,6 +1498,7 @@ Public Class frmGameManager
|
|||||||
btnProcessBrowse.Text = frmGameManager_btnProcessBrowse
|
btnProcessBrowse.Text = frmGameManager_btnProcessBrowse
|
||||||
lblSavePath.Text = frmGameManager_lblSavePath
|
lblSavePath.Text = frmGameManager_lblSavePath
|
||||||
lblProcess.Text = frmGameManager_lblProcess
|
lblProcess.Text = frmGameManager_lblProcess
|
||||||
|
lblParameter.Text = frmGameManager_lblParameter
|
||||||
lblName.Text = frmGameManager_lblName
|
lblName.Text = frmGameManager_lblName
|
||||||
chkTimeStamp.Text = frmGameManager_chkTimeStamp
|
chkTimeStamp.Text = frmGameManager_chkTimeStamp
|
||||||
chkFolderSave.Text = frmGameManager_chkFolderSave
|
chkFolderSave.Text = frmGameManager_chkFolderSave
|
||||||
|
|||||||
+62
-15
@@ -2,8 +2,10 @@
|
|||||||
|
|
||||||
Public Class frmGameTags
|
Public Class frmGameTags
|
||||||
|
|
||||||
Dim sMonitorIDs As List(Of String)
|
Private sMonitorIDs As List(Of String)
|
||||||
Dim sGameName As String = String.Empty
|
Private sGameName As String = String.Empty
|
||||||
|
Private bNewMode As Boolean = False
|
||||||
|
Private oTagList As List(Of KeyValuePair(Of String, String))
|
||||||
|
|
||||||
Public Property IDList As List(Of String)
|
Public Property IDList As List(Of String)
|
||||||
Get
|
Get
|
||||||
@@ -23,6 +25,25 @@ Public Class frmGameTags
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public Property NewMode As Boolean
|
||||||
|
Get
|
||||||
|
Return bNewMode
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
bNewMode = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property TagList As List(Of KeyValuePair(Of String, String))
|
||||||
|
Get
|
||||||
|
Return oTagList
|
||||||
|
End Get
|
||||||
|
Set(value As List(Of KeyValuePair(Of String, String)))
|
||||||
|
oTagList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
Private Sub AddTag()
|
Private Sub AddTag()
|
||||||
Dim oData As KeyValuePair(Of String, String)
|
Dim oData As KeyValuePair(Of String, String)
|
||||||
Dim oTags As List(Of KeyValuePair(Of String, String))
|
Dim oTags As List(Of KeyValuePair(Of String, String))
|
||||||
@@ -40,7 +61,7 @@ Public Class frmGameTags
|
|||||||
oGameTags.Add(oGameTag)
|
oGameTags.Add(oGameTag)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
mgrGameTags.DoGameTagAddBatch(oGameTags)
|
If Not bNewMode Then mgrGameTags.DoGameTagAddBatch(oGameTags)
|
||||||
|
|
||||||
lstGameTags.Items.Add(oData)
|
lstGameTags.Items.Add(oData)
|
||||||
lstTags.Items.Remove(oData)
|
lstTags.Items.Remove(oData)
|
||||||
@@ -60,7 +81,7 @@ Public Class frmGameTags
|
|||||||
oGameTags.Add(oGameTag)
|
oGameTags.Add(oGameTag)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
mgrGameTags.DoGameTagAddBatch(oGameTags)
|
If Not bNewMode Then mgrGameTags.DoGameTagAddBatch(oGameTags)
|
||||||
|
|
||||||
lstGameTags.Items.Add(kp)
|
lstGameTags.Items.Add(kp)
|
||||||
lstTags.Items.Remove(kp)
|
lstTags.Items.Remove(kp)
|
||||||
@@ -86,7 +107,7 @@ Public Class frmGameTags
|
|||||||
oGameTags.Add(oGameTag)
|
oGameTags.Add(oGameTag)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
mgrGameTags.DoGameTagDelete(oGameTags)
|
If Not bNewMode Then mgrGameTags.DoGameTagDelete(oGameTags)
|
||||||
|
|
||||||
lstGameTags.Items.Remove(oData)
|
lstGameTags.Items.Remove(oData)
|
||||||
lstTags.Items.Add(oData)
|
lstTags.Items.Add(oData)
|
||||||
@@ -106,7 +127,7 @@ Public Class frmGameTags
|
|||||||
oGameTags.Add(oGameTag)
|
oGameTags.Add(oGameTag)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
mgrGameTags.DoGameTagDelete(oGameTags)
|
If Not bNewMode Then mgrGameTags.DoGameTagDelete(oGameTags)
|
||||||
|
|
||||||
lstGameTags.Items.Remove(kp)
|
lstGameTags.Items.Remove(kp)
|
||||||
lstTags.Items.Add(kp)
|
lstTags.Items.Add(kp)
|
||||||
@@ -121,16 +142,8 @@ Public Class frmGameTags
|
|||||||
Dim oTag As clsTag
|
Dim oTag As clsTag
|
||||||
Dim oData As KeyValuePair(Of String, String)
|
Dim oData As KeyValuePair(Of String, String)
|
||||||
|
|
||||||
'Handle Data
|
'Load Tags
|
||||||
hshTags = mgrTags.ReadTags()
|
hshTags = mgrTags.ReadTags()
|
||||||
hshGameTags = mgrGameTags.GetTagsByGameMulti(IDList)
|
|
||||||
|
|
||||||
For Each de As DictionaryEntry In hshGameTags
|
|
||||||
oTag = DirectCast(de.Value, clsTag)
|
|
||||||
If hshTags.ContainsKey(oTag.Name) Then
|
|
||||||
hshTags.Remove(oTag.Name)
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
'Handle Lists
|
'Handle Lists
|
||||||
lstTags.Items.Clear()
|
lstTags.Items.Clear()
|
||||||
@@ -141,11 +154,35 @@ Public Class frmGameTags
|
|||||||
lstGameTags.ValueMember = "Key"
|
lstGameTags.ValueMember = "Key"
|
||||||
lstGameTags.DisplayMember = "Value"
|
lstGameTags.DisplayMember = "Value"
|
||||||
|
|
||||||
|
If bNewMode Then
|
||||||
|
For Each kp As KeyValuePair(Of String, String) In oTagList
|
||||||
|
'We need to be sure the tags still exist if the "Setup Tags" form was used
|
||||||
|
If hshTags.ContainsKey(kp.Value) Then
|
||||||
|
lstGameTags.Items.Add(kp)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
For Each kp As KeyValuePair(Of String, String) In oTagList
|
||||||
|
If hshTags.ContainsKey(kp.Value) Then
|
||||||
|
hshTags.Remove(kp.Value)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Else
|
||||||
|
hshGameTags = mgrGameTags.GetTagsByGameMulti(IDList)
|
||||||
|
|
||||||
|
For Each de As DictionaryEntry In hshGameTags
|
||||||
|
oTag = DirectCast(de.Value, clsTag)
|
||||||
|
If hshTags.ContainsKey(oTag.Name) Then
|
||||||
|
hshTags.Remove(oTag.Name)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
For Each de As DictionaryEntry In hshGameTags
|
For Each de As DictionaryEntry In hshGameTags
|
||||||
oTag = DirectCast(de.Value, clsTag)
|
oTag = DirectCast(de.Value, clsTag)
|
||||||
oData = New KeyValuePair(Of String, String)(oTag.ID, oTag.Name)
|
oData = New KeyValuePair(Of String, String)(oTag.ID, oTag.Name)
|
||||||
lstGameTags.Items.Add(oData)
|
lstGameTags.Items.Add(oData)
|
||||||
Next
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
For Each de As DictionaryEntry In hshTags
|
For Each de As DictionaryEntry In hshTags
|
||||||
oTag = DirectCast(de.Value, clsTag)
|
oTag = DirectCast(de.Value, clsTag)
|
||||||
@@ -155,6 +192,14 @@ Public Class frmGameTags
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub BuildTagList()
|
||||||
|
Dim oData As KeyValuePair(Of String, String)
|
||||||
|
oTagList.Clear()
|
||||||
|
For Each oData In lstGameTags.Items
|
||||||
|
oTagList.Add(oData)
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub OpenTags()
|
Private Sub OpenTags()
|
||||||
Dim frm As New frmTags
|
Dim frm As New frmTags
|
||||||
frm.ShowDialog()
|
frm.ShowDialog()
|
||||||
@@ -185,6 +230,7 @@ Public Class frmGameTags
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub btnClose_Click(sender As Object, e As EventArgs) Handles btnClose.Click
|
Private Sub btnClose_Click(sender As Object, e As EventArgs) Handles btnClose.Click
|
||||||
|
If bNewMode Then BuildTagList()
|
||||||
Me.Close()
|
Me.Close()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -197,6 +243,7 @@ Public Class frmGameTags
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub btnOpenTags_Click(sender As Object, e As EventArgs) Handles btnOpenTags.Click
|
Private Sub btnOpenTags_Click(sender As Object, e As EventArgs) Handles btnOpenTags.Click
|
||||||
|
If bNewMode Then BuildTagList()
|
||||||
OpenTags()
|
OpenTags()
|
||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
@@ -108,7 +108,7 @@ Public Class frmIncludeExclude
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
sNewPath = mgrCommon.OpenFolderBrowser(frmIncludeExclude_BrowseSaveFolder, sDefaultFolder, False)
|
sNewPath = mgrCommon.OpenFolderBrowser("IE_Save_Path", frmIncludeExclude_BrowseSaveFolder, sDefaultFolder, False, False)
|
||||||
|
|
||||||
If sNewPath <> String.Empty Then txtRootFolder.Text = sNewPath
|
If sNewPath <> String.Empty Then txtRootFolder.Text = sNewPath
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
Generated
+16
-16
@@ -75,7 +75,6 @@ Partial Class frmMain
|
|||||||
Me.gMonHelpAbout = New System.Windows.Forms.ToolStripMenuItem()
|
Me.gMonHelpAbout = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.gMonNotification = New System.Windows.Forms.ToolStripMenuItem()
|
Me.gMonNotification = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.pbIcon = New System.Windows.Forms.PictureBox()
|
Me.pbIcon = New System.Windows.Forms.PictureBox()
|
||||||
Me.btnLogToggle = New System.Windows.Forms.Button()
|
|
||||||
Me.lblGameTitle = New System.Windows.Forms.Label()
|
Me.lblGameTitle = New System.Windows.Forms.Label()
|
||||||
Me.lblLastAction = New System.Windows.Forms.Label()
|
Me.lblLastAction = New System.Windows.Forms.Label()
|
||||||
Me.lblLastActionTitle = New System.Windows.Forms.Label()
|
Me.lblLastActionTitle = New System.Windows.Forms.Label()
|
||||||
@@ -222,6 +221,9 @@ Partial Class frmMain
|
|||||||
'
|
'
|
||||||
'txtLog
|
'txtLog
|
||||||
'
|
'
|
||||||
|
Me.txtLog.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||||
|
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||||
|
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||||
Me.txtLog.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
Me.txtLog.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
Me.txtLog.Location = New System.Drawing.Point(12, 184)
|
Me.txtLog.Location = New System.Drawing.Point(12, 184)
|
||||||
Me.txtLog.MaxLength = 524288
|
Me.txtLog.MaxLength = 524288
|
||||||
@@ -430,17 +432,11 @@ Partial Class frmMain
|
|||||||
Me.pbIcon.TabIndex = 9
|
Me.pbIcon.TabIndex = 9
|
||||||
Me.pbIcon.TabStop = False
|
Me.pbIcon.TabStop = False
|
||||||
'
|
'
|
||||||
'btnLogToggle
|
|
||||||
'
|
|
||||||
Me.btnLogToggle.Location = New System.Drawing.Point(437, 155)
|
|
||||||
Me.btnLogToggle.Name = "btnLogToggle"
|
|
||||||
Me.btnLogToggle.Size = New System.Drawing.Size(75, 23)
|
|
||||||
Me.btnLogToggle.TabIndex = 7
|
|
||||||
Me.btnLogToggle.Text = "Show &Log"
|
|
||||||
Me.btnLogToggle.UseVisualStyleBackColor = True
|
|
||||||
'
|
|
||||||
'lblGameTitle
|
'lblGameTitle
|
||||||
'
|
'
|
||||||
|
Me.lblGameTitle.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||||
|
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||||
|
Me.lblGameTitle.AutoEllipsis = True
|
||||||
Me.lblGameTitle.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
Me.lblGameTitle.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
Me.lblGameTitle.Location = New System.Drawing.Point(66, 36)
|
Me.lblGameTitle.Location = New System.Drawing.Point(66, 36)
|
||||||
Me.lblGameTitle.Name = "lblGameTitle"
|
Me.lblGameTitle.Name = "lblGameTitle"
|
||||||
@@ -450,6 +446,8 @@ Partial Class frmMain
|
|||||||
'
|
'
|
||||||
'lblLastAction
|
'lblLastAction
|
||||||
'
|
'
|
||||||
|
Me.lblLastAction.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||||
|
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||||
Me.lblLastAction.AutoEllipsis = True
|
Me.lblLastAction.AutoEllipsis = True
|
||||||
Me.lblLastAction.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
Me.lblLastAction.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
Me.lblLastAction.Location = New System.Drawing.Point(12, 165)
|
Me.lblLastAction.Location = New System.Drawing.Point(12, 165)
|
||||||
@@ -480,7 +478,8 @@ Partial Class frmMain
|
|||||||
'
|
'
|
||||||
'btnCancelOperation
|
'btnCancelOperation
|
||||||
'
|
'
|
||||||
Me.btnCancelOperation.Location = New System.Drawing.Point(437, 126)
|
Me.btnCancelOperation.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||||
|
Me.btnCancelOperation.Location = New System.Drawing.Point(437, 155)
|
||||||
Me.btnCancelOperation.Name = "btnCancelOperation"
|
Me.btnCancelOperation.Name = "btnCancelOperation"
|
||||||
Me.btnCancelOperation.Size = New System.Drawing.Size(75, 23)
|
Me.btnCancelOperation.Size = New System.Drawing.Size(75, 23)
|
||||||
Me.btnCancelOperation.TabIndex = 6
|
Me.btnCancelOperation.TabIndex = 6
|
||||||
@@ -489,6 +488,8 @@ Partial Class frmMain
|
|||||||
'
|
'
|
||||||
'lblStatus1
|
'lblStatus1
|
||||||
'
|
'
|
||||||
|
Me.lblStatus1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||||
|
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||||
Me.lblStatus1.AutoEllipsis = True
|
Me.lblStatus1.AutoEllipsis = True
|
||||||
Me.lblStatus1.Location = New System.Drawing.Point(66, 58)
|
Me.lblStatus1.Location = New System.Drawing.Point(66, 58)
|
||||||
Me.lblStatus1.Name = "lblStatus1"
|
Me.lblStatus1.Name = "lblStatus1"
|
||||||
@@ -497,6 +498,8 @@ Partial Class frmMain
|
|||||||
'
|
'
|
||||||
'lblStatus2
|
'lblStatus2
|
||||||
'
|
'
|
||||||
|
Me.lblStatus2.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||||
|
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||||
Me.lblStatus2.AutoEllipsis = True
|
Me.lblStatus2.AutoEllipsis = True
|
||||||
Me.lblStatus2.Location = New System.Drawing.Point(66, 74)
|
Me.lblStatus2.Location = New System.Drawing.Point(66, 74)
|
||||||
Me.lblStatus2.Name = "lblStatus2"
|
Me.lblStatus2.Name = "lblStatus2"
|
||||||
@@ -505,6 +508,8 @@ Partial Class frmMain
|
|||||||
'
|
'
|
||||||
'lblStatus3
|
'lblStatus3
|
||||||
'
|
'
|
||||||
|
Me.lblStatus3.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||||
|
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||||
Me.lblStatus3.AutoEllipsis = True
|
Me.lblStatus3.AutoEllipsis = True
|
||||||
Me.lblStatus3.Location = New System.Drawing.Point(66, 90)
|
Me.lblStatus3.Location = New System.Drawing.Point(66, 90)
|
||||||
Me.lblStatus3.Name = "lblStatus3"
|
Me.lblStatus3.Name = "lblStatus3"
|
||||||
@@ -523,7 +528,6 @@ Partial Class frmMain
|
|||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
Me.AutoSize = True
|
|
||||||
Me.ClientSize = New System.Drawing.Size(524, 401)
|
Me.ClientSize = New System.Drawing.Size(524, 401)
|
||||||
Me.Controls.Add(Me.pbTime)
|
Me.Controls.Add(Me.pbTime)
|
||||||
Me.Controls.Add(Me.lblStatus3)
|
Me.Controls.Add(Me.lblStatus3)
|
||||||
@@ -534,16 +538,13 @@ Partial Class frmMain
|
|||||||
Me.Controls.Add(Me.lblLastActionTitle)
|
Me.Controls.Add(Me.lblLastActionTitle)
|
||||||
Me.Controls.Add(Me.lblLastAction)
|
Me.Controls.Add(Me.lblLastAction)
|
||||||
Me.Controls.Add(Me.lblGameTitle)
|
Me.Controls.Add(Me.lblGameTitle)
|
||||||
Me.Controls.Add(Me.btnLogToggle)
|
|
||||||
Me.Controls.Add(Me.pbIcon)
|
Me.Controls.Add(Me.pbIcon)
|
||||||
Me.Controls.Add(Me.gMonStatusStrip)
|
Me.Controls.Add(Me.gMonStatusStrip)
|
||||||
Me.Controls.Add(Me.gMonMainMenu)
|
Me.Controls.Add(Me.gMonMainMenu)
|
||||||
Me.Controls.Add(Me.txtLog)
|
Me.Controls.Add(Me.txtLog)
|
||||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
|
||||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||||
Me.KeyPreview = True
|
Me.KeyPreview = True
|
||||||
Me.MainMenuStrip = Me.gMonMainMenu
|
Me.MainMenuStrip = Me.gMonMainMenu
|
||||||
Me.MaximizeBox = False
|
|
||||||
Me.MinimizeBox = False
|
Me.MinimizeBox = False
|
||||||
Me.Name = "frmMain"
|
Me.Name = "frmMain"
|
||||||
Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide
|
Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide
|
||||||
@@ -586,7 +587,6 @@ Partial Class frmMain
|
|||||||
Friend WithEvents gMonTraySetupGameManager As System.Windows.Forms.ToolStripMenuItem
|
Friend WithEvents gMonTraySetupGameManager As System.Windows.Forms.ToolStripMenuItem
|
||||||
Friend WithEvents gMonTraySetupCustomVariables As System.Windows.Forms.ToolStripMenuItem
|
Friend WithEvents gMonTraySetupCustomVariables As System.Windows.Forms.ToolStripMenuItem
|
||||||
Friend WithEvents pbIcon As System.Windows.Forms.PictureBox
|
Friend WithEvents pbIcon As System.Windows.Forms.PictureBox
|
||||||
Friend WithEvents btnLogToggle As System.Windows.Forms.Button
|
|
||||||
Friend WithEvents lblGameTitle As System.Windows.Forms.Label
|
Friend WithEvents lblGameTitle As System.Windows.Forms.Label
|
||||||
Friend WithEvents lblLastAction As System.Windows.Forms.Label
|
Friend WithEvents lblLastAction As System.Windows.Forms.Label
|
||||||
Friend WithEvents lblLastActionTitle As System.Windows.Forms.Label
|
Friend WithEvents lblLastActionTitle As System.Windows.Forms.Label
|
||||||
|
|||||||
+47
-51
@@ -39,9 +39,8 @@ Public Class frmMain
|
|||||||
Private sPriorPath As String
|
Private sPriorPath As String
|
||||||
Private sPriorCompany As String
|
Private sPriorCompany As String
|
||||||
Private sPriorVersion As String
|
Private sPriorVersion As String
|
||||||
Private iFormHeight As Integer
|
|
||||||
Private iLogSpacer As Integer
|
|
||||||
Private iRestoreTimeOut As Integer
|
Private iRestoreTimeOut As Integer
|
||||||
|
Private wState As FormWindowState = FormWindowState.Normal
|
||||||
|
|
||||||
'Developer Debug Flags
|
'Developer Debug Flags
|
||||||
Private bProcessDebugMode As Boolean = False
|
Private bProcessDebugMode As Boolean = False
|
||||||
@@ -534,7 +533,7 @@ Public Class frmMain
|
|||||||
|
|
||||||
Private Sub ResetGameInfo(Optional ByVal bKeepInfo As Boolean = False)
|
Private Sub ResetGameInfo(Optional ByVal bKeepInfo As Boolean = False)
|
||||||
If bKeepInfo And Not oProcess.GameInfo Is Nothing Then
|
If bKeepInfo And Not oProcess.GameInfo Is Nothing Then
|
||||||
lblGameTitle.Text = mgrCommon.FormatString(frmMain_LastGame, oProcess.GameInfo.CroppedName)
|
lblGameTitle.Text = mgrCommon.FormatString(frmMain_LastGame, oProcess.GameInfo.Name)
|
||||||
pbIcon.Image = oPriorImage
|
pbIcon.Image = oPriorImage
|
||||||
lblStatus1.Text = sPriorPath
|
lblStatus1.Text = sPriorPath
|
||||||
lblStatus2.Text = sPriorCompany
|
lblStatus2.Text = sPriorCompany
|
||||||
@@ -599,7 +598,7 @@ Public Class frmMain
|
|||||||
Else
|
Else
|
||||||
bAllowIcon = True
|
bAllowIcon = True
|
||||||
bAllowDetails = True
|
bAllowDetails = True
|
||||||
lblGameTitle.Text = oProcess.GameInfo.CroppedName
|
lblGameTitle.Text = oProcess.GameInfo.Name
|
||||||
|
|
||||||
Try
|
Try
|
||||||
Dim ic As Icon = System.Drawing.Icon.ExtractAssociatedIcon(oProcess.FoundProcess.MainModule.FileName)
|
Dim ic As Icon = System.Drawing.Icon.ExtractAssociatedIcon(oProcess.FoundProcess.MainModule.FileName)
|
||||||
@@ -817,9 +816,11 @@ Public Class frmMain
|
|||||||
Dim sVersion As String = My.Application.Info.Version.Major & "." & My.Application.Info.Version.Minor & "." & My.Application.Info.Version.Build
|
Dim sVersion As String = My.Application.Info.Version.Major & "." & My.Application.Info.Version.Minor & "." & My.Application.Info.Version.Build
|
||||||
Dim sProcessType = [Enum].GetName(GetType(System.Reflection.ProcessorArchitecture), iProcessType)
|
Dim sProcessType = [Enum].GetName(GetType(System.Reflection.ProcessorArchitecture), iProcessType)
|
||||||
Dim sRevision As String = My.Application.Info.Version.Revision
|
Dim sRevision As String = My.Application.Info.Version.Revision
|
||||||
|
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||||
|
Dim sSqliteVersion As String = oDatabase.ReportVersion
|
||||||
Dim sConstCopyright As String = Chr(169) & mgrCommon.FormatString(App_Copyright, Now.Year.ToString)
|
Dim sConstCopyright As String = Chr(169) & mgrCommon.FormatString(App_Copyright, Now.Year.ToString)
|
||||||
|
|
||||||
mgrCommon.ShowMessage(frmMain_About, New String() {sVersion, sProcessType, sRevision, sConstCopyright}, MsgBoxStyle.Information)
|
mgrCommon.ShowMessage(frmMain_About, New String() {sVersion, sProcessType, sRevision, sSqliteVersion, sConstCopyright}, MsgBoxStyle.Information)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OpenTags()
|
Private Sub OpenTags()
|
||||||
@@ -1027,33 +1028,24 @@ Public Class frmMain
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Functions that handle buttons, menus and other GUI features on this form
|
'Functions that handle buttons, menus and other GUI features on this form
|
||||||
Private Sub ToggleLog()
|
|
||||||
If bLogToggle = False Then
|
|
||||||
txtLog.Visible = True
|
|
||||||
Me.Size = New System.Drawing.Size(Me.Size.Width, iFormHeight)
|
|
||||||
bLogToggle = True
|
|
||||||
btnLogToggle.Text = frmMain_btnToggleLog_Hide
|
|
||||||
txtLog.Select(txtLog.TextLength, 0)
|
|
||||||
txtLog.ScrollToCaret()
|
|
||||||
Else
|
|
||||||
txtLog.Visible = False
|
|
||||||
Me.Size = New System.Drawing.Size(Me.Size.Width, Me.Size.Height - (txtLog.Height + iLogSpacer))
|
|
||||||
bLogToggle = False
|
|
||||||
btnLogToggle.Text = frmMain_btnToggleLog_Show
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub ToggleState()
|
Private Sub ToggleState()
|
||||||
'Toggle State with Tray Clicks
|
'Toggle State with Tray Clicks
|
||||||
If Not bShowToggle Then
|
If Not bShowToggle Then
|
||||||
bShowToggle = True
|
bShowToggle = True
|
||||||
Me.Visible = True
|
Me.Visible = True
|
||||||
|
Me.WindowState = wState
|
||||||
Me.ShowInTaskbar = True
|
Me.ShowInTaskbar = True
|
||||||
Me.Focus()
|
Me.Focus()
|
||||||
Else
|
Else
|
||||||
|
If Me.CanFocus Then
|
||||||
bShowToggle = False
|
bShowToggle = False
|
||||||
Me.Visible = False
|
wState = Me.WindowState
|
||||||
|
Me.WindowState = FormWindowState.Minimized
|
||||||
Me.ShowInTaskbar = False
|
Me.ShowInTaskbar = False
|
||||||
|
Me.Visible = False
|
||||||
|
Else
|
||||||
|
gMonTray.ShowBalloonTip(5000, App_NameLong, App_ErrorFocus, ToolTipIcon.Info)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1144,7 +1136,7 @@ Public Class frmMain
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ToggleMenuEnable()
|
Private Sub ToggleMenuEnable(Optional ByVal bGameDetected As Boolean = False)
|
||||||
If bMenuEnabled Then
|
If bMenuEnabled Then
|
||||||
ToggleMenuItems(False, gMonFile)
|
ToggleMenuItems(False, gMonFile)
|
||||||
ToggleMenuItems(False, gMonSetup)
|
ToggleMenuItems(False, gMonSetup)
|
||||||
@@ -1156,6 +1148,11 @@ Public Class frmMain
|
|||||||
gMonNotification.Enabled = False
|
gMonNotification.Enabled = False
|
||||||
gMonTrayNotification.Enabled = False
|
gMonTrayNotification.Enabled = False
|
||||||
gMonTraySettings.Enabled = False
|
gMonTraySettings.Enabled = False
|
||||||
|
If Not bGameDetected Then
|
||||||
|
gMonTrayMon.Enabled = False
|
||||||
|
gMonTrayShow.Enabled = False
|
||||||
|
gMonTrayExit.Enabled = False
|
||||||
|
End If
|
||||||
bMenuEnabled = False
|
bMenuEnabled = False
|
||||||
Else
|
Else
|
||||||
ToggleMenuItems(True, gMonFile)
|
ToggleMenuItems(True, gMonFile)
|
||||||
@@ -1168,6 +1165,9 @@ Public Class frmMain
|
|||||||
gMonNotification.Enabled = True
|
gMonNotification.Enabled = True
|
||||||
gMonTrayNotification.Enabled = True
|
gMonTrayNotification.Enabled = True
|
||||||
gMonTraySettings.Enabled = True
|
gMonTraySettings.Enabled = True
|
||||||
|
gMonTrayMon.Enabled = True
|
||||||
|
gMonTrayShow.Enabled = True
|
||||||
|
gMonTrayExit.Enabled = True
|
||||||
bMenuEnabled = True
|
bMenuEnabled = True
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1249,7 +1249,7 @@ Public Class frmMain
|
|||||||
Private Sub SaveLog()
|
Private Sub SaveLog()
|
||||||
Dim sLocation As String
|
Dim sLocation As String
|
||||||
|
|
||||||
sLocation = mgrCommon.SaveFileBrowser(frmMain_ChooseLogFile, "txt", frmMain_Text, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), frmMain_DefaultLogFileName & " " & Date.Now.ToString("dd-MMM-yyyy"))
|
sLocation = mgrCommon.SaveFileBrowser("Log_File", frmMain_ChooseLogFile, "txt", frmMain_Text, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), frmMain_DefaultLogFileName & " " & Date.Now.ToString("dd-MMM-yyyy"))
|
||||||
|
|
||||||
If sLocation <> String.Empty Then
|
If sLocation <> String.Empty Then
|
||||||
mgrCommon.SaveText(txtLog.Text, sLocation)
|
mgrCommon.SaveText(txtLog.Text, sLocation)
|
||||||
@@ -1257,8 +1257,8 @@ Public Class frmMain
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SetForm()
|
Private Sub SetForm()
|
||||||
'Disable Autosize in Linux (Mono prevents manual resizing when this is enabled)
|
'Set Minimum Size
|
||||||
If mgrCommon.IsUnix Then Me.AutoSize = False
|
Me.MinimumSize = New Size(Me.Size.Width, Me.Size.Height - txtLog.Size.Height)
|
||||||
|
|
||||||
'Set Form Name
|
'Set Form Name
|
||||||
Me.Name = App_NameLong
|
Me.Name = App_NameLong
|
||||||
@@ -1317,14 +1317,10 @@ Public Class frmMain
|
|||||||
gMonStripAdminButton.ToolTipText = frmMain_RunningAsNormal
|
gMonStripAdminButton.ToolTipText = frmMain_RunningAsNormal
|
||||||
End If
|
End If
|
||||||
btnCancelOperation.Visible = False
|
btnCancelOperation.Visible = False
|
||||||
txtLog.Visible = False
|
|
||||||
lblLastActionTitle.Visible = False
|
lblLastActionTitle.Visible = False
|
||||||
lblLastAction.Text = String.Empty
|
lblLastAction.Text = String.Empty
|
||||||
pbTime.SizeMode = PictureBoxSizeMode.AutoSize
|
pbTime.SizeMode = PictureBoxSizeMode.AutoSize
|
||||||
pbTime.Image = Icon_Clock
|
pbTime.Image = Icon_Clock
|
||||||
iFormHeight = Me.Size.Height
|
|
||||||
iLogSpacer = gMonStatusStrip.Location.Y - (txtLog.Location.Y + txtLog.Height)
|
|
||||||
Me.Size = New System.Drawing.Size(Me.Size.Width, Me.Size.Height - (txtLog.Height + iLogSpacer))
|
|
||||||
AddHandler mgrMonitorList.UpdateLog, AddressOf UpdateLog
|
AddHandler mgrMonitorList.UpdateLog, AddressOf UpdateLog
|
||||||
ResetGameInfo()
|
ResetGameInfo()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1354,7 +1350,7 @@ Public Class frmMain
|
|||||||
ToggleMenuText()
|
ToggleMenuText()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub PauseScan()
|
Private Sub PauseScan(Optional ByVal bGameDetected As Boolean = False)
|
||||||
If eCurrentStatus = eStatus.Running Then
|
If eCurrentStatus = eStatus.Running Then
|
||||||
StopSyncWatcher()
|
StopSyncWatcher()
|
||||||
tmScanTimer.Stop()
|
tmScanTimer.Stop()
|
||||||
@@ -1364,7 +1360,7 @@ Public Class frmMain
|
|||||||
gMonTray.Icon = GBM_Tray_Detected
|
gMonTray.Icon = GBM_Tray_Detected
|
||||||
End If
|
End If
|
||||||
ToggleMenuText()
|
ToggleMenuText()
|
||||||
ToggleMenuEnable()
|
ToggleMenuEnable(bGameDetected)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ResumeScan()
|
Private Sub ResumeScan()
|
||||||
@@ -1472,7 +1468,7 @@ Public Class frmMain
|
|||||||
|
|
||||||
Private Sub CheckForSavedDuplicate()
|
Private Sub CheckForSavedDuplicate()
|
||||||
For Each o As clsGame In oProcess.DuplicateList
|
For Each o As clsGame In oProcess.DuplicateList
|
||||||
If o.ProcessPath.ToLower = oProcess.GameInfo.ProcessPath.ToLower Then
|
If o.ProcessPath.ToLower = oProcess.GameInfo.ProcessPath.ToLower And o.Parameter = String.Empty Then
|
||||||
oProcess.GameInfo = o
|
oProcess.GameInfo = o
|
||||||
oProcess.Duplicate = False
|
oProcess.Duplicate = False
|
||||||
End If
|
End If
|
||||||
@@ -1631,10 +1627,6 @@ Public Class frmMain
|
|||||||
OpenGameManager(True)
|
OpenGameManager(True)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub btnLogToggle_Click(sender As Object, e As EventArgs) Handles btnLogToggle.Click
|
|
||||||
ToggleLog()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub gMonStripSplitStatusButton_ButtonClick(sender As Object, e As EventArgs) Handles gMonStripStatusButton.Click
|
Private Sub gMonStripSplitStatusButton_ButtonClick(sender As Object, e As EventArgs) Handles gMonStripStatusButton.Click
|
||||||
ScanToggle()
|
ScanToggle()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1645,13 +1637,6 @@ Public Class frmMain
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub gMonTray_BalloonTipClicked(sender As System.Object, e As System.EventArgs) Handles gMonTray.BalloonTipClicked
|
|
||||||
bShowToggle = True
|
|
||||||
Me.Visible = True
|
|
||||||
Me.ShowInTaskbar = True
|
|
||||||
Me.Focus()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub btnCancelOperation_Click(sender As Object, e As EventArgs) Handles btnCancelOperation.Click
|
Private Sub btnCancelOperation_Click(sender As Object, e As EventArgs) Handles btnCancelOperation.Click
|
||||||
OperationCancel()
|
OperationCancel()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1671,15 +1656,22 @@ Public Class frmMain
|
|||||||
ShutdownApp()
|
ShutdownApp()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Intercept Exit
|
Select Case e.CloseReason
|
||||||
|
Case CloseReason.UserClosing
|
||||||
If bShutdown = False Then
|
If bShutdown = False Then
|
||||||
e.Cancel = True
|
e.Cancel = True
|
||||||
If Not mgrCommon.IsUnix Then
|
If Not mgrCommon.IsUnix Then
|
||||||
bShowToggle = False
|
bShowToggle = False
|
||||||
Me.Visible = False
|
wState = Me.WindowState
|
||||||
|
Me.WindowState = FormWindowState.Minimized
|
||||||
Me.ShowInTaskbar = False
|
Me.ShowInTaskbar = False
|
||||||
|
Me.Visible = False
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
Case CloseReason.TaskManagerClosing, CloseReason.WindowsShutDown
|
||||||
|
'Do nothing and let the app close without warning
|
||||||
|
End Select
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub AutoRestoreEventProcessor(myObject As Object, ByVal myEventArgs As EventArgs) Handles tmRestoreCheck.Elapsed
|
Private Sub AutoRestoreEventProcessor(myObject As Object, ByVal myEventArgs As EventArgs) Handles tmRestoreCheck.Elapsed
|
||||||
@@ -1695,7 +1687,7 @@ Public Class frmMain
|
|||||||
Dim sErrorMessage As String = String.Empty
|
Dim sErrorMessage As String = String.Empty
|
||||||
|
|
||||||
If oProcess.SearchRunningProcesses(hshScanList, bNeedsPath, iErrorCode, bProcessDebugMode) Then
|
If oProcess.SearchRunningProcesses(hshScanList, bNeedsPath, iErrorCode, bProcessDebugMode) Then
|
||||||
PauseScan()
|
PauseScan(True)
|
||||||
|
|
||||||
If bNeedsPath Then
|
If bNeedsPath Then
|
||||||
bContinue = False
|
bContinue = False
|
||||||
@@ -1850,14 +1842,18 @@ Public Class frmMain
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub txtGameInfo_Enter(sender As Object, e As EventArgs)
|
|
||||||
btnLogToggle.Focus()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub frmMain_KeyDown(sender As Object, e As KeyEventArgs) Handles MyBase.KeyDown
|
Private Sub frmMain_KeyDown(sender As Object, e As KeyEventArgs) Handles MyBase.KeyDown
|
||||||
If e.KeyCode = Keys.Oemtilde AndAlso e.Modifiers = Keys.Control Then
|
If e.KeyCode = Keys.Oemtilde AndAlso e.Modifiers = Keys.Control Then
|
||||||
OpenDevConsole()
|
OpenDevConsole()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
'This event handler lets the user clear focus from the log by clicking anywhere on the form.
|
||||||
|
'Due to txtLog being the only focusable control in most cases, it's impossible for it to lose focus unless a change is forced.
|
||||||
|
Private Sub ClearLogFocus(sender As Object, e As EventArgs) Handles MyBase.Click, lblGameTitle.Click, lblStatus1.Click, lblStatus2.Click,
|
||||||
|
lblStatus3.Click, pbTime.Click, lblTimeSpent.Click, lblLastActionTitle.Click, lblLastAction.Click, gMonMainMenu.Click, gMonStatusStrip.Click
|
||||||
|
'Move focus to first label
|
||||||
|
lblGameTitle.Focus()
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -336,13 +336,13 @@ Public Class frmSettings
|
|||||||
|
|
||||||
Private Sub btnBackupFolder_Click(sender As System.Object, e As System.EventArgs) Handles btnBackupFolder.Click
|
Private Sub btnBackupFolder_Click(sender As System.Object, e As System.EventArgs) Handles btnBackupFolder.Click
|
||||||
Dim sNewFolder As String
|
Dim sNewFolder As String
|
||||||
sNewFolder = mgrCommon.OpenFolderBrowser(frmSettings_BrowseFolder, oSettings.BackupFolder, True)
|
sNewFolder = mgrCommon.OpenFolderBrowser("Settings_Backup_Path", frmSettings_BrowseFolder, oSettings.BackupFolder, True, False)
|
||||||
If sNewFolder <> String.Empty Then txtBackupFolder.Text = sNewFolder
|
If sNewFolder <> String.Empty Then txtBackupFolder.Text = sNewFolder
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub btn7zLocation_Click(sender As Object, e As EventArgs) Handles btn7zLocation.Click
|
Private Sub btn7zLocation_Click(sender As Object, e As EventArgs) Handles btn7zLocation.Click
|
||||||
Dim sNewLocation As String
|
Dim sNewLocation As String
|
||||||
sNewLocation = mgrCommon.OpenFileBrowser(frmSettings_Browse7za, "exe", frmSettings_7zaFileType, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), False)
|
sNewLocation = mgrCommon.OpenFileBrowser("7z_Browse", frmSettings_Browse7za, "exe", frmSettings_7zaFileType, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), False)
|
||||||
If sNewLocation <> String.Empty Then
|
If sNewLocation <> String.Empty Then
|
||||||
txt7zLocation.Text = sNewLocation
|
txt7zLocation.Text = sNewLocation
|
||||||
GetUtilityInfo(txt7zLocation.Text)
|
GetUtilityInfo(txt7zLocation.Text)
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ Public Class frmStartUpWizard
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
sNewPath = mgrCommon.OpenFolderBrowser(frmStartUpWizard_BrowseFolder, sDefaultFolder, True)
|
sNewPath = mgrCommon.OpenFolderBrowser("Wizard_Backup_Path", frmStartUpWizard_BrowseFolder, sDefaultFolder, True, False)
|
||||||
|
|
||||||
If sNewPath <> String.Empty Then txtBackupPath.Text = sNewPath
|
If sNewPath <> String.Empty Then txtBackupPath.Text = sNewPath
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ Public Class frmVariableManager
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
sNewPath = mgrCommon.OpenFolderBrowser(frmVariableManager_PathBrowse, sDefaultFolder, False)
|
sNewPath = mgrCommon.OpenFolderBrowser("VM_Path", frmVariableManager_PathBrowse, sDefaultFolder, False, False)
|
||||||
|
|
||||||
If sNewPath <> String.Empty Then txtPath.Text = sNewPath
|
If sNewPath <> String.Empty Then txtPath.Text = sNewPath
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -106,6 +106,7 @@
|
|||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Management" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
@@ -121,6 +122,7 @@
|
|||||||
<Import Include="System.Windows.Forms" />
|
<Import Include="System.Windows.Forms" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="Classes\clsSavedPath.vb" />
|
||||||
<Compile Include="Classes\XML Serialize Classes\Tag.vb" />
|
<Compile Include="Classes\XML Serialize Classes\Tag.vb" />
|
||||||
<Compile Include="Classes\XML Serialize Classes\Game.vb" />
|
<Compile Include="Classes\XML Serialize Classes\Game.vb" />
|
||||||
<Compile Include="Classes\clsGameTag.vb" />
|
<Compile Include="Classes\clsGameTag.vb" />
|
||||||
@@ -220,6 +222,7 @@
|
|||||||
<Compile Include="Managers\mgrMonitorList.vb" />
|
<Compile Include="Managers\mgrMonitorList.vb" />
|
||||||
<Compile Include="Managers\mgrPath.vb" />
|
<Compile Include="Managers\mgrPath.vb" />
|
||||||
<Compile Include="Managers\mgrRestore.vb" />
|
<Compile Include="Managers\mgrRestore.vb" />
|
||||||
|
<Compile Include="Managers\mgrSavedPath.vb" />
|
||||||
<Compile Include="Managers\mgrSettings.vb" />
|
<Compile Include="Managers\mgrSettings.vb" />
|
||||||
<Compile Include="Managers\mgrBackup.vb" />
|
<Compile Include="Managers\mgrBackup.vb" />
|
||||||
<Compile Include="Managers\mgrSQLite.vb" />
|
<Compile Include="Managers\mgrSQLite.vb" />
|
||||||
@@ -344,6 +347,7 @@
|
|||||||
<Content Include="Utilities\x86\7za.exe">
|
<Content Include="Utilities\x86\7za.exe">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Content Include="x64\sqlite3.dll" />
|
||||||
<Content Include="x86\sqlite3.dll" />
|
<Content Include="x86\sqlite3.dll" />
|
||||||
<None Include="Resources\gbm.ico" />
|
<None Include="Resources\gbm.ico" />
|
||||||
<Content Include="Resources\Admin.png" />
|
<Content Include="Resources\Admin.png" />
|
||||||
@@ -356,7 +360,6 @@
|
|||||||
<Content Include="Resources\Inbox.png" />
|
<Content Include="Resources\Inbox.png" />
|
||||||
<Content Include="Resources\type.ico" />
|
<Content Include="Resources\type.ico" />
|
||||||
<Content Include="Resources\User.png" />
|
<Content Include="Resources\User.png" />
|
||||||
<Content Include="x64\sqlite3.dll" />
|
|
||||||
<None Include="Resources\Stopped.png" />
|
<None Include="Resources\Stopped.png" />
|
||||||
<None Include="Resources\Detected.png" />
|
<None Include="Resources\Detected.png" />
|
||||||
<None Include="Resources\Ready.png" />
|
<None Include="Resources\Ready.png" />
|
||||||
|
|||||||
@@ -87,9 +87,25 @@ Public Class mgrBackup
|
|||||||
|
|
||||||
Public Function CheckBackupPrereq(ByVal oGame As clsGame) As Boolean
|
Public Function CheckBackupPrereq(ByVal oGame As clsGame) As Boolean
|
||||||
Dim sBackupFile As String = oSettings.BackupFolder
|
Dim sBackupFile As String = oSettings.BackupFolder
|
||||||
|
Dim lAvailableSpace As Long = mgrCommon.GetAvailableDiskSpace(sBackupFile)
|
||||||
|
Dim lFolderSize As Long = mgrCommon.GetFolderSize(oGame.Path, oGame.IncludeArray, oGame.ExcludeArray)
|
||||||
|
|
||||||
If oSettings.CreateSubFolder Then sBackupFile = sBackupFile & Path.DirectorySeparatorChar & oGame.Name
|
If oSettings.CreateSubFolder Then sBackupFile = sBackupFile & Path.DirectorySeparatorChar & oGame.Name
|
||||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & oGame.Name & ".7z"
|
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & oGame.Name & ".7z"
|
||||||
|
|
||||||
|
'Show Available Space
|
||||||
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrCommon_AvailableDiskSpace, mgrCommon.FormatDiskSpace(lAvailableSpace)), False, ToolTipIcon.Info, True)
|
||||||
|
|
||||||
|
'Show Save Folder Size
|
||||||
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrCommon_SavedGameFolderSize, New String() {oGame.Name, mgrCommon.FormatDiskSpace(lFolderSize)}), False, ToolTipIcon.Info, True)
|
||||||
|
|
||||||
|
If lFolderSize >= lAvailableSpace Then
|
||||||
|
If mgrCommon.ShowMessage(mgrBackup_ConfirmDiskSpace, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||||
|
RaiseEvent UpdateLog(mgrBackup_ErrorDiskSpace, False, ToolTipIcon.Error, True)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If mgrRestore.CheckManifest(oGame.Name) Then
|
If mgrRestore.CheckManifest(oGame.Name) Then
|
||||||
If mgrCommon.ShowMessage(mgrBackup_ConfirmManifestConflict, oGame.Name, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
If mgrCommon.ShowMessage(mgrBackup_ConfirmManifestConflict, oGame.Name, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||||
RaiseEvent UpdateLog(mgrBackup_ErrorManifestConflict, False, ToolTipIcon.Error, True)
|
RaiseEvent UpdateLog(mgrBackup_ErrorManifestConflict, False, ToolTipIcon.Error, True)
|
||||||
@@ -222,13 +238,20 @@ Public Class mgrBackup
|
|||||||
End While
|
End While
|
||||||
prs7z.WaitForExit()
|
prs7z.WaitForExit()
|
||||||
If Not CancelOperation Then
|
If Not CancelOperation Then
|
||||||
If prs7z.ExitCode = 0 Then
|
Select Case prs7z.ExitCode
|
||||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_BackupComplete, New String() {oGame.Name, mgrCommon.GetFileSize(sBackupFile)}), False, ToolTipIcon.Info, True)
|
Case 0
|
||||||
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_BackupComplete, New String() {oGame.Name, mgrCommon.FormatDiskSpace(mgrCommon.GetFileSize(sBackupFile))}), False, ToolTipIcon.Info, True)
|
||||||
bBackupCompleted = True
|
bBackupCompleted = True
|
||||||
Else
|
Case 1
|
||||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_BackupWarnings, oGame.Name), True, ToolTipIcon.Warning, True)
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_7zWarnings, oGame.Name), True, ToolTipIcon.Warning, True)
|
||||||
|
bBackupCompleted = True
|
||||||
|
Case 2
|
||||||
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_7zFatalError, oGame.Name), True, ToolTipIcon.Error, True)
|
||||||
bBackupCompleted = False
|
bBackupCompleted = False
|
||||||
End If
|
Case 7
|
||||||
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_7zCommandFailure, oGame.Name), True, ToolTipIcon.Error, True)
|
||||||
|
bBackupCompleted = False
|
||||||
|
End Select
|
||||||
End If
|
End If
|
||||||
prs7z.Dispose()
|
prs7z.Dispose()
|
||||||
Else
|
Else
|
||||||
|
|||||||
+207
-23
@@ -2,6 +2,7 @@
|
|||||||
Imports System.Net
|
Imports System.Net
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports System.Security.Principal
|
Imports System.Security.Principal
|
||||||
|
Imports System.Text.RegularExpressions
|
||||||
|
|
||||||
Public Class mgrCommon
|
Public Class mgrCommon
|
||||||
|
|
||||||
@@ -61,30 +62,66 @@ Public Class mgrCommon
|
|||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function SaveFileBrowser(ByVal sTitle As String, ByVal sExtension As String, ByVal sFileType As String, ByVal sDefaultFolder As String, ByVal sDefaultFile As String) As String
|
Public Shared Function SaveFileBrowser(ByVal sName As String, ByVal sTitle As String, ByVal sExtension As String, ByVal sFileType As String, ByVal sDefaultFolder As String,
|
||||||
|
ByVal sDefaultFile As String, Optional ByVal bSavedPath As Boolean = True) As String
|
||||||
Dim fbBrowser As New SaveFileDialog
|
Dim fbBrowser As New SaveFileDialog
|
||||||
|
Dim oSavedPath As New clsSavedPath
|
||||||
|
|
||||||
fbBrowser.Title = sTitle
|
fbBrowser.Title = sTitle
|
||||||
fbBrowser.DefaultExt = sExtension
|
fbBrowser.DefaultExt = sExtension
|
||||||
fbBrowser.Filter = FormatString(mgrCommon_FilesFilter, New String() {sFileType, sExtension, sExtension})
|
fbBrowser.Filter = FormatString(mgrCommon_FilesFilter, New String() {sFileType, sExtension, sExtension})
|
||||||
fbBrowser.InitialDirectory = sDefaultFolder
|
|
||||||
fbBrowser.FileName = sDefaultFile
|
fbBrowser.FileName = sDefaultFile
|
||||||
|
fbBrowser.InitialDirectory = sDefaultFolder
|
||||||
|
|
||||||
|
If bSavedPath Then
|
||||||
|
oSavedPath = mgrSavedPath.GetPathByName(sName)
|
||||||
|
If oSavedPath.Path <> String.Empty Then
|
||||||
|
If Directory.Exists(oSavedPath.Path) Then
|
||||||
|
fbBrowser.InitialDirectory = oSavedPath.Path
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If fbBrowser.ShowDialog() = Windows.Forms.DialogResult.OK Then
|
If fbBrowser.ShowDialog() = Windows.Forms.DialogResult.OK Then
|
||||||
|
If bSavedPath Then
|
||||||
|
oSavedPath.PathName = sName
|
||||||
|
oSavedPath.Path = Path.GetDirectoryName(fbBrowser.FileName)
|
||||||
|
mgrSavedPath.AddUpdatePath(oSavedPath)
|
||||||
|
End If
|
||||||
|
|
||||||
Return fbBrowser.FileName
|
Return fbBrowser.FileName
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return String.Empty
|
Return String.Empty
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function OpenFileBrowser(ByVal sTitle As String, ByVal sExtension As String, ByVal sFileType As String, ByVal sDefaultFolder As String, ByVal bMulti As Boolean) As String
|
Public Shared Function OpenFileBrowser(ByVal sName As String, ByVal sTitle As String, ByVal sExtension As String, ByVal sFileType As String, ByVal sDefaultFolder As String,
|
||||||
|
ByVal bMulti As Boolean, Optional ByVal bSavedPath As Boolean = True) As String
|
||||||
Dim fbBrowser As New OpenFileDialog
|
Dim fbBrowser As New OpenFileDialog
|
||||||
|
Dim oSavedPath As New clsSavedPath
|
||||||
|
|
||||||
fbBrowser.Title = sTitle
|
fbBrowser.Title = sTitle
|
||||||
fbBrowser.DefaultExt = sExtension
|
fbBrowser.DefaultExt = sExtension
|
||||||
fbBrowser.Filter = FormatString(mgrCommon_FilesFilter, New String() {sFileType, sExtension, sExtension})
|
fbBrowser.Filter = FormatString(mgrCommon_FilesFilter, New String() {sFileType, sExtension, sExtension})
|
||||||
fbBrowser.InitialDirectory = sDefaultFolder
|
|
||||||
fbBrowser.Multiselect = bMulti
|
fbBrowser.Multiselect = bMulti
|
||||||
|
fbBrowser.InitialDirectory = sDefaultFolder
|
||||||
|
|
||||||
|
If bSavedPath Then
|
||||||
|
oSavedPath = mgrSavedPath.GetPathByName(sName)
|
||||||
|
If oSavedPath.Path <> String.Empty Then
|
||||||
|
If Directory.Exists(oSavedPath.Path) Then
|
||||||
|
fbBrowser.InitialDirectory = oSavedPath.Path
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If fbBrowser.ShowDialog() = Windows.Forms.DialogResult.OK Then
|
If fbBrowser.ShowDialog() = Windows.Forms.DialogResult.OK Then
|
||||||
|
If bSavedPath Then
|
||||||
|
oSavedPath.PathName = sName
|
||||||
|
oSavedPath.Path = Path.GetDirectoryName(fbBrowser.FileName)
|
||||||
|
mgrSavedPath.AddUpdatePath(oSavedPath)
|
||||||
|
End If
|
||||||
|
|
||||||
If bMulti Then
|
If bMulti Then
|
||||||
Dim sFileNames As String = String.Empty
|
Dim sFileNames As String = String.Empty
|
||||||
For Each sFileName As String In fbBrowser.FileNames
|
For Each sFileName As String In fbBrowser.FileNames
|
||||||
@@ -100,12 +137,31 @@ Public Class mgrCommon
|
|||||||
Return String.Empty
|
Return String.Empty
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function OpenFolderBrowser(ByVal sTitle As String, ByVal sDefaultFolder As String, ByVal bEnableNewFolder As Boolean) As String
|
Public Shared Function OpenFolderBrowser(ByVal sName As String, ByVal sTitle As String, ByVal sDefaultFolder As String, ByVal bEnableNewFolder As Boolean,
|
||||||
|
Optional ByVal bSavedPath As Boolean = True) As String
|
||||||
Dim fbBrowser As New FolderBrowserDialog
|
Dim fbBrowser As New FolderBrowserDialog
|
||||||
|
Dim oSavedPath As New clsSavedPath
|
||||||
|
|
||||||
fbBrowser.Description = sTitle
|
fbBrowser.Description = sTitle
|
||||||
fbBrowser.SelectedPath = sDefaultFolder
|
fbBrowser.SelectedPath = sDefaultFolder
|
||||||
fbBrowser.ShowNewFolderButton = bEnableNewFolder
|
fbBrowser.ShowNewFolderButton = bEnableNewFolder
|
||||||
|
|
||||||
|
If bSavedPath Then
|
||||||
|
oSavedPath = mgrSavedPath.GetPathByName(sName)
|
||||||
|
If oSavedPath.Path <> String.Empty Then
|
||||||
|
If Directory.Exists(oSavedPath.Path) Then
|
||||||
|
fbBrowser.SelectedPath = oSavedPath.Path
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If fbBrowser.ShowDialog() = Windows.Forms.DialogResult.OK Then
|
If fbBrowser.ShowDialog() = Windows.Forms.DialogResult.OK Then
|
||||||
|
If bSavedPath Then
|
||||||
|
oSavedPath.PathName = sName
|
||||||
|
oSavedPath.Path = fbBrowser.SelectedPath
|
||||||
|
mgrSavedPath.AddUpdatePath(oSavedPath)
|
||||||
|
End If
|
||||||
|
|
||||||
Return fbBrowser.SelectedPath
|
Return fbBrowser.SelectedPath
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -165,6 +221,152 @@ Public Class mgrCommon
|
|||||||
Return eSyncFields And (Not eSyncField)
|
Return eSyncFields And (Not eSyncField)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
'Get a file size
|
||||||
|
Public Shared Function GetFileSize(ByVal sFile As String) As Long
|
||||||
|
Dim oFileInfo As FileInfo
|
||||||
|
Dim dFileSize As Long = 0
|
||||||
|
|
||||||
|
Try
|
||||||
|
oFileInfo = New FileInfo(sFile)
|
||||||
|
dFileSize = oFileInfo.Length
|
||||||
|
Catch ex As Exception
|
||||||
|
'Do Nothing
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return dFileSize
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function WildcardToRegex(ByVal sPattern As String) As String
|
||||||
|
Dim sRegEx As String
|
||||||
|
sRegEx = sPattern.Replace("*", ".*")
|
||||||
|
sRegEx = sRegEx.Replace("?", ".")
|
||||||
|
Return sRegEx
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function CompareValueToArrayRegEx(ByVal sValue As String, ByVal sValues As String()) As Boolean
|
||||||
|
For Each se As String In sValues
|
||||||
|
If Regex.IsMatch(sValue, WildcardToRegex(se)) Then
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return False
|
||||||
|
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())
|
||||||
|
Dim oFolder As DirectoryInfo
|
||||||
|
Dim bInclude As Boolean
|
||||||
|
Dim bExclude As Boolean
|
||||||
|
Dim lSize As Long = 0
|
||||||
|
|
||||||
|
Try
|
||||||
|
oFolder = New DirectoryInfo(sPath)
|
||||||
|
|
||||||
|
'Files
|
||||||
|
For Each fi As FileInfo In oFolder.EnumerateFiles()
|
||||||
|
If sInclude.Length > 0 Then
|
||||||
|
bInclude = CompareValueToArrayRegEx(fi.Name, sInclude) Or CompareValueToArrayRegEx(Path.GetDirectoryName(sPath), sInclude)
|
||||||
|
Else
|
||||||
|
bInclude = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If sExclude.Length > 0 Then
|
||||||
|
bExclude = CompareValueToArrayRegEx(fi.Name, sExclude) Or CompareValueToArrayRegEx(Path.GetDirectoryName(sPath), sExclude)
|
||||||
|
Else
|
||||||
|
bExclude = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If bInclude And Not bExclude Then
|
||||||
|
lSize += fi.Length
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
'Sub Folders
|
||||||
|
For Each di As DirectoryInfo In oFolder.EnumerateDirectories()
|
||||||
|
If Not ((di.Attributes And FileAttributes.ReparsePoint) = FileAttributes.ReparsePoint) Then
|
||||||
|
If sExclude.Length > 0 Then
|
||||||
|
bExclude = CompareValueToArrayRegEx(di.Name, sExclude)
|
||||||
|
Else
|
||||||
|
bExclude = False
|
||||||
|
End If
|
||||||
|
If Not bExclude Then
|
||||||
|
lSize += GetFolderSize(di.FullName, sInclude, sExclude)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Catch
|
||||||
|
'Do Nothing
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return lSize
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'Format Disk Space Amounts
|
||||||
|
Public Shared Function FormatDiskSpace(ByVal lSize As Long)
|
||||||
|
|
||||||
|
Select Case lSize
|
||||||
|
Case >= 1125899906842624
|
||||||
|
Return FormatString(mgrCommon_PB, Math.Round(lSize / 1125899906842624, 2))
|
||||||
|
Case >= 1099511627776
|
||||||
|
Return FormatString(mgrCommon_TB, Math.Round(lSize / 1099511627776, 2))
|
||||||
|
Case >= 1073741824
|
||||||
|
Return FormatString(mgrCommon_GB, Math.Round(lSize / 1073741824, 2))
|
||||||
|
Case >= 1048576
|
||||||
|
Return FormatString(mgrCommon_MB, Math.Round(lSize / 1048576, 2))
|
||||||
|
Case >= 1024
|
||||||
|
Return FormatString(mgrCommon_KB, Math.Round(lSize / 1024, 2))
|
||||||
|
Case >= 0
|
||||||
|
Return FormatString(mgrCommon_B, lSize)
|
||||||
|
End Select
|
||||||
|
|
||||||
|
Return lSize
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'Get available disk space on a drive (Unix)
|
||||||
|
Private Shared Function GetAvailableDiskSpaceUnix(ByVal sPath As String) As Long
|
||||||
|
Dim prsdf As Process
|
||||||
|
Dim sOutput As String
|
||||||
|
Dim sAvailableSpace As String
|
||||||
|
Try
|
||||||
|
prsdf = New Process
|
||||||
|
prsdf.StartInfo.FileName = "/bin/df"
|
||||||
|
prsdf.StartInfo.Arguments = sPath
|
||||||
|
prsdf.StartInfo.UseShellExecute = False
|
||||||
|
prsdf.StartInfo.RedirectStandardOutput = True
|
||||||
|
prsdf.StartInfo.CreateNoWindow = True
|
||||||
|
prsdf.Start()
|
||||||
|
sOutput = prsdf.StandardOutput.ReadToEnd
|
||||||
|
'Parse df output to grab "Available" value
|
||||||
|
sAvailableSpace = sOutput.Split(vbLf)(1).Split(New Char() {" "}, StringSplitOptions.RemoveEmptyEntries)(3)
|
||||||
|
'Return value in bytes
|
||||||
|
Return CLng(sAvailableSpace) * 1024
|
||||||
|
Catch
|
||||||
|
Return 0
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'Get available disk space on a drive (Windows)
|
||||||
|
Private Shared Function GetAvailableDiskSpaceWindows(ByVal sPath As String) As Long
|
||||||
|
Dim oDrive As DriveInfo
|
||||||
|
Dim lAvailableSpace As Long = 0
|
||||||
|
Try
|
||||||
|
oDrive = New DriveInfo(Path.GetPathRoot(sPath))
|
||||||
|
lAvailableSpace = oDrive.AvailableFreeSpace
|
||||||
|
Catch
|
||||||
|
'Do Nothing
|
||||||
|
End Try
|
||||||
|
Return lAvailableSpace
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'Get available disk space on a drive
|
||||||
|
Public Shared Function GetAvailableDiskSpace(ByVal sPath As String) As Long
|
||||||
|
If IsUnix() Then
|
||||||
|
Return GetAvailableDiskSpaceUnix(sPath)
|
||||||
|
Else
|
||||||
|
Return GetAvailableDiskSpaceWindows(sPath)
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
'Delete file based on OS type
|
'Delete file based on OS type
|
||||||
Public Shared Sub DeleteFile(ByVal sPath As String, Optional ByVal bRecycle As Boolean = True)
|
Public Shared Sub DeleteFile(ByVal sPath As String, Optional ByVal bRecycle As Boolean = True)
|
||||||
If File.Exists(sPath) Then
|
If File.Exists(sPath) Then
|
||||||
@@ -224,24 +426,6 @@ Public Class mgrCommon
|
|||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Get a file size
|
|
||||||
Public Shared Function GetFileSize(ByVal sFile As String) As String
|
|
||||||
Dim oFileInfo As FileInfo
|
|
||||||
Dim dFileSize As Double
|
|
||||||
|
|
||||||
Try
|
|
||||||
oFileInfo = New FileInfo(sFile)
|
|
||||||
dFileSize = oFileInfo.Length
|
|
||||||
If dFileSize > 1048576 Then
|
|
||||||
Return FormatString(App_MB, Math.Round(dFileSize / 1048576, 2).ToString)
|
|
||||||
Else
|
|
||||||
Return FormatString(App_KB, Math.Round(dFileSize / 1024, 2).ToString)
|
|
||||||
End If
|
|
||||||
Catch ex As Exception
|
|
||||||
Return String.Empty
|
|
||||||
End Try
|
|
||||||
End Function
|
|
||||||
|
|
||||||
'Handles no extra parameters
|
'Handles no extra parameters
|
||||||
Public Shared Function ShowMessage(ByVal sMsg As String, ByVal oType As MsgBoxStyle) As MsgBoxResult
|
Public Shared Function ShowMessage(ByVal sMsg As String, ByVal oType As MsgBoxStyle) As MsgBoxResult
|
||||||
Dim oResult As MsgBoxResult
|
Dim oResult As MsgBoxResult
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ Public Class mgrMonitorList
|
|||||||
oGame.MonitorOnly = CBool(dr("MonitorOnly"))
|
oGame.MonitorOnly = CBool(dr("MonitorOnly"))
|
||||||
oGame.BackupLimit = CInt(dr("BackupLimit"))
|
oGame.BackupLimit = CInt(dr("BackupLimit"))
|
||||||
oGame.CleanFolder = CBool(dr("CleanFolder"))
|
oGame.CleanFolder = CBool(dr("CleanFolder"))
|
||||||
|
If Not IsDBNull(dr("Parameter")) Then oGame.Parameter = CStr(dr("Parameter"))
|
||||||
|
|
||||||
Return oGame
|
Return oGame
|
||||||
End Function
|
End Function
|
||||||
@@ -56,6 +57,7 @@ Public Class mgrMonitorList
|
|||||||
hshParams.Add("MonitorOnly", oGame.MonitorOnly)
|
hshParams.Add("MonitorOnly", oGame.MonitorOnly)
|
||||||
hshParams.Add("BackupLimit", oGame.BackupLimit)
|
hshParams.Add("BackupLimit", oGame.BackupLimit)
|
||||||
hshParams.Add("CleanFolder", oGame.CleanFolder)
|
hshParams.Add("CleanFolder", oGame.CleanFolder)
|
||||||
|
hshParams.Add("Parameter", oGame.Parameter)
|
||||||
|
|
||||||
Return hshParams
|
Return hshParams
|
||||||
End Function
|
End Function
|
||||||
@@ -96,7 +98,7 @@ Public Class mgrMonitorList
|
|||||||
Dim hshParams As Hashtable
|
Dim hshParams As Hashtable
|
||||||
|
|
||||||
sSQL = "INSERT INTO monitorlist VALUES (@ID, @Name, @Process, @Path, @AbsolutePath, @FolderSave, @FileType, @TimeStamp, "
|
sSQL = "INSERT INTO monitorlist VALUES (@ID, @Name, @Process, @Path, @AbsolutePath, @FolderSave, @FileType, @TimeStamp, "
|
||||||
sSQL &= "@ExcludeList, @ProcessPath, @Icon, @Hours, @Version, @Company, @Enabled, @MonitorOnly, @BackupLimit, @CleanFolder)"
|
sSQL &= "@ExcludeList, @ProcessPath, @Icon, @Hours, @Version, @Company, @Enabled, @MonitorOnly, @BackupLimit, @CleanFolder, @Parameter)"
|
||||||
|
|
||||||
'Parameters
|
'Parameters
|
||||||
hshParams = SetCoreParameters(oGame)
|
hshParams = SetCoreParameters(oGame)
|
||||||
@@ -112,7 +114,7 @@ Public Class mgrMonitorList
|
|||||||
|
|
||||||
sSQL = "UPDATE monitorlist SET Name=@Name, Process=@Process, Path=@Path, AbsolutePath=@AbsolutePath, FolderSave=@FolderSave, "
|
sSQL = "UPDATE monitorlist SET Name=@Name, Process=@Process, Path=@Path, AbsolutePath=@AbsolutePath, FolderSave=@FolderSave, "
|
||||||
sSQL &= "FileType=@FileType, TimeStamp=@TimeStamp, ExcludeList=@ExcludeList, ProcessPath=@ProcessPath, Icon=@Icon, "
|
sSQL &= "FileType=@FileType, TimeStamp=@TimeStamp, ExcludeList=@ExcludeList, ProcessPath=@ProcessPath, Icon=@Icon, "
|
||||||
sSQL &= "Hours=@Hours, Version=@Version, Company=@Company, Enabled=@Enabled, MonitorOnly=@MonitorOnly, BackupLimit=@BackupLimit, CleanFolder=@CleanFolder WHERE MonitorID=@ID"
|
sSQL &= "Hours=@Hours, Version=@Version, Company=@Company, Enabled=@Enabled, MonitorOnly=@MonitorOnly, BackupLimit=@BackupLimit, CleanFolder=@CleanFolder, Parameter=@Parameter WHERE MonitorID=@ID"
|
||||||
|
|
||||||
'Parameters
|
'Parameters
|
||||||
hshParams = SetCoreParameters(oGame)
|
hshParams = SetCoreParameters(oGame)
|
||||||
@@ -266,6 +268,31 @@ Public Class mgrMonitorList
|
|||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function DoDuplicateParameterCheck(ByVal sProcess As String, ByVal sParameter As String, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local, Optional ByVal sExcludeID As String = "") As Boolean
|
||||||
|
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||||
|
Dim sSQL As String
|
||||||
|
Dim oData As DataSet
|
||||||
|
Dim hshParams As New Hashtable
|
||||||
|
|
||||||
|
sSQL = "SELECT * FROM monitorlist WHERE Process = @Process AND Parameter = @Parameter"
|
||||||
|
|
||||||
|
hshParams.Add("Process", sProcess)
|
||||||
|
hshParams.Add("Parameter", sParameter)
|
||||||
|
|
||||||
|
If sExcludeID <> String.Empty Then
|
||||||
|
sSQL &= " AND MonitorID <> @MonitorID"
|
||||||
|
hshParams.Add("MonitorID", sExcludeID)
|
||||||
|
End If
|
||||||
|
|
||||||
|
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||||
|
|
||||||
|
If oData.Tables(0).Rows.Count > 0 Then
|
||||||
|
Return True
|
||||||
|
Else
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
'Sync Functions
|
'Sync Functions
|
||||||
Public Shared Sub DoListAddUpdateSync(ByVal hshGames As Hashtable, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local,
|
Public Shared Sub DoListAddUpdateSync(ByVal hshGames As Hashtable, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local,
|
||||||
Optional ByVal eSyncFields As clsGame.eOptionalSyncFields = clsGame.eOptionalSyncFields.None)
|
Optional ByVal eSyncFields As clsGame.eOptionalSyncFields = clsGame.eOptionalSyncFields.None)
|
||||||
@@ -317,11 +344,11 @@ Public Class mgrMonitorList
|
|||||||
sVersion = "(SELECT Version FROM monitorlist WHERE MonitorID=@ID)"
|
sVersion = "(SELECT Version FROM monitorlist WHERE MonitorID=@ID)"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
sSQL = "INSERT OR REPLACE INTO monitorlist (MonitorID, Name, Process, Path, AbsolutePath, FolderSave, FileType, TimeStamp, ExcludeList, ProcessPath, Icon, Hours, Version, Company, Enabled, MonitorOnly, BackupLimit, CleanFolder) "
|
sSQL = "INSERT OR REPLACE INTO monitorlist (MonitorID, Name, Process, Path, AbsolutePath, FolderSave, FileType, TimeStamp, ExcludeList, ProcessPath, Icon, Hours, Version, Company, Enabled, MonitorOnly, BackupLimit, CleanFolder, Parameter) "
|
||||||
sSQL &= "VALUES (@ID, @Name, @Process, @Path, @AbsolutePath, @FolderSave, @FileType, "
|
sSQL &= "VALUES (@ID, @Name, @Process, @Path, @AbsolutePath, @FolderSave, @FileType, "
|
||||||
sSQL &= sTimeStamp & ", @ExcludeList, " & sGamePath & ", "
|
sSQL &= sTimeStamp & ", @ExcludeList, " & sGamePath & ", "
|
||||||
sSQL &= sIcon & ", @Hours, " & sVersion & ", "
|
sSQL &= sIcon & ", @Hours, " & sVersion & ", "
|
||||||
sSQL &= sCompany & ", " & sMonitorGame & ", @MonitorOnly, " & sBackupLimit & ",@CleanFolder);"
|
sSQL &= sCompany & ", " & sMonitorGame & ", @MonitorOnly, " & sBackupLimit & ", @CleanFolder, @Parameter);"
|
||||||
|
|
||||||
For Each oGame As clsGame In hshGames.Values
|
For Each oGame As clsGame In hshGames.Values
|
||||||
hshParams = New Hashtable
|
hshParams = New Hashtable
|
||||||
@@ -338,6 +365,7 @@ Public Class mgrMonitorList
|
|||||||
hshParams.Add("Hours", oGame.Hours)
|
hshParams.Add("Hours", oGame.Hours)
|
||||||
hshParams.Add("MonitorOnly", oGame.MonitorOnly)
|
hshParams.Add("MonitorOnly", oGame.MonitorOnly)
|
||||||
hshParams.Add("CleanFolder", oGame.CleanFolder)
|
hshParams.Add("CleanFolder", oGame.CleanFolder)
|
||||||
|
hshParams.Add("Parameter", oGame.Parameter)
|
||||||
|
|
||||||
'Optional Parameters
|
'Optional Parameters
|
||||||
If (eSyncFields And clsGame.eOptionalSyncFields.Company) = clsGame.eOptionalSyncFields.Company Then
|
If (eSyncFields And clsGame.eOptionalSyncFields.Company) = clsGame.eOptionalSyncFields.Company Then
|
||||||
@@ -471,12 +499,13 @@ Public Class mgrMonitorList
|
|||||||
Private Shared Function BuildFilterQuery(ByVal oTagFilters As List(Of clsTag), ByVal hshStringFilters As Hashtable, eFilterType As frmFilter.eFilterType, ByRef hshParams As Hashtable) As String
|
Private Shared Function BuildFilterQuery(ByVal oTagFilters As List(Of clsTag), ByVal hshStringFilters As Hashtable, eFilterType As frmFilter.eFilterType, ByRef hshParams As Hashtable) As String
|
||||||
Dim sSQL As String = String.Empty
|
Dim sSQL As String = String.Empty
|
||||||
Dim iCounter As Integer = 0
|
Dim iCounter As Integer = 0
|
||||||
|
Dim sBaseSelect As String = "MonitorID, Name, Process, Path, AbsolutePath, FolderSave, FileType, TimeStamp, ExcludeList, ProcessPath, Icon, Hours, Version, Company, Enabled, MonitorOnly, BackupLimit, CleanFolder, Parameter FROM monitorlist"
|
||||||
|
|
||||||
Select Case eFilterType
|
Select Case eFilterType
|
||||||
Case frmFilter.eFilterType.NoFilter
|
Case frmFilter.eFilterType.NoFilter
|
||||||
sSQL = "SELECT MonitorID, Name, Process, Path, AbsolutePath, FolderSave, FileType, TimeStamp, ExcludeList, ProcessPath, Icon, Hours, Version, Company, Enabled, MonitorOnly, BackupLimit, CleanFolder FROM monitorlist ORDER BY Name Asc"
|
sSQL = "SELECT " & sBaseSelect & " ORDER BY Name Asc"
|
||||||
Case frmFilter.eFilterType.FieldAnd, frmFilter.eFilterType.FieldOr
|
Case frmFilter.eFilterType.FieldAnd, frmFilter.eFilterType.FieldOr
|
||||||
sSQL = "SELECT MonitorID, Name, Process, Path, AbsolutePath, FolderSave, FileType, TimeStamp, ExcludeList, ProcessPath, Icon, Hours, Version, Company, Enabled, MonitorOnly, BackupLimit, CleanFolder FROM monitorlist"
|
sSQL = "SELECT " & sBaseSelect
|
||||||
|
|
||||||
If hshStringFilters.Count > 0 Then
|
If hshStringFilters.Count > 0 Then
|
||||||
sSQL &= " WHERE ("
|
sSQL &= " WHERE ("
|
||||||
@@ -498,7 +527,7 @@ Public Class mgrMonitorList
|
|||||||
End If
|
End If
|
||||||
sSQL &= " ORDER BY Name Asc"
|
sSQL &= " ORDER BY Name Asc"
|
||||||
Case frmFilter.eFilterType.AnyTag
|
Case frmFilter.eFilterType.AnyTag
|
||||||
sSQL = "SELECT DISTINCT MonitorID, Name, Process, Path, AbsolutePath, FolderSave, FileType, TimeStamp, ExcludeList, ProcessPath, Icon, Hours, Version, Company, Enabled, MonitorOnly, BackupLimit, CleanFolder FROM monitorlist "
|
sSQL = "SELECT DISTINCT " & sBaseSelect
|
||||||
sSQL &= " NATURAL JOIN gametags WHERE gametags.TagID IN ("
|
sSQL &= " NATURAL JOIN gametags WHERE gametags.TagID IN ("
|
||||||
|
|
||||||
For Each oTag As clsTag In oTagFilters
|
For Each oTag As clsTag In oTagFilters
|
||||||
@@ -510,7 +539,7 @@ Public Class mgrMonitorList
|
|||||||
sSQL = sSQL.TrimEnd(",")
|
sSQL = sSQL.TrimEnd(",")
|
||||||
sSQL &= ") ORDER BY Name Asc"
|
sSQL &= ") ORDER BY Name Asc"
|
||||||
Case frmFilter.eFilterType.AllTags
|
Case frmFilter.eFilterType.AllTags
|
||||||
sSQL = "SELECT MonitorID, Name, Process, Path, AbsolutePath, FolderSave, FileType, TimeStamp, ExcludeList, ProcessPath, Icon, Hours, Version, Company, Enabled, MonitorOnly, BackupLimit, CleanFolder FROM monitorlist WHERE MonitorID IN "
|
sSQL = "SELECT " & sBaseSelect & " WHERE MonitorID IN "
|
||||||
|
|
||||||
For Each oTag As clsTag In oTagFilters
|
For Each oTag As clsTag In oTagFilters
|
||||||
sSQL &= "(SELECT MonitorID FROM gametags WHERE monitorlist.MonitorID = gametags.MonitorID And TagID = @TagID" & iCounter & ")"
|
sSQL &= "(SELECT MonitorID FROM gametags WHERE monitorlist.MonitorID = gametags.MonitorID And TagID = @TagID" & iCounter & ")"
|
||||||
@@ -523,7 +552,7 @@ Public Class mgrMonitorList
|
|||||||
|
|
||||||
sSQL &= " ORDER BY Name Asc"
|
sSQL &= " ORDER BY Name Asc"
|
||||||
Case frmFilter.eFilterType.NoTags
|
Case frmFilter.eFilterType.NoTags
|
||||||
sSQL = "SELECT MonitorID, Name, Process, Path, AbsolutePath, FolderSave, FileType, TimeStamp, ExcludeList, ProcessPath, Icon, Hours, Version, Company, Enabled, MonitorOnly, BackupLimit, CleanFolder FROM monitorlist WHERE MonitorID NOT IN (SELECT MonitorID FROM gametags) ORDER BY Name Asc"
|
sSQL = "SELECT " & sBaseSelect & " WHERE MonitorID NOT IN (SELECT MonitorID FROM gametags) ORDER BY Name Asc"
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
Return sSQL
|
Return sSQL
|
||||||
@@ -577,6 +606,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"))
|
||||||
|
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)
|
||||||
Next
|
Next
|
||||||
|
|||||||
@@ -335,7 +335,7 @@ Public Class mgrPath
|
|||||||
Dim sDefaultFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
|
Dim sDefaultFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
|
||||||
Dim sNewPath As String
|
Dim sNewPath As String
|
||||||
|
|
||||||
sNewPath = mgrCommon.OpenFolderBrowser(mgrPath_ChoosePath, sDefaultFolder, False)
|
sNewPath = mgrCommon.OpenFolderBrowser("Manual_Game_Location", mgrPath_ChoosePath, sDefaultFolder, False)
|
||||||
|
|
||||||
Return sNewPath
|
Return sNewPath
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
Imports System.Diagnostics
|
Imports System.IO
|
||||||
Imports System.IO
|
Imports System.Management
|
||||||
Imports System.Threading
|
|
||||||
|
|
||||||
Public Class mgrProcesses
|
Public Class mgrProcesses
|
||||||
|
|
||||||
@@ -11,6 +10,7 @@ Public Class mgrProcesses
|
|||||||
Private oDuplicateGames As New ArrayList
|
Private oDuplicateGames As New ArrayList
|
||||||
Private bDuplicates As Boolean
|
Private bDuplicates As Boolean
|
||||||
Private bVerified As Boolean = False
|
Private bVerified As Boolean = False
|
||||||
|
Private sFullCommand As String = String.Empty
|
||||||
|
|
||||||
Property FoundProcess As Process
|
Property FoundProcess As Process
|
||||||
Get
|
Get
|
||||||
@@ -72,17 +72,63 @@ Public Class mgrProcesses
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private Sub VerifyDuplicate(oGame As clsGame, hshScanList As Hashtable)
|
Property FullCommand As String
|
||||||
|
Get
|
||||||
|
Return sFullCommand
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
sFullCommand = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Function HandleDuplicates(hshScanList As Hashtable) As Boolean
|
||||||
Dim sProcess As String
|
Dim sProcess As String
|
||||||
bDuplicates = True
|
bDuplicates = True
|
||||||
oDuplicateGames.Clear()
|
oDuplicateGames.Clear()
|
||||||
|
|
||||||
For Each o As clsGame In hshScanList.Values
|
For Each o As clsGame In hshScanList.Values
|
||||||
sProcess = o.ProcessName.Split(":")(0)
|
sProcess = o.ProcessName.Split(":")(0)
|
||||||
|
|
||||||
If o.Duplicate = True And sProcess = oGame.TrueProcess Then
|
If o.Duplicate = True And sProcess = oGame.TrueProcess Then
|
||||||
|
If o.Parameter <> String.Empty And FullCommand.Contains(o.Parameter) Then
|
||||||
|
oGame = o.ShallowCopy
|
||||||
|
Return True
|
||||||
|
ElseIf o.Parameter = String.Empty Then
|
||||||
oDuplicateGames.Add(o.ShallowCopy)
|
oDuplicateGames.Add(o.ShallowCopy)
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
If oDuplicateGames.Count = 1 Then
|
||||||
|
oGame = DirectCast(oDuplicateGames(0), clsGame).ShallowCopy
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'This function will only work correctly on Windows
|
||||||
|
Private Sub GetWindowsCommand(ByVal prs As Process)
|
||||||
|
FullCommand = String.Empty
|
||||||
|
Try
|
||||||
|
Using searcher As New ManagementObjectSearcher("SELECT CommandLine FROM Win32_Process WHERE ProcessId = " + prs.Id.ToString)
|
||||||
|
For Each o As ManagementObject In searcher.Get()
|
||||||
|
FullCommand &= o("CommandLine") & " "
|
||||||
|
Next
|
||||||
|
End Using
|
||||||
|
Catch ex As Exception
|
||||||
|
'Do Nothing
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'This function will only work correctly on Unix
|
||||||
|
Private Sub GetUnixCommand(ByVal prs As Process)
|
||||||
|
FullCommand = String.Empty
|
||||||
|
Try
|
||||||
|
FullCommand = File.ReadAllText("/proc/" & prs.Id.ToString() & "/cmdline").Replace(vbNullChar, " ")
|
||||||
|
Catch ex As Exception
|
||||||
|
'Do Nothing
|
||||||
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'This function will only work correctly on Unix
|
'This function will only work correctly on Unix
|
||||||
@@ -99,19 +145,18 @@ Public Class mgrProcesses
|
|||||||
'This function will only work correctly on Unix
|
'This function will only work correctly on Unix
|
||||||
Private Function GetUnixSymLinkDirectory(ByVal prs As Process) As String
|
Private Function GetUnixSymLinkDirectory(ByVal prs As Process) As String
|
||||||
Dim prsls As Process
|
Dim prsls As Process
|
||||||
Dim slsinfo As String()
|
Dim slsinfo As String
|
||||||
|
|
||||||
'This is the best way I can think of to determine the end point of a symlink without doing even more crazy shit
|
|
||||||
Try
|
Try
|
||||||
prsls = New Process
|
prsls = New Process
|
||||||
prsls.StartInfo.FileName = "/bin/bash"
|
prsls.StartInfo.FileName = "/bin/readlink"
|
||||||
prsls.StartInfo.Arguments = "-c ""ls -l /proc/" & prs.Id.ToString & " | grep cwd"""
|
prsls.StartInfo.Arguments = "-f /proc/" & prs.Id.ToString & "/cwd"
|
||||||
prsls.StartInfo.UseShellExecute = False
|
prsls.StartInfo.UseShellExecute = False
|
||||||
prsls.StartInfo.RedirectStandardOutput = True
|
prsls.StartInfo.RedirectStandardOutput = True
|
||||||
prsls.StartInfo.CreateNoWindow = True
|
prsls.StartInfo.CreateNoWindow = True
|
||||||
prsls.Start()
|
prsls.Start()
|
||||||
slsinfo = prsls.StandardOutput.ReadToEnd().Split(">")
|
slsinfo = prsls.StandardOutput.ReadToEnd()
|
||||||
Return slsinfo(slsinfo.Length - 1).Trim
|
Return slsinfo.Trim()
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Return String.Empty
|
Return String.Empty
|
||||||
End Try
|
End Try
|
||||||
@@ -153,13 +198,26 @@ Public Class mgrProcesses
|
|||||||
prsFoundProcess = prsCurrent
|
prsFoundProcess = prsCurrent
|
||||||
oGame = DirectCast(hshScanList.Item(sProcessCheck), clsGame).ShallowCopy
|
oGame = DirectCast(hshScanList.Item(sProcessCheck), clsGame).ShallowCopy
|
||||||
|
|
||||||
|
If mgrCommon.IsUnix Then
|
||||||
|
GetUnixCommand(prsCurrent)
|
||||||
|
Else
|
||||||
|
GetWindowsCommand(prsCurrent)
|
||||||
|
End If
|
||||||
|
|
||||||
If oGame.Duplicate = True Then
|
If oGame.Duplicate = True Then
|
||||||
VerifyDuplicate(oGame, hshScanList)
|
If HandleDuplicates(hshScanList) Then
|
||||||
|
bDuplicates = False
|
||||||
|
oDuplicateGames.Clear()
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
bDuplicates = False
|
bDuplicates = False
|
||||||
oDuplicateGames.Clear()
|
oDuplicateGames.Clear()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Duplicate And DuplicateList.Count = 0 Then Return False
|
||||||
|
|
||||||
|
If oGame.Parameter <> String.Empty And Not Duplicate And Not FullCommand.Contains(oGame.Parameter) Then Return False
|
||||||
|
|
||||||
If Not oGame.AbsolutePath Or oGame.Duplicate Then
|
If Not oGame.AbsolutePath Or oGame.Duplicate Then
|
||||||
Try
|
Try
|
||||||
If Not bWineProcess Then
|
If Not bWineProcess Then
|
||||||
|
|||||||
@@ -76,11 +76,14 @@ Public Class mgrSQLite
|
|||||||
"SupressBackup BOOLEAN NOT NULL, SupressBackupThreshold INTEGER NOT NULL, CompressionLevel INTEGER NOT NULL, Custom7zArguments TEXT, " &
|
"SupressBackup BOOLEAN NOT NULL, SupressBackupThreshold INTEGER NOT NULL, CompressionLevel INTEGER NOT NULL, Custom7zArguments TEXT, " &
|
||||||
"Custom7zLocation TEXT, SyncFields INTEGER NOT NULL, AutoSaveLog BOOLEAN NOT NULL, AutoRestore BOOLEAN NOT NULL, AutoMark BOOLEAN NOT NULL);"
|
"Custom7zLocation TEXT, SyncFields INTEGER NOT NULL, AutoSaveLog BOOLEAN NOT NULL, AutoRestore BOOLEAN NOT NULL, AutoMark BOOLEAN NOT NULL);"
|
||||||
|
|
||||||
|
'Add Tables (SavedPath)
|
||||||
|
sSql &= "CREATE TABLE savedpath (PathName TEXT NOT NULL PRIMARY KEY, Path TEXT NOT NULL);"
|
||||||
|
|
||||||
'Add Tables (Monitor List)
|
'Add Tables (Monitor List)
|
||||||
sSql &= "CREATE TABLE monitorlist (MonitorID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL, Process TEXT NOT NULL, Path TEXT, " &
|
sSql &= "CREATE TABLE monitorlist (MonitorID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL, Process TEXT NOT NULL, Path TEXT, " &
|
||||||
"AbsolutePath BOOLEAN NOT NULL, FolderSave BOOLEAN NOT NULL, FileType TEXT, TimeStamp BOOLEAN NOT NULL, ExcludeList TEXT NOT NULL, " &
|
"AbsolutePath BOOLEAN NOT NULL, FolderSave BOOLEAN NOT NULL, FileType TEXT, TimeStamp BOOLEAN NOT NULL, ExcludeList TEXT NOT NULL, " &
|
||||||
"ProcessPath TEXT, Icon TEXT, Hours REAL, Version TEXT, Company TEXT, Enabled BOOLEAN NOT NULL, MonitorOnly BOOLEAN NOT NULL, " &
|
"ProcessPath TEXT, Icon TEXT, Hours REAL, Version TEXT, Company TEXT, Enabled BOOLEAN NOT NULL, MonitorOnly BOOLEAN NOT NULL, " &
|
||||||
"BackupLimit INTEGER NOT NULL, CleanFolder BOOLEAN NOT NULL, PRIMARY KEY(Name, Process));"
|
"BackupLimit INTEGER NOT NULL, CleanFolder BOOLEAN NOT NULL, Parameter TEXT, PRIMARY KEY(Name, Process));"
|
||||||
|
|
||||||
'Add Tables (Tags)
|
'Add Tables (Tags)
|
||||||
sSql &= "CREATE TABLE tags (TagID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL PRIMARY KEY); "
|
sSql &= "CREATE TABLE tags (TagID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL PRIMARY KEY); "
|
||||||
@@ -117,7 +120,7 @@ Public Class mgrSQLite
|
|||||||
sSql = "CREATE TABLE monitorlist (MonitorID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL, Process TEXT NOT NULL, Path TEXT, " &
|
sSql = "CREATE TABLE monitorlist (MonitorID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL, Process TEXT NOT NULL, Path TEXT, " &
|
||||||
"AbsolutePath BOOLEAN NOT NULL, FolderSave BOOLEAN NOT NULL, FileType TEXT, TimeStamp BOOLEAN NOT NULL, ExcludeList TEXT NOT NULL, " &
|
"AbsolutePath BOOLEAN NOT NULL, FolderSave BOOLEAN NOT NULL, FileType TEXT, TimeStamp BOOLEAN NOT NULL, ExcludeList TEXT NOT NULL, " &
|
||||||
"ProcessPath TEXT, Icon TEXT, Hours REAL, Version TEXT, Company TEXT, Enabled BOOLEAN NOT NULL, MonitorOnly BOOLEAN NOT NULL, " &
|
"ProcessPath TEXT, Icon TEXT, Hours REAL, Version TEXT, Company TEXT, Enabled BOOLEAN NOT NULL, MonitorOnly BOOLEAN NOT NULL, " &
|
||||||
"BackupLimit INTEGER NOT NULL, CleanFolder BOOLEAN NOT NULL, PRIMARY KEY(Name, Process));"
|
"BackupLimit INTEGER NOT NULL, CleanFolder BOOLEAN NOT NULL, Parameter TEXT, PRIMARY KEY(Name, Process));"
|
||||||
|
|
||||||
'Add Tables (Remote Manifest)
|
'Add Tables (Remote Manifest)
|
||||||
sSql &= "CREATE TABLE manifest (ManifestID TEXT NOT NULL PRIMARY KEY, Name TEXT NOT NULL, FileName TEXT NOT NULL, RestorePath TEXT NOT NULL, " &
|
sSql &= "CREATE TABLE manifest (ManifestID TEXT NOT NULL PRIMARY KEY, Name TEXT NOT NULL, FileName TEXT NOT NULL, RestorePath TEXT NOT NULL, " &
|
||||||
@@ -167,6 +170,15 @@ Public Class mgrSQLite
|
|||||||
db.Close()
|
db.Close()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RollBack(ByRef trans As SqliteTransaction)
|
||||||
|
Try
|
||||||
|
trans.Rollback()
|
||||||
|
Catch
|
||||||
|
'SQLite may or may not perform an auto-rollback when certain failures occur, such as disk full or out of memory.
|
||||||
|
'Multiple rollbacks will cause an exception, therefore lets just do nothing when that happens.
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub BuildParams(ByRef command As SqliteCommand, ByRef hshParams As Hashtable)
|
Private Sub BuildParams(ByRef command As SqliteCommand, ByRef hshParams As Hashtable)
|
||||||
For Each de As DictionaryEntry In hshParams
|
For Each de As DictionaryEntry In hshParams
|
||||||
command.Parameters.AddWithValue(de.Key, de.Value)
|
command.Parameters.AddWithValue(de.Key, de.Value)
|
||||||
@@ -186,7 +198,7 @@ Public Class mgrSQLite
|
|||||||
command.ExecuteNonQuery()
|
command.ExecuteNonQuery()
|
||||||
trans.Commit()
|
trans.Commit()
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
trans.Rollback()
|
RollBack(trans)
|
||||||
mgrCommon.ShowMessage(mgrSQLite_ErrorQueryFailure, New String() {sSQL, ex.Message}, MsgBoxStyle.Exclamation)
|
mgrCommon.ShowMessage(mgrSQLite_ErrorQueryFailure, New String() {sSQL, ex.Message}, MsgBoxStyle.Exclamation)
|
||||||
Return False
|
Return False
|
||||||
Finally
|
Finally
|
||||||
@@ -212,7 +224,7 @@ Public Class mgrSQLite
|
|||||||
Next
|
Next
|
||||||
trans.Commit()
|
trans.Commit()
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
trans.Rollback()
|
RollBack(trans)
|
||||||
mgrCommon.ShowMessage(mgrSQLite_ErrorQueryFailure, New String() {sSQL, ex.Message}, MsgBoxStyle.Exclamation)
|
mgrCommon.ShowMessage(mgrSQLite_ErrorQueryFailure, New String() {sSQL, ex.Message}, MsgBoxStyle.Exclamation)
|
||||||
Return False
|
Return False
|
||||||
Finally
|
Finally
|
||||||
@@ -639,6 +651,35 @@ Public Class mgrSQLite
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'1.02 Upgrade
|
||||||
|
If GetDatabaseVersion() < 102 Then
|
||||||
|
If eDatabase = Database.Local Then
|
||||||
|
'Backup DB before starting
|
||||||
|
BackupDB("v101")
|
||||||
|
|
||||||
|
'Add Table (SavedPath)
|
||||||
|
sSQL = "CREATE TABLE savedpath (PathName TEXT NOT NULL PRIMARY KEY, Path TEXT NOT NULL);"
|
||||||
|
|
||||||
|
'Add new field(s)
|
||||||
|
sSQL &= "ALTER TABLE monitorlist ADD COLUMN Parameter TEXT;"
|
||||||
|
|
||||||
|
sSQL &= "PRAGMA user_version=102"
|
||||||
|
|
||||||
|
RunParamQuery(sSQL, New Hashtable)
|
||||||
|
End If
|
||||||
|
If eDatabase = Database.Remote Then
|
||||||
|
'Backup DB before starting
|
||||||
|
BackupDB("v101")
|
||||||
|
|
||||||
|
'Add new field(s)
|
||||||
|
sSQL = "ALTER TABLE monitorlist ADD COLUMN Parameter TEXT;"
|
||||||
|
|
||||||
|
sSQL &= "PRAGMA user_version=102"
|
||||||
|
|
||||||
|
RunParamQuery(sSQL, New Hashtable)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Function GetDBSize() As Long
|
Public Function GetDBSize() As Long
|
||||||
@@ -646,6 +687,10 @@ Public Class mgrSQLite
|
|||||||
Return Math.Round(oFileInfo.Length / 1024, 2)
|
Return Math.Round(oFileInfo.Length / 1024, 2)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function ReportVersion() As String
|
||||||
|
Return SqliteConnection.SQLiteVersion
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Sub CompactDatabase()
|
Public Sub CompactDatabase()
|
||||||
Dim sSQL As String
|
Dim sSQL As String
|
||||||
Dim command As SQLiteCommand
|
Dim command As SQLiteCommand
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
Public Class mgrSavedPath
|
||||||
|
|
||||||
|
|
||||||
|
Private Shared Function MapToObject(ByVal dr As DataRow) As clsSavedPath
|
||||||
|
Dim oSavedPath As New clsSavedPath
|
||||||
|
|
||||||
|
oSavedPath.PathName = CStr(dr("PathName"))
|
||||||
|
oSavedPath.Path = CStr(dr("Path"))
|
||||||
|
|
||||||
|
Return oSavedPath
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Shared Function SetCoreParameters(ByVal oSavedPath As clsSavedPath) As Hashtable
|
||||||
|
Dim hshParams As New Hashtable
|
||||||
|
|
||||||
|
hshParams.Add("PathName", oSavedPath.PathName)
|
||||||
|
hshParams.Add("Path", oSavedPath.Path)
|
||||||
|
|
||||||
|
Return hshParams
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function GetPathByName(ByVal sPathName As String) As clsSavedPath
|
||||||
|
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||||
|
Dim oData As DataSet
|
||||||
|
Dim sSQL As String
|
||||||
|
Dim hshParams As New Hashtable
|
||||||
|
Dim oSavedPath As New clsSavedPath
|
||||||
|
|
||||||
|
sSQL = "SELECT PathName, Path from savedpath WHERE PathName=@PathName;"
|
||||||
|
|
||||||
|
hshParams.Add("PathName", sPathName)
|
||||||
|
|
||||||
|
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||||
|
|
||||||
|
For Each dr As DataRow In oData.Tables(0).Rows
|
||||||
|
oSavedPath = MapToObject(dr)
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return oSavedPath
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Sub AddUpdatePath(ByVal oSavedPath As clsSavedPath)
|
||||||
|
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||||
|
Dim sSQL As String
|
||||||
|
Dim hshParams As Hashtable
|
||||||
|
|
||||||
|
sSQL = "INSERT OR REPLACE INTO savedpath (PathName, Path) VALUES (@PathName, @Path);"
|
||||||
|
|
||||||
|
hshParams = SetCoreParameters(oSavedPath)
|
||||||
|
|
||||||
|
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -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.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)
|
||||||
Next
|
Next
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ Imports System.Runtime.InteropServices
|
|||||||
<Assembly: AssemblyDescription("Game Backup Monitor")>
|
<Assembly: AssemblyDescription("Game Backup Monitor")>
|
||||||
<Assembly: AssemblyCompany("Michael J. Seiferling")>
|
<Assembly: AssemblyCompany("Michael J. Seiferling")>
|
||||||
<Assembly: AssemblyProduct("Game Backup Monitor")>
|
<Assembly: AssemblyProduct("Game Backup Monitor")>
|
||||||
<Assembly: AssemblyCopyright("Copyright © 2016 Michael J. Seiferling")>
|
<Assembly: AssemblyCopyright("Copyright © 2017 Michael J. Seiferling")>
|
||||||
<Assembly: AssemblyTrademark("")>
|
<Assembly: AssemblyTrademark("")>
|
||||||
|
|
||||||
<Assembly: ComVisible(False)>
|
<Assembly: ComVisible(False)>
|
||||||
@@ -33,7 +33,7 @@ Imports System.Runtime.InteropServices
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("1.0.1.*")>
|
<Assembly: AssemblyVersion("1.0.3.*")>
|
||||||
<Assembly: AssemblyFileVersion("1.0.1.0")>
|
<Assembly: AssemblyFileVersion("1.0.3.0")>
|
||||||
|
|
||||||
<Assembly: NeutralResourcesLanguageAttribute("en")>
|
<Assembly: NeutralResourcesLanguageAttribute("en")>
|
||||||
Generated
+139
-22
@@ -78,6 +78,15 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to GBM is busy with an open window on your desktop..
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property App_ErrorFocus() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("App_ErrorFocus", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to This function is currently not available on a Unix based operating system..
|
''' Looks up a localized string similar to This function is currently not available on a Unix based operating system..
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -96,24 +105,6 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
|
||||||
''' Looks up a localized string similar to [PARAM] KB.
|
|
||||||
'''</summary>
|
|
||||||
Friend ReadOnly Property App_KB() As String
|
|
||||||
Get
|
|
||||||
Return ResourceManager.GetString("App_KB", resourceCulture)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
'''<summary>
|
|
||||||
''' Looks up a localized string similar to [PARAM] MB.
|
|
||||||
'''</summary>
|
|
||||||
Friend ReadOnly Property App_MB() As String
|
|
||||||
Get
|
|
||||||
Return ResourceManager.GetString("App_MB", resourceCulture)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to Game Backup Monitor.
|
''' Looks up a localized string similar to Game Backup Monitor.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -1653,6 +1644,15 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to A game with this exact process and parameter already exists..
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property frmGameManager_ErrorProcessParameterDupe() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("frmGameManager_ErrorProcessParameterDupe", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to You must enter a valid game name..
|
''' Looks up a localized string similar to You must enter a valid game name..
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -1860,6 +1860,15 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to Parameter:.
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property frmGameManager_lblParameter() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("frmGameManager_lblParameter", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to Process:.
|
''' Looks up a localized string similar to Process:.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -2284,7 +2293,7 @@ Namespace My.Resources
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to Game Backup Monitor[BR]Version: [PARAM] ([PARAM])[BR]Build: [PARAM][BR][PARAM][BR][BR]This program comes with ABSOLUTELY NO WARRANTY.[BR]This is free software, and you are welcome to redistribute it under certain conditions.[BR][BR]See gpl-3.0.html in the program folder for details..
|
''' Looks up a localized string similar to Game Backup Monitor[BR]Version: [PARAM] ([PARAM])[BR]Build: [PARAM][BR]SQLite: [PARAM][BR][BR][PARAM][BR][BR]This program comes with ABSOLUTELY NO WARRANTY.[BR]This is free software, and you are welcome to redistribute it under certain conditions.[BR][BR]See gpl-3.0.html in the program folder for details..
|
||||||
'''</summary>
|
'''</summary>
|
||||||
Friend ReadOnly Property frmMain_About() As String
|
Friend ReadOnly Property frmMain_About() As String
|
||||||
Get
|
Get
|
||||||
@@ -4456,6 +4465,33 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to [PARAM] backup failed due to a malformed command..
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property mgrBackup_7zCommandFailure() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("mgrBackup_7zCommandFailure", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to [PARAM] backup failed due to an error..
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property mgrBackup_7zFatalError() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("mgrBackup_7zFatalError", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to [PARAM] backup completed with warnings..
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property mgrBackup_7zWarnings() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("mgrBackup_7zWarnings", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to [PARAM] backup completed..
|
''' Looks up a localized string similar to [PARAM] backup completed..
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -4502,11 +4538,11 @@ Namespace My.Resources
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to [PARAM] backup finished with warnings or errors..
|
''' Looks up a localized string similar to You may not have enough disk space available to perform a backup.[BR][BR]Do you want to continue anyway?.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
Friend ReadOnly Property mgrBackup_BackupWarnings() As String
|
Friend ReadOnly Property mgrBackup_ConfirmDiskSpace() As String
|
||||||
Get
|
Get
|
||||||
Return ResourceManager.GetString("mgrBackup_BackupWarnings", resourceCulture)
|
Return ResourceManager.GetString("mgrBackup_ConfirmDiskSpace", resourceCulture)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -4528,6 +4564,15 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to Backup aborted due to lack of disk space..
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property mgrBackup_ErrorDiskSpace() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("mgrBackup_ErrorDiskSpace", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to An error occured creating a file list: [PARAM].
|
''' Looks up a localized string similar to An error occured creating a file list: [PARAM].
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -4609,6 +4654,24 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to Available Disk Space: [PARAM].
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property mgrCommon_AvailableDiskSpace() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("mgrCommon_AvailableDiskSpace", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to [PARAM] B.
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property mgrCommon_B() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("mgrCommon_B", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to An error has occured writing the text file.[BR][BR][PARAM].
|
''' Looks up a localized string similar to An error has occured writing the text file.[BR][BR][PARAM].
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -4627,6 +4690,33 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to [PARAM] GB.
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property mgrCommon_GB() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("mgrCommon_GB", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to [PARAM] KB.
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property mgrCommon_KB() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("mgrCommon_KB", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to [PARAM] MB.
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property mgrCommon_MB() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("mgrCommon_MB", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to No.
|
''' Looks up a localized string similar to No.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -4636,6 +4726,33 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to [PARAM] PB.
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property mgrCommon_PB() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("mgrCommon_PB", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to [PARAM] Save Folder Size: [PARAM].
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property mgrCommon_SavedGameFolderSize() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("mgrCommon_SavedGameFolderSize", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to [PARAM] TB.
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property mgrCommon_TB() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("mgrCommon_TB", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to Yes.
|
''' Looks up a localized string similar to Yes.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
|
|||||||
@@ -122,7 +122,7 @@
|
|||||||
<value>..\Resources\Admin.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\Admin.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="frmMain_About" xml:space="preserve">
|
<data name="frmMain_About" xml:space="preserve">
|
||||||
<value>Game Backup Monitor[BR]Version: [PARAM] ([PARAM])[BR]Build: [PARAM][BR][PARAM][BR][BR]This program comes with ABSOLUTELY NO WARRANTY.[BR]This is free software, and you are welcome to redistribute it under certain conditions.[BR][BR]See gpl-3.0.html in the program folder for details.</value>
|
<value>Game Backup Monitor[BR]Version: [PARAM] ([PARAM])[BR]Build: [PARAM][BR]SQLite: [PARAM][BR][BR][PARAM][BR][BR]This program comes with ABSOLUTELY NO WARRANTY.[BR]This is free software, and you are welcome to redistribute it under certain conditions.[BR][BR]See gpl-3.0.html in the program folder for details.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="frmMain_ManifestAreadyClean" xml:space="preserve">
|
<data name="frmMain_ManifestAreadyClean" xml:space="preserve">
|
||||||
<value>The local manifest is clean.</value>
|
<value>The local manifest is clean.</value>
|
||||||
@@ -424,12 +424,6 @@
|
|||||||
<data name="App_ConfirmDirty" xml:space="preserve">
|
<data name="App_ConfirmDirty" xml:space="preserve">
|
||||||
<value>There are unsaved changes on this form. Do you want to save?</value>
|
<value>There are unsaved changes on this form. Do you want to save?</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="App_KB" xml:space="preserve">
|
|
||||||
<value>[PARAM] KB</value>
|
|
||||||
</data>
|
|
||||||
<data name="App_MB" xml:space="preserve">
|
|
||||||
<value>[PARAM] MB</value>
|
|
||||||
</data>
|
|
||||||
<data name="frmGameManager_BackupTimeAndName" xml:space="preserve">
|
<data name="frmGameManager_BackupTimeAndName" xml:space="preserve">
|
||||||
<value>[PARAM] ([PARAM])</value>
|
<value>[PARAM] ([PARAM])</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -1303,8 +1297,8 @@
|
|||||||
<data name="mgrBackup_BackupInProgress" xml:space="preserve">
|
<data name="mgrBackup_BackupInProgress" xml:space="preserve">
|
||||||
<value>Backup of [PARAM] in progress...</value>
|
<value>Backup of [PARAM] in progress...</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="mgrBackup_BackupWarnings" xml:space="preserve">
|
<data name="mgrBackup_7zWarnings" xml:space="preserve">
|
||||||
<value>[PARAM] backup finished with warnings or errors.</value>
|
<value>[PARAM] backup completed with warnings.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="mgrBackup_ConfirmManifestConflict" xml:space="preserve">
|
<data name="mgrBackup_ConfirmManifestConflict" xml:space="preserve">
|
||||||
<value>The manifest shows the backup folder contains a backup for [PARAM] that has not been restored on this computer.[BR][BR]Do you want to overwrite this file anyway?</value>
|
<value>The manifest shows the backup folder contains a backup for [PARAM] that has not been restored on this computer.[BR][BR]Do you want to overwrite this file anyway?</value>
|
||||||
@@ -1762,4 +1756,49 @@
|
|||||||
<data name="frmMain_NoCheckSum" xml:space="preserve">
|
<data name="frmMain_NoCheckSum" xml:space="preserve">
|
||||||
<value>The backup file for [PARAM] has no checksum, it cannot be automatically restored.</value>
|
<value>The backup file for [PARAM] has no checksum, it cannot be automatically restored.</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="mgrBackup_ConfirmDiskSpace" xml:space="preserve">
|
||||||
|
<value>You may not have enough disk space available to perform a backup.[BR][BR]Do you want to continue anyway?</value>
|
||||||
|
</data>
|
||||||
|
<data name="mgrBackup_ErrorDiskSpace" xml:space="preserve">
|
||||||
|
<value>Backup aborted due to lack of disk space.</value>
|
||||||
|
</data>
|
||||||
|
<data name="mgrCommon_AvailableDiskSpace" xml:space="preserve">
|
||||||
|
<value>Available Disk Space: [PARAM]</value>
|
||||||
|
</data>
|
||||||
|
<data name="mgrCommon_GB" xml:space="preserve">
|
||||||
|
<value>[PARAM] GB</value>
|
||||||
|
</data>
|
||||||
|
<data name="mgrCommon_KB" xml:space="preserve">
|
||||||
|
<value>[PARAM] KB</value>
|
||||||
|
</data>
|
||||||
|
<data name="mgrCommon_MB" xml:space="preserve">
|
||||||
|
<value>[PARAM] MB</value>
|
||||||
|
</data>
|
||||||
|
<data name="mgrCommon_PB" xml:space="preserve">
|
||||||
|
<value>[PARAM] PB</value>
|
||||||
|
</data>
|
||||||
|
<data name="mgrCommon_SavedGameFolderSize" xml:space="preserve">
|
||||||
|
<value>[PARAM] Save Folder Size: [PARAM]</value>
|
||||||
|
</data>
|
||||||
|
<data name="mgrCommon_TB" xml:space="preserve">
|
||||||
|
<value>[PARAM] TB</value>
|
||||||
|
</data>
|
||||||
|
<data name="frmGameManager_lblParameter" xml:space="preserve">
|
||||||
|
<value>Parameter:</value>
|
||||||
|
</data>
|
||||||
|
<data name="frmGameManager_ErrorProcessParameterDupe" xml:space="preserve">
|
||||||
|
<value>A game with this exact process and parameter already exists.</value>
|
||||||
|
</data>
|
||||||
|
<data name="mgrCommon_B" xml:space="preserve">
|
||||||
|
<value>[PARAM] B</value>
|
||||||
|
</data>
|
||||||
|
<data name="mgrBackup_7zCommandFailure" xml:space="preserve">
|
||||||
|
<value>[PARAM] backup failed due to a malformed command.</value>
|
||||||
|
</data>
|
||||||
|
<data name="mgrBackup_7zFatalError" xml:space="preserve">
|
||||||
|
<value>[PARAM] backup failed due to an error.</value>
|
||||||
|
</data>
|
||||||
|
<data name="App_ErrorFocus" xml:space="preserve">
|
||||||
|
<value>GBM is busy with an open window on your desktop.</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
+7
-15
@@ -1,22 +1,14 @@
|
|||||||
Game Backup Monitor v1.01 Readme
|
Game Backup Monitor v1.03 Readme
|
||||||
http://mikemaximus.github.io/gbm-web/
|
http://mikemaximus.github.io/gbm-web/
|
||||||
gamebackupmonitor@gmail.com
|
gamebackupmonitor@gmail.com
|
||||||
|
|
||||||
April 1, 2017
|
August 2, 2017
|
||||||
|
|
||||||
New in 1.01
|
New in 1.03
|
||||||
|
|
||||||
- (All) Added features to automatically handle new backup files.
|
- (Windows) You can no longer Alt-Tab to GBM while it's minimized to the system tray. This was an unintentional change in v1.02 and caused various bugs.
|
||||||
- Automatically restore new backup files when they are detected.
|
- (Windows) Fixed various issues and inconsistent behavior when using the system tray and menu.
|
||||||
- Automatically mark new backup files as restored if the game isn't installed on the current PC.
|
- (Linux) Free drive space is now checked correctly when performing a backup. GBM now requires "df" (Coreutils) on Linux.
|
||||||
- These new features are available in the "Backup and Restore" section of the Settings. They are optional and disabled by default.
|
- (All) Error messages related to SQLite will now be displayed correctly, instead of forcing the application to exit.
|
||||||
- (All) Added new configuration option to delete saved game folder on restore
|
|
||||||
- This option is used for games that change the file names of their saves, which results in a mix of old and new saved games if the old saves aren't deleted first.
|
|
||||||
- This option has limitations and is not part of official configurations or import/export features.
|
|
||||||
- (All) The "Verify backup files with a checksum" option has been removed. This feature is now baked into GBM and cannot be disabled.
|
|
||||||
- (All) GBM will now behave consistently across different configurations (such as LAN) when performing sync operations.
|
|
||||||
- (Windows) Fixed rare issue related to DPI display scaling.
|
|
||||||
|
|
||||||
Read the "Settings" and "The Game Manager" sections of the manual (http://mikemaximus.github.io/gbm-web/manual.html) for more details on how the new features work and their limitations.
|
|
||||||
|
|
||||||
The entire version history of GBM releases is available at http://mikemaximus.github.io/gbm-web/versionhistory.html
|
The entire version history of GBM releases is available at http://mikemaximus.github.io/gbm-web/versionhistory.html
|
||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user