Compare commits
89 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2623bf7f7a | ||
|
|
6230d2f888 | ||
|
|
adc857fe5e | ||
|
|
bddf07ee44 | ||
|
|
63ed3dac67 | ||
|
|
922103e5aa | ||
|
|
d0fe33e953 | ||
|
|
934d17de47 | ||
|
|
2ccc10bb9c | ||
|
|
cc1db7e524 | ||
|
|
c2a9d3ee77 | ||
|
|
65fe7214eb | ||
|
|
71d09126c2 | ||
|
|
2eb0c30702 | ||
|
|
24e1c4b92f | ||
|
|
4e7eb58463 | ||
|
|
3ae0d1ba82 | ||
|
|
6f3ed9ab81 | ||
|
|
a490e6d1f2 | ||
|
|
a5dd1d547b | ||
|
|
974aaa3638 | ||
|
|
c3b73a9953 | ||
|
|
3bd4cbd0bd | ||
|
|
5a9b3c99b3 | ||
|
|
8ce1b00a8c | ||
|
|
e4237a74bb | ||
|
|
72f520f333 | ||
|
|
dc9ec7f190 | ||
|
|
c0dbd95504 | ||
|
|
6c5c54ea1b | ||
|
|
d0c40fd341 | ||
|
|
68855077cf | ||
|
|
3184cb61ec | ||
|
|
8ebfed7ab7 | ||
|
|
229afa92fd | ||
|
|
db6c96a80b | ||
|
|
6d0db7c075 | ||
|
|
e3f5c7e3c0 | ||
|
|
ba1fc76ebe | ||
|
|
6de58dc977 | ||
|
|
5e0e1a543f | ||
|
|
7254b6b501 | ||
|
|
f117e7fbaa | ||
|
|
d46bc38bdc | ||
|
|
a092c1b44f | ||
|
|
77b5efbe02 | ||
|
|
7a93fd799b | ||
|
|
4108ec36d7 | ||
|
|
87f93ed4f5 | ||
|
|
18befc19b3 | ||
|
|
bfe2346e8a | ||
|
|
9cbc2b3240 | ||
|
|
1fab0e0cf4 | ||
|
|
588f51d496 | ||
|
|
77eb164a62 | ||
|
|
58ec4564ae | ||
|
|
8c1f3144f8 | ||
|
|
507984bdf8 | ||
|
|
378377a1a9 | ||
|
|
86ffc75666 | ||
|
|
f312e315b9 | ||
|
|
e567638c0e | ||
|
|
1f9fcca024 | ||
|
|
b68646c97e | ||
|
|
896c77fe11 | ||
|
|
e288c77ba8 | ||
|
|
8b779f6d66 | ||
|
|
ef6e608d30 | ||
|
|
7b524e42fc | ||
|
|
2beff1b46d | ||
|
|
0ad4fd890d | ||
|
|
761fed64cc | ||
|
|
f839793071 | ||
|
|
b8b4c63910 | ||
|
|
ef70c08469 | ||
|
|
45e59f8ae6 | ||
|
|
cb9bab9892 | ||
|
|
7f19ae6345 | ||
|
|
ab240b610c | ||
|
|
6c80094848 | ||
|
|
16649238f0 | ||
|
|
39460f57d5 | ||
|
|
d788c751f7 | ||
|
|
3acb790822 | ||
|
|
0e4f357c01 | ||
|
|
58684bf9a5 | ||
|
|
1d19a49b0e | ||
|
|
94bb4e70ef | ||
|
|
1c493f1d4e |
@@ -7,8 +7,6 @@
|
||||
Private sRelativeRestorePath As String = String.Empty
|
||||
Private dDateUpdated As DateTime = Date.Now
|
||||
Private sUpdatedBy As String = String.Empty
|
||||
Private dLastDateUpdated As DateTime = Date.Now
|
||||
Private sLastUpdatedBy As String = String.Empty
|
||||
Private sCheckSum As String = String.Empty
|
||||
|
||||
Property ID As String
|
||||
@@ -109,24 +107,6 @@
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property LastDateUpdated As DateTime
|
||||
Get
|
||||
Return dLastDateUpdated
|
||||
End Get
|
||||
Set(value As DateTime)
|
||||
dLastDateUpdated = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property LastUpdatedBy As String
|
||||
Get
|
||||
Return sLastUpdatedBy
|
||||
End Get
|
||||
Set(value As String)
|
||||
sLastUpdatedBy = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property CheckSum As String
|
||||
Get
|
||||
Return sCheckSum
|
||||
|
||||
+73
-3
@@ -7,6 +7,8 @@
|
||||
Private bFolderSave As Boolean = False
|
||||
Private sFileType As String = String.Empty
|
||||
Private bAppendTimeStamp As Boolean = False
|
||||
Private iBackupLimit As Integer = 2
|
||||
Private bCleanFolder As Boolean = False
|
||||
Private sExcludeList As String = String.Empty
|
||||
Private sProcessPath As String = String.Empty
|
||||
Private sIcon As String = String.Empty
|
||||
@@ -19,6 +21,16 @@
|
||||
Private bTempGame As Boolean = False
|
||||
Private oImportTags As New List(Of Tag)
|
||||
|
||||
<Flags()> Public Enum eOptionalSyncFields
|
||||
None = 0
|
||||
GamePath = 1
|
||||
Company = 2
|
||||
Version = 4
|
||||
Icon = 16
|
||||
TimeStamp = 32
|
||||
MonitorGame = 64
|
||||
End Enum
|
||||
|
||||
Property ID As String
|
||||
Set(value As String)
|
||||
sGameID = value
|
||||
@@ -44,7 +56,6 @@
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Property Name As String
|
||||
Set(value As String)
|
||||
sGameName = value
|
||||
@@ -108,6 +119,24 @@
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property BackupLimit As Integer
|
||||
Get
|
||||
Return iBackupLimit
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
iBackupLimit = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property CleanFolder As Boolean
|
||||
Get
|
||||
Return bCleanFolder
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bCleanFolder = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property ExcludeList As String
|
||||
Set(value As String)
|
||||
sExcludeList = value
|
||||
@@ -219,15 +248,15 @@
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Function SyncEquals(obj As Object) As Boolean
|
||||
Public Function SyncEquals(obj As Object, eSyncFields As eOptionalSyncFields) As Boolean
|
||||
Dim oGame As clsGame = TryCast(obj, clsGame)
|
||||
If oGame Is Nothing Then
|
||||
Return False
|
||||
Else
|
||||
'Core Sync Fields
|
||||
If ID <> oGame.ID Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
If Name <> oGame.Name Then
|
||||
Return False
|
||||
End If
|
||||
@@ -249,12 +278,53 @@
|
||||
If FolderSave <> oGame.FolderSave Then
|
||||
Return False
|
||||
End If
|
||||
If CleanFolder <> oGame.CleanFolder Then
|
||||
Return False
|
||||
End If
|
||||
If AppendTimeStamp <> oGame.AppendTimeStamp Then
|
||||
Return False
|
||||
End If
|
||||
If Hours <> oGame.Hours Then
|
||||
Return False
|
||||
End If
|
||||
If MonitorOnly <> oGame.MonitorOnly Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
'Optional Sync Fields
|
||||
If (eSyncFields And eOptionalSyncFields.Company) = eOptionalSyncFields.Company Then
|
||||
If Company <> oGame.Company Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
If (eSyncFields And eOptionalSyncFields.GamePath) = eOptionalSyncFields.GamePath Then
|
||||
If ProcessPath <> oGame.ProcessPath Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
If (eSyncFields And eOptionalSyncFields.Icon) = eOptionalSyncFields.Icon Then
|
||||
If Icon <> oGame.Icon Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
If (eSyncFields And eOptionalSyncFields.MonitorGame) = eOptionalSyncFields.MonitorGame Then
|
||||
If Enabled <> oGame.Enabled Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
If (eSyncFields And eOptionalSyncFields.TimeStamp) = eOptionalSyncFields.TimeStamp Then
|
||||
If AppendTimeStamp <> oGame.AppendTimeStamp Then
|
||||
Return False
|
||||
End If
|
||||
If BackupLimit <> oGame.BackupLimit Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
If (eSyncFields And eOptionalSyncFields.Version) = eOptionalSyncFields.Version Then
|
||||
If Version <> oGame.Version Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
Return True
|
||||
End If
|
||||
End Function
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
Public Class clsRestoreCache
|
||||
Private sName As String
|
||||
Private sPath As String
|
||||
|
||||
Property Name As String
|
||||
Get
|
||||
Return sName
|
||||
End Get
|
||||
Set(value As String)
|
||||
sName = 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
|
||||
Generated
+42
-14
@@ -36,6 +36,8 @@ Partial Class frmAddWizard
|
||||
Me.txtProcessPath = New System.Windows.Forms.TextBox()
|
||||
Me.lblStep2Intro = New System.Windows.Forms.Label()
|
||||
Me.tbPage3 = New System.Windows.Forms.TabPage()
|
||||
Me.lblLimit = New System.Windows.Forms.Label()
|
||||
Me.nudLimit = New System.Windows.Forms.NumericUpDown()
|
||||
Me.lblStep3Title = New System.Windows.Forms.Label()
|
||||
Me.lblStep3Instructions = New System.Windows.Forms.Label()
|
||||
Me.chkTimeStamp = New System.Windows.Forms.CheckBox()
|
||||
@@ -70,6 +72,7 @@ Partial Class frmAddWizard
|
||||
Me.tbPage1.SuspendLayout()
|
||||
Me.tbPage2.SuspendLayout()
|
||||
Me.tbPage3.SuspendLayout()
|
||||
CType(Me.nudLimit, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.tbPage3a.SuspendLayout()
|
||||
Me.tbPage4.SuspendLayout()
|
||||
Me.tbPage5.SuspendLayout()
|
||||
@@ -121,8 +124,8 @@ Partial Class frmAddWizard
|
||||
Me.lblStep1Instructions.Name = "lblStep1Instructions"
|
||||
Me.lblStep1Instructions.Size = New System.Drawing.Size(303, 85)
|
||||
Me.lblStep1Instructions.TabIndex = 6
|
||||
Me.lblStep1Instructions.Text = "The name will be automatically filtered for length and invalid characters. You m" & _
|
||||
"ay drag and drop a shortcut here to complete this step, only Windows shortcuts a" & _
|
||||
Me.lblStep1Instructions.Text = "The name will be automatically filtered for length and invalid characters. You m" &
|
||||
"ay drag and drop a shortcut here to complete this step, only Windows shortcuts a" &
|
||||
"re currently supported."
|
||||
'
|
||||
'txtName
|
||||
@@ -205,6 +208,8 @@ Partial Class frmAddWizard
|
||||
'tbPage3
|
||||
'
|
||||
Me.tbPage3.BackColor = System.Drawing.SystemColors.Control
|
||||
Me.tbPage3.Controls.Add(Me.lblLimit)
|
||||
Me.tbPage3.Controls.Add(Me.nudLimit)
|
||||
Me.tbPage3.Controls.Add(Me.lblStep3Title)
|
||||
Me.tbPage3.Controls.Add(Me.lblStep3Instructions)
|
||||
Me.tbPage3.Controls.Add(Me.chkTimeStamp)
|
||||
@@ -218,6 +223,26 @@ Partial Class frmAddWizard
|
||||
Me.tbPage3.TabIndex = 2
|
||||
Me.tbPage3.Text = "TabPage3"
|
||||
'
|
||||
'lblLimit
|
||||
'
|
||||
Me.lblLimit.AutoSize = True
|
||||
Me.lblLimit.Location = New System.Drawing.Point(203, 109)
|
||||
Me.lblLimit.Name = "lblLimit"
|
||||
Me.lblLimit.Size = New System.Drawing.Size(68, 13)
|
||||
Me.lblLimit.TabIndex = 15
|
||||
Me.lblLimit.Text = "Backup Limit"
|
||||
Me.lblLimit.Visible = False
|
||||
'
|
||||
'nudLimit
|
||||
'
|
||||
Me.nudLimit.Location = New System.Drawing.Point(157, 107)
|
||||
Me.nudLimit.Minimum = New Decimal(New Integer() {2, 0, 0, 0})
|
||||
Me.nudLimit.Name = "nudLimit"
|
||||
Me.nudLimit.Size = New System.Drawing.Size(40, 20)
|
||||
Me.nudLimit.TabIndex = 14
|
||||
Me.nudLimit.Value = New Decimal(New Integer() {2, 0, 0, 0})
|
||||
Me.nudLimit.Visible = False
|
||||
'
|
||||
'lblStep3Title
|
||||
'
|
||||
Me.lblStep3Title.AutoSize = True
|
||||
@@ -230,32 +255,32 @@ Partial Class frmAddWizard
|
||||
'
|
||||
'lblStep3Instructions
|
||||
'
|
||||
Me.lblStep3Instructions.Location = New System.Drawing.Point(14, 116)
|
||||
Me.lblStep3Instructions.Location = New System.Drawing.Point(14, 139)
|
||||
Me.lblStep3Instructions.Name = "lblStep3Instructions"
|
||||
Me.lblStep3Instructions.Size = New System.Drawing.Size(303, 42)
|
||||
Me.lblStep3Instructions.TabIndex = 9
|
||||
Me.lblStep3Instructions.Text = "If you're unsure of exactly which files to backup, make sure Save Entire Folder " & _
|
||||
"is checked. You can also time stamp your backup files to make incremental backu" & _
|
||||
"ps."
|
||||
Me.lblStep3Instructions.Text = "If you're unsure of exactly which files to backup, make sure Save entire folder " &
|
||||
"is checked. You can also choose to save multiple backups and set a limit on how" &
|
||||
" many to keep."
|
||||
'
|
||||
'chkTimeStamp
|
||||
'
|
||||
Me.chkTimeStamp.AutoSize = True
|
||||
Me.chkTimeStamp.Location = New System.Drawing.Point(139, 87)
|
||||
Me.chkTimeStamp.Location = New System.Drawing.Point(18, 108)
|
||||
Me.chkTimeStamp.Name = "chkTimeStamp"
|
||||
Me.chkTimeStamp.Size = New System.Drawing.Size(122, 17)
|
||||
Me.chkTimeStamp.Size = New System.Drawing.Size(133, 17)
|
||||
Me.chkTimeStamp.TabIndex = 8
|
||||
Me.chkTimeStamp.Text = "Time Stamp Backup"
|
||||
Me.chkTimeStamp.Text = "Save multiple backups"
|
||||
Me.chkTimeStamp.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkFolderSave
|
||||
'
|
||||
Me.chkFolderSave.AutoSize = True
|
||||
Me.chkFolderSave.Location = New System.Drawing.Point(17, 87)
|
||||
Me.chkFolderSave.Location = New System.Drawing.Point(18, 87)
|
||||
Me.chkFolderSave.Name = "chkFolderSave"
|
||||
Me.chkFolderSave.Size = New System.Drawing.Size(113, 17)
|
||||
Me.chkFolderSave.Size = New System.Drawing.Size(109, 17)
|
||||
Me.chkFolderSave.TabIndex = 7
|
||||
Me.chkFolderSave.Text = "Save Entire Folder"
|
||||
Me.chkFolderSave.Text = "Save entire folder"
|
||||
Me.chkFolderSave.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnSaveBrowse
|
||||
@@ -352,7 +377,7 @@ Partial Class frmAddWizard
|
||||
Me.lblStep3aInstructions.Name = "lblStep3aInstructions"
|
||||
Me.lblStep3aInstructions.Size = New System.Drawing.Size(303, 56)
|
||||
Me.lblStep3aInstructions.TabIndex = 5
|
||||
Me.lblStep3aInstructions.Text = "Choose any file types, specific files or folders you wish to include in the back" & _
|
||||
Me.lblStep3aInstructions.Text = "Choose any file types, specific files or folders you wish to include in the back" &
|
||||
"up. If you're unsure, go back a step and choose to save the entire folder. "
|
||||
'
|
||||
'txtFileTypes
|
||||
@@ -434,7 +459,7 @@ Partial Class frmAddWizard
|
||||
Me.lblStep4Instructions.Name = "lblStep4Instructions"
|
||||
Me.lblStep4Instructions.Size = New System.Drawing.Size(303, 59)
|
||||
Me.lblStep4Instructions.TabIndex = 5
|
||||
Me.lblStep4Instructions.Text = "Choose any file types, specific files or folders you wish to exclude from the ba" & _
|
||||
Me.lblStep4Instructions.Text = "Choose any file types, specific files or folders you wish to exclude from the ba" &
|
||||
"ckup. You may choose multiple items to exclude. This step can be skipped."
|
||||
'
|
||||
'txtExcludeList
|
||||
@@ -539,6 +564,7 @@ Partial Class frmAddWizard
|
||||
Me.tbPage2.PerformLayout()
|
||||
Me.tbPage3.ResumeLayout(False)
|
||||
Me.tbPage3.PerformLayout()
|
||||
CType(Me.nudLimit, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.tbPage3a.ResumeLayout(False)
|
||||
Me.tbPage3a.PerformLayout()
|
||||
Me.tbPage4.ResumeLayout(False)
|
||||
@@ -591,4 +617,6 @@ Partial Class frmAddWizard
|
||||
Friend WithEvents lblExcludePath As Label
|
||||
Friend WithEvents lblIncludePathTitle As Label
|
||||
Friend WithEvents lblExcludePathTitle As Label
|
||||
Friend WithEvents lblLimit As Label
|
||||
Friend WithEvents nudLimit As NumericUpDown
|
||||
End Class
|
||||
|
||||
@@ -46,6 +46,7 @@ Public Class frmAddWizard
|
||||
lblStep3Instructions.Text = frmAddWizard_lblStep3Instructions
|
||||
chkTimeStamp.Text = frmAddWizard_chkTimeStamp
|
||||
chkFolderSave.Text = frmAddWizard_chkFolderSave
|
||||
lblLimit.Text = frmAddWizard_lblLimit
|
||||
btnSaveBrowse.Text = frmAddWizard_btnSaveBrowse
|
||||
lblStep3Intro.Text = frmAddWizard_lblStep3Intro
|
||||
lblIncludePathTitle.Text = frmAddWizard_lblIncludePathTitle
|
||||
@@ -68,6 +69,28 @@ Public Class frmAddWizard
|
||||
StepHandler()
|
||||
End Sub
|
||||
|
||||
Private Sub ShowHideLimit()
|
||||
If chkTimeStamp.Checked Then
|
||||
nudLimit.Visible = True
|
||||
lblLimit.Visible = True
|
||||
nudLimit.Value = 5
|
||||
Else
|
||||
nudLimit.Visible = False
|
||||
nudLimit.Value = nudLimit.Minimum
|
||||
lblLimit.Visible = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function ShowSummaryLimit(ByVal bTimeStamp As Boolean, ByVal iLimit As Integer) As String
|
||||
Dim sLimit As String = String.Empty
|
||||
|
||||
If bTimeStamp Then
|
||||
Return mgrCommon.BooleanYesNo(bTimeStamp) & " (" & iLimit & ")"
|
||||
Else
|
||||
Return mgrCommon.BooleanYesNo(bTimeStamp)
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Function StringEmptyText(ByVal sString As String) As String
|
||||
If sString = String.Empty Then
|
||||
Return frmAddWizard_None
|
||||
@@ -81,19 +104,31 @@ Public Class frmAddWizard
|
||||
Dim sName As String = txtName.Text
|
||||
Dim sProcessFullPath As String = txtProcessPath.Text
|
||||
Dim sProcessPath As String = Path.GetDirectoryName(sProcessFullPath)
|
||||
Dim sProcess As String = Path.GetFileNameWithoutExtension(sProcessFullPath)
|
||||
Dim sProcessSummaryText As String = Path.GetFileName(sProcessFullPath) & " (" & sProcessPath & ")"
|
||||
Dim sSavePath As String = txtSavePath.Text
|
||||
Dim bIsAbsolute As Boolean = mgrPath.IsAbsolute(sSavePath)
|
||||
Dim bFolderBackup As Boolean = chkFolderSave.Checked
|
||||
Dim bTimeStamp As Boolean = chkTimeStamp.Checked
|
||||
Dim iLimit As Integer = nudLimit.Value
|
||||
Dim sFileType As String = txtFileTypes.Text
|
||||
Dim sExcludeList As String = txtExcludeList.Text
|
||||
Dim sProcess As String
|
||||
Dim sItem As String()
|
||||
Dim sItems As String()
|
||||
Dim sValues As String()
|
||||
Dim lstItem As ListViewItem
|
||||
|
||||
'Handle Process
|
||||
If Path.HasExtension(sProcessFullPath) Then
|
||||
If sProcessFullPath.ToLower.EndsWith(".exe") Then
|
||||
sProcess = Path.GetFileNameWithoutExtension(sProcessFullPath)
|
||||
Else
|
||||
sProcess = Path.GetFileName(sProcessFullPath)
|
||||
End If
|
||||
Else
|
||||
sProcess = Path.GetFileName(sProcessFullPath)
|
||||
End If
|
||||
|
||||
If Not bIsAbsolute Then
|
||||
sSavePath = mgrPath.DetermineRelativePath(sProcessPath, sSavePath)
|
||||
End If
|
||||
@@ -106,7 +141,7 @@ Public Class frmAddWizard
|
||||
lstSummary.Columns(1).Width = 210
|
||||
|
||||
sItems = {frmAddWizard_Summary_Name, frmAddWizard_Summary_Process, frmAddWizard_Summary_AbsolutePath, frmAddWizard_Summary_SavePath, frmAddWizard_Summary_FolderSave, frmAddWizard_Summary_Timestamp, frmAddWizard_Summary_Include, frmAddWizard_Summary_Exclude}
|
||||
sValues = {sName, sProcessSummaryText, mgrCommon.BooleanYesNo(bIsAbsolute), sSavePath, mgrCommon.BooleanYesNo(bFolderBackup), mgrCommon.BooleanYesNo(bTimeStamp), StringEmptyText(sFileType), StringEmptyText(sExcludeList)}
|
||||
sValues = {sName, sProcessSummaryText, mgrCommon.BooleanYesNo(bIsAbsolute), sSavePath, mgrCommon.BooleanYesNo(bFolderBackup), ShowSummaryLimit(bTimeStamp, iLimit), StringEmptyText(sFileType), StringEmptyText(sExcludeList)}
|
||||
|
||||
For i = 0 To sItems.Length - 1
|
||||
sItem = {sItems(i), sValues(i)}
|
||||
@@ -122,7 +157,9 @@ Public Class frmAddWizard
|
||||
oGame.FolderSave = bFolderBackup
|
||||
oGame.FileType = sFileType
|
||||
oGame.AppendTimeStamp = bTimeStamp
|
||||
oGame.BackupLimit = iLimit
|
||||
oGame.ExcludeList = sExcludeList
|
||||
oGame.ProcessPath = sProcessPath
|
||||
|
||||
Return oGame
|
||||
End Function
|
||||
@@ -490,6 +527,10 @@ Public Class frmAddWizard
|
||||
txtFileTypes.Clear()
|
||||
End Sub
|
||||
|
||||
Private Sub chkTimeStamp_CheckedChanged(sender As Object, e As EventArgs) Handles chkTimeStamp.CheckedChanged
|
||||
ShowHideLimit()
|
||||
End Sub
|
||||
|
||||
Private Sub btnInclude_Click(sender As Object, e As EventArgs) Handles btnInclude.Click
|
||||
OpenBuilder(frmAddWizard_Include, txtFileTypes)
|
||||
UpdateBuilderLabel(txtFileTypes.Text, lblFileTypes)
|
||||
@@ -499,4 +540,6 @@ Public Class frmAddWizard
|
||||
OpenBuilder(frmAddWizard_Exclude, txtExcludeList)
|
||||
UpdateBuilderLabel(txtExcludeList.Text, lblExclude)
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
Generated
+223
-139
@@ -28,6 +28,9 @@ Partial Class frmGameManager
|
||||
Me.btnBackup = New System.Windows.Forms.Button()
|
||||
Me.btnClose = New System.Windows.Forms.Button()
|
||||
Me.grpConfig = New System.Windows.Forms.GroupBox()
|
||||
Me.chkCleanFolder = New System.Windows.Forms.CheckBox()
|
||||
Me.lblLimit = New System.Windows.Forms.Label()
|
||||
Me.nudLimit = New System.Windows.Forms.NumericUpDown()
|
||||
Me.btnExclude = New System.Windows.Forms.Button()
|
||||
Me.btnInclude = New System.Windows.Forms.Button()
|
||||
Me.txtID = New System.Windows.Forms.TextBox()
|
||||
@@ -61,18 +64,17 @@ Partial Class frmGameManager
|
||||
Me.lblHours = New System.Windows.Forms.Label()
|
||||
Me.btnTags = New System.Windows.Forms.Button()
|
||||
Me.grpStats = New System.Windows.Forms.GroupBox()
|
||||
Me.cboRemoteBackup = New System.Windows.Forms.ComboBox()
|
||||
Me.lblRestorePathData = New System.Windows.Forms.Label()
|
||||
Me.lblBackupFileData = New System.Windows.Forms.Label()
|
||||
Me.lblLocalBackupData = New System.Windows.Forms.Label()
|
||||
Me.lblRestorePath = New System.Windows.Forms.Label()
|
||||
Me.txtRestorePath = New System.Windows.Forms.TextBox()
|
||||
Me.btnOpenRestorePath = New System.Windows.Forms.Button()
|
||||
Me.btnOpenBackupFile = New System.Windows.Forms.Button()
|
||||
Me.txtFileSize = New System.Windows.Forms.TextBox()
|
||||
Me.btnDeleteBackup = New System.Windows.Forms.Button()
|
||||
Me.lblFileSize = New System.Windows.Forms.Label()
|
||||
Me.lblSync = New System.Windows.Forms.Label()
|
||||
Me.txtCurrentBackup = New System.Windows.Forms.TextBox()
|
||||
Me.lblCurrentBackup = New System.Windows.Forms.Label()
|
||||
Me.txtLocalBackup = New System.Windows.Forms.TextBox()
|
||||
Me.lblLastBackup = New System.Windows.Forms.Label()
|
||||
Me.lblBackupFile = New System.Windows.Forms.Label()
|
||||
Me.lblRemote = New System.Windows.Forms.Label()
|
||||
Me.lblLocalData = New System.Windows.Forms.Label()
|
||||
Me.btnMarkAsRestored = New System.Windows.Forms.Button()
|
||||
Me.btnRestore = New System.Windows.Forms.Button()
|
||||
Me.btnSave = New System.Windows.Forms.Button()
|
||||
@@ -89,13 +91,20 @@ Partial Class frmGameManager
|
||||
Me.cmsImport = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.cmsOfficial = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cmsFile = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.txtQuickFilter = New System.Windows.Forms.TextBox()
|
||||
Me.lblQuickFilter = New System.Windows.Forms.Label()
|
||||
Me.cmsDeleteBackup = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.cmsDeleteOne = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cmsDeleteAll = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.grpConfig.SuspendLayout()
|
||||
CType(Me.nudLimit, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.grpExtra.SuspendLayout()
|
||||
CType(Me.pbIcon, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.nudHours, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.grpStats.SuspendLayout()
|
||||
Me.grpFilter.SuspendLayout()
|
||||
Me.cmsImport.SuspendLayout()
|
||||
Me.cmsDeleteBackup.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'btnAdd
|
||||
@@ -105,7 +114,7 @@ Partial Class frmGameManager
|
||||
Me.btnAdd.Location = New System.Drawing.Point(12, 526)
|
||||
Me.btnAdd.Name = "btnAdd"
|
||||
Me.btnAdd.Size = New System.Drawing.Size(30, 23)
|
||||
Me.btnAdd.TabIndex = 2
|
||||
Me.btnAdd.TabIndex = 4
|
||||
Me.btnAdd.Text = "+"
|
||||
Me.btnAdd.UseVisualStyleBackColor = True
|
||||
'
|
||||
@@ -116,33 +125,36 @@ Partial Class frmGameManager
|
||||
Me.btnDelete.Location = New System.Drawing.Point(48, 526)
|
||||
Me.btnDelete.Name = "btnDelete"
|
||||
Me.btnDelete.Size = New System.Drawing.Size(30, 23)
|
||||
Me.btnDelete.TabIndex = 3
|
||||
Me.btnDelete.TabIndex = 5
|
||||
Me.btnDelete.Text = "-"
|
||||
Me.btnDelete.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnBackup
|
||||
'
|
||||
Me.btnBackup.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnBackup.Location = New System.Drawing.Point(616, 525)
|
||||
Me.btnBackup.Location = New System.Drawing.Point(616, 526)
|
||||
Me.btnBackup.Name = "btnBackup"
|
||||
Me.btnBackup.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnBackup.TabIndex = 16
|
||||
Me.btnBackup.TabIndex = 19
|
||||
Me.btnBackup.Text = "&Backup"
|
||||
Me.btnBackup.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnClose
|
||||
'
|
||||
Me.btnClose.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnClose.Location = New System.Drawing.Point(697, 525)
|
||||
Me.btnClose.Location = New System.Drawing.Point(697, 526)
|
||||
Me.btnClose.Name = "btnClose"
|
||||
Me.btnClose.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnClose.TabIndex = 17
|
||||
Me.btnClose.TabIndex = 20
|
||||
Me.btnClose.Text = "C&lose"
|
||||
Me.btnClose.UseVisualStyleBackColor = True
|
||||
'
|
||||
'grpConfig
|
||||
'
|
||||
Me.grpConfig.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.grpConfig.Controls.Add(Me.chkCleanFolder)
|
||||
Me.grpConfig.Controls.Add(Me.lblLimit)
|
||||
Me.grpConfig.Controls.Add(Me.nudLimit)
|
||||
Me.grpConfig.Controls.Add(Me.btnExclude)
|
||||
Me.grpConfig.Controls.Add(Me.btnInclude)
|
||||
Me.grpConfig.Controls.Add(Me.txtID)
|
||||
@@ -162,16 +174,46 @@ Partial Class frmGameManager
|
||||
Me.grpConfig.Location = New System.Drawing.Point(247, 12)
|
||||
Me.grpConfig.Name = "grpConfig"
|
||||
Me.grpConfig.Size = New System.Drawing.Size(525, 157)
|
||||
Me.grpConfig.TabIndex = 6
|
||||
Me.grpConfig.TabIndex = 8
|
||||
Me.grpConfig.TabStop = False
|
||||
Me.grpConfig.Text = "Configuration"
|
||||
'
|
||||
'chkCleanFolder
|
||||
'
|
||||
Me.chkCleanFolder.AutoSize = True
|
||||
Me.chkCleanFolder.Location = New System.Drawing.Point(329, 101)
|
||||
Me.chkCleanFolder.Name = "chkCleanFolder"
|
||||
Me.chkCleanFolder.Size = New System.Drawing.Size(136, 17)
|
||||
Me.chkCleanFolder.TabIndex = 11
|
||||
Me.chkCleanFolder.Text = "Delete folder on restore"
|
||||
Me.chkCleanFolder.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblLimit
|
||||
'
|
||||
Me.lblLimit.AutoSize = True
|
||||
Me.lblLimit.Location = New System.Drawing.Point(375, 130)
|
||||
Me.lblLimit.Name = "lblLimit"
|
||||
Me.lblLimit.Size = New System.Drawing.Size(68, 13)
|
||||
Me.lblLimit.TabIndex = 14
|
||||
Me.lblLimit.Text = "Backup Limit"
|
||||
Me.lblLimit.Visible = False
|
||||
'
|
||||
'nudLimit
|
||||
'
|
||||
Me.nudLimit.Location = New System.Drawing.Point(329, 128)
|
||||
Me.nudLimit.Minimum = New Decimal(New Integer() {2, 0, 0, 0})
|
||||
Me.nudLimit.Name = "nudLimit"
|
||||
Me.nudLimit.Size = New System.Drawing.Size(40, 20)
|
||||
Me.nudLimit.TabIndex = 13
|
||||
Me.nudLimit.Value = New Decimal(New Integer() {2, 0, 0, 0})
|
||||
Me.nudLimit.Visible = False
|
||||
'
|
||||
'btnExclude
|
||||
'
|
||||
Me.btnExclude.Location = New System.Drawing.Point(9, 125)
|
||||
Me.btnExclude.Name = "btnExclude"
|
||||
Me.btnExclude.Size = New System.Drawing.Size(175, 23)
|
||||
Me.btnExclude.TabIndex = 13
|
||||
Me.btnExclude.TabIndex = 9
|
||||
Me.btnExclude.Text = "E&xclude Items..."
|
||||
Me.btnExclude.UseVisualStyleBackColor = True
|
||||
'
|
||||
@@ -180,7 +222,7 @@ Partial Class frmGameManager
|
||||
Me.btnInclude.Location = New System.Drawing.Point(9, 97)
|
||||
Me.btnInclude.Name = "btnInclude"
|
||||
Me.btnInclude.Size = New System.Drawing.Size(175, 23)
|
||||
Me.btnInclude.TabIndex = 10
|
||||
Me.btnInclude.TabIndex = 8
|
||||
Me.btnInclude.Text = "In&clude Items..."
|
||||
Me.btnInclude.UseVisualStyleBackColor = True
|
||||
'
|
||||
@@ -190,7 +232,7 @@ Partial Class frmGameManager
|
||||
Me.txtID.Location = New System.Drawing.Point(489, 19)
|
||||
Me.txtID.Name = "txtID"
|
||||
Me.txtID.Size = New System.Drawing.Size(30, 20)
|
||||
Me.txtID.TabIndex = 16
|
||||
Me.txtID.TabIndex = 0
|
||||
Me.txtID.TabStop = False
|
||||
Me.txtID.Visible = False
|
||||
'
|
||||
@@ -199,7 +241,7 @@ Partial Class frmGameManager
|
||||
Me.btnSavePathBrowse.Location = New System.Drawing.Point(489, 71)
|
||||
Me.btnSavePathBrowse.Name = "btnSavePathBrowse"
|
||||
Me.btnSavePathBrowse.Size = New System.Drawing.Size(30, 20)
|
||||
Me.btnSavePathBrowse.TabIndex = 9
|
||||
Me.btnSavePathBrowse.TabIndex = 7
|
||||
Me.btnSavePathBrowse.Text = "..."
|
||||
Me.btnSavePathBrowse.UseVisualStyleBackColor = True
|
||||
'
|
||||
@@ -208,7 +250,7 @@ Partial Class frmGameManager
|
||||
Me.btnProcessBrowse.Location = New System.Drawing.Point(489, 45)
|
||||
Me.btnProcessBrowse.Name = "btnProcessBrowse"
|
||||
Me.btnProcessBrowse.Size = New System.Drawing.Size(30, 20)
|
||||
Me.btnProcessBrowse.TabIndex = 7
|
||||
Me.btnProcessBrowse.TabIndex = 5
|
||||
Me.btnProcessBrowse.Text = "..."
|
||||
Me.btnProcessBrowse.UseVisualStyleBackColor = True
|
||||
'
|
||||
@@ -241,18 +283,18 @@ Partial Class frmGameManager
|
||||
'
|
||||
'txtExclude
|
||||
'
|
||||
Me.txtExclude.Location = New System.Drawing.Point(363, 128)
|
||||
Me.txtExclude.Location = New System.Drawing.Point(489, 122)
|
||||
Me.txtExclude.Name = "txtExclude"
|
||||
Me.txtExclude.Size = New System.Drawing.Size(156, 20)
|
||||
Me.txtExclude.Size = New System.Drawing.Size(30, 20)
|
||||
Me.txtExclude.TabIndex = 0
|
||||
Me.txtExclude.TabStop = False
|
||||
Me.txtExclude.Visible = False
|
||||
'
|
||||
'txtFileType
|
||||
'
|
||||
Me.txtFileType.Location = New System.Drawing.Point(363, 99)
|
||||
Me.txtFileType.Location = New System.Drawing.Point(489, 99)
|
||||
Me.txtFileType.Name = "txtFileType"
|
||||
Me.txtFileType.Size = New System.Drawing.Size(156, 20)
|
||||
Me.txtFileType.Size = New System.Drawing.Size(30, 20)
|
||||
Me.txtFileType.TabIndex = 0
|
||||
Me.txtFileType.TabStop = False
|
||||
Me.txtFileType.Visible = False
|
||||
@@ -262,9 +304,9 @@ Partial Class frmGameManager
|
||||
Me.chkTimeStamp.AutoSize = True
|
||||
Me.chkTimeStamp.Location = New System.Drawing.Point(190, 129)
|
||||
Me.chkTimeStamp.Name = "chkTimeStamp"
|
||||
Me.chkTimeStamp.Size = New System.Drawing.Size(146, 17)
|
||||
Me.chkTimeStamp.TabIndex = 14
|
||||
Me.chkTimeStamp.Text = "Time stamp each backup"
|
||||
Me.chkTimeStamp.Size = New System.Drawing.Size(133, 17)
|
||||
Me.chkTimeStamp.TabIndex = 12
|
||||
Me.chkTimeStamp.Text = "Save multiple backups"
|
||||
Me.chkTimeStamp.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkFolderSave
|
||||
@@ -273,7 +315,7 @@ Partial Class frmGameManager
|
||||
Me.chkFolderSave.Location = New System.Drawing.Point(190, 101)
|
||||
Me.chkFolderSave.Name = "chkFolderSave"
|
||||
Me.chkFolderSave.Size = New System.Drawing.Size(109, 17)
|
||||
Me.chkFolderSave.TabIndex = 11
|
||||
Me.chkFolderSave.TabIndex = 10
|
||||
Me.chkFolderSave.Text = "Save entire folder"
|
||||
Me.chkFolderSave.UseVisualStyleBackColor = True
|
||||
'
|
||||
@@ -282,30 +324,30 @@ Partial Class frmGameManager
|
||||
Me.txtSavePath.Location = New System.Drawing.Point(69, 71)
|
||||
Me.txtSavePath.Name = "txtSavePath"
|
||||
Me.txtSavePath.Size = New System.Drawing.Size(414, 20)
|
||||
Me.txtSavePath.TabIndex = 8
|
||||
Me.txtSavePath.TabIndex = 6
|
||||
'
|
||||
'txtProcess
|
||||
'
|
||||
Me.txtProcess.Location = New System.Drawing.Point(69, 45)
|
||||
Me.txtProcess.Name = "txtProcess"
|
||||
Me.txtProcess.Size = New System.Drawing.Size(414, 20)
|
||||
Me.txtProcess.TabIndex = 6
|
||||
Me.txtProcess.TabIndex = 4
|
||||
'
|
||||
'txtName
|
||||
'
|
||||
Me.txtName.Location = New System.Drawing.Point(69, 19)
|
||||
Me.txtName.Name = "txtName"
|
||||
Me.txtName.Size = New System.Drawing.Size(414, 20)
|
||||
Me.txtName.TabIndex = 5
|
||||
Me.txtName.TabIndex = 3
|
||||
'
|
||||
'chkMonitorOnly
|
||||
'
|
||||
Me.chkMonitorOnly.AutoSize = True
|
||||
Me.chkMonitorOnly.Location = New System.Drawing.Point(362, 340)
|
||||
Me.chkMonitorOnly.Name = "chkMonitorOnly"
|
||||
Me.chkMonitorOnly.Size = New System.Drawing.Size(145, 17)
|
||||
Me.chkMonitorOnly.TabIndex = 9
|
||||
Me.chkMonitorOnly.Text = "Monitor only (No backup)"
|
||||
Me.chkMonitorOnly.Size = New System.Drawing.Size(83, 17)
|
||||
Me.chkMonitorOnly.TabIndex = 11
|
||||
Me.chkMonitorOnly.Text = "Monitor only"
|
||||
Me.chkMonitorOnly.UseVisualStyleBackColor = True
|
||||
'
|
||||
'grpExtra
|
||||
@@ -328,7 +370,7 @@ Partial Class frmGameManager
|
||||
Me.grpExtra.Location = New System.Drawing.Point(247, 175)
|
||||
Me.grpExtra.Name = "grpExtra"
|
||||
Me.grpExtra.Size = New System.Drawing.Size(525, 155)
|
||||
Me.grpExtra.TabIndex = 7
|
||||
Me.grpExtra.TabIndex = 9
|
||||
Me.grpExtra.TabStop = False
|
||||
Me.grpExtra.Text = "Game Information"
|
||||
'
|
||||
@@ -459,32 +501,73 @@ Partial Class frmGameManager
|
||||
Me.btnTags.Location = New System.Drawing.Point(535, 336)
|
||||
Me.btnTags.Name = "btnTags"
|
||||
Me.btnTags.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnTags.TabIndex = 10
|
||||
Me.btnTags.TabIndex = 12
|
||||
Me.btnTags.Text = "Tags..."
|
||||
Me.btnTags.UseVisualStyleBackColor = True
|
||||
'
|
||||
'grpStats
|
||||
'
|
||||
Me.grpStats.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.grpStats.Controls.Add(Me.cboRemoteBackup)
|
||||
Me.grpStats.Controls.Add(Me.lblRestorePathData)
|
||||
Me.grpStats.Controls.Add(Me.lblBackupFileData)
|
||||
Me.grpStats.Controls.Add(Me.lblLocalBackupData)
|
||||
Me.grpStats.Controls.Add(Me.lblRestorePath)
|
||||
Me.grpStats.Controls.Add(Me.txtRestorePath)
|
||||
Me.grpStats.Controls.Add(Me.btnOpenRestorePath)
|
||||
Me.grpStats.Controls.Add(Me.btnOpenBackupFile)
|
||||
Me.grpStats.Controls.Add(Me.txtFileSize)
|
||||
Me.grpStats.Controls.Add(Me.btnDeleteBackup)
|
||||
Me.grpStats.Controls.Add(Me.lblFileSize)
|
||||
Me.grpStats.Controls.Add(Me.lblSync)
|
||||
Me.grpStats.Controls.Add(Me.txtCurrentBackup)
|
||||
Me.grpStats.Controls.Add(Me.lblCurrentBackup)
|
||||
Me.grpStats.Controls.Add(Me.txtLocalBackup)
|
||||
Me.grpStats.Controls.Add(Me.lblLastBackup)
|
||||
Me.grpStats.Controls.Add(Me.lblBackupFile)
|
||||
Me.grpStats.Controls.Add(Me.lblRemote)
|
||||
Me.grpStats.Controls.Add(Me.lblLocalData)
|
||||
Me.grpStats.Location = New System.Drawing.Point(247, 365)
|
||||
Me.grpStats.Name = "grpStats"
|
||||
Me.grpStats.Size = New System.Drawing.Size(525, 154)
|
||||
Me.grpStats.TabIndex = 13
|
||||
Me.grpStats.TabIndex = 15
|
||||
Me.grpStats.TabStop = False
|
||||
Me.grpStats.Text = "Backup Information"
|
||||
'
|
||||
'cboRemoteBackup
|
||||
'
|
||||
Me.cboRemoteBackup.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.cboRemoteBackup.FormattingEnabled = True
|
||||
Me.cboRemoteBackup.Location = New System.Drawing.Point(96, 24)
|
||||
Me.cboRemoteBackup.Name = "cboRemoteBackup"
|
||||
Me.cboRemoteBackup.Size = New System.Drawing.Size(387, 21)
|
||||
Me.cboRemoteBackup.TabIndex = 12
|
||||
'
|
||||
'lblRestorePathData
|
||||
'
|
||||
Me.lblRestorePathData.AutoEllipsis = True
|
||||
Me.lblRestorePathData.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.lblRestorePathData.Location = New System.Drawing.Point(96, 98)
|
||||
Me.lblRestorePathData.Name = "lblRestorePathData"
|
||||
Me.lblRestorePathData.Size = New System.Drawing.Size(387, 20)
|
||||
Me.lblRestorePathData.TabIndex = 7
|
||||
Me.lblRestorePathData.Tag = "wipe"
|
||||
Me.lblRestorePathData.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
'
|
||||
'lblBackupFileData
|
||||
'
|
||||
Me.lblBackupFileData.AutoEllipsis = True
|
||||
Me.lblBackupFileData.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.lblBackupFileData.Location = New System.Drawing.Point(96, 73)
|
||||
Me.lblBackupFileData.Name = "lblBackupFileData"
|
||||
Me.lblBackupFileData.Size = New System.Drawing.Size(387, 20)
|
||||
Me.lblBackupFileData.TabIndex = 6
|
||||
Me.lblBackupFileData.Tag = "wipe"
|
||||
Me.lblBackupFileData.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
'
|
||||
'lblLocalBackupData
|
||||
'
|
||||
Me.lblLocalBackupData.AutoEllipsis = True
|
||||
Me.lblLocalBackupData.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.lblLocalBackupData.Location = New System.Drawing.Point(96, 49)
|
||||
Me.lblLocalBackupData.Name = "lblLocalBackupData"
|
||||
Me.lblLocalBackupData.Size = New System.Drawing.Size(387, 20)
|
||||
Me.lblLocalBackupData.TabIndex = 5
|
||||
Me.lblLocalBackupData.Tag = "wipe"
|
||||
Me.lblLocalBackupData.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
'
|
||||
'lblRestorePath
|
||||
'
|
||||
Me.lblRestorePath.AutoSize = True
|
||||
@@ -494,122 +577,77 @@ Partial Class frmGameManager
|
||||
Me.lblRestorePath.TabIndex = 3
|
||||
Me.lblRestorePath.Text = "Restore Path:"
|
||||
'
|
||||
'txtRestorePath
|
||||
'
|
||||
Me.txtRestorePath.Location = New System.Drawing.Point(96, 99)
|
||||
Me.txtRestorePath.Name = "txtRestorePath"
|
||||
Me.txtRestorePath.ReadOnly = True
|
||||
Me.txtRestorePath.Size = New System.Drawing.Size(387, 20)
|
||||
Me.txtRestorePath.TabIndex = 8
|
||||
'
|
||||
'btnOpenRestorePath
|
||||
'
|
||||
Me.btnOpenRestorePath.Location = New System.Drawing.Point(339, 125)
|
||||
Me.btnOpenRestorePath.Location = New System.Drawing.Point(369, 125)
|
||||
Me.btnOpenRestorePath.Name = "btnOpenRestorePath"
|
||||
Me.btnOpenRestorePath.Size = New System.Drawing.Size(114, 23)
|
||||
Me.btnOpenRestorePath.TabIndex = 12
|
||||
Me.btnOpenRestorePath.TabIndex = 11
|
||||
Me.btnOpenRestorePath.Text = "O&pen Restore Path"
|
||||
Me.btnOpenRestorePath.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnOpenBackupFile
|
||||
'
|
||||
Me.btnOpenBackupFile.Location = New System.Drawing.Point(216, 125)
|
||||
Me.btnOpenBackupFile.Location = New System.Drawing.Point(249, 125)
|
||||
Me.btnOpenBackupFile.Name = "btnOpenBackupFile"
|
||||
Me.btnOpenBackupFile.Size = New System.Drawing.Size(114, 23)
|
||||
Me.btnOpenBackupFile.TabIndex = 11
|
||||
Me.btnOpenBackupFile.TabIndex = 10
|
||||
Me.btnOpenBackupFile.Text = "&Open Backup File"
|
||||
Me.btnOpenBackupFile.UseVisualStyleBackColor = True
|
||||
'
|
||||
'txtFileSize
|
||||
'
|
||||
Me.txtFileSize.Location = New System.Drawing.Point(96, 74)
|
||||
Me.txtFileSize.Name = "txtFileSize"
|
||||
Me.txtFileSize.ReadOnly = True
|
||||
Me.txtFileSize.Size = New System.Drawing.Size(387, 20)
|
||||
Me.txtFileSize.TabIndex = 7
|
||||
Me.txtFileSize.TabStop = False
|
||||
'
|
||||
'btnDeleteBackup
|
||||
'
|
||||
Me.btnDeleteBackup.Location = New System.Drawing.Point(96, 125)
|
||||
Me.btnDeleteBackup.Location = New System.Drawing.Point(129, 125)
|
||||
Me.btnDeleteBackup.Name = "btnDeleteBackup"
|
||||
Me.btnDeleteBackup.Size = New System.Drawing.Size(114, 23)
|
||||
Me.btnDeleteBackup.TabIndex = 10
|
||||
Me.btnDeleteBackup.TabIndex = 8
|
||||
Me.btnDeleteBackup.Text = "&Delete Backup"
|
||||
Me.btnDeleteBackup.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblFileSize
|
||||
'lblBackupFile
|
||||
'
|
||||
Me.lblFileSize.AutoSize = True
|
||||
Me.lblFileSize.Location = New System.Drawing.Point(6, 77)
|
||||
Me.lblFileSize.Name = "lblFileSize"
|
||||
Me.lblFileSize.Size = New System.Drawing.Size(70, 13)
|
||||
Me.lblFileSize.TabIndex = 2
|
||||
Me.lblFileSize.Text = "Backup Size:"
|
||||
Me.lblBackupFile.AutoSize = True
|
||||
Me.lblBackupFile.Location = New System.Drawing.Point(6, 77)
|
||||
Me.lblBackupFile.Name = "lblBackupFile"
|
||||
Me.lblBackupFile.Size = New System.Drawing.Size(66, 13)
|
||||
Me.lblBackupFile.TabIndex = 2
|
||||
Me.lblBackupFile.Text = "Backup File:"
|
||||
'
|
||||
'lblSync
|
||||
'lblRemote
|
||||
'
|
||||
Me.lblSync.AutoSize = True
|
||||
Me.lblSync.Location = New System.Drawing.Point(6, 130)
|
||||
Me.lblSync.Name = "lblSync"
|
||||
Me.lblSync.Size = New System.Drawing.Size(62, 13)
|
||||
Me.lblSync.TabIndex = 4
|
||||
Me.lblSync.Text = "Up to Date!"
|
||||
Me.lblSync.Visible = False
|
||||
Me.lblRemote.AutoSize = True
|
||||
Me.lblRemote.Location = New System.Drawing.Point(6, 27)
|
||||
Me.lblRemote.Name = "lblRemote"
|
||||
Me.lblRemote.Size = New System.Drawing.Size(73, 13)
|
||||
Me.lblRemote.TabIndex = 0
|
||||
Me.lblRemote.Text = "Backup Data:"
|
||||
'
|
||||
'txtCurrentBackup
|
||||
'lblLocalData
|
||||
'
|
||||
Me.txtCurrentBackup.Location = New System.Drawing.Point(96, 24)
|
||||
Me.txtCurrentBackup.Name = "txtCurrentBackup"
|
||||
Me.txtCurrentBackup.ReadOnly = True
|
||||
Me.txtCurrentBackup.Size = New System.Drawing.Size(387, 20)
|
||||
Me.txtCurrentBackup.TabIndex = 5
|
||||
Me.txtCurrentBackup.TabStop = False
|
||||
'
|
||||
'lblCurrentBackup
|
||||
'
|
||||
Me.lblCurrentBackup.AutoSize = True
|
||||
Me.lblCurrentBackup.Location = New System.Drawing.Point(6, 27)
|
||||
Me.lblCurrentBackup.Name = "lblCurrentBackup"
|
||||
Me.lblCurrentBackup.Size = New System.Drawing.Size(84, 13)
|
||||
Me.lblCurrentBackup.TabIndex = 0
|
||||
Me.lblCurrentBackup.Text = "Current Backup:"
|
||||
'
|
||||
'txtLocalBackup
|
||||
'
|
||||
Me.txtLocalBackup.Location = New System.Drawing.Point(96, 50)
|
||||
Me.txtLocalBackup.Name = "txtLocalBackup"
|
||||
Me.txtLocalBackup.ReadOnly = True
|
||||
Me.txtLocalBackup.Size = New System.Drawing.Size(387, 20)
|
||||
Me.txtLocalBackup.TabIndex = 6
|
||||
Me.txtLocalBackup.TabStop = False
|
||||
'
|
||||
'lblLastBackup
|
||||
'
|
||||
Me.lblLastBackup.AutoSize = True
|
||||
Me.lblLastBackup.Location = New System.Drawing.Point(6, 53)
|
||||
Me.lblLastBackup.Name = "lblLastBackup"
|
||||
Me.lblLastBackup.Size = New System.Drawing.Size(76, 13)
|
||||
Me.lblLastBackup.TabIndex = 1
|
||||
Me.lblLastBackup.Text = "Local Backup:"
|
||||
Me.lblLocalData.AutoSize = True
|
||||
Me.lblLocalData.Location = New System.Drawing.Point(6, 53)
|
||||
Me.lblLocalData.Name = "lblLocalData"
|
||||
Me.lblLocalData.Size = New System.Drawing.Size(62, 13)
|
||||
Me.lblLocalData.TabIndex = 1
|
||||
Me.lblLocalData.Text = "Local Data:"
|
||||
'
|
||||
'btnMarkAsRestored
|
||||
'
|
||||
Me.btnMarkAsRestored.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnMarkAsRestored.Location = New System.Drawing.Point(429, 525)
|
||||
Me.btnMarkAsRestored.Location = New System.Drawing.Point(429, 526)
|
||||
Me.btnMarkAsRestored.Name = "btnMarkAsRestored"
|
||||
Me.btnMarkAsRestored.Size = New System.Drawing.Size(100, 23)
|
||||
Me.btnMarkAsRestored.TabIndex = 14
|
||||
Me.btnMarkAsRestored.TabIndex = 17
|
||||
Me.btnMarkAsRestored.Text = "&Mark as Restored"
|
||||
Me.btnMarkAsRestored.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnRestore
|
||||
'
|
||||
Me.btnRestore.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnRestore.Location = New System.Drawing.Point(535, 525)
|
||||
Me.btnRestore.Location = New System.Drawing.Point(535, 526)
|
||||
Me.btnRestore.Name = "btnRestore"
|
||||
Me.btnRestore.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnRestore.TabIndex = 15
|
||||
Me.btnRestore.TabIndex = 18
|
||||
Me.btnRestore.Text = "&Restore"
|
||||
Me.btnRestore.UseVisualStyleBackColor = True
|
||||
'
|
||||
@@ -619,18 +657,18 @@ Partial Class frmGameManager
|
||||
Me.btnSave.Location = New System.Drawing.Point(616, 336)
|
||||
Me.btnSave.Name = "btnSave"
|
||||
Me.btnSave.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnSave.TabIndex = 11
|
||||
Me.btnSave.TabIndex = 13
|
||||
Me.btnSave.Text = "&Save"
|
||||
Me.btnSave.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lstGames
|
||||
'
|
||||
Me.lstGames.FormattingEnabled = True
|
||||
Me.lstGames.Location = New System.Drawing.Point(12, 138)
|
||||
Me.lstGames.Location = New System.Drawing.Point(12, 160)
|
||||
Me.lstGames.Name = "lstGames"
|
||||
Me.lstGames.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
|
||||
Me.lstGames.Size = New System.Drawing.Size(228, 381)
|
||||
Me.lstGames.TabIndex = 1
|
||||
Me.lstGames.Size = New System.Drawing.Size(228, 355)
|
||||
Me.lstGames.TabIndex = 3
|
||||
'
|
||||
'btnCancel
|
||||
'
|
||||
@@ -638,7 +676,7 @@ Partial Class frmGameManager
|
||||
Me.btnCancel.Location = New System.Drawing.Point(697, 336)
|
||||
Me.btnCancel.Name = "btnCancel"
|
||||
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnCancel.TabIndex = 12
|
||||
Me.btnCancel.TabIndex = 14
|
||||
Me.btnCancel.Text = "&Cancel"
|
||||
Me.btnCancel.UseVisualStyleBackColor = True
|
||||
'
|
||||
@@ -648,7 +686,7 @@ Partial Class frmGameManager
|
||||
Me.chkEnabled.Location = New System.Drawing.Point(247, 340)
|
||||
Me.chkEnabled.Name = "chkEnabled"
|
||||
Me.chkEnabled.Size = New System.Drawing.Size(109, 17)
|
||||
Me.chkEnabled.TabIndex = 8
|
||||
Me.chkEnabled.TabIndex = 10
|
||||
Me.chkEnabled.Text = "Monitor this game"
|
||||
Me.chkEnabled.UseVisualStyleBackColor = True
|
||||
'
|
||||
@@ -692,10 +730,10 @@ Partial Class frmGameManager
|
||||
Me.optPendingRestores.AutoSize = True
|
||||
Me.optPendingRestores.Location = New System.Drawing.Point(6, 64)
|
||||
Me.optPendingRestores.Name = "optPendingRestores"
|
||||
Me.optPendingRestores.Size = New System.Drawing.Size(122, 17)
|
||||
Me.optPendingRestores.Size = New System.Drawing.Size(134, 17)
|
||||
Me.optPendingRestores.TabIndex = 2
|
||||
Me.optPendingRestores.TabStop = True
|
||||
Me.optPendingRestores.Text = "New Saves Pending"
|
||||
Me.optPendingRestores.Text = "New Backups Pending"
|
||||
Me.optPendingRestores.UseVisualStyleBackColor = True
|
||||
'
|
||||
'optAllGames
|
||||
@@ -714,7 +752,7 @@ Partial Class frmGameManager
|
||||
Me.btnImport.Location = New System.Drawing.Point(84, 526)
|
||||
Me.btnImport.Name = "btnImport"
|
||||
Me.btnImport.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnImport.TabIndex = 4
|
||||
Me.btnImport.TabIndex = 6
|
||||
Me.btnImport.Text = "&Import"
|
||||
Me.btnImport.UseVisualStyleBackColor = True
|
||||
'
|
||||
@@ -723,7 +761,7 @@ Partial Class frmGameManager
|
||||
Me.btnExport.Location = New System.Drawing.Point(165, 526)
|
||||
Me.btnExport.Name = "btnExport"
|
||||
Me.btnExport.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnExport.TabIndex = 5
|
||||
Me.btnExport.TabIndex = 7
|
||||
Me.btnExport.Text = "&Export"
|
||||
Me.btnExport.UseVisualStyleBackColor = True
|
||||
'
|
||||
@@ -746,11 +784,48 @@ Partial Class frmGameManager
|
||||
Me.cmsFile.Size = New System.Drawing.Size(117, 22)
|
||||
Me.cmsFile.Text = "&File..."
|
||||
'
|
||||
'txtQuickFilter
|
||||
'
|
||||
Me.txtQuickFilter.Location = New System.Drawing.Point(80, 134)
|
||||
Me.txtQuickFilter.Name = "txtQuickFilter"
|
||||
Me.txtQuickFilter.Size = New System.Drawing.Size(160, 20)
|
||||
Me.txtQuickFilter.TabIndex = 2
|
||||
'
|
||||
'lblQuickFilter
|
||||
'
|
||||
Me.lblQuickFilter.AutoSize = True
|
||||
Me.lblQuickFilter.Location = New System.Drawing.Point(12, 137)
|
||||
Me.lblQuickFilter.Name = "lblQuickFilter"
|
||||
Me.lblQuickFilter.Size = New System.Drawing.Size(63, 13)
|
||||
Me.lblQuickFilter.TabIndex = 1
|
||||
Me.lblQuickFilter.Text = "Quick Filter:"
|
||||
'
|
||||
'cmsDeleteBackup
|
||||
'
|
||||
Me.cmsDeleteBackup.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.cmsDeleteOne, Me.cmsDeleteAll})
|
||||
Me.cmsDeleteBackup.Name = "cmsDeleteBackup"
|
||||
Me.cmsDeleteBackup.ShowImageMargin = False
|
||||
Me.cmsDeleteBackup.Size = New System.Drawing.Size(115, 48)
|
||||
'
|
||||
'cmsDeleteOne
|
||||
'
|
||||
Me.cmsDeleteOne.Name = "cmsDeleteOne"
|
||||
Me.cmsDeleteOne.Size = New System.Drawing.Size(114, 22)
|
||||
Me.cmsDeleteOne.Text = "&Selected File"
|
||||
'
|
||||
'cmsDeleteAll
|
||||
'
|
||||
Me.cmsDeleteAll.Name = "cmsDeleteAll"
|
||||
Me.cmsDeleteAll.Size = New System.Drawing.Size(114, 22)
|
||||
Me.cmsDeleteAll.Text = "&All Files"
|
||||
'
|
||||
'frmGameManager
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(784, 561)
|
||||
Me.Controls.Add(Me.lblQuickFilter)
|
||||
Me.Controls.Add(Me.txtQuickFilter)
|
||||
Me.Controls.Add(Me.btnExport)
|
||||
Me.Controls.Add(Me.btnImport)
|
||||
Me.Controls.Add(Me.grpFilter)
|
||||
@@ -778,6 +853,7 @@ Partial Class frmGameManager
|
||||
Me.Text = "Game Manager"
|
||||
Me.grpConfig.ResumeLayout(False)
|
||||
Me.grpConfig.PerformLayout()
|
||||
CType(Me.nudLimit, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.grpExtra.ResumeLayout(False)
|
||||
Me.grpExtra.PerformLayout()
|
||||
CType(Me.pbIcon, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
@@ -787,6 +863,7 @@ Partial Class frmGameManager
|
||||
Me.grpFilter.ResumeLayout(False)
|
||||
Me.grpFilter.PerformLayout()
|
||||
Me.cmsImport.ResumeLayout(False)
|
||||
Me.cmsDeleteBackup.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
@@ -828,14 +905,10 @@ Partial Class frmGameManager
|
||||
Friend WithEvents btnIconBrowse As System.Windows.Forms.Button
|
||||
Friend WithEvents txtIcon As System.Windows.Forms.TextBox
|
||||
Friend WithEvents txtID As System.Windows.Forms.TextBox
|
||||
Friend WithEvents txtCurrentBackup As System.Windows.Forms.TextBox
|
||||
Friend WithEvents lblCurrentBackup As System.Windows.Forms.Label
|
||||
Friend WithEvents txtLocalBackup As System.Windows.Forms.TextBox
|
||||
Friend WithEvents lblLastBackup As System.Windows.Forms.Label
|
||||
Friend WithEvents lblSync As System.Windows.Forms.Label
|
||||
Friend WithEvents lblRemote As System.Windows.Forms.Label
|
||||
Friend WithEvents lblLocalData As System.Windows.Forms.Label
|
||||
Friend WithEvents chkEnabled As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents txtFileSize As System.Windows.Forms.TextBox
|
||||
Friend WithEvents lblFileSize As System.Windows.Forms.Label
|
||||
Friend WithEvents lblBackupFile As System.Windows.Forms.Label
|
||||
Friend WithEvents btnMarkAsRestored As System.Windows.Forms.Button
|
||||
Friend WithEvents btnRestore As System.Windows.Forms.Button
|
||||
Friend WithEvents btnDeleteBackup As System.Windows.Forms.Button
|
||||
@@ -851,10 +924,21 @@ Partial Class frmGameManager
|
||||
Friend WithEvents btnInclude As System.Windows.Forms.Button
|
||||
Friend WithEvents btnExclude As System.Windows.Forms.Button
|
||||
Friend WithEvents lblRestorePath As Label
|
||||
Friend WithEvents txtRestorePath As TextBox
|
||||
Friend WithEvents btnImport As System.Windows.Forms.Button
|
||||
Friend WithEvents btnExport As System.Windows.Forms.Button
|
||||
Friend WithEvents cmsImport As System.Windows.Forms.ContextMenuStrip
|
||||
Friend WithEvents cmsOfficial As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents cmsFile As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents txtQuickFilter As TextBox
|
||||
Friend WithEvents lblQuickFilter As Label
|
||||
Friend WithEvents lblLocalBackupData As Label
|
||||
Friend WithEvents lblRestorePathData As Label
|
||||
Friend WithEvents lblBackupFileData As Label
|
||||
Friend WithEvents lblLimit As Label
|
||||
Friend WithEvents nudLimit As NumericUpDown
|
||||
Friend WithEvents cboRemoteBackup As ComboBox
|
||||
Friend WithEvents cmsDeleteBackup As ContextMenuStrip
|
||||
Friend WithEvents cmsDeleteOne As ToolStripMenuItem
|
||||
Friend WithEvents cmsDeleteAll As ToolStripMenuItem
|
||||
Friend WithEvents chkCleanFolder As CheckBox
|
||||
End Class
|
||||
|
||||
@@ -120,4 +120,7 @@
|
||||
<metadata name="cmsImport.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="cmsDeleteBackup.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>127, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
+273
-123
@@ -11,7 +11,7 @@ Public Class frmGameManager
|
||||
Private bTriggerBackup As Boolean = False
|
||||
Private bTriggerRestore As Boolean = False
|
||||
Private oBackupList As New List(Of clsGame)
|
||||
Private oRestoreList As New List(Of clsGame)
|
||||
Private oRestoreList As New Hashtable
|
||||
Private oAppData As Hashtable
|
||||
Private oLocalBackupData As SortedList
|
||||
Private oRemoteBackupData As SortedList
|
||||
@@ -20,6 +20,7 @@ Public Class frmGameManager
|
||||
Private oCurrentTagFilters As New List(Of clsTag)
|
||||
Private oCurrentStringFilters As New Hashtable
|
||||
Private eCurrentFilter As frmFilter.eFilterType = frmFilter.eFilterType.NoFilter
|
||||
Private WithEvents tmFilterTimer As Timer
|
||||
|
||||
Private Enum eModes As Integer
|
||||
View = 1
|
||||
@@ -113,11 +114,11 @@ Public Class frmGameManager
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property RestoreList As List(Of clsGame)
|
||||
Property RestoreList As Hashtable
|
||||
Get
|
||||
Return oRestoreList
|
||||
End Get
|
||||
Set(value As List(Of clsGame))
|
||||
Set(value As Hashtable)
|
||||
oRestoreList = value
|
||||
End Set
|
||||
End Property
|
||||
@@ -141,8 +142,8 @@ Public Class frmGameManager
|
||||
End Property
|
||||
|
||||
Private Sub LoadBackupData()
|
||||
oRemoteBackupData = mgrManifest.ReadManifest(mgrSQLite.Database.Remote)
|
||||
oLocalBackupData = mgrManifest.ReadManifest(mgrSQLite.Database.Local)
|
||||
oRemoteBackupData = mgrManifest.ReadLatestManifest(mgrSQLite.Database.Remote)
|
||||
oLocalBackupData = mgrManifest.ReadLatestManifest(mgrSQLite.Database.Local)
|
||||
End Sub
|
||||
|
||||
Private Function ConvertToRelativePath(ByVal sSavePath As String, ByVal sAppPath As String) As String
|
||||
@@ -159,7 +160,7 @@ Public Class frmGameManager
|
||||
End Function
|
||||
|
||||
Private Sub CheckManifestandUpdate(ByVal oOriginalApp As clsGame, ByVal oNewApp As clsGame)
|
||||
Dim oBackupItem As clsBackup
|
||||
Dim oBackupItems As List(Of clsBackup)
|
||||
Dim sDirectory As String
|
||||
Dim sNewDirectory As String
|
||||
Dim sFileName As String
|
||||
@@ -168,9 +169,10 @@ Public Class frmGameManager
|
||||
'If there is a name change, check and update the manifest
|
||||
If oNewApp.Name <> oOriginalApp.Name Then
|
||||
'Local
|
||||
If mgrManifest.DoManifestCheck(oOriginalApp.Name, mgrSQLite.Database.Local) Then
|
||||
oBackupItem = mgrManifest.DoManifestGetByName(oOriginalApp.Name, mgrSQLite.Database.Local)
|
||||
|
||||
If mgrManifest.DoManifestNameCheck(oOriginalApp.Name, mgrSQLite.Database.Local) Then
|
||||
oBackupItems = mgrManifest.DoManifestGetByName(oOriginalApp.Name, mgrSQLite.Database.Local)
|
||||
'The local manifest will only have one entry per game, therefore this runs only once
|
||||
For Each oBackupItem As clsBackup In oBackupItems
|
||||
'Rename Current Backup File & Folder
|
||||
sFileName = BackupFolder & oBackupItem.FileName
|
||||
|
||||
@@ -191,16 +193,21 @@ Public Class frmGameManager
|
||||
|
||||
oBackupItem.Name = oNewApp.Name
|
||||
oBackupItem.FileName = oBackupItem.FileName.Replace(oOriginalApp.Name, oNewApp.Name)
|
||||
mgrManifest.DoManifestNameUpdate(oOriginalApp.Name, oBackupItem, mgrSQLite.Database.Local)
|
||||
oLocalBackupData = mgrManifest.ReadManifest(mgrSQLite.Database.Local)
|
||||
mgrManifest.DoManifestUpdateByID(oBackupItem, mgrSQLite.Database.Local)
|
||||
Next
|
||||
oLocalBackupData = mgrManifest.ReadLatestManifest(mgrSQLite.Database.Local)
|
||||
End If
|
||||
|
||||
'Remote
|
||||
If mgrManifest.DoManifestCheck(oOriginalApp.Name, mgrSQLite.Database.Remote) Then
|
||||
oBackupItem = mgrManifest.DoManifestGetByName(oOriginalApp.Name, mgrSQLite.Database.Remote)
|
||||
If mgrManifest.DoManifestNameCheck(oOriginalApp.Name, mgrSQLite.Database.Remote) Then
|
||||
oBackupItems = mgrManifest.DoManifestGetByName(oOriginalApp.Name, mgrSQLite.Database.Remote)
|
||||
|
||||
For Each oBackupItem As clsBackup In oBackupItems
|
||||
oBackupItem.Name = oNewApp.Name
|
||||
oBackupItem.FileName = oBackupItem.FileName.Replace(oOriginalApp.Name, oNewApp.Name)
|
||||
mgrManifest.DoManifestNameUpdate(oOriginalApp.Name, oBackupItem, mgrSQLite.Database.Remote)
|
||||
oRemoteBackupData = mgrManifest.ReadManifest(mgrSQLite.Database.Remote)
|
||||
mgrManifest.DoManifestUpdateByID(oBackupItem, mgrSQLite.Database.Remote)
|
||||
Next
|
||||
oRemoteBackupData = mgrManifest.ReadLatestManifest(mgrSQLite.Database.Remote)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
@@ -280,7 +287,7 @@ Public Class frmGameManager
|
||||
End If
|
||||
End If
|
||||
|
||||
sNewPath = mgrCommon.OpenFileBrowser(frmGameManager_ChooseExe, "exe", _
|
||||
sNewPath = mgrCommon.OpenFileBrowser(frmGameManager_ChooseExe, "exe",
|
||||
frmGameManager_Executable, sDefaultFolder, False)
|
||||
|
||||
If sNewPath <> String.Empty Then
|
||||
@@ -338,10 +345,10 @@ Public Class frmGameManager
|
||||
|
||||
'Unix Handler
|
||||
If Not mgrCommon.IsUnix Then
|
||||
sNewPath = mgrCommon.OpenFileBrowser(frmGameManager_ChooseCustomIcon, "ico", _
|
||||
sNewPath = mgrCommon.OpenFileBrowser(frmGameManager_ChooseCustomIcon, "ico",
|
||||
frmGameManager_Icon, sDefaultFolder, False)
|
||||
Else
|
||||
sNewPath = mgrCommon.OpenFileBrowser(frmGameManager_ChooseCustomIcon, "png", _
|
||||
sNewPath = mgrCommon.OpenFileBrowser(frmGameManager_ChooseCustomIcon, "png",
|
||||
"PNG", sDefaultFolder, False)
|
||||
End If
|
||||
|
||||
@@ -377,11 +384,19 @@ Public Class frmGameManager
|
||||
Dim oApp As clsGame
|
||||
Dim oData As KeyValuePair(Of String, String)
|
||||
Dim oList As New List(Of KeyValuePair(Of String, String))
|
||||
Dim sFilter As String = txtQuickFilter.Text
|
||||
|
||||
For Each de As DictionaryEntry In AppData
|
||||
oApp = DirectCast(de.Value, clsGame)
|
||||
oData = New KeyValuePair(Of String, String)(oApp.ID, oApp.Name)
|
||||
'Apply the quick filter if applicable
|
||||
If sFilter = String.Empty Then
|
||||
oList.Add(oData)
|
||||
Else
|
||||
If oApp.Name.ToLower.Contains(sFilter.ToLower) Then
|
||||
oList.Add(oData)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
oList.Sort(AddressOf mgrCommon.CompareByListBoxItemByValue)
|
||||
@@ -455,6 +470,7 @@ Public Class frmGameManager
|
||||
frm.ShowDialog()
|
||||
|
||||
txtBox.Text = frm.BuilderString
|
||||
VerifyCleanFolder()
|
||||
End Sub
|
||||
|
||||
Private Function FindRestorePath() As Boolean
|
||||
@@ -532,13 +548,49 @@ Public Class frmGameManager
|
||||
ModeChange()
|
||||
End Sub
|
||||
|
||||
Private Sub GetBackupInfo(ByVal oApp As clsGame)
|
||||
Dim oBackupInfo As clsBackup
|
||||
Private Sub UpdateBackupInfo(ByVal sManifestID As String)
|
||||
Dim sFileName As String
|
||||
|
||||
If sManifestID <> String.Empty Then
|
||||
CurrentBackupItem = mgrManifest.DoManifestGetByID(sManifestID, mgrSQLite.Database.Remote)
|
||||
|
||||
sFileName = BackupFolder & CurrentBackupItem.FileName
|
||||
|
||||
If File.Exists(sFileName) Then
|
||||
lblBackupFileData.Text = Path.GetFileName(CurrentBackupItem.FileName) & " (" & mgrCommon.GetFileSize(sFileName) & ")"
|
||||
Else
|
||||
lblBackupFileData.Text = frmGameManager_ErrorNoBackupExists
|
||||
End If
|
||||
|
||||
mgrRestore.DoPathOverride(CurrentBackupItem, CurrentGame)
|
||||
lblRestorePathData.Text = CurrentBackupItem.RestorePath
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GetBackupInfo(ByVal oApp As clsGame)
|
||||
Dim oBackupInfo As clsBackup
|
||||
Dim oCurrentBackup As clsBackup
|
||||
Dim oCurrentBackups As List(Of clsBackup)
|
||||
Dim sFileName As String
|
||||
Dim oComboItems As New List(Of KeyValuePair(Of String, String))
|
||||
Dim bLocalData As Boolean = False
|
||||
Dim bRemoteData As Boolean = False
|
||||
|
||||
'cboRemoteBackup
|
||||
cboRemoteBackup.ValueMember = "Key"
|
||||
cboRemoteBackup.DisplayMember = "Value"
|
||||
|
||||
If oRemoteBackupData.Contains(oApp.Name) Then
|
||||
bRemoteData = True
|
||||
oCurrentBackups = mgrManifest.DoManifestGetByName(oApp.Name, mgrSQLite.Database.Remote)
|
||||
|
||||
For Each oCurrentBackup In oCurrentBackups
|
||||
oComboItems.Add(New KeyValuePair(Of String, String)(oCurrentBackup.ID, mgrCommon.FormatString(frmGameManager_BackupTimeAndName, New String() {oCurrentBackup.DateUpdated, oCurrentBackup.UpdatedBy})))
|
||||
Next
|
||||
|
||||
CurrentBackupItem = DirectCast(oRemoteBackupData(oApp.Name), clsBackup)
|
||||
txtCurrentBackup.Text = mgrCommon.FormatString(frmGameManager_BackupTimeAndName, New String() {CurrentBackupItem.DateUpdated, CurrentBackupItem.UpdatedBy})
|
||||
|
||||
sFileName = BackupFolder & CurrentBackupItem.FileName
|
||||
|
||||
btnOpenBackupFile.Enabled = True
|
||||
@@ -547,80 +599,95 @@ Public Class frmGameManager
|
||||
btnDeleteBackup.Enabled = True
|
||||
|
||||
If File.Exists(sFileName) Then
|
||||
txtFileSize.Text = mgrCommon.GetFileSize(sFileName)
|
||||
lblBackupFileData.Text = Path.GetFileName(CurrentBackupItem.FileName) & " (" & mgrCommon.GetFileSize(sFileName) & ")"
|
||||
Else
|
||||
txtFileSize.Text = frmGameManager_ErrorNoBackupExists
|
||||
lblBackupFileData.Text = frmGameManager_ErrorNoBackupExists
|
||||
End If
|
||||
|
||||
mgrRestore.DoPathOverride(CurrentBackupItem, oApp)
|
||||
txtRestorePath.Text = CurrentBackupItem.RestorePath
|
||||
lblRestorePathData.Text = CurrentBackupItem.RestorePath
|
||||
Else
|
||||
txtCurrentBackup.Text = frmGameManager_Never
|
||||
txtFileSize.Text = String.Empty
|
||||
txtRestorePath.Text = String.Empty
|
||||
oComboItems.Add(New KeyValuePair(Of String, String)(String.Empty, frmGameManager_None))
|
||||
lblBackupFileData.Text = String.Empty
|
||||
lblRestorePathData.Text = String.Empty
|
||||
btnOpenBackupFile.Enabled = False
|
||||
btnOpenRestorePath.Enabled = False
|
||||
btnRestore.Enabled = False
|
||||
btnDeleteBackup.Enabled = False
|
||||
End If
|
||||
|
||||
cboRemoteBackup.DataSource = oComboItems
|
||||
|
||||
If oLocalBackupData.Contains(oApp.Name) Then
|
||||
bLocalData = True
|
||||
oBackupInfo = DirectCast(oLocalBackupData(oApp.Name), clsBackup)
|
||||
txtLocalBackup.Text = mgrCommon.FormatString(frmGameManager_BackupTimeAndName, New String() {oBackupInfo.DateUpdated, oBackupInfo.UpdatedBy})
|
||||
lblLocalBackupData.Text = mgrCommon.FormatString(frmGameManager_BackupTimeAndName, New String() {oBackupInfo.DateUpdated, oBackupInfo.UpdatedBy})
|
||||
Else
|
||||
txtLocalBackup.Text = frmGameManager_Never
|
||||
lblLocalBackupData.Text = frmGameManager_Unknown
|
||||
End If
|
||||
|
||||
If txtCurrentBackup.Text = frmGameManager_Never And txtLocalBackup.Text = frmGameManager_Never Then
|
||||
lblSync.Visible = False
|
||||
If Not bRemoteData And Not bLocalData Then
|
||||
btnMarkAsRestored.Enabled = False
|
||||
ElseIf txtCurrentBackup.Text = frmGameManager_Never And txtLocalBackup.Text <> frmGameManager_Never Then
|
||||
lblSync.Visible = False
|
||||
lblLocalBackupData.ForeColor = Color.Black
|
||||
ElseIf Not bRemoteData And bLocalData Then
|
||||
btnMarkAsRestored.Enabled = False
|
||||
ElseIf txtCurrentBackup.Text <> txtLocalBackup.Text Then
|
||||
lblSync.ForeColor = Color.Red
|
||||
lblSync.Text = frmGameManager_OutofSync
|
||||
lblSync.Visible = True
|
||||
lblLocalBackupData.ForeColor = Color.Black
|
||||
ElseIf oComboItems(0).Value <> lblLocalBackupData.Text Then
|
||||
lblLocalBackupData.ForeColor = Color.Red
|
||||
btnMarkAsRestored.Enabled = True
|
||||
Else
|
||||
lblSync.ForeColor = Color.Green
|
||||
lblSync.Text = frmGameManager_UpToDate
|
||||
lblSync.Visible = True
|
||||
lblLocalBackupData.ForeColor = Color.Green
|
||||
btnMarkAsRestored.Enabled = False
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub DeleteBackup()
|
||||
Dim oDir As DirectoryInfo
|
||||
Dim sSubDir As String
|
||||
Private Sub DeleteAllBackups()
|
||||
Dim oBackupData As List(Of clsBackup)
|
||||
Dim oBackup As clsBackup
|
||||
|
||||
If mgrCommon.ShowMessage(frmGameManager_ConfirmBackupDelete, CurrentBackupItem.Name, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
mgrManifest.DoManifestDelete(CurrentBackupItem, mgrSQLite.Database.Local)
|
||||
mgrManifest.DoManifestDelete(CurrentBackupItem, mgrSQLite.Database.Remote)
|
||||
If mgrCommon.ShowMessage(frmGameManager_ConfirmBackupDeleteAll, CurrentGame.Name, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
oBackupData = mgrManifest.DoManifestGetByName(CurrentGame.Name, mgrSQLite.Database.Remote)
|
||||
|
||||
For Each oBackup In oBackupData
|
||||
'Delete the specific remote manifest entry
|
||||
mgrManifest.DoManifestDeletebyID(oBackup, mgrSQLite.Database.Remote)
|
||||
'Delete referenced backup file from the backup folder
|
||||
mgrCommon.DeleteFile(BackupFolder & oBackup.FileName)
|
||||
'Check for sub-directory and delete if empty (we need to do this every pass just in case the user had a mix of settings at one point)
|
||||
mgrCommon.DeleteDirectoryByBackup(BackupFolder, oBackup)
|
||||
Next
|
||||
|
||||
'Delete local manifest entry
|
||||
mgrManifest.DoManifestDeletebyName(CurrentBackupItem, mgrSQLite.Database.Local)
|
||||
|
||||
LoadBackupData()
|
||||
|
||||
If oCurrentGame.Temporary Then
|
||||
LoadData()
|
||||
eCurrentMode = eModes.Disabled
|
||||
ModeChange()
|
||||
Else
|
||||
FillData()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub DeleteBackup()
|
||||
If mgrCommon.ShowMessage(frmGameManager_ConfirmBackupDelete, Path.GetFileName(CurrentBackupItem.FileName), MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
'Delete the specific remote manifest entry
|
||||
mgrManifest.DoManifestDeletebyID(CurrentBackupItem, mgrSQLite.Database.Remote)
|
||||
|
||||
'If a remote manifest entry no longer exists for this game, delete the local entry
|
||||
If Not mgrManifest.DoGlobalManifestCheck(CurrentBackupItem.Name, mgrSQLite.Database.Remote) Then
|
||||
mgrManifest.DoManifestDeletebyName(CurrentBackupItem, mgrSQLite.Database.Local)
|
||||
End If
|
||||
|
||||
'Delete referenced backup file from the backup folder
|
||||
mgrCommon.DeleteFile(BackupFolder & CurrentBackupItem.FileName)
|
||||
|
||||
'Check if using backup sub-directories (Probably not the best way to check for this)
|
||||
If CurrentBackupItem.FileName.StartsWith(CurrentBackupItem.Name & Path.DirectorySeparatorChar) Then
|
||||
'Build sub-dir backup path
|
||||
sSubDir = BackupFolder & CurrentBackupItem.Name
|
||||
|
||||
If Directory.Exists(sSubDir) Then
|
||||
'Check if there's any sub-directories or files remaining
|
||||
oDir = New DirectoryInfo(sSubDir)
|
||||
If oDir.GetDirectories.Length > 0 Or oDir.GetFiles.Length > 0 Then
|
||||
'Confirm
|
||||
If mgrCommon.ShowMessage(frmGameManager_ConfirmBackupFolderDelete, New String() {sSubDir, oDir.GetDirectories.Length, oDir.GetFiles.Length}, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
If Directory.Exists(sSubDir) Then mgrCommon.DeleteDirectory(sSubDir, True)
|
||||
End If
|
||||
Else
|
||||
'Folder is empty, delete the empty sub-folder
|
||||
If Directory.Exists(sSubDir) Then mgrCommon.DeleteDirectory(sSubDir)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
'Check for sub-directory and delete if empty
|
||||
mgrCommon.DeleteDirectoryByBackup(BackupFolder, CurrentBackupItem)
|
||||
|
||||
LoadBackupData()
|
||||
|
||||
@@ -648,7 +715,9 @@ Public Class frmGameManager
|
||||
txtFileType.Text = oApp.FileType
|
||||
txtExclude.Text = oApp.ExcludeList
|
||||
chkFolderSave.Checked = oApp.FolderSave
|
||||
chkCleanFolder.Checked = oApp.CleanFolder
|
||||
chkTimeStamp.Checked = oApp.AppendTimeStamp
|
||||
nudLimit.Value = oApp.BackupLimit
|
||||
chkEnabled.Checked = oApp.Enabled
|
||||
chkMonitorOnly.Checked = oApp.MonitorOnly
|
||||
|
||||
@@ -720,9 +789,6 @@ Public Class frmGameManager
|
||||
AddHandler DirectCast(ctl, NumericUpDown).ValueChanged, AddressOf DirtyCheck_ValueChanged
|
||||
End If
|
||||
Next
|
||||
|
||||
'Exemptions
|
||||
RemoveHandler txtRestorePath.TextChanged, AddressOf DirtyCheck_ValueChanged
|
||||
End Sub
|
||||
|
||||
Private Sub AssignDirtyHandlersMisc()
|
||||
@@ -736,8 +802,12 @@ Public Class frmGameManager
|
||||
DirectCast(ctl, TextBox).Text = String.Empty
|
||||
ElseIf TypeOf ctl Is CheckBox Then
|
||||
DirectCast(ctl, CheckBox).Checked = False
|
||||
ElseIf TypeOf ctl Is Label Then
|
||||
If ctl.Tag = "wipe" Then DirectCast(ctl, Label).Text = String.Empty
|
||||
ElseIf TypeOf ctl Is NumericUpDown Then
|
||||
DirectCast(ctl, NumericUpDown).Value = 0
|
||||
DirectCast(ctl, NumericUpDown).Value = DirectCast(ctl, NumericUpDown).Minimum
|
||||
ElseIf TypeOf ctl Is ComboBox Then
|
||||
DirectCast(ctl, ComboBox).DataSource = Nothing
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
@@ -749,6 +819,8 @@ Public Class frmGameManager
|
||||
Case eModes.Add
|
||||
grpFilter.Enabled = False
|
||||
lstGames.Enabled = False
|
||||
lblQuickFilter.Enabled = False
|
||||
txtQuickFilter.Enabled = False
|
||||
grpConfig.Enabled = True
|
||||
chkMonitorOnly.Enabled = True
|
||||
grpExtra.Enabled = True
|
||||
@@ -756,6 +828,7 @@ Public Class frmGameManager
|
||||
WipeControls(grpConfig.Controls)
|
||||
WipeControls(grpExtra.Controls)
|
||||
WipeControls(grpStats.Controls)
|
||||
chkCleanFolder.Enabled = False
|
||||
pbIcon.Image = Icon_Unknown
|
||||
chkEnabled.Enabled = True
|
||||
chkMonitorOnly.Enabled = True
|
||||
@@ -769,7 +842,6 @@ Public Class frmGameManager
|
||||
btnDeleteBackup.Enabled = False
|
||||
btnOpenBackupFile.Enabled = False
|
||||
btnOpenRestorePath.Enabled = False
|
||||
lblSync.Visible = False
|
||||
chkEnabled.Checked = True
|
||||
chkMonitorOnly.Checked = False
|
||||
btnTags.Enabled = False
|
||||
@@ -781,6 +853,8 @@ Public Class frmGameManager
|
||||
Case eModes.Edit
|
||||
grpFilter.Enabled = False
|
||||
lstGames.Enabled = False
|
||||
lblQuickFilter.Enabled = False
|
||||
txtQuickFilter.Enabled = False
|
||||
grpConfig.Enabled = True
|
||||
chkEnabled.Enabled = True
|
||||
chkMonitorOnly.Enabled = True
|
||||
@@ -803,6 +877,8 @@ Public Class frmGameManager
|
||||
Case eModes.View
|
||||
grpFilter.Enabled = True
|
||||
lstGames.Enabled = True
|
||||
lblQuickFilter.Enabled = True
|
||||
txtQuickFilter.Enabled = True
|
||||
grpConfig.Enabled = True
|
||||
chkEnabled.Enabled = True
|
||||
chkMonitorOnly.Enabled = True
|
||||
@@ -820,6 +896,8 @@ Public Class frmGameManager
|
||||
Case eModes.ViewTemp
|
||||
grpFilter.Enabled = True
|
||||
lstGames.Enabled = True
|
||||
lblQuickFilter.Enabled = True
|
||||
txtQuickFilter.Enabled = True
|
||||
grpConfig.Enabled = False
|
||||
chkEnabled.Enabled = False
|
||||
chkMonitorOnly.Enabled = False
|
||||
@@ -840,11 +918,12 @@ Public Class frmGameManager
|
||||
Case eModes.Disabled
|
||||
grpFilter.Enabled = True
|
||||
lstGames.Enabled = True
|
||||
lblQuickFilter.Enabled = True
|
||||
txtQuickFilter.Enabled = True
|
||||
WipeControls(grpConfig.Controls)
|
||||
WipeControls(grpExtra.Controls)
|
||||
WipeControls(grpStats.Controls)
|
||||
pbIcon.Image = Icon_Unknown
|
||||
lblSync.Visible = False
|
||||
btnSave.Enabled = False
|
||||
btnCancel.Enabled = False
|
||||
grpConfig.Enabled = False
|
||||
@@ -865,11 +944,12 @@ Public Class frmGameManager
|
||||
btnExport.Enabled = True
|
||||
Case eModes.MultiSelect
|
||||
lstGames.Enabled = True
|
||||
lblQuickFilter.Enabled = False
|
||||
txtQuickFilter.Enabled = False
|
||||
WipeControls(grpConfig.Controls)
|
||||
WipeControls(grpExtra.Controls)
|
||||
WipeControls(grpStats.Controls)
|
||||
pbIcon.Image = Icon_Unknown
|
||||
lblSync.Visible = False
|
||||
btnSave.Enabled = True
|
||||
btnCancel.Enabled = False
|
||||
grpConfig.Enabled = False
|
||||
@@ -905,38 +985,29 @@ Public Class frmGameManager
|
||||
Else
|
||||
btnInclude.Enabled = True
|
||||
End If
|
||||
VerifyCleanFolder()
|
||||
End Sub
|
||||
|
||||
Private Sub MonitorOnlyModeChange()
|
||||
If chkMonitorOnly.Checked Then
|
||||
txtSavePath.Text = String.Empty
|
||||
chkFolderSave.Checked = True
|
||||
chkTimeStamp.Checked = False
|
||||
|
||||
If txtFileType.Text <> String.Empty Then
|
||||
txtFileType.Text = String.Empty
|
||||
UpdateBuilderButtonLabel(txtFileType.Text, frmGameManager_IncludeShortcut, btnInclude, False)
|
||||
End If
|
||||
If txtExclude.Text <> String.Empty Then
|
||||
txtExclude.Text = String.Empty
|
||||
UpdateBuilderButtonLabel(txtExclude.Text, frmGameManager_ExcludeShortcut, btnExclude, False)
|
||||
End If
|
||||
|
||||
lblSavePath.Enabled = False
|
||||
btnSavePathBrowse.Enabled = False
|
||||
txtSavePath.Enabled = False
|
||||
chkFolderSave.Enabled = False
|
||||
chkTimeStamp.Enabled = False
|
||||
btnInclude.Enabled = False
|
||||
btnExclude.Enabled = False
|
||||
Private Sub TimeStampModeChange()
|
||||
If chkTimeStamp.Checked Then
|
||||
nudLimit.Visible = True
|
||||
lblLimit.Visible = True
|
||||
nudLimit.Value = 5
|
||||
Else
|
||||
lblSavePath.Enabled = True
|
||||
btnSavePathBrowse.Enabled = True
|
||||
txtSavePath.Enabled = True
|
||||
chkFolderSave.Enabled = True
|
||||
chkTimeStamp.Enabled = True
|
||||
btnInclude.Enabled = True
|
||||
btnExclude.Enabled = True
|
||||
nudLimit.Visible = False
|
||||
nudLimit.Value = nudLimit.Minimum
|
||||
lblLimit.Visible = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub VerifyCleanFolder()
|
||||
If Not bIsLoading Then
|
||||
If chkFolderSave.Checked = True And txtExclude.Text = String.Empty And txtSavePath.Text <> String.Empty Then
|
||||
chkCleanFolder.Enabled = True
|
||||
Else
|
||||
chkCleanFolder.Checked = False
|
||||
chkCleanFolder.Enabled = False
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1006,7 +1077,9 @@ Public Class frmGameManager
|
||||
oApp.FileType = txtFileType.Text
|
||||
oApp.ExcludeList = txtExclude.Text
|
||||
oApp.FolderSave = chkFolderSave.Checked
|
||||
oApp.CleanFolder = chkCleanFolder.Checked
|
||||
oApp.AppendTimeStamp = chkTimeStamp.Checked
|
||||
oApp.BackupLimit = nudLimit.Value
|
||||
oApp.Enabled = chkEnabled.Checked
|
||||
oApp.MonitorOnly = chkMonitorOnly.Checked
|
||||
oApp.ProcessPath = txtAppPath.Text
|
||||
@@ -1087,6 +1160,7 @@ Public Class frmGameManager
|
||||
eCurrentMode = eModes.View
|
||||
FillData()
|
||||
ModeChange()
|
||||
VerifyCleanFolder()
|
||||
ElseIf lstGames.SelectedItems.Count > 1 Then
|
||||
eCurrentMode = eModes.MultiSelect
|
||||
ModeChange()
|
||||
@@ -1139,8 +1213,8 @@ Public Class frmGameManager
|
||||
If oMarkList.Count = 1 Then
|
||||
If mgrCommon.ShowMessage(frmGameManager_ConfirmMark, oMarkList(0).Name, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
bWasUpdated = True
|
||||
If mgrManifest.DoManifestCheck(oMarkList(0).Name, mgrSQLite.Database.Local) Then
|
||||
mgrManifest.DoManifestUpdate(oMarkList(0), mgrSQLite.Database.Local)
|
||||
If mgrManifest.DoGlobalManifestCheck(oMarkList(0).Name, mgrSQLite.Database.Local) Then
|
||||
mgrManifest.DoManifestUpdateByName(oMarkList(0), mgrSQLite.Database.Local)
|
||||
Else
|
||||
mgrManifest.DoManifestAdd(oMarkList(0), mgrSQLite.Database.Local)
|
||||
End If
|
||||
@@ -1149,8 +1223,8 @@ Public Class frmGameManager
|
||||
If mgrCommon.ShowMessage(frmGameManager_ConfirmMultiMark, oMarkList.Count, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
bWasUpdated = True
|
||||
For Each oGameBackup In oMarkList
|
||||
If mgrManifest.DoManifestCheck(oGameBackup.Name, mgrSQLite.Database.Local) Then
|
||||
mgrManifest.DoManifestUpdate(oGameBackup, mgrSQLite.Database.Local)
|
||||
If mgrManifest.DoGlobalManifestCheck(oGameBackup.Name, mgrSQLite.Database.Local) Then
|
||||
mgrManifest.DoManifestUpdateByName(oGameBackup, mgrSQLite.Database.Local)
|
||||
Else
|
||||
mgrManifest.DoManifestAdd(oGameBackup, mgrSQLite.Database.Local)
|
||||
End If
|
||||
@@ -1177,10 +1251,11 @@ Public Class frmGameManager
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub TriggerSelectedBackup()
|
||||
Private Sub TriggerSelectedBackup(Optional ByVal bPrompt As Boolean = True)
|
||||
Dim oData As KeyValuePair(Of String, String)
|
||||
Dim sMsg As String = String.Empty
|
||||
Dim oGame As clsGame
|
||||
Dim bDoBackup As Boolean = False
|
||||
|
||||
If lstGames.SelectedItems.Count > 0 Then
|
||||
BackupList.Clear()
|
||||
@@ -1191,41 +1266,61 @@ Public Class frmGameManager
|
||||
Next
|
||||
|
||||
If BackupList.Count = 1 Then
|
||||
bDoBackup = True
|
||||
sMsg = mgrCommon.FormatString(frmGameManager_ConfirmBackup, BackupList(0).Name)
|
||||
ElseIf BackupList.Count > 1 Then
|
||||
bDoBackup = True
|
||||
sMsg = mgrCommon.FormatString(frmGameManager_ConfirmMultiBackup, BackupList.Count)
|
||||
Else
|
||||
mgrCommon.ShowMessage(frmGameManager_ErrorNoValidBackup, MsgBoxStyle.Information)
|
||||
End If
|
||||
|
||||
If bDoBackup Then
|
||||
If bPrompt Then
|
||||
If mgrCommon.ShowMessage(sMsg, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
TriggerBackup = True
|
||||
Me.Close()
|
||||
End If
|
||||
Else
|
||||
TriggerBackup = True
|
||||
Me.Close()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub TriggerSelectedRestore()
|
||||
Private Sub TriggerSelectedRestore(Optional ByVal bPrompt As Boolean = True)
|
||||
Dim oData As KeyValuePair(Of String, String)
|
||||
Dim sMsg As String = String.Empty
|
||||
Dim oGame As clsGame
|
||||
Dim oBackup As clsBackup
|
||||
Dim bDoRestore As Boolean = False
|
||||
|
||||
If lstGames.SelectedItems.Count > 0 Then
|
||||
RestoreList.Clear()
|
||||
|
||||
If lstGames.SelectedItems.Count = 1 Then
|
||||
RestoreList.Add(CurrentGame, CurrentBackupItem)
|
||||
Else
|
||||
For Each oData In lstGames.SelectedItems
|
||||
If oRemoteBackupData.Contains(oData.Value) Then
|
||||
oGame = DirectCast(AppData(oData.Key), clsGame)
|
||||
RestoreList.Add(oGame)
|
||||
oBackup = DirectCast(oRemoteBackupData(oData.Value), clsBackup)
|
||||
RestoreList.Add(oGame, oBackup)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
If RestoreList.Count = 1 Then
|
||||
bDoRestore = True
|
||||
If Not mgrRestore.CheckManifest(RestoreList(0).Name) Then
|
||||
sMsg = mgrCommon.FormatString(frmGameManager_ConfirmRestoreAnyway, RestoreList(0).Name)
|
||||
oGame = New clsGame
|
||||
For Each de As DictionaryEntry In RestoreList
|
||||
oGame = DirectCast(de.Key, clsGame)
|
||||
Next
|
||||
If Not mgrRestore.CheckManifest(oGame.Name) Then
|
||||
sMsg = mgrCommon.FormatString(frmGameManager_ConfirmRestoreAnyway, oGame.Name)
|
||||
Else
|
||||
sMsg = mgrCommon.FormatString(frmGameManager_ConfirmRestore, RestoreList(0).Name)
|
||||
sMsg = mgrCommon.FormatString(frmGameManager_ConfirmRestore, oGame.Name)
|
||||
End If
|
||||
ElseIf RestoreList.Count > 1 Then
|
||||
bDoRestore = True
|
||||
@@ -1234,12 +1329,16 @@ Public Class frmGameManager
|
||||
mgrCommon.ShowMessage(frmGameManager_ErrorNoBackupData, MsgBoxStyle.Information)
|
||||
End If
|
||||
|
||||
'We need this check in case a bunch of games with no backups are multi-selected
|
||||
If bDoRestore Then
|
||||
If bPrompt Then
|
||||
If mgrCommon.ShowMessage(sMsg, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
TriggerRestore = True
|
||||
Me.Close()
|
||||
End If
|
||||
Else
|
||||
TriggerRestore = True
|
||||
Me.Close()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
@@ -1269,14 +1368,16 @@ Public Class frmGameManager
|
||||
End Sub
|
||||
|
||||
Private Sub ImportOfficialGameList()
|
||||
Dim sImportURL As String
|
||||
|
||||
If mgrCommon.IsUnix Then
|
||||
If mgrCommon.ShowMessage(frmGameManager_ConfirmUnixImportWarning, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
Exit Sub
|
||||
End If
|
||||
sImportURL = App_URLImportLinux
|
||||
Else
|
||||
sImportURL = App_URLImport
|
||||
End If
|
||||
|
||||
If mgrCommon.ShowMessage(frmGameManager_ConfirmOfficialImport, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
If mgrMonitorList.DoImport(App_URLImport) Then
|
||||
If mgrMonitorList.DoImport(sImportURL) Then
|
||||
LoadData()
|
||||
End If
|
||||
End If
|
||||
@@ -1308,9 +1409,9 @@ Public Class frmGameManager
|
||||
btnOpenRestorePath.Text = frmGameManager_btnOpenRestorePath
|
||||
btnOpenBackupFile.Text = frmGameManager_btnOpenBackupFile
|
||||
btnDeleteBackup.Text = frmGameManager_btnDeleteBackup
|
||||
lblFileSize.Text = frmGameManager_lblFileSize
|
||||
lblCurrentBackup.Text = frmGameManager_lblCurrentBackup
|
||||
lblLastBackup.Text = frmGameManager_lblLastBackup
|
||||
lblBackupFile.Text = frmGameManager_lblBackupFile
|
||||
lblRemote.Text = frmGameManager_lblRemote
|
||||
lblLocalData.Text = frmGameManager_lblLocalData
|
||||
btnIconBrowse.Text = frmGameManager_btnIconBrowse
|
||||
lblVersion.Text = frmGameManager_lblVersion
|
||||
lblCompany.Text = frmGameManager_lblCompany
|
||||
@@ -1327,12 +1428,22 @@ Public Class frmGameManager
|
||||
lblName.Text = frmGameManager_lblName
|
||||
chkTimeStamp.Text = frmGameManager_chkTimeStamp
|
||||
chkFolderSave.Text = frmGameManager_chkFolderSave
|
||||
chkCleanFolder.Text = frmGameManager_chkCleanFolder
|
||||
btnBackup.Text = frmGameManager_btnBackup
|
||||
btnClose.Text = frmGameManager_btnClose
|
||||
btnDelete.Text = frmGameManager_btnDelete
|
||||
btnAdd.Text = frmGameManager_btnAdd
|
||||
cmsOfficial.Text = frmGameManager_cmsOfficial
|
||||
cmsFile.Text = frmGameManager_cmsFile
|
||||
lblQuickFilter.Text = frmGameManager_lblQuickFilter
|
||||
lblLimit.Text = frmGameManager_lblLimit
|
||||
cmsDeleteOne.Text = frmGameManager_cmsDeleteOne
|
||||
cmsDeleteAll.Text = frmGameManager_cmsDeleteAll
|
||||
|
||||
'Init Filter Timer
|
||||
tmFilterTimer = New Timer()
|
||||
tmFilterTimer.Interval = 1000
|
||||
tmFilterTimer.Enabled = False
|
||||
End Sub
|
||||
|
||||
Private Sub frmGameManager_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
@@ -1435,7 +1546,19 @@ Public Class frmGameManager
|
||||
End Sub
|
||||
|
||||
Private Sub btnDeleteBackup_Click(sender As Object, e As EventArgs) Handles btnDeleteBackup.Click
|
||||
If cboRemoteBackup.Items.Count > 1 Then
|
||||
cmsDeleteBackup.Show(btnDeleteBackup, New Drawing.Point(btnDeleteBackup.Size.Width - Math.Floor(btnDeleteBackup.Size.Width * 0.1), btnDeleteBackup.Size.Height - Math.Floor(btnDeleteBackup.Size.Height * 0.5)), ToolStripDropDownDirection.AboveRight)
|
||||
Else
|
||||
DeleteBackup()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub cmsDeleteOne_Click(sender As Object, e As EventArgs) Handles cmsDeleteOne.Click
|
||||
DeleteBackup()
|
||||
End Sub
|
||||
|
||||
Private Sub cmsDeleteAll_Click(sender As Object, e As EventArgs) Handles cmsDeleteAll.Click
|
||||
DeleteAllBackups()
|
||||
End Sub
|
||||
|
||||
Private Sub btnMarkAsRestored_Click(sender As Object, e As EventArgs) Handles btnMarkAsRestored.Click
|
||||
@@ -1469,12 +1592,18 @@ Public Class frmGameManager
|
||||
FolderSaveModeChange()
|
||||
End Sub
|
||||
|
||||
Private Sub chkMonitorOnly_CheckedChanged(sender As Object, e As EventArgs) Handles chkMonitorOnly.CheckedChanged
|
||||
MonitorOnlyModeChange()
|
||||
Private Sub chkTimeStamp_CheckedChanged(sender As Object, e As EventArgs) Handles chkTimeStamp.CheckedChanged
|
||||
TimeStampModeChange()
|
||||
End Sub
|
||||
|
||||
Private Sub cboRemoteBackup_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboRemoteBackup.SelectedIndexChanged
|
||||
If Not bIsLoading Then
|
||||
UpdateBackupInfo(DirectCast(cboRemoteBackup.SelectedItem, KeyValuePair(Of String, String)).Key)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub btnImport_Click(sender As Object, e As EventArgs) Handles btnImport.Click
|
||||
cmsImport.Show(btnImport, New Drawing.Point(70, 11), ToolStripDropDownDirection.AboveRight)
|
||||
cmsImport.Show(btnImport, New Drawing.Point(btnImport.Size.Width - Math.Floor(btnImport.Size.Width * 0.1), btnImport.Size.Height - Math.Floor(btnImport.Size.Height * 0.5)), ToolStripDropDownDirection.AboveRight)
|
||||
End Sub
|
||||
|
||||
Private Sub cmsOfficial_Click(sender As Object, e As EventArgs) Handles cmsOfficial.Click
|
||||
@@ -1489,4 +1618,25 @@ Public Class frmGameManager
|
||||
ExportGameList()
|
||||
End Sub
|
||||
|
||||
Private Sub txtQuickFilter_TextChanged(sender As Object, e As EventArgs) Handles txtQuickFilter.TextChanged
|
||||
If Not tmFilterTimer.Enabled Then
|
||||
tmFilterTimer.Enabled = True
|
||||
tmFilterTimer.Start()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub txtSavePath_TextChanged(sender As Object, e As EventArgs) Handles txtSavePath.TextChanged
|
||||
VerifyCleanFolder()
|
||||
End Sub
|
||||
|
||||
Private Sub tmFilterTimer_Tick(sender As Object, ByVal e As EventArgs) Handles tmFilterTimer.Tick
|
||||
lstGames.DataSource = Nothing
|
||||
FormatAndFillList()
|
||||
tmFilterTimer.Stop()
|
||||
tmFilterTimer.Enabled = False
|
||||
End Sub
|
||||
|
||||
Private Sub frmGameManager_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
|
||||
txtQuickFilter.Focus()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -226,6 +226,8 @@ Public Class frmIncludeExclude
|
||||
sNewString = InputBox(frmIncludeExclude_RawEditInfo, mgrCommon.FormatString(frmIncludeExclude_RawEditTitle, FormName), sCurrentString)
|
||||
If sNewString <> String.Empty Then
|
||||
ParseBuilderString(sNewString)
|
||||
Else
|
||||
lstBuilder.Clear()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Generated
+3
-3
@@ -224,12 +224,12 @@ Partial Class frmMain
|
||||
'
|
||||
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.MaxLength = 16777216
|
||||
Me.txtLog.MaxLength = 524288
|
||||
Me.txtLog.Multiline = True
|
||||
Me.txtLog.Name = "txtLog"
|
||||
Me.txtLog.ReadOnly = True
|
||||
Me.txtLog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
|
||||
Me.txtLog.Size = New System.Drawing.Size(500, 177)
|
||||
Me.txtLog.Size = New System.Drawing.Size(500, 186)
|
||||
Me.txtLog.TabIndex = 10
|
||||
Me.txtLog.TabStop = False
|
||||
'
|
||||
@@ -523,6 +523,7 @@ Partial Class frmMain
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.AutoSize = True
|
||||
Me.ClientSize = New System.Drawing.Size(524, 401)
|
||||
Me.Controls.Add(Me.pbTime)
|
||||
Me.Controls.Add(Me.lblStatus3)
|
||||
@@ -538,7 +539,6 @@ Partial Class frmMain
|
||||
Me.Controls.Add(Me.gMonStatusStrip)
|
||||
Me.Controls.Add(Me.gMonMainMenu)
|
||||
Me.Controls.Add(Me.txtLog)
|
||||
Me.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||
Me.KeyPreview = True
|
||||
|
||||
+275
-92
@@ -1,4 +1,5 @@
|
||||
Imports GBM.My.Resources
|
||||
Imports System.IO
|
||||
|
||||
'Name: frmMain
|
||||
'Description: Game Backup Monitor Main Screen
|
||||
@@ -24,6 +25,8 @@ Public Class frmMain
|
||||
Private bCancelledByUser As Boolean = False
|
||||
Private bShutdown As Boolean = False
|
||||
Private bInitFail As Boolean = False
|
||||
Private bPathDetectionFailure As Boolean = False
|
||||
Private sPathDetectionError As String = String.Empty
|
||||
Private bMenuEnabled As Boolean = True
|
||||
Private bLockdown As Boolean = True
|
||||
Private bFirstRun As Boolean = False
|
||||
@@ -36,12 +39,19 @@ Public Class frmMain
|
||||
Private sPriorPath As String
|
||||
Private sPriorCompany As String
|
||||
Private sPriorVersion As String
|
||||
Private iFormHeight As Integer
|
||||
Private iLogSpacer As Integer
|
||||
Private iRestoreTimeOut As Integer
|
||||
|
||||
'Developer Debug Flags
|
||||
Private bProcessDebugMode As Boolean = False
|
||||
|
||||
WithEvents oFileWatcher As New System.IO.FileSystemWatcher
|
||||
WithEvents oFileWatcher As New FileSystemWatcher
|
||||
|
||||
'Timers - There may only be one System.Windows.Forms.Timer and it must be tmScanTimer.
|
||||
WithEvents tmScanTimer As New Timer
|
||||
WithEvents tmRestoreCheck As New System.Timers.Timer
|
||||
WithEvents tmFileWatcherQueue As New System.Timers.Timer
|
||||
|
||||
Public WithEvents oProcess As New mgrProcesses
|
||||
Public WithEvents oBackup As New mgrBackup
|
||||
@@ -49,6 +59,7 @@ Public Class frmMain
|
||||
Public hshScanList As Hashtable
|
||||
Public oSettings As New mgrSettings
|
||||
|
||||
Delegate Sub UpdateNotifierCallBack(ByVal iCount As Integer)
|
||||
Delegate Sub UpdateLogCallBack(ByVal sLogUpdate As String, ByVal bTrayUpdate As Boolean, ByVal objIcon As System.Windows.Forms.ToolTipIcon, ByVal bTimeStamp As Boolean)
|
||||
Delegate Sub WorkingGameInfoCallBack(ByVal sTitle As String, ByVal sStatus1 As String, ByVal sStatus2 As String, ByVal sStatus3 As String)
|
||||
Delegate Sub UpdateStatusCallBack(ByVal sStatus As String)
|
||||
@@ -75,7 +86,7 @@ Public Class frmMain
|
||||
Dim sStatus3 As String
|
||||
|
||||
'Build Info
|
||||
sStatus1 = IO.Path.GetFileName(oRestoreInfo.FileName)
|
||||
sStatus1 = Path.GetFileName(oRestoreInfo.FileName)
|
||||
sStatus2 = mgrCommon.FormatString(frmMain_UpdatedBy, New String() {oRestoreInfo.UpdatedBy, oRestoreInfo.DateUpdated})
|
||||
If oRestoreInfo.AbsolutePath Then
|
||||
sStatus3 = oRestoreInfo.RestorePath
|
||||
@@ -97,7 +108,7 @@ Public Class frmMain
|
||||
If oGame.AbsolutePath Then
|
||||
sStatus2 = oGame.Path
|
||||
Else
|
||||
sStatus2 = oGame.ProcessPath & System.IO.Path.DirectorySeparatorChar & oGame.Path
|
||||
sStatus2 = oGame.ProcessPath & Path.DirectorySeparatorChar & oGame.Path
|
||||
End If
|
||||
sStatus3 = String.Empty
|
||||
|
||||
@@ -155,8 +166,7 @@ Public Class frmMain
|
||||
OperationEnded()
|
||||
End Sub
|
||||
|
||||
Private Sub RunRestore(ByVal oRestoreList As List(Of clsGame))
|
||||
Dim oBackupData As SortedList = mgrManifest.ReadManifest(mgrSQLite.Database.Remote)
|
||||
Private Sub RunRestore(ByVal oRestoreList As Hashtable)
|
||||
Dim oGame As clsGame
|
||||
Dim oReadyList As New List(Of clsBackup)
|
||||
Dim oRestoreInfo As clsBackup
|
||||
@@ -166,9 +176,10 @@ Public Class frmMain
|
||||
OperationStarted()
|
||||
|
||||
'Build Restore List
|
||||
For Each oGame In oRestoreList
|
||||
For Each de As DictionaryEntry In oRestoreList
|
||||
bPathVerified = False
|
||||
oRestoreInfo = oBackupData(oGame.Name)
|
||||
oGame = DirectCast(de.Key, clsGame)
|
||||
oRestoreInfo = DirectCast(de.Value, clsBackup)
|
||||
|
||||
If mgrRestore.CheckPath(oRestoreInfo, oGame, bTriggerReload) Then
|
||||
bPathVerified = True
|
||||
@@ -177,7 +188,7 @@ Public Class frmMain
|
||||
End If
|
||||
|
||||
If bPathVerified Then
|
||||
If oRestore.CheckRestorePrereq(oRestoreInfo) Then
|
||||
If oRestore.CheckRestorePrereq(oRestoreInfo, oGame.CleanFolder) Then
|
||||
oReadyList.Add(oRestoreInfo)
|
||||
End If
|
||||
End If
|
||||
@@ -324,15 +335,17 @@ Public Class frmMain
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CheckRestore()
|
||||
Dim slRestoreData As SortedList = mgrRestore.CompareManifests()
|
||||
Dim sNotification As String
|
||||
|
||||
If slRestoreData.Count > 0 Then
|
||||
If slRestoreData.Count > 1 Then
|
||||
sNotification = mgrCommon.FormatString(frmMain_NewSaveNotificationMulti, slRestoreData.Count)
|
||||
Private Sub UpdateNotifier(ByVal iCount As Integer)
|
||||
'Thread Safe
|
||||
If Me.InvokeRequired = True Then
|
||||
Dim d As New UpdateNotifierCallBack(AddressOf UpdateNotifier)
|
||||
Me.Invoke(d, New Object() {iCount})
|
||||
Else
|
||||
sNotification = mgrCommon.FormatString(frmMain_NewSaveNotificationSingle, slRestoreData.Count)
|
||||
Dim sNotification As String
|
||||
If iCount > 1 Then
|
||||
sNotification = mgrCommon.FormatString(frmMain_NewSaveNotificationMulti, iCount)
|
||||
Else
|
||||
sNotification = mgrCommon.FormatString(frmMain_NewSaveNotificationSingle, iCount)
|
||||
End If
|
||||
gMonNotification.Image = Icon_Inbox
|
||||
gMonTrayNotification.Image = Icon_Inbox
|
||||
@@ -343,6 +356,149 @@ Public Class frmMain
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub StartRestoreCheck()
|
||||
iRestoreTimeOut = -1
|
||||
tmRestoreCheck.Interval = 60000
|
||||
tmRestoreCheck.AutoReset = True
|
||||
tmRestoreCheck.Start()
|
||||
AutoRestoreCheck()
|
||||
End Sub
|
||||
|
||||
Private Sub AutoRestoreCheck()
|
||||
Dim slRestoreData As SortedList = mgrRestore.CompareManifests()
|
||||
Dim sNotReady As New List(Of String)
|
||||
Dim sNotInstalled As New List(Of String)
|
||||
Dim sNoCheckSum As New List(Of String)
|
||||
Dim oBackup As clsBackup
|
||||
Dim sFileName As String
|
||||
Dim sExtractPath As String
|
||||
Dim bFinished As Boolean = True
|
||||
Dim hshRestore As Hashtable
|
||||
Dim hshGames As Hashtable
|
||||
Dim oGame As clsGame
|
||||
Dim sGame As String
|
||||
|
||||
'Shut down the timer and bail out if there's nothing to do
|
||||
If slRestoreData.Count = 0 Then
|
||||
tmRestoreCheck.Stop()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If oSettings.AutoMark Or oSettings.AutoRestore Then
|
||||
'Increment Timer
|
||||
iRestoreTimeOut += 1
|
||||
|
||||
'Check backup files
|
||||
For Each de As DictionaryEntry In slRestoreData
|
||||
oBackup = DirectCast(de.Value, clsBackup)
|
||||
|
||||
'Check if backup file is ready to restore
|
||||
If oBackup.CheckSum <> String.Empty Then
|
||||
sFileName = oSettings.BackupFolder & Path.DirectorySeparatorChar & oBackup.FileName
|
||||
If mgrHash.Generate_SHA256_Hash(sFileName) <> oBackup.CheckSum Then
|
||||
sNotReady.Add(de.Key)
|
||||
bFinished = False
|
||||
End If
|
||||
Else
|
||||
sNoCheckSum.Add(de.Key)
|
||||
End If
|
||||
|
||||
'Check if the restore location exists, if not we assume the game is not installed and should be auto-marked.
|
||||
hshGames = mgrMonitorList.DoListGetbyName(de.Key)
|
||||
If hshGames.Count = 1 Then
|
||||
oGame = DirectCast(hshGames(0), clsGame)
|
||||
mgrRestore.DoPathOverride(oBackup, oGame)
|
||||
If oGame.ProcessPath <> String.Empty Then
|
||||
oBackup.RelativeRestorePath = oGame.ProcessPath & Path.DirectorySeparatorChar & oBackup.RestorePath
|
||||
End If
|
||||
End If
|
||||
|
||||
If oBackup.AbsolutePath Then
|
||||
sExtractPath = oBackup.RestorePath
|
||||
Else
|
||||
sExtractPath = oBackup.RelativeRestorePath
|
||||
End If
|
||||
|
||||
If Not Directory.Exists(sExtractPath) Then
|
||||
If oSettings.AutoMark Then
|
||||
If mgrManifest.DoGlobalManifestCheck(de.Key, mgrSQLite.Database.Local) Then
|
||||
mgrManifest.DoManifestUpdateByName(de.Value, mgrSQLite.Database.Local)
|
||||
Else
|
||||
mgrManifest.DoManifestAdd(de.Value, mgrSQLite.Database.Local)
|
||||
End If
|
||||
End If
|
||||
sNotInstalled.Add(de.Key)
|
||||
End If
|
||||
Next
|
||||
|
||||
'Remove any backup files that are not ready
|
||||
For Each s As String In sNotReady
|
||||
slRestoreData.Remove(s)
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_RestoreNotReady, s), False, ToolTipIcon.Info, True)
|
||||
Next
|
||||
|
||||
'Remove any backup files that should not be automatically restored
|
||||
For Each s As String In sNotInstalled
|
||||
slRestoreData.Remove(s)
|
||||
If oSettings.AutoMark Then
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_AutoMark, s), False, ToolTipIcon.Info, True)
|
||||
Else
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_NoAutoMark, s), False, ToolTipIcon.Info, True)
|
||||
End If
|
||||
Next
|
||||
For Each s As String In sNoCheckSum
|
||||
slRestoreData.Remove(s)
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_NoCheckSum, s), False, ToolTipIcon.Info, True)
|
||||
Next
|
||||
|
||||
'Automatically restore backup files
|
||||
If oSettings.AutoRestore Then
|
||||
If slRestoreData.Count > 0 Then
|
||||
hshRestore = New Hashtable
|
||||
sGame = String.Empty
|
||||
For Each de As DictionaryEntry In slRestoreData
|
||||
hshGames = mgrMonitorList.DoListGetbyName(de.Key)
|
||||
If hshGames.Count = 1 Then
|
||||
oGame = DirectCast(hshGames(0), clsGame)
|
||||
sGame = oGame.CroppedName
|
||||
hshRestore.Add(oGame, de.Value)
|
||||
Else
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_AutoRestoreFailure, de.Key), False, ToolTipIcon.Info, True)
|
||||
End If
|
||||
Next
|
||||
|
||||
'Handle notifications
|
||||
If oSettings.RestoreOnLaunch Then
|
||||
If slRestoreData.Count > 1 Then
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_RestoreNotificationMulti, slRestoreData.Count), True, ToolTipIcon.Info, True)
|
||||
Else
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_RestoreNotificationSingle, sGame), True, ToolTipIcon.Info, True)
|
||||
End If
|
||||
End If
|
||||
|
||||
RunRestore(hshRestore)
|
||||
End If
|
||||
End If
|
||||
|
||||
'Shutdown if we are finished
|
||||
If bFinished Then
|
||||
tmRestoreCheck.Stop()
|
||||
End If
|
||||
|
||||
'Time out after 15 minutes
|
||||
If iRestoreTimeOut = 15 Then
|
||||
tmRestoreCheck.Stop()
|
||||
End If
|
||||
End If
|
||||
|
||||
'Update the menu notifier if we aren't using auto restore
|
||||
If oSettings.RestoreOnLaunch And Not oSettings.AutoRestore Then
|
||||
If slRestoreData.Count > 0 Then
|
||||
UpdateNotifier(slRestoreData.Count)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Functions handling the display of game information
|
||||
Private Sub SetIcon()
|
||||
Dim sIcon As String
|
||||
@@ -360,7 +516,7 @@ Public Class frmMain
|
||||
End If
|
||||
|
||||
Try
|
||||
fbBrowser.InitialDirectory = IO.Path.GetDirectoryName(oProcess.FoundProcess.MainModule.FileName)
|
||||
fbBrowser.InitialDirectory = Path.GetDirectoryName(oProcess.FoundProcess.MainModule.FileName)
|
||||
Catch ex As Exception
|
||||
fbBrowser.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
|
||||
End Try
|
||||
@@ -368,7 +524,7 @@ Public Class frmMain
|
||||
|
||||
If fbBrowser.ShowDialog() = Windows.Forms.DialogResult.OK Then
|
||||
sIcon = fbBrowser.FileName
|
||||
If IO.File.Exists(sIcon) Then
|
||||
If File.Exists(sIcon) Then
|
||||
oProcess.GameInfo.Icon = sIcon
|
||||
pbIcon.Image = Image.FromFile(sIcon)
|
||||
mgrMonitorList.DoListUpdate(oProcess.GameInfo)
|
||||
@@ -459,7 +615,7 @@ Public Class frmMain
|
||||
End Try
|
||||
|
||||
'Check for a custom icon & details
|
||||
If IO.File.Exists(oProcess.GameInfo.Icon) Then
|
||||
If File.Exists(oProcess.GameInfo.Icon) Then
|
||||
pbIcon.Image = Image.FromFile(oProcess.GameInfo.Icon)
|
||||
End If
|
||||
If sFileName = String.Empty Then
|
||||
@@ -554,7 +710,7 @@ Public Class frmMain
|
||||
End If
|
||||
|
||||
mgrMonitorList.DoListUpdate(oProcess.GameInfo)
|
||||
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists()
|
||||
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
|
||||
|
||||
UpdateTimeSpent(dCurrentHours, oProcess.TimeSpent.TotalHours)
|
||||
End Sub
|
||||
@@ -648,6 +804,7 @@ Public Class frmMain
|
||||
bProcessDebugMode = bDebugEnable
|
||||
mgrCommon.ShowMessage(frmMain_CommandSucess, MsgBoxStyle.Exclamation)
|
||||
End Select
|
||||
|
||||
Case Else
|
||||
mgrCommon.ShowMessage(frmMain_ErrorCommandInvalid, sMainCommand, MsgBoxStyle.Exclamation)
|
||||
End Select
|
||||
@@ -657,9 +814,9 @@ Public Class frmMain
|
||||
|
||||
Private Sub OpenAbout()
|
||||
Dim iProcessType As System.Reflection.ProcessorArchitecture = System.Reflection.AssemblyName.GetAssemblyName(Application.ExecutablePath()).ProcessorArchitecture
|
||||
Dim sVersion As String = My.Application.Info.Version.Major & "." & My.Application.Info.Version.Minor
|
||||
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 sRevision As String = My.Application.Info.Version.Build & "." & My.Application.Info.Version.Revision
|
||||
Dim sRevision As String = My.Application.Info.Version.Revision
|
||||
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)
|
||||
@@ -669,7 +826,7 @@ Public Class frmMain
|
||||
Dim frm As New frmTags
|
||||
PauseScan()
|
||||
frm.ShowDialog()
|
||||
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists()
|
||||
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
|
||||
ResumeScan()
|
||||
End Sub
|
||||
|
||||
@@ -680,7 +837,7 @@ Public Class frmMain
|
||||
frm.PendingRestores = bPendingRestores
|
||||
frm.ShowDialog()
|
||||
LoadGameSettings()
|
||||
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists()
|
||||
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
|
||||
ResumeScan()
|
||||
|
||||
'Handle backup trigger
|
||||
@@ -716,7 +873,7 @@ Public Class frmMain
|
||||
frm.GameData = mgrMonitorList.ReadList(mgrMonitorList.eListTypes.FullList)
|
||||
frm.ShowDialog()
|
||||
LoadGameSettings()
|
||||
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists()
|
||||
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
|
||||
ResumeScan()
|
||||
End Sub
|
||||
|
||||
@@ -725,7 +882,7 @@ Public Class frmMain
|
||||
PauseScan()
|
||||
frm.ShowDialog()
|
||||
mgrPath.CustomVariablesReload()
|
||||
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists()
|
||||
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
|
||||
ResumeScan()
|
||||
End Sub
|
||||
|
||||
@@ -752,8 +909,8 @@ Public Class frmMain
|
||||
End Sub
|
||||
|
||||
Private Sub CheckForNewBackups()
|
||||
If oSettings.RestoreOnLaunch Then
|
||||
CheckRestore()
|
||||
If oSettings.RestoreOnLaunch Or oSettings.AutoRestore Or oSettings.AutoMark Then
|
||||
StartRestoreCheck()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -766,37 +923,42 @@ Public Class frmMain
|
||||
End Sub
|
||||
|
||||
Private Sub StartSyncWatcher()
|
||||
If oSettings.Sync Then
|
||||
oFileWatcher.EnableRaisingEvents = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub StopSyncWatcher()
|
||||
If oSettings.Sync Then
|
||||
oFileWatcher.EnableRaisingEvents = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub SetupSyncWatcher()
|
||||
If oSettings.Sync Then
|
||||
oFileWatcher.Path = oSettings.BackupFolder
|
||||
oFileWatcher.Filter = "gbm.s3db"
|
||||
oFileWatcher.NotifyFilter = IO.NotifyFilters.LastWrite
|
||||
End If
|
||||
oFileWatcher.NotifyFilter = NotifyFilters.LastWrite
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub HandleSyncWatcher() Handles oFileWatcher.Changed
|
||||
Private Sub QueueSyncWatcher() Handles oFileWatcher.Changed
|
||||
tmFileWatcherQueue.Stop()
|
||||
tmFileWatcherQueue.AutoReset = False
|
||||
tmFileWatcherQueue.Interval = 30000
|
||||
tmFileWatcherQueue.Start()
|
||||
End Sub
|
||||
|
||||
Private Sub HandleSyncWatcher() Handles tmFileWatcherQueue.Elapsed
|
||||
tmFileWatcherQueue.Stop()
|
||||
StopSyncWatcher()
|
||||
If oSettings.Sync Then
|
||||
UpdateLog(frmMain_MasterListChanged, False, ToolTipIcon.Info, True)
|
||||
SyncGameSettings()
|
||||
LoadGameSettings()
|
||||
CheckForNewBackups()
|
||||
End If
|
||||
CheckForNewBackups()
|
||||
StartSyncWatcher()
|
||||
End Sub
|
||||
|
||||
Private Sub SyncGameSettings()
|
||||
'Sync Monitor List
|
||||
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists(False)
|
||||
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists(oSettings.SyncFields, False)
|
||||
End Sub
|
||||
|
||||
Private Sub LocalDatabaseCheck()
|
||||
@@ -811,11 +973,11 @@ Public Class frmMain
|
||||
|
||||
Private Sub LoadAndVerify()
|
||||
|
||||
'The application cannot continue if this fails
|
||||
If Not oBackup.CheckForUtilities(mgrPath.Utility7zLocation) Then
|
||||
'If the default utility is missing we cannot continue
|
||||
If Not oBackup.CheckForUtilities(mgrPath.Default7zLocation) Then
|
||||
mgrCommon.ShowMessage(frmMain_Error7zip, MsgBoxStyle.Critical)
|
||||
bShutdown = True
|
||||
Me.Close()
|
||||
bInitFail = True
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'Local Database Check
|
||||
@@ -830,8 +992,8 @@ Public Class frmMain
|
||||
If Not bFirstRun Then
|
||||
'The application cannot continue if this fails
|
||||
If Not VerifyBackupLocation() Then
|
||||
bShutdown = True
|
||||
Me.Close()
|
||||
bInitFail = True
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'Remote Database Check
|
||||
@@ -855,27 +1017,27 @@ Public Class frmMain
|
||||
End If
|
||||
End If
|
||||
|
||||
'Check for any custom 7z utility and display a warning if it's missing
|
||||
If oSettings.Custom7zLocation <> String.Empty Then
|
||||
If Not oBackup.CheckForUtilities(oSettings.Custom7zLocation) Then
|
||||
mgrCommon.ShowMessage(frmMain_Error7zCustom, oSettings.Custom7zLocation, MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
'Functions that handle buttons, menus and other GUI features on this form
|
||||
Private Sub ToggleLog()
|
||||
If bLogToggle = False Then
|
||||
txtLog.Visible = True
|
||||
|
||||
'Unix Handler
|
||||
If mgrCommon.IsUnix Then
|
||||
Me.Size = New System.Drawing.Size(Me.Size.Width, 440)
|
||||
Else
|
||||
Me.Size = New System.Drawing.Size(Me.Size.Width, 425)
|
||||
End If
|
||||
|
||||
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, 245)
|
||||
Me.Size = New System.Drawing.Size(Me.Size.Width, Me.Size.Height - (txtLog.Height + iLogSpacer))
|
||||
bLogToggle = False
|
||||
btnLogToggle.Text = frmMain_btnToggleLog_Show
|
||||
End If
|
||||
@@ -1041,12 +1203,17 @@ Public Class frmMain
|
||||
Dim d As New UpdateLogCallBack(AddressOf UpdateLog)
|
||||
Me.Invoke(d, New Object() {sLogUpdate, bTrayUpdate, objIcon, bTimeStamp})
|
||||
Else
|
||||
'Auto save and clear the log if we are approaching the limit
|
||||
If txtLog.TextLength > 16770000 Then
|
||||
'Auto save and/or clear the log if we are approaching the limit
|
||||
If txtLog.TextLength > 262144 Then
|
||||
If oSettings.AutoSaveLog Then
|
||||
Dim sLogFile As String = mgrPath.LogFileLocation
|
||||
mgrCommon.SaveText(txtLog.Text, sLogFile)
|
||||
txtLog.Clear()
|
||||
txtLog.AppendText("[" & Date.Now & "] " & mgrCommon.FormatString(frmMain_LogAutoSave, sLogFile))
|
||||
Else
|
||||
txtLog.Clear()
|
||||
txtLog.AppendText("[" & Date.Now & "] " & frmMain_LogAutoClear)
|
||||
End If
|
||||
End If
|
||||
|
||||
'We shouldn't allow any one message to be greater than 255 characters if that same message is pushed to the tray icon
|
||||
@@ -1068,7 +1235,7 @@ Public Class frmMain
|
||||
txtLog.ScrollToCaret()
|
||||
gMonTray.BalloonTipText = sLogUpdate
|
||||
gMonTray.BalloonTipIcon = objIcon
|
||||
If bTrayUpdate Then gMonTray.ShowBalloonTip(5000)
|
||||
If bTrayUpdate Then gMonTray.ShowBalloonTip(10000)
|
||||
End If
|
||||
Application.DoEvents()
|
||||
End Sub
|
||||
@@ -1090,6 +1257,9 @@ Public Class frmMain
|
||||
End Sub
|
||||
|
||||
Private Sub SetForm()
|
||||
'Disable Autosize in Linux (Mono prevents manual resizing when this is enabled)
|
||||
If mgrCommon.IsUnix Then Me.AutoSize = False
|
||||
|
||||
'Set Form Name
|
||||
Me.Name = App_NameLong
|
||||
|
||||
@@ -1152,7 +1322,9 @@ Public Class frmMain
|
||||
lblLastAction.Text = String.Empty
|
||||
pbTime.SizeMode = PictureBoxSizeMode.AutoSize
|
||||
pbTime.Image = Icon_Clock
|
||||
Me.Size = New System.Drawing.Size(Me.Size.Width, 245)
|
||||
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
|
||||
ResetGameInfo()
|
||||
End Sub
|
||||
@@ -1234,7 +1406,7 @@ Public Class frmMain
|
||||
oSettings.BackupFolder = sBackupPath
|
||||
oSettings.SaveSettings()
|
||||
oSettings.LoadSettings()
|
||||
If oSettings.Sync Then mgrMonitorList.HandleBackupLocationChange()
|
||||
If oSettings.Sync Then mgrMonitorList.HandleBackupLocationChange(oSettings)
|
||||
End If
|
||||
Return True
|
||||
Else
|
||||
@@ -1247,9 +1419,9 @@ Public Class frmMain
|
||||
Dim sSettingsRoot As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "/gbm"
|
||||
Dim sDBLocation As String = sSettingsRoot & "/gbm.s3db"
|
||||
|
||||
If Not IO.Directory.Exists(sSettingsRoot) Then
|
||||
If Not Directory.Exists(sSettingsRoot) Then
|
||||
Try
|
||||
IO.Directory.CreateDirectory(sSettingsRoot)
|
||||
Directory.CreateDirectory(sSettingsRoot)
|
||||
Catch ex As Exception
|
||||
mgrCommon.ShowMessage(frmMain_ErrorSettingsFolder, ex.Message, MsgBoxStyle.Critical)
|
||||
bShutdown = True
|
||||
@@ -1257,7 +1429,7 @@ Public Class frmMain
|
||||
End Try
|
||||
End If
|
||||
|
||||
If Not IO.File.Exists(sDBLocation) Then bFirstRun = True
|
||||
If Not File.Exists(sDBLocation) Then bFirstRun = True
|
||||
End Sub
|
||||
|
||||
Private Sub VerifyDBVersion(ByVal iDB As mgrSQLite.Database)
|
||||
@@ -1510,10 +1682,15 @@ Public Class frmMain
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub AutoRestoreEventProcessor(myObject As Object, ByVal myEventArgs As EventArgs) Handles tmRestoreCheck.Elapsed
|
||||
If eCurrentStatus <> eStatus.Paused Then
|
||||
AutoRestoreCheck()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ScanTimerEventProcessor(myObject As Object, ByVal myEventArgs As EventArgs) Handles tmScanTimer.Tick
|
||||
Dim bNeedsPath As Boolean = False
|
||||
Dim bContinue As Boolean = True
|
||||
Dim bAskForRestart As Boolean = False
|
||||
Dim iErrorCode As Integer = 0
|
||||
Dim sErrorMessage As String = String.Empty
|
||||
|
||||
@@ -1525,42 +1702,27 @@ Public Class frmMain
|
||||
If iErrorCode = 5 Then
|
||||
If oProcess.Duplicate Then
|
||||
sErrorMessage = mgrCommon.FormatString(frmMain_ErrorMultiAdmin)
|
||||
mgrCommon.ShowMessage(sErrorMessage, MsgBoxStyle.Exclamation)
|
||||
bAskForRestart = True
|
||||
UpdateLog(sErrorMessage, True, ToolTipIcon.Warning, True)
|
||||
Else
|
||||
If Not CheckForSavedPath() Then
|
||||
sErrorMessage = mgrCommon.FormatString(frmMain_ErrorAdminBackup, oProcess.GameInfo.Name)
|
||||
oProcess.GameInfo.ProcessPath = mgrPath.ProcessPathSearch(oProcess.GameInfo.Name, oProcess.GameInfo.ProcessName, sErrorMessage)
|
||||
If oProcess.GameInfo.ProcessPath <> String.Empty Then
|
||||
'Update and reload
|
||||
mgrMonitorList.DoListUpdate(oProcess.GameInfo)
|
||||
LoadGameSettings()
|
||||
bContinue = True
|
||||
bPathDetectionFailure = True
|
||||
sPathDetectionError = mgrCommon.FormatString(frmMain_ErrorAdminBackup, oProcess.GameInfo.Name)
|
||||
End If
|
||||
Else
|
||||
bContinue = True
|
||||
End If
|
||||
End If
|
||||
ElseIf iErrorCode = 299 Then
|
||||
If oProcess.Duplicate Then
|
||||
sErrorMessage = mgrCommon.FormatString(frmMain_ErrorMulti64)
|
||||
mgrCommon.ShowMessage(sErrorMessage, MsgBoxStyle.Exclamation)
|
||||
UpdateLog(sErrorMessage, True, ToolTipIcon.Warning, True)
|
||||
Else
|
||||
If Not CheckForSavedPath() Then
|
||||
sErrorMessage = mgrCommon.FormatString(frmMain_Error64Backup, oProcess.GameInfo.Name)
|
||||
oProcess.GameInfo.ProcessPath = mgrPath.ProcessPathSearch(oProcess.GameInfo.Name, oProcess.GameInfo.ProcessName, sErrorMessage)
|
||||
If oProcess.GameInfo.ProcessPath <> String.Empty Then
|
||||
'Update and reload
|
||||
mgrMonitorList.DoListUpdate(oProcess.GameInfo)
|
||||
LoadGameSettings()
|
||||
bContinue = True
|
||||
bPathDetectionFailure = True
|
||||
sPathDetectionError = mgrCommon.FormatString(frmMain_Error64Backup, oProcess.GameInfo.Name)
|
||||
End If
|
||||
Else
|
||||
bContinue = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If bContinue = True Then
|
||||
CheckForSavedDuplicate()
|
||||
@@ -1577,9 +1739,6 @@ Public Class frmMain
|
||||
bwMonitor.RunWorkerAsync()
|
||||
Else
|
||||
StopScan()
|
||||
If bAskForRestart Then
|
||||
RestartAsAdmin()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
@@ -1600,9 +1759,28 @@ Public Class frmMain
|
||||
End Sub
|
||||
|
||||
Private Sub bwMain_RunWorkerCompleted(sender As System.Object, e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles bwMonitor.RunWorkerCompleted
|
||||
Dim bContinue As Boolean = True
|
||||
oProcess.EndTime = Now
|
||||
|
||||
If Not bCancelledByUser Then
|
||||
'Check if we failed to detect the game path
|
||||
If bPathDetectionFailure Then
|
||||
oProcess.GameInfo.ProcessPath = mgrPath.ProcessPathSearch(oProcess.GameInfo.Name, oProcess.GameInfo.ProcessName, sPathDetectionError)
|
||||
If oProcess.GameInfo.ProcessPath <> String.Empty Then
|
||||
'Update and reload
|
||||
mgrMonitorList.DoListUpdate(oProcess.GameInfo)
|
||||
LoadGameSettings()
|
||||
Else
|
||||
bContinue = False
|
||||
If oSettings.TimeTracking Then HandleTimeSpent()
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_ErrorBackupUnknownPath, oProcess.GameInfo.Name), False)
|
||||
oProcess.GameInfo = Nothing
|
||||
ResetGameInfo()
|
||||
ResumeScan()
|
||||
End If
|
||||
End If
|
||||
|
||||
If bContinue Then
|
||||
If DoMultiGameCheck() Then
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_GameEnded, oProcess.GameInfo.Name), False)
|
||||
If oSettings.TimeTracking Then HandleTimeSpent()
|
||||
@@ -1614,7 +1792,11 @@ Public Class frmMain
|
||||
ResumeScan()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'Reset globals
|
||||
bPathDetectionFailure = False
|
||||
sPathDetectionError = String.Empty
|
||||
bCancelledByUser = False
|
||||
oProcess.StartTime = Now : oProcess.EndTime = Now
|
||||
End Sub
|
||||
@@ -1625,6 +1807,7 @@ Public Class frmMain
|
||||
SetForm()
|
||||
VerifyGameDataPath()
|
||||
LoadAndVerify()
|
||||
If Not bInitFail Then
|
||||
VerifyCustomPathVariables()
|
||||
|
||||
If oSettings.StartToTray And Not mgrCommon.IsUnix Then
|
||||
@@ -1641,11 +1824,6 @@ Public Class frmMain
|
||||
|
||||
HandleScan()
|
||||
CheckForNewBackups()
|
||||
Catch ex As Exception
|
||||
If mgrCommon.ShowMessage(frmMain_ErrorInitFailure, ex.Message, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
bInitFail = True
|
||||
End If
|
||||
End Try
|
||||
|
||||
'Unix Handler
|
||||
If mgrCommon.IsUnix Then
|
||||
@@ -1653,7 +1831,12 @@ Public Class frmMain
|
||||
Else
|
||||
Me.gMonTray.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
If mgrCommon.ShowMessage(frmMain_ErrorInitFailure, ex.Message, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
bInitFail = True
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub frmMain_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
|
||||
|
||||
Generated
-105
@@ -1,105 +0,0 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class frmManifestViewer
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Form overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Required by the Windows Form Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Windows Form Designer
|
||||
'It can be modified using the Windows Form Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.dgView = New System.Windows.Forms.DataGridView()
|
||||
Me.btnCancel = New System.Windows.Forms.Button()
|
||||
Me.lblError = New System.Windows.Forms.Label()
|
||||
Me.fbBrowser = New System.Windows.Forms.FolderBrowserDialog()
|
||||
Me.cboManifest = New System.Windows.Forms.ComboBox()
|
||||
CType(Me.dgView, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'dgView
|
||||
'
|
||||
Me.dgView.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.dgView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
|
||||
Me.dgView.BackgroundColor = System.Drawing.SystemColors.Window
|
||||
Me.dgView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||
Me.dgView.Location = New System.Drawing.Point(12, 12)
|
||||
Me.dgView.Name = "dgView"
|
||||
Me.dgView.RowHeadersVisible = False
|
||||
Me.dgView.Size = New System.Drawing.Size(960, 338)
|
||||
Me.dgView.TabIndex = 0
|
||||
'
|
||||
'btnCancel
|
||||
'
|
||||
Me.btnCancel.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnCancel.Location = New System.Drawing.Point(897, 356)
|
||||
Me.btnCancel.Name = "btnCancel"
|
||||
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnCancel.TabIndex = 2
|
||||
Me.btnCancel.Text = "C&lose"
|
||||
Me.btnCancel.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblError
|
||||
'
|
||||
Me.lblError.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.lblError.AutoSize = True
|
||||
Me.lblError.Location = New System.Drawing.Point(139, 362)
|
||||
Me.lblError.Name = "lblError"
|
||||
Me.lblError.Size = New System.Drawing.Size(54, 13)
|
||||
Me.lblError.TabIndex = 5
|
||||
Me.lblError.Text = "Info Label"
|
||||
'
|
||||
'fbBrowser
|
||||
'
|
||||
Me.fbBrowser.ShowNewFolderButton = False
|
||||
'
|
||||
'cboManifest
|
||||
'
|
||||
Me.cboManifest.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.cboManifest.FormattingEnabled = True
|
||||
Me.cboManifest.Location = New System.Drawing.Point(12, 359)
|
||||
Me.cboManifest.Name = "cboManifest"
|
||||
Me.cboManifest.Size = New System.Drawing.Size(121, 21)
|
||||
Me.cboManifest.TabIndex = 6
|
||||
'
|
||||
'frmManifestViewer
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(984, 392)
|
||||
Me.Controls.Add(Me.cboManifest)
|
||||
Me.Controls.Add(Me.lblError)
|
||||
Me.Controls.Add(Me.btnCancel)
|
||||
Me.Controls.Add(Me.dgView)
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmManifestViewer"
|
||||
Me.ShowIcon = False
|
||||
Me.ShowInTaskbar = False
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Manifest Viewer"
|
||||
CType(Me.dgView, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents dgView As System.Windows.Forms.DataGridView
|
||||
Friend WithEvents btnCancel As System.Windows.Forms.Button
|
||||
Friend WithEvents lblError As System.Windows.Forms.Label
|
||||
Friend WithEvents fbBrowser As System.Windows.Forms.FolderBrowserDialog
|
||||
Friend WithEvents cboManifest As System.Windows.Forms.ComboBox
|
||||
End Class
|
||||
@@ -1,149 +0,0 @@
|
||||
Public Class frmManifestViewer
|
||||
|
||||
Private bShutdown As Boolean = False
|
||||
Private oLocalManifest As SortedList
|
||||
Private oRemoteManfiest As SortedList
|
||||
Private oRestoreInfo As clsBackup
|
||||
Private oDataTable As DataTable
|
||||
|
||||
Property RestoreInfo As clsBackup
|
||||
Get
|
||||
Return oRestoreInfo
|
||||
End Get
|
||||
Set(value As clsBackup)
|
||||
oRestoreInfo = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property LocalManifestData As SortedList
|
||||
Get
|
||||
Return oLocalManifest
|
||||
End Get
|
||||
Set(value As SortedList)
|
||||
oLocalManifest = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property RemoteManifestData As SortedList
|
||||
Get
|
||||
Return oRemoteManfiest
|
||||
End Get
|
||||
Set(value As SortedList)
|
||||
oRemoteManfiest = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Sub FormatManifest(ByVal iManifest As Integer)
|
||||
Dim oRow As Object()
|
||||
Dim oLoadData As SortedList
|
||||
|
||||
If iManifest = 1 Then
|
||||
oLoadData = LocalManifestData
|
||||
Else
|
||||
oLoadData = RemoteManifestData
|
||||
End If
|
||||
|
||||
oDataTable = New DataTable
|
||||
|
||||
'Setup Columns
|
||||
oDataTable.Columns.Add("Name")
|
||||
oDataTable.Columns.Add("Backup Path")
|
||||
oDataTable.Columns.Add("Restore Path")
|
||||
oDataTable.Columns.Add("Absolute Path")
|
||||
oDataTable.Columns.Add("Date Updated")
|
||||
oDataTable.Columns.Add("Updated By")
|
||||
|
||||
|
||||
'Setup Data Types
|
||||
oDataTable.Columns(0).DataType = GetType(String)
|
||||
oDataTable.Columns(1).DataType = GetType(String)
|
||||
oDataTable.Columns(2).DataType = GetType(String)
|
||||
oDataTable.Columns(3).DataType = GetType(Boolean)
|
||||
oDataTable.Columns(4).DataType = GetType(DateTime)
|
||||
oDataTable.Columns(5).DataType = GetType(String)
|
||||
|
||||
|
||||
|
||||
For Each o As clsBackup In oLoadData.Values
|
||||
oRow = New Object() {o.Name, o.FileName, o.RestorePath, o.AbsolutePath, o.DateUpdated, o.UpdatedBy}
|
||||
oDataTable.Rows.Add(oRow)
|
||||
Next
|
||||
|
||||
'Sort
|
||||
oDataTable.DefaultView.Sort = "Name asc"
|
||||
dgView.DataSource = oDataTable
|
||||
|
||||
'Setup Column Widths
|
||||
dgView.Columns(0).MinimumWidth = 100
|
||||
dgView.Columns(1).MinimumWidth = 175
|
||||
dgView.Columns(2).MinimumWidth = 175
|
||||
dgView.Columns(3).MinimumWidth = 60
|
||||
dgView.Columns(4).MinimumWidth = 125
|
||||
dgView.Columns(5).MinimumWidth = 100
|
||||
|
||||
dgView.Columns(0).FillWeight = 100
|
||||
dgView.Columns(1).FillWeight = 100
|
||||
dgView.Columns(2).FillWeight = 100
|
||||
dgView.Columns(3).FillWeight = 25
|
||||
dgView.Columns(4).FillWeight = 50
|
||||
dgView.Columns(5).FillWeight = 50
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub LoadCombo()
|
||||
Dim oCombo As New List(Of KeyValuePair(Of Integer, String))
|
||||
oCombo.Add(New KeyValuePair(Of Integer, String)(1, "Local Manifest"))
|
||||
oCombo.Add(New KeyValuePair(Of Integer, String)(2, "Remote Manifest"))
|
||||
cboManifest.DataSource = oCombo
|
||||
cboManifest.ValueMember = "key"
|
||||
cboManifest.DisplayMember = "value"
|
||||
End Sub
|
||||
|
||||
Private Sub frmManifestInfo_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
||||
dgView.ReadOnly = True
|
||||
dgView.AllowUserToAddRows = False
|
||||
lblError.Text = String.Empty
|
||||
LoadCombo()
|
||||
FormatManifest(CInt(cboManifest.SelectedValue))
|
||||
End Sub
|
||||
|
||||
Private Sub dgView_CellStateChanged(sender As Object, e As DataGridViewCellStateChangedEventArgs) Handles dgView.CellStateChanged
|
||||
lblError.ForeColor = Color.Black
|
||||
|
||||
Select Case dgView.Columns(e.Cell.ColumnIndex).Index
|
||||
Case 0
|
||||
lblError.Text = "The name of the application."
|
||||
Case 1
|
||||
lblError.Text = "The location of the backup file to restore."
|
||||
Case 2
|
||||
lblError.Text = "When the backup file was updated from this computer."
|
||||
Case 3
|
||||
lblError.Text = "The name of this computer."
|
||||
Case 4
|
||||
lblError.Text = "When the local backup file was last updated."
|
||||
Case 5
|
||||
lblError.Text = "The name of the computer that performed the last backup."
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub frmGameInfo_FormClosing(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosing
|
||||
|
||||
If Not bShutdown Then
|
||||
If MsgBox("Are you sure you want to close?", MsgBoxStyle.YesNo, "ABM") = MsgBoxResult.Yes Then
|
||||
bShutdown = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not bShutdown Then
|
||||
e.Cancel = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub cboManifest_SelectionChangeCommitted(sender As Object, e As EventArgs) Handles cboManifest.SelectionChangeCommitted
|
||||
FormatManifest(CInt(cboManifest.SelectedValue))
|
||||
End Sub
|
||||
End Class
|
||||
Generated
+439
-212
@@ -23,35 +23,59 @@ Partial Class frmSettings
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.chkMonitorOnStartup = New System.Windows.Forms.CheckBox()
|
||||
Me.chkBackupConfirm = New System.Windows.Forms.CheckBox()
|
||||
Me.grpGeneral = New System.Windows.Forms.GroupBox()
|
||||
Me.chkTimeTracking = New System.Windows.Forms.CheckBox()
|
||||
Me.grpStartup = New System.Windows.Forms.GroupBox()
|
||||
Me.chkStartWindows = New System.Windows.Forms.CheckBox()
|
||||
Me.chkStartToTray = New System.Windows.Forms.CheckBox()
|
||||
Me.chkAutoSaveLog = New System.Windows.Forms.CheckBox()
|
||||
Me.btnOptionalFields = New System.Windows.Forms.Button()
|
||||
Me.chkTimeTracking = New System.Windows.Forms.CheckBox()
|
||||
Me.chkSync = New System.Windows.Forms.CheckBox()
|
||||
Me.chkShowDetectionTips = New System.Windows.Forms.CheckBox()
|
||||
Me.chkStartToTray = New System.Windows.Forms.CheckBox()
|
||||
Me.grpPaths = New System.Windows.Forms.GroupBox()
|
||||
Me.grpFolderOptions = New System.Windows.Forms.GroupBox()
|
||||
Me.btnBackupFolder = New System.Windows.Forms.Button()
|
||||
Me.lblBackupFolder = New System.Windows.Forms.Label()
|
||||
Me.txtBackupFolder = New System.Windows.Forms.TextBox()
|
||||
Me.chkCreateFolder = New System.Windows.Forms.CheckBox()
|
||||
Me.btnSave = New System.Windows.Forms.Button()
|
||||
Me.btnCancel = New System.Windows.Forms.Button()
|
||||
Me.grpBackup = New System.Windows.Forms.GroupBox()
|
||||
Me.grp7zGeneral = New System.Windows.Forms.GroupBox()
|
||||
Me.cboCompression = New System.Windows.Forms.ComboBox()
|
||||
Me.lblCompression = New System.Windows.Forms.Label()
|
||||
Me.btn7zLocation = New System.Windows.Forms.Button()
|
||||
Me.txt7zLocation = New System.Windows.Forms.TextBox()
|
||||
Me.lblLocation = New System.Windows.Forms.Label()
|
||||
Me.txt7zArguments = New System.Windows.Forms.TextBox()
|
||||
Me.lblArguments = New System.Windows.Forms.Label()
|
||||
Me.lbl7zCopyright = New System.Windows.Forms.Label()
|
||||
Me.lbl7zProduct = New System.Windows.Forms.Label()
|
||||
Me.btnDefaults = New System.Windows.Forms.Button()
|
||||
Me.pnlBackup = New System.Windows.Forms.Panel()
|
||||
Me.lblMinutes = New System.Windows.Forms.Label()
|
||||
Me.nudSupressBackupThreshold = New System.Windows.Forms.NumericUpDown()
|
||||
Me.chkSupressBackup = New System.Windows.Forms.CheckBox()
|
||||
Me.chkCheckSum = New System.Windows.Forms.CheckBox()
|
||||
Me.chkRestoreOnLaunch = New System.Windows.Forms.CheckBox()
|
||||
Me.chkBackupConfirm = New System.Windows.Forms.CheckBox()
|
||||
Me.chkOverwriteWarning = New System.Windows.Forms.CheckBox()
|
||||
Me.chkCreateFolder = New System.Windows.Forms.CheckBox()
|
||||
Me.grp7z = New System.Windows.Forms.GroupBox()
|
||||
Me.lblCompression = New System.Windows.Forms.Label()
|
||||
Me.cboCompression = New System.Windows.Forms.ComboBox()
|
||||
Me.grpGeneral.SuspendLayout()
|
||||
Me.grpPaths.SuspendLayout()
|
||||
Me.grpBackup.SuspendLayout()
|
||||
Me.grpBackupHandling = New System.Windows.Forms.GroupBox()
|
||||
Me.chkAutoRestore = New System.Windows.Forms.CheckBox()
|
||||
Me.chkRestoreNotify = New System.Windows.Forms.CheckBox()
|
||||
Me.chkAutoMark = New System.Windows.Forms.CheckBox()
|
||||
Me.pnl7z = New System.Windows.Forms.Panel()
|
||||
Me.grp7zAdvanced = New System.Windows.Forms.GroupBox()
|
||||
Me.grp7zInformation = New System.Windows.Forms.GroupBox()
|
||||
Me.pnlGeneral = New System.Windows.Forms.Panel()
|
||||
Me.grpGameData = New System.Windows.Forms.GroupBox()
|
||||
Me.lstSettings = New System.Windows.Forms.ListBox()
|
||||
Me.grpStartup.SuspendLayout()
|
||||
Me.grpFolderOptions.SuspendLayout()
|
||||
Me.grp7zGeneral.SuspendLayout()
|
||||
Me.pnlBackup.SuspendLayout()
|
||||
CType(Me.nudSupressBackupThreshold, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.grp7z.SuspendLayout()
|
||||
Me.grpBackupHandling.SuspendLayout()
|
||||
Me.pnl7z.SuspendLayout()
|
||||
Me.grp7zAdvanced.SuspendLayout()
|
||||
Me.grp7zInformation.SuspendLayout()
|
||||
Me.pnlGeneral.SuspendLayout()
|
||||
Me.grpGameData.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'chkMonitorOnStartup
|
||||
@@ -64,40 +88,17 @@ Partial Class frmSettings
|
||||
Me.chkMonitorOnStartup.Text = "Start monitoring at launch"
|
||||
Me.chkMonitorOnStartup.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkBackupConfirm
|
||||
'grpStartup
|
||||
'
|
||||
Me.chkBackupConfirm.AutoSize = True
|
||||
Me.chkBackupConfirm.Location = New System.Drawing.Point(6, 42)
|
||||
Me.chkBackupConfirm.Name = "chkBackupConfirm"
|
||||
Me.chkBackupConfirm.Size = New System.Drawing.Size(160, 17)
|
||||
Me.chkBackupConfirm.TabIndex = 1
|
||||
Me.chkBackupConfirm.Text = "Disable backup confirmation"
|
||||
Me.chkBackupConfirm.UseVisualStyleBackColor = True
|
||||
'
|
||||
'grpGeneral
|
||||
'
|
||||
Me.grpGeneral.Controls.Add(Me.chkTimeTracking)
|
||||
Me.grpGeneral.Controls.Add(Me.chkStartWindows)
|
||||
Me.grpGeneral.Controls.Add(Me.chkSync)
|
||||
Me.grpGeneral.Controls.Add(Me.chkShowDetectionTips)
|
||||
Me.grpGeneral.Controls.Add(Me.chkStartToTray)
|
||||
Me.grpGeneral.Controls.Add(Me.chkMonitorOnStartup)
|
||||
Me.grpGeneral.Location = New System.Drawing.Point(12, 12)
|
||||
Me.grpGeneral.Name = "grpGeneral"
|
||||
Me.grpGeneral.Size = New System.Drawing.Size(360, 165)
|
||||
Me.grpGeneral.TabIndex = 0
|
||||
Me.grpGeneral.TabStop = False
|
||||
Me.grpGeneral.Text = "General"
|
||||
'
|
||||
'chkTimeTracking
|
||||
'
|
||||
Me.chkTimeTracking.AutoSize = True
|
||||
Me.chkTimeTracking.Location = New System.Drawing.Point(6, 111)
|
||||
Me.chkTimeTracking.Name = "chkTimeTracking"
|
||||
Me.chkTimeTracking.Size = New System.Drawing.Size(122, 17)
|
||||
Me.chkTimeTracking.TabIndex = 4
|
||||
Me.chkTimeTracking.Text = "Enable time tracking"
|
||||
Me.chkTimeTracking.UseVisualStyleBackColor = True
|
||||
Me.grpStartup.Controls.Add(Me.chkStartWindows)
|
||||
Me.grpStartup.Controls.Add(Me.chkStartToTray)
|
||||
Me.grpStartup.Controls.Add(Me.chkMonitorOnStartup)
|
||||
Me.grpStartup.Location = New System.Drawing.Point(6, 12)
|
||||
Me.grpStartup.Name = "grpStartup"
|
||||
Me.grpStartup.Size = New System.Drawing.Size(354, 90)
|
||||
Me.grpStartup.TabIndex = 0
|
||||
Me.grpStartup.TabStop = False
|
||||
Me.grpStartup.Text = "Startup"
|
||||
'
|
||||
'chkStartWindows
|
||||
'
|
||||
@@ -109,26 +110,6 @@ Partial Class frmSettings
|
||||
Me.chkStartWindows.Text = "Start with Windows"
|
||||
Me.chkStartWindows.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkSync
|
||||
'
|
||||
Me.chkSync.AutoSize = True
|
||||
Me.chkSync.Location = New System.Drawing.Point(6, 134)
|
||||
Me.chkSync.Name = "chkSync"
|
||||
Me.chkSync.Size = New System.Drawing.Size(208, 17)
|
||||
Me.chkSync.TabIndex = 5
|
||||
Me.chkSync.Text = "Sync game list data with backup folder"
|
||||
Me.chkSync.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkShowDetectionTips
|
||||
'
|
||||
Me.chkShowDetectionTips.AutoSize = True
|
||||
Me.chkShowDetectionTips.Location = New System.Drawing.Point(6, 88)
|
||||
Me.chkShowDetectionTips.Name = "chkShowDetectionTips"
|
||||
Me.chkShowDetectionTips.Size = New System.Drawing.Size(159, 17)
|
||||
Me.chkShowDetectionTips.TabIndex = 3
|
||||
Me.chkShowDetectionTips.Text = "Show detection notifications"
|
||||
Me.chkShowDetectionTips.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkStartToTray
|
||||
'
|
||||
Me.chkStartToTray.AutoSize = True
|
||||
@@ -139,157 +120,142 @@ Partial Class frmSettings
|
||||
Me.chkStartToTray.Text = "Start to system tray"
|
||||
Me.chkStartToTray.UseVisualStyleBackColor = True
|
||||
'
|
||||
'grpPaths
|
||||
'chkAutoSaveLog
|
||||
'
|
||||
Me.grpPaths.Controls.Add(Me.btnBackupFolder)
|
||||
Me.grpPaths.Controls.Add(Me.lblBackupFolder)
|
||||
Me.grpPaths.Controls.Add(Me.txtBackupFolder)
|
||||
Me.grpPaths.Location = New System.Drawing.Point(12, 410)
|
||||
Me.grpPaths.Name = "grpPaths"
|
||||
Me.grpPaths.Size = New System.Drawing.Size(360, 60)
|
||||
Me.grpPaths.TabIndex = 3
|
||||
Me.grpPaths.TabStop = False
|
||||
Me.grpPaths.Text = "Paths"
|
||||
Me.chkAutoSaveLog.AutoSize = True
|
||||
Me.chkAutoSaveLog.Location = New System.Drawing.Point(6, 204)
|
||||
Me.chkAutoSaveLog.Name = "chkAutoSaveLog"
|
||||
Me.chkAutoSaveLog.Size = New System.Drawing.Size(231, 17)
|
||||
Me.chkAutoSaveLog.TabIndex = 3
|
||||
Me.chkAutoSaveLog.Text = "Autosave log when max length is exceeded"
|
||||
Me.chkAutoSaveLog.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnOptionalFields
|
||||
'
|
||||
Me.btnOptionalFields.Location = New System.Drawing.Point(110, 38)
|
||||
Me.btnOptionalFields.Name = "btnOptionalFields"
|
||||
Me.btnOptionalFields.Size = New System.Drawing.Size(134, 23)
|
||||
Me.btnOptionalFields.TabIndex = 2
|
||||
Me.btnOptionalFields.Text = "Choose &Optional Fields..."
|
||||
Me.btnOptionalFields.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkTimeTracking
|
||||
'
|
||||
Me.chkTimeTracking.AutoSize = True
|
||||
Me.chkTimeTracking.Location = New System.Drawing.Point(6, 19)
|
||||
Me.chkTimeTracking.Name = "chkTimeTracking"
|
||||
Me.chkTimeTracking.Size = New System.Drawing.Size(122, 17)
|
||||
Me.chkTimeTracking.TabIndex = 0
|
||||
Me.chkTimeTracking.Text = "Enable time tracking"
|
||||
Me.chkTimeTracking.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkSync
|
||||
'
|
||||
Me.chkSync.AutoSize = True
|
||||
Me.chkSync.Location = New System.Drawing.Point(6, 42)
|
||||
Me.chkSync.Name = "chkSync"
|
||||
Me.chkSync.Size = New System.Drawing.Size(98, 17)
|
||||
Me.chkSync.TabIndex = 1
|
||||
Me.chkSync.Text = "Enable syncing"
|
||||
Me.chkSync.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkShowDetectionTips
|
||||
'
|
||||
Me.chkShowDetectionTips.AutoSize = True
|
||||
Me.chkShowDetectionTips.Location = New System.Drawing.Point(6, 181)
|
||||
Me.chkShowDetectionTips.Name = "chkShowDetectionTips"
|
||||
Me.chkShowDetectionTips.Size = New System.Drawing.Size(159, 17)
|
||||
Me.chkShowDetectionTips.TabIndex = 2
|
||||
Me.chkShowDetectionTips.Text = "Show detection notifications"
|
||||
Me.chkShowDetectionTips.UseVisualStyleBackColor = True
|
||||
'
|
||||
'grpFolderOptions
|
||||
'
|
||||
Me.grpFolderOptions.Controls.Add(Me.btnBackupFolder)
|
||||
Me.grpFolderOptions.Controls.Add(Me.lblBackupFolder)
|
||||
Me.grpFolderOptions.Controls.Add(Me.txtBackupFolder)
|
||||
Me.grpFolderOptions.Controls.Add(Me.chkCreateFolder)
|
||||
Me.grpFolderOptions.Location = New System.Drawing.Point(6, 12)
|
||||
Me.grpFolderOptions.Name = "grpFolderOptions"
|
||||
Me.grpFolderOptions.Size = New System.Drawing.Size(354, 70)
|
||||
Me.grpFolderOptions.TabIndex = 0
|
||||
Me.grpFolderOptions.TabStop = False
|
||||
Me.grpFolderOptions.Text = "Folders"
|
||||
'
|
||||
'btnBackupFolder
|
||||
'
|
||||
Me.btnBackupFolder.Location = New System.Drawing.Point(318, 23)
|
||||
Me.btnBackupFolder.Location = New System.Drawing.Point(313, 17)
|
||||
Me.btnBackupFolder.Name = "btnBackupFolder"
|
||||
Me.btnBackupFolder.Size = New System.Drawing.Size(27, 20)
|
||||
Me.btnBackupFolder.TabIndex = 2
|
||||
Me.btnBackupFolder.TabIndex = 1
|
||||
Me.btnBackupFolder.Text = "..."
|
||||
Me.btnBackupFolder.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblBackupFolder
|
||||
'
|
||||
Me.lblBackupFolder.AutoSize = True
|
||||
Me.lblBackupFolder.Location = New System.Drawing.Point(6, 27)
|
||||
Me.lblBackupFolder.Location = New System.Drawing.Point(6, 20)
|
||||
Me.lblBackupFolder.Name = "lblBackupFolder"
|
||||
Me.lblBackupFolder.Size = New System.Drawing.Size(76, 13)
|
||||
Me.lblBackupFolder.Size = New System.Drawing.Size(79, 13)
|
||||
Me.lblBackupFolder.TabIndex = 0
|
||||
Me.lblBackupFolder.Text = "Backup Folder"
|
||||
Me.lblBackupFolder.Text = "Backup Folder:"
|
||||
'
|
||||
'txtBackupFolder
|
||||
'
|
||||
Me.txtBackupFolder.Location = New System.Drawing.Point(88, 24)
|
||||
Me.txtBackupFolder.Location = New System.Drawing.Point(91, 17)
|
||||
Me.txtBackupFolder.Name = "txtBackupFolder"
|
||||
Me.txtBackupFolder.Size = New System.Drawing.Size(224, 20)
|
||||
Me.txtBackupFolder.TabIndex = 1
|
||||
Me.txtBackupFolder.Size = New System.Drawing.Size(216, 20)
|
||||
Me.txtBackupFolder.TabIndex = 0
|
||||
'
|
||||
'chkCreateFolder
|
||||
'
|
||||
Me.chkCreateFolder.AutoSize = True
|
||||
Me.chkCreateFolder.Location = New System.Drawing.Point(9, 43)
|
||||
Me.chkCreateFolder.Name = "chkCreateFolder"
|
||||
Me.chkCreateFolder.Size = New System.Drawing.Size(186, 17)
|
||||
Me.chkCreateFolder.TabIndex = 2
|
||||
Me.chkCreateFolder.Text = "Create a sub-folder for each game"
|
||||
Me.chkCreateFolder.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnSave
|
||||
'
|
||||
Me.btnSave.DialogResult = System.Windows.Forms.DialogResult.OK
|
||||
Me.btnSave.Location = New System.Drawing.Point(216, 476)
|
||||
Me.btnSave.Location = New System.Drawing.Point(384, 321)
|
||||
Me.btnSave.Name = "btnSave"
|
||||
Me.btnSave.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnSave.TabIndex = 3
|
||||
Me.btnSave.TabIndex = 5
|
||||
Me.btnSave.Text = "&Save"
|
||||
Me.btnSave.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnCancel
|
||||
'
|
||||
Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
|
||||
Me.btnCancel.Location = New System.Drawing.Point(297, 476)
|
||||
Me.btnCancel.Location = New System.Drawing.Point(465, 321)
|
||||
Me.btnCancel.Name = "btnCancel"
|
||||
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnCancel.TabIndex = 4
|
||||
Me.btnCancel.TabIndex = 6
|
||||
Me.btnCancel.Text = "&Cancel"
|
||||
Me.btnCancel.UseVisualStyleBackColor = True
|
||||
'
|
||||
'grpBackup
|
||||
'grp7zGeneral
|
||||
'
|
||||
Me.grpBackup.Controls.Add(Me.lblMinutes)
|
||||
Me.grpBackup.Controls.Add(Me.nudSupressBackupThreshold)
|
||||
Me.grpBackup.Controls.Add(Me.chkSupressBackup)
|
||||
Me.grpBackup.Controls.Add(Me.chkCheckSum)
|
||||
Me.grpBackup.Controls.Add(Me.chkRestoreOnLaunch)
|
||||
Me.grpBackup.Controls.Add(Me.chkOverwriteWarning)
|
||||
Me.grpBackup.Controls.Add(Me.chkCreateFolder)
|
||||
Me.grpBackup.Controls.Add(Me.chkBackupConfirm)
|
||||
Me.grpBackup.Location = New System.Drawing.Point(12, 183)
|
||||
Me.grpBackup.Name = "grpBackup"
|
||||
Me.grpBackup.Size = New System.Drawing.Size(360, 168)
|
||||
Me.grpBackup.TabIndex = 1
|
||||
Me.grpBackup.TabStop = False
|
||||
Me.grpBackup.Text = "Backup and Restore"
|
||||
Me.grp7zGeneral.Controls.Add(Me.cboCompression)
|
||||
Me.grp7zGeneral.Controls.Add(Me.lblCompression)
|
||||
Me.grp7zGeneral.Location = New System.Drawing.Point(6, 12)
|
||||
Me.grp7zGeneral.Name = "grp7zGeneral"
|
||||
Me.grp7zGeneral.Size = New System.Drawing.Size(354, 50)
|
||||
Me.grp7zGeneral.TabIndex = 0
|
||||
Me.grp7zGeneral.TabStop = False
|
||||
Me.grp7zGeneral.Text = "General"
|
||||
'
|
||||
'lblMinutes
|
||||
'cboCompression
|
||||
'
|
||||
Me.lblMinutes.AutoSize = True
|
||||
Me.lblMinutes.Location = New System.Drawing.Point(286, 135)
|
||||
Me.lblMinutes.Name = "lblMinutes"
|
||||
Me.lblMinutes.Size = New System.Drawing.Size(43, 13)
|
||||
Me.lblMinutes.TabIndex = 7
|
||||
Me.lblMinutes.Text = "minutes"
|
||||
'
|
||||
'nudSupressBackupThreshold
|
||||
'
|
||||
Me.nudSupressBackupThreshold.Location = New System.Drawing.Point(229, 133)
|
||||
Me.nudSupressBackupThreshold.Maximum = New Decimal(New Integer() {999, 0, 0, 0})
|
||||
Me.nudSupressBackupThreshold.Name = "nudSupressBackupThreshold"
|
||||
Me.nudSupressBackupThreshold.Size = New System.Drawing.Size(51, 20)
|
||||
Me.nudSupressBackupThreshold.TabIndex = 6
|
||||
'
|
||||
'chkSupressBackup
|
||||
'
|
||||
Me.chkSupressBackup.AutoSize = True
|
||||
Me.chkSupressBackup.Location = New System.Drawing.Point(6, 134)
|
||||
Me.chkSupressBackup.Name = "chkSupressBackup"
|
||||
Me.chkSupressBackup.Size = New System.Drawing.Size(217, 17)
|
||||
Me.chkSupressBackup.TabIndex = 5
|
||||
Me.chkSupressBackup.Text = "Backup only when session time exceeds"
|
||||
Me.chkSupressBackup.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkCheckSum
|
||||
'
|
||||
Me.chkCheckSum.AutoSize = True
|
||||
Me.chkCheckSum.Location = New System.Drawing.Point(6, 88)
|
||||
Me.chkCheckSum.Name = "chkCheckSum"
|
||||
Me.chkCheckSum.Size = New System.Drawing.Size(195, 17)
|
||||
Me.chkCheckSum.TabIndex = 3
|
||||
Me.chkCheckSum.Text = "Verify backup files with a checksum"
|
||||
Me.chkCheckSum.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkRestoreOnLaunch
|
||||
'
|
||||
Me.chkRestoreOnLaunch.AutoSize = True
|
||||
Me.chkRestoreOnLaunch.Location = New System.Drawing.Point(6, 111)
|
||||
Me.chkRestoreOnLaunch.Name = "chkRestoreOnLaunch"
|
||||
Me.chkRestoreOnLaunch.Size = New System.Drawing.Size(257, 17)
|
||||
Me.chkRestoreOnLaunch.TabIndex = 4
|
||||
Me.chkRestoreOnLaunch.Text = "Notify when there are new backup files to restore"
|
||||
Me.chkRestoreOnLaunch.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkOverwriteWarning
|
||||
'
|
||||
Me.chkOverwriteWarning.AutoSize = True
|
||||
Me.chkOverwriteWarning.Location = New System.Drawing.Point(6, 65)
|
||||
Me.chkOverwriteWarning.Name = "chkOverwriteWarning"
|
||||
Me.chkOverwriteWarning.Size = New System.Drawing.Size(139, 17)
|
||||
Me.chkOverwriteWarning.TabIndex = 2
|
||||
Me.chkOverwriteWarning.Text = "Show overwrite warning"
|
||||
Me.chkOverwriteWarning.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkCreateFolder
|
||||
'
|
||||
Me.chkCreateFolder.AutoSize = True
|
||||
Me.chkCreateFolder.Location = New System.Drawing.Point(6, 19)
|
||||
Me.chkCreateFolder.Name = "chkCreateFolder"
|
||||
Me.chkCreateFolder.Size = New System.Drawing.Size(186, 17)
|
||||
Me.chkCreateFolder.TabIndex = 0
|
||||
Me.chkCreateFolder.Text = "Create a sub-folder for each game"
|
||||
Me.chkCreateFolder.UseVisualStyleBackColor = True
|
||||
'
|
||||
'grp7z
|
||||
'
|
||||
Me.grp7z.Controls.Add(Me.cboCompression)
|
||||
Me.grp7z.Controls.Add(Me.lblCompression)
|
||||
Me.grp7z.Location = New System.Drawing.Point(12, 357)
|
||||
Me.grp7z.Name = "grp7z"
|
||||
Me.grp7z.Size = New System.Drawing.Size(360, 47)
|
||||
Me.grp7z.TabIndex = 2
|
||||
Me.grp7z.TabStop = False
|
||||
Me.grp7z.Text = "7z Options"
|
||||
Me.cboCompression.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.cboCompression.FormattingEnabled = True
|
||||
Me.cboCompression.Location = New System.Drawing.Point(110, 17)
|
||||
Me.cboCompression.Name = "cboCompression"
|
||||
Me.cboCompression.Size = New System.Drawing.Size(238, 21)
|
||||
Me.cboCompression.TabIndex = 0
|
||||
'
|
||||
'lblCompression
|
||||
'
|
||||
@@ -300,26 +266,259 @@ Partial Class frmSettings
|
||||
Me.lblCompression.TabIndex = 0
|
||||
Me.lblCompression.Text = "Compression:"
|
||||
'
|
||||
'cboCompression
|
||||
'btn7zLocation
|
||||
'
|
||||
Me.cboCompression.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.cboCompression.FormattingEnabled = True
|
||||
Me.cboCompression.Location = New System.Drawing.Point(88, 17)
|
||||
Me.cboCompression.Name = "cboCompression"
|
||||
Me.cboCompression.Size = New System.Drawing.Size(224, 21)
|
||||
Me.cboCompression.TabIndex = 1
|
||||
Me.btn7zLocation.Location = New System.Drawing.Point(313, 41)
|
||||
Me.btn7zLocation.Name = "btn7zLocation"
|
||||
Me.btn7zLocation.Size = New System.Drawing.Size(27, 20)
|
||||
Me.btn7zLocation.TabIndex = 2
|
||||
Me.btn7zLocation.Text = "..."
|
||||
Me.btn7zLocation.UseVisualStyleBackColor = True
|
||||
'
|
||||
'txt7zLocation
|
||||
'
|
||||
Me.txt7zLocation.Location = New System.Drawing.Point(110, 41)
|
||||
Me.txt7zLocation.Name = "txt7zLocation"
|
||||
Me.txt7zLocation.Size = New System.Drawing.Size(197, 20)
|
||||
Me.txt7zLocation.TabIndex = 1
|
||||
'
|
||||
'lblLocation
|
||||
'
|
||||
Me.lblLocation.AutoSize = True
|
||||
Me.lblLocation.Location = New System.Drawing.Point(6, 44)
|
||||
Me.lblLocation.Name = "lblLocation"
|
||||
Me.lblLocation.Size = New System.Drawing.Size(89, 13)
|
||||
Me.lblLocation.TabIndex = 4
|
||||
Me.lblLocation.Text = "Custom Location:"
|
||||
'
|
||||
'txt7zArguments
|
||||
'
|
||||
Me.txt7zArguments.Location = New System.Drawing.Point(110, 15)
|
||||
Me.txt7zArguments.Name = "txt7zArguments"
|
||||
Me.txt7zArguments.Size = New System.Drawing.Size(238, 20)
|
||||
Me.txt7zArguments.TabIndex = 0
|
||||
'
|
||||
'lblArguments
|
||||
'
|
||||
Me.lblArguments.AutoSize = True
|
||||
Me.lblArguments.Location = New System.Drawing.Point(6, 20)
|
||||
Me.lblArguments.Name = "lblArguments"
|
||||
Me.lblArguments.Size = New System.Drawing.Size(98, 13)
|
||||
Me.lblArguments.TabIndex = 2
|
||||
Me.lblArguments.Text = "Custom Arguments:"
|
||||
'
|
||||
'lbl7zCopyright
|
||||
'
|
||||
Me.lbl7zCopyright.AutoEllipsis = True
|
||||
Me.lbl7zCopyright.Location = New System.Drawing.Point(9, 34)
|
||||
Me.lbl7zCopyright.Name = "lbl7zCopyright"
|
||||
Me.lbl7zCopyright.Size = New System.Drawing.Size(339, 17)
|
||||
Me.lbl7zCopyright.TabIndex = 8
|
||||
Me.lbl7zCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
'
|
||||
'lbl7zProduct
|
||||
'
|
||||
Me.lbl7zProduct.AutoEllipsis = True
|
||||
Me.lbl7zProduct.Location = New System.Drawing.Point(9, 17)
|
||||
Me.lbl7zProduct.Name = "lbl7zProduct"
|
||||
Me.lbl7zProduct.Size = New System.Drawing.Size(339, 17)
|
||||
Me.lbl7zProduct.TabIndex = 7
|
||||
Me.lbl7zProduct.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
'
|
||||
'btnDefaults
|
||||
'
|
||||
Me.btnDefaults.Location = New System.Drawing.Point(12, 321)
|
||||
Me.btnDefaults.Name = "btnDefaults"
|
||||
Me.btnDefaults.Size = New System.Drawing.Size(110, 23)
|
||||
Me.btnDefaults.TabIndex = 4
|
||||
Me.btnDefaults.Text = "Set &Defaults"
|
||||
Me.btnDefaults.UseVisualStyleBackColor = True
|
||||
'
|
||||
'pnlBackup
|
||||
'
|
||||
Me.pnlBackup.Controls.Add(Me.lblMinutes)
|
||||
Me.pnlBackup.Controls.Add(Me.nudSupressBackupThreshold)
|
||||
Me.pnlBackup.Controls.Add(Me.chkSupressBackup)
|
||||
Me.pnlBackup.Controls.Add(Me.chkBackupConfirm)
|
||||
Me.pnlBackup.Controls.Add(Me.chkOverwriteWarning)
|
||||
Me.pnlBackup.Controls.Add(Me.grpBackupHandling)
|
||||
Me.pnlBackup.Controls.Add(Me.grpFolderOptions)
|
||||
Me.pnlBackup.Location = New System.Drawing.Point(180, 0)
|
||||
Me.pnlBackup.Name = "pnlBackup"
|
||||
Me.pnlBackup.Size = New System.Drawing.Size(367, 314)
|
||||
Me.pnlBackup.TabIndex = 3
|
||||
'
|
||||
'lblMinutes
|
||||
'
|
||||
Me.lblMinutes.AutoSize = True
|
||||
Me.lblMinutes.Location = New System.Drawing.Point(286, 228)
|
||||
Me.lblMinutes.Name = "lblMinutes"
|
||||
Me.lblMinutes.Size = New System.Drawing.Size(43, 13)
|
||||
Me.lblMinutes.TabIndex = 14
|
||||
Me.lblMinutes.Text = "minutes"
|
||||
'
|
||||
'nudSupressBackupThreshold
|
||||
'
|
||||
Me.nudSupressBackupThreshold.Location = New System.Drawing.Point(229, 226)
|
||||
Me.nudSupressBackupThreshold.Maximum = New Decimal(New Integer() {999, 0, 0, 0})
|
||||
Me.nudSupressBackupThreshold.Name = "nudSupressBackupThreshold"
|
||||
Me.nudSupressBackupThreshold.Size = New System.Drawing.Size(51, 20)
|
||||
Me.nudSupressBackupThreshold.TabIndex = 5
|
||||
'
|
||||
'chkSupressBackup
|
||||
'
|
||||
Me.chkSupressBackup.AutoSize = True
|
||||
Me.chkSupressBackup.Location = New System.Drawing.Point(6, 228)
|
||||
Me.chkSupressBackup.Name = "chkSupressBackup"
|
||||
Me.chkSupressBackup.Size = New System.Drawing.Size(217, 17)
|
||||
Me.chkSupressBackup.TabIndex = 4
|
||||
Me.chkSupressBackup.Text = "Backup only when session time exceeds"
|
||||
Me.chkSupressBackup.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkBackupConfirm
|
||||
'
|
||||
Me.chkBackupConfirm.AutoSize = True
|
||||
Me.chkBackupConfirm.Location = New System.Drawing.Point(6, 180)
|
||||
Me.chkBackupConfirm.Name = "chkBackupConfirm"
|
||||
Me.chkBackupConfirm.Size = New System.Drawing.Size(160, 17)
|
||||
Me.chkBackupConfirm.TabIndex = 2
|
||||
Me.chkBackupConfirm.Text = "Disable backup confirmation"
|
||||
Me.chkBackupConfirm.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkOverwriteWarning
|
||||
'
|
||||
Me.chkOverwriteWarning.AutoSize = True
|
||||
Me.chkOverwriteWarning.Location = New System.Drawing.Point(6, 204)
|
||||
Me.chkOverwriteWarning.Name = "chkOverwriteWarning"
|
||||
Me.chkOverwriteWarning.Size = New System.Drawing.Size(139, 17)
|
||||
Me.chkOverwriteWarning.TabIndex = 3
|
||||
Me.chkOverwriteWarning.Text = "Show overwrite warning"
|
||||
Me.chkOverwriteWarning.UseVisualStyleBackColor = True
|
||||
'
|
||||
'grpBackupHandling
|
||||
'
|
||||
Me.grpBackupHandling.Controls.Add(Me.chkAutoRestore)
|
||||
Me.grpBackupHandling.Controls.Add(Me.chkRestoreNotify)
|
||||
Me.grpBackupHandling.Controls.Add(Me.chkAutoMark)
|
||||
Me.grpBackupHandling.Location = New System.Drawing.Point(6, 88)
|
||||
Me.grpBackupHandling.Margin = New System.Windows.Forms.Padding(2, 2, 2, 2)
|
||||
Me.grpBackupHandling.Name = "grpBackupHandling"
|
||||
Me.grpBackupHandling.Padding = New System.Windows.Forms.Padding(2, 2, 2, 2)
|
||||
Me.grpBackupHandling.Size = New System.Drawing.Size(354, 87)
|
||||
Me.grpBackupHandling.TabIndex = 1
|
||||
Me.grpBackupHandling.TabStop = False
|
||||
Me.grpBackupHandling.Text = "Backup Handling"
|
||||
'
|
||||
'chkAutoRestore
|
||||
'
|
||||
Me.chkAutoRestore.AutoSize = True
|
||||
Me.chkAutoRestore.Location = New System.Drawing.Point(8, 41)
|
||||
Me.chkAutoRestore.Margin = New System.Windows.Forms.Padding(2, 2, 2, 2)
|
||||
Me.chkAutoRestore.Name = "chkAutoRestore"
|
||||
Me.chkAutoRestore.Size = New System.Drawing.Size(190, 17)
|
||||
Me.chkAutoRestore.TabIndex = 1
|
||||
Me.chkAutoRestore.Text = "Automatically restore new backups"
|
||||
Me.chkAutoRestore.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkRestoreNotify
|
||||
'
|
||||
Me.chkRestoreNotify.AutoSize = True
|
||||
Me.chkRestoreNotify.Location = New System.Drawing.Point(8, 19)
|
||||
Me.chkRestoreNotify.Margin = New System.Windows.Forms.Padding(2, 2, 2, 2)
|
||||
Me.chkRestoreNotify.Name = "chkRestoreNotify"
|
||||
Me.chkRestoreNotify.Size = New System.Drawing.Size(216, 17)
|
||||
Me.chkRestoreNotify.TabIndex = 0
|
||||
Me.chkRestoreNotify.Text = "Display notifications about new backups"
|
||||
Me.chkRestoreNotify.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkAutoMark
|
||||
'
|
||||
Me.chkAutoMark.AutoSize = True
|
||||
Me.chkAutoMark.Location = New System.Drawing.Point(8, 63)
|
||||
Me.chkAutoMark.Name = "chkAutoMark"
|
||||
Me.chkAutoMark.Size = New System.Drawing.Size(321, 17)
|
||||
Me.chkAutoMark.TabIndex = 2
|
||||
Me.chkAutoMark.Text = "Automatically mark new backups as restored when appropriate"
|
||||
Me.chkAutoMark.UseVisualStyleBackColor = True
|
||||
'
|
||||
'pnl7z
|
||||
'
|
||||
Me.pnl7z.Controls.Add(Me.grp7zAdvanced)
|
||||
Me.pnl7z.Controls.Add(Me.grp7zInformation)
|
||||
Me.pnl7z.Controls.Add(Me.grp7zGeneral)
|
||||
Me.pnl7z.Location = New System.Drawing.Point(180, 0)
|
||||
Me.pnl7z.Name = "pnl7z"
|
||||
Me.pnl7z.Size = New System.Drawing.Size(367, 314)
|
||||
Me.pnl7z.TabIndex = 2
|
||||
'
|
||||
'grp7zAdvanced
|
||||
'
|
||||
Me.grp7zAdvanced.Controls.Add(Me.btn7zLocation)
|
||||
Me.grp7zAdvanced.Controls.Add(Me.lblArguments)
|
||||
Me.grp7zAdvanced.Controls.Add(Me.txt7zLocation)
|
||||
Me.grp7zAdvanced.Controls.Add(Me.txt7zArguments)
|
||||
Me.grp7zAdvanced.Controls.Add(Me.lblLocation)
|
||||
Me.grp7zAdvanced.Location = New System.Drawing.Point(6, 68)
|
||||
Me.grp7zAdvanced.Name = "grp7zAdvanced"
|
||||
Me.grp7zAdvanced.Size = New System.Drawing.Size(354, 73)
|
||||
Me.grp7zAdvanced.TabIndex = 1
|
||||
Me.grp7zAdvanced.TabStop = False
|
||||
Me.grp7zAdvanced.Text = "Advanced"
|
||||
'
|
||||
'grp7zInformation
|
||||
'
|
||||
Me.grp7zInformation.Controls.Add(Me.lbl7zProduct)
|
||||
Me.grp7zInformation.Controls.Add(Me.lbl7zCopyright)
|
||||
Me.grp7zInformation.Location = New System.Drawing.Point(6, 146)
|
||||
Me.grp7zInformation.Name = "grp7zInformation"
|
||||
Me.grp7zInformation.Size = New System.Drawing.Size(354, 63)
|
||||
Me.grp7zInformation.TabIndex = 2
|
||||
Me.grp7zInformation.TabStop = False
|
||||
Me.grp7zInformation.Text = "Utility Information"
|
||||
'
|
||||
'pnlGeneral
|
||||
'
|
||||
Me.pnlGeneral.Controls.Add(Me.chkAutoSaveLog)
|
||||
Me.pnlGeneral.Controls.Add(Me.grpGameData)
|
||||
Me.pnlGeneral.Controls.Add(Me.chkShowDetectionTips)
|
||||
Me.pnlGeneral.Controls.Add(Me.grpStartup)
|
||||
Me.pnlGeneral.Location = New System.Drawing.Point(180, 0)
|
||||
Me.pnlGeneral.Name = "pnlGeneral"
|
||||
Me.pnlGeneral.Size = New System.Drawing.Size(367, 314)
|
||||
Me.pnlGeneral.TabIndex = 1
|
||||
'
|
||||
'grpGameData
|
||||
'
|
||||
Me.grpGameData.Controls.Add(Me.chkTimeTracking)
|
||||
Me.grpGameData.Controls.Add(Me.chkSync)
|
||||
Me.grpGameData.Controls.Add(Me.btnOptionalFields)
|
||||
Me.grpGameData.Location = New System.Drawing.Point(6, 106)
|
||||
Me.grpGameData.Name = "grpGameData"
|
||||
Me.grpGameData.Size = New System.Drawing.Size(354, 69)
|
||||
Me.grpGameData.TabIndex = 1
|
||||
Me.grpGameData.TabStop = False
|
||||
Me.grpGameData.Text = "Game Data"
|
||||
'
|
||||
'lstSettings
|
||||
'
|
||||
Me.lstSettings.FormattingEnabled = True
|
||||
Me.lstSettings.Location = New System.Drawing.Point(12, 12)
|
||||
Me.lstSettings.Name = "lstSettings"
|
||||
Me.lstSettings.Size = New System.Drawing.Size(162, 303)
|
||||
Me.lstSettings.TabIndex = 0
|
||||
'
|
||||
'frmSettings
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(384, 511)
|
||||
Me.Controls.Add(Me.grp7z)
|
||||
Me.Controls.Add(Me.grpBackup)
|
||||
Me.ClientSize = New System.Drawing.Size(554, 361)
|
||||
Me.Controls.Add(Me.pnlGeneral)
|
||||
Me.Controls.Add(Me.pnlBackup)
|
||||
Me.Controls.Add(Me.pnl7z)
|
||||
Me.Controls.Add(Me.lstSettings)
|
||||
Me.Controls.Add(Me.btnDefaults)
|
||||
Me.Controls.Add(Me.btnCancel)
|
||||
Me.Controls.Add(Me.btnSave)
|
||||
Me.Controls.Add(Me.grpPaths)
|
||||
Me.Controls.Add(Me.grpGeneral)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||
Me.MaximizeBox = False
|
||||
Me.MinimizeBox = False
|
||||
@@ -328,22 +527,31 @@ Partial Class frmSettings
|
||||
Me.ShowInTaskbar = False
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Settings"
|
||||
Me.grpGeneral.ResumeLayout(False)
|
||||
Me.grpGeneral.PerformLayout()
|
||||
Me.grpPaths.ResumeLayout(False)
|
||||
Me.grpPaths.PerformLayout()
|
||||
Me.grpBackup.ResumeLayout(False)
|
||||
Me.grpBackup.PerformLayout()
|
||||
Me.grpStartup.ResumeLayout(False)
|
||||
Me.grpStartup.PerformLayout()
|
||||
Me.grpFolderOptions.ResumeLayout(False)
|
||||
Me.grpFolderOptions.PerformLayout()
|
||||
Me.grp7zGeneral.ResumeLayout(False)
|
||||
Me.grp7zGeneral.PerformLayout()
|
||||
Me.pnlBackup.ResumeLayout(False)
|
||||
Me.pnlBackup.PerformLayout()
|
||||
CType(Me.nudSupressBackupThreshold, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.grp7z.ResumeLayout(False)
|
||||
Me.grp7z.PerformLayout()
|
||||
Me.grpBackupHandling.ResumeLayout(False)
|
||||
Me.grpBackupHandling.PerformLayout()
|
||||
Me.pnl7z.ResumeLayout(False)
|
||||
Me.grp7zAdvanced.ResumeLayout(False)
|
||||
Me.grp7zAdvanced.PerformLayout()
|
||||
Me.grp7zInformation.ResumeLayout(False)
|
||||
Me.pnlGeneral.ResumeLayout(False)
|
||||
Me.pnlGeneral.PerformLayout()
|
||||
Me.grpGameData.ResumeLayout(False)
|
||||
Me.grpGameData.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents chkMonitorOnStartup As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkBackupConfirm As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents grpGeneral As System.Windows.Forms.GroupBox
|
||||
Friend WithEvents grpPaths As System.Windows.Forms.GroupBox
|
||||
Friend WithEvents grpStartup As System.Windows.Forms.GroupBox
|
||||
Friend WithEvents grpFolderOptions As System.Windows.Forms.GroupBox
|
||||
Friend WithEvents txtBackupFolder As System.Windows.Forms.TextBox
|
||||
Friend WithEvents btnSave As System.Windows.Forms.Button
|
||||
Friend WithEvents btnCancel As System.Windows.Forms.Button
|
||||
@@ -351,18 +559,37 @@ Partial Class frmSettings
|
||||
Friend WithEvents btnBackupFolder As System.Windows.Forms.Button
|
||||
Friend WithEvents chkShowDetectionTips As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkStartToTray As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents grpBackup As System.Windows.Forms.GroupBox
|
||||
Friend WithEvents chkOverwriteWarning As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkCreateFolder As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkRestoreOnLaunch As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkSync As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkCheckSum As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkStartWindows As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkTimeTracking As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents grp7zGeneral As GroupBox
|
||||
Friend WithEvents cboCompression As ComboBox
|
||||
Friend WithEvents lblCompression As Label
|
||||
Friend WithEvents lbl7zProduct As Label
|
||||
Friend WithEvents lbl7zCopyright As Label
|
||||
Friend WithEvents btn7zLocation As Button
|
||||
Friend WithEvents txt7zLocation As TextBox
|
||||
Friend WithEvents lblLocation As Label
|
||||
Friend WithEvents txt7zArguments As TextBox
|
||||
Friend WithEvents lblArguments As Label
|
||||
Friend WithEvents btnDefaults As Button
|
||||
Friend WithEvents btnOptionalFields As Button
|
||||
Friend WithEvents chkAutoSaveLog As CheckBox
|
||||
Friend WithEvents pnlBackup As Panel
|
||||
Friend WithEvents pnl7z As Panel
|
||||
Friend WithEvents pnlGeneral As Panel
|
||||
Friend WithEvents grpGameData As GroupBox
|
||||
Friend WithEvents lstSettings As ListBox
|
||||
Friend WithEvents grp7zAdvanced As GroupBox
|
||||
Friend WithEvents grp7zInformation As GroupBox
|
||||
Friend WithEvents lblMinutes As Label
|
||||
Friend WithEvents nudSupressBackupThreshold As NumericUpDown
|
||||
Friend WithEvents chkSupressBackup As CheckBox
|
||||
Friend WithEvents grp7z As GroupBox
|
||||
Friend WithEvents cboCompression As ComboBox
|
||||
Friend WithEvents lblCompression As Label
|
||||
Friend WithEvents chkBackupConfirm As CheckBox
|
||||
Friend WithEvents chkOverwriteWarning As CheckBox
|
||||
Friend WithEvents grpBackupHandling As GroupBox
|
||||
Friend WithEvents chkAutoMark As CheckBox
|
||||
Friend WithEvents chkAutoRestore As CheckBox
|
||||
Friend WithEvents chkRestoreNotify As CheckBox
|
||||
End Class
|
||||
|
||||
+202
-35
@@ -1,9 +1,10 @@
|
||||
Imports GBM.My.Resources
|
||||
Imports System.IO
|
||||
|
||||
Public Class frmSettings
|
||||
Dim bShutdown As Boolean = False
|
||||
Dim bBackupLocationChanged As Boolean = False
|
||||
Dim bCheckSumDisabled As Boolean = False
|
||||
Dim bSyncSettingsChanged As Boolean = False
|
||||
Dim eCurrentSyncFields As clsGame.eOptionalSyncFields
|
||||
Private oSettings As mgrSettings
|
||||
|
||||
Property Settings As mgrSettings
|
||||
@@ -15,15 +16,6 @@ Public Class frmSettings
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property BackupLocationChanged As Boolean
|
||||
Get
|
||||
Return bBackupLocationChanged
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bBackupLocationChanged = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Sub HandleRegistryUpdate(ByVal bToggle As Boolean)
|
||||
Dim oKey As Microsoft.Win32.RegistryKey
|
||||
Dim sAppName As String = Application.ProductName
|
||||
@@ -51,30 +43,34 @@ Public Class frmSettings
|
||||
oSettings.MonitorOnStartup = chkMonitorOnStartup.Checked
|
||||
oSettings.StartToTray = chkStartToTray.Checked
|
||||
oSettings.ShowDetectionToolTips = chkShowDetectionTips.Checked
|
||||
oSettings.AutoSaveLog = chkAutoSaveLog.Checked
|
||||
oSettings.DisableConfirmation = chkBackupConfirm.Checked
|
||||
oSettings.CreateSubFolder = chkCreateFolder.Checked
|
||||
oSettings.ShowOverwriteWarning = chkOverwriteWarning.Checked
|
||||
oSettings.RestoreOnLaunch = chkRestoreOnLaunch.Checked
|
||||
oSettings.RestoreOnLaunch = chkRestoreNotify.Checked
|
||||
oSettings.AutoRestore = chkAutoRestore.Checked
|
||||
oSettings.AutoMark = chkAutoMark.Checked
|
||||
oSettings.TimeTracking = chkTimeTracking.Checked
|
||||
oSettings.SupressBackup = chkSupressBackup.Checked
|
||||
oSettings.SupressBackupThreshold = nudSupressBackupThreshold.Value
|
||||
oSettings.CompressionLevel = cboCompression.SelectedValue
|
||||
|
||||
'We need to clear all checksums its turned off
|
||||
If chkCheckSum.Checked = False And oSettings.CheckSum = True Then
|
||||
bCheckSumDisabled = True
|
||||
If oSettings.Custom7zArguments <> txt7zArguments.Text.Trim And txt7zArguments.Text.Trim <> String.Empty Then
|
||||
mgrCommon.ShowMessage(frmSettings_WarningArguments, MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
oSettings.CheckSum = chkCheckSum.Checked
|
||||
|
||||
oSettings.Custom7zArguments = txt7zArguments.Text.Trim
|
||||
oSettings.Custom7zLocation = txt7zLocation.Text.Trim
|
||||
|
||||
'Turning syncing from off to on is the same as changing the backup folder
|
||||
If chkSync.Checked = True And oSettings.Sync = False Then
|
||||
bBackupLocationChanged = True
|
||||
bSyncSettingsChanged = True
|
||||
End If
|
||||
oSettings.Sync = chkSync.Checked
|
||||
|
||||
If IO.Directory.Exists(txtBackupFolder.Text) Then
|
||||
If Directory.Exists(txtBackupFolder.Text) Then
|
||||
If oSettings.BackupFolder <> txtBackupFolder.Text Then
|
||||
If chkSync.Checked Then bBackupLocationChanged = True
|
||||
If chkSync.Checked Then bSyncSettingsChanged = True
|
||||
End If
|
||||
oSettings.BackupFolder = txtBackupFolder.Text
|
||||
Else
|
||||
@@ -82,47 +78,129 @@ Public Class frmSettings
|
||||
Return False
|
||||
End If
|
||||
|
||||
If oSettings.Custom7zLocation <> String.Empty Then
|
||||
If File.Exists(oSettings.Custom7zLocation) Then
|
||||
If Path.GetFileNameWithoutExtension(oSettings.Custom7zLocation) <> "7za" Then
|
||||
mgrCommon.ShowMessage(frmSettings_WarningLocation, MsgBoxStyle.Critical)
|
||||
End If
|
||||
Else
|
||||
mgrCommon.ShowMessage(frmSettings_ErrorLocation, oSettings.Custom7zLocation, MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
|
||||
'We must trigger a sync if optional fields have changed
|
||||
If Settings.Sync And (eCurrentSyncFields <> Settings.SyncFields) Then
|
||||
bSyncSettingsChanged = True
|
||||
End If
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function SaveSettings() As Boolean
|
||||
If ValidateSettings() Then
|
||||
oSettings.SaveSettings()
|
||||
If BackupLocationChanged Then mgrMonitorList.HandleBackupLocationChange()
|
||||
If bCheckSumDisabled Then mgrManifest.DoManifestHashWipe()
|
||||
If bSyncSettingsChanged Then mgrMonitorList.HandleBackupLocationChange(Settings)
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Sub GetUtilityInfo(ByVal sLocation As String)
|
||||
Dim bDefault As Boolean = False
|
||||
Dim sFileDescription As String
|
||||
Dim sVersion As String
|
||||
Dim sCopyright As String
|
||||
|
||||
'Ignore this function when on Unix and hide the information data
|
||||
If mgrCommon.IsUnix Then
|
||||
grp7zInformation.Visible = False
|
||||
Else
|
||||
Try
|
||||
grp7zInformation.Visible = True
|
||||
|
||||
'Use default when no custom location is set
|
||||
If sLocation = String.Empty Then
|
||||
sLocation = mgrPath.Default7zLocation
|
||||
bDefault = True
|
||||
End If
|
||||
|
||||
'Get info
|
||||
Dim oFileInfo As FileVersionInfo = FileVersionInfo.GetVersionInfo(sLocation)
|
||||
|
||||
If oFileInfo.FileDescription = String.Empty Then
|
||||
sFileDescription = App_NotAvailable
|
||||
Else
|
||||
sFileDescription = oFileInfo.FileDescription
|
||||
End If
|
||||
|
||||
If oFileInfo.ProductVersion = String.Empty Then
|
||||
sVersion = App_NotAvailable
|
||||
Else
|
||||
sVersion = oFileInfo.ProductVersion
|
||||
End If
|
||||
|
||||
If oFileInfo.LegalCopyright = String.Empty Then
|
||||
sCopyright = App_NotAvailable
|
||||
Else
|
||||
sCopyright = oFileInfo.LegalCopyright
|
||||
End If
|
||||
|
||||
lbl7zProduct.Text = sFileDescription & " - " & sVersion
|
||||
lbl7zCopyright.Text = sCopyright
|
||||
Catch ex As Exception
|
||||
grp7zInformation.Visible = False
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub SetDefaults()
|
||||
If mgrCommon.ShowMessage(frmSettings_ConfirmDefaults, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
oSettings = New mgrSettings
|
||||
LoadSettings()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub LoadSettings()
|
||||
chkStartWindows.Checked = oSettings.StartWithWindows
|
||||
chkMonitorOnStartup.Checked = oSettings.MonitorOnStartup
|
||||
chkStartToTray.Checked = oSettings.StartToTray
|
||||
chkShowDetectionTips.Checked = oSettings.ShowDetectionToolTips
|
||||
chkAutoSaveLog.Checked = oSettings.AutoSaveLog
|
||||
chkBackupConfirm.Checked = oSettings.DisableConfirmation
|
||||
chkCreateFolder.Checked = oSettings.CreateSubFolder
|
||||
chkOverwriteWarning.Checked = oSettings.ShowOverwriteWarning
|
||||
chkRestoreOnLaunch.Checked = oSettings.RestoreOnLaunch
|
||||
chkRestoreNotify.Checked = oSettings.RestoreOnLaunch
|
||||
chkAutoRestore.Checked = oSettings.AutoRestore
|
||||
chkAutoMark.Checked = oSettings.AutoMark
|
||||
txtBackupFolder.Text = oSettings.BackupFolder
|
||||
chkSync.Checked = oSettings.Sync
|
||||
chkCheckSum.Checked = oSettings.CheckSum
|
||||
chkTimeTracking.Checked = oSettings.TimeTracking
|
||||
chkSupressBackup.Checked = oSettings.SupressBackup
|
||||
nudSupressBackupThreshold.Value = oSettings.SupressBackupThreshold
|
||||
nudSupressBackupThreshold.Enabled = chkSupressBackup.Checked
|
||||
cboCompression.SelectedValue = oSettings.CompressionLevel
|
||||
txt7zArguments.Text = oSettings.Custom7zArguments
|
||||
txt7zLocation.Text = oSettings.Custom7zLocation
|
||||
eCurrentSyncFields = oSettings.SyncFields
|
||||
|
||||
'Unix Handler
|
||||
If mgrCommon.IsUnix Then
|
||||
chkStartToTray.Checked = False
|
||||
chkStartWindows.Checked = False
|
||||
End If
|
||||
|
||||
'Retrieve 7z Info
|
||||
GetUtilityInfo(oSettings.Custom7zLocation)
|
||||
|
||||
'Toggle Sync Button
|
||||
ToggleSyncButton()
|
||||
End Sub
|
||||
|
||||
Private Sub LoadCombos()
|
||||
Dim oComboItems As New List(Of KeyValuePair(Of Integer, String))
|
||||
Dim oSettingsItems As New List(Of KeyValuePair(Of Integer, String))
|
||||
|
||||
'cboCompression
|
||||
cboCompression.ValueMember = "Key"
|
||||
@@ -136,6 +214,57 @@ Public Class frmSettings
|
||||
oComboItems.Add(New KeyValuePair(Of Integer, String)(9, frmSettings_cboCompression_Ultra))
|
||||
|
||||
cboCompression.DataSource = oComboItems
|
||||
|
||||
'lstSettings
|
||||
lstSettings.ValueMember = "Key"
|
||||
lstSettings.DisplayMember = "Value"
|
||||
|
||||
oSettingsItems.Add(New KeyValuePair(Of Integer, String)(0, frmSettings_lstSettings_General))
|
||||
oSettingsItems.Add(New KeyValuePair(Of Integer, String)(1, frmSettings_lstSettings_BackupRestore))
|
||||
oSettingsItems.Add(New KeyValuePair(Of Integer, String)(2, frmSettings_lstSettings_7z))
|
||||
|
||||
lstSettings.DataSource = oSettingsItems
|
||||
|
||||
'Select Default
|
||||
lstSettings.SelectedIndex = 0
|
||||
End Sub
|
||||
|
||||
Private Sub ToggleSyncButton()
|
||||
If chkSync.Checked Then
|
||||
btnOptionalFields.Enabled = True
|
||||
Else
|
||||
btnOptionalFields.Enabled = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OpenOptionalFields()
|
||||
Dim frm As New frmSyncFields
|
||||
frm.SyncFields = Settings.SyncFields
|
||||
frm.ShowDialog()
|
||||
If frm.DialogResult = DialogResult.OK Then
|
||||
Settings.SyncFields = frm.SyncFields
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ChangePanel()
|
||||
If lstSettings.SelectedItems.Count > 0 Then
|
||||
Dim oSettingsItem As KeyValuePair(Of Integer, String) = lstSettings.SelectedItems(0)
|
||||
|
||||
Select Case oSettingsItem.Key
|
||||
Case 0
|
||||
pnlGeneral.Visible = True
|
||||
pnlBackup.Visible = False
|
||||
pnl7z.Visible = False
|
||||
Case 1
|
||||
pnlGeneral.Visible = False
|
||||
pnlBackup.Visible = True
|
||||
pnl7z.Visible = False
|
||||
Case 2
|
||||
pnlGeneral.Visible = False
|
||||
pnlBackup.Visible = False
|
||||
pnl7z.Visible = True
|
||||
End Select
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub SetForm()
|
||||
@@ -143,34 +272,48 @@ Public Class frmSettings
|
||||
Me.Text = frmSettings_FormName
|
||||
|
||||
'Set Form Text
|
||||
grpBackup.Text = frmSettings_grpBackup
|
||||
lblMinutes.Text = frmSettings_lblMinutes
|
||||
chkSupressBackup.Text = frmSettings_chkSupressBackup
|
||||
chkCheckSum.Text = frmSettings_chkCheckSum
|
||||
chkRestoreOnLaunch.Text = frmSettings_chkRestoreOnLaunch
|
||||
grpBackupHandling.Text = frmSettings_grpBackupHandling
|
||||
chkRestoreNotify.Text = frmSettings_chkRestoreNotify
|
||||
chkAutoRestore.Text = frmSettings_chkAutoRestore
|
||||
chkAutoMark.Text = frmSettings_chkAutoMark
|
||||
chkOverwriteWarning.Text = frmSettings_chkOverwriteWarning
|
||||
chkCreateFolder.Text = frmSettings_chkCreateFolder
|
||||
chkBackupConfirm.Text = frmSettings_chkBackupConfirm
|
||||
btnCancel.Text = frmSettings_btnCancel
|
||||
btnSave.Text = frmSettings_btnSave
|
||||
grpPaths.Text = frmSettings_grpPaths
|
||||
grpFolderOptions.Text = frmSettings_grpFolderOptions
|
||||
btnBackupFolder.Text = frmSettings_btnBackupFolder
|
||||
lblBackupFolder.Text = frmSettings_lblBackupFolder
|
||||
grpGeneral.Text = frmSettings_grpGeneral
|
||||
grpStartup.Text = frmSettings_grpStartup
|
||||
grpGameData.Text = frmSettings_grpGameData
|
||||
chkTimeTracking.Text = frmSettings_chkTimeTracking
|
||||
chkStartWindows.Text = frmSettings_chkStartWindows
|
||||
chkSync.Text = frmSettings_chkSync
|
||||
chkShowDetectionTips.Text = frmSettings_chkShowDetectionTips
|
||||
chkAutoSaveLog.Text = frmSettings_chkAutoSaveLog
|
||||
chkStartToTray.Text = frmSettings_chkStartToTray
|
||||
chkMonitorOnStartup.Text = frmSettings_chkMonitorOnStartup
|
||||
grp7z.Text = frmSettings_grp7z
|
||||
grp7zGeneral.Text = frmSettings_grp7zGeneral
|
||||
grp7zAdvanced.Text = frmSettings_grp7zAdvanced
|
||||
grp7zInformation.Text = frmSettings_grp7zInformation
|
||||
lblCompression.Text = frmSettings_lblCompression
|
||||
btnDefaults.Text = frmSettings_btnDefaults
|
||||
lblArguments.Text = frmSettings_lblArguments
|
||||
lblLocation.Text = frmSettings_lblLocation
|
||||
btnOptionalFields.Text = frmSettings_btnOptionalFields
|
||||
|
||||
'Unix Handler
|
||||
If mgrCommon.IsUnix Then
|
||||
chkStartToTray.Enabled = False
|
||||
chkStartWindows.Enabled = False
|
||||
End If
|
||||
|
||||
'Handle Panels
|
||||
pnlGeneral.Visible = False
|
||||
pnlBackup.Visible = False
|
||||
pnl7z.Visible = False
|
||||
End Sub
|
||||
|
||||
Private Sub btnSave_Click(sender As System.Object, e As System.EventArgs) Handles btnSave.Click
|
||||
@@ -185,12 +328,6 @@ Public Class frmSettings
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub frmSettings_FormClosing(sender As System.Object, e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
|
||||
If bShutdown = False Then
|
||||
e.Cancel = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub frmSettings_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
||||
SetForm()
|
||||
LoadCombos()
|
||||
@@ -203,7 +340,37 @@ Public Class frmSettings
|
||||
If sNewFolder <> String.Empty Then txtBackupFolder.Text = sNewFolder
|
||||
End Sub
|
||||
|
||||
Private Sub btn7zLocation_Click(sender As Object, e As EventArgs) Handles btn7zLocation.Click
|
||||
Dim sNewLocation As String
|
||||
sNewLocation = mgrCommon.OpenFileBrowser(frmSettings_Browse7za, "exe", frmSettings_7zaFileType, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), False)
|
||||
If sNewLocation <> String.Empty Then
|
||||
txt7zLocation.Text = sNewLocation
|
||||
GetUtilityInfo(txt7zLocation.Text)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub chkSupressBackup_CheckedChanged(sender As Object, e As EventArgs) Handles chkSupressBackup.CheckedChanged
|
||||
nudSupressBackupThreshold.Enabled = chkSupressBackup.Checked
|
||||
End Sub
|
||||
|
||||
Private Sub txt7zLocation_Leave(sender As Object, e As EventArgs) Handles txt7zLocation.Leave
|
||||
GetUtilityInfo(txt7zLocation.Text.Trim)
|
||||
End Sub
|
||||
|
||||
Private Sub btnDefaults_Click(sender As Object, e As EventArgs) Handles btnDefaults.Click
|
||||
SetDefaults()
|
||||
End Sub
|
||||
|
||||
Private Sub btnOptionalFields_Click(sender As Object, e As EventArgs) Handles btnOptionalFields.Click
|
||||
OpenOptionalFields()
|
||||
End Sub
|
||||
|
||||
Private Sub chkSync_CheckedChanged(sender As Object, e As EventArgs) Handles chkSync.CheckedChanged
|
||||
ToggleSyncButton()
|
||||
End Sub
|
||||
|
||||
Private Sub lstSettings_SelectedValueChanged(sender As Object, e As EventArgs) Handles lstSettings.SelectedValueChanged
|
||||
ChangePanel()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -66,7 +66,7 @@ Public Class frmStartUpWizard
|
||||
If oDatabase.CheckDB() Then
|
||||
'Make sure database is the latest version
|
||||
oDatabase.DatabaseUpgrade()
|
||||
mgrMonitorList.SyncMonitorLists(False)
|
||||
mgrMonitorList.SyncMonitorLists(oSettings.SyncFields, False)
|
||||
mgrCommon.ShowMessage(frmStartUpWizard_ExistingData, MsgBoxStyle.Information)
|
||||
End If
|
||||
End Sub
|
||||
@@ -98,16 +98,18 @@ Public Class frmStartUpWizard
|
||||
End Sub
|
||||
|
||||
Private Sub DownloadSettings()
|
||||
Dim sImportURL As String
|
||||
|
||||
If mgrCommon.IsUnix Then
|
||||
If mgrCommon.ShowMessage(frmGameManager_ConfirmUnixImportWarning, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
Exit Sub
|
||||
End If
|
||||
sImportURL = App_URLImportLinux
|
||||
Else
|
||||
sImportURL = App_URLImport
|
||||
End If
|
||||
|
||||
If mgrCommon.ShowMessage(frmStartUpWizard_ConfirmOfficialImport, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
If mgrMonitorList.DoImport(App_URLImport) Then
|
||||
If mgrMonitorList.DoImport(sImportURL) Then
|
||||
oGameData = mgrMonitorList.ReadList(mgrMonitorList.eListTypes.FullList)
|
||||
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists()
|
||||
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
@@ -122,7 +124,7 @@ Public Class frmStartUpWizard
|
||||
frm.GameData = oGameData
|
||||
frm.ShowDialog()
|
||||
LoadGameSettings()
|
||||
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists()
|
||||
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
|
||||
End Sub
|
||||
|
||||
Private Sub OpenMonitorList()
|
||||
@@ -131,7 +133,7 @@ Public Class frmStartUpWizard
|
||||
frm.DisableExternalFunctions = True
|
||||
frm.ShowDialog()
|
||||
LoadGameSettings()
|
||||
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists()
|
||||
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
|
||||
End Sub
|
||||
|
||||
Private Function ValidateBackupPath(ByVal strPath As String, ByRef sErrorMessage As String) As Boolean
|
||||
|
||||
Generated
+163
@@ -0,0 +1,163 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class frmSyncFields
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Form overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Required by the Windows Form Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Windows Form Designer
|
||||
'It can be modified using the Windows Form Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.grpFields = New System.Windows.Forms.GroupBox()
|
||||
Me.chkMonitorGame = New System.Windows.Forms.CheckBox()
|
||||
Me.chkIcon = New System.Windows.Forms.CheckBox()
|
||||
Me.chkVersion = New System.Windows.Forms.CheckBox()
|
||||
Me.chkCompany = New System.Windows.Forms.CheckBox()
|
||||
Me.chkGamePath = New System.Windows.Forms.CheckBox()
|
||||
Me.chkTimeStamp = New System.Windows.Forms.CheckBox()
|
||||
Me.btnCancel = New System.Windows.Forms.Button()
|
||||
Me.btnSave = New System.Windows.Forms.Button()
|
||||
Me.grpFields.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'grpFields
|
||||
'
|
||||
Me.grpFields.Controls.Add(Me.chkMonitorGame)
|
||||
Me.grpFields.Controls.Add(Me.chkIcon)
|
||||
Me.grpFields.Controls.Add(Me.chkVersion)
|
||||
Me.grpFields.Controls.Add(Me.chkCompany)
|
||||
Me.grpFields.Controls.Add(Me.chkGamePath)
|
||||
Me.grpFields.Controls.Add(Me.chkTimeStamp)
|
||||
Me.grpFields.Location = New System.Drawing.Point(12, 12)
|
||||
Me.grpFields.Name = "grpFields"
|
||||
Me.grpFields.Size = New System.Drawing.Size(195, 162)
|
||||
Me.grpFields.TabIndex = 0
|
||||
Me.grpFields.TabStop = False
|
||||
Me.grpFields.Text = "Available Fields"
|
||||
'
|
||||
'chkMonitorGame
|
||||
'
|
||||
Me.chkMonitorGame.AutoSize = True
|
||||
Me.chkMonitorGame.Location = New System.Drawing.Point(6, 134)
|
||||
Me.chkMonitorGame.Name = "chkMonitorGame"
|
||||
Me.chkMonitorGame.Size = New System.Drawing.Size(109, 17)
|
||||
Me.chkMonitorGame.TabIndex = 5
|
||||
Me.chkMonitorGame.Text = "Monitor this game"
|
||||
Me.chkMonitorGame.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkIcon
|
||||
'
|
||||
Me.chkIcon.AutoSize = True
|
||||
Me.chkIcon.Location = New System.Drawing.Point(6, 111)
|
||||
Me.chkIcon.Name = "chkIcon"
|
||||
Me.chkIcon.Size = New System.Drawing.Size(148, 17)
|
||||
Me.chkIcon.TabIndex = 4
|
||||
Me.chkIcon.Text = "Icon (Not Recommended)"
|
||||
Me.chkIcon.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkVersion
|
||||
'
|
||||
Me.chkVersion.AutoSize = True
|
||||
Me.chkVersion.Location = New System.Drawing.Point(6, 88)
|
||||
Me.chkVersion.Name = "chkVersion"
|
||||
Me.chkVersion.Size = New System.Drawing.Size(61, 17)
|
||||
Me.chkVersion.TabIndex = 3
|
||||
Me.chkVersion.Text = "Version"
|
||||
Me.chkVersion.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkCompany
|
||||
'
|
||||
Me.chkCompany.AutoSize = True
|
||||
Me.chkCompany.Location = New System.Drawing.Point(6, 65)
|
||||
Me.chkCompany.Name = "chkCompany"
|
||||
Me.chkCompany.Size = New System.Drawing.Size(70, 17)
|
||||
Me.chkCompany.TabIndex = 2
|
||||
Me.chkCompany.Text = "Company"
|
||||
Me.chkCompany.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkGamePath
|
||||
'
|
||||
Me.chkGamePath.AutoSize = True
|
||||
Me.chkGamePath.Location = New System.Drawing.Point(6, 42)
|
||||
Me.chkGamePath.Name = "chkGamePath"
|
||||
Me.chkGamePath.Size = New System.Drawing.Size(180, 17)
|
||||
Me.chkGamePath.TabIndex = 1
|
||||
Me.chkGamePath.Text = "Game Path (Not Recommended)"
|
||||
Me.chkGamePath.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkTimeStamp
|
||||
'
|
||||
Me.chkTimeStamp.AutoSize = True
|
||||
Me.chkTimeStamp.Location = New System.Drawing.Point(6, 19)
|
||||
Me.chkTimeStamp.Name = "chkTimeStamp"
|
||||
Me.chkTimeStamp.Size = New System.Drawing.Size(133, 17)
|
||||
Me.chkTimeStamp.TabIndex = 0
|
||||
Me.chkTimeStamp.Text = "Save multiple backups"
|
||||
Me.chkTimeStamp.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnCancel
|
||||
'
|
||||
Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
|
||||
Me.btnCancel.Location = New System.Drawing.Point(132, 180)
|
||||
Me.btnCancel.Name = "btnCancel"
|
||||
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnCancel.TabIndex = 2
|
||||
Me.btnCancel.Text = "&Cancel"
|
||||
Me.btnCancel.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnSave
|
||||
'
|
||||
Me.btnSave.DialogResult = System.Windows.Forms.DialogResult.OK
|
||||
Me.btnSave.Location = New System.Drawing.Point(52, 180)
|
||||
Me.btnSave.Name = "btnSave"
|
||||
Me.btnSave.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnSave.TabIndex = 1
|
||||
Me.btnSave.Text = "&Save"
|
||||
Me.btnSave.UseVisualStyleBackColor = True
|
||||
'
|
||||
'frmSyncFields
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(219, 211)
|
||||
Me.Controls.Add(Me.btnCancel)
|
||||
Me.Controls.Add(Me.btnSave)
|
||||
Me.Controls.Add(Me.grpFields)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||
Me.MaximizeBox = False
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmSyncFields"
|
||||
Me.ShowIcon = False
|
||||
Me.ShowInTaskbar = False
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
|
||||
Me.Text = "Optional Sync Fields"
|
||||
Me.grpFields.ResumeLayout(False)
|
||||
Me.grpFields.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents grpFields As GroupBox
|
||||
Friend WithEvents chkMonitorGame As CheckBox
|
||||
Friend WithEvents chkIcon As CheckBox
|
||||
Friend WithEvents chkVersion As CheckBox
|
||||
Friend WithEvents chkCompany As CheckBox
|
||||
Friend WithEvents chkGamePath As CheckBox
|
||||
Friend WithEvents chkTimeStamp As CheckBox
|
||||
Friend WithEvents btnCancel As Button
|
||||
Friend WithEvents btnSave As Button
|
||||
End Class
|
||||
@@ -117,7 +117,4 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="fbBrowser.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,115 @@
|
||||
Imports GBM.My.Resources
|
||||
|
||||
Public Class frmSyncFields
|
||||
Private eSyncFields As clsGame.eOptionalSyncFields
|
||||
|
||||
Public Property SyncFields As clsGame.eOptionalSyncFields
|
||||
Get
|
||||
Return eSyncFields
|
||||
End Get
|
||||
Set(value As clsGame.eOptionalSyncFields)
|
||||
eSyncFields = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Sub LoadForm()
|
||||
'Load fields
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.Company) = clsGame.eOptionalSyncFields.Company Then
|
||||
chkCompany.Checked = True
|
||||
End If
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.GamePath) = clsGame.eOptionalSyncFields.GamePath Then
|
||||
chkGamePath.Checked = True
|
||||
End If
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.Icon) = clsGame.eOptionalSyncFields.Icon Then
|
||||
chkIcon.Checked = True
|
||||
End If
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.MonitorGame) = clsGame.eOptionalSyncFields.MonitorGame Then
|
||||
chkMonitorGame.Checked = True
|
||||
End If
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.TimeStamp) = clsGame.eOptionalSyncFields.TimeStamp Then
|
||||
chkTimeStamp.Checked = True
|
||||
End If
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.Version) = clsGame.eOptionalSyncFields.Version Then
|
||||
chkVersion.Checked = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub SetForm()
|
||||
'Set Form Name
|
||||
Me.Text = frmSyncFields_FormName
|
||||
|
||||
'Set Form Text
|
||||
btnCancel.Text = frmSyncFields_btnCancel
|
||||
btnSave.Text = frmSyncFields_btnSave
|
||||
grpFields.Text = frmSyncFields_grpFields
|
||||
chkMonitorGame.Text = frmSyncFields_chkMonitorGame
|
||||
chkIcon.Text = frmSyncFields_chkIcon
|
||||
chkVersion.Text = frmSyncFields_chkVersion
|
||||
chkCompany.Text = frmSyncFields_chkCompany
|
||||
chkGamePath.Text = frmSyncFields_chkGamePath
|
||||
chkTimeStamp.Text = frmSyncFields_chkTimeStamp
|
||||
End Sub
|
||||
|
||||
Private Sub frmSyncFields_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
SetForm()
|
||||
LoadForm()
|
||||
End Sub
|
||||
|
||||
Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click
|
||||
Me.DialogResult = DialogResult.OK
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click
|
||||
Me.DialogResult = DialogResult.Cancel
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub chkTimeStamp_CheckedChanged(sender As Object, e As EventArgs) Handles chkTimeStamp.CheckedChanged
|
||||
If chkTimeStamp.Checked Then
|
||||
SyncFields = mgrCommon.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.TimeStamp)
|
||||
Else
|
||||
SyncFields = mgrCommon.RemoveSyncField(SyncFields, clsGame.eOptionalSyncFields.TimeStamp)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub chkGamePath_CheckedChanged(sender As Object, e As EventArgs) Handles chkGamePath.CheckedChanged
|
||||
If chkGamePath.Checked Then
|
||||
SyncFields = mgrCommon.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.GamePath)
|
||||
Else
|
||||
SyncFields = mgrCommon.RemoveSyncField(SyncFields, clsGame.eOptionalSyncFields.GamePath)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub chkCompany_CheckedChanged(sender As Object, e As EventArgs) Handles chkCompany.CheckedChanged
|
||||
If chkCompany.Checked Then
|
||||
SyncFields = mgrCommon.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.Company)
|
||||
Else
|
||||
SyncFields = mgrCommon.RemoveSyncField(SyncFields, clsGame.eOptionalSyncFields.Company)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub chkVersion_CheckedChanged(sender As Object, e As EventArgs) Handles chkVersion.CheckedChanged
|
||||
If chkVersion.Checked Then
|
||||
SyncFields = mgrCommon.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.Version)
|
||||
Else
|
||||
SyncFields = mgrCommon.RemoveSyncField(SyncFields, clsGame.eOptionalSyncFields.Version)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub chkIcon_CheckedChanged(sender As Object, e As EventArgs) Handles chkIcon.CheckedChanged
|
||||
If chkIcon.Checked Then
|
||||
SyncFields = mgrCommon.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.Icon)
|
||||
Else
|
||||
SyncFields = mgrCommon.RemoveSyncField(SyncFields, clsGame.eOptionalSyncFields.Icon)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub chkMonitorGame_CheckedChanged(sender As Object, e As EventArgs) Handles chkMonitorGame.CheckedChanged
|
||||
If chkMonitorGame.Checked Then
|
||||
SyncFields = mgrCommon.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.MonitorGame)
|
||||
Else
|
||||
SyncFields = mgrCommon.RemoveSyncField(SyncFields, clsGame.eOptionalSyncFields.MonitorGame)
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -195,6 +195,12 @@
|
||||
<DependentUpon>frmMain.vb</DependentUpon>
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\frmSyncFields.Designer.vb">
|
||||
<DependentUpon>frmSyncFields.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\frmSyncFields.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\frmTags.Designer.vb">
|
||||
<DependentUpon>frmTags.vb</DependentUpon>
|
||||
</Compile>
|
||||
@@ -273,6 +279,9 @@
|
||||
<DependentUpon>frmMain.vb</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\frmSyncFields.resx">
|
||||
<DependentUpon>frmSyncFields.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\frmTags.resx">
|
||||
<DependentUpon>frmTags.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -329,6 +338,12 @@
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="References\Mono.Data.Sqlite.dll" />
|
||||
<Content Include="Utilities\x64\7za.exe">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Utilities\x86\7za.exe">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="x86\sqlite3.dll" />
|
||||
<None Include="Resources\gbm.ico" />
|
||||
<Content Include="Resources\Admin.png" />
|
||||
@@ -342,24 +357,6 @@
|
||||
<Content Include="Resources\type.ico" />
|
||||
<Content Include="Resources\User.png" />
|
||||
<Content Include="x64\sqlite3.dll" />
|
||||
<Content Include="Utilities\x64\7za.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Utilities\x64\7za.exe">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Utilities\x64\7zxa.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Utilities\x86\7za.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Utilities\x86\7za.exe">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Utilities\x86\7zxa.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Include="Resources\Stopped.png" />
|
||||
<None Include="Resources\Detected.png" />
|
||||
<None Include="Resources\Ready.png" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
License for use and distribution
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Copyright (C) 1999-2015 Igor Pavlov.
|
||||
Copyright (C) 1999-2016 Igor Pavlov.
|
||||
|
||||
7-Zip Extra files are under the GNU LGPL license.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
GBM - Game Backup Monitor
|
||||
Copyright (C) 2015 Michael J. Seiferling
|
||||
Copyright (C) 2016 Michael J. Seiferling
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -16,4 +16,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Contact Information:
|
||||
|
||||
mseiferling@gmail.com
|
||||
gamebackupmonitor@gmail.com
|
||||
+42
-14
@@ -50,15 +50,15 @@ Public Class mgrBackup
|
||||
oItem.CheckSum = sCheckSum
|
||||
|
||||
'Save Remote Manifest
|
||||
If mgrManifest.DoManifestCheck(oItem.Name, mgrSQLite.Database.Remote) Then
|
||||
mgrManifest.DoManifestUpdate(oItem, mgrSQLite.Database.Remote)
|
||||
If mgrManifest.DoSpecificManifestCheck(oItem, mgrSQLite.Database.Remote) Then
|
||||
mgrManifest.DoManifestUpdateByID(oItem, mgrSQLite.Database.Remote)
|
||||
Else
|
||||
mgrManifest.DoManifestAdd(oItem, mgrSQLite.Database.Remote)
|
||||
End If
|
||||
|
||||
'Save Local Manifest
|
||||
If mgrManifest.DoManifestCheck(oItem.Name, mgrSQLite.Database.Local) Then
|
||||
mgrManifest.DoManifestUpdate(oItem, mgrSQLite.Database.Local)
|
||||
If mgrManifest.DoGlobalManifestCheck(oItem.Name, mgrSQLite.Database.Local) Then
|
||||
mgrManifest.DoManifestUpdateByName(oItem, mgrSQLite.Database.Local)
|
||||
Else
|
||||
mgrManifest.DoManifestAdd(oItem, mgrSQLite.Database.Local)
|
||||
End If
|
||||
@@ -107,6 +107,33 @@ Public Class mgrBackup
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub CheckOldBackups(ByVal oGame As clsGame)
|
||||
Dim oGameBackups As List(Of clsBackup) = mgrManifest.DoManifestGetByName(oGame.Name, mgrSQLite.Database.Remote)
|
||||
Dim oGameBackup As clsBackup
|
||||
Dim sOldBackup As String
|
||||
Dim iBackupCount As Integer = oGameBackups.Count
|
||||
Dim iDelCount As Integer
|
||||
|
||||
'If we've hit or exceeded the maximum backup limit
|
||||
If oGameBackups.Count >= oGame.BackupLimit Then
|
||||
'How many do we need to delete
|
||||
iDelCount = (oGameBackups.Count - oGame.BackupLimit) + 1
|
||||
|
||||
'Delete the oldest backup(s) (Manifest entry and backup file)
|
||||
For i = 1 To iDelCount
|
||||
oGameBackup = oGameBackups(oGameBackups.Count - i)
|
||||
sOldBackup = Settings.BackupFolder & Path.DirectorySeparatorChar & oGameBackup.FileName
|
||||
|
||||
mgrManifest.DoManifestDeletebyID(oGameBackup, mgrSQLite.Database.Remote)
|
||||
mgrManifest.DoManifestDeletebyID(oGameBackup, mgrSQLite.Database.Local)
|
||||
mgrCommon.DeleteFile(sOldBackup)
|
||||
mgrCommon.DeleteDirectoryByBackup(Settings.BackupFolder & Path.DirectorySeparatorChar, oGameBackup)
|
||||
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_BackupLimitExceeded, Path.GetFileName(sOldBackup)), False, ToolTipIcon.Info, True)
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub DoBackup(ByVal oBackupList As List(Of clsGame))
|
||||
Dim oGame As clsGame
|
||||
Dim bDoBackup As Boolean
|
||||
@@ -144,6 +171,7 @@ Public Class mgrBackup
|
||||
End If
|
||||
|
||||
If oGame.AppendTimeStamp Then
|
||||
CheckOldBackups(oGame)
|
||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & oGame.Name & sTimeStamp & ".7z"
|
||||
Else
|
||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & oGame.Name & ".7z"
|
||||
@@ -169,20 +197,16 @@ Public Class mgrBackup
|
||||
BuildFileList(sSavePath, oGame.ExcludeList, mgrPath.ExcludeFileLocation)
|
||||
|
||||
Try
|
||||
If Directory.Exists(sSavePath) Then
|
||||
If Settings.Is7zUtilityValid Then
|
||||
'Need to delete any prior archive if it exists, the 7za utility does not support overwriting or deleting existing archives.
|
||||
'If we let 7za update existing archives it will lead to excessive bloat with games that routinely add and remove files with many different file names.
|
||||
If File.Exists(sBackupFile) Then
|
||||
File.Delete(sBackupFile)
|
||||
End If
|
||||
|
||||
If Directory.Exists(sSavePath) Then
|
||||
'The Linux version of 7za doesn't support the new verbose parameters and fails out. Just split this up for now until we have a better solution.
|
||||
If mgrCommon.IsUnix Then
|
||||
prs7z.StartInfo.Arguments = "a -t7z -mx" & oSettings.CompressionLevel & " -i@""" & mgrPath.IncludeFileLocation & """ -x@""" & mgrPath.ExcludeFileLocation & """ """ & sBackupFile & """ -r"
|
||||
Else
|
||||
prs7z.StartInfo.Arguments = "a -bb1 -bt -t7z -mx" & oSettings.CompressionLevel & " -i@""" & mgrPath.IncludeFileLocation & """ -x@""" & mgrPath.ExcludeFileLocation & """ """ & sBackupFile & """ -r"
|
||||
End If
|
||||
prs7z.StartInfo.FileName = mgrPath.Utility7zLocation
|
||||
prs7z.StartInfo.Arguments = "a" & oSettings.Prepared7zArguments & "-t7z -mx" & oSettings.CompressionLevel & " -i@""" & mgrPath.IncludeFileLocation & """ -x@""" & mgrPath.ExcludeFileLocation & """ """ & sBackupFile & """ -r"
|
||||
prs7z.StartInfo.FileName = oSettings.Utility7zLocation
|
||||
prs7z.StartInfo.UseShellExecute = False
|
||||
prs7z.StartInfo.RedirectStandardOutput = True
|
||||
prs7z.StartInfo.CreateNoWindow = True
|
||||
@@ -207,6 +231,10 @@ Public Class mgrBackup
|
||||
End If
|
||||
End If
|
||||
prs7z.Dispose()
|
||||
Else
|
||||
RaiseEvent UpdateLog(App_Invalid7zDetected, True, ToolTipIcon.Error, True)
|
||||
bBackupCompleted = False
|
||||
End If
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorNoSavePath, oGame.Name), True, ToolTipIcon.Error, True)
|
||||
bBackupCompleted = False
|
||||
@@ -214,10 +242,10 @@ Public Class mgrBackup
|
||||
|
||||
'Write Main Manifest
|
||||
If bBackupCompleted Then
|
||||
If oSettings.CheckSum Then
|
||||
|
||||
'Generate checksum for new backup
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_GenerateHash, oGame.Name), False, ToolTipIcon.Info, True)
|
||||
sHash = mgrHash.Generate_SHA256_Hash(sBackupFile)
|
||||
End If
|
||||
|
||||
If Not DoManifestUpdate(oGame, sBackupFile, dTimeStamp, sHash) Then
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorManifestFailure, oGame.Name), True, ToolTipIcon.Error, True)
|
||||
|
||||
@@ -5,6 +5,23 @@ Imports System.Security.Principal
|
||||
|
||||
Public Class mgrCommon
|
||||
|
||||
'These need to be updated when upgrading the packaged 7z utility
|
||||
Private Shared sUtility64Hash As String = "05ACEE3BAC0C6C4E396116EF27B953F992DE8D28DD14D317977F45692304C318" 'v16.02 7za.exe x64
|
||||
Private Shared sUtility32Hash As String = "7AA7056DB4348229A288EEF49027B94C0D8D1A3C3AEDC6FA89B640334C7B37E9" 'v16.02 7za.exe x86
|
||||
|
||||
Public Shared ReadOnly Property UtilityHash As String
|
||||
Get
|
||||
Select Case mgrPath.ReleaseType
|
||||
Case 64
|
||||
Return sUtility64Hash
|
||||
Case 32
|
||||
Return sUtility32Hash
|
||||
Case Else
|
||||
Return sUtility32Hash
|
||||
End Select
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Shared ReadOnly Property BuildVersion As Integer
|
||||
Get
|
||||
Return My.Application.Info.Version.Build
|
||||
@@ -13,7 +30,7 @@ Public Class mgrCommon
|
||||
|
||||
Public Shared ReadOnly Property AppVersion As Integer
|
||||
Get
|
||||
Return (My.Application.Info.Version.Major * 100) + My.Application.Info.Version.Minor
|
||||
Return (My.Application.Info.Version.Major * 100) + (My.Application.Info.Version.Minor * 10) + My.Application.Info.Version.Build
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -140,6 +157,14 @@ Public Class mgrCommon
|
||||
oProcess.Start()
|
||||
End Sub
|
||||
|
||||
Public Shared Function SetSyncField(ByVal eSyncFields As clsGame.eOptionalSyncFields, ByVal eSyncField As clsGame.eOptionalSyncFields) As clsGame.eOptionalSyncFields
|
||||
Return eSyncFields Or eSyncField
|
||||
End Function
|
||||
|
||||
Public Shared Function RemoveSyncField(ByVal eSyncFields As clsGame.eOptionalSyncFields, ByVal eSyncField As clsGame.eOptionalSyncFields) As clsGame.eOptionalSyncFields
|
||||
Return eSyncFields And (Not eSyncField)
|
||||
End Function
|
||||
|
||||
'Delete file based on OS type
|
||||
Public Shared Sub DeleteFile(ByVal sPath As String, Optional ByVal bRecycle As Boolean = True)
|
||||
If File.Exists(sPath) Then
|
||||
@@ -166,6 +191,24 @@ Public Class mgrCommon
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Delete a sub-folder based on the provided backup information
|
||||
Public Shared Sub DeleteDirectoryByBackup(ByVal sBackupFolder As String, ByVal oBackup As clsBackup)
|
||||
Dim oDir As DirectoryInfo
|
||||
Dim sDir As String = sBackupFolder & oBackup.Name
|
||||
|
||||
'Delete sub directory if it's empty
|
||||
If oBackup.FileName.StartsWith(oBackup.Name & Path.DirectorySeparatorChar) Then
|
||||
If Directory.Exists(sDir) Then
|
||||
'Check if there's any sub-directories or files remaining
|
||||
oDir = New DirectoryInfo(sDir)
|
||||
If oDir.GetDirectories.Length = 0 And oDir.GetFiles.Length = 0 Then
|
||||
'Folder is empty, delete the empty sub-folder
|
||||
If Directory.Exists(sDir) Then DeleteDirectory(sDir)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Save string as text file
|
||||
Public Shared Sub SaveText(ByVal sText As String, ByVal sPath As String)
|
||||
Dim oStream As StreamWriter
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
Public Class mgrGlobals
|
||||
Public Shared LocalDatabaseHash As String = String.Empty
|
||||
Public Shared RemoteDatabaseHash As String = String.Empty
|
||||
End Class
|
||||
+157
-57
@@ -1,6 +1,37 @@
|
||||
Public Class mgrManifest
|
||||
|
||||
Public Shared Function ReadManifest(ByVal iSelectDB As mgrSQLite.Database) As SortedList
|
||||
Private Shared Function MapToObject(ByVal dr As DataRow) As clsBackup
|
||||
Dim oBackupItem As clsBackup
|
||||
|
||||
oBackupItem = New clsBackup
|
||||
oBackupItem.ID = CStr(dr("ManifestID"))
|
||||
oBackupItem.Name = CStr(dr("Name"))
|
||||
oBackupItem.FileName = CStr(dr("FileName"))
|
||||
oBackupItem.RestorePath = CStr(dr("RestorePath"))
|
||||
oBackupItem.AbsolutePath = CBool(dr("AbsolutePath"))
|
||||
oBackupItem.DateUpdated = mgrCommon.UnixToDate(dr("DateUpdated"))
|
||||
oBackupItem.UpdatedBy = CStr(dr("UpdatedBy"))
|
||||
If Not IsDBNull(dr("CheckSum")) Then oBackupItem.CheckSum = CStr(dr("CheckSum"))
|
||||
|
||||
Return oBackupItem
|
||||
End Function
|
||||
|
||||
Private Shared Function SetCoreParameters(ByVal oBackupItem As clsBackup) As Hashtable
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
hshParams.Add("ID", oBackupItem.ID)
|
||||
hshParams.Add("Name", oBackupItem.Name)
|
||||
hshParams.Add("FileName", oBackupItem.FileName)
|
||||
hshParams.Add("Path", oBackupItem.TruePath)
|
||||
hshParams.Add("AbsolutePath", oBackupItem.AbsolutePath)
|
||||
hshParams.Add("DateUpdated", oBackupItem.DateUpdatedUnix)
|
||||
hshParams.Add("UpdatedBy", oBackupItem.UpdatedBy)
|
||||
hshParams.Add("CheckSum", oBackupItem.CheckSum)
|
||||
|
||||
Return hshParams
|
||||
End Function
|
||||
|
||||
Public Shared Function ReadFullManifest(ByVal iSelectDB As mgrSQLite.Database) As SortedList
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim oData As DataSet
|
||||
Dim sSQL As String
|
||||
@@ -11,15 +42,26 @@
|
||||
oData = oDatabase.ReadParamData(sSQL, New Hashtable)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oBackupItem = New clsBackup
|
||||
oBackupItem.ID = CStr(dr("ManifestID"))
|
||||
oBackupItem.Name = CStr(dr("Name"))
|
||||
oBackupItem.FileName = CStr(dr("FileName"))
|
||||
oBackupItem.RestorePath = CStr(dr("RestorePath"))
|
||||
oBackupItem.AbsolutePath = CBool(dr("AbsolutePath"))
|
||||
oBackupItem.DateUpdated = mgrCommon.UnixToDate(dr("DateUpdated"))
|
||||
oBackupItem.UpdatedBy = CStr(dr("UpdatedBy"))
|
||||
If Not IsDBNull(dr("CheckSum")) Then oBackupItem.CheckSum = CStr(dr("CheckSum"))
|
||||
oBackupItem = MapToObject(dr)
|
||||
slList.Add(oBackupItem.ID, oBackupItem)
|
||||
Next
|
||||
|
||||
Return slList
|
||||
|
||||
End Function
|
||||
|
||||
Public Shared Function ReadLatestManifest(ByVal iSelectDB As mgrSQLite.Database) As SortedList
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim oData As DataSet
|
||||
Dim sSQL As String
|
||||
Dim oBackupItem As clsBackup
|
||||
Dim slList As New SortedList
|
||||
|
||||
sSQL = "SELECT ManifestID, Name, FileName, RestorePath, AbsolutePath, Max(DateUpdated) As DateUpdated, UpdatedBy, CheckSum FROM manifest GROUP BY Name ORDER By Name ASC"
|
||||
oData = oDatabase.ReadParamData(sSQL, New Hashtable)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oBackupItem = MapToObject(dr)
|
||||
slList.Add(oBackupItem.Name, oBackupItem)
|
||||
Next
|
||||
|
||||
@@ -27,7 +69,80 @@
|
||||
|
||||
End Function
|
||||
|
||||
Public Shared Function DoManifestCheck(ByVal sName As String, ByVal iSelectDB As mgrSQLite.Database) As Boolean
|
||||
Public Shared Function DoManifestGetByName(ByVal sName As String, ByVal iSelectDB As mgrSQLite.Database) As List(Of clsBackup)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim oData As DataSet
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
Dim oBackupItem As New clsBackup
|
||||
Dim oList As New List(Of clsBackup)
|
||||
|
||||
|
||||
sSQL = "SELECT * from manifest "
|
||||
sSQL &= "WHERE Name = @Name ORDER BY DateUpdated Desc"
|
||||
|
||||
hshParams.Add("Name", sName)
|
||||
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oBackupItem = MapToObject(dr)
|
||||
oList.Add(oBackupItem)
|
||||
Next
|
||||
|
||||
Return oList
|
||||
End Function
|
||||
|
||||
Public Shared Function DoManifestGetByID(ByVal sID As String, ByVal iSelectDB As mgrSQLite.Database) As clsBackup
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim oData As DataSet
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
Dim oBackupItem As New clsBackup
|
||||
Dim oList As New List(Of clsBackup)
|
||||
|
||||
sSQL = "SELECT * from manifest "
|
||||
sSQL &= "WHERE ManifestID = @ID ORDER BY DateUpdated Desc"
|
||||
|
||||
hshParams.Add("ID", sID)
|
||||
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oBackupItem = MapToObject(dr)
|
||||
Next
|
||||
|
||||
Return oBackupItem
|
||||
End Function
|
||||
|
||||
'This should only be used to update specific entries in the remote manifest
|
||||
Public Shared Function DoSpecificManifestCheck(ByRef oItem As clsBackup, ByVal iSelectDB As mgrSQLite.Database) As Boolean
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim oData As DataSet
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
sSQL = "SELECT * from manifest "
|
||||
sSQL &= "WHERE Name = @Name AND FileName = @FileName"
|
||||
|
||||
hshParams.Add("Name", oItem.Name)
|
||||
hshParams.Add("FileName", oItem.FileName)
|
||||
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
If oData.Tables(0).Rows.Count > 0 Then
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oItem.ID = CStr(dr("ManifestID"))
|
||||
Next
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
|
||||
End Function
|
||||
|
||||
'This should only be used to update entries in the local manifest
|
||||
Public Shared Function DoGlobalManifestCheck(ByVal sName As String, ByVal iSelectDB As mgrSQLite.Database) As Boolean
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim oData As DataSet
|
||||
Dim sSQL As String
|
||||
@@ -48,12 +163,11 @@
|
||||
|
||||
End Function
|
||||
|
||||
Public Shared Function DoManifestGetByName(ByVal sName As String, ByVal iSelectDB As mgrSQLite.Database) As clsBackup
|
||||
Public Shared Function DoManifestNameCheck(ByVal sName As String, ByVal iSelectDB As mgrSQLite.Database) As Boolean
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim oData As DataSet
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
Dim oBackupItem As New clsBackup
|
||||
|
||||
sSQL = "SELECT * from manifest "
|
||||
sSQL &= "WHERE Name = @Name"
|
||||
@@ -62,82 +176,55 @@
|
||||
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oBackupItem = New clsBackup
|
||||
oBackupItem.ID = CStr(dr("ManifestID"))
|
||||
oBackupItem.Name = CStr(dr("Name"))
|
||||
oBackupItem.FileName = CStr(dr("FileName"))
|
||||
oBackupItem.RestorePath = CStr(dr("RestorePath"))
|
||||
oBackupItem.AbsolutePath = CBool(dr("AbsolutePath"))
|
||||
oBackupItem.DateUpdated = mgrCommon.UnixToDate(dr("DateUpdated"))
|
||||
oBackupItem.UpdatedBy = CStr(dr("UpdatedBy"))
|
||||
If Not IsDBNull(dr("CheckSum")) Then oBackupItem.CheckSum = CStr(dr("CheckSum"))
|
||||
Next
|
||||
If oData.Tables(0).Rows.Count > 0 Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
|
||||
Return oBackupItem
|
||||
End Function
|
||||
|
||||
Public Shared Sub DoManifestAdd(ByVal oBackupItem As clsBackup, ByVal iSelectDB As mgrSQLite.Database)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
Dim hshParams As Hashtable
|
||||
|
||||
sSQL = "INSERT OR REPLACE INTO manifest VALUES (@ID, @Name, @FileName, @Path, @AbsolutePath, @DateUpdated, @UpdatedBy, @CheckSum)"
|
||||
sSQL = "INSERT INTO manifest VALUES (@ID, @Name, @FileName, @Path, @AbsolutePath, @DateUpdated, @UpdatedBy, @CheckSum)"
|
||||
|
||||
hshParams.Add("ID", oBackupItem.ID)
|
||||
hshParams.Add("Name", oBackupItem.Name)
|
||||
hshParams.Add("FileName", oBackupItem.FileName)
|
||||
hshParams.Add("Path", oBackupItem.TruePath)
|
||||
hshParams.Add("AbsolutePath", oBackupItem.AbsolutePath)
|
||||
hshParams.Add("DateUpdated", oBackupItem.DateUpdatedUnix)
|
||||
hshParams.Add("UpdatedBy", oBackupItem.UpdatedBy)
|
||||
hshParams.Add("CheckSum", oBackupItem.CheckSum)
|
||||
hshParams = SetCoreParameters(oBackupItem)
|
||||
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
End Sub
|
||||
|
||||
Public Shared Sub DoManifestUpdate(ByVal oBackupItem As clsBackup, ByVal iSelectDB As mgrSQLite.Database)
|
||||
Public Shared Sub DoManifestUpdateByName(ByVal oBackupItem As clsBackup, ByVal iSelectDB As mgrSQLite.Database)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
Dim hshParams As Hashtable
|
||||
|
||||
sSQL = "UPDATE manifest SET Name = @Name, FileName = @FileName, RestorePath = @Path, AbsolutePath = @AbsolutePath, "
|
||||
sSQL &= "DateUpdated = @DateUpdated, UpdatedBy = @UpdatedBy, CheckSum = @CheckSum WHERE Name = @QueryName"
|
||||
|
||||
hshParams.Add("Name", oBackupItem.Name)
|
||||
hshParams.Add("FileName", oBackupItem.FileName)
|
||||
hshParams.Add("Path", oBackupItem.TruePath)
|
||||
hshParams.Add("AbsolutePath", oBackupItem.AbsolutePath)
|
||||
hshParams.Add("DateUpdated", oBackupItem.DateUpdatedUnix)
|
||||
hshParams.Add("UpdatedBy", oBackupItem.UpdatedBy)
|
||||
hshParams.Add("CheckSum", oBackupItem.CheckSum)
|
||||
hshParams = SetCoreParameters(oBackupItem)
|
||||
hshParams.Add("QueryName", oBackupItem.Name)
|
||||
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
End Sub
|
||||
|
||||
Public Shared Sub DoManifestNameUpdate(ByVal sOriginalName As String, ByVal oBackupItem As clsBackup, ByVal iSelectDB As mgrSQLite.Database)
|
||||
Public Shared Sub DoManifestUpdateByID(ByVal oBackupItem As clsBackup, ByVal iSelectDB As mgrSQLite.Database)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
Dim hshParams As Hashtable
|
||||
|
||||
sSQL = "UPDATE manifest SET Name = @Name, FileName = @FileName, RestorePath = @Path, AbsolutePath = @AbsolutePath, "
|
||||
sSQL &= "DateUpdated = @DateUpdated, UpdatedBy = @UpdatedBy, CheckSum = @CheckSum WHERE Name = @QueryName"
|
||||
sSQL &= "DateUpdated = @DateUpdated, UpdatedBy = @UpdatedBy, CheckSum = @CheckSum WHERE ManifestID = @QueryID"
|
||||
|
||||
hshParams.Add("Name", oBackupItem.Name)
|
||||
hshParams.Add("FileName", oBackupItem.FileName)
|
||||
hshParams.Add("Path", oBackupItem.TruePath)
|
||||
hshParams.Add("AbsolutePath", oBackupItem.AbsolutePath)
|
||||
hshParams.Add("DateUpdated", oBackupItem.DateUpdatedUnix)
|
||||
hshParams.Add("UpdatedBy", oBackupItem.UpdatedBy)
|
||||
hshParams.Add("CheckSum", oBackupItem.CheckSum)
|
||||
hshParams.Add("QueryName", sOriginalName)
|
||||
hshParams = SetCoreParameters(oBackupItem)
|
||||
hshParams.Add("QueryID", oBackupItem.ID)
|
||||
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
|
||||
End Sub
|
||||
|
||||
Public Shared Sub DoManifestDelete(ByVal oBackupItem As clsBackup, ByVal iSelectDB As mgrSQLite.Database)
|
||||
Public Shared Sub DoManifestDeletebyName(ByVal oBackupItem As clsBackup, ByVal iSelectDB As mgrSQLite.Database)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
@@ -150,6 +237,19 @@
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
End Sub
|
||||
|
||||
Public Shared Sub DoManifestDeletebyID(ByVal oBackupItem As clsBackup, ByVal iSelectDB As mgrSQLite.Database)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
sSQL = "DELETE FROM manifest "
|
||||
sSQL &= "WHERE ManifestID = @ID"
|
||||
|
||||
hshParams.Add("ID", oBackupItem.ID)
|
||||
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
End Sub
|
||||
|
||||
Public Shared Sub DoManifestHashWipe()
|
||||
Dim oLocalDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim oRemoteDatabase As New mgrSQLite(mgrSQLite.Database.Remote)
|
||||
|
||||
+470
-446
@@ -10,336 +10,9 @@ Public Class mgrMonitorList
|
||||
|
||||
Public Shared Event UpdateLog(sLogUpdate As String, bTrayUpdate As Boolean, objIcon As System.Windows.Forms.ToolTipIcon, bTimeStamp As Boolean)
|
||||
|
||||
Public Shared Sub HandleBackupLocationChange()
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Remote)
|
||||
Dim iGameCount As Integer
|
||||
Private Shared Function MapToObject(ByVal dr As DataRow) As clsGame
|
||||
Dim oGame As New clsGame
|
||||
|
||||
'Check if a remote database already exists in the new backup location
|
||||
If oDatabase.CheckDB() Then
|
||||
'Make sure database is the latest version
|
||||
oDatabase.DatabaseUpgrade()
|
||||
|
||||
'See if the remote database is empty
|
||||
iGameCount = mgrMonitorList.ReadList(eListTypes.FullList, mgrSQLite.Database.Remote).Count
|
||||
|
||||
'If the remote database actually contains a list, then ask what to do
|
||||
If iGameCount > 0 Then
|
||||
If mgrCommon.ShowMessage(mgrMonitorList_ConfirmExistingData, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
mgrMonitorList.SyncMonitorLists()
|
||||
Else
|
||||
mgrMonitorList.SyncMonitorLists(False)
|
||||
End If
|
||||
Else
|
||||
mgrMonitorList.SyncMonitorLists()
|
||||
End If
|
||||
Else
|
||||
mgrMonitorList.SyncMonitorLists()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Shared Sub ExportMonitorList(ByVal sLocation As String)
|
||||
Dim oList As List(Of Game)
|
||||
Dim bSuccess As Boolean = False
|
||||
Dim oTagFilters As New List(Of clsTag)
|
||||
Dim oStringFilters As New Hashtable
|
||||
Dim eCurrentFilter As frmFilter.eFilterType = frmFilter.eFilterType.NoFilter
|
||||
|
||||
If mgrCommon.ShowMessage(mgrMonitorList_ConfirmApplyFilter, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
Dim frm As New frmFilter
|
||||
frm.ShowDialog()
|
||||
oTagFilters = frm.TagFilters
|
||||
oStringFilters = frm.StringFilters
|
||||
eCurrentFilter = frm.FilterType
|
||||
End If
|
||||
|
||||
oList = ReadListForExport(oTagFilters, oStringFilters, eCurrentFilter)
|
||||
|
||||
bSuccess = mgrXML.SerializeAndExport(oList, sLocation)
|
||||
|
||||
If bSuccess Then
|
||||
mgrCommon.ShowMessage(mgrMonitorList_ExportComplete, oList.Count, MsgBoxStyle.Information)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Shared Sub DoListAddUpdateSync(ByVal hshGames As Hashtable, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As Hashtable
|
||||
Dim oParamList As New List(Of Hashtable)
|
||||
|
||||
sSQL = "INSERT OR REPLACE INTO monitorlist (MonitorID, Name, Process, Path, AbsolutePath, FolderSave, FileType, TimeStamp, ExcludeList, ProcessPath, Icon, Hours, Version, Company, Enabled, MonitorOnly) "
|
||||
sSQL &= "VALUES (@ID, @Name, @Process, @Path, @AbsolutePath, @FolderSave, @FileType, "
|
||||
sSQL &= "@TimeStamp, @ExcludeList, (SELECT ProcessPath FROM monitorlist WHERE MonitorID=@ID), "
|
||||
sSQL &= "(SELECT Icon FROM monitorlist WHERE MonitorID=@ID), @Hours, (SELECT Version FROM monitorlist WHERE MonitorID=@ID), "
|
||||
sSQL &= "(SELECT Company FROM monitorlist WHERE MonitorID=@ID), COALESCE((SELECT Enabled FROM monitorlist WHERE MonitorID=@ID),1), COALESCE((SELECT MonitorOnly FROM monitorlist WHERE MonitorID=@ID),0));"
|
||||
|
||||
For Each oGame As clsGame In hshGames.Values
|
||||
hshParams = New Hashtable
|
||||
|
||||
'Parameters
|
||||
hshParams.Add("ID", oGame.ID)
|
||||
hshParams.Add("Name", oGame.Name)
|
||||
hshParams.Add("Process", oGame.TrueProcess)
|
||||
hshParams.Add("Path", oGame.TruePath)
|
||||
hshParams.Add("AbsolutePath", oGame.AbsolutePath)
|
||||
hshParams.Add("FolderSave", oGame.FolderSave)
|
||||
hshParams.Add("FileType", oGame.FileType)
|
||||
hshParams.Add("TimeStamp", oGame.AppendTimeStamp)
|
||||
hshParams.Add("ExcludeList", oGame.ExcludeList)
|
||||
hshParams.Add("Hours", oGame.Hours)
|
||||
|
||||
oParamList.Add(hshParams)
|
||||
Next
|
||||
|
||||
oDatabase.RunMassParamQuery(sSQL, oParamList)
|
||||
|
||||
End Sub
|
||||
|
||||
Public Shared Sub DoListDeleteSync(ByVal hshGames As Hashtable, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As Hashtable
|
||||
Dim oParamList As New List(Of Hashtable)
|
||||
|
||||
sSQL = "DELETE FROM gametags "
|
||||
sSQL &= "WHERE MonitorID = @MonitorID;"
|
||||
sSQL &= "DELETE FROM monitorlist "
|
||||
sSQL &= "WHERE Name = @Name AND Process= @Process;"
|
||||
|
||||
For Each oGame As clsGame In hshGames.Values
|
||||
hshParams = New Hashtable
|
||||
hshParams.Add("MonitorID", oGame.ID)
|
||||
hshParams.Add("Name", oGame.Name)
|
||||
hshParams.Add("Process", oGame.TrueProcess)
|
||||
oParamList.Add(hshParams)
|
||||
Next
|
||||
|
||||
oDatabase.RunMassParamQuery(sSQL, oParamList)
|
||||
End Sub
|
||||
|
||||
Public Shared Sub SyncMonitorLists(Optional ByVal bToRemote As Boolean = True)
|
||||
Dim hshCompareFrom As Hashtable
|
||||
Dim hshCompareTo As Hashtable
|
||||
Dim hshSyncItems As Hashtable
|
||||
Dim hshDeleteItems As Hashtable
|
||||
Dim oFromItem As clsGame
|
||||
Dim oToItem As clsGame
|
||||
Dim iChanges As Integer
|
||||
|
||||
Cursor.Current = Cursors.WaitCursor
|
||||
|
||||
If bToRemote Then
|
||||
RaiseEvent UpdateLog(mgrMonitorList_SyncToMaster, False, ToolTipIcon.Info, True)
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrMonitorList_SyncFromMaster, False, ToolTipIcon.Info, True)
|
||||
End If
|
||||
|
||||
'Add / Update Sync
|
||||
If bToRemote Then
|
||||
hshCompareFrom = ReadList(eListTypes.FullList, mgrSQLite.Database.Local)
|
||||
hshCompareTo = ReadList(eListTypes.FullList, mgrSQLite.Database.Remote)
|
||||
Else
|
||||
hshCompareFrom = ReadList(eListTypes.FullList, mgrSQLite.Database.Remote)
|
||||
hshCompareTo = ReadList(eListTypes.FullList, mgrSQLite.Database.Local)
|
||||
End If
|
||||
|
||||
hshSyncItems = hshCompareFrom.Clone
|
||||
|
||||
For Each oFromItem In hshCompareFrom.Values
|
||||
If hshCompareTo.Contains(oFromItem.CompoundKey) Then
|
||||
oToItem = DirectCast(hshCompareTo(oFromItem.CompoundKey), clsGame)
|
||||
If oFromItem.SyncEquals(oToItem) Then
|
||||
hshSyncItems.Remove(oFromItem.CompoundKey)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If bToRemote Then
|
||||
DoListAddUpdateSync(hshSyncItems, mgrSQLite.Database.Remote)
|
||||
|
||||
Else
|
||||
DoListAddUpdateSync(hshSyncItems, mgrSQLite.Database.Local)
|
||||
End If
|
||||
|
||||
'Sync Tags
|
||||
iChanges = mgrTags.SyncTags(bToRemote)
|
||||
iChanges += mgrGameTags.SyncGameTags(bToRemote)
|
||||
|
||||
'Delete Sync
|
||||
If bToRemote Then
|
||||
hshCompareFrom = ReadList(eListTypes.FullList, mgrSQLite.Database.Local)
|
||||
hshCompareTo = ReadList(eListTypes.FullList, mgrSQLite.Database.Remote)
|
||||
Else
|
||||
hshCompareFrom = ReadList(eListTypes.FullList, mgrSQLite.Database.Remote)
|
||||
hshCompareTo = ReadList(eListTypes.FullList, mgrSQLite.Database.Local)
|
||||
End If
|
||||
|
||||
hshDeleteItems = hshCompareTo.Clone
|
||||
|
||||
For Each oToItem In hshCompareTo.Values
|
||||
If hshCompareFrom.Contains(oToItem.CompoundKey) Then
|
||||
oFromItem = DirectCast(hshCompareFrom(oToItem.CompoundKey), clsGame)
|
||||
If oToItem.MinimalEquals(oFromItem) Then
|
||||
hshDeleteItems.Remove(oToItem.CompoundKey)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If bToRemote Then
|
||||
DoListDeleteSync(hshDeleteItems, mgrSQLite.Database.Remote)
|
||||
Else
|
||||
DoListDeleteSync(hshDeleteItems, mgrSQLite.Database.Local)
|
||||
End If
|
||||
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrMonitorList_SyncChanges, (hshDeleteItems.Count + hshSyncItems.Count + iChanges).ToString), False, ToolTipIcon.Info, True)
|
||||
Cursor.Current = Cursors.Default
|
||||
Application.DoEvents()
|
||||
End Sub
|
||||
|
||||
Private Shared Sub ImportMonitorList(ByVal sLocation As String, Optional ByVal bWebRead As Boolean = False)
|
||||
Dim hshCompareFrom As Hashtable
|
||||
Dim hshCompareTo As Hashtable
|
||||
Dim hshSyncItems As Hashtable
|
||||
Dim oFromItem As clsGame
|
||||
Dim oToItem As clsGame
|
||||
|
||||
Cursor.Current = Cursors.WaitCursor
|
||||
|
||||
'Add / Update Sync
|
||||
hshCompareFrom = mgrXML.ReadMonitorList(sLocation, bWebRead)
|
||||
hshCompareTo = ReadList(eListTypes.FullList, mgrSQLite.Database.Local)
|
||||
|
||||
hshSyncItems = hshCompareFrom.Clone
|
||||
|
||||
For Each oFromItem In hshCompareFrom.Values
|
||||
If hshCompareTo.Contains(oFromItem.CompoundKey) Then
|
||||
oToItem = DirectCast(hshCompareTo(oFromItem.CompoundKey), clsGame)
|
||||
If oFromItem.CoreEquals(oToItem) Then
|
||||
hshSyncItems.Remove(oFromItem.CompoundKey)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
Cursor.Current = Cursors.Default
|
||||
|
||||
If hshSyncItems.Count > 0 Then
|
||||
Dim frm As New frmAdvancedImport
|
||||
frm.ImportData = hshSyncItems
|
||||
If frm.ShowDialog() = DialogResult.OK Then
|
||||
Cursor.Current = Cursors.WaitCursor
|
||||
|
||||
DoListAddUpdateSync(frm.FinalData)
|
||||
mgrTags.DoTagAddImport(frm.FinalData)
|
||||
|
||||
Cursor.Current = Cursors.Default
|
||||
mgrCommon.ShowMessage(mgrMonitorList_ImportComplete, MsgBoxStyle.Information)
|
||||
End If
|
||||
Else
|
||||
mgrCommon.ShowMessage(mgrMonitorList_ImportNothing, MsgBoxStyle.Information)
|
||||
End If
|
||||
|
||||
Application.DoEvents()
|
||||
End Sub
|
||||
|
||||
Public Shared Function DoImport(ByVal sPath As String) As Boolean
|
||||
If (sPath.IndexOf("http://", 0, StringComparison.CurrentCultureIgnoreCase) > -1) Or _
|
||||
(sPath.IndexOf("https://", 0, StringComparison.CurrentCultureIgnoreCase) > -1) Then
|
||||
If mgrCommon.CheckAddress(sPath) Then
|
||||
ImportMonitorList(sPath, True)
|
||||
Return True
|
||||
Else
|
||||
mgrCommon.ShowMessage(mgrMonitorList_WebNoReponse, sPath, MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
End If
|
||||
Else
|
||||
If File.Exists(sPath) Then
|
||||
ImportMonitorList(sPath)
|
||||
Return True
|
||||
Else
|
||||
mgrCommon.ShowMessage(mgrMonitorList_FileNotFound, sPath, MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
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 iCounter As Integer = 0
|
||||
|
||||
Select Case eFilterType
|
||||
Case frmFilter.eFilterType.NoFilter
|
||||
sSQL = "SELECT MonitorID, Name, Process, Path, AbsolutePath, FolderSave, FileType, TimeStamp, ExcludeList, ProcessPath, Icon, Hours, Version, Company, Enabled, MonitorOnly FROM monitorlist ORDER BY Name Asc"
|
||||
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 FROM monitorlist"
|
||||
|
||||
If hshStringFilters.Count > 0 Then
|
||||
sSQL &= " WHERE ("
|
||||
For Each de As DictionaryEntry In hshStringFilters
|
||||
sSQL &= de.Key & " LIKE @" & de.Key
|
||||
hshParams.Add(de.Key, "%" & de.Value.ToString & "%")
|
||||
iCounter += 1
|
||||
If iCounter <> hshStringFilters.Count Then
|
||||
Select Case eFilterType
|
||||
Case frmFilter.eFilterType.FieldAnd
|
||||
sSQL &= " AND "
|
||||
Case frmFilter.eFilterType.FieldOr
|
||||
sSQL &= " OR "
|
||||
End Select
|
||||
End If
|
||||
|
||||
Next
|
||||
sSQL &= ")"
|
||||
End If
|
||||
sSQL &= " ORDER BY Name Asc"
|
||||
Case frmFilter.eFilterType.AnyTag
|
||||
sSQL = "SELECT DISTINCT MonitorID, Name, Process, Path, AbsolutePath, FolderSave, FileType, TimeStamp, ExcludeList, ProcessPath, Icon, Hours, Version, Company, Enabled, MonitorOnly FROM monitorlist "
|
||||
sSQL &= "NATURAL JOIN gametags WHERE gametags.TagID IN ("
|
||||
|
||||
For Each oTag As clsTag In oTagFilters
|
||||
sSQL &= "@TagID" & iCounter & ","
|
||||
hshParams.Add("TagID" & iCounter, oTag.ID)
|
||||
iCounter += 1
|
||||
Next
|
||||
|
||||
sSQL = sSQL.TrimEnd(",")
|
||||
sSQL &= ") ORDER BY Name Asc"
|
||||
Case frmFilter.eFilterType.AllTags
|
||||
sSQL = "SELECT MonitorID, Name, Process, Path, AbsolutePath, FolderSave, FileType, TimeStamp, ExcludeList, ProcessPath, Icon, Hours, Version, Company, Enabled, MonitorOnly FROM monitorlist WHERE MonitorID IN "
|
||||
|
||||
For Each oTag As clsTag In oTagFilters
|
||||
sSQL &= "(SELECT MonitorID FROM gametags WHERE monitorlist.MonitorID = gametags.MonitorID And TagID = @TagID" & iCounter & ")"
|
||||
If iCounter <> oTagFilters.Count - 1 Then
|
||||
sSQL &= " AND MonitorID IN "
|
||||
End If
|
||||
hshParams.Add("TagID" & iCounter, oTag.ID)
|
||||
iCounter += 1
|
||||
Next
|
||||
|
||||
sSQL &= " ORDER BY Name Asc"
|
||||
Case frmFilter.eFilterType.NoTags
|
||||
sSQL = "SELECT MonitorID, Name, Process, Path, AbsolutePath, FolderSave, FileType, TimeStamp, ExcludeList, ProcessPath, Icon, Hours, Version, Company, Enabled, MonitorOnly FROM monitorlist WHERE MonitorID NOT IN (SELECT MonitorID FROM gametags) ORDER BY Name Asc"
|
||||
End Select
|
||||
|
||||
Return sSQL
|
||||
|
||||
End Function
|
||||
|
||||
Public Shared Function ReadFilteredList(ByVal oTagFilters As List(Of clsTag), ByVal hshStringFilters As Hashtable, eFilterType As frmFilter.eFilterType, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local) As Hashtable
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim oData As DataSet
|
||||
Dim sSQL As String = String.Empty
|
||||
Dim hshList As New Hashtable
|
||||
Dim oGame As clsGame
|
||||
Dim hshParams As New Hashtable
|
||||
Dim iCounter As Integer = 0
|
||||
|
||||
sSQL = BuildFilterQuery(oTagFilters, hshStringFilters, eFilterType, hshParams)
|
||||
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oGame = New clsGame
|
||||
oGame.ID = CStr(dr("MonitorID"))
|
||||
oGame.Name = CStr(dr("Name"))
|
||||
oGame.ProcessName = CStr(dr("Process"))
|
||||
@@ -356,41 +29,35 @@ Public Class mgrMonitorList
|
||||
If Not IsDBNull(dr("Company")) Then oGame.Company = CStr(dr("Company"))
|
||||
oGame.Enabled = CBool(dr("Enabled"))
|
||||
oGame.MonitorOnly = CBool(dr("MonitorOnly"))
|
||||
oGame.BackupLimit = CInt(dr("BackupLimit"))
|
||||
oGame.CleanFolder = CBool(dr("CleanFolder"))
|
||||
|
||||
hshList.Add(oGame.ID, oGame)
|
||||
Next
|
||||
|
||||
Return hshList
|
||||
Return oGame
|
||||
End Function
|
||||
|
||||
Public Shared Function ReadListForExport(ByVal oTagFilters As List(Of clsTag), ByVal hshStringFilters As Hashtable, ByVal eFilterType As frmFilter.eFilterType, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local) As List(Of Game)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim oData As DataSet
|
||||
Dim sSQL As String = String.Empty
|
||||
Dim sID As String
|
||||
Dim oList As New List(Of Game)
|
||||
Dim oGame As Game
|
||||
Private Shared Function SetCoreParameters(ByVal oGame As clsGame) As Hashtable
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
sSQL = BuildFilterQuery(oTagFilters, hshStringFilters, eFilterType, hshParams)
|
||||
hshParams.Add("ID", oGame.ID)
|
||||
hshParams.Add("Name", oGame.Name)
|
||||
hshParams.Add("Process", oGame.TrueProcess)
|
||||
hshParams.Add("Path", oGame.TruePath)
|
||||
hshParams.Add("AbsolutePath", oGame.AbsolutePath)
|
||||
hshParams.Add("FolderSave", oGame.FolderSave)
|
||||
hshParams.Add("FileType", oGame.FileType)
|
||||
hshParams.Add("TimeStamp", oGame.AppendTimeStamp)
|
||||
hshParams.Add("ExcludeList", oGame.ExcludeList)
|
||||
hshParams.Add("ProcessPath", oGame.ProcessPath)
|
||||
hshParams.Add("Icon", oGame.Icon)
|
||||
hshParams.Add("Hours", oGame.Hours)
|
||||
hshParams.Add("Version", oGame.Version)
|
||||
hshParams.Add("Company", oGame.Company)
|
||||
hshParams.Add("Enabled", oGame.Enabled)
|
||||
hshParams.Add("MonitorOnly", oGame.MonitorOnly)
|
||||
hshParams.Add("BackupLimit", oGame.BackupLimit)
|
||||
hshParams.Add("CleanFolder", oGame.CleanFolder)
|
||||
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oGame = New Game
|
||||
sID = CStr(dr("MonitorID"))
|
||||
oGame.Name = CStr(dr("Name"))
|
||||
oGame.ProcessName = CStr(dr("Process"))
|
||||
If Not IsDBNull(dr("Path")) Then oGame.Path = CStr(dr("Path"))
|
||||
oGame.AbsolutePath = CBool(dr("AbsolutePath"))
|
||||
oGame.FolderSave = CBool(dr("FolderSave"))
|
||||
If Not IsDBNull(dr("FileType")) Then oGame.FileType = CStr(dr("FileType"))
|
||||
If Not IsDBNull(dr("ExcludeList")) Then oGame.ExcludeList = CStr(dr("ExcludeList"))
|
||||
oGame.Tags = mgrGameTags.GetTagsByGameForExport(sID)
|
||||
oList.Add(oGame)
|
||||
Next
|
||||
|
||||
Return oList
|
||||
Return hshParams
|
||||
End Function
|
||||
|
||||
Public Shared Function ReadList(ByVal eListType As eListTypes, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local) As Hashtable
|
||||
@@ -405,24 +72,7 @@ Public Class mgrMonitorList
|
||||
oData = oDatabase.ReadParamData(sSQL, New Hashtable)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oGame = New clsGame
|
||||
oGame.ID = CStr(dr("MonitorID"))
|
||||
oGame.Name = CStr(dr("Name"))
|
||||
oGame.ProcessName = CStr(dr("Process"))
|
||||
If Not IsDBNull(dr("Path")) Then oGame.Path = CStr(dr("Path"))
|
||||
oGame.AbsolutePath = CBool(dr("AbsolutePath"))
|
||||
oGame.FolderSave = CBool(dr("FolderSave"))
|
||||
If Not IsDBNull(dr("FileType")) Then oGame.FileType = CStr(dr("FileType"))
|
||||
oGame.AppendTimeStamp = CBool(dr("TimeStamp"))
|
||||
If Not IsDBNull(dr("ExcludeList")) Then oGame.ExcludeList = CStr(dr("ExcludeList"))
|
||||
If Not IsDBNull(dr("ProcessPath")) Then oGame.ProcessPath = CStr(dr("ProcessPath"))
|
||||
If Not IsDBNull(dr("Icon")) Then oGame.Icon = CStr(dr("Icon"))
|
||||
oGame.Hours = CDbl(dr("Hours"))
|
||||
If Not IsDBNull(dr("Version")) Then oGame.Version = CStr(dr("Version"))
|
||||
If Not IsDBNull(dr("Company")) Then oGame.Company = CStr(dr("Company"))
|
||||
oGame.Enabled = CBool(dr("Enabled"))
|
||||
oGame.MonitorOnly = CBool(dr("MonitorOnly"))
|
||||
|
||||
oGame = MapToObject(dr)
|
||||
Select Case eListType
|
||||
Case eListTypes.FullList
|
||||
'Don't wrap this, if it fails there's a problem with the database
|
||||
@@ -443,28 +93,13 @@ Public Class mgrMonitorList
|
||||
Public Shared Sub DoListAdd(ByVal oGame As clsGame, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
Dim hshParams As Hashtable
|
||||
|
||||
sSQL = "INSERT INTO monitorlist VALUES (@ID, @Name, @Process, @Path, @AbsolutePath, @FolderSave, @FileType, @TimeStamp, "
|
||||
sSQL &= "@ExcludeList, @ProcessPath, @Icon, @Hours, @Version, @Company, @Enabled, @MonitorOnly)"
|
||||
sSQL &= "@ExcludeList, @ProcessPath, @Icon, @Hours, @Version, @Company, @Enabled, @MonitorOnly, @BackupLimit, @CleanFolder)"
|
||||
|
||||
'Parameters
|
||||
hshParams.Add("ID", oGame.ID)
|
||||
hshParams.Add("Name", oGame.Name)
|
||||
hshParams.Add("Process", oGame.TrueProcess)
|
||||
hshParams.Add("Path", oGame.TruePath)
|
||||
hshParams.Add("AbsolutePath", oGame.AbsolutePath)
|
||||
hshParams.Add("FolderSave", oGame.FolderSave)
|
||||
hshParams.Add("FileType", oGame.FileType)
|
||||
hshParams.Add("TimeStamp", oGame.AppendTimeStamp)
|
||||
hshParams.Add("ExcludeList", oGame.ExcludeList)
|
||||
hshParams.Add("ProcessPath", oGame.ProcessPath)
|
||||
hshParams.Add("Icon", oGame.Icon)
|
||||
hshParams.Add("Hours", oGame.Hours)
|
||||
hshParams.Add("Version", oGame.Version)
|
||||
hshParams.Add("Company", oGame.Company)
|
||||
hshParams.Add("Enabled", oGame.Enabled)
|
||||
hshParams.Add("MonitorOnly", oGame.MonitorOnly)
|
||||
hshParams = SetCoreParameters(oGame)
|
||||
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
|
||||
@@ -473,29 +108,14 @@ Public Class mgrMonitorList
|
||||
Public Shared Sub DoListUpdate(ByVal oGame As clsGame, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
Dim hshParams As Hashtable
|
||||
|
||||
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 &= "Hours=@Hours, Version=@Version, Company=@Company, Enabled=@Enabled, MonitorOnly=@MonitorOnly WHERE MonitorID=@ID"
|
||||
sSQL &= "Hours=@Hours, Version=@Version, Company=@Company, Enabled=@Enabled, MonitorOnly=@MonitorOnly, BackupLimit=@BackupLimit, CleanFolder=@CleanFolder WHERE MonitorID=@ID"
|
||||
|
||||
'Parameters
|
||||
hshParams.Add("Name", oGame.Name)
|
||||
hshParams.Add("Process", oGame.TrueProcess)
|
||||
hshParams.Add("Path", oGame.TruePath)
|
||||
hshParams.Add("AbsolutePath", oGame.AbsolutePath)
|
||||
hshParams.Add("FolderSave", oGame.FolderSave)
|
||||
hshParams.Add("FileType", oGame.FileType)
|
||||
hshParams.Add("TimeStamp", oGame.AppendTimeStamp)
|
||||
hshParams.Add("ExcludeList", oGame.ExcludeList)
|
||||
hshParams.Add("ProcessPath", oGame.ProcessPath)
|
||||
hshParams.Add("Icon", oGame.Icon)
|
||||
hshParams.Add("Hours", oGame.Hours)
|
||||
hshParams.Add("Version", oGame.Version)
|
||||
hshParams.Add("Company", oGame.Company)
|
||||
hshParams.Add("Enabled", oGame.Enabled)
|
||||
hshParams.Add("MonitorOnly", oGame.MonitorOnly)
|
||||
hshParams.Add("ID", oGame.ID)
|
||||
hshParams = SetCoreParameters(oGame)
|
||||
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
|
||||
@@ -590,23 +210,7 @@ Public Class mgrMonitorList
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oGame = New clsGame
|
||||
oGame.ID = CStr(dr("MonitorID"))
|
||||
oGame.Name = CStr(dr("Name"))
|
||||
oGame.ProcessName = CStr(dr("Process"))
|
||||
If Not IsDBNull(dr("Path")) Then oGame.Path = CStr(dr("Path"))
|
||||
oGame.AbsolutePath = CBool(dr("AbsolutePath"))
|
||||
oGame.FolderSave = CBool(dr("FolderSave"))
|
||||
If Not IsDBNull(dr("FileType")) Then oGame.FileType = CStr(dr("FileType"))
|
||||
oGame.AppendTimeStamp = CBool(dr("TimeStamp"))
|
||||
If Not IsDBNull(dr("ExcludeList")) Then oGame.ExcludeList = CStr(dr("ExcludeList"))
|
||||
If Not IsDBNull(dr("ProcessPath")) Then oGame.ProcessPath = CStr(dr("ProcessPath"))
|
||||
If Not IsDBNull(dr("Icon")) Then oGame.Icon = CStr(dr("Icon"))
|
||||
oGame.Hours = CDbl(dr("Hours"))
|
||||
If Not IsDBNull(dr("Version")) Then oGame.Version = CStr(dr("Version"))
|
||||
If Not IsDBNull(dr("Company")) Then oGame.Company = CStr(dr("Company"))
|
||||
oGame.Enabled = CBool(dr("Enabled"))
|
||||
oGame.MonitorOnly = CBool(dr("MonitorOnly"))
|
||||
oGame = MapToObject(dr)
|
||||
Next
|
||||
|
||||
Return oGame
|
||||
@@ -629,23 +233,7 @@ Public Class mgrMonitorList
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oGame = New clsGame
|
||||
oGame.ID = CStr(dr("MonitorID"))
|
||||
oGame.Name = CStr(dr("Name"))
|
||||
oGame.ProcessName = CStr(dr("Process"))
|
||||
If Not IsDBNull(dr("Path")) Then oGame.Path = CStr(dr("Path"))
|
||||
oGame.AbsolutePath = CBool(dr("AbsolutePath"))
|
||||
oGame.FolderSave = CBool(dr("FolderSave"))
|
||||
If Not IsDBNull(dr("FileType")) Then oGame.FileType = CStr(dr("FileType"))
|
||||
oGame.AppendTimeStamp = CBool(dr("TimeStamp"))
|
||||
If Not IsDBNull(dr("ExcludeList")) Then oGame.ExcludeList = CStr(dr("ExcludeList"))
|
||||
If Not IsDBNull(dr("ProcessPath")) Then oGame.ProcessPath = CStr(dr("ProcessPath"))
|
||||
If Not IsDBNull(dr("Icon")) Then oGame.Icon = CStr(dr("Icon"))
|
||||
oGame.Hours = CDbl(dr("Hours"))
|
||||
If Not IsDBNull(dr("Version")) Then oGame.Version = CStr(dr("Version"))
|
||||
If Not IsDBNull(dr("Company")) Then oGame.Company = CStr(dr("Company"))
|
||||
oGame.Enabled = CBool(dr("Enabled"))
|
||||
oGame.MonitorOnly = CBool(dr("MonitorOnly"))
|
||||
oGame = MapToObject(dr)
|
||||
hshGames.Add(iCounter, oGame)
|
||||
iCounter += 1
|
||||
Next
|
||||
@@ -678,4 +266,440 @@ Public Class mgrMonitorList
|
||||
End If
|
||||
End Function
|
||||
|
||||
'Sync Functions
|
||||
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)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As Hashtable
|
||||
Dim oParamList As New List(Of Hashtable)
|
||||
|
||||
'Handle Optional Sync Fields
|
||||
Dim sGamePath As String
|
||||
Dim sIcon As String
|
||||
Dim sVersion As String
|
||||
Dim sCompany As String
|
||||
Dim sMonitorGame As String
|
||||
Dim sTimeStamp As String
|
||||
Dim sBackupLimit As String
|
||||
|
||||
'Setup SQL for optional fields
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.Company) = clsGame.eOptionalSyncFields.Company Then
|
||||
sCompany = "@Company"
|
||||
Else
|
||||
sCompany = "(SELECT Company FROM monitorlist WHERE MonitorID=@ID)"
|
||||
End If
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.GamePath) = clsGame.eOptionalSyncFields.GamePath Then
|
||||
sGamePath = "@ProcessPath"
|
||||
Else
|
||||
sGamePath = "(SELECT ProcessPath FROM monitorlist WHERE MonitorID=@ID)"
|
||||
End If
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.Icon) = clsGame.eOptionalSyncFields.Icon Then
|
||||
sIcon = "@Icon"
|
||||
Else
|
||||
sIcon = "(SELECT Icon FROM monitorlist WHERE MonitorID=@ID)"
|
||||
End If
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.MonitorGame) = clsGame.eOptionalSyncFields.MonitorGame Then
|
||||
sMonitorGame = "@Enabled"
|
||||
Else
|
||||
sMonitorGame = "COALESCE((SELECT Enabled FROM monitorlist WHERE MonitorID=@ID),1)"
|
||||
End If
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.TimeStamp) = clsGame.eOptionalSyncFields.TimeStamp Then
|
||||
sTimeStamp = "@TimeStamp"
|
||||
sBackupLimit = "@BackupLimit"
|
||||
Else
|
||||
sTimeStamp = "COALESCE((SELECT TimeStamp FROM monitorlist WHERE MonitorID=@ID),0)"
|
||||
sBackupLimit = "COALESCE((SELECT BackupLimit FROM monitorlist WHERE MonitorID=@ID),2)"
|
||||
End If
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.Version) = clsGame.eOptionalSyncFields.Version Then
|
||||
sVersion = "@Version"
|
||||
Else
|
||||
sVersion = "(SELECT Version FROM monitorlist WHERE MonitorID=@ID)"
|
||||
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 &= "VALUES (@ID, @Name, @Process, @Path, @AbsolutePath, @FolderSave, @FileType, "
|
||||
sSQL &= sTimeStamp & ", @ExcludeList, " & sGamePath & ", "
|
||||
sSQL &= sIcon & ", @Hours, " & sVersion & ", "
|
||||
sSQL &= sCompany & ", " & sMonitorGame & ", @MonitorOnly, " & sBackupLimit & ",@CleanFolder);"
|
||||
|
||||
For Each oGame As clsGame In hshGames.Values
|
||||
hshParams = New Hashtable
|
||||
|
||||
'Core Parameters
|
||||
hshParams.Add("ID", oGame.ID)
|
||||
hshParams.Add("Name", oGame.Name)
|
||||
hshParams.Add("Process", oGame.TrueProcess)
|
||||
hshParams.Add("Path", oGame.TruePath)
|
||||
hshParams.Add("AbsolutePath", oGame.AbsolutePath)
|
||||
hshParams.Add("FolderSave", oGame.FolderSave)
|
||||
hshParams.Add("FileType", oGame.FileType)
|
||||
hshParams.Add("ExcludeList", oGame.ExcludeList)
|
||||
hshParams.Add("Hours", oGame.Hours)
|
||||
hshParams.Add("MonitorOnly", oGame.MonitorOnly)
|
||||
hshParams.Add("CleanFolder", oGame.CleanFolder)
|
||||
|
||||
'Optional Parameters
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.Company) = clsGame.eOptionalSyncFields.Company Then
|
||||
hshParams.Add("Company", oGame.Company)
|
||||
End If
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.GamePath) = clsGame.eOptionalSyncFields.GamePath Then
|
||||
hshParams.Add("ProcessPath", oGame.ProcessPath)
|
||||
End If
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.Icon) = clsGame.eOptionalSyncFields.Icon Then
|
||||
hshParams.Add("Icon", oGame.Icon)
|
||||
End If
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.MonitorGame) = clsGame.eOptionalSyncFields.MonitorGame Then
|
||||
hshParams.Add("Enabled", oGame.Enabled)
|
||||
End If
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.TimeStamp) = clsGame.eOptionalSyncFields.TimeStamp Then
|
||||
hshParams.Add("TimeStamp", oGame.AppendTimeStamp)
|
||||
hshParams.Add("BackupLimit", oGame.BackupLimit)
|
||||
End If
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.Version) = clsGame.eOptionalSyncFields.Version Then
|
||||
hshParams.Add("Version", oGame.Version)
|
||||
End If
|
||||
|
||||
oParamList.Add(hshParams)
|
||||
Next
|
||||
|
||||
oDatabase.RunMassParamQuery(sSQL, oParamList)
|
||||
|
||||
End Sub
|
||||
|
||||
Public Shared Sub DoListDeleteSync(ByVal hshGames As Hashtable, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As Hashtable
|
||||
Dim oParamList As New List(Of Hashtable)
|
||||
|
||||
sSQL = "DELETE FROM gametags "
|
||||
sSQL &= "WHERE MonitorID = @MonitorID;"
|
||||
sSQL &= "DELETE FROM monitorlist "
|
||||
sSQL &= "WHERE Name = @Name AND Process= @Process;"
|
||||
|
||||
For Each oGame As clsGame In hshGames.Values
|
||||
hshParams = New Hashtable
|
||||
hshParams.Add("MonitorID", oGame.ID)
|
||||
hshParams.Add("Name", oGame.Name)
|
||||
hshParams.Add("Process", oGame.TrueProcess)
|
||||
oParamList.Add(hshParams)
|
||||
Next
|
||||
|
||||
oDatabase.RunMassParamQuery(sSQL, oParamList)
|
||||
End Sub
|
||||
|
||||
Public Shared Sub SyncMonitorLists(ByVal eSyncFields As clsGame.eOptionalSyncFields, Optional ByVal bToRemote As Boolean = True)
|
||||
Dim hshCompareFrom As Hashtable
|
||||
Dim hshCompareTo As Hashtable
|
||||
Dim hshSyncItems As Hashtable
|
||||
Dim hshDeleteItems As Hashtable
|
||||
Dim oFromItem As clsGame
|
||||
Dim oToItem As clsGame
|
||||
Dim iChanges As Integer
|
||||
|
||||
Cursor.Current = Cursors.WaitCursor
|
||||
|
||||
If bToRemote Then
|
||||
RaiseEvent UpdateLog(mgrMonitorList_SyncToMaster, False, ToolTipIcon.Info, True)
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrMonitorList_SyncFromMaster, False, ToolTipIcon.Info, True)
|
||||
End If
|
||||
|
||||
'Add / Update Sync
|
||||
If bToRemote Then
|
||||
hshCompareFrom = ReadList(eListTypes.FullList, mgrSQLite.Database.Local)
|
||||
hshCompareTo = ReadList(eListTypes.FullList, mgrSQLite.Database.Remote)
|
||||
Else
|
||||
hshCompareFrom = ReadList(eListTypes.FullList, mgrSQLite.Database.Remote)
|
||||
hshCompareTo = ReadList(eListTypes.FullList, mgrSQLite.Database.Local)
|
||||
End If
|
||||
|
||||
hshSyncItems = hshCompareFrom.Clone
|
||||
|
||||
For Each oFromItem In hshCompareFrom.Values
|
||||
If hshCompareTo.Contains(oFromItem.CompoundKey) Then
|
||||
oToItem = DirectCast(hshCompareTo(oFromItem.CompoundKey), clsGame)
|
||||
If oFromItem.SyncEquals(oToItem, eSyncFields) Then
|
||||
hshSyncItems.Remove(oFromItem.CompoundKey)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If bToRemote Then
|
||||
DoListAddUpdateSync(hshSyncItems, mgrSQLite.Database.Remote, eSyncFields)
|
||||
Else
|
||||
DoListAddUpdateSync(hshSyncItems, mgrSQLite.Database.Local, eSyncFields)
|
||||
End If
|
||||
|
||||
'Sync Tags
|
||||
iChanges = mgrTags.SyncTags(bToRemote)
|
||||
iChanges += mgrGameTags.SyncGameTags(bToRemote)
|
||||
|
||||
'Delete Sync
|
||||
If bToRemote Then
|
||||
hshCompareFrom = ReadList(eListTypes.FullList, mgrSQLite.Database.Local)
|
||||
hshCompareTo = ReadList(eListTypes.FullList, mgrSQLite.Database.Remote)
|
||||
Else
|
||||
hshCompareFrom = ReadList(eListTypes.FullList, mgrSQLite.Database.Remote)
|
||||
hshCompareTo = ReadList(eListTypes.FullList, mgrSQLite.Database.Local)
|
||||
End If
|
||||
|
||||
hshDeleteItems = hshCompareTo.Clone
|
||||
|
||||
For Each oToItem In hshCompareTo.Values
|
||||
If hshCompareFrom.Contains(oToItem.CompoundKey) Then
|
||||
oFromItem = DirectCast(hshCompareFrom(oToItem.CompoundKey), clsGame)
|
||||
If oToItem.MinimalEquals(oFromItem) Then
|
||||
hshDeleteItems.Remove(oToItem.CompoundKey)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If bToRemote Then
|
||||
DoListDeleteSync(hshDeleteItems, mgrSQLite.Database.Remote)
|
||||
Else
|
||||
DoListDeleteSync(hshDeleteItems, mgrSQLite.Database.Local)
|
||||
End If
|
||||
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrMonitorList_SyncChanges, (hshDeleteItems.Count + hshSyncItems.Count + iChanges).ToString), False, ToolTipIcon.Info, True)
|
||||
Cursor.Current = Cursors.Default
|
||||
Application.DoEvents()
|
||||
End Sub
|
||||
|
||||
'Filter Functions
|
||||
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 iCounter As Integer = 0
|
||||
|
||||
Select Case eFilterType
|
||||
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"
|
||||
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"
|
||||
|
||||
If hshStringFilters.Count > 0 Then
|
||||
sSQL &= " WHERE ("
|
||||
For Each de As DictionaryEntry In hshStringFilters
|
||||
sSQL &= de.Key & " LIKE @" & de.Key
|
||||
hshParams.Add(de.Key, "%" & de.Value.ToString & "%")
|
||||
iCounter += 1
|
||||
If iCounter <> hshStringFilters.Count Then
|
||||
Select Case eFilterType
|
||||
Case frmFilter.eFilterType.FieldAnd
|
||||
sSQL &= " AND "
|
||||
Case frmFilter.eFilterType.FieldOr
|
||||
sSQL &= " OR "
|
||||
End Select
|
||||
End If
|
||||
|
||||
Next
|
||||
sSQL &= ")"
|
||||
End If
|
||||
sSQL &= " ORDER BY Name Asc"
|
||||
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 &= "NATURAL JOIN gametags WHERE gametags.TagID IN ("
|
||||
|
||||
For Each oTag As clsTag In oTagFilters
|
||||
sSQL &= "@TagID" & iCounter & ","
|
||||
hshParams.Add("TagID" & iCounter, oTag.ID)
|
||||
iCounter += 1
|
||||
Next
|
||||
|
||||
sSQL = sSQL.TrimEnd(",")
|
||||
sSQL &= ") ORDER BY Name Asc"
|
||||
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 "
|
||||
|
||||
For Each oTag As clsTag In oTagFilters
|
||||
sSQL &= "(SELECT MonitorID FROM gametags WHERE monitorlist.MonitorID = gametags.MonitorID And TagID = @TagID" & iCounter & ")"
|
||||
If iCounter <> oTagFilters.Count - 1 Then
|
||||
sSQL &= " AND MonitorID IN "
|
||||
End If
|
||||
hshParams.Add("TagID" & iCounter, oTag.ID)
|
||||
iCounter += 1
|
||||
Next
|
||||
|
||||
sSQL &= " ORDER BY Name Asc"
|
||||
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"
|
||||
End Select
|
||||
|
||||
Return sSQL
|
||||
|
||||
End Function
|
||||
|
||||
Public Shared Function ReadFilteredList(ByVal oTagFilters As List(Of clsTag), ByVal hshStringFilters As Hashtable, eFilterType As frmFilter.eFilterType, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local) As Hashtable
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim oData As DataSet
|
||||
Dim sSQL As String = String.Empty
|
||||
Dim hshList As New Hashtable
|
||||
Dim oGame As clsGame
|
||||
Dim hshParams As New Hashtable
|
||||
Dim iCounter As Integer = 0
|
||||
|
||||
sSQL = BuildFilterQuery(oTagFilters, hshStringFilters, eFilterType, hshParams)
|
||||
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oGame = MapToObject(dr)
|
||||
|
||||
hshList.Add(oGame.ID, oGame)
|
||||
Next
|
||||
|
||||
Return hshList
|
||||
End Function
|
||||
|
||||
|
||||
'Import / Export Functions
|
||||
Public Shared Function ReadListForExport(ByVal oTagFilters As List(Of clsTag), ByVal hshStringFilters As Hashtable, ByVal eFilterType As frmFilter.eFilterType, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local) As List(Of Game)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim oData As DataSet
|
||||
Dim sSQL As String = String.Empty
|
||||
Dim sID As String
|
||||
Dim oList As New List(Of Game)
|
||||
Dim oGame As Game
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
sSQL = BuildFilterQuery(oTagFilters, hshStringFilters, eFilterType, hshParams)
|
||||
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oGame = New Game
|
||||
sID = CStr(dr("MonitorID"))
|
||||
oGame.Name = CStr(dr("Name"))
|
||||
oGame.ProcessName = CStr(dr("Process"))
|
||||
If Not IsDBNull(dr("Path")) Then oGame.Path = CStr(dr("Path"))
|
||||
oGame.AbsolutePath = CBool(dr("AbsolutePath"))
|
||||
oGame.FolderSave = CBool(dr("FolderSave"))
|
||||
If Not IsDBNull(dr("FileType")) Then oGame.FileType = CStr(dr("FileType"))
|
||||
If Not IsDBNull(dr("ExcludeList")) Then oGame.ExcludeList = CStr(dr("ExcludeList"))
|
||||
oGame.Tags = mgrGameTags.GetTagsByGameForExport(sID)
|
||||
oList.Add(oGame)
|
||||
Next
|
||||
|
||||
Return oList
|
||||
End Function
|
||||
|
||||
Public Shared Function DoImport(ByVal sPath As String) As Boolean
|
||||
If (sPath.IndexOf("http://", 0, StringComparison.CurrentCultureIgnoreCase) > -1) Or
|
||||
(sPath.IndexOf("https://", 0, StringComparison.CurrentCultureIgnoreCase) > -1) Then
|
||||
If mgrCommon.CheckAddress(sPath) Then
|
||||
ImportMonitorList(sPath, True)
|
||||
Return True
|
||||
Else
|
||||
mgrCommon.ShowMessage(mgrMonitorList_WebNoReponse, sPath, MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
End If
|
||||
Else
|
||||
If File.Exists(sPath) Then
|
||||
ImportMonitorList(sPath)
|
||||
Return True
|
||||
Else
|
||||
mgrCommon.ShowMessage(mgrMonitorList_FileNotFound, sPath, MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Shared Sub ImportMonitorList(ByVal sLocation As String, Optional ByVal bWebRead As Boolean = False)
|
||||
Dim hshCompareFrom As Hashtable
|
||||
Dim hshCompareTo As Hashtable
|
||||
Dim hshSyncItems As Hashtable
|
||||
Dim oFromItem As clsGame
|
||||
Dim oToItem As clsGame
|
||||
|
||||
Cursor.Current = Cursors.WaitCursor
|
||||
|
||||
'Add / Update Sync
|
||||
hshCompareFrom = mgrXML.ReadMonitorList(sLocation, bWebRead)
|
||||
hshCompareTo = ReadList(eListTypes.FullList, mgrSQLite.Database.Local)
|
||||
|
||||
hshSyncItems = hshCompareFrom.Clone
|
||||
|
||||
For Each oFromItem In hshCompareFrom.Values
|
||||
If hshCompareTo.Contains(oFromItem.CompoundKey) Then
|
||||
oToItem = DirectCast(hshCompareTo(oFromItem.CompoundKey), clsGame)
|
||||
If oFromItem.CoreEquals(oToItem) Then
|
||||
hshSyncItems.Remove(oFromItem.CompoundKey)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
Cursor.Current = Cursors.Default
|
||||
|
||||
If hshSyncItems.Count > 0 Then
|
||||
Dim frm As New frmAdvancedImport
|
||||
frm.ImportData = hshSyncItems
|
||||
If frm.ShowDialog() = DialogResult.OK Then
|
||||
Cursor.Current = Cursors.WaitCursor
|
||||
|
||||
DoListAddUpdateSync(frm.FinalData)
|
||||
mgrTags.DoTagAddImport(frm.FinalData)
|
||||
|
||||
Cursor.Current = Cursors.Default
|
||||
mgrCommon.ShowMessage(mgrMonitorList_ImportComplete, MsgBoxStyle.Information)
|
||||
End If
|
||||
Else
|
||||
mgrCommon.ShowMessage(mgrMonitorList_ImportNothing, MsgBoxStyle.Information)
|
||||
End If
|
||||
|
||||
Application.DoEvents()
|
||||
End Sub
|
||||
|
||||
Public Shared Sub ExportMonitorList(ByVal sLocation As String)
|
||||
Dim oList As List(Of Game)
|
||||
Dim bSuccess As Boolean = False
|
||||
Dim oTagFilters As New List(Of clsTag)
|
||||
Dim oStringFilters As New Hashtable
|
||||
Dim eCurrentFilter As frmFilter.eFilterType = frmFilter.eFilterType.NoFilter
|
||||
|
||||
If mgrCommon.ShowMessage(mgrMonitorList_ConfirmApplyFilter, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
Dim frm As New frmFilter
|
||||
frm.ShowDialog()
|
||||
oTagFilters = frm.TagFilters
|
||||
oStringFilters = frm.StringFilters
|
||||
eCurrentFilter = frm.FilterType
|
||||
End If
|
||||
|
||||
oList = ReadListForExport(oTagFilters, oStringFilters, eCurrentFilter)
|
||||
|
||||
bSuccess = mgrXML.SerializeAndExport(oList, sLocation)
|
||||
|
||||
If bSuccess Then
|
||||
mgrCommon.ShowMessage(mgrMonitorList_ExportComplete, oList.Count, MsgBoxStyle.Information)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Other Functions
|
||||
Public Shared Sub HandleBackupLocationChange(ByVal oSettings As mgrSettings)
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Remote)
|
||||
Dim iGameCount As Integer
|
||||
|
||||
'Check if a remote database already exists in the new backup location
|
||||
If oDatabase.CheckDB() Then
|
||||
'Make sure database is the latest version
|
||||
oDatabase.DatabaseUpgrade()
|
||||
|
||||
'See if the remote database is empty
|
||||
iGameCount = mgrMonitorList.ReadList(eListTypes.FullList, mgrSQLite.Database.Remote).Count
|
||||
|
||||
'If the remote database actually contains a list, then ask what to do
|
||||
If iGameCount > 0 Then
|
||||
If mgrCommon.ShowMessage(mgrMonitorList_ConfirmExistingData, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
|
||||
Else
|
||||
mgrMonitorList.SyncMonitorLists(oSettings.SyncFields, False)
|
||||
End If
|
||||
Else
|
||||
mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
|
||||
End If
|
||||
Else
|
||||
mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
+14
-14
@@ -5,11 +5,11 @@ Imports System.Reflection
|
||||
|
||||
Public Class mgrPath
|
||||
'Important Note: Any changes to sSettingsRoot & sDBLocation need to be mirrored in frmMain.vb -> VerifyGameDataPath
|
||||
Private Shared sSettingsRoot As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "/gbm"
|
||||
Private Shared sDBLocation As String = sSettingsRoot & "/gbm.s3db"
|
||||
Private Shared sIncludeFile As String = sSettingsRoot & "/gbm_include.txt"
|
||||
Private Shared sExcludeFile As String = sSettingsRoot & "/gbm_exclude.txt"
|
||||
Private Shared sLogFile As String = sSettingsRoot & "/gbm_log_" & Date.Now.ToString("dd-MM-yyyy-HH-mm-ss") & ".txt"
|
||||
Private Shared sSettingsRoot As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & Path.DirectorySeparatorChar & "gbm"
|
||||
Private Shared sDBLocation As String = sSettingsRoot & Path.DirectorySeparatorChar & "gbm.s3db"
|
||||
Private Shared sIncludeFile As String = sSettingsRoot & Path.DirectorySeparatorChar & "gbm_include.txt"
|
||||
Private Shared sExcludeFile As String = sSettingsRoot & Path.DirectorySeparatorChar & "gbm_exclude.txt"
|
||||
Private Shared sLogFile As String = sSettingsRoot & Path.DirectorySeparatorChar & "gbm_log_" & Date.Now.ToString("dd-MM-yyyy-HH-mm-ss") & ".txt"
|
||||
Private Shared sRemoteDatabaseLocation As String
|
||||
Private Shared hshCustomVariables As Hashtable
|
||||
Private Shared oReleaseType As ProcessorArchitecture = AssemblyName.GetAssemblyName(Application.ExecutablePath()).ProcessorArchitecture
|
||||
@@ -37,7 +37,7 @@ Public Class mgrPath
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Shared ReadOnly Property Utility7zLocation As String
|
||||
Shared ReadOnly Property Default7zLocation As String
|
||||
Get
|
||||
If mgrCommon.IsUnix Then
|
||||
Return "/usr/bin/7za"
|
||||
@@ -45,18 +45,18 @@ Public Class mgrPath
|
||||
|
||||
Select Case oReleaseType
|
||||
Case ProcessorArchitecture.Amd64
|
||||
Return Application.StartupPath & "/Utilities/x64/7za.exe"
|
||||
Return Application.StartupPath & "\Utilities\x64\7za.exe"
|
||||
Case ProcessorArchitecture.IA64
|
||||
Return Application.StartupPath & "/Utilities/x64/7za.exe"
|
||||
Return Application.StartupPath & "\Utilities\x64\7za.exe"
|
||||
Case ProcessorArchitecture.MSIL
|
||||
Return Application.StartupPath & "/Utilities/x86/7za.exe"
|
||||
Return Application.StartupPath & "\Utilities\x86\7za.exe"
|
||||
Case ProcessorArchitecture.X86
|
||||
Return Application.StartupPath & "/Utilities/x86/7za.exe"
|
||||
Return Application.StartupPath & "\Utilities\x86\7za.exe"
|
||||
Case ProcessorArchitecture.None
|
||||
Return Application.StartupPath & "/Utilities/x86/7za.exe"
|
||||
Return Application.StartupPath & "\Utilities\x86\7za.exe"
|
||||
End Select
|
||||
|
||||
Return Application.StartupPath & "/Utilities/x86/7za.exe"
|
||||
Return Application.StartupPath & "\Utilities\x86\7za.exe"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -95,7 +95,7 @@ Public Class mgrPath
|
||||
Return sRemoteDatabaseLocation
|
||||
End Get
|
||||
Set(value As String)
|
||||
sRemoteDatabaseLocation = value & "/gbm.s3db"
|
||||
sRemoteDatabaseLocation = value & Path.DirectorySeparatorChar & "gbm.s3db"
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -283,10 +283,10 @@ Public Class mgrPath
|
||||
|
||||
hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData))
|
||||
hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData))
|
||||
hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments))
|
||||
|
||||
'Don't use these in Unix
|
||||
If Not mgrCommon.IsUnix Then
|
||||
hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments))
|
||||
hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments))
|
||||
hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.UserProfile))
|
||||
End If
|
||||
|
||||
@@ -130,9 +130,9 @@ Public Class mgrProcesses
|
||||
|
||||
'Unix Handler
|
||||
'We need some special handling for Wine processes
|
||||
If mgrCommon.IsUnix And sProcessCheck.ToLower = "wine-preloader" Then
|
||||
If mgrCommon.IsUnix And (sProcessCheck.ToLower = "wine-preloader" Or sProcessCheck.ToLower = "wine64-preloader") Then
|
||||
Dim sWinePath As String()
|
||||
'We can't use Path.GetFileName here, Wine uses the Windows seperator in arguments and the Unix version of the function expects a different one.
|
||||
'We can't use Path.GetFileName here, Wine uses the Windows seperator in arguments and Mono expects a different one in Unix.
|
||||
sWinePath = GetUnixProcessArguments(prsCurrent)(0).Split("\")
|
||||
sProcessCheck = sWinePath(sWinePath.Length - 1).Replace(".exe", "")
|
||||
bWineProcess = True
|
||||
|
||||
+25
-30
@@ -80,8 +80,8 @@ Public Class mgrRestore
|
||||
Dim bLocal As Boolean = False
|
||||
Dim bRemote As Boolean = False
|
||||
|
||||
slLocalManifest = mgrManifest.ReadManifest(mgrSQLite.Database.Local)
|
||||
slRemoteManifest = mgrManifest.ReadManifest(mgrSQLite.Database.Remote)
|
||||
slLocalManifest = mgrManifest.ReadLatestManifest(mgrSQLite.Database.Local)
|
||||
slRemoteManifest = mgrManifest.ReadLatestManifest(mgrSQLite.Database.Remote)
|
||||
|
||||
If slLocalManifest.Contains(sAppName) Then
|
||||
oLocalItem = DirectCast(slLocalManifest(sAppName), clsBackup)
|
||||
@@ -96,8 +96,6 @@ Public Class mgrRestore
|
||||
If bLocal And bRemote Then
|
||||
'Compare
|
||||
If oRemoteItem.DateUpdated > oLocalItem.DateUpdated Then
|
||||
oRemoteItem.LastDateUpdated = oLocalItem.DateUpdated
|
||||
oRemoteItem.LastUpdatedBy = oLocalItem.UpdatedBy
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
@@ -117,26 +115,18 @@ Public Class mgrRestore
|
||||
Dim bLocal As Boolean = False
|
||||
Dim bRemote As Boolean = False
|
||||
|
||||
slLocalManifest = mgrManifest.ReadManifest(mgrSQLite.Database.Local)
|
||||
slRemoteManifest = mgrManifest.ReadManifest(mgrSQLite.Database.Remote)
|
||||
slLocalManifest = mgrManifest.ReadLatestManifest(mgrSQLite.Database.Local)
|
||||
slRemoteManifest = mgrManifest.ReadLatestManifest(mgrSQLite.Database.Remote)
|
||||
|
||||
For Each oItem As clsBackup In slRemoteManifest.Values
|
||||
If slLocalManifest.Contains(oItem.Name) Then
|
||||
oLocalItem = DirectCast(slLocalManifest(oItem.Name), clsBackup)
|
||||
|
||||
If oItem.DateUpdated > oLocalItem.DateUpdated Then
|
||||
oLocalItem.FileName = oItem.FileName
|
||||
oLocalItem.LastDateUpdated = oItem.DateUpdated
|
||||
oLocalItem.LastUpdatedBy = oItem.UpdatedBy
|
||||
slRestoreItems.Add(oLocalItem.Name, oLocalItem)
|
||||
slRestoreItems.Add(oItem.Name, oItem)
|
||||
End If
|
||||
Else
|
||||
oLocalItem = oItem
|
||||
oLocalItem.LastDateUpdated = oItem.DateUpdated
|
||||
oLocalItem.LastUpdatedBy = oItem.UpdatedBy
|
||||
oLocalItem.DateUpdated = Nothing
|
||||
oLocalItem.UpdatedBy = Nothing
|
||||
slRestoreItems.Add(oLocalItem.Name, oLocalItem)
|
||||
slRestoreItems.Add(oItem.Name, oItem)
|
||||
End If
|
||||
Next
|
||||
|
||||
@@ -148,20 +138,20 @@ Public Class mgrRestore
|
||||
Dim slRemoteManifest As SortedList
|
||||
Dim slRemovedItems As New SortedList
|
||||
|
||||
slLocalManifest = mgrManifest.ReadManifest(mgrSQLite.Database.Local)
|
||||
slRemoteManifest = mgrManifest.ReadManifest(mgrSQLite.Database.Remote)
|
||||
slLocalManifest = mgrManifest.ReadLatestManifest(mgrSQLite.Database.Local)
|
||||
slRemoteManifest = mgrManifest.ReadLatestManifest(mgrSQLite.Database.Remote)
|
||||
|
||||
For Each oItem As clsBackup In slLocalManifest.Values
|
||||
If Not slRemoteManifest.Contains(oItem.Name) Then
|
||||
slRemovedItems.Add(oItem.Name, oItem)
|
||||
mgrManifest.DoManifestDelete(oItem, mgrSQLite.Database.Local)
|
||||
mgrManifest.DoManifestDeletebyName(oItem, mgrSQLite.Database.Local)
|
||||
End If
|
||||
Next
|
||||
|
||||
Return slRemovedItems
|
||||
End Function
|
||||
|
||||
Public Function CheckRestorePrereq(ByVal oBackupInfo As clsBackup) As Boolean
|
||||
Public Function CheckRestorePrereq(ByVal oBackupInfo As clsBackup, ByVal bCleanFolder As Boolean) As Boolean
|
||||
Dim sHash As String
|
||||
Dim sExtractPath As String
|
||||
Dim sBackupFile As String = oSettings.BackupFolder & Path.DirectorySeparatorChar & oBackupInfo.FileName
|
||||
@@ -185,10 +175,14 @@ Public Class mgrRestore
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorNoPath, sExtractPath), False, ToolTipIcon.Error, True)
|
||||
Return False
|
||||
End If
|
||||
Else
|
||||
If bCleanFolder Then
|
||||
mgrCommon.DeleteDirectory(sExtractPath, True)
|
||||
Directory.CreateDirectory(sExtractPath)
|
||||
End If
|
||||
End If
|
||||
|
||||
'Check file integrity
|
||||
If oSettings.CheckSum Then
|
||||
If oBackupInfo.CheckSum <> String.Empty Then
|
||||
sHash = mgrHash.Generate_SHA256_Hash(sBackupFile)
|
||||
If sHash <> oBackupInfo.CheckSum Then
|
||||
@@ -203,7 +197,7 @@ Public Class mgrRestore
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_NoVerify, oBackupInfo.Name), False, ToolTipIcon.Info, True)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Return True
|
||||
End Function
|
||||
@@ -231,12 +225,9 @@ Public Class mgrRestore
|
||||
|
||||
Try
|
||||
If File.Exists(sBackupFile) Then
|
||||
If mgrCommon.IsUnix Then
|
||||
prs7z.StartInfo.Arguments = "x """ & sBackupFile & """ -o""" & sExtractPath & Path.DirectorySeparatorChar & """ -aoa -r"
|
||||
Else
|
||||
prs7z.StartInfo.Arguments = "x -bb1 -bt """ & sBackupFile & """ -o""" & sExtractPath & Path.DirectorySeparatorChar & """ -aoa -r"
|
||||
End If
|
||||
prs7z.StartInfo.FileName = mgrPath.Utility7zLocation
|
||||
If Settings.Is7zUtilityValid Then
|
||||
prs7z.StartInfo.Arguments = "x" & oSettings.Prepared7zArguments & """" & sBackupFile & """ -o""" & sExtractPath & Path.DirectorySeparatorChar & """ -aoa -r"
|
||||
prs7z.StartInfo.FileName = oSettings.Utility7zLocation
|
||||
prs7z.StartInfo.UseShellExecute = False
|
||||
prs7z.StartInfo.RedirectStandardOutput = True
|
||||
prs7z.StartInfo.CreateNoWindow = True
|
||||
@@ -261,14 +252,18 @@ Public Class mgrRestore
|
||||
End If
|
||||
End If
|
||||
prs7z.Dispose()
|
||||
Else
|
||||
RaiseEvent UpdateLog(App_Invalid7zDetected, True, ToolTipIcon.Error, True)
|
||||
bRestoreCompleted = False
|
||||
End If
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrRestore_ErrorNoBackup, True, ToolTipIcon.Error, True)
|
||||
End If
|
||||
|
||||
If bRestoreCompleted Then
|
||||
'Save Local Manifest
|
||||
If mgrManifest.DoManifestCheck(oBackupInfo.Name, mgrSQLite.Database.Local) Then
|
||||
mgrManifest.DoManifestUpdate(oBackupInfo, mgrSQLite.Database.Local)
|
||||
If mgrManifest.DoGlobalManifestCheck(oBackupInfo.Name, mgrSQLite.Database.Local) Then
|
||||
mgrManifest.DoManifestUpdateByName(oBackupInfo, mgrSQLite.Database.Local)
|
||||
Else
|
||||
mgrManifest.DoManifestAdd(oBackupInfo, mgrSQLite.Database.Local)
|
||||
End If
|
||||
|
||||
+127
-18
@@ -72,14 +72,15 @@ Public Class mgrSQLite
|
||||
'Add Tables (Settings)
|
||||
sSql = "CREATE TABLE settings (SettingsID INTEGER NOT NULL PRIMARY KEY, MonitorOnStartup BOOLEAN NOT NULL, StartToTray BOOLEAN NOT NULL, ShowDetectionToolTips BOOLEAN NOT NULL, " &
|
||||
"DisableConfirmation BOOLEAN NOT NULL, CreateSubFolder BOOLEAN NOT NULL, ShowOverwriteWarning BOOLEAN NOT NULL, RestoreOnLaunch BOOLEAN NOT NULL, " &
|
||||
"BackupFolder TEXT NOT NULL, Sync BOOLEAN NOT NULL, CheckSum BOOLEAN NOT NULL, StartWithWindows BOOLEAN NOT NULL, TimeTracking BOOLEAN NOT NULL, " &
|
||||
"SupressBackup BOOLEAN NOT NULL, SupressBackupThreshold INTEGER NOT NULL, CompressionLevel INTEGER NOT NULL);"
|
||||
"BackupFolder TEXT NOT NULL, Sync BOOLEAN NOT NULL, StartWithWindows BOOLEAN NOT NULL, TimeTracking BOOLEAN NOT NULL, " &
|
||||
"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);"
|
||||
|
||||
'Add Tables (Monitor List)
|
||||
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, " &
|
||||
"ProcessPath TEXT, Icon TEXT, Hours REAL, Version TEXT, Company TEXT, Enabled BOOLEAN NOT NULL, MonitorOnly BOOLEAN NOT NULL, " &
|
||||
"PRIMARY KEY(Name, Process));"
|
||||
"BackupLimit INTEGER NOT NULL, CleanFolder BOOLEAN NOT NULL, PRIMARY KEY(Name, Process));"
|
||||
|
||||
'Add Tables (Tags)
|
||||
sSql &= "CREATE TABLE tags (TagID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL PRIMARY KEY); "
|
||||
@@ -91,7 +92,7 @@ Public Class mgrSQLite
|
||||
sSql &= "CREATE TABLE variables (VariableID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL PRIMARY KEY, Path TEXT NOT NULL);"
|
||||
|
||||
'Add Tables (Local Manifest)
|
||||
sSql &= "CREATE TABLE manifest (ManifestID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL PRIMARY KEY, 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, " &
|
||||
"AbsolutePath BOOLEAN NOT NULL, DateUpdated TEXT NOT NULL, UpdatedBy TEXT NOT NULL, CheckSum TEXT);"
|
||||
|
||||
'Set Version
|
||||
@@ -110,16 +111,16 @@ Public Class mgrSQLite
|
||||
|
||||
Try
|
||||
'Create the DB
|
||||
SQLiteConnection.CreateFile(sDatabaseLocation)
|
||||
SqliteConnection.CreateFile(sDatabaseLocation)
|
||||
|
||||
'Add Tables (Remote Monitor List)
|
||||
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, " &
|
||||
"ProcessPath TEXT, Icon TEXT, Hours REAL, Version TEXT, Company TEXT, Enabled BOOLEAN NOT NULL, MonitorOnly BOOLEAN NOT NULL, " &
|
||||
"PRIMARY KEY(Name, Process));"
|
||||
"BackupLimit INTEGER NOT NULL, CleanFolder BOOLEAN NOT NULL, PRIMARY KEY(Name, Process));"
|
||||
|
||||
'Add Tables (Remote Manifest)
|
||||
sSql &= "CREATE TABLE manifest (ManifestID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL PRIMARY KEY, 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, " &
|
||||
"AbsolutePath BOOLEAN NOT NULL, DateUpdated TEXT NOT NULL, UpdatedBy TEXT NOT NULL, CheckSum TEXT);"
|
||||
|
||||
'Add Tables (Remote Tags)
|
||||
@@ -154,7 +155,7 @@ Public Class mgrSQLite
|
||||
|
||||
Public Sub Connect()
|
||||
If CheckDB() Then
|
||||
db = New SQLiteConnection(sConnectString)
|
||||
db = New SqliteConnection(sConnectString)
|
||||
db.Open()
|
||||
Else
|
||||
CreateDB()
|
||||
@@ -166,18 +167,18 @@ Public Class mgrSQLite
|
||||
db.Close()
|
||||
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
|
||||
command.Parameters.AddWithValue(de.Key, de.Value)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Function RunParamQuery(ByVal sSQL As String, ByVal hshParams As Hashtable) As Boolean
|
||||
Dim trans As SQLiteTransaction
|
||||
Dim command As SQLiteCommand
|
||||
Dim trans As SqliteTransaction
|
||||
Dim command As SqliteCommand
|
||||
|
||||
Connect()
|
||||
command = New SQLiteCommand(sSQL, db)
|
||||
command = New SqliteCommand(sSQL, db)
|
||||
BuildParams(command, hshParams)
|
||||
trans = db.BeginTransaction()
|
||||
|
||||
@@ -197,11 +198,11 @@ Public Class mgrSQLite
|
||||
End Function
|
||||
|
||||
Public Function RunMassParamQuery(ByVal sSQL As String, ByVal oParamList As List(Of Hashtable)) As Boolean
|
||||
Dim trans As SQLiteTransaction
|
||||
Dim command As SQLiteCommand
|
||||
Dim trans As SqliteTransaction
|
||||
Dim command As SqliteCommand
|
||||
|
||||
Connect()
|
||||
command = New SQLiteCommand(sSQL, db)
|
||||
command = New SqliteCommand(sSQL, db)
|
||||
trans = db.BeginTransaction()
|
||||
|
||||
Try
|
||||
@@ -223,12 +224,12 @@ Public Class mgrSQLite
|
||||
End Function
|
||||
|
||||
Public Function ReadParamData(ByVal sSQL As String, ByVal hshParams As Hashtable) As DataSet
|
||||
Dim adapter As SQLiteDataAdapter
|
||||
Dim command As SQLiteCommand
|
||||
Dim adapter As SqliteDataAdapter
|
||||
Dim command As SqliteCommand
|
||||
Dim oData As New DataSet
|
||||
|
||||
Connect()
|
||||
command = New SQLiteCommand(sSQL, db)
|
||||
command = New SqliteCommand(sSQL, db)
|
||||
BuildParams(command, hshParams)
|
||||
|
||||
Try
|
||||
@@ -530,6 +531,114 @@ Public Class mgrSQLite
|
||||
End If
|
||||
End If
|
||||
|
||||
'0.97 Upgrade
|
||||
If GetDatabaseVersion() < 97 Then
|
||||
If eDatabase = Database.Local Then
|
||||
'Backup DB before starting
|
||||
BackupDB("v96")
|
||||
|
||||
'Add new settings
|
||||
sSQL = "ALTER TABLE settings ADD COLUMN Custom7zArguments TEXT;"
|
||||
sSQL &= "ALTER TABLE settings ADD COLUMN Custom7zLocation TEXT;"
|
||||
sSQL &= "ALTER TABLE settings ADD COLUMN SyncFields INTEGER NOT NULL DEFAULT 32;"
|
||||
sSQL &= "ALTER TABLE settings ADD COLUMN AutoSaveLog BOOLEAN NOT NULL DEFAULT 0;"
|
||||
sSQL &= "PRAGMA user_version=97"
|
||||
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
End If
|
||||
If eDatabase = Database.Remote Then
|
||||
'Backup DB before starting
|
||||
BackupDB("v96")
|
||||
|
||||
sSQL = "PRAGMA user_version=97"
|
||||
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
End If
|
||||
End If
|
||||
|
||||
'0.98 Upgrade
|
||||
If GetDatabaseVersion() < 98 Then
|
||||
If eDatabase = Database.Local Then
|
||||
'Backup DB before starting
|
||||
BackupDB("v97")
|
||||
|
||||
'Overhaul Manifest Table
|
||||
sSQL = "CREATE TABLE manifest_new (ManifestID TEXT NOT NULL PRIMARY KEY, Name TEXT NOT NULL, FileName TEXT NOT NULL, RestorePath TEXT NOT NULL, AbsolutePath BOOLEAN NOT NULL, DateUpdated TEXT NOT NULL, UpdatedBy TEXT NOT NULL, CheckSum TEXT);"
|
||||
sSQL &= "INSERT INTO manifest_new (ManifestID, Name, FileName, RestorePath, AbsolutePath, DateUpdated, UpdatedBy) "
|
||||
sSQL &= "SELECT ManifestID, Name, FileName, RestorePath, AbsolutePath, DateUpdated, UpdatedBy FROM manifest;"
|
||||
sSQL &= "DROP TABLE manifest; ALTER TABLE manifest_new RENAME TO manifest;"
|
||||
|
||||
'Add backup limit field
|
||||
sSQL &= "ALTER TABLE monitorlist ADD COLUMN BackupLimit INTEGER NOT NULL DEFAULT 5;"
|
||||
|
||||
sSQL &= "PRAGMA user_version=98"
|
||||
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
|
||||
'Run a compact
|
||||
CompactDatabase()
|
||||
End If
|
||||
If eDatabase = Database.Remote Then
|
||||
'Backup DB before starting
|
||||
BackupDB("v97")
|
||||
|
||||
'Overhaul Manifest Table
|
||||
sSQL = "CREATE TABLE manifest_new (ManifestID TEXT NOT NULL PRIMARY KEY, Name TEXT NOT NULL, FileName TEXT NOT NULL, RestorePath TEXT NOT NULL, AbsolutePath BOOLEAN NOT NULL, DateUpdated TEXT NOT NULL, UpdatedBy TEXT NOT NULL, CheckSum TEXT);"
|
||||
sSQL &= "INSERT INTO manifest_new (ManifestID, Name, FileName, RestorePath, AbsolutePath, DateUpdated, UpdatedBy) "
|
||||
sSQL &= "SELECT ManifestID, Name, FileName, RestorePath, AbsolutePath, DateUpdated, UpdatedBy FROM manifest;"
|
||||
sSQL &= "DROP TABLE manifest; ALTER TABLE manifest_new RENAME TO manifest;"
|
||||
|
||||
'Add backup limit field
|
||||
sSQL &= "ALTER TABLE monitorlist ADD COLUMN BackupLimit INTEGER NOT NULL DEFAULT 5;"
|
||||
|
||||
sSQL &= "PRAGMA user_version=98"
|
||||
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
|
||||
'Run a compact
|
||||
CompactDatabase()
|
||||
End If
|
||||
End If
|
||||
|
||||
'1.01 Upgrade
|
||||
If GetDatabaseVersion() < 101 Then
|
||||
If eDatabase = Database.Local Then
|
||||
'Backup DB before starting
|
||||
BackupDB("v98")
|
||||
|
||||
'Remove checksum field
|
||||
sSQL = "CREATE TABLE settings_new (SettingsID INTEGER NOT NULL PRIMARY KEY, MonitorOnStartup BOOLEAN NOT NULL, StartToTray BOOLEAN NOT NULL, ShowDetectionToolTips BOOLEAN NOT NULL, " &
|
||||
"DisableConfirmation BOOLEAN NOT NULL, CreateSubFolder BOOLEAN NOT NULL, ShowOverwriteWarning BOOLEAN NOT NULL, RestoreOnLaunch BOOLEAN NOT NULL, " &
|
||||
"BackupFolder TEXT NOT NULL, Sync BOOLEAN NOT NULL, StartWithWindows BOOLEAN NOT NULL, TimeTracking BOOLEAN NOT NULL, " &
|
||||
"SupressBackup BOOLEAN NOT NULL, SupressBackupThreshold INTEGER NOT NULL, CompressionLevel INTEGER NOT NULL, Custom7zArguments TEXT, " &
|
||||
"Custom7zLocation TEXT, SyncFields INTEGER NOT NULL, AutoSaveLog BOOLEAN NOT NULL);"
|
||||
sSQL &= "INSERT INTO settings_new (SettingsID, MonitorOnStartup, StartToTray, ShowDetectionToolTips, DisableConfirmation, CreateSubFolder, " &
|
||||
"ShowOverwriteWarning, RestoreOnLaunch, BackupFolder, Sync, StartWithWindows, TimeTracking, SupressBackup, SupressBackupThreshold, " &
|
||||
"CompressionLevel, Custom7zArguments, Custom7zLocation, SyncFields, AutoSaveLog) " &
|
||||
"SELECT SettingsID, MonitorOnStartup, StartToTray, ShowDetectionToolTips, DisableConfirmation, CreateSubFolder, " &
|
||||
"ShowOverwriteWarning, RestoreOnLaunch, BackupFolder, Sync, StartWithWindows, TimeTracking, SupressBackup, SupressBackupThreshold, " &
|
||||
"CompressionLevel, Custom7zArguments, Custom7zLocation, SyncFields, AutoSaveLog FROM settings;" &
|
||||
"DROP TABLE settings; ALTER TABLE settings_new RENAME TO settings;"
|
||||
'Add new field(s)
|
||||
sSQL &= "ALTER TABLE monitorlist ADD COLUMN CleanFolder BOOLEAN NOT NULL DEFAULT 0;"
|
||||
sSQL &= "ALTER TABLE settings ADD COLUMN AutoRestore BOOLEAN NOT NULL DEFAULT 0;"
|
||||
sSQL &= "ALTER TABLE settings ADD COLUMN AutoMark BOOLEAN NOT NULL DEFAULT 0;"
|
||||
sSQL &= "PRAGMA user_version=101"
|
||||
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
End If
|
||||
If eDatabase = Database.Remote Then
|
||||
'Backup DB before starting
|
||||
BackupDB("v98")
|
||||
|
||||
'Add new field(s)
|
||||
sSQL = "ALTER TABLE monitorlist ADD COLUMN CleanFolder BOOLEAN NOT NULL DEFAULT 0;"
|
||||
sSQL &= "PRAGMA user_version=101"
|
||||
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Public Function GetDBSize() As Long
|
||||
|
||||
+123
-15
@@ -9,13 +9,18 @@ Public Class mgrSettings
|
||||
Private bCreateSubFolder As Boolean = False
|
||||
Private bShowOverwriteWarning As Boolean = True
|
||||
Private bRestoreOnLaunch As Boolean = False
|
||||
Private bAutoRestore As Boolean = False
|
||||
Private bAutoMark As Boolean = False
|
||||
Private bSync As Boolean = True
|
||||
Private bCheckSum As Boolean = True
|
||||
Private bTimeTracking As Boolean = True
|
||||
Private bSupressBackup As Boolean = False
|
||||
Private iSupressBackupThreshold As Integer = 10
|
||||
Private iCompressionLevel As Integer = 5
|
||||
Private s7zArguments As String = String.Empty
|
||||
Private s7zLocation As String = String.Empty
|
||||
Private sBackupFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments).TrimEnd(New Char() {"\", "/"})
|
||||
Private eSyncFields As clsGame.eOptionalSyncFields = clsGame.eOptionalSyncFields.None Or clsGame.eOptionalSyncFields.TimeStamp
|
||||
Private bAutoSaveLog As Boolean = False
|
||||
|
||||
Property StartWithWindows As Boolean
|
||||
Get
|
||||
@@ -89,6 +94,24 @@ Public Class mgrSettings
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property AutoRestore As Boolean
|
||||
Get
|
||||
Return bAutoRestore
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bAutoRestore = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property AutoMark As Boolean
|
||||
Get
|
||||
Return bAutoMark
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bAutoMark = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Sync As Boolean
|
||||
Get
|
||||
Return bSync
|
||||
@@ -98,15 +121,6 @@ Public Class mgrSettings
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property CheckSum As Boolean
|
||||
Get
|
||||
Return bCheckSum
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bCheckSum = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property TimeTracking As Boolean
|
||||
Get
|
||||
Return bTimeTracking
|
||||
@@ -143,6 +157,72 @@ Public Class mgrSettings
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Custom7zArguments As String
|
||||
Get
|
||||
Return s7zArguments
|
||||
End Get
|
||||
Set(value As String)
|
||||
s7zArguments = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
ReadOnly Property Prepared7zArguments As String
|
||||
Get
|
||||
'Prepare custom 7z arguments
|
||||
Dim sPreparedArguments As String
|
||||
If s7zArguments <> String.Empty Then
|
||||
'Surround the arguments with spaces to be inserted into command
|
||||
sPreparedArguments = " " & s7zArguments & " "
|
||||
Else
|
||||
'The command always needs at least one space inserted
|
||||
sPreparedArguments = " "
|
||||
End If
|
||||
Return sPreparedArguments
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property Custom7zLocation As String
|
||||
Get
|
||||
Return s7zLocation
|
||||
End Get
|
||||
Set(value As String)
|
||||
s7zLocation = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
ReadOnly Property Is7zUtilityValid As Boolean
|
||||
Get
|
||||
'We don't use a packaged 7za on Unix, assume valid.
|
||||
If mgrCommon.IsUnix Then
|
||||
Return True
|
||||
End If
|
||||
|
||||
If s7zLocation = String.Empty Then
|
||||
'Verify stored hash of the default utility if we're using it
|
||||
Return mgrCommon.UtilityHash = mgrHash.Generate_SHA256_Hash(mgrPath.Default7zLocation)
|
||||
Else
|
||||
'When using a custom utility assume it's valid, we have no way to be sure.
|
||||
Return True
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property Utility7zLocation As String
|
||||
Get
|
||||
'Return default utility when custom setting is not used
|
||||
If s7zLocation = String.Empty Then
|
||||
Return mgrPath.Default7zLocation
|
||||
Else
|
||||
'Check if custom utility is available, if not use the default utility
|
||||
If File.Exists(s7zLocation) Then
|
||||
Return s7zLocation
|
||||
Else
|
||||
Return mgrPath.Default7zLocation
|
||||
End If
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property BackupFolder As String
|
||||
Get
|
||||
Return sBackupFolder
|
||||
@@ -152,6 +232,24 @@ Public Class mgrSettings
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property SyncFields As clsGame.eOptionalSyncFields
|
||||
Get
|
||||
Return eSyncFields
|
||||
End Get
|
||||
Set(value As clsGame.eOptionalSyncFields)
|
||||
eSyncFields = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property AutoSaveLog As Boolean
|
||||
Get
|
||||
Return bAutoSaveLog
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bAutoSaveLog = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Sub SaveFromClass()
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim sSQL As String
|
||||
@@ -161,8 +259,9 @@ Public Class mgrSettings
|
||||
oDatabase.RunParamQuery(sSQL, New Hashtable)
|
||||
|
||||
sSQL = "INSERT INTO settings VALUES (1, @MonitorOnStartup, @StartToTray, @ShowDetectionToolTips, @DisableConfirmation, "
|
||||
sSQL &= "@CreateSubFolder, @ShowOverwriteWarning, @RestoreOnLaunch, @BackupFolder, @Sync, @CheckSum, @StartWithWindows, "
|
||||
sSQL &= "@TimeTracking, @SupressBackup, @SupressBackupThreshold, @CompressionLevel)"
|
||||
sSQL &= "@CreateSubFolder, @ShowOverwriteWarning, @RestoreOnLaunch, @BackupFolder, @Sync, @StartWithWindows, "
|
||||
sSQL &= "@TimeTracking, @SupressBackup, @SupressBackupThreshold, @CompressionLevel, @Custom7zArguments, @Custom7zLocation, "
|
||||
sSQL &= "@SyncFields, @AutoSaveLog, @AutoRestore, @AutoMark)"
|
||||
|
||||
hshParams.Add("MonitorOnStartup", MonitorOnStartup)
|
||||
hshParams.Add("StartToTray", StartToTray)
|
||||
@@ -173,13 +272,17 @@ Public Class mgrSettings
|
||||
hshParams.Add("RestoreOnLaunch", RestoreOnLaunch)
|
||||
hshParams.Add("BackupFolder", BackupFolder)
|
||||
hshParams.Add("Sync", Sync)
|
||||
hshParams.Add("CheckSum", CheckSum)
|
||||
hshParams.Add("StartWithWindows", StartWithWindows)
|
||||
hshParams.Add("TimeTracking", TimeTracking)
|
||||
hshParams.Add("SupressBackup", SupressBackup)
|
||||
hshParams.Add("SupressBackupThreshold", SupressBackupThreshold)
|
||||
hshParams.Add("CompressionLevel", CompressionLevel)
|
||||
|
||||
hshParams.Add("Custom7zArguments", Custom7zArguments)
|
||||
hshParams.Add("Custom7zLocation", Custom7zLocation)
|
||||
hshParams.Add("SyncFields", SyncFields)
|
||||
hshParams.Add("AutoSaveLog", AutoSaveLog)
|
||||
hshParams.Add("AutoRestore", AutoRestore)
|
||||
hshParams.Add("AutoMark", AutoMark)
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
End Sub
|
||||
|
||||
@@ -203,12 +306,17 @@ Public Class mgrSettings
|
||||
RestoreOnLaunch = CBool(dr("RestoreOnLaunch"))
|
||||
BackupFolder = CStr(dr("BackupFolder"))
|
||||
Sync = CBool(dr("Sync"))
|
||||
CheckSum = CBool(dr("CheckSum"))
|
||||
StartWithWindows = CBool(dr("StartWithWindows"))
|
||||
TimeTracking = CBool(dr("TimeTracking"))
|
||||
SupressBackup = CBool(dr("SupressBackup"))
|
||||
SupressBackupThreshold = CInt(dr("SupressBackupThreshold"))
|
||||
CompressionLevel = CInt(dr("CompressionLevel"))
|
||||
If Not IsDBNull(dr("Custom7zArguments")) Then Custom7zArguments = CStr(dr("Custom7zArguments"))
|
||||
If Not IsDBNull(dr("Custom7zLocation")) Then Custom7zLocation = CStr(dr("Custom7zLocation"))
|
||||
SyncFields = CInt(dr("SyncFields"))
|
||||
AutoSaveLog = CBool(dr("AutoSaveLog"))
|
||||
AutoRestore = CBool(dr("AutoRestore"))
|
||||
AutoMark = CBool(dr("AutoMark"))
|
||||
Next
|
||||
|
||||
oDatabase.Disconnect()
|
||||
|
||||
+27
-15
@@ -1,26 +1,44 @@
|
||||
Public Class mgrTags
|
||||
|
||||
Private Shared Function MapToObject(ByVal dr As DataRow) As clsTag
|
||||
Dim oTag As New clsTag
|
||||
|
||||
oTag.ID = CStr(dr("TagID"))
|
||||
oTag.Name = CStr(dr("Name"))
|
||||
|
||||
Return oTag
|
||||
End Function
|
||||
|
||||
Private Shared Function SetCoreParameters(ByVal oTag As clsTag) As Hashtable
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
hshParams.Add("ID", oTag.ID)
|
||||
hshParams.Add("Name", oTag.Name)
|
||||
|
||||
Return hshParams
|
||||
End Function
|
||||
|
||||
Public Shared Sub DoTagAdd(ByVal oTag As clsTag, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
Dim hshParams As Hashtable
|
||||
|
||||
sSQL = "INSERT INTO tags VALUES (@ID, @Name)"
|
||||
hshParams.Add("ID", oTag.ID)
|
||||
hshParams.Add("Name", oTag.Name)
|
||||
|
||||
hshParams = SetCoreParameters(oTag)
|
||||
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
End Sub
|
||||
|
||||
Public Shared Sub DoTagUpdate(ByVal oTag As clsTag, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
Dim hshParams As Hashtable
|
||||
|
||||
sSQL = "UPDATE tags SET Name=@Name "
|
||||
sSQL &= "WHERE TagID = @ID"
|
||||
|
||||
hshParams.Add("Name", oTag.Name)
|
||||
hshParams.Add("ID", oTag.ID)
|
||||
hshParams = SetCoreParameters(oTag)
|
||||
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
|
||||
@@ -57,9 +75,7 @@
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oTag = New clsTag
|
||||
oTag.ID = CStr(dr("TagID"))
|
||||
oTag.Name = CStr(dr("Name"))
|
||||
oTag = MapToObject(dr)
|
||||
Next
|
||||
|
||||
Return oTag
|
||||
@@ -80,9 +96,7 @@
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oTag = New clsTag
|
||||
oTag.ID = CStr(dr("TagID"))
|
||||
oTag.Name = CStr(dr("Name"))
|
||||
oTag = MapToObject(dr)
|
||||
Next
|
||||
|
||||
Return oTag
|
||||
@@ -124,9 +138,7 @@
|
||||
oData = oDatabase.ReadParamData(sSQL, New Hashtable)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oTag = New clsTag
|
||||
oTag.ID = CStr(dr("TagID"))
|
||||
oTag.Name = CStr(dr("Name"))
|
||||
oTag = MapToObject(dr)
|
||||
hshList.Add(oTag.Name, oTag)
|
||||
Next
|
||||
|
||||
|
||||
@@ -1,5 +1,25 @@
|
||||
Public Class mgrVariables
|
||||
|
||||
Private Shared Function MapToObject(ByVal dr As DataRow) As clsPathVariable
|
||||
Dim oCustomVariable As New clsPathVariable
|
||||
|
||||
oCustomVariable.ID = CStr(dr("VariableID"))
|
||||
oCustomVariable.Name = CStr(dr("Name"))
|
||||
oCustomVariable.Path = CStr(dr("Path"))
|
||||
|
||||
Return oCustomVariable
|
||||
End Function
|
||||
|
||||
Private Shared Function SetCoreParameters(ByVal oCustomVariable As clsPathVariable) As Hashtable
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
hshParams.Add("ID", oCustomVariable.ID)
|
||||
hshParams.Add("Name", oCustomVariable.Name)
|
||||
hshParams.Add("Path", oCustomVariable.Path)
|
||||
|
||||
Return hshParams
|
||||
End Function
|
||||
|
||||
Public Shared Sub DoPathUpdate(ByVal sOld As String, ByVal sNew As String)
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim sSQL As String
|
||||
@@ -15,26 +35,22 @@
|
||||
Public Shared Sub DoVariableAdd(ByVal oCustomVariable As clsPathVariable)
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
Dim hshParams As Hashtable
|
||||
|
||||
sSQL = "INSERT INTO variables VALUES (@ID, @Name, @Path)"
|
||||
hshParams.Add("ID", oCustomVariable.ID)
|
||||
hshParams.Add("Name", oCustomVariable.Name)
|
||||
hshParams.Add("Path", oCustomVariable.Path)
|
||||
hshParams = SetCoreParameters(oCustomVariable)
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
End Sub
|
||||
|
||||
Public Shared Sub DoVariableUpdate(ByVal oCustomVariable As clsPathVariable)
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
Dim hshParams As Hashtable
|
||||
|
||||
sSQL = "UPDATE variables SET Name=@Name, Path = @Path "
|
||||
sSQL &= "WHERE VariableID = @ID"
|
||||
|
||||
hshParams.Add("Name", oCustomVariable.Name)
|
||||
hshParams.Add("Path", oCustomVariable.Path)
|
||||
hshParams.Add("ID", oCustomVariable.ID)
|
||||
hshParams = SetCoreParameters(oCustomVariable)
|
||||
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
|
||||
@@ -69,10 +85,7 @@
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oCustomVariable = New clsPathVariable
|
||||
oCustomVariable.ID = CStr(dr("VariableID"))
|
||||
oCustomVariable.Name = CStr(dr("Name"))
|
||||
oCustomVariable.Path = CStr(dr("Path"))
|
||||
oCustomVariable = MapToObject(dr)
|
||||
Next
|
||||
|
||||
Return oCustomVariable
|
||||
@@ -93,10 +106,7 @@
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oCustomVariable = New clsPathVariable
|
||||
oCustomVariable.ID = CStr(dr("VariableID"))
|
||||
oCustomVariable.Name = CStr(dr("Name"))
|
||||
oCustomVariable.Path = CStr(dr("Path"))
|
||||
oCustomVariable = MapToObject(dr)
|
||||
Next
|
||||
|
||||
Return oCustomVariable
|
||||
@@ -138,10 +148,7 @@
|
||||
oData = oDatabase.ReadParamData(sSQL, New Hashtable)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oCustomVariable = New clsPathVariable
|
||||
oCustomVariable.ID = CStr(dr("VariableID"))
|
||||
oCustomVariable.Name = CStr(dr("Name"))
|
||||
oCustomVariable.Path = CStr(dr("Path"))
|
||||
oCustomVariable = MapToObject(dr)
|
||||
hshList.Add(oCustomVariable.Name, oCustomVariable)
|
||||
Next
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ Imports System.Runtime.InteropServices
|
||||
<Assembly: AssemblyDescription("Game Backup Monitor")>
|
||||
<Assembly: AssemblyCompany("Michael J. Seiferling")>
|
||||
<Assembly: AssemblyProduct("Game Backup Monitor")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2015 Michael J. Seiferling")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2016 Michael J. Seiferling")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
@@ -33,7 +33,7 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("0.96.*")>
|
||||
<Assembly: AssemblyFileVersion("0.96.0.0")>
|
||||
<Assembly: AssemblyVersion("1.0.1.*")>
|
||||
<Assembly: AssemblyFileVersion("1.0.1.0")>
|
||||
|
||||
<Assembly: NeutralResourcesLanguageAttribute("en")>
|
||||
Generated
+578
-83
@@ -87,6 +87,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to 7-Zip (7za.exe) is invalid and has been prevented from running..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property App_Invalid7zDetected() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("App_Invalid7zDetected", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to [PARAM] KB.
|
||||
'''</summary>
|
||||
@@ -123,6 +132,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to N/A.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property App_NotAvailable() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("App_NotAvailable", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to http://mikemaximus.github.io/gbm-web/GBM_Official.xml.
|
||||
'''</summary>
|
||||
@@ -132,6 +150,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to http://mikemaximus.github.io/gbm-web/GBM_Official_Linux.xml.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property App_URLImportLinux() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("App_URLImportLinux", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to http://mikemaximus.github.io/gbm-web/manual.html.
|
||||
'''</summary>
|
||||
@@ -232,7 +259,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Save Entire Folder.
|
||||
''' Looks up a localized string similar to Save entire folder.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmAddWizard_chkFolderSave() As String
|
||||
Get
|
||||
@@ -241,7 +268,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Time Stamp Backup.
|
||||
''' Looks up a localized string similar to Save multiple backups.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmAddWizard_chkTimeStamp() As String
|
||||
Get
|
||||
@@ -474,6 +501,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Backup Limit.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmAddWizard_lblLimit() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmAddWizard_lblLimit", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to The name will be automatically filtered for length and invalid characters. You may drag and drop a shortcut here to complete this step, only Windows shortcuts are currently supported..
|
||||
'''</summary>
|
||||
@@ -547,7 +583,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to If you're unsure of exactly which files to backup, make sure Save Entire Folder is checked. You can also time stamp your backup files to make incremental backups..
|
||||
''' Looks up a localized string similar to If you're unsure of exactly which files to backup, make sure Save entire folder is checked. You can also choose to save multiple backups and set a limit on how many to keep..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmAddWizard_lblStep3Instructions() As String
|
||||
Get
|
||||
@@ -682,7 +718,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Timestamp.
|
||||
''' Looks up a localized string similar to Multiple Backups.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmAddWizard_Summary_Timestamp() As String
|
||||
Get
|
||||
@@ -1042,7 +1078,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to [PARAM] by [PARAM].
|
||||
''' Looks up a localized string similar to [PARAM] ([PARAM]).
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_BackupTimeAndName() As String
|
||||
Get
|
||||
@@ -1050,6 +1086,24 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Choose a new [PARAM] backup file.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_BrowseBackup() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_BrowseBackup", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to 7-Zip.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_BrowseBackupType() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_BrowseBackupType", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to +.
|
||||
'''</summary>
|
||||
@@ -1086,6 +1140,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to &Change Backup File.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_btnChangeBackup() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_btnChangeBackup", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to C&lose.
|
||||
'''</summary>
|
||||
@@ -1230,6 +1293,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Delete folder on restore.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_chkCleanFolder() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_chkCleanFolder", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Monitor this game.
|
||||
'''</summary>
|
||||
@@ -1258,7 +1330,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Timestamp each backup.
|
||||
''' Looks up a localized string similar to Save multiple backups.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_chkTimeStamp() As String
|
||||
Get
|
||||
@@ -1320,6 +1392,24 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to &All Files.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_cmsDeleteAll() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_cmsDeleteAll", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to &Selected File.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_cmsDeleteOne() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_cmsDeleteOne", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to &File....
|
||||
'''</summary>
|
||||
@@ -1348,7 +1438,25 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to This will delete the backup file and all records of this backup. This cannot be undone. [BR][BR]Do you want to remove the data for [PARAM]?.
|
||||
''' Looks up a localized string similar to [PARAM] will be the new backup file for [PARAM].[BR][BR]Is this correct?.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_ConfirmBackupChange() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_ConfirmBackupChange", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Do you want to restore [PARAM] now?.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_ConfirmBackupChangeRestore() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_ConfirmBackupChangeRestore", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to This will delete the selected backup file. This cannot be undone. [BR][BR]Do you want to delete [PARAM]?.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_ConfirmBackupDelete() As String
|
||||
Get
|
||||
@@ -1357,11 +1465,11 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to The backup folder [PARAM] still contains [PARAM] directories and [PARAM] files.[BR][BR]Do you want to delete the contents and remove the sub-folder for this game?.
|
||||
''' Looks up a localized string similar to This will delete all backup files for [PARAM]. This cannot be undone. [BR][BR]Do you want to continue?.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_ConfirmBackupFolderDelete() As String
|
||||
Friend ReadOnly Property frmGameManager_ConfirmBackupDeleteAll() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_ConfirmBackupFolderDelete", resourceCulture)
|
||||
Return ResourceManager.GetString("frmGameManager_ConfirmBackupDeleteAll", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -1455,15 +1563,6 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to You appear to be using a Unix based operating system. The official list currently contains only Microsoft Windows game configurations.[BR][BR]Do you wish to continue?.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_ConfirmUnixImportWarning() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_ConfirmUnixImportWarning", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Game Backup Monitor Export.
|
||||
'''</summary>
|
||||
@@ -1473,6 +1572,24 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to [PARAM] is already the current backup file..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_ErrorBackupChangeFileName() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_ErrorBackupChangeFileName", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to You cannot choose a file located outside the current [PARAM] backup folder..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_ErrorBackupChangePath() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_ErrorBackupChangePath", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to A game with this exact name and process already exists..
|
||||
'''</summary>
|
||||
@@ -1483,7 +1600,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to The selected game(s) have no backup data..
|
||||
''' Looks up a localized string similar to The selected game(s) have no backup data or can't be restored with their current configuration..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_ErrorNoBackupData() As String
|
||||
Get
|
||||
@@ -1518,6 +1635,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to A backup cannot be run on the selected game(s) with their current configuration..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_ErrorNoValidBackup() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_ErrorNoValidBackup", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to [PARAM] uses a relative path and the game path has not been set..
|
||||
'''</summary>
|
||||
@@ -1662,6 +1788,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Backup File:.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_lblBackupFile() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_lblBackupFile", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Company:.
|
||||
'''</summary>
|
||||
@@ -1671,24 +1806,6 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Current Backup:.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_lblCurrentBackup() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_lblCurrentBackup", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Backup Size:.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_lblFileSize() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_lblFileSize", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Game Path:.
|
||||
'''</summary>
|
||||
@@ -1717,11 +1834,20 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Local Backup:.
|
||||
''' Looks up a localized string similar to Backup Limit.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_lblLastBackup() As String
|
||||
Friend ReadOnly Property frmGameManager_lblLimit() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_lblLastBackup", resourceCulture)
|
||||
Return ResourceManager.GetString("frmGameManager_lblLimit", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Local Data:.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_lblLocalData() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_lblLocalData", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -1743,6 +1869,24 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Quick Filter:.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_lblQuickFilter() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_lblQuickFilter", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Backup Data:.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_lblRemote() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_lblRemote", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Restore Path:.
|
||||
'''</summary>
|
||||
@@ -1771,11 +1915,11 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Never.
|
||||
''' Looks up a localized string similar to None.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_Never() As String
|
||||
Friend ReadOnly Property frmGameManager_None() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_Never", resourceCulture)
|
||||
Return ResourceManager.GetString("frmGameManager_None", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -1807,7 +1951,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to New Saves Pending.
|
||||
''' Looks up a localized string similar to New Backups Pending.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_optPendingRestores() As String
|
||||
Get
|
||||
@@ -1824,6 +1968,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Unknown.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_Unknown() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_Unknown", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Up to Date!.
|
||||
'''</summary>
|
||||
@@ -2131,7 +2284,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Game Backup Monitor[BR]Version: [PARAM] Beta ([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][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>
|
||||
Friend ReadOnly Property frmMain_About() As String
|
||||
Get
|
||||
@@ -2148,6 +2301,24 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to The saved game folder for [PARAM] does not exist or could not be determined, the backup has been automatically marked as restored..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmMain_AutoMark() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmMain_AutoMark", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to [PARAM] has multiple configurations and cannot be automatically restored..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmMain_AutoRestoreFailure() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmMain_AutoRestoreFailure", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Backup in Progress....
|
||||
'''</summary>
|
||||
@@ -2310,6 +2481,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to The custom 7-Zip utility could not be found at:[BR][BR][PARAM][BR][BR]Please check your settings, the default 7-Zip utility will be used..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmMain_Error7zCustom() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmMain_Error7zCustom", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to 7-Zip was not found. The application cannot continue..
|
||||
'''</summary>
|
||||
@@ -2320,7 +2500,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to [PARAM] is running as Administrator and GBM is not, GBM cannot detect the required information to save your backup..
|
||||
''' Looks up a localized string similar to [PARAM] was running as Administrator and GBM is not, GBM cannot detect the required information to save your backup..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmMain_ErrorAdminBackup() As String
|
||||
Get
|
||||
@@ -2446,7 +2626,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Multiple possible 64-bit games have been detected, GBM cannot detect the path to identify your game or save your backup.[BR][BR]Please install the 64-bit version of GBM to detect and backup this game properly..
|
||||
''' Looks up a localized string similar to Install the 64-bit version of GBM to detect the last running game..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmMain_ErrorMulti64() As String
|
||||
Get
|
||||
@@ -2455,7 +2635,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Multiple possible games have been detected running as Administrator and GBM is not, GBM cannot detect the path to identify your game or save your backup.[BR][BR]Please run GBM as Administrator to properly detect and backup this game..
|
||||
''' Looks up a localized string similar to Restart GBM as Administrator to detect the last running game..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmMain_ErrorMultiAdmin() As String
|
||||
Get
|
||||
@@ -2806,7 +2986,16 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to The session log has been cleared due to size and auto-saved to [PARAM]..
|
||||
''' Looks up a localized string similar to The session log reached maximum length and has been cleared..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmMain_LogAutoClear() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmMain_LogAutoClear", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to The session log reached maximum length and has been auto-saved to [PARAM]..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmMain_LogAutoSave() As String
|
||||
Get
|
||||
@@ -2896,7 +3085,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to [PARAM] New Saves Pending.
|
||||
''' Looks up a localized string similar to [PARAM] New Backups Pending.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmMain_NewSaveNotificationMulti() As String
|
||||
Get
|
||||
@@ -2905,7 +3094,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to [PARAM] New Save Pending.
|
||||
''' Looks up a localized string similar to [PARAM] New Backup Pending.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmMain_NewSaveNotificationSingle() As String
|
||||
Get
|
||||
@@ -2913,6 +3102,24 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to The saved game folder for [PARAM] does not exist or could not be determined, this backup has been skipped..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmMain_NoAutoMark() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmMain_NoAutoMark", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to The backup file for [PARAM] has no checksum, it cannot be automatically restored..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmMain_NoCheckSum() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmMain_NoCheckSum", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Game details are unavailable..
|
||||
'''</summary>
|
||||
@@ -2985,6 +3192,33 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to [PARAM] new saved game backups are being automatically restored..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmMain_RestoreNotificationMulti() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmMain_RestoreNotificationMulti", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to A new saved game backup for [PARAM] is being automatically restored..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmMain_RestoreNotificationSingle() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmMain_RestoreNotificationSingle", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to The backup file for [PARAM] is not ready to restore..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmMain_RestoreNotReady() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmMain_RestoreNotReady", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to GBM is running with Administrator privileges..
|
||||
'''</summary>
|
||||
@@ -3057,6 +3291,24 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Executable.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_7zaFileType() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSettings_7zaFileType", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Locate 7-Zip Console (7za).
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_Browse7za() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSettings_Browse7za", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Choose a backup folder:.
|
||||
'''</summary>
|
||||
@@ -3084,6 +3336,24 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Set &Defaults.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_btnDefaults() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSettings_btnDefaults", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Choose &Optional Fields....
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_btnOptionalFields() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSettings_btnOptionalFields", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to &Save.
|
||||
'''</summary>
|
||||
@@ -3147,6 +3417,33 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Automatically mark new backups as restored when appropriate.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_chkAutoMark() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSettings_chkAutoMark", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Automatically restore new backups.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_chkAutoRestore() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSettings_chkAutoRestore", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Autosave log when max length is exceeded.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_chkAutoSaveLog() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSettings_chkAutoSaveLog", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Disable backup confirmation.
|
||||
'''</summary>
|
||||
@@ -3156,15 +3453,6 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Verify backup files with a checksum.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_chkCheckSum() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSettings_chkCheckSum", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Create a sub-folder for each game.
|
||||
'''</summary>
|
||||
@@ -3193,11 +3481,11 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Notify when there are new backup files to restore.
|
||||
''' Looks up a localized string similar to Display notifications about new backups.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_chkRestoreOnLaunch() As String
|
||||
Friend ReadOnly Property frmSettings_chkRestoreNotify() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSettings_chkRestoreOnLaunch", resourceCulture)
|
||||
Return ResourceManager.GetString("frmSettings_chkRestoreNotify", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -3238,7 +3526,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Sync game list data with backup folder.
|
||||
''' Looks up a localized string similar to Enable syncing.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_chkSync() As String
|
||||
Get
|
||||
@@ -3255,6 +3543,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Do you want to revert all settings to their defaults?.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_ConfirmDefaults() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSettings_ConfirmDefaults", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to The backup folder does not exist. Please choose a valid backup folder..
|
||||
'''</summary>
|
||||
@@ -3264,6 +3561,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to The custom 7-Zip location [PARAM] does not exist..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_ErrorLocation() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSettings_ErrorLocation", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Settings.
|
||||
'''</summary>
|
||||
@@ -3274,38 +3580,74 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to 7z Options.
|
||||
''' Looks up a localized string similar to Advanced.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_grp7z() As String
|
||||
Friend ReadOnly Property frmSettings_grp7zAdvanced() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSettings_grp7z", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Backup and Restore.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_grpBackup() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSettings_grpBackup", resourceCulture)
|
||||
Return ResourceManager.GetString("frmSettings_grp7zAdvanced", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to General.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_grpGeneral() As String
|
||||
Friend ReadOnly Property frmSettings_grp7zGeneral() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSettings_grpGeneral", resourceCulture)
|
||||
Return ResourceManager.GetString("frmSettings_grp7zGeneral", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Paths.
|
||||
''' Looks up a localized string similar to Version Information.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_grpPaths() As String
|
||||
Friend ReadOnly Property frmSettings_grp7zInformation() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSettings_grpPaths", resourceCulture)
|
||||
Return ResourceManager.GetString("frmSettings_grp7zInformation", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Backup Handling.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_grpBackupHandling() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSettings_grpBackupHandling", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Folders.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_grpFolderOptions() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSettings_grpFolderOptions", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Game Data.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_grpGameData() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSettings_grpGameData", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Startup.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_grpStartup() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSettings_grpStartup", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Custom Arguments:.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_lblArguments() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSettings_lblArguments", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -3327,6 +3669,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Custom Location:.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_lblLocation() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSettings_lblLocation", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to minutes.
|
||||
'''</summary>
|
||||
@@ -3336,6 +3687,51 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to 7-Zip.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_lstSettings_7z() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSettings_lstSettings_7z", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Backup and Restore.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_lstSettings_BackupRestore() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSettings_lstSettings_BackupRestore", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to General.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_lstSettings_General() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSettings_lstSettings_General", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Invalid or poorly formatted 7-Zip arguments can cause backup or restore operations to fail.[BR][BR]If problems occur, clear the custom arguments and try again..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_WarningArguments() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSettings_WarningArguments", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to You have chosen a custom utility that does not appear to be 7-Zip. [BR][BR]GBM only supports the use of 7-Zip Console (7za)..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_WarningLocation() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSettings_WarningLocation", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Choose a backup folder:.
|
||||
'''</summary>
|
||||
@@ -3597,6 +3993,96 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to &Cancel.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSyncFields_btnCancel() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSyncFields_btnCancel", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to &Save.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSyncFields_btnSave() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSyncFields_btnSave", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Company.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSyncFields_chkCompany() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSyncFields_chkCompany", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Game Path (Not Recommended).
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSyncFields_chkGamePath() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSyncFields_chkGamePath", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Icon (Not Recommended).
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSyncFields_chkIcon() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSyncFields_chkIcon", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Monitor this game.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSyncFields_chkMonitorGame() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSyncFields_chkMonitorGame", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Save multiple backups.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSyncFields_chkTimeStamp() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSyncFields_chkTimeStamp", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Version.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSyncFields_chkVersion() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSyncFields_chkVersion", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Optional Sync Fields.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSyncFields_FormName() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSyncFields_FormName", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Available Fields.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSyncFields_grpFields() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSyncFields_grpFields", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to +.
|
||||
'''</summary>
|
||||
@@ -4006,6 +4492,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to [PARAM] was automatically removed..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property mgrBackup_BackupLimitExceeded() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("mgrBackup_BackupLimitExceeded", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to [PARAM] backup finished with warnings or errors..
|
||||
'''</summary>
|
||||
@@ -4160,7 +4655,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to GBM data already exists in the backup folder.[BR][BR]Do you want to make your local game list the new master game list in this folder? (Recommended)[BR][BR]Choosing No will sync your local game list to the current master game list in this folder..
|
||||
''' Looks up a localized string similar to The sync settings have changed and data already exists in the backup folder.[BR][BR]Do you want to make your current game data on this PC the new master game data in this folder? (Highly Recommended)[BR][BR]Choosing No will sync your game data on this PC to the current master game data in this folder..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property mgrMonitorList_ConfirmExistingData() As String
|
||||
Get
|
||||
|
||||
+211
-46
@@ -122,7 +122,7 @@
|
||||
<value>..\Resources\Admin.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="frmMain_About" xml:space="preserve">
|
||||
<value>Game Backup Monitor[BR]Version: [PARAM] Beta ([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][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 name="frmMain_ManifestAreadyClean" xml:space="preserve">
|
||||
<value>The local manifest is clean.</value>
|
||||
@@ -197,7 +197,7 @@
|
||||
<value>7-Zip was not found. The application cannot continue.</value>
|
||||
</data>
|
||||
<data name="frmMain_ErrorAdminBackup" xml:space="preserve">
|
||||
<value>[PARAM] is running as Administrator and GBM is not, GBM cannot detect the required information to save your backup.</value>
|
||||
<value>[PARAM] was running as Administrator and GBM is not, GBM cannot detect the required information to save your backup.</value>
|
||||
</data>
|
||||
<data name="frmMain_ErrorAdminDetect" xml:space="preserve">
|
||||
<value>[PARAM] is running as Administrator and GBM is not.[BR]You cannot cancel monitoring at this time.[BR][BR]Run GBM as Administrator to prevent this issue.</value>
|
||||
@@ -227,10 +227,10 @@
|
||||
<value>The GBM data (Version [PARAM]) in your backup folder is too new for your version of GBM (Version [PARAM])[BR][BR]All computers sharing a backup folder must use the same version of GBM. The application cannot proceed.</value>
|
||||
</data>
|
||||
<data name="frmMain_ErrorMulti64" xml:space="preserve">
|
||||
<value>Multiple possible 64-bit games have been detected, GBM cannot detect the path to identify your game or save your backup.[BR][BR]Please install the 64-bit version of GBM to detect and backup this game properly.</value>
|
||||
<value>Install the 64-bit version of GBM to detect the last running game.</value>
|
||||
</data>
|
||||
<data name="frmMain_ErrorMultiAdmin" xml:space="preserve">
|
||||
<value>Multiple possible games have been detected running as Administrator and GBM is not, GBM cannot detect the path to identify your game or save your backup.[BR][BR]Please run GBM as Administrator to properly detect and backup this game.</value>
|
||||
<value>Restart GBM as Administrator to detect the last running game.</value>
|
||||
</data>
|
||||
<data name="frmMain_ErrorRelativePath" xml:space="preserve">
|
||||
<value>[PARAM] uses a relative path and has never been detected on this computer.</value>
|
||||
@@ -287,10 +287,10 @@
|
||||
<value>Multiple Games Detected</value>
|
||||
</data>
|
||||
<data name="frmMain_NewSaveNotificationMulti" xml:space="preserve">
|
||||
<value>[PARAM] New Saves Pending</value>
|
||||
<value>[PARAM] New Backups Pending</value>
|
||||
</data>
|
||||
<data name="frmMain_NewSaveNotificationSingle" xml:space="preserve">
|
||||
<value>[PARAM] New Save Pending</value>
|
||||
<value>[PARAM] New Backup Pending</value>
|
||||
</data>
|
||||
<data name="frmMain_NoDetails" xml:space="preserve">
|
||||
<value>Game details are unavailable.</value>
|
||||
@@ -431,7 +431,7 @@
|
||||
<value>[PARAM] MB</value>
|
||||
</data>
|
||||
<data name="frmGameManager_BackupTimeAndName" xml:space="preserve">
|
||||
<value>[PARAM] by [PARAM]</value>
|
||||
<value>[PARAM] ([PARAM])</value>
|
||||
</data>
|
||||
<data name="frmGameManager_btnAdd" xml:space="preserve">
|
||||
<value>+</value>
|
||||
@@ -503,7 +503,7 @@
|
||||
<value>Monitor only</value>
|
||||
</data>
|
||||
<data name="frmGameManager_chkTimeStamp" xml:space="preserve">
|
||||
<value>Timestamp each backup</value>
|
||||
<value>Save multiple backups</value>
|
||||
</data>
|
||||
<data name="frmGameManager_ChooseCustomIcon" xml:space="preserve">
|
||||
<value>Choose a custom icon for the game</value>
|
||||
@@ -527,10 +527,7 @@
|
||||
<value>Are you sure you want to run a backup for [PARAM]? This will close the form.</value>
|
||||
</data>
|
||||
<data name="frmGameManager_ConfirmBackupDelete" xml:space="preserve">
|
||||
<value>This will delete the backup file and all records of this backup. This cannot be undone. [BR][BR]Do you want to remove the data for [PARAM]?</value>
|
||||
</data>
|
||||
<data name="frmGameManager_ConfirmBackupFolderDelete" xml:space="preserve">
|
||||
<value>The backup folder [PARAM] still contains [PARAM] directories and [PARAM] files.[BR][BR]Do you want to delete the contents and remove the sub-folder for this game?</value>
|
||||
<value>This will delete the selected backup file. This cannot be undone. [BR][BR]Do you want to delete [PARAM]?</value>
|
||||
</data>
|
||||
<data name="frmGameManager_ConfirmGameDelete" xml:space="preserve">
|
||||
<value>Are you sure you want to delete [PARAM]? This cannot be undone.[BR][BR]This will not delete any backup files that already exist for this game.</value>
|
||||
@@ -566,7 +563,7 @@
|
||||
<value>A game with this exact name and process already exists.</value>
|
||||
</data>
|
||||
<data name="frmGameManager_ErrorNoBackupData" xml:space="preserve">
|
||||
<value>The selected game(s) have no backup data.</value>
|
||||
<value>The selected game(s) have no backup data or can't be restored with their current configuration.</value>
|
||||
</data>
|
||||
<data name="frmGameManager_ErrorNoBackupExists" xml:space="preserve">
|
||||
<value>The backup file does not exist.</value>
|
||||
@@ -616,11 +613,11 @@
|
||||
<data name="frmGameManager_lblCompany" xml:space="preserve">
|
||||
<value>Company:</value>
|
||||
</data>
|
||||
<data name="frmGameManager_lblCurrentBackup" xml:space="preserve">
|
||||
<value>Current Backup:</value>
|
||||
<data name="frmGameManager_lblRemote" xml:space="preserve">
|
||||
<value>Backup Data:</value>
|
||||
</data>
|
||||
<data name="frmGameManager_lblFileSize" xml:space="preserve">
|
||||
<value>Backup Size:</value>
|
||||
<data name="frmGameManager_lblBackupFile" xml:space="preserve">
|
||||
<value>Backup File:</value>
|
||||
</data>
|
||||
<data name="frmGameManager_lblGamePath" xml:space="preserve">
|
||||
<value>Game Path:</value>
|
||||
@@ -631,8 +628,8 @@
|
||||
<data name="frmGameManager_lblIcon" xml:space="preserve">
|
||||
<value>Icon:</value>
|
||||
</data>
|
||||
<data name="frmGameManager_lblLastBackup" xml:space="preserve">
|
||||
<value>Local Backup:</value>
|
||||
<data name="frmGameManager_lblLocalData" xml:space="preserve">
|
||||
<value>Local Data:</value>
|
||||
</data>
|
||||
<data name="frmGameManager_lblName" xml:space="preserve">
|
||||
<value>Name:</value>
|
||||
@@ -649,8 +646,8 @@
|
||||
<data name="frmGameManager_lblVersion" xml:space="preserve">
|
||||
<value>Version:</value>
|
||||
</data>
|
||||
<data name="frmGameManager_Never" xml:space="preserve">
|
||||
<value>Never</value>
|
||||
<data name="frmGameManager_None" xml:space="preserve">
|
||||
<value>None</value>
|
||||
</data>
|
||||
<data name="frmGameManager_optAllGames" xml:space="preserve">
|
||||
<value>All</value>
|
||||
@@ -662,7 +659,7 @@
|
||||
<value>Custom</value>
|
||||
</data>
|
||||
<data name="frmGameManager_optPendingRestores" xml:space="preserve">
|
||||
<value>New Saves Pending</value>
|
||||
<value>New Backups Pending</value>
|
||||
</data>
|
||||
<data name="frmGameManager_OutofSync" xml:space="preserve">
|
||||
<value>Out of Sync</value>
|
||||
@@ -704,10 +701,10 @@
|
||||
<value>...</value>
|
||||
</data>
|
||||
<data name="frmAddWizard_chkFolderSave" xml:space="preserve">
|
||||
<value>Save Entire Folder</value>
|
||||
<value>Save entire folder</value>
|
||||
</data>
|
||||
<data name="frmAddWizard_chkTimeStamp" xml:space="preserve">
|
||||
<value>Time Stamp Backup</value>
|
||||
<value>Save multiple backups</value>
|
||||
</data>
|
||||
<data name="frmAddWizard_ChooseProcess" xml:space="preserve">
|
||||
<value>Choose exe file that starts the game</value>
|
||||
@@ -809,7 +806,7 @@
|
||||
<value>Choose Files to Backup</value>
|
||||
</data>
|
||||
<data name="frmAddWizard_lblStep3Instructions" xml:space="preserve">
|
||||
<value>If you're unsure of exactly which files to backup, make sure Save Entire Folder is checked. You can also time stamp your backup files to make incremental backups.</value>
|
||||
<value>If you're unsure of exactly which files to backup, make sure Save entire folder is checked. You can also choose to save multiple backups and set a limit on how many to keep.</value>
|
||||
</data>
|
||||
<data name="frmAddWizard_lblStep3Intro" xml:space="preserve">
|
||||
<value>Choose the location of your game's save files:</value>
|
||||
@@ -854,7 +851,7 @@
|
||||
<value>Save Path</value>
|
||||
</data>
|
||||
<data name="frmAddWizard_Summary_Timestamp" xml:space="preserve">
|
||||
<value>Timestamp</value>
|
||||
<value>Multiple Backups</value>
|
||||
</data>
|
||||
<data name="frmAdvancedImport_btnCancel" xml:space="preserve">
|
||||
<value>&Cancel</value>
|
||||
@@ -1078,9 +1075,6 @@
|
||||
<data name="frmSettings_chkBackupConfirm" xml:space="preserve">
|
||||
<value>Disable backup confirmation</value>
|
||||
</data>
|
||||
<data name="frmSettings_chkCheckSum" xml:space="preserve">
|
||||
<value>Verify backup files with a checksum</value>
|
||||
</data>
|
||||
<data name="frmSettings_chkCreateFolder" xml:space="preserve">
|
||||
<value>Create a sub-folder for each game</value>
|
||||
</data>
|
||||
@@ -1090,8 +1084,8 @@
|
||||
<data name="frmSettings_chkOverwriteWarning" xml:space="preserve">
|
||||
<value>Show overwrite warning</value>
|
||||
</data>
|
||||
<data name="frmSettings_chkRestoreOnLaunch" xml:space="preserve">
|
||||
<value>Notify when there are new backup files to restore</value>
|
||||
<data name="frmSettings_chkRestoreNotify" xml:space="preserve">
|
||||
<value>Display notifications about new backups</value>
|
||||
</data>
|
||||
<data name="frmSettings_chkShowDetectionTips" xml:space="preserve">
|
||||
<value>Show detection notifications</value>
|
||||
@@ -1106,7 +1100,7 @@
|
||||
<value>Backup only when session time exceeds</value>
|
||||
</data>
|
||||
<data name="frmSettings_chkSync" xml:space="preserve">
|
||||
<value>Sync game list data with backup folder</value>
|
||||
<value>Enable syncing</value>
|
||||
</data>
|
||||
<data name="frmSettings_chkTimeTracking" xml:space="preserve">
|
||||
<value>Enable time tracking</value>
|
||||
@@ -1117,14 +1111,11 @@
|
||||
<data name="frmSettings_FormName" xml:space="preserve">
|
||||
<value>Settings</value>
|
||||
</data>
|
||||
<data name="frmSettings_grpBackup" xml:space="preserve">
|
||||
<value>Backup and Restore</value>
|
||||
<data name="frmSettings_grpStartup" xml:space="preserve">
|
||||
<value>Startup</value>
|
||||
</data>
|
||||
<data name="frmSettings_grpGeneral" xml:space="preserve">
|
||||
<value>General</value>
|
||||
</data>
|
||||
<data name="frmSettings_grpPaths" xml:space="preserve">
|
||||
<value>Paths</value>
|
||||
<data name="frmSettings_grpFolderOptions" xml:space="preserve">
|
||||
<value>Folders</value>
|
||||
</data>
|
||||
<data name="frmSettings_lblBackupFolder" xml:space="preserve">
|
||||
<value>Backup Folder:</value>
|
||||
@@ -1361,7 +1352,7 @@
|
||||
<value>Would you like to apply a filter to your export?</value>
|
||||
</data>
|
||||
<data name="mgrMonitorList_ConfirmExistingData" xml:space="preserve">
|
||||
<value>GBM data already exists in the backup folder.[BR][BR]Do you want to make your local game list the new master game list in this folder? (Recommended)[BR][BR]Choosing No will sync your local game list to the current master game list in this folder.</value>
|
||||
<value>The sync settings have changed and data already exists in the backup folder.[BR][BR]Do you want to make your current game data on this PC the new master game data in this folder? (Highly Recommended)[BR][BR]Choosing No will sync your game data on this PC to the current master game data in this folder.</value>
|
||||
</data>
|
||||
<data name="mgrMonitorList_ExportComplete" xml:space="preserve">
|
||||
<value>Export Complete. [PARAM] item(s) have been exported.</value>
|
||||
@@ -1499,7 +1490,7 @@
|
||||
<value>&Log</value>
|
||||
</data>
|
||||
<data name="frmMain_LogAutoSave" xml:space="preserve">
|
||||
<value>The session log has been cleared due to size and auto-saved to [PARAM].</value>
|
||||
<value>The session log reached maximum length and has been auto-saved to [PARAM].</value>
|
||||
</data>
|
||||
<data name="frmMain_Text" xml:space="preserve">
|
||||
<value>Text</value>
|
||||
@@ -1525,8 +1516,8 @@
|
||||
<data name="frmSettings_cboCompression_Ultra" xml:space="preserve">
|
||||
<value>Ultra</value>
|
||||
</data>
|
||||
<data name="frmSettings_grp7z" xml:space="preserve">
|
||||
<value>7z Options</value>
|
||||
<data name="frmSettings_grp7zGeneral" xml:space="preserve">
|
||||
<value>General</value>
|
||||
</data>
|
||||
<data name="frmSettings_lblCompression" xml:space="preserve">
|
||||
<value>Compression:</value>
|
||||
@@ -1558,9 +1549,6 @@
|
||||
<data name="App_ErrorUnixNotAvailable" xml:space="preserve">
|
||||
<value>This function is currently not available on a Unix based operating system.</value>
|
||||
</data>
|
||||
<data name="frmGameManager_ConfirmUnixImportWarning" xml:space="preserve">
|
||||
<value>You appear to be using a Unix based operating system. The official list currently contains only Microsoft Windows game configurations.[BR][BR]Do you wish to continue?</value>
|
||||
</data>
|
||||
<data name="frmMain_PNGFilter" xml:space="preserve">
|
||||
<value>PNG files (*.png)|*.png</value>
|
||||
</data>
|
||||
@@ -1597,4 +1585,181 @@
|
||||
<data name="frmFileFolderSearch_SearchCancel" xml:space="preserve">
|
||||
<value>Search Aborted!</value>
|
||||
</data>
|
||||
<data name="frmSettings_btnDefaults" xml:space="preserve">
|
||||
<value>Set &Defaults</value>
|
||||
</data>
|
||||
<data name="frmSettings_lblArguments" xml:space="preserve">
|
||||
<value>Custom Arguments:</value>
|
||||
</data>
|
||||
<data name="frmSettings_lblLocation" xml:space="preserve">
|
||||
<value>Custom Location:</value>
|
||||
</data>
|
||||
<data name="frmSettings_7zaFileType" xml:space="preserve">
|
||||
<value>Executable</value>
|
||||
</data>
|
||||
<data name="frmSettings_Browse7za" xml:space="preserve">
|
||||
<value>Locate 7-Zip Console (7za)</value>
|
||||
</data>
|
||||
<data name="frmSettings_WarningArguments" xml:space="preserve">
|
||||
<value>Invalid or poorly formatted 7-Zip arguments can cause backup or restore operations to fail.[BR][BR]If problems occur, clear the custom arguments and try again.</value>
|
||||
</data>
|
||||
<data name="frmMain_Error7zCustom" xml:space="preserve">
|
||||
<value>The custom 7-Zip utility could not be found at:[BR][BR][PARAM][BR][BR]Please check your settings, the default 7-Zip utility will be used.</value>
|
||||
</data>
|
||||
<data name="frmSettings_ConfirmDefaults" xml:space="preserve">
|
||||
<value>Do you want to revert all settings to their defaults?</value>
|
||||
</data>
|
||||
<data name="frmSettings_ErrorLocation" xml:space="preserve">
|
||||
<value>The custom 7-Zip location [PARAM] does not exist.</value>
|
||||
</data>
|
||||
<data name="frmSettings_WarningLocation" xml:space="preserve">
|
||||
<value>You have chosen a custom utility that does not appear to be 7-Zip. [BR][BR]GBM only supports the use of 7-Zip Console (7za).</value>
|
||||
</data>
|
||||
<data name="App_Invalid7zDetected" xml:space="preserve">
|
||||
<value>7-Zip (7za.exe) is invalid and has been prevented from running.</value>
|
||||
</data>
|
||||
<data name="frmGameManager_lblQuickFilter" xml:space="preserve">
|
||||
<value>Quick Filter:</value>
|
||||
</data>
|
||||
<data name="frmGameManager_ErrorNoValidBackup" xml:space="preserve">
|
||||
<value>A backup cannot be run on the selected game(s) with their current configuration.</value>
|
||||
</data>
|
||||
<data name="frmSettings_btnOptionalFields" xml:space="preserve">
|
||||
<value>Choose &Optional Fields...</value>
|
||||
</data>
|
||||
<data name="frmSyncFields_btnCancel" xml:space="preserve">
|
||||
<value>&Cancel</value>
|
||||
</data>
|
||||
<data name="frmSyncFields_btnSave" xml:space="preserve">
|
||||
<value>&Save</value>
|
||||
</data>
|
||||
<data name="frmSyncFields_chkCompany" xml:space="preserve">
|
||||
<value>Company</value>
|
||||
</data>
|
||||
<data name="frmSyncFields_chkGamePath" xml:space="preserve">
|
||||
<value>Game Path (Not Recommended)</value>
|
||||
</data>
|
||||
<data name="frmSyncFields_chkIcon" xml:space="preserve">
|
||||
<value>Icon (Not Recommended)</value>
|
||||
</data>
|
||||
<data name="frmSyncFields_chkMonitorGame" xml:space="preserve">
|
||||
<value>Monitor this game</value>
|
||||
</data>
|
||||
<data name="frmSyncFields_chkTimeStamp" xml:space="preserve">
|
||||
<value>Save multiple backups</value>
|
||||
</data>
|
||||
<data name="frmSyncFields_chkVersion" xml:space="preserve">
|
||||
<value>Version</value>
|
||||
</data>
|
||||
<data name="frmSyncFields_FormName" xml:space="preserve">
|
||||
<value>Optional Sync Fields</value>
|
||||
</data>
|
||||
<data name="frmSyncFields_grpFields" xml:space="preserve">
|
||||
<value>Available Fields</value>
|
||||
</data>
|
||||
<data name="frmMain_LogAutoClear" xml:space="preserve">
|
||||
<value>The session log reached maximum length and has been cleared.</value>
|
||||
</data>
|
||||
<data name="frmSettings_chkAutoSaveLog" xml:space="preserve">
|
||||
<value>Autosave log when max length is exceeded</value>
|
||||
</data>
|
||||
<data name="frmSettings_grpGameData" xml:space="preserve">
|
||||
<value>Game Data</value>
|
||||
</data>
|
||||
<data name="frmSettings_lstSettings_7z" xml:space="preserve">
|
||||
<value>7-Zip</value>
|
||||
</data>
|
||||
<data name="frmSettings_lstSettings_BackupRestore" xml:space="preserve">
|
||||
<value>Backup and Restore</value>
|
||||
</data>
|
||||
<data name="frmSettings_lstSettings_General" xml:space="preserve">
|
||||
<value>General</value>
|
||||
</data>
|
||||
<data name="frmSettings_grp7zAdvanced" xml:space="preserve">
|
||||
<value>Advanced</value>
|
||||
</data>
|
||||
<data name="frmSettings_grp7zInformation" xml:space="preserve">
|
||||
<value>Version Information</value>
|
||||
</data>
|
||||
<data name="App_NotAvailable" xml:space="preserve">
|
||||
<value>N/A</value>
|
||||
</data>
|
||||
<data name="App_URLImportLinux" xml:space="preserve">
|
||||
<value>http://mikemaximus.github.io/gbm-web/GBM_Official_Linux.xml</value>
|
||||
</data>
|
||||
<data name="frmGameManager_BrowseBackup" xml:space="preserve">
|
||||
<value>Choose a new [PARAM] backup file</value>
|
||||
</data>
|
||||
<data name="frmGameManager_BrowseBackupType" xml:space="preserve">
|
||||
<value>7-Zip</value>
|
||||
</data>
|
||||
<data name="frmGameManager_btnChangeBackup" xml:space="preserve">
|
||||
<value>&Change Backup File</value>
|
||||
</data>
|
||||
<data name="frmGameManager_ConfirmBackupChange" xml:space="preserve">
|
||||
<value>[PARAM] will be the new backup file for [PARAM].[BR][BR]Is this correct?</value>
|
||||
</data>
|
||||
<data name="frmGameManager_ConfirmBackupChangeRestore" xml:space="preserve">
|
||||
<value>Do you want to restore [PARAM] now?</value>
|
||||
</data>
|
||||
<data name="frmGameManager_ErrorBackupChangeFileName" xml:space="preserve">
|
||||
<value>[PARAM] is already the current backup file.</value>
|
||||
</data>
|
||||
<data name="frmGameManager_ErrorBackupChangePath" xml:space="preserve">
|
||||
<value>You cannot choose a file located outside the current [PARAM] backup folder.</value>
|
||||
</data>
|
||||
<data name="frmGameManager_lblLimit" xml:space="preserve">
|
||||
<value>Backup Limit</value>
|
||||
</data>
|
||||
<data name="mgrBackup_BackupLimitExceeded" xml:space="preserve">
|
||||
<value>[PARAM] was automatically removed.</value>
|
||||
</data>
|
||||
<data name="frmGameManager_cmsDeleteAll" xml:space="preserve">
|
||||
<value>&All Files</value>
|
||||
</data>
|
||||
<data name="frmGameManager_cmsDeleteOne" xml:space="preserve">
|
||||
<value>&Selected File</value>
|
||||
</data>
|
||||
<data name="frmGameManager_ConfirmBackupDeleteAll" xml:space="preserve">
|
||||
<value>This will delete all backup files for [PARAM]. This cannot be undone. [BR][BR]Do you want to continue?</value>
|
||||
</data>
|
||||
<data name="frmAddWizard_lblLimit" xml:space="preserve">
|
||||
<value>Backup Limit</value>
|
||||
</data>
|
||||
<data name="frmGameManager_Unknown" xml:space="preserve">
|
||||
<value>Unknown</value>
|
||||
</data>
|
||||
<data name="frmGameManager_chkCleanFolder" xml:space="preserve">
|
||||
<value>Delete folder on restore</value>
|
||||
</data>
|
||||
<data name="frmMain_AutoMark" xml:space="preserve">
|
||||
<value>The saved game folder for [PARAM] does not exist or could not be determined, the backup has been automatically marked as restored.</value>
|
||||
</data>
|
||||
<data name="frmMain_RestoreNotReady" xml:space="preserve">
|
||||
<value>The backup file for [PARAM] is not ready to restore.</value>
|
||||
</data>
|
||||
<data name="frmSettings_chkAutoMark" xml:space="preserve">
|
||||
<value>Automatically mark new backups as restored when appropriate</value>
|
||||
</data>
|
||||
<data name="frmSettings_grpBackupHandling" xml:space="preserve">
|
||||
<value>Backup Handling</value>
|
||||
</data>
|
||||
<data name="frmSettings_chkAutoRestore" xml:space="preserve">
|
||||
<value>Automatically restore new backups</value>
|
||||
</data>
|
||||
<data name="frmMain_AutoRestoreFailure" xml:space="preserve">
|
||||
<value>[PARAM] has multiple configurations and cannot be automatically restored.</value>
|
||||
</data>
|
||||
<data name="frmMain_RestoreNotificationMulti" xml:space="preserve">
|
||||
<value>[PARAM] new saved game backups are being automatically restored.</value>
|
||||
</data>
|
||||
<data name="frmMain_RestoreNotificationSingle" xml:space="preserve">
|
||||
<value>A new saved game backup for [PARAM] is being automatically restored.</value>
|
||||
</data>
|
||||
<data name="frmMain_NoAutoMark" xml:space="preserve">
|
||||
<value>The saved game folder for [PARAM] does not exist or could not be determined, this backup has been skipped.</value>
|
||||
</data>
|
||||
<data name="frmMain_NoCheckSum" xml:space="preserve">
|
||||
<value>The backup file for [PARAM] has no checksum, it cannot be automatically restored.</value>
|
||||
</data>
|
||||
</root>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+14
-41
@@ -1,49 +1,22 @@
|
||||
Game Backup Monitor v0.96 Readme
|
||||
Game Backup Monitor v1.01 Readme
|
||||
http://mikemaximus.github.io/gbm-web/
|
||||
gamebackupmonitor@gmail.com
|
||||
|
||||
March 24, 2016
|
||||
April 1, 2017
|
||||
|
||||
Disclaimer:
|
||||
New in 1.01
|
||||
|
||||
This is beta release software. You may still encounter some bugs.
|
||||
- (All) Added features to automatically handle new backup files.
|
||||
- Automatically restore new backup files when they are detected.
|
||||
- Automatically mark new backup files as restored if the game isn't installed on the current PC.
|
||||
- These new features are available in the "Backup and Restore" section of the Settings. They are optional and disabled by default.
|
||||
- (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.
|
||||
|
||||
New in 0.96
|
||||
|
||||
For more information regarding Linux support read the FAQ at http://mikemaximus.github.io/gbm-web/linux.html
|
||||
|
||||
- (All) Modified backup and restore logic for better usability when doing batch operations and to fix Mono related issues.
|
||||
- (All) Overhauled the Search screen for better usability and to fix Mono related issues.
|
||||
- (All) Overhauled the Import screen for better usability. Added game tags, simple filtering, sorting and general fixes.
|
||||
- (Linux) Fixed some bad code causing the "Official Import" connection to time out when making multiple connections in the same session.
|
||||
- (Linux) Fixed cross-platform issues with opening backup files and restore locations from the Game Manager.
|
||||
- (All) Backup files opened from the Game Manager will now open directly in the app they are associated with, like 7-Zip GUI or File Roller.
|
||||
- (Linux) Fixed cross-platform issues with automatic file/folder searching. It's now enabled on Linux.
|
||||
- (All) GBM now restores saved games to the currently configured saved game path by default. The stored manfiest location is only used when there's no configuration for the game.
|
||||
- (Linux) Added Linux support via Mono!
|
||||
- (All) Replaced System.Data.SQLite with the Mono.Data.Sqlite for cross-platform support.
|
||||
- (Windows) Updated GBM's version of 7-Zip to 15.14 (2015-12-31)
|
||||
- (All) Added the ability to set the 7-Zip compression level on the Settings screen.
|
||||
- (Windows) GBM now deletes all user files to the Windows recycle bin by default.
|
||||
- (All) Added the ability to clear and save the session log from the Tools menu.
|
||||
- (All) GBM now auto-saves and clears the session log to %localappdata%\gbm if it reaches it's limit (2 MB).
|
||||
- (All) The file size will be displayed in the session log after each backup.
|
||||
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
|
||||
|
||||
Important Upgrade Information:
|
||||
|
||||
If you've used a pre-release of v0.96, you may experience the following error message after installing this version.
|
||||
|
||||
Column 'CompressionLevel' does not belong to table Table.
|
||||
|
||||
If you get this error follow these steps:
|
||||
|
||||
1. Start GBM and click "Yes" to continue past the error.
|
||||
2. Press CTRL and ~ (Tilde) to open the Developer Console.
|
||||
3. Enter the command exactly as follows (or copy & paste it) then click OK.
|
||||
|
||||
SQL Local PRAGMA user_version=95
|
||||
|
||||
4. You'll receive confirmation that the command was executed. Click OK and immediately close GBM via the File menu.
|
||||
5. Restart GBM and the error will no longer appear!
|
||||
@@ -1,15 +1,15 @@
|
||||
# [Game Backup Monitor] (http://mikemaximus.github.io/gbm-web/)
|
||||
# [Game Backup Monitor](http://mikemaximus.github.io/gbm-web/)
|
||||
|
||||
![Screenshot] (http://mikemaximus.github.io/gbm-web/images/manual/manual_01.jpg)
|
||||

|
||||
|
||||
Game Backup Monitor is a simple, but flexible application that detects games as you play them. Once you finish playing a game, a backup of the saved games will be made automatically using 7-Zip compression. GBM can be used on a single computer, or on multiple computers to effectively add cloud support to any game or application.
|
||||
|
||||
**License**: GNU General Public License version 3.0 (GPLv3)<br />
|
||||
**Language**: English Only<br />
|
||||
**Language**: English ([Translation FAQ](http://mikemaximus.github.io/gbm-web/translations.html))<br />
|
||||
**Platform**: Windows (.NET 4) & Linux (Mono)
|
||||
|
||||
[About Game Backup Monitor] (http://mikemaximus.github.io/gbm-web/about.html) <br />
|
||||
[Game Backup Monitor FAQ] (http://mikemaximus.github.io/gbm-web/faq.html) <br />
|
||||
[Game Backup Monitor Manual] (http://mikemaximus.github.io/gbm-web/manual.html) <br />
|
||||
[List of Preconfigured Games] (http://mikemaximus.github.io/gbm-web/GBM_Official.xml) <br /> <br />
|
||||
Updates regarding this project are available via the [Game Backup Monitor web site] (http://mikemaximus.github.io/gbm-web/).
|
||||
[About Game Backup Monitor](http://mikemaximus.github.io/gbm-web/about.html) <br />
|
||||
[Game Backup Monitor FAQ](http://mikemaximus.github.io/gbm-web/faq.html) <br />
|
||||
[Game Backup Monitor Manual](http://mikemaximus.github.io/gbm-web/manual.html) <br />
|
||||
[List of Preconfigured Games](http://mikemaximus.github.io/gbm-web/GBM_Official.xml) <br /> <br />
|
||||
Updates regarding this project are available via the [Game Backup Monitor web site](http://mikemaximus.github.io/gbm-web/).
|
||||
|
||||
Reference in New Issue
Block a user