51 Commits

Author SHA1 Message Date
Michael J. Seiferling
970b1f4e58 Final changes and fixes for v0.96 2016-03-24 19:48:13 -06:00
Michael J. Seiferling
911b3bdfc4 Updated readme for stable release 2016-03-24 19:16:05 -06:00
Michael J. Seiferling
ce759fe87f Merge pull request #44 from MikeMaximus/msgbox_crash_fix
Merge fixes for issue #43
2016-03-24 17:50:30 -06:00
Michael J. Seiferling
d1ca0a150e Alignment fix on search form 2016-03-24 17:45:02 -06:00
Michael J. Seiferling
b149a19a8b Added drive selector to search 2016-03-24 15:46:33 -06:00
Michael J. Seiferling
b458b89b46 Minor search and builder fix 2016-03-24 12:24:54 -06:00
Michael J. Seiferling
83df2edc90 Hide duplicate search results 2016-03-23 17:13:15 -06:00
Michael J. Seiferling
31b72488b2 Test fixes for issue #43 2016-03-23 16:52:03 -06:00
Michael J. Seiferling
3dbf5d0e62 Fix for issue #42 2016-03-18 13:09:55 -06:00
Michael J. Seiferling
2eb6693275 More cosmetic changes 2016-03-13 20:24:30 -06:00
Michael J. Seiferling
d1e292d4bf Cosmetic updates 2016-03-13 14:26:31 -06:00
Michael J. Seiferling
640690514b Pre-release readme update 2016-03-12 10:19:09 -06:00
Michael J. Seiferling
aade2dcee9 Pre-release readme update 2016-03-12 10:17:48 -06:00
Michael J. Seiferling
76ffc79a6b Usability updates for #22 2016-03-12 10:10:06 -06:00
Michael J. Seiferling
a6341ffa76 Updates for issue #22 2016-03-11 16:26:20 -06:00
Michael J. Seiferling
09c7bf8f05 Fixed some minor list box issues 2016-03-08 20:41:46 -06:00
Michael J. Seiferling
039f47fccd Fixed issue #41 2016-03-06 17:00:53 -06:00
Michael J. Seiferling
164bb4255e Revert "Fixed issue #41"
This reverts commit df5e8f2d2a.
2016-03-06 16:51:26 -06:00
Michael J. Seiferling
df5e8f2d2a Fixed issue #41 2016-03-06 16:49:02 -06:00
Michael J. Seiferling
7766a07cf3 Update README.md 2016-03-06 15:26:41 -06:00
Michael J. Seiferling
e71b2f4064 Merge pull request #40 from MikeMaximus/mono-test
Merge multi-platform test branch into master
2016-03-06 15:15:53 -06:00
Michael J. Seiferling
be2335b61e Fixes for issue #39 2016-03-06 12:06:43 -06:00
Michael J. Seiferling
ca9fef33ea Fixes for issues #37 and #39 2016-03-05 15:56:02 -06:00
Michael J. Seiferling
93c9b1a5ee Clean up for issue #37 2016-03-05 13:39:48 -06:00
Michael J. Seiferling
730305b694 Changes for issue #37 and #38 2016-03-05 13:24:48 -06:00
Michael J. Seiferling
8880373f34 Final pre-release changes 2016-03-03 21:16:17 -06:00
Michael J. Seiferling
321c72b6bf Minor restore fixes 2016-03-03 19:28:04 -06:00
Michael J. Seiferling
163b6cd3a0 Fixed GetBuilderRoot function 2016-03-03 18:21:06 -06:00
Michael J. Seiferling
44c2d98f25 Simplified GetUnixSymLinkDirectory function 2016-03-03 17:15:42 -06:00
Michael J. Seiferling
f050061b76 Path fixes and PNG Unix icons 2016-03-03 16:42:49 -06:00
Michael J. Seiferling
0cafd00bf3 Unix path fixes and search lock out 2016-03-03 15:22:47 -06:00
Michael J. Seiferling
feb8a9d0b2 Added Wine detection support 2016-03-03 13:05:50 -06:00
Michael J. Seiferling
d46360b244 More compatability updates 2016-03-02 19:15:32 -06:00
Michael J. Seiferling
ca8798a460 Fixed minor tray and startup issue 2016-03-02 11:43:34 -06:00
Michael J. Seiferling
da16a89baa Fixed unreliable visible check 2016-03-02 10:42:37 -06:00
Michael J. Seiferling
b03545d86f OS specific 7za argument handler 2016-03-02 10:32:04 -06:00
Michael J. Seiferling
430e1171fb Added post build events 2016-03-02 10:22:09 -06:00
Michael J. Seiferling
e531ec5701 Unix fixes and feature lock outs 2016-03-02 01:07:27 -06:00
Michael J. Seiferling
7a7fa65ce6 Functional in Mono 2016-03-01 23:27:42 -06:00
Michael J. Seiferling
4c7d36baef Update to DetermineRelativePath function 2016-02-29 15:59:49 -06:00
Michael J. Seiferling
de7a993abe Changes for multi-platform support 2016-02-29 12:24:56 -06:00
Michael J. Seiferling
ec47697434 Tweak for issue #36 2016-02-27 15:58:24 -06:00
Michael J. Seiferling
a7b97912f2 Update for issue #36 2016-02-24 11:01:43 -06:00
Michael J. Seiferling
8222f518f6 Update for issue #35 2016-02-21 22:31:27 -06:00
Michael J. Seiferling
0a564ca510 v0.96 preview release update 2016-02-19 10:06:31 -06:00
Michael J. Seiferling
85d9cc0c5f Fix for issue #34 2016-02-11 19:18:08 -06:00
Michael J. Seiferling
abbc6a4a70 Update for issue #33 2016-02-06 09:28:39 -06:00
Michael J. Seiferling
5947b7d0b2 Fixed issue #30 2016-02-05 09:18:23 -06:00
Michael J. Seiferling
2fb18c5f19 Changes for issue #27 2016-02-02 10:29:28 -06:00
Michael J. Seiferling
47f4b0774d Fixed issue #32 2016-01-30 09:42:27 -06:00
Michael J. Seiferling
70be04b750 Update for issue 31 2016-01-08 09:51:47 -06:00
48 changed files with 1966 additions and 626 deletions
+5 -1
View File
@@ -41,7 +41,11 @@
Property FileName As String Property FileName As String
Get Get
Return sFileName If mgrCommon.IsUnix Then
Return sFileName.Replace("\", "/")
Else
Return sFileName.Replace("/", "\")
End If
End Get End Get
Set(value As String) Set(value As String)
sFileName = value sFileName = value
+9 -31
View File
@@ -22,17 +22,16 @@ Partial Class frmAddWizard
'Do not modify it using the code editor. 'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _ <System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent() Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddWizard))
Me.tabWizard = New System.Windows.Forms.TabControl() Me.tabWizard = New System.Windows.Forms.TabControl()
Me.tbPage1 = New System.Windows.Forms.TabPage() Me.tbPage1 = New System.Windows.Forms.TabPage()
Me.lblStep1Title = New System.Windows.Forms.Label() Me.lblStep1Title = New System.Windows.Forms.Label()
Me.lblDrag1 = New System.Windows.Forms.Label()
Me.lblStep1Instructions = New System.Windows.Forms.Label() Me.lblStep1Instructions = New System.Windows.Forms.Label()
Me.txtName = New System.Windows.Forms.TextBox() Me.txtName = New System.Windows.Forms.TextBox()
Me.lblStep1Intro = New System.Windows.Forms.Label() Me.lblStep1Intro = New System.Windows.Forms.Label()
Me.tbPage2 = New System.Windows.Forms.TabPage() Me.tbPage2 = New System.Windows.Forms.TabPage()
Me.lblStep2Title = New System.Windows.Forms.Label() Me.lblStep2Title = New System.Windows.Forms.Label()
Me.lblStep2Instructions = New System.Windows.Forms.Label() Me.lblStep2Instructions = New System.Windows.Forms.Label()
Me.lblDrag2 = New System.Windows.Forms.Label()
Me.btnProcessBrowse = New System.Windows.Forms.Button() Me.btnProcessBrowse = New System.Windows.Forms.Button()
Me.txtProcessPath = New System.Windows.Forms.TextBox() Me.txtProcessPath = New System.Windows.Forms.TextBox()
Me.lblStep2Intro = New System.Windows.Forms.Label() Me.lblStep2Intro = New System.Windows.Forms.Label()
@@ -95,7 +94,6 @@ Partial Class frmAddWizard
' '
Me.tbPage1.BackColor = System.Drawing.SystemColors.Control Me.tbPage1.BackColor = System.Drawing.SystemColors.Control
Me.tbPage1.Controls.Add(Me.lblStep1Title) Me.tbPage1.Controls.Add(Me.lblStep1Title)
Me.tbPage1.Controls.Add(Me.lblDrag1)
Me.tbPage1.Controls.Add(Me.lblStep1Instructions) Me.tbPage1.Controls.Add(Me.lblStep1Instructions)
Me.tbPage1.Controls.Add(Me.txtName) Me.tbPage1.Controls.Add(Me.txtName)
Me.tbPage1.Controls.Add(Me.lblStep1Intro) Me.tbPage1.Controls.Add(Me.lblStep1Intro)
@@ -116,23 +114,16 @@ Partial Class frmAddWizard
Me.lblStep1Title.TabIndex = 8 Me.lblStep1Title.TabIndex = 8
Me.lblStep1Title.Text = "Game Name" Me.lblStep1Title.Text = "Game Name"
' '
'lblDrag1
'
Me.lblDrag1.AllowDrop = True
Me.lblDrag1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblDrag1.Location = New System.Drawing.Point(14, 135)
Me.lblDrag1.Name = "lblDrag1"
Me.lblDrag1.Size = New System.Drawing.Size(303, 49)
Me.lblDrag1.TabIndex = 7
Me.lblDrag1.Text = "Drag a shortcut here to complete this step."
'
'lblStep1Instructions 'lblStep1Instructions
' '
Me.lblStep1Instructions.AllowDrop = True
Me.lblStep1Instructions.Location = New System.Drawing.Point(14, 93) Me.lblStep1Instructions.Location = New System.Drawing.Point(14, 93)
Me.lblStep1Instructions.Name = "lblStep1Instructions" Me.lblStep1Instructions.Name = "lblStep1Instructions"
Me.lblStep1Instructions.Size = New System.Drawing.Size(303, 30) Me.lblStep1Instructions.Size = New System.Drawing.Size(303, 85)
Me.lblStep1Instructions.TabIndex = 6 Me.lblStep1Instructions.TabIndex = 6
Me.lblStep1Instructions.Text = "The name will be automatically filtered for length and invalid characters. " 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 'txtName
' '
@@ -156,7 +147,6 @@ Partial Class frmAddWizard
Me.tbPage2.BackColor = System.Drawing.SystemColors.Control Me.tbPage2.BackColor = System.Drawing.SystemColors.Control
Me.tbPage2.Controls.Add(Me.lblStep2Title) Me.tbPage2.Controls.Add(Me.lblStep2Title)
Me.tbPage2.Controls.Add(Me.lblStep2Instructions) Me.tbPage2.Controls.Add(Me.lblStep2Instructions)
Me.tbPage2.Controls.Add(Me.lblDrag2)
Me.tbPage2.Controls.Add(Me.btnProcessBrowse) Me.tbPage2.Controls.Add(Me.btnProcessBrowse)
Me.tbPage2.Controls.Add(Me.txtProcessPath) Me.tbPage2.Controls.Add(Me.txtProcessPath)
Me.tbPage2.Controls.Add(Me.lblStep2Intro) Me.tbPage2.Controls.Add(Me.lblStep2Intro)
@@ -179,22 +169,12 @@ Partial Class frmAddWizard
' '
'lblStep2Instructions 'lblStep2Instructions
' '
Me.lblStep2Instructions.AllowDrop = True
Me.lblStep2Instructions.Location = New System.Drawing.Point(14, 93) Me.lblStep2Instructions.Location = New System.Drawing.Point(14, 93)
Me.lblStep2Instructions.Name = "lblStep2Instructions" Me.lblStep2Instructions.Name = "lblStep2Instructions"
Me.lblStep2Instructions.Size = New System.Drawing.Size(303, 29) Me.lblStep2Instructions.Size = New System.Drawing.Size(303, 85)
Me.lblStep2Instructions.TabIndex = 10 Me.lblStep2Instructions.TabIndex = 10
Me.lblStep2Instructions.Text = "Some games use launchers. Do not monitor launchers, be sure to choose the game'" & _ Me.lblStep2Instructions.Text = resources.GetString("lblStep2Instructions.Text")
"s actual exe file."
'
'lblDrag2
'
Me.lblDrag2.AllowDrop = True
Me.lblDrag2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblDrag2.Location = New System.Drawing.Point(14, 135)
Me.lblDrag2.Name = "lblDrag2"
Me.lblDrag2.Size = New System.Drawing.Size(336, 44)
Me.lblDrag2.TabIndex = 9
Me.lblDrag2.Text = "Drag a shortcut here to complete this step."
' '
'btnProcessBrowse 'btnProcessBrowse
' '
@@ -578,12 +558,10 @@ Partial Class frmAddWizard
Friend WithEvents tbPage3a As System.Windows.Forms.TabPage Friend WithEvents tbPage3a As System.Windows.Forms.TabPage
Friend WithEvents tbPage4 As System.Windows.Forms.TabPage Friend WithEvents tbPage4 As System.Windows.Forms.TabPage
Friend WithEvents tbPage5 As System.Windows.Forms.TabPage Friend WithEvents tbPage5 As System.Windows.Forms.TabPage
Friend WithEvents lblDrag1 As System.Windows.Forms.Label
Friend WithEvents lblStep1Instructions As System.Windows.Forms.Label Friend WithEvents lblStep1Instructions As System.Windows.Forms.Label
Friend WithEvents txtName As System.Windows.Forms.TextBox Friend WithEvents txtName As System.Windows.Forms.TextBox
Friend WithEvents lblStep1Intro As System.Windows.Forms.Label Friend WithEvents lblStep1Intro As System.Windows.Forms.Label
Friend WithEvents lblStep2Instructions As System.Windows.Forms.Label Friend WithEvents lblStep2Instructions As System.Windows.Forms.Label
Friend WithEvents lblDrag2 As System.Windows.Forms.Label
Friend WithEvents btnProcessBrowse As System.Windows.Forms.Button Friend WithEvents btnProcessBrowse As System.Windows.Forms.Button
Friend WithEvents txtProcessPath As System.Windows.Forms.TextBox Friend WithEvents txtProcessPath As System.Windows.Forms.TextBox
Friend WithEvents lblStep2Intro As System.Windows.Forms.Label Friend WithEvents lblStep2Intro As System.Windows.Forms.Label
+3
View File
@@ -117,4 +117,7 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="lblStep2Instructions.Text" xml:space="preserve">
<value>Some games use launchers. Do not monitor launchers, be sure to choose the game's actual exe file. You may drag and drop a shortcut here to complete this step, only Windows shortcuts are currently supported.</value>
</data>
</root> </root>
+3 -5
View File
@@ -36,12 +36,10 @@ Public Class frmAddWizard
btnNext.Text = frmAddWizard_btnNext btnNext.Text = frmAddWizard_btnNext
btnBack.Text = frmAddWizard_btnBack btnBack.Text = frmAddWizard_btnBack
lblStep1Title.Text = frmAddWizard_lblStep1Title lblStep1Title.Text = frmAddWizard_lblStep1Title
lblDrag1.Text = frmAddWizard_lblDrag1
lblStep1Instructions.Text = frmAddWizard_lblStep1Instructions lblStep1Instructions.Text = frmAddWizard_lblStep1Instructions
lblStep1Intro.Text = frmAddWizard_lblStep1Intro lblStep1Intro.Text = frmAddWizard_lblStep1Intro
lblStep2Title.Text = frmAddWizard_lblStep2Title lblStep2Title.Text = frmAddWizard_lblStep2Title
lblStep2Instructions.Text = frmAddWizard_lblStep2Instructions lblStep2Instructions.Text = frmAddWizard_lblStep2Instructions
lblDrag2.Text = frmAddWizard_lblDrag2
btnProcessBrowse.Text = frmAddWizard_btnProcessBrowse btnProcessBrowse.Text = frmAddWizard_btnProcessBrowse
lblStep2Intro.Text = frmAddWizard_lblStep2Intro lblStep2Intro.Text = frmAddWizard_lblStep2Intro
lblStep3Title.Text = frmAddWizard_lblStep3Title lblStep3Title.Text = frmAddWizard_lblStep3Title
@@ -178,7 +176,7 @@ Public Class frmAddWizard
Return False Return False
End If End If
If Path.GetExtension(strPath.ToLower) <> ".exe" Then If Path.GetExtension(strPath.ToLower) <> ".exe" And Not mgrCommon.IsUnix Then
sErrorMessage = frmAddWizard_ErrorNotAProcess sErrorMessage = frmAddWizard_ErrorNotAProcess
txtProcessPath.Focus() txtProcessPath.Focus()
Return False Return False
@@ -459,13 +457,13 @@ Public Class frmAddWizard
SetForm() SetForm()
End Sub End Sub
Private Sub DropTarget_DragEnter(sender As Object, e As DragEventArgs) Handles lblDrag1.DragEnter, lblDrag2.DragEnter, txtName.DragEnter, txtProcessPath.DragEnter Private Sub DropTarget_DragEnter(sender As Object, e As DragEventArgs) Handles txtName.DragEnter, txtProcessPath.DragEnter, lblStep1Instructions.DragEnter, lblStep2Instructions.DragEnter
If e.Data.GetDataPresent(DataFormats.FileDrop) Then If e.Data.GetDataPresent(DataFormats.FileDrop) Then
e.Effect = DragDropEffects.Copy e.Effect = DragDropEffects.Copy
End If End If
End Sub End Sub
Private Sub DropTarget_DragDrop(sender As Object, e As DragEventArgs) Handles lblDrag1.DragDrop, lblDrag2.DragDrop, txtName.DragDrop, txtProcessPath.DragDrop Private Sub DropTarget_DragDrop(sender As Object, e As DragEventArgs) Handles txtName.DragDrop, txtProcessPath.DragDrop, lblStep1Instructions.DragDrop, lblStep2Instructions.DragDrop
Dim oFiles() As String = e.Data.GetData(DataFormats.FileDrop) Dim oFiles() As String = e.Data.GetData(DataFormats.FileDrop)
For Each sPath In oFiles For Each sPath In oFiles
ReadShortcut(sPath) ReadShortcut(sPath)
+47 -23
View File
@@ -22,47 +22,40 @@ Partial Class frmAdvancedImport
'Do not modify it using the code editor. 'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _ <System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent() Private Sub InitializeComponent()
Me.lstGames = New System.Windows.Forms.CheckedListBox()
Me.btnImport = New System.Windows.Forms.Button() Me.btnImport = New System.Windows.Forms.Button()
Me.chkSelectAll = New System.Windows.Forms.CheckBox() Me.chkSelectAll = New System.Windows.Forms.CheckBox()
Me.lblGames = New System.Windows.Forms.Label() Me.lblGames = New System.Windows.Forms.Label()
Me.lblSelected = New System.Windows.Forms.Label() Me.lblSelected = New System.Windows.Forms.Label()
Me.btnCancel = New System.Windows.Forms.Button() Me.btnCancel = New System.Windows.Forms.Button()
Me.lstGames = New System.Windows.Forms.ListView()
Me.txtFilter = New System.Windows.Forms.TextBox()
Me.lblFilter = New System.Windows.Forms.Label()
Me.SuspendLayout() Me.SuspendLayout()
' '
'lstGames
'
Me.lstGames.CheckOnClick = True
Me.lstGames.FormattingEnabled = True
Me.lstGames.Location = New System.Drawing.Point(12, 30)
Me.lstGames.Name = "lstGames"
Me.lstGames.Size = New System.Drawing.Size(335, 334)
Me.lstGames.Sorted = True
Me.lstGames.TabIndex = 1
'
'btnImport 'btnImport
' '
Me.btnImport.Location = New System.Drawing.Point(191, 370) Me.btnImport.Location = New System.Drawing.Point(416, 375)
Me.btnImport.Name = "btnImport" Me.btnImport.Name = "btnImport"
Me.btnImport.Size = New System.Drawing.Size(75, 23) Me.btnImport.Size = New System.Drawing.Size(75, 23)
Me.btnImport.TabIndex = 2 Me.btnImport.TabIndex = 3
Me.btnImport.Text = "&Import" Me.btnImport.Text = "&Import"
Me.btnImport.UseVisualStyleBackColor = True Me.btnImport.UseVisualStyleBackColor = True
' '
'chkSelectAll 'chkSelectAll
' '
Me.chkSelectAll.AutoSize = True Me.chkSelectAll.AutoSize = True
Me.chkSelectAll.Location = New System.Drawing.Point(15, 12) Me.chkSelectAll.Location = New System.Drawing.Point(12, 12)
Me.chkSelectAll.Name = "chkSelectAll" Me.chkSelectAll.Name = "chkSelectAll"
Me.chkSelectAll.Size = New System.Drawing.Size(15, 14) Me.chkSelectAll.Size = New System.Drawing.Size(70, 17)
Me.chkSelectAll.TabIndex = 0 Me.chkSelectAll.TabIndex = 0
Me.chkSelectAll.Text = "Select All"
Me.chkSelectAll.UseVisualStyleBackColor = True Me.chkSelectAll.UseVisualStyleBackColor = True
' '
'lblGames 'lblGames
' '
Me.lblGames.Location = New System.Drawing.Point(12, 12) Me.lblGames.Location = New System.Drawing.Point(12, 380)
Me.lblGames.Name = "lblGames" Me.lblGames.Name = "lblGames"
Me.lblGames.Size = New System.Drawing.Size(335, 14) Me.lblGames.Size = New System.Drawing.Size(560, 14)
Me.lblGames.TabIndex = 0 Me.lblGames.TabIndex = 0
Me.lblGames.Text = "Games" Me.lblGames.Text = "Games"
Me.lblGames.TextAlign = System.Drawing.ContentAlignment.TopCenter Me.lblGames.TextAlign = System.Drawing.ContentAlignment.TopCenter
@@ -70,7 +63,7 @@ Partial Class frmAdvancedImport
'lblSelected 'lblSelected
' '
Me.lblSelected.AutoSize = True Me.lblSelected.AutoSize = True
Me.lblSelected.Location = New System.Drawing.Point(9, 375) Me.lblSelected.Location = New System.Drawing.Point(9, 380)
Me.lblSelected.Name = "lblSelected" Me.lblSelected.Name = "lblSelected"
Me.lblSelected.Size = New System.Drawing.Size(77, 13) Me.lblSelected.Size = New System.Drawing.Size(77, 13)
Me.lblSelected.TabIndex = 0 Me.lblSelected.TabIndex = 0
@@ -78,23 +71,52 @@ Partial Class frmAdvancedImport
' '
'btnCancel 'btnCancel
' '
Me.btnCancel.Location = New System.Drawing.Point(272, 370) Me.btnCancel.Location = New System.Drawing.Point(497, 375)
Me.btnCancel.Name = "btnCancel" Me.btnCancel.Name = "btnCancel"
Me.btnCancel.Size = New System.Drawing.Size(75, 23) Me.btnCancel.Size = New System.Drawing.Size(75, 23)
Me.btnCancel.TabIndex = 3 Me.btnCancel.TabIndex = 4
Me.btnCancel.Text = "&Cancel" Me.btnCancel.Text = "&Cancel"
Me.btnCancel.UseVisualStyleBackColor = True Me.btnCancel.UseVisualStyleBackColor = True
' '
'lstGames
'
Me.lstGames.CheckBoxes = True
Me.lstGames.FullRowSelect = True
Me.lstGames.Location = New System.Drawing.Point(12, 35)
Me.lstGames.Name = "lstGames"
Me.lstGames.Size = New System.Drawing.Size(560, 329)
Me.lstGames.TabIndex = 2
Me.lstGames.UseCompatibleStateImageBehavior = False
Me.lstGames.View = System.Windows.Forms.View.Details
'
'txtFilter
'
Me.txtFilter.Location = New System.Drawing.Point(416, 9)
Me.txtFilter.Name = "txtFilter"
Me.txtFilter.Size = New System.Drawing.Size(156, 20)
Me.txtFilter.TabIndex = 1
'
'lblFilter
'
Me.lblFilter.Location = New System.Drawing.Point(307, 12)
Me.lblFilter.Name = "lblFilter"
Me.lblFilter.Size = New System.Drawing.Size(103, 14)
Me.lblFilter.TabIndex = 0
Me.lblFilter.Text = "Filter:"
Me.lblFilter.TextAlign = System.Drawing.ContentAlignment.TopRight
'
'frmAdvancedImport 'frmAdvancedImport
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(359, 402) Me.ClientSize = New System.Drawing.Size(584, 411)
Me.Controls.Add(Me.lblFilter)
Me.Controls.Add(Me.txtFilter)
Me.Controls.Add(Me.lstGames)
Me.Controls.Add(Me.btnCancel) Me.Controls.Add(Me.btnCancel)
Me.Controls.Add(Me.lblSelected) Me.Controls.Add(Me.lblSelected)
Me.Controls.Add(Me.chkSelectAll) Me.Controls.Add(Me.chkSelectAll)
Me.Controls.Add(Me.btnImport) Me.Controls.Add(Me.btnImport)
Me.Controls.Add(Me.lstGames)
Me.Controls.Add(Me.lblGames) Me.Controls.Add(Me.lblGames)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
Me.MaximizeBox = False Me.MaximizeBox = False
@@ -107,10 +129,12 @@ Partial Class frmAdvancedImport
Me.PerformLayout() Me.PerformLayout()
End Sub End Sub
Friend WithEvents lstGames As System.Windows.Forms.CheckedListBox
Friend WithEvents btnImport As System.Windows.Forms.Button Friend WithEvents btnImport As System.Windows.Forms.Button
Friend WithEvents chkSelectAll As System.Windows.Forms.CheckBox Friend WithEvents chkSelectAll As System.Windows.Forms.CheckBox
Friend WithEvents lblGames As System.Windows.Forms.Label Friend WithEvents lblGames As System.Windows.Forms.Label
Friend WithEvents lblSelected As System.Windows.Forms.Label Friend WithEvents lblSelected As System.Windows.Forms.Label
Friend WithEvents btnCancel As System.Windows.Forms.Button Friend WithEvents btnCancel As System.Windows.Forms.Button
Friend WithEvents lstGames As System.Windows.Forms.ListView
Friend WithEvents txtFilter As System.Windows.Forms.TextBox
Friend WithEvents lblFilter As System.Windows.Forms.Label
End Class End Class
+138 -24
View File
@@ -3,8 +3,11 @@
Public Class frmAdvancedImport Public Class frmAdvancedImport
Private hshImportData As Hashtable Private hshImportData As Hashtable
Private hshFinalData As New Hashtable
Private bSelectAll As Boolean = False Private bSelectAll As Boolean = False
Private bIsLoading As Boolean = False Private bIsLoading As Boolean = False
Private iCurrentSort As Integer = 0
Private WithEvents tmFilterTimer As Timer
Public Property ImportData As Hashtable Public Property ImportData As Hashtable
Set(value As Hashtable) Set(value As Hashtable)
@@ -15,26 +18,103 @@ Public Class frmAdvancedImport
End Get End Get
End Property End Property
Public ReadOnly Property FinalData As Hashtable
Get
Return hshFinalData
End Get
End Property
Private Sub SelectToggle() Private Sub SelectToggle()
Cursor.Current = Cursors.WaitCursor
lstGames.BeginUpdate()
bSelectAll = Not bSelectAll bSelectAll = Not bSelectAll
For i As Integer = 0 To lstGames.Items.Count - 1 For i As Integer = 0 To lstGames.Items.Count - 1
lstGames.SetItemChecked(i, bSelectAll) lstGames.Items(i).Checked = bSelectAll
Next Next
lstGames.EndUpdate()
Cursor.Current = Cursors.Default
UpdateSelected() UpdateSelected()
End Sub End Sub
Private Sub LoadData() Private Sub SaveChecked(ByVal oItem As ListViewItem)
Dim oApp As clsGame If oItem.Checked Then
Dim oData As KeyValuePair(Of String, String) FinalData.Add(oItem.Tag, ImportData(oItem.Tag))
Else
FinalData.Remove(oItem.Tag)
End If
End Sub
lstGames.ValueMember = "Key" Private Sub LoadData(Optional ByVal sFilter As String = "")
lstGames.DisplayMember = "Value" Dim oApp As clsGame
Dim oListViewItem As ListViewItem
Dim sTags As String
Dim bAddItem As Boolean
Dim bResetSelectAll As Boolean = False
Cursor.Current = Cursors.WaitCursor
lstGames.BeginUpdate()
lstGames.Clear()
lstGames.Columns.Add(frmAdvancedImport_ColumnName, 215)
lstGames.Columns.Add(frmAdvancedImport_ColumnProcess, 130)
lstGames.Columns.Add(frmAdvancedImport_ColumnTags, 190)
For Each de As DictionaryEntry In ImportData For Each de As DictionaryEntry In ImportData
bAddItem = False
oApp = DirectCast(de.Value, clsGame) oApp = DirectCast(de.Value, clsGame)
oData = New KeyValuePair(Of String, String)(oApp.CompoundKey, oApp.Name & " (" & oApp.TrueProcess & ")") sTags = String.Empty
lstGames.Items.Add(oData) oApp.ImportTags.Sort(AddressOf mgrCommon.CompareImportTagsByName)
For Each oTag As Tag In oApp.ImportTags
sTags &= oTag.Name & ", "
Next Next
sTags = sTags.TrimEnd(New Char() {",", " "})
oListViewItem = New ListViewItem(New String() {oApp.Name, oApp.TrueProcess, sTags})
oListViewItem.Tag = oApp.CompoundKey
If FinalData.ContainsKey(oApp.CompoundKey) Then
oListViewItem.Checked = True
Else
oListViewItem.Checked = False
End If
If sFilter = String.Empty Then
bAddItem = True
Else
If oApp.Name.ToLower.Contains(sFilter.ToLower) Or oApp.TrueProcess.ToLower.Contains(sFilter.ToLower) Or sTags.ToLower.Contains(sFilter.ToLower) Then
bAddItem = True
End If
End If
If bAddItem Then
If oListViewItem.Checked Then bResetSelectAll = True
lstGames.Items.Add(oListViewItem)
End If
Next
'Change the status of the "Select All" checkbox depending on the status of the items filter results. Set loading flag so we don't trigger any events
bIsLoading = True
If Not bResetSelectAll And bSelectAll Then
bSelectAll = False
chkSelectAll.Checked = False
ElseIf bResetSelectAll And Not bSelectAll Then
bSelectAll = True
chkSelectAll.Checked = True
End If
bIsLoading = False
lstGames.ListViewItemSorter = New ListViewItemComparer(iCurrentSort)
lstGames.EndUpdate()
UpdateSelected()
If txtFilter.Text = String.Empty Then
lblGames.Text = mgrCommon.FormatString(frmAdvancedImport_Configs, lstGames.Items.Count)
Else
lblGames.Text = mgrCommon.FormatString(frmAdvancedImport_Configs, lstGames.Items.Count) & " " & frmAdvancedImport_Filtered
End If
Cursor.Current = Cursors.Default
End Sub End Sub
Private Sub SetForm() Private Sub SetForm()
@@ -42,26 +122,21 @@ Public Class frmAdvancedImport
Me.Text = frmAdvancedImport_FormName Me.Text = frmAdvancedImport_FormName
'Set Form Text 'Set Form Text
lblFilter.Text = frmAdvancedImport_lblFilter
btnCancel.Text = frmAdvancedImport_btnCancel btnCancel.Text = frmAdvancedImport_btnCancel
btnImport.Text = frmAdvancedImport_btnImport btnImport.Text = frmAdvancedImport_btnImport
chkSelectAll.Text = frmAdvancedImport_chkSelectAll
chkSelectAll.Checked = True chkSelectAll.Checked = True
lblGames.Text = mgrCommon.FormatString(frmAdvancedImport_NewConfigs, ImportData.Count)
End Sub
Private Sub BuildList() 'Init Filter Timer
Dim oData As KeyValuePair(Of String, String) tmFilterTimer = New Timer()
tmFilterTimer.Interval = 1000
For i As Integer = 0 To lstGames.Items.Count - 1 tmFilterTimer.Enabled = False
If Not lstGames.GetItemChecked(i) Then
oData = lstGames.Items(i)
ImportData.Remove(oData.Key)
End If
Next
End Sub End Sub
Private Sub UpdateSelected() Private Sub UpdateSelected()
lblSelected.Text = mgrCommon.FormatString(frmAdvancedImport_Selected, lstGames.CheckedItems.Count) lblSelected.Text = mgrCommon.FormatString(frmAdvancedImport_Selected, FinalData.Count)
End Sub End Sub
Private Sub frmAdvancedImport_Load(sender As Object, e As EventArgs) Handles MyBase.Load Private Sub frmAdvancedImport_Load(sender As Object, e As EventArgs) Handles MyBase.Load
@@ -76,8 +151,11 @@ Public Class frmAdvancedImport
If Not bIsLoading Then SelectToggle() If Not bIsLoading Then SelectToggle()
End Sub End Sub
Private Sub lstGames_SelectedValueChanged(sender As Object, e As EventArgs) Handles lstGames.SelectedValueChanged Private Sub lstGames_ItemChecked(sender As Object, e As ItemCheckedEventArgs) Handles lstGames.ItemChecked
If Not bIsLoading Then UpdateSelected() SaveChecked(e.Item)
If Not bIsLoading Then
UpdateSelected()
End If
End Sub End Sub
Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click
@@ -85,8 +163,44 @@ Public Class frmAdvancedImport
End Sub End Sub
Private Sub btnImport_Click(sender As Object, e As EventArgs) Handles btnImport.Click Private Sub btnImport_Click(sender As Object, e As EventArgs) Handles btnImport.Click
BuildList() If FinalData.Count > 0 Then Me.DialogResult = Windows.Forms.DialogResult.OK
If ImportData.Count > 0 Then Me.DialogResult = Windows.Forms.DialogResult.OK
Me.Close() Me.Close()
End Sub End Sub
Private Sub lstGames_ColumnClick(sender As Object, e As ColumnClickEventArgs) Handles lstGames.ColumnClick
iCurrentSort = e.Column
lstGames.ListViewItemSorter = New ListViewItemComparer(e.Column)
End Sub
Private Sub txtFilter_TextChanged(sender As Object, e As EventArgs) Handles txtFilter.TextChanged
If Not tmFilterTimer.Enabled Then
tmFilterTimer.Enabled = True
tmFilterTimer.Start()
End If
End Sub
Private Sub tmFilterTimer_Tick(sender As Object, ByVal e As EventArgs) Handles tmFilterTimer.Tick
LoadData(txtFilter.Text)
tmFilterTimer.Stop()
tmFilterTimer.Enabled = False
End Sub
End Class
' Column Sorter
Class ListViewItemComparer
Implements IComparer
Private col As Integer
Public Sub New()
col = 0
End Sub
Public Sub New(ByVal column As Integer)
col = column
End Sub
Public Function Compare(ByVal x As Object, ByVal y As Object) As Integer Implements IComparer.Compare
Return String.Compare(CType(x, ListViewItem).SubItems(col).Text, CType(y, ListViewItem).SubItems(col).Text)
End Function
End Class End Class
-5
View File
@@ -65,11 +65,6 @@ Public Class frmChooseGame
SetForm() SetForm()
FillComboBox() FillComboBox()
Me.Focus() Me.Focus()
Dim sResource As String = String.Empty
Dim sCode As String = String.Empty
mgrCommon.GetAllStrings(Me, sResource, sCode, "frmChooseGame")
Clipboard.SetText(sResource & vbCrLf & vbCrLf & sCode)
End Sub End Sub
Private Sub btnChoose_Click(sender As System.Object, e As System.EventArgs) Handles btnChoose.Click Private Sub btnChoose_Click(sender As System.Object, e As System.EventArgs) Handles btnChoose.Click
+52 -16
View File
@@ -22,35 +22,30 @@ Partial Class frmFileFolderSearch
'Do not modify it using the code editor. 'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _ <System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent() Private Sub InitializeComponent()
Me.pgbProgress = New System.Windows.Forms.ProgressBar()
Me.txtCurrentLocation = New System.Windows.Forms.TextBox() Me.txtCurrentLocation = New System.Windows.Forms.TextBox()
Me.btnCancel = New System.Windows.Forms.Button() Me.btnCancel = New System.Windows.Forms.Button()
Me.bwSearch = New System.ComponentModel.BackgroundWorker() Me.bwSearch = New System.ComponentModel.BackgroundWorker()
Me.lstResults = New System.Windows.Forms.ListBox()
Me.btnOk = New System.Windows.Forms.Button()
Me.lblResults = New System.Windows.Forms.Label()
Me.cboDrive = New System.Windows.Forms.ComboBox()
Me.SuspendLayout() Me.SuspendLayout()
' '
'pgbProgress
'
Me.pgbProgress.Location = New System.Drawing.Point(12, 12)
Me.pgbProgress.MarqueeAnimationSpeed = 0
Me.pgbProgress.Name = "pgbProgress"
Me.pgbProgress.Size = New System.Drawing.Size(460, 23)
Me.pgbProgress.TabIndex = 0
'
'txtCurrentLocation 'txtCurrentLocation
' '
Me.txtCurrentLocation.Location = New System.Drawing.Point(12, 43) Me.txtCurrentLocation.Location = New System.Drawing.Point(102, 13)
Me.txtCurrentLocation.Name = "txtCurrentLocation" Me.txtCurrentLocation.Name = "txtCurrentLocation"
Me.txtCurrentLocation.ReadOnly = True Me.txtCurrentLocation.ReadOnly = True
Me.txtCurrentLocation.Size = New System.Drawing.Size(379, 20) Me.txtCurrentLocation.Size = New System.Drawing.Size(370, 20)
Me.txtCurrentLocation.TabIndex = 0 Me.txtCurrentLocation.TabIndex = 0
Me.txtCurrentLocation.TabStop = False Me.txtCurrentLocation.TabStop = False
' '
'btnCancel 'btnCancel
' '
Me.btnCancel.Location = New System.Drawing.Point(397, 41) Me.btnCancel.Location = New System.Drawing.Point(397, 146)
Me.btnCancel.Name = "btnCancel" Me.btnCancel.Name = "btnCancel"
Me.btnCancel.Size = New System.Drawing.Size(75, 23) Me.btnCancel.Size = New System.Drawing.Size(75, 23)
Me.btnCancel.TabIndex = 0 Me.btnCancel.TabIndex = 4
Me.btnCancel.Text = "&Cancel" Me.btnCancel.Text = "&Cancel"
Me.btnCancel.UseVisualStyleBackColor = True Me.btnCancel.UseVisualStyleBackColor = True
' '
@@ -58,14 +53,52 @@ Partial Class frmFileFolderSearch
' '
Me.bwSearch.WorkerSupportsCancellation = True Me.bwSearch.WorkerSupportsCancellation = True
' '
'lstResults
'
Me.lstResults.FormattingEnabled = True
Me.lstResults.Location = New System.Drawing.Point(12, 58)
Me.lstResults.Name = "lstResults"
Me.lstResults.Size = New System.Drawing.Size(460, 82)
Me.lstResults.TabIndex = 2
'
'btnOk
'
Me.btnOk.Location = New System.Drawing.Point(316, 146)
Me.btnOk.Name = "btnOk"
Me.btnOk.Size = New System.Drawing.Size(75, 23)
Me.btnOk.TabIndex = 3
Me.btnOk.Text = "&OK"
Me.btnOk.UseVisualStyleBackColor = True
'
'lblResults
'
Me.lblResults.Location = New System.Drawing.Point(9, 42)
Me.lblResults.Name = "lblResults"
Me.lblResults.Size = New System.Drawing.Size(463, 13)
Me.lblResults.TabIndex = 1
Me.lblResults.Text = "Search Results"
Me.lblResults.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'cboDrive
'
Me.cboDrive.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cboDrive.FormattingEnabled = True
Me.cboDrive.Location = New System.Drawing.Point(12, 13)
Me.cboDrive.Name = "cboDrive"
Me.cboDrive.Size = New System.Drawing.Size(85, 21)
Me.cboDrive.TabIndex = 5
'
'frmFileFolderSearch 'frmFileFolderSearch
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(484, 77) Me.ClientSize = New System.Drawing.Size(484, 181)
Me.Controls.Add(Me.cboDrive)
Me.Controls.Add(Me.lblResults)
Me.Controls.Add(Me.btnOk)
Me.Controls.Add(Me.lstResults)
Me.Controls.Add(Me.btnCancel) Me.Controls.Add(Me.btnCancel)
Me.Controls.Add(Me.txtCurrentLocation) Me.Controls.Add(Me.txtCurrentLocation)
Me.Controls.Add(Me.pgbProgress)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
Me.MaximizeBox = False Me.MaximizeBox = False
Me.MinimizeBox = False Me.MinimizeBox = False
@@ -77,8 +110,11 @@ Partial Class frmFileFolderSearch
Me.PerformLayout() Me.PerformLayout()
End Sub End Sub
Friend WithEvents pgbProgress As System.Windows.Forms.ProgressBar
Friend WithEvents txtCurrentLocation As System.Windows.Forms.TextBox Friend WithEvents txtCurrentLocation As System.Windows.Forms.TextBox
Friend WithEvents btnCancel As System.Windows.Forms.Button Friend WithEvents btnCancel As System.Windows.Forms.Button
Friend WithEvents bwSearch As System.ComponentModel.BackgroundWorker Friend WithEvents bwSearch As System.ComponentModel.BackgroundWorker
Friend WithEvents lstResults As System.Windows.Forms.ListBox
Friend WithEvents btnOk As System.Windows.Forms.Button
Friend WithEvents lblResults As System.Windows.Forms.Label
Friend WithEvents cboDrive As System.Windows.Forms.ComboBox
End Class End Class
+132 -17
View File
@@ -3,14 +3,34 @@ Imports System.IO
Public Class frmFileFolderSearch Public Class frmFileFolderSearch
Private sSearchItem As String Private sSearchItem As String
Private sGameName As String = String.Empty
Private bIsLoading As Boolean
Private bIsFolder As Boolean Private bIsFolder As Boolean
Private sFoundItem As String Private sFoundItem As String
Private oDrives As List(Of DriveInfo) Private oDrives As List(Of DriveInfo)
Private iCurrentDrive As Integer
Private oSearchDrive As DirectoryInfo Private oSearchDrive As DirectoryInfo
Dim bShutdown As Boolean = False Dim bShutdown As Boolean = False
Private Enum eStopStatus As Integer
Cancel = 1
ChangeDrive = 2
FoundResult = 3
FinishedDrive = 4
End Enum
Private iStopStatus As eStopStatus
Delegate Sub UpdateInfoCallBack(ByVal sCurrentFolder As String) Delegate Sub UpdateInfoCallBack(ByVal sCurrentFolder As String)
Delegate Sub UpdateResultsCallBack(ByVal sItem As String)
Public Property GameName As String
Get
Return sGameName
End Get
Set(value As String)
sGameName = value
End Set
End Property
Public Property SearchItem As String Public Property SearchItem As String
Get Get
@@ -48,19 +68,38 @@ Public Class frmFileFolderSearch
End If End If
End Sub End Sub
Private Sub UpdateResults(ByVal sItem As String)
If lstResults.InvokeRequired = True Then
Dim d As New UpdateInfoCallBack(AddressOf UpdateResults)
Me.Invoke(d, New Object() {sItem})
Else
'It's possible the same location will be searched twice when using Linux. Filter out duplicate results
If Not lstResults.Items.Contains(sItem) Then
lstResults.Items.Add(sItem)
End If
End If
End Sub
Private Function SearchDirectory(ByVal dir As DirectoryInfo, ByVal sDirectoryName As String) As String Private Function SearchDirectory(ByVal dir As DirectoryInfo, ByVal sDirectoryName As String) As String
Dim sSubSearch As String = String.Empty Dim sSubSearch As String = String.Empty
Dim sFoundItem As String = String.Empty
If bwSearch.CancellationPending Then If bwSearch.CancellationPending Then
Return "Cancel" Return "Cancel"
End If End If
'Ignore Symlinks
If (dir.Attributes And FileAttributes.ReparsePoint) = FileAttributes.ReparsePoint Then
Return String.Empty
End If
UpdateInfo(dir.FullName) UpdateInfo(dir.FullName)
Try Try
'Search Current Directory 'Search Current Directory
If dir.GetDirectories(sDirectoryName).Length > 0 Then If dir.GetDirectories(sDirectoryName).Length > 0 Then
Return dir.FullName & "\" & sDirectoryName sFoundItem = dir.FullName & Path.DirectorySeparatorChar & sDirectoryName
UpdateResults(sFoundItem)
End If End If
'Search Sub Directory 'Search Sub Directory
@@ -82,23 +121,31 @@ Public Class frmFileFolderSearch
Private Function SearchFile(ByVal dir As DirectoryInfo, ByVal sFileName As String) As String Private Function SearchFile(ByVal dir As DirectoryInfo, ByVal sFileName As String) As String
Dim sSubSearch As String = String.Empty Dim sSubSearch As String = String.Empty
Dim sFoundItem As String = String.Empty
If bwSearch.CancellationPending Then If bwSearch.CancellationPending Then
Return "Cancel" Return "Cancel"
End If End If
'Ignore Symlinks
If (dir.Attributes And FileAttributes.ReparsePoint) = FileAttributes.ReparsePoint Then
Return String.Empty
End If
UpdateInfo(dir.FullName) UpdateInfo(dir.FullName)
Try Try
'Search Current Directory 'Search Current Directory
If dir.GetFiles(sFileName).Length > 0 Then If dir.GetFiles(sFileName).Length > 0 Then
Return dir.FullName & "\" & sFileName sFoundItem = Path.GetDirectoryName(dir.FullName & Path.DirectorySeparatorChar & sFileName)
UpdateResults(sFoundItem)
End If End If
'Search Sub Directory 'Search Sub Directory
Dim subdirs() As DirectoryInfo = dir.GetDirectories("*") Dim subdirs() As DirectoryInfo = dir.GetDirectories("*")
For Each newDir As DirectoryInfo In subdirs For Each newDir As DirectoryInfo In subdirs
sSubSearch = SearchFile(newDir, sFileName) sSubSearch = SearchFile(newDir, sFileName)
If sSubSearch <> String.Empty Then If sSubSearch <> String.Empty Then
Return sSubSearch Return sSubSearch
End If End If
@@ -113,39 +160,60 @@ Public Class frmFileFolderSearch
End Function End Function
Private Sub GetDrives() Private Sub GetDrives()
Dim oComboItems As New List(Of KeyValuePair(Of Integer, String))
Dim iCount As Integer = 0
'cboDrive
cboDrive.ValueMember = "Key"
cboDrive.DisplayMember = "Value"
oDrives = New List(Of DriveInfo) oDrives = New List(Of DriveInfo)
For Each oDrive As DriveInfo In My.Computer.FileSystem.Drives For Each oDrive As DriveInfo In My.Computer.FileSystem.Drives
If oDrive.DriveType = IO.DriveType.Fixed Then If oDrive.DriveType = IO.DriveType.Fixed Then
oDrives.Add(oDrive) oDrives.Add(oDrive)
oComboItems.Add(New KeyValuePair(Of Integer, String)(iCount, oDrive.RootDirectory.ToString))
iCount += 1
End If End If
Next Next
cboDrive.DataSource = oComboItems
End Sub End Sub
Private Sub Search(ByVal oDrive As DriveInfo) Private Sub Search(ByVal oDrive As DriveInfo)
pgbProgress.Style = ProgressBarStyle.Marquee iStopStatus = eStopStatus.FinishedDrive
pgbProgress.MarqueeAnimationSpeed = 5
oSearchDrive = oDrive.RootDirectory oSearchDrive = oDrive.RootDirectory
bwSearch.RunWorkerAsync() bwSearch.RunWorkerAsync()
iCurrentDrive += 1
End Sub End Sub
Private Sub EndSearch() Private Sub EndSearch()
Dim oResult As MsgBoxResult
pgbProgress.MarqueeAnimationSpeed = 0
If FoundItem = "Cancel" Then FoundItem = String.Empty If FoundItem = "Cancel" Then FoundItem = String.Empty
If oDrives.Count > iCurrentDrive And FoundItem = String.Empty Then Select Case iStopStatus
oResult = mgrCommon.ShowMessage(frmFileFolderSearch_SwitchDrives, New String() {oSearchDrive.Root.ToString, oDrives(iCurrentDrive).RootDirectory.ToString}, MsgBoxStyle.YesNo) Case eStopStatus.Cancel
If oResult = MsgBoxResult.Yes Then SearchComplete(frmFileFolderSearch_SearchCancel)
Search(oDrives(iCurrentDrive)) Case eStopStatus.ChangeDrive
Search(oDrives(cboDrive.SelectedValue))
Case eStopStatus.FinishedDrive
'Attempt to move onto the next drive it one exists and there's been no results
If oDrives.Count > 1 And lstResults.Items.Count = 0 Then
If cboDrive.SelectedIndex = (cboDrive.Items.Count - 1) Then
cboDrive.SelectedIndex = 0
Else Else
bShutdown = True cboDrive.SelectedIndex = cboDrive.SelectedIndex + 1
Me.Close()
End If End If
Else Else
SearchComplete(frmFileFolderSearch_SearchComplete)
End If
Case eStopStatus.FoundResult
FoundItem = lstResults.SelectedItem.ToString
bShutdown = True bShutdown = True
Me.Close() Me.Close()
End Select
End Sub
Private Sub SearchComplete(ByVal sStopMessage As String)
txtCurrentLocation.Text = sStopMessage
If lstResults.Items.Count > 0 Then
lstResults.SelectedIndex = 0
End If End If
End Sub End Sub
@@ -154,13 +222,17 @@ Public Class frmFileFolderSearch
Me.Text = frmFileFolderSearch_FormName Me.Text = frmFileFolderSearch_FormName
'Set Form Text 'Set Form Text
lblResults.Text = frmFileFolderSearch_lblResults
btnOk.Text = frmFileFolderSearch_btnOk
btnCancel.Text = frmFileFolderSearch_btnCancel btnCancel.Text = frmFileFolderSearch_btnCancel
End Sub End Sub
Private Sub frmFileFolderSearch_Load(sender As Object, e As EventArgs) Handles MyBase.Load Private Sub frmFileFolderSearch_Load(sender As Object, e As EventArgs) Handles MyBase.Load
bIsLoading = True
SetForm() SetForm()
GetDrives() GetDrives()
Search(oDrives(iCurrentDrive)) bIsLoading = False
Search(oDrives(0))
End Sub End Sub
Private Sub bwSearch_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles bwSearch.DoWork Private Sub bwSearch_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles bwSearch.DoWork
@@ -176,11 +248,54 @@ Public Class frmFileFolderSearch
End Sub End Sub
Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click
If bwSearch.IsBusy Then
iStopStatus = eStopStatus.Cancel
bwSearch.CancelAsync() bwSearch.CancelAsync()
Else
bShutdown = True
Me.Close()
End If
End Sub End Sub
Private Sub frmFileFolderSearch_FormClosing(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosing Private Sub frmFileFolderSearch_FormClosing(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosing
bwSearch.CancelAsync()
If Not bShutdown Then e.Cancel = True If Not bShutdown Then e.Cancel = True
End Sub End Sub
Private Sub btnOk_Click(sender As Object, e As EventArgs) Handles btnOk.Click
Dim sItem As String
If lstResults.SelectedItems.Count = 1 Then
sItem = lstResults.SelectedItem.ToString
If mgrCommon.ShowMessage(mgrPath_ConfirmPathCorrect, New String() {GameName, sItem}, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
If bwSearch.IsBusy Then
iStopStatus = eStopStatus.FoundResult
bwSearch.CancelAsync()
Else
FoundItem = sItem
bShutdown = True
Me.Close()
End If
End If
End If
End Sub
Private Sub cboDrive_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboDrive.SelectedIndexChanged
If Not bIsLoading Then
Dim oResult As MsgBoxResult
oResult = mgrCommon.ShowMessage(frmFileFolderSearch_SwitchDrives, New String() {oDrives(cboDrive.SelectedValue).RootDirectory.ToString}, MsgBoxStyle.YesNo)
If oResult = MsgBoxResult.Yes Then
If bwSearch.IsBusy Then
iStopStatus = eStopStatus.ChangeDrive
bwSearch.CancelAsync()
Else
Search(oDrives(cboDrive.SelectedValue))
End If
Else
iStopStatus = eStopStatus.FinishedDrive
SearchComplete(frmFileFolderSearch_SearchCancel)
End If
End If
End Sub
End Class End Class
-6
View File
@@ -99,7 +99,6 @@ Partial Class frmFilter
' '
'optAll 'optAll
' '
Me.optAll.AutoSize = True
Me.optAll.Location = New System.Drawing.Point(77, 19) Me.optAll.Location = New System.Drawing.Point(77, 19)
Me.optAll.Name = "optAll" Me.optAll.Name = "optAll"
Me.optAll.Size = New System.Drawing.Size(63, 17) Me.optAll.Size = New System.Drawing.Size(63, 17)
@@ -110,7 +109,6 @@ Partial Class frmFilter
' '
'optAny 'optAny
' '
Me.optAny.AutoSize = True
Me.optAny.Checked = True Me.optAny.Checked = True
Me.optAny.Location = New System.Drawing.Point(6, 19) Me.optAny.Location = New System.Drawing.Point(6, 19)
Me.optAny.Name = "optAny" Me.optAny.Name = "optAny"
@@ -213,7 +211,6 @@ Partial Class frmFilter
' '
'optOr 'optOr
' '
Me.optOr.AutoSize = True
Me.optOr.Location = New System.Drawing.Point(56, 19) Me.optOr.Location = New System.Drawing.Point(56, 19)
Me.optOr.Name = "optOr" Me.optOr.Name = "optOr"
Me.optOr.Size = New System.Drawing.Size(36, 17) Me.optOr.Size = New System.Drawing.Size(36, 17)
@@ -224,7 +221,6 @@ Partial Class frmFilter
' '
'optAnd 'optAnd
' '
Me.optAnd.AutoSize = True
Me.optAnd.Checked = True Me.optAnd.Checked = True
Me.optAnd.Location = New System.Drawing.Point(6, 19) Me.optAnd.Location = New System.Drawing.Point(6, 19)
Me.optAnd.Name = "optAnd" Me.optAnd.Name = "optAnd"
@@ -302,11 +298,9 @@ Partial Class frmFilter
Me.grpTagFilter.ResumeLayout(False) Me.grpTagFilter.ResumeLayout(False)
Me.grpTagFilter.PerformLayout() Me.grpTagFilter.PerformLayout()
Me.grpTagOptions.ResumeLayout(False) Me.grpTagOptions.ResumeLayout(False)
Me.grpTagOptions.PerformLayout()
Me.grpGameFilter.ResumeLayout(False) Me.grpGameFilter.ResumeLayout(False)
Me.grpGameFilter.PerformLayout() Me.grpGameFilter.PerformLayout()
Me.grpGameInfoOptions.ResumeLayout(False) Me.grpGameInfoOptions.ResumeLayout(False)
Me.grpGameInfoOptions.PerformLayout()
Me.ResumeLayout(False) Me.ResumeLayout(False)
Me.PerformLayout() Me.PerformLayout()
-1
View File
@@ -630,7 +630,6 @@ Partial Class frmGameManager
Me.lstGames.Name = "lstGames" Me.lstGames.Name = "lstGames"
Me.lstGames.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended Me.lstGames.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
Me.lstGames.Size = New System.Drawing.Size(228, 381) Me.lstGames.Size = New System.Drawing.Size(228, 381)
Me.lstGames.Sorted = True
Me.lstGames.TabIndex = 1 Me.lstGames.TabIndex = 1
' '
'btnCancel 'btnCancel
+107 -47
View File
@@ -34,7 +34,7 @@ Public Class frmGameManager
Property BackupFolder As String Property BackupFolder As String
Get Get
Return sBackupFolder & "\" Return sBackupFolder & Path.DirectorySeparatorChar
End Get End Get
Set(value As String) Set(value As String)
sBackupFolder = value sBackupFolder = value
@@ -175,7 +175,7 @@ Public Class frmGameManager
sFileName = BackupFolder & oBackupItem.FileName sFileName = BackupFolder & oBackupItem.FileName
'Rename Backup File 'Rename Backup File
sNewFileName = Path.GetDirectoryName(sFileName) & "\" & Path.GetFileName(sFileName).Replace(oOriginalApp.Name, oNewApp.Name) sNewFileName = Path.GetDirectoryName(sFileName) & Path.DirectorySeparatorChar & Path.GetFileName(sFileName).Replace(oOriginalApp.Name, oNewApp.Name)
If File.Exists(sFileName) Then If File.Exists(sFileName) Then
FileSystem.Rename(sFileName, sNewFileName) FileSystem.Rename(sFileName, sNewFileName)
End If End If
@@ -265,7 +265,7 @@ Public Class frmGameManager
Next Next
End If End If
lstGames.Items.Clear() lstGames.DataSource = Nothing
FormatAndFillList() FormatAndFillList()
End Sub End Sub
@@ -336,8 +336,14 @@ Public Class frmGameManager
End If End If
End If End If
'Unix Handler
If Not mgrCommon.IsUnix Then
sNewPath = mgrCommon.OpenFileBrowser(frmGameManager_ChooseCustomIcon, "ico", _ sNewPath = mgrCommon.OpenFileBrowser(frmGameManager_ChooseCustomIcon, "ico", _
frmGameManager_Icon, sDefaultFolder, False) frmGameManager_Icon, sDefaultFolder, False)
Else
sNewPath = mgrCommon.OpenFileBrowser(frmGameManager_ChooseCustomIcon, "png", _
"PNG", sDefaultFolder, False)
End If
If sNewPath <> String.Empty Then If sNewPath <> String.Empty Then
txtIcon.Text = sNewPath txtIcon.Text = sNewPath
@@ -370,33 +376,40 @@ Public Class frmGameManager
Dim oApp As clsGame Dim oApp As clsGame
Dim oData As KeyValuePair(Of String, String) Dim oData As KeyValuePair(Of String, String)
Dim oList As New List(Of KeyValuePair(Of String, String))
lstGames.ValueMember = "Key"
lstGames.DisplayMember = "Value"
lstGames.BeginUpdate()
For Each de As DictionaryEntry In AppData For Each de As DictionaryEntry In AppData
oApp = DirectCast(de.Value, clsGame) oApp = DirectCast(de.Value, clsGame)
oData = New KeyValuePair(Of String, String)(oApp.ID, oApp.Name) oData = New KeyValuePair(Of String, String)(oApp.ID, oApp.Name)
lstGames.Items.Add(oData) oList.Add(oData)
Next Next
lstGames.EndUpdate() oList.Sort(AddressOf mgrCommon.CompareByListBoxItemByValue)
lstGames.BeginUpdate()
lstGames.DataSource = oList
lstGames.ValueMember = "Key"
lstGames.DisplayMember = "Value"
lstGames.EndUpdate()
lstGames.ClearSelected()
IsLoading = False IsLoading = False
End Sub End Sub
Private Sub OpenBackupFile() Private Sub OpenBackupFile()
Dim sFileName As String Dim sFileName As String
Dim oProcessStartInfo As ProcessStartInfo
sFileName = BackupFolder & CurrentBackupItem.FileName sFileName = BackupFolder & CurrentBackupItem.FileName
If File.Exists(sFileName) Then If File.Exists(sFileName) Then
Process.Start("explorer.exe", "/select," & sFileName) oProcessStartInfo = New ProcessStartInfo
oProcessStartInfo.FileName = sFileName
oProcessStartInfo.UseShellExecute = True
oProcessStartInfo.Verb = "open"
Process.Start(oProcessStartInfo)
Else Else
mgrCommon.ShowMessage(frmGameManager_ErrorNoBackupExists, MsgBoxStyle.Exclamation) mgrCommon.ShowMessage(frmGameManager_ErrorNoBackupExists, MsgBoxStyle.Exclamation)
End If End If
End Sub End Sub
Private Sub UpdateBuilderButtonLabel(ByVal sBuilderString As String, ByVal sLabel As String, ByVal btn As Button, ByVal bDirty As Boolean) Private Sub UpdateBuilderButtonLabel(ByVal sBuilderString As String, ByVal sLabel As String, ByVal btn As Button, ByVal bDirty As Boolean)
@@ -424,8 +437,8 @@ Public Class frmGameManager
End If End If
Else Else
If txtAppPath.Text <> String.Empty Then If txtAppPath.Text <> String.Empty Then
If Directory.Exists(txtAppPath.Text & "\" & txtSavePath.Text) Then If Directory.Exists(txtAppPath.Text & Path.DirectorySeparatorChar & txtSavePath.Text) Then
sRoot = txtAppPath.Text & "\" & txtSavePath.Text sRoot = txtAppPath.Text & Path.DirectorySeparatorChar & txtSavePath.Text
End If End If
End If End If
End If End If
@@ -451,14 +464,14 @@ Public Class frmGameManager
If Not CurrentBackupItem.AbsolutePath Then If Not CurrentBackupItem.AbsolutePath Then
If CurrentGame.ProcessPath <> String.Empty Then If CurrentGame.ProcessPath <> String.Empty Then
CurrentBackupItem.RelativeRestorePath = CurrentGame.ProcessPath & "\" & CurrentBackupItem.RestorePath CurrentBackupItem.RelativeRestorePath = CurrentGame.ProcessPath & Path.DirectorySeparatorChar & CurrentBackupItem.RestorePath
Else Else
sProcess = CurrentGame.TrueProcess sProcess = CurrentGame.TrueProcess
If mgrCommon.IsProcessNotSearchable(CurrentGame) Then bNoAuto = True If mgrCommon.IsProcessNotSearchable(CurrentGame) Then bNoAuto = True
sRestorePath = mgrPath.ProcessPathSearch(CurrentBackupItem.Name, sProcess, mgrCommon.FormatString(frmGameManager_ErrorPathNotSet, CurrentBackupItem.Name), bNoAuto) sRestorePath = mgrPath.ProcessPathSearch(CurrentBackupItem.Name, sProcess, mgrCommon.FormatString(frmGameManager_ErrorPathNotSet, CurrentBackupItem.Name), bNoAuto)
If sRestorePath <> String.Empty Then If sRestorePath <> String.Empty Then
CurrentBackupItem.RelativeRestorePath = sRestorePath & "\" & CurrentBackupItem.RestorePath CurrentBackupItem.RelativeRestorePath = sRestorePath & Path.DirectorySeparatorChar & CurrentBackupItem.RestorePath
txtAppPath.Text = sRestorePath txtAppPath.Text = sRestorePath
Else Else
Return False Return False
@@ -471,6 +484,7 @@ Public Class frmGameManager
Private Sub OpenRestorePath() Private Sub OpenRestorePath()
Dim sPath As String = String.Empty Dim sPath As String = String.Empty
Dim oProcessStartInfo As ProcessStartInfo
If CurrentBackupItem.AbsolutePath Then If CurrentBackupItem.AbsolutePath Then
sPath = CurrentBackupItem.RestorePath sPath = CurrentBackupItem.RestorePath
@@ -481,11 +495,14 @@ Public Class frmGameManager
End If End If
If Directory.Exists(sPath) Then If Directory.Exists(sPath) Then
Process.Start("explorer.exe", sPath) oProcessStartInfo = New ProcessStartInfo
oProcessStartInfo.FileName = sPath
oProcessStartInfo.UseShellExecute = True
oProcessStartInfo.Verb = "open"
Process.Start(oProcessStartInfo)
Else Else
mgrCommon.ShowMessage(frmGameManager_ErrorNoRestorePathExists, MsgBoxStyle.Exclamation) mgrCommon.ShowMessage(frmGameManager_ErrorNoRestorePathExists, MsgBoxStyle.Exclamation)
End If End If
End Sub End Sub
Private Sub OpenTags() Private Sub OpenTags()
@@ -518,8 +535,6 @@ Public Class frmGameManager
Private Sub GetBackupInfo(ByVal oApp As clsGame) Private Sub GetBackupInfo(ByVal oApp As clsGame)
Dim oBackupInfo As clsBackup Dim oBackupInfo As clsBackup
Dim sFileName As String Dim sFileName As String
Dim oFileInfo As FileInfo
Dim dFileSize As Double
If oRemoteBackupData.Contains(oApp.Name) Then If oRemoteBackupData.Contains(oApp.Name) Then
CurrentBackupItem = DirectCast(oRemoteBackupData(oApp.Name), clsBackup) CurrentBackupItem = DirectCast(oRemoteBackupData(oApp.Name), clsBackup)
@@ -532,16 +547,12 @@ Public Class frmGameManager
btnDeleteBackup.Enabled = True btnDeleteBackup.Enabled = True
If File.Exists(sFileName) Then If File.Exists(sFileName) Then
oFileInfo = New FileInfo(sFileName) txtFileSize.Text = mgrCommon.GetFileSize(sFileName)
dFileSize = oFileInfo.Length
If dFileSize > 1048576 Then
txtFileSize.Text = mgrCommon.FormatString(App_MB, Math.Round(dFileSize / 1048576, 2).ToString)
Else
txtFileSize.Text = mgrCommon.FormatString(App_KB, Math.Round(dFileSize / 1024, 2).ToString)
End If
Else Else
txtFileSize.Text = frmGameManager_ErrorNoBackupExists txtFileSize.Text = frmGameManager_ErrorNoBackupExists
End If End If
mgrRestore.DoPathOverride(CurrentBackupItem, oApp)
txtRestorePath.Text = CurrentBackupItem.RestorePath txtRestorePath.Text = CurrentBackupItem.RestorePath
Else Else
txtCurrentBackup.Text = frmGameManager_Never txtCurrentBackup.Text = frmGameManager_Never
@@ -589,10 +600,10 @@ Public Class frmGameManager
mgrManifest.DoManifestDelete(CurrentBackupItem, mgrSQLite.Database.Remote) mgrManifest.DoManifestDelete(CurrentBackupItem, mgrSQLite.Database.Remote)
'Delete referenced backup file from the backup folder 'Delete referenced backup file from the backup folder
If File.Exists(BackupFolder & CurrentBackupItem.FileName) Then File.Delete(BackupFolder & CurrentBackupItem.FileName) mgrCommon.DeleteFile(BackupFolder & CurrentBackupItem.FileName)
'Check if using backup sub-directories (Probably not the best way to check for this) 'Check if using backup sub-directories (Probably not the best way to check for this)
If CurrentBackupItem.FileName.StartsWith(CurrentBackupItem.Name & "\") Then If CurrentBackupItem.FileName.StartsWith(CurrentBackupItem.Name & Path.DirectorySeparatorChar) Then
'Build sub-dir backup path 'Build sub-dir backup path
sSubDir = BackupFolder & CurrentBackupItem.Name sSubDir = BackupFolder & CurrentBackupItem.Name
@@ -602,11 +613,11 @@ Public Class frmGameManager
If oDir.GetDirectories.Length > 0 Or oDir.GetFiles.Length > 0 Then If oDir.GetDirectories.Length > 0 Or oDir.GetFiles.Length > 0 Then
'Confirm 'Confirm
If mgrCommon.ShowMessage(frmGameManager_ConfirmBackupFolderDelete, New String() {sSubDir, oDir.GetDirectories.Length, oDir.GetFiles.Length}, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then If mgrCommon.ShowMessage(frmGameManager_ConfirmBackupFolderDelete, New String() {sSubDir, oDir.GetDirectories.Length, oDir.GetFiles.Length}, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
If Directory.Exists(sSubDir) Then Directory.Delete(sSubDir, True) If Directory.Exists(sSubDir) Then mgrCommon.DeleteDirectory(sSubDir, True)
End If End If
Else Else
'Folder is empty, delete the empty sub-folder 'Folder is empty, delete the empty sub-folder
If Directory.Exists(sSubDir) Then Directory.Delete(sSubDir) If Directory.Exists(sSubDir) Then mgrCommon.DeleteDirectory(sSubDir)
End If End If
End If End If
End If End If
@@ -819,6 +830,7 @@ Public Class frmGameManager
btnAdd.Enabled = True btnAdd.Enabled = True
btnDelete.Enabled = False btnDelete.Enabled = False
btnBackup.Enabled = False btnBackup.Enabled = False
btnOpenRestorePath.Enabled = False
btnTags.Enabled = False btnTags.Enabled = False
lblTags.Visible = False lblTags.Visible = False
btnInclude.Text = frmGameManager_btnInclude btnInclude.Text = frmGameManager_btnInclude
@@ -883,6 +895,51 @@ Public Class frmGameManager
IsLoading = False IsLoading = False
End Sub End Sub
Private Sub FolderSaveModeChange()
If chkFolderSave.Checked Then
btnInclude.Enabled = False
If txtFileType.Text <> String.Empty Then
txtFileType.Text = String.Empty
UpdateBuilderButtonLabel(txtFileType.Text, frmGameManager_IncludeShortcut, btnInclude, False)
End If
Else
btnInclude.Enabled = True
End If
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
Else
lblSavePath.Enabled = True
btnSavePathBrowse.Enabled = True
txtSavePath.Enabled = True
chkFolderSave.Enabled = True
chkTimeStamp.Enabled = True
btnInclude.Enabled = True
btnExclude.Enabled = True
End If
End Sub
Private Sub EditApp() Private Sub EditApp()
eCurrentMode = eModes.Edit eCurrentMode = eModes.Edit
ModeChange() ModeChange()
@@ -975,7 +1032,7 @@ Public Class frmGameManager
Case eModes.MultiSelect Case eModes.MultiSelect
Dim sMonitorIDs As New List(Of String) Dim sMonitorIDs As New List(Of String)
For Each oData In lstGames.SelectedItems For Each oData In lstGames.SelectedItems
sMonitorIDs.Add(AppData(oData.Key)) sMonitorIDs.Add(oData.Key)
Next Next
If mgrCommon.ShowMessage(frmGameManager_ConfirmMultiSave, New String() {sMonitorIDs.Count, mgrCommon.BooleanYesNo(oApp.Enabled), mgrCommon.BooleanYesNo(oApp.MonitorOnly)}, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then If mgrCommon.ShowMessage(frmGameManager_ConfirmMultiSave, New String() {sMonitorIDs.Count, mgrCommon.BooleanYesNo(oApp.Enabled), mgrCommon.BooleanYesNo(oApp.MonitorOnly)}, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
@@ -986,13 +1043,10 @@ Public Class frmGameManager
End Select End Select
If bSuccess Then If bSuccess Then
Dim iSelected As Integer
IsDirty = False IsDirty = False
LoadData() LoadData()
iSelected = lstGames.Items.IndexOf(New KeyValuePair(Of String, String)(oApp.ID, oApp.Name))
If iSelected = -1 Then eCurrentMode = eModes.Disabled
ModeChange() ModeChange()
If eCurrentMode = eModes.View Then lstGames.SelectedIndex = iSelected If eCurrentMode = eModes.View Then lstGames.SelectedValue = oApp.ID
End If End If
End Sub End Sub
@@ -1028,6 +1082,7 @@ Public Class frmGameManager
End Sub End Sub
Private Sub SwitchApp() Private Sub SwitchApp()
If Not bIsLoading Then
If lstGames.SelectedItems.Count = 1 Then If lstGames.SelectedItems.Count = 1 Then
eCurrentMode = eModes.View eCurrentMode = eModes.View
FillData() FillData()
@@ -1036,6 +1091,7 @@ Public Class frmGameManager
eCurrentMode = eModes.MultiSelect eCurrentMode = eModes.MultiSelect
ModeChange() ModeChange()
End If End If
End If
End Sub End Sub
Private Function CoreValidatation(ByVal oApp As clsGame) As Boolean Private Function CoreValidatation(ByVal oApp As clsGame) As Boolean
@@ -1204,7 +1260,7 @@ Public Class frmGameManager
Private Sub ExportGameList() Private Sub ExportGameList()
Dim sLocation As String Dim sLocation As String
sLocation = mgrCommon.SaveFileBrowser(frmGameManager_ChooseExportXML, "xml", frmGameManager_XML, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "Game Backup Monitor Export " & Date.Now.ToString("dd-MMM-yyyy")) sLocation = mgrCommon.SaveFileBrowser(frmGameManager_ChooseExportXML, "xml", frmGameManager_XML, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), frmGameManager_DefaultExportFileName & " " & Date.Now.ToString("dd-MMM-yyyy"))
If sLocation <> String.Empty Then If sLocation <> String.Empty Then
mgrMonitorList.ExportMonitorList(sLocation) mgrMonitorList.ExportMonitorList(sLocation)
@@ -1213,13 +1269,17 @@ Public Class frmGameManager
End Sub End Sub
Private Sub ImportOfficialGameList() Private Sub ImportOfficialGameList()
If mgrCommon.IsUnix Then
If mgrCommon.ShowMessage(frmGameManager_ConfirmUnixImportWarning, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
Exit Sub
End If
End If
If mgrCommon.ShowMessage(frmGameManager_ConfirmOfficialImport, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then If mgrCommon.ShowMessage(frmGameManager_ConfirmOfficialImport, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
If mgrMonitorList.DoImport(App_URLImport) Then If mgrMonitorList.DoImport(App_URLImport) Then
LoadData() LoadData()
End If End If
End If End If
End Sub End Sub
Private Sub SetForm() Private Sub SetForm()
@@ -1300,6 +1360,9 @@ Public Class frmGameManager
AssignDirtyHandlers(grpExtra.Controls) AssignDirtyHandlers(grpExtra.Controls)
AssignDirtyHandlers(grpStats.Controls) AssignDirtyHandlers(grpStats.Controls)
AssignDirtyHandlersMisc() AssignDirtyHandlersMisc()
LoadData(False)
ModeChange()
End Sub End Sub
Private Sub lstGames_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lstGames.SelectedIndexChanged Private Sub lstGames_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lstGames.SelectedIndexChanged
@@ -1403,15 +1466,11 @@ Public Class frmGameManager
End Sub End Sub
Private Sub chkFolderSave_CheckedChanged(sender As Object, e As EventArgs) Handles chkFolderSave.CheckedChanged Private Sub chkFolderSave_CheckedChanged(sender As Object, e As EventArgs) Handles chkFolderSave.CheckedChanged
If chkFolderSave.Checked Then FolderSaveModeChange()
btnInclude.Enabled = False End Sub
If txtFileType.Text <> String.Empty Then
txtFileType.Text = String.Empty Private Sub chkMonitorOnly_CheckedChanged(sender As Object, e As EventArgs) Handles chkMonitorOnly.CheckedChanged
UpdateBuilderButtonLabel(txtFileType.Text, frmGameManager_IncludeShortcut, btnInclude, False) MonitorOnlyModeChange()
End If
Else
btnInclude.Enabled = True
End If
End Sub End Sub
Private Sub btnImport_Click(sender As Object, e As EventArgs) Handles btnImport.Click Private Sub btnImport_Click(sender As Object, e As EventArgs) Handles btnImport.Click
@@ -1429,4 +1488,5 @@ Public Class frmGameManager
Private Sub btnExport_Click(sender As Object, e As EventArgs) Handles btnExport.Click Private Sub btnExport_Click(sender As Object, e As EventArgs) Handles btnExport.Click
ExportGameList() ExportGameList()
End Sub End Sub
End Class End Class
-3
View File
@@ -170,7 +170,6 @@ Partial Class frmIncludeExclude
' '
'optFileTypes 'optFileTypes
' '
Me.optFileTypes.AutoSize = True
Me.optFileTypes.Location = New System.Drawing.Point(6, 19) Me.optFileTypes.Location = New System.Drawing.Point(6, 19)
Me.optFileTypes.Name = "optFileTypes" Me.optFileTypes.Name = "optFileTypes"
Me.optFileTypes.Size = New System.Drawing.Size(73, 17) Me.optFileTypes.Size = New System.Drawing.Size(73, 17)
@@ -181,7 +180,6 @@ Partial Class frmIncludeExclude
' '
'optIndividualFiles 'optIndividualFiles
' '
Me.optIndividualFiles.AutoSize = True
Me.optIndividualFiles.Location = New System.Drawing.Point(85, 19) Me.optIndividualFiles.Location = New System.Drawing.Point(85, 19)
Me.optIndividualFiles.Name = "optIndividualFiles" Me.optIndividualFiles.Name = "optIndividualFiles"
Me.optIndividualFiles.Size = New System.Drawing.Size(94, 17) Me.optIndividualFiles.Size = New System.Drawing.Size(94, 17)
@@ -250,7 +248,6 @@ Partial Class frmIncludeExclude
Me.Text = "Include / Exclude Builder" Me.Text = "Include / Exclude Builder"
Me.cmsItems.ResumeLayout(False) Me.cmsItems.ResumeLayout(False)
Me.grpFileOptions.ResumeLayout(False) Me.grpFileOptions.ResumeLayout(False)
Me.grpFileOptions.PerformLayout()
Me.ResumeLayout(False) Me.ResumeLayout(False)
Me.PerformLayout() Me.PerformLayout()
+1 -1
View File
@@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAB6 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAB6
CQAAAk1TRnQBSQFMAgEBAwEAAbABAAGwAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo CQAAAk1TRnQBSQFMAgEBAwEAAbgBAAG4AQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
+10 -5
View File
@@ -30,7 +30,7 @@ Public Class frmIncludeExclude
Return sRootFolder Return sRootFolder
End Get End Get
Set(value As String) Set(value As String)
sRootFolder = value.TrimEnd("\") sRootFolder = value.TrimEnd(Path.DirectorySeparatorChar)
End Set End Set
End Property End Property
@@ -52,7 +52,7 @@ Public Class frmIncludeExclude
If sFolders.Length <> 0 Then If sFolders.Length <> 0 Then
For Each sFolder As String In sFolders For Each sFolder As String In sFolders
oChild = New TreeNode(sFolder.Replace(sDirectory, String.Empty).TrimStart("\"), 0, 0) oChild = New TreeNode(sFolder.Replace(sDirectory, String.Empty).TrimStart(Path.DirectorySeparatorChar), 0, 0)
oChild.Name = sFolder oChild.Name = sFolder
oChild.Tag = 0 oChild.Tag = 0
oNode.Nodes.Add(oChild) oNode.Nodes.Add(oChild)
@@ -64,7 +64,7 @@ Public Class frmIncludeExclude
If sFiles.Length <> 0 Then If sFiles.Length <> 0 Then
For Each sFile As String In sFiles For Each sFile As String In sFiles
oChild = New TreeNode(sFile.Replace(sDirectory, String.Empty).TrimStart("\"), 1, 1) oChild = New TreeNode(sFile.Replace(sDirectory, String.Empty).TrimStart(Path.DirectorySeparatorChar), 1, 1)
oChild.Tag = 1 oChild.Tag = 1
oNode.Nodes.Add(oChild) oNode.Nodes.Add(oChild)
Next Next
@@ -195,7 +195,7 @@ Public Class frmIncludeExclude
If Path.GetFileName(txtRootFolder.Text) = sNewLabel Then If Path.GetFileName(txtRootFolder.Text) = sNewLabel Then
sFolderCheck = txtRootFolder.Text sFolderCheck = txtRootFolder.Text
Else Else
sFolderCheck = txtRootFolder.Text & "\" & sNewLabel sFolderCheck = txtRootFolder.Text & Path.DirectorySeparatorChar & sNewLabel
End If End If
If Directory.Exists(sFolderCheck) Then If Directory.Exists(sFolderCheck) Then
iType = 0 iType = 0
@@ -335,10 +335,15 @@ Public Class frmIncludeExclude
Private Sub lstBuilder_AfterLabelEdit(sender As Object, e As LabelEditEventArgs) Handles lstBuilder.AfterLabelEdit Private Sub lstBuilder_AfterLabelEdit(sender As Object, e As LabelEditEventArgs) Handles lstBuilder.AfterLabelEdit
If Not e.Label Is Nothing Then If Not e.Label Is Nothing Then
If e.Label = String.Empty Then
e.CancelEdit = True
End If
If lstBuilder.Items.ContainsKey(e.Label) Then If lstBuilder.Items.ContainsKey(e.Label) Then
e.CancelEdit = True e.CancelEdit = True
Else Else
IdentifyEntry(lstBuilder.Items(e.Item), e.Label) 'Unix Handler - Mono is unable to modify list items during an edit event without crashing
If Not mgrCommon.IsUnix Then IdentifyEntry(lstBuilder.Items(e.Item), e.Label)
End If End If
End If End If
End Sub End Sub
+64 -21
View File
@@ -39,14 +39,17 @@ Partial Class frmMain
Me.gMonTrayTools = New System.Windows.Forms.ToolStripMenuItem() Me.gMonTrayTools = New System.Windows.Forms.ToolStripMenuItem()
Me.gMonTrayToolsCleanMan = New System.Windows.Forms.ToolStripMenuItem() Me.gMonTrayToolsCleanMan = New System.Windows.Forms.ToolStripMenuItem()
Me.gMonTrayToolsCompact = New System.Windows.Forms.ToolStripMenuItem() Me.gMonTrayToolsCompact = New System.Windows.Forms.ToolStripMenuItem()
Me.gMonTrayToolsLog = New System.Windows.Forms.ToolStripMenuItem()
Me.gMonTrayLogClear = New System.Windows.Forms.ToolStripMenuItem()
Me.gMonTrayLogSave = New System.Windows.Forms.ToolStripMenuItem()
Me.gMonTraySep1 = New System.Windows.Forms.ToolStripSeparator() Me.gMonTraySep1 = New System.Windows.Forms.ToolStripSeparator()
Me.gMonTrayExit = New System.Windows.Forms.ToolStripMenuItem() Me.gMonTrayExit = New System.Windows.Forms.ToolStripMenuItem()
Me.bwMonitor = New System.ComponentModel.BackgroundWorker() Me.bwMonitor = New System.ComponentModel.BackgroundWorker()
Me.txtLog = New System.Windows.Forms.TextBox() Me.txtLog = New System.Windows.Forms.TextBox()
Me.gMonStatusStrip = New System.Windows.Forms.StatusStrip() Me.gMonStatusStrip = New System.Windows.Forms.StatusStrip()
Me.gMonStripAdminButton = New System.Windows.Forms.ToolStripSplitButton() Me.gMonStripAdminButton = New System.Windows.Forms.ToolStripStatusLabel()
Me.gMonStripTxtStatus = New System.Windows.Forms.ToolStripStatusLabel() Me.gMonStripTxtStatus = New System.Windows.Forms.ToolStripStatusLabel()
Me.gMonStripStatusButton = New System.Windows.Forms.ToolStripSplitButton() Me.gMonStripStatusButton = New System.Windows.Forms.ToolStripStatusLabel()
Me.gMonMainMenu = New System.Windows.Forms.MenuStrip() Me.gMonMainMenu = New System.Windows.Forms.MenuStrip()
Me.gMonFile = New System.Windows.Forms.ToolStripMenuItem() Me.gMonFile = New System.Windows.Forms.ToolStripMenuItem()
Me.gMonFileMonitor = New System.Windows.Forms.ToolStripMenuItem() Me.gMonFileMonitor = New System.Windows.Forms.ToolStripMenuItem()
@@ -62,6 +65,9 @@ Partial Class frmMain
Me.gMonTools = New System.Windows.Forms.ToolStripMenuItem() Me.gMonTools = New System.Windows.Forms.ToolStripMenuItem()
Me.gMonToolsCleanMan = New System.Windows.Forms.ToolStripMenuItem() Me.gMonToolsCleanMan = New System.Windows.Forms.ToolStripMenuItem()
Me.gMonToolsCompact = New System.Windows.Forms.ToolStripMenuItem() Me.gMonToolsCompact = New System.Windows.Forms.ToolStripMenuItem()
Me.gMonToolsLog = New System.Windows.Forms.ToolStripMenuItem()
Me.gMonLogClear = New System.Windows.Forms.ToolStripMenuItem()
Me.gMonLogSave = New System.Windows.Forms.ToolStripMenuItem()
Me.gMonHelp = New System.Windows.Forms.ToolStripMenuItem() Me.gMonHelp = New System.Windows.Forms.ToolStripMenuItem()
Me.gMonHelpWebSite = New System.Windows.Forms.ToolStripMenuItem() Me.gMonHelpWebSite = New System.Windows.Forms.ToolStripMenuItem()
Me.gMonHelpManual = New System.Windows.Forms.ToolStripMenuItem() Me.gMonHelpManual = New System.Windows.Forms.ToolStripMenuItem()
@@ -93,7 +99,6 @@ Partial Class frmMain
Me.gMonTray.ContextMenuStrip = Me.gMonTrayMenu Me.gMonTray.ContextMenuStrip = Me.gMonTrayMenu
Me.gMonTray.Icon = CType(resources.GetObject("gMonTray.Icon"), System.Drawing.Icon) Me.gMonTray.Icon = CType(resources.GetObject("gMonTray.Icon"), System.Drawing.Icon)
Me.gMonTray.Text = "GBM" Me.gMonTray.Text = "GBM"
Me.gMonTray.Visible = True
' '
'gMonTrayMenu 'gMonTrayMenu
' '
@@ -164,7 +169,7 @@ Partial Class frmMain
' '
'gMonTrayTools 'gMonTrayTools
' '
Me.gMonTrayTools.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonTrayToolsCleanMan, Me.gMonTrayToolsCompact}) Me.gMonTrayTools.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonTrayToolsCleanMan, Me.gMonTrayToolsCompact, Me.gMonTrayToolsLog})
Me.gMonTrayTools.Name = "gMonTrayTools" Me.gMonTrayTools.Name = "gMonTrayTools"
Me.gMonTrayTools.Size = New System.Drawing.Size(161, 22) Me.gMonTrayTools.Size = New System.Drawing.Size(161, 22)
Me.gMonTrayTools.Text = "&Tools" Me.gMonTrayTools.Text = "&Tools"
@@ -181,6 +186,25 @@ Partial Class frmMain
Me.gMonTrayToolsCompact.Size = New System.Drawing.Size(184, 22) Me.gMonTrayToolsCompact.Size = New System.Drawing.Size(184, 22)
Me.gMonTrayToolsCompact.Text = "&Compact Databases" Me.gMonTrayToolsCompact.Text = "&Compact Databases"
' '
'gMonTrayToolsLog
'
Me.gMonTrayToolsLog.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonTrayLogClear, Me.gMonTrayLogSave})
Me.gMonTrayToolsLog.Name = "gMonTrayToolsLog"
Me.gMonTrayToolsLog.Size = New System.Drawing.Size(184, 22)
Me.gMonTrayToolsLog.Text = "&Log"
'
'gMonTrayLogClear
'
Me.gMonTrayLogClear.Name = "gMonTrayLogClear"
Me.gMonTrayLogClear.Size = New System.Drawing.Size(101, 22)
Me.gMonTrayLogClear.Text = "&Clear"
'
'gMonTrayLogSave
'
Me.gMonTrayLogSave.Name = "gMonTrayLogSave"
Me.gMonTrayLogSave.Size = New System.Drawing.Size(101, 22)
Me.gMonTrayLogSave.Text = "&Save"
'
'gMonTraySep1 'gMonTraySep1
' '
Me.gMonTraySep1.Name = "gMonTraySep1" Me.gMonTraySep1.Name = "gMonTraySep1"
@@ -213,7 +237,7 @@ Partial Class frmMain
' '
Me.gMonStatusStrip.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.gMonStatusStrip.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.gMonStatusStrip.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonStripAdminButton, Me.gMonStripTxtStatus, Me.gMonStripStatusButton}) Me.gMonStatusStrip.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonStripAdminButton, Me.gMonStripTxtStatus, Me.gMonStripStatusButton})
Me.gMonStatusStrip.Location = New System.Drawing.Point(0, 364) Me.gMonStatusStrip.Location = New System.Drawing.Point(0, 379)
Me.gMonStatusStrip.Name = "gMonStatusStrip" Me.gMonStatusStrip.Name = "gMonStatusStrip"
Me.gMonStatusStrip.ShowItemToolTips = True Me.gMonStatusStrip.ShowItemToolTips = True
Me.gMonStatusStrip.Size = New System.Drawing.Size(524, 22) Me.gMonStatusStrip.Size = New System.Drawing.Size(524, 22)
@@ -223,33 +247,26 @@ Partial Class frmMain
'gMonStripAdminButton 'gMonStripAdminButton
' '
Me.gMonStripAdminButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image Me.gMonStripAdminButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
Me.gMonStripAdminButton.DropDownButtonWidth = 0
Me.gMonStripAdminButton.Image = Global.GBM.My.Resources.Resources.Icon_User Me.gMonStripAdminButton.Image = Global.GBM.My.Resources.Resources.Icon_User
Me.gMonStripAdminButton.ImageTransparentColor = System.Drawing.Color.Magenta
Me.gMonStripAdminButton.Name = "gMonStripAdminButton" Me.gMonStripAdminButton.Name = "gMonStripAdminButton"
Me.gMonStripAdminButton.Size = New System.Drawing.Size(21, 20) Me.gMonStripAdminButton.Size = New System.Drawing.Size(16, 17)
Me.gMonStripAdminButton.Text = "Elevation" Me.gMonStripAdminButton.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage
Me.gMonStripAdminButton.ToolTipText = "Elevation"
' '
'gMonStripTxtStatus 'gMonStripTxtStatus
' '
Me.gMonStripTxtStatus.Margin = New System.Windows.Forms.Padding(5, 0, 0, 0)
Me.gMonStripTxtStatus.Name = "gMonStripTxtStatus" Me.gMonStripTxtStatus.Name = "gMonStripTxtStatus"
Me.gMonStripTxtStatus.Size = New System.Drawing.Size(395, 17) Me.gMonStripTxtStatus.Size = New System.Drawing.Size(400, 22)
Me.gMonStripTxtStatus.Spring = True Me.gMonStripTxtStatus.Spring = True
Me.gMonStripTxtStatus.Text = "Monitor Status" Me.gMonStripTxtStatus.Text = "Monitor Status"
Me.gMonStripTxtStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft Me.gMonStripTxtStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
' '
'gMonStripStatusButton 'gMonStripStatusButton
' '
Me.gMonStripStatusButton.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right
Me.gMonStripStatusButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
Me.gMonStripStatusButton.DropDownButtonWidth = 0
Me.gMonStripStatusButton.ImageTransparentColor = System.Drawing.Color.Magenta
Me.gMonStripStatusButton.Name = "gMonStripStatusButton" Me.gMonStripStatusButton.Name = "gMonStripStatusButton"
Me.gMonStripStatusButton.Size = New System.Drawing.Size(93, 20) Me.gMonStripStatusButton.Size = New System.Drawing.Size(88, 17)
Me.gMonStripStatusButton.Text = "Monitor Status:" Me.gMonStripStatusButton.Text = "Monitor Status:"
Me.gMonStripStatusButton.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage Me.gMonStripStatusButton.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage
Me.gMonStripStatusButton.ToolTipText = "Click to toggle monitoring on or off."
' '
'gMonMainMenu 'gMonMainMenu
' '
@@ -329,7 +346,7 @@ Partial Class frmMain
' '
'gMonTools 'gMonTools
' '
Me.gMonTools.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonToolsCleanMan, Me.gMonToolsCompact}) Me.gMonTools.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonToolsCleanMan, Me.gMonToolsCompact, Me.gMonToolsLog})
Me.gMonTools.Name = "gMonTools" Me.gMonTools.Name = "gMonTools"
Me.gMonTools.Size = New System.Drawing.Size(47, 20) Me.gMonTools.Size = New System.Drawing.Size(47, 20)
Me.gMonTools.Text = "&Tools" Me.gMonTools.Text = "&Tools"
@@ -346,6 +363,25 @@ Partial Class frmMain
Me.gMonToolsCompact.Size = New System.Drawing.Size(184, 22) Me.gMonToolsCompact.Size = New System.Drawing.Size(184, 22)
Me.gMonToolsCompact.Text = "&Compact Databases" Me.gMonToolsCompact.Text = "&Compact Databases"
' '
'gMonToolsLog
'
Me.gMonToolsLog.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonLogClear, Me.gMonLogSave})
Me.gMonToolsLog.Name = "gMonToolsLog"
Me.gMonToolsLog.Size = New System.Drawing.Size(184, 22)
Me.gMonToolsLog.Text = "&Log"
'
'gMonLogClear
'
Me.gMonLogClear.Name = "gMonLogClear"
Me.gMonLogClear.Size = New System.Drawing.Size(101, 22)
Me.gMonLogClear.Text = "&Clear"
'
'gMonLogSave
'
Me.gMonLogSave.Name = "gMonLogSave"
Me.gMonLogSave.Size = New System.Drawing.Size(101, 22)
Me.gMonLogSave.Text = "&Save"
'
'gMonHelp 'gMonHelp
' '
Me.gMonHelp.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonHelpWebSite, Me.gMonHelpManual, Me.gMonHelpCheckforUpdates, Me.gMonHelpAbout}) Me.gMonHelp.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonHelpWebSite, Me.gMonHelpManual, Me.gMonHelpCheckforUpdates, Me.gMonHelpAbout})
@@ -487,7 +523,7 @@ Partial Class frmMain
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(524, 386) Me.ClientSize = New System.Drawing.Size(524, 401)
Me.Controls.Add(Me.pbTime) Me.Controls.Add(Me.pbTime)
Me.Controls.Add(Me.lblStatus3) Me.Controls.Add(Me.lblStatus3)
Me.Controls.Add(Me.lblStatus2) Me.Controls.Add(Me.lblStatus2)
@@ -505,6 +541,7 @@ Partial Class frmMain
Me.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) 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.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.KeyPreview = True
Me.MainMenuStrip = Me.gMonMainMenu Me.MainMenuStrip = Me.gMonMainMenu
Me.MaximizeBox = False Me.MaximizeBox = False
Me.MinimizeBox = False Me.MinimizeBox = False
@@ -548,7 +585,6 @@ Partial Class frmMain
Friend WithEvents gMonHelpAbout As System.Windows.Forms.ToolStripMenuItem Friend WithEvents gMonHelpAbout As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents gMonTraySetupGameManager As System.Windows.Forms.ToolStripMenuItem Friend WithEvents gMonTraySetupGameManager As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents gMonTraySetupCustomVariables As System.Windows.Forms.ToolStripMenuItem Friend WithEvents gMonTraySetupCustomVariables As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents gMonStripStatusButton As System.Windows.Forms.ToolStripSplitButton
Friend WithEvents pbIcon As System.Windows.Forms.PictureBox Friend WithEvents pbIcon As System.Windows.Forms.PictureBox
Friend WithEvents btnLogToggle As System.Windows.Forms.Button Friend WithEvents btnLogToggle As System.Windows.Forms.Button
Friend WithEvents lblGameTitle As System.Windows.Forms.Label Friend WithEvents lblGameTitle As System.Windows.Forms.Label
@@ -566,7 +602,6 @@ Partial Class frmMain
Friend WithEvents gMonHelpManual As System.Windows.Forms.ToolStripMenuItem Friend WithEvents gMonHelpManual As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents gMonHelpCheckforUpdates As System.Windows.Forms.ToolStripMenuItem Friend WithEvents gMonHelpCheckforUpdates As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents btnCancelOperation As System.Windows.Forms.Button Friend WithEvents btnCancelOperation As System.Windows.Forms.Button
Friend WithEvents gMonStripAdminButton As ToolStripSplitButton
Friend WithEvents gMonTraySetupTags As System.Windows.Forms.ToolStripMenuItem Friend WithEvents gMonTraySetupTags As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents gMonSetupTags As System.Windows.Forms.ToolStripMenuItem Friend WithEvents gMonSetupTags As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents lblStatus1 As Label Friend WithEvents lblStatus1 As Label
@@ -578,4 +613,12 @@ Partial Class frmMain
Friend WithEvents pbTime As System.Windows.Forms.PictureBox Friend WithEvents pbTime As System.Windows.Forms.PictureBox
Friend WithEvents gMonTrayToolsCleanMan As System.Windows.Forms.ToolStripMenuItem Friend WithEvents gMonTrayToolsCleanMan As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents gMonToolsCleanMan As System.Windows.Forms.ToolStripMenuItem Friend WithEvents gMonToolsCleanMan As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents gMonToolsLog As ToolStripMenuItem
Friend WithEvents gMonLogClear As ToolStripMenuItem
Friend WithEvents gMonLogSave As ToolStripMenuItem
Friend WithEvents gMonTrayToolsLog As ToolStripMenuItem
Friend WithEvents gMonTrayLogClear As ToolStripMenuItem
Friend WithEvents gMonTrayLogSave As ToolStripMenuItem
Friend WithEvents gMonStripAdminButton As System.Windows.Forms.ToolStripStatusLabel
Friend WithEvents gMonStripStatusButton As System.Windows.Forms.ToolStripStatusLabel
End Class End Class
+225 -32
View File
@@ -23,11 +23,13 @@ Public Class frmMain
Private eCurrentOperation As eOperation = eOperation.None Private eCurrentOperation As eOperation = eOperation.None
Private bCancelledByUser As Boolean = False Private bCancelledByUser As Boolean = False
Private bShutdown As Boolean = False Private bShutdown As Boolean = False
Private bInitFail As Boolean = False
Private bMenuEnabled As Boolean = True Private bMenuEnabled As Boolean = True
Private bLockdown As Boolean = True Private bLockdown As Boolean = True
Private bFirstRun As Boolean = False Private bFirstRun As Boolean = False
Private bProcessIsAdmin As Boolean = False Private bProcessIsAdmin As Boolean = False
Private bLogToggle As Boolean = False Private bLogToggle As Boolean = False
Private bShowToggle As Boolean = True
Private bAllowIcon As Boolean = False Private bAllowIcon As Boolean = False
Private bAllowDetails As Boolean = False Private bAllowDetails As Boolean = False
Private oPriorImage As Image Private oPriorImage As Image
@@ -35,6 +37,9 @@ Public Class frmMain
Private sPriorCompany As String Private sPriorCompany As String
Private sPriorVersion As String Private sPriorVersion As String
'Developer Debug Flags
Private bProcessDebugMode As Boolean = False
WithEvents oFileWatcher As New System.IO.FileSystemWatcher WithEvents oFileWatcher As New System.IO.FileSystemWatcher
WithEvents tmScanTimer As New Timer WithEvents tmScanTimer As New Timer
@@ -60,7 +65,7 @@ Public Class frmMain
Else Else
Dim sPattern As String = "h:mm tt" Dim sPattern As String = "h:mm tt"
lblLastActionTitle.Visible = True lblLastActionTitle.Visible = True
lblLastAction.Text = sMessage & " at " & TimeOfDay.ToString(sPattern) lblLastAction.Text = sMessage.TrimEnd(".") & " " & mgrCommon.FormatString(frmMain_AtTime, TimeOfDay.ToString(sPattern))
End If End If
End Sub End Sub
@@ -92,7 +97,7 @@ Public Class frmMain
If oGame.AbsolutePath Then If oGame.AbsolutePath Then
sStatus2 = oGame.Path sStatus2 = oGame.Path
Else Else
sStatus2 = oGame.ProcessPath & "\" & oGame.Path sStatus2 = oGame.ProcessPath & System.IO.Path.DirectorySeparatorChar & oGame.Path
End If End If
sStatus3 = String.Empty sStatus3 = String.Empty
@@ -141,15 +146,11 @@ Public Class frmMain
End Sub End Sub
Private Sub ExecuteBackup(ByVal oBackupList As List(Of clsGame)) Private Sub ExecuteBackup(ByVal oBackupList As List(Of clsGame))
'Init Backup Settings
oBackup.Settings = oSettings
oBackup.DoBackup(oBackupList) oBackup.DoBackup(oBackupList)
OperationEnded() OperationEnded()
End Sub End Sub
Private Sub ExecuteRestore(ByVal oRestoreList As List(Of clsBackup)) Private Sub ExecuteRestore(ByVal oRestoreList As List(Of clsBackup))
'Init Restore Settings
oRestore.Settings = oSettings
oRestore.DoRestore(oRestoreList) oRestore.DoRestore(oRestoreList)
OperationEnded() OperationEnded()
End Sub End Sub
@@ -160,19 +161,26 @@ Public Class frmMain
Dim oReadyList As New List(Of clsBackup) Dim oReadyList As New List(Of clsBackup)
Dim oRestoreInfo As clsBackup Dim oRestoreInfo As clsBackup
Dim bTriggerReload As Boolean = False Dim bTriggerReload As Boolean = False
Dim bPathVerified As Boolean
eCurrentOperation = eOperation.Restore eCurrentOperation = eOperation.Restore
OperationStarted() OperationStarted()
'Build Restore List 'Build Restore List
For Each oGame In oRestoreList For Each oGame In oRestoreList
bPathVerified = False
oRestoreInfo = oBackupData(oGame.Name) oRestoreInfo = oBackupData(oGame.Name)
If mgrRestore.CheckPath(oRestoreInfo, oGame, bTriggerReload) Then If mgrRestore.CheckPath(oRestoreInfo, oGame, bTriggerReload) Then
oReadyList.Add(oRestoreInfo) bPathVerified = True
Else Else
UpdateLog(mgrCommon.FormatString(frmMain_ErrorRestorePath, oRestoreInfo.Name), False, ToolTipIcon.Error, True) UpdateLog(mgrCommon.FormatString(frmMain_ErrorRestorePath, oRestoreInfo.Name), False, ToolTipIcon.Error, True)
End If End If
If bPathVerified Then
If oRestore.CheckRestorePrereq(oRestoreInfo) Then
oReadyList.Add(oRestoreInfo)
End If
End If
Next Next
'Reload the monitor list if any game data was changed during the path checks 'Reload the monitor list if any game data was changed during the path checks
@@ -192,6 +200,7 @@ Public Class frmMain
Private Sub RunManualBackup(ByVal oBackupList As List(Of clsGame)) Private Sub RunManualBackup(ByVal oBackupList As List(Of clsGame))
Dim oGame As clsGame Dim oGame As clsGame
Dim bNoAuto As Boolean Dim bNoAuto As Boolean
Dim bPathVerified As Boolean
Dim oReadyList As New List(Of clsGame) Dim oReadyList As New List(Of clsGame)
eCurrentOperation = eOperation.Backup eCurrentOperation = eOperation.Backup
@@ -200,6 +209,7 @@ Public Class frmMain
'Build Backup List 'Build Backup List
For Each oGame In oBackupList For Each oGame In oBackupList
bNoAuto = False bNoAuto = False
bPathVerified = False
gMonStripStatusButton.Enabled = False gMonStripStatusButton.Enabled = False
UpdateLog(mgrCommon.FormatString(frmMain_ManualBackup, oGame.Name), False) UpdateLog(mgrCommon.FormatString(frmMain_ManualBackup, oGame.Name), False)
@@ -211,13 +221,19 @@ Public Class frmMain
End If End If
If oGame.ProcessPath <> String.Empty Then If oGame.ProcessPath <> String.Empty Then
oReadyList.Add(oGame) bPathVerified = True
Else Else
UpdateLog(mgrCommon.FormatString(frmMain_ErrorBackupUnknownPath, oGame.Name), True, ToolTipIcon.Error, True) UpdateLog(mgrCommon.FormatString(frmMain_ErrorBackupUnknownPath, oGame.Name), False, ToolTipIcon.Error, True)
End If End If
Else Else
bPathVerified = True
End If
If bPathVerified Then
If oBackup.CheckBackupPrereq(oGame) Then
oReadyList.Add(oGame) oReadyList.Add(oGame)
End If End If
End If
Next Next
'Run backups 'Run backups
@@ -267,13 +283,13 @@ Public Class frmMain
eCurrentOperation = eOperation.Backup eCurrentOperation = eOperation.Backup
OperationStarted(False) OperationStarted(False)
If oProcess.GameInfo.MonitorOnly = False Then
If SupressBackup() Then If SupressBackup() Then
bDoBackup = False bDoBackup = False
UpdateLog(mgrCommon.FormatString(frmMain_ErrorBackupSessionLength, oProcess.GameInfo.Name), False) UpdateLog(mgrCommon.FormatString(frmMain_ErrorBackupSessionLength, oProcess.GameInfo.Name), False)
SetLastAction(mgrCommon.FormatString(frmMain_ErrorBackupSessionLength, oProcess.GameInfo.CroppedName)) SetLastAction(mgrCommon.FormatString(frmMain_ErrorBackupSessionLength, oProcess.GameInfo.CroppedName))
OperationEnded() OperationEnded()
Else Else
If oProcess.GameInfo.MonitorOnly = False Then
If oSettings.DisableConfirmation Then If oSettings.DisableConfirmation Then
bDoBackup = True bDoBackup = True
Else Else
@@ -286,21 +302,26 @@ Public Class frmMain
OperationEnded() OperationEnded()
End If End If
End If End If
End If
Else Else
bDoBackup = False bDoBackup = False
UpdateLog(mgrCommon.FormatString(frmMain_MonitorEnded, oProcess.GameInfo.Name), False) UpdateLog(mgrCommon.FormatString(frmMain_MonitorEnded, oProcess.GameInfo.Name), False)
SetLastAction(mgrCommon.FormatString(frmMain_MonitorEnded, oProcess.GameInfo.CroppedName)) SetLastAction(mgrCommon.FormatString(frmMain_MonitorEnded, oProcess.GameInfo.CroppedName))
OperationEnded() OperationEnded()
End If End If
End If
If bDoBackup Then If bDoBackup Then
If Not oBackup.CheckBackupPrereq(oProcess.GameInfo) Then
SetLastAction(mgrCommon.FormatString(frmMain_ErrorBackupCancel, oProcess.GameInfo.CroppedName))
OperationEnded()
Else
'Run the backup 'Run the backup
oReadyList.Add(oProcess.GameInfo) oReadyList.Add(oProcess.GameInfo)
Dim trd As New System.Threading.Thread(AddressOf ExecuteBackup) Dim trd As New System.Threading.Thread(AddressOf ExecuteBackup)
trd.IsBackground = True trd.IsBackground = True
trd.Start(oReadyList) trd.Start(oReadyList)
End If End If
End If
End Sub End Sub
Private Sub CheckRestore() Private Sub CheckRestore()
@@ -328,8 +349,16 @@ Public Class frmMain
Dim fbBrowser As New OpenFileDialog Dim fbBrowser As New OpenFileDialog
fbBrowser.Title = mgrCommon.FormatString(frmMain_ChooseIcon, oProcess.GameInfo.CroppedName) fbBrowser.Title = mgrCommon.FormatString(frmMain_ChooseIcon, oProcess.GameInfo.CroppedName)
'Unix Handler
If Not mgrCommon.IsUnix Then
fbBrowser.DefaultExt = "ico" fbBrowser.DefaultExt = "ico"
fbBrowser.Filter = frmMain_IconFilter fbBrowser.Filter = frmMain_IconFilter
Else
fbBrowser.DefaultExt = "png"
fbBrowser.Filter = frmMain_PNGFilter
End If
Try Try
fbBrowser.InitialDirectory = IO.Path.GetDirectoryName(oProcess.FoundProcess.MainModule.FileName) fbBrowser.InitialDirectory = IO.Path.GetDirectoryName(oProcess.FoundProcess.MainModule.FileName)
Catch ex As Exception Catch ex As Exception
@@ -545,12 +574,93 @@ Public Class frmMain
End Function End Function
'Functions handling the opening of other windows 'Functions handling the opening of other windows
Private Sub OpenDevConsole()
Dim sFullCommand As String
Dim sMainCommand As String
Dim sCommand As String()
Dim sDelimters As String = " :"
Dim cDelimters As Char() = sDelimters.ToCharArray
sFullCommand = InputBox(frmMain_EnterCommand, frmMain_DeveloperConsole)
If sFullCommand <> String.Empty Then
sMainCommand = sFullCommand.Split(cDelimters, 2)(0)
'Parse Command
Select Case sMainCommand.ToLower
Case "sql"
'Run a SQL command directly on any database
'Usage: SQL {Local or Remote} SQL Command
Dim oDatabase As mgrSQLite
Dim bSuccess As Boolean
sCommand = sFullCommand.Split(cDelimters, 3)
'Check Paramters
If sCommand.Length < 3 Then
mgrCommon.ShowMessage(frmMain_ErrorMissingParams, sCommand(0), MsgBoxStyle.Exclamation)
Exit Select
End If
If sCommand(1).ToLower = "local" Then
oDatabase = New mgrSQLite(mgrSQLite.Database.Local)
ElseIf sCommand(1).ToLower = "remote" Then
oDatabase = New mgrSQLite(mgrSQLite.Database.Remote)
Else
mgrCommon.ShowMessage(frmMain_ErrorCommandBadParam, New String() {sCommand(1), sCommand(0)}, MsgBoxStyle.Exclamation)
Exit Select
End If
bSuccess = oDatabase.RunParamQuery(sCommand(2), New Hashtable)
If bSuccess Then
mgrCommon.ShowMessage(frmMain_CommandSucess, MsgBoxStyle.Exclamation)
Else
mgrCommon.ShowMessage(frmMain_CommandFail, MsgBoxStyle.Exclamation)
End If
Case "debug"
'Enable or disable various debug modes
'Usage: DEBUG Mode {Enable or Disable}
sCommand = sFullCommand.Split(cDelimters, 3)
Dim bDebugEnable As Boolean = False
'Check Paramters
If sCommand.Length < 3 Then
mgrCommon.ShowMessage(frmMain_ErrorMissingParams, sCommand(0), MsgBoxStyle.Exclamation)
Exit Select
End If
If sCommand(2).ToLower = "enable" Then
bDebugEnable = True
ElseIf sCommand(2).ToLower = "disable" Then
bDebugEnable = False
Else
mgrCommon.ShowMessage(frmMain_ErrorCommandBadParam, New String() {sCommand(1), sCommand(0)}, MsgBoxStyle.Exclamation)
Exit Select
End If
Select Case sCommand(1).ToLower
Case "process"
bProcessDebugMode = bDebugEnable
mgrCommon.ShowMessage(frmMain_CommandSucess, MsgBoxStyle.Exclamation)
End Select
Case Else
mgrCommon.ShowMessage(frmMain_ErrorCommandInvalid, sMainCommand, MsgBoxStyle.Exclamation)
End Select
End If
End Sub
Private Sub OpenAbout() Private Sub OpenAbout()
Dim iProcessType As System.Reflection.ProcessorArchitecture = System.Reflection.AssemblyName.GetAssemblyName(Application.ExecutablePath()).ProcessorArchitecture 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
Dim sProcessType = [Enum].GetName(GetType(System.Reflection.ProcessorArchitecture), iProcessType) Dim sProcessType = [Enum].GetName(GetType(System.Reflection.ProcessorArchitecture), iProcessType)
Dim sRevision As String = My.Application.Info.Version.Build & "." & My.Application.Info.Version.Revision Dim sRevision As String = My.Application.Info.Version.Build & "." & My.Application.Info.Version.Revision
Dim sConstCopyright As String = Chr(169) & App_Copyright Dim sConstCopyright As String = Chr(169) & mgrCommon.FormatString(App_Copyright, Now.Year.ToString)
mgrCommon.ShowMessage(frmMain_About, New String() {sVersion, sProcessType, sRevision, sConstCopyright}, MsgBoxStyle.Information) mgrCommon.ShowMessage(frmMain_About, New String() {sVersion, sProcessType, sRevision, sConstCopyright}, MsgBoxStyle.Information)
End Sub End Sub
@@ -590,6 +700,8 @@ Public Class frmMain
PauseScan() PauseScan()
If frm.ShowDialog() = Windows.Forms.DialogResult.OK Then If frm.ShowDialog() = Windows.Forms.DialogResult.OK Then
oSettings = frm.Settings oSettings = frm.Settings
oBackup.Settings = oSettings
oRestore.Settings = oSettings
'Set Remote Database Location 'Set Remote Database Location
mgrPath.RemoteDatabaseLocation = oSettings.BackupFolder mgrPath.RemoteDatabaseLocation = oSettings.BackupFolder
SetupSyncWatcher() SetupSyncWatcher()
@@ -712,6 +824,8 @@ Public Class frmMain
'Load Settings 'Load Settings
oSettings.LoadSettings() oSettings.LoadSettings()
oBackup.Settings = oSettings
oRestore.Settings = oSettings
If Not bFirstRun Then If Not bFirstRun Then
'The application cannot continue if this fails 'The application cannot continue if this fails
@@ -747,14 +861,21 @@ Public Class frmMain
Private Sub ToggleLog() Private Sub ToggleLog()
If bLogToggle = False Then If bLogToggle = False Then
txtLog.Visible = True txtLog.Visible = True
Me.Size = New System.Drawing.Size(540, 425)
'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
bLogToggle = True bLogToggle = True
btnLogToggle.Text = frmMain_btnToggleLog_Hide btnLogToggle.Text = frmMain_btnToggleLog_Hide
txtLog.Select(txtLog.TextLength, 0) txtLog.Select(txtLog.TextLength, 0)
txtLog.ScrollToCaret() txtLog.ScrollToCaret()
Else Else
txtLog.Visible = False txtLog.Visible = False
Me.Size = New System.Drawing.Size(540, 245) Me.Size = New System.Drawing.Size(Me.Size.Width, 245)
bLogToggle = False bLogToggle = False
btnLogToggle.Text = frmMain_btnToggleLog_Show btnLogToggle.Text = frmMain_btnToggleLog_Show
End If End If
@@ -762,15 +883,15 @@ Public Class frmMain
Private Sub ToggleState() Private Sub ToggleState()
'Toggle State with Tray Clicks 'Toggle State with Tray Clicks
If Me.WindowState = FormWindowState.Minimized Then If Not bShowToggle Then
bShowToggle = True
Me.Visible = True Me.Visible = True
Me.ShowInTaskbar = True Me.ShowInTaskbar = True
Me.WindowState = FormWindowState.Normal
Me.Focus() Me.Focus()
Else Else
bShowToggle = False
Me.Visible = False Me.Visible = False
Me.ShowInTaskbar = False Me.ShowInTaskbar = False
Me.WindowState = FormWindowState.Minimized
End If End If
End Sub End Sub
@@ -920,9 +1041,12 @@ Public Class frmMain
Dim d As New UpdateLogCallBack(AddressOf UpdateLog) Dim d As New UpdateLogCallBack(AddressOf UpdateLog)
Me.Invoke(d, New Object() {sLogUpdate, bTrayUpdate, objIcon, bTimeStamp}) Me.Invoke(d, New Object() {sLogUpdate, bTrayUpdate, objIcon, bTimeStamp})
Else Else
'Clear the log if we are approaching the limit 'Auto save and clear the log if we are approaching the limit
If txtLog.TextLength > 16770000 Then If txtLog.TextLength > 16770000 Then
txtLog.Text = String.Empty Dim sLogFile As String = mgrPath.LogFileLocation
mgrCommon.SaveText(txtLog.Text, sLogFile)
txtLog.Clear()
txtLog.AppendText("[" & Date.Now & "] " & mgrCommon.FormatString(frmMain_LogAutoSave, sLogFile))
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 'We shouldn't allow any one message to be greater than 255 characters if that same message is pushed to the tray icon
@@ -949,6 +1073,22 @@ Public Class frmMain
Application.DoEvents() Application.DoEvents()
End Sub End Sub
Private Sub ClearLog()
If mgrCommon.ShowMessage(frmMain_ConfirmLogClear, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
txtLog.Clear()
End If
End Sub
Private Sub SaveLog()
Dim sLocation As String
sLocation = mgrCommon.SaveFileBrowser(frmMain_ChooseLogFile, "txt", frmMain_Text, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), frmMain_DefaultLogFileName & " " & Date.Now.ToString("dd-MMM-yyyy"))
If sLocation <> String.Empty Then
mgrCommon.SaveText(txtLog.Text, sLocation)
End If
End Sub
Private Sub SetForm() Private Sub SetForm()
'Set Form Name 'Set Form Name
Me.Name = App_NameLong Me.Name = App_NameLong
@@ -966,6 +1106,9 @@ Public Class frmMain
gMonTools.Text = frmMain_gMonTools gMonTools.Text = frmMain_gMonTools
gMonToolsCleanMan.Text = frmMain_gMonToolsCleanMan gMonToolsCleanMan.Text = frmMain_gMonToolsCleanMan
gMonToolsCompact.Text = frmMain_gMonToolsCompact gMonToolsCompact.Text = frmMain_gMonToolsCompact
gMonToolsLog.Text = frmMain_gMonToolsLog
gMonLogClear.Text = frmMain_gMonLogClear
gMonLogSave.Text = frmMain_gMonLogSave
gMonHelp.Text = frmMain_gMonHelp gMonHelp.Text = frmMain_gMonHelp
gMonHelpWebSite.Text = frmMain_gMonHelpWebSite gMonHelpWebSite.Text = frmMain_gMonHelpWebSite
gMonHelpManual.Text = frmMain_gMonHelpManual gMonHelpManual.Text = frmMain_gMonHelpManual
@@ -984,6 +1127,9 @@ Public Class frmMain
gMonTrayTools.Text = frmMain_gMonTools gMonTrayTools.Text = frmMain_gMonTools
gMonTrayToolsCleanMan.Text = frmMain_gMonToolsCleanMan gMonTrayToolsCleanMan.Text = frmMain_gMonToolsCleanMan
gMonTrayToolsCompact.Text = frmMain_gMonToolsCompact gMonTrayToolsCompact.Text = frmMain_gMonToolsCompact
gMonTrayToolsLog.Text = frmMain_gMonToolsLog
gMonTrayLogClear.Text = frmMain_gMonLogClear
gMonTrayLogSave.Text = frmMain_gMonLogSave
gMonTrayExit.Text = frmMain_gMonFileExit gMonTrayExit.Text = frmMain_gMonFileExit
'Set Form Text 'Set Form Text
@@ -1006,7 +1152,7 @@ Public Class frmMain
lblLastAction.Text = String.Empty lblLastAction.Text = String.Empty
pbTime.SizeMode = PictureBoxSizeMode.AutoSize pbTime.SizeMode = PictureBoxSizeMode.AutoSize
pbTime.Image = Icon_Clock pbTime.Image = Icon_Clock
Me.Size = New System.Drawing.Size(540, 245) Me.Size = New System.Drawing.Size(Me.Size.Width, 245)
AddHandler mgrMonitorList.UpdateLog, AddressOf UpdateLog AddHandler mgrMonitorList.UpdateLog, AddressOf UpdateLog
ResetGameInfo() ResetGameInfo()
End Sub End Sub
@@ -1098,8 +1244,8 @@ Public Class frmMain
Private Sub VerifyGameDataPath() Private Sub VerifyGameDataPath()
'Important: This function cannot access mgrPath for settings, as that will trigger a database creation and destroy the reason for this function 'Important: This function cannot access mgrPath for settings, as that will trigger a database creation and destroy the reason for this function
Dim sSettingsRoot As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "\gbm" Dim sSettingsRoot As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "/gbm"
Dim sDBLocation As String = sSettingsRoot & "\gbm.s3db" Dim sDBLocation As String = sSettingsRoot & "/gbm.s3db"
If Not IO.Directory.Exists(sSettingsRoot) Then If Not IO.Directory.Exists(sSettingsRoot) Then
Try Try
@@ -1171,6 +1317,8 @@ Public Class frmMain
'Functions to handle other features 'Functions to handle other features
Private Sub RestartAsAdmin() Private Sub RestartAsAdmin()
'Unix Hanlder
If Not mgrCommon.IsUnix Then
If mgrCommon.IsElevated Then If mgrCommon.IsElevated Then
mgrCommon.ShowMessage(frmMain_ErrorAlreadyAdmin, MsgBoxStyle.Information) mgrCommon.ShowMessage(frmMain_ErrorAlreadyAdmin, MsgBoxStyle.Information)
Else Else
@@ -1180,6 +1328,9 @@ Public Class frmMain
ShutdownApp(False) ShutdownApp(False)
End If End If
End If End If
Else
mgrCommon.ShowMessage(App_ErrorUnixNotAvailable, MsgBoxStyle.Exclamation)
End If
End Sub End Sub
Private Sub CleanLocalManifest() Private Sub CleanLocalManifest()
@@ -1294,6 +1445,14 @@ Public Class frmMain
OpenCheckforUpdates() OpenCheckforUpdates()
End Sub End Sub
Private Sub gMonLogClear_Click(sender As Object, e As EventArgs) Handles gMonLogClear.Click, gMonTrayLogClear.Click
ClearLog()
End Sub
Private Sub gMonLogSave_Click(sender As Object, e As EventArgs) Handles gMonLogSave.Click, gMonTrayLogSave.Click
SaveLog()
End Sub
Private Sub gMonNotification_Click(sender As Object, e As EventArgs) Handles gMonNotification.Click, gMonTrayNotification.Click Private Sub gMonNotification_Click(sender As Object, e As EventArgs) Handles gMonNotification.Click, gMonTrayNotification.Click
gMonNotification.Visible = False gMonNotification.Visible = False
gMonTrayNotification.Visible = False gMonTrayNotification.Visible = False
@@ -1304,7 +1463,7 @@ Public Class frmMain
ToggleLog() ToggleLog()
End Sub End Sub
Private Sub gMonStripSplitButton_ButtonClick(sender As Object, e As EventArgs) Handles gMonStripStatusButton.ButtonClick Private Sub gMonStripSplitStatusButton_ButtonClick(sender As Object, e As EventArgs) Handles gMonStripStatusButton.Click
ScanToggle() ScanToggle()
End Sub End Sub
@@ -1315,9 +1474,9 @@ Public Class frmMain
End Sub End Sub
Private Sub gMonTray_BalloonTipClicked(sender As System.Object, e As System.EventArgs) Handles gMonTray.BalloonTipClicked Private Sub gMonTray_BalloonTipClicked(sender As System.Object, e As System.EventArgs) Handles gMonTray.BalloonTipClicked
bShowToggle = True
Me.Visible = True Me.Visible = True
Me.ShowInTaskbar = True Me.ShowInTaskbar = True
Me.WindowState = FormWindowState.Normal
Me.Focus() Me.Focus()
End Sub End Sub
@@ -1325,7 +1484,7 @@ Public Class frmMain
OperationCancel() OperationCancel()
End Sub End Sub
Private Sub gMonStripAdminButton_ButtonClick(sender As Object, e As EventArgs) Handles gMonStripAdminButton.ButtonClick Private Sub gMonStripAdminButton_ButtonClick(sender As Object, e As EventArgs) Handles gMonStripAdminButton.Click
RestartAsAdmin() RestartAsAdmin()
End Sub End Sub
@@ -1335,12 +1494,19 @@ Public Class frmMain
End Sub End Sub
Private Sub Main_FormClosing(sender As System.Object, e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing Private Sub Main_FormClosing(sender As System.Object, e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
'Intercept Exit & Minimize 'Unix Handler
If mgrCommon.IsUnix And Not bShutdown Then
ShutdownApp()
End If
'Intercept Exit
If bShutdown = False Then If bShutdown = False Then
e.Cancel = True e.Cancel = True
If Not mgrCommon.IsUnix Then
bShowToggle = False
Me.Visible = False Me.Visible = False
Me.ShowInTaskbar = False Me.ShowInTaskbar = False
Me.WindowState = FormWindowState.Minimized End If
End If End If
End Sub End Sub
@@ -1351,7 +1517,7 @@ Public Class frmMain
Dim iErrorCode As Integer = 0 Dim iErrorCode As Integer = 0
Dim sErrorMessage As String = String.Empty Dim sErrorMessage As String = String.Empty
If oProcess.SearchRunningProcesses(hshScanList, bNeedsPath, iErrorCode) Then If oProcess.SearchRunningProcesses(hshScanList, bNeedsPath, iErrorCode, bProcessDebugMode) Then
PauseScan() PauseScan()
If bNeedsPath Then If bNeedsPath Then
@@ -1443,6 +1609,7 @@ Public Class frmMain
RunBackup() RunBackup()
Else Else
UpdateLog(frmMain_UnknownGameEnded, False) UpdateLog(frmMain_UnknownGameEnded, False)
oProcess.GameInfo = Nothing
ResetGameInfo() ResetGameInfo()
ResumeScan() ResumeScan()
End If End If
@@ -1453,15 +1620,17 @@ Public Class frmMain
End Sub End Sub
Private Sub Main_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load Private Sub Main_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
'Init
Try
SetForm() SetForm()
VerifyGameDataPath() VerifyGameDataPath()
LoadAndVerify() LoadAndVerify()
VerifyCustomPathVariables() VerifyCustomPathVariables()
If oSettings.StartToTray Then If oSettings.StartToTray And Not mgrCommon.IsUnix Then
bShowToggle = False
Me.Visible = False Me.Visible = False
Me.ShowInTaskbar = False Me.ShowInTaskbar = False
Me.WindowState = FormWindowState.Minimized
End If End If
If oSettings.MonitorOnStartup Then If oSettings.MonitorOnStartup Then
@@ -1472,11 +1641,28 @@ Public Class frmMain
HandleScan() HandleScan()
CheckForNewBackups() 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
Me.MinimizeBox = True
Else
Me.gMonTray.Visible = True
End If
End Sub End Sub
Private Sub frmMain_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown Private Sub frmMain_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
If bFirstRun Then If bInitFail Then
bShutdown = True
Me.Close()
End If
If bFirstRun And Not bShutdown Then
OpenStartupWizard() OpenStartupWizard()
End If End If
End Sub End Sub
@@ -1484,4 +1670,11 @@ Public Class frmMain
Private Sub txtGameInfo_Enter(sender As Object, e As EventArgs) Private Sub txtGameInfo_Enter(sender As Object, e As EventArgs)
btnLogToggle.Focus() btnLogToggle.Focus()
End Sub End Sub
Private Sub frmMain_KeyDown(sender As Object, e As KeyEventArgs) Handles MyBase.KeyDown
If e.KeyCode = Keys.Oemtilde AndAlso e.Modifiers = Keys.Control Then
OpenDevConsole()
End If
End Sub
End Class End Class
+46 -7
View File
@@ -44,10 +44,14 @@ Partial Class frmSettings
Me.chkRestoreOnLaunch = New System.Windows.Forms.CheckBox() Me.chkRestoreOnLaunch = New System.Windows.Forms.CheckBox()
Me.chkOverwriteWarning = New System.Windows.Forms.CheckBox() Me.chkOverwriteWarning = New System.Windows.Forms.CheckBox()
Me.chkCreateFolder = 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.grpGeneral.SuspendLayout()
Me.grpPaths.SuspendLayout() Me.grpPaths.SuspendLayout()
Me.grpBackup.SuspendLayout() Me.grpBackup.SuspendLayout()
CType(Me.nudSupressBackupThreshold, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.nudSupressBackupThreshold, System.ComponentModel.ISupportInitialize).BeginInit()
Me.grp7z.SuspendLayout()
Me.SuspendLayout() Me.SuspendLayout()
' '
'chkMonitorOnStartup 'chkMonitorOnStartup
@@ -140,10 +144,10 @@ Partial Class frmSettings
Me.grpPaths.Controls.Add(Me.btnBackupFolder) Me.grpPaths.Controls.Add(Me.btnBackupFolder)
Me.grpPaths.Controls.Add(Me.lblBackupFolder) Me.grpPaths.Controls.Add(Me.lblBackupFolder)
Me.grpPaths.Controls.Add(Me.txtBackupFolder) Me.grpPaths.Controls.Add(Me.txtBackupFolder)
Me.grpPaths.Location = New System.Drawing.Point(12, 360) Me.grpPaths.Location = New System.Drawing.Point(12, 410)
Me.grpPaths.Name = "grpPaths" Me.grpPaths.Name = "grpPaths"
Me.grpPaths.Size = New System.Drawing.Size(360, 60) Me.grpPaths.Size = New System.Drawing.Size(360, 60)
Me.grpPaths.TabIndex = 2 Me.grpPaths.TabIndex = 3
Me.grpPaths.TabStop = False Me.grpPaths.TabStop = False
Me.grpPaths.Text = "Paths" Me.grpPaths.Text = "Paths"
' '
@@ -175,7 +179,7 @@ Partial Class frmSettings
'btnSave 'btnSave
' '
Me.btnSave.DialogResult = System.Windows.Forms.DialogResult.OK Me.btnSave.DialogResult = System.Windows.Forms.DialogResult.OK
Me.btnSave.Location = New System.Drawing.Point(216, 426) Me.btnSave.Location = New System.Drawing.Point(216, 476)
Me.btnSave.Name = "btnSave" Me.btnSave.Name = "btnSave"
Me.btnSave.Size = New System.Drawing.Size(75, 23) Me.btnSave.Size = New System.Drawing.Size(75, 23)
Me.btnSave.TabIndex = 3 Me.btnSave.TabIndex = 3
@@ -185,7 +189,7 @@ Partial Class frmSettings
'btnCancel 'btnCancel
' '
Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.btnCancel.Location = New System.Drawing.Point(297, 426) Me.btnCancel.Location = New System.Drawing.Point(297, 476)
Me.btnCancel.Name = "btnCancel" Me.btnCancel.Name = "btnCancel"
Me.btnCancel.Size = New System.Drawing.Size(75, 23) Me.btnCancel.Size = New System.Drawing.Size(75, 23)
Me.btnCancel.TabIndex = 4 Me.btnCancel.TabIndex = 4
@@ -204,7 +208,7 @@ Partial Class frmSettings
Me.grpBackup.Controls.Add(Me.chkBackupConfirm) Me.grpBackup.Controls.Add(Me.chkBackupConfirm)
Me.grpBackup.Location = New System.Drawing.Point(12, 183) Me.grpBackup.Location = New System.Drawing.Point(12, 183)
Me.grpBackup.Name = "grpBackup" Me.grpBackup.Name = "grpBackup"
Me.grpBackup.Size = New System.Drawing.Size(360, 171) Me.grpBackup.Size = New System.Drawing.Size(360, 168)
Me.grpBackup.TabIndex = 1 Me.grpBackup.TabIndex = 1
Me.grpBackup.TabStop = False Me.grpBackup.TabStop = False
Me.grpBackup.Text = "Backup and Restore" Me.grpBackup.Text = "Backup and Restore"
@@ -276,11 +280,41 @@ Partial Class frmSettings
Me.chkCreateFolder.Text = "Create a sub-folder for each game" Me.chkCreateFolder.Text = "Create a sub-folder for each game"
Me.chkCreateFolder.UseVisualStyleBackColor = True 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"
'
'lblCompression
'
Me.lblCompression.AutoSize = True
Me.lblCompression.Location = New System.Drawing.Point(6, 20)
Me.lblCompression.Name = "lblCompression"
Me.lblCompression.Size = New System.Drawing.Size(70, 13)
Me.lblCompression.TabIndex = 0
Me.lblCompression.Text = "Compression:"
'
'cboCompression
'
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
'
'frmSettings 'frmSettings
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(384, 461) Me.ClientSize = New System.Drawing.Size(384, 511)
Me.Controls.Add(Me.grp7z)
Me.Controls.Add(Me.grpBackup) Me.Controls.Add(Me.grpBackup)
Me.Controls.Add(Me.btnCancel) Me.Controls.Add(Me.btnCancel)
Me.Controls.Add(Me.btnSave) Me.Controls.Add(Me.btnSave)
@@ -292,7 +326,7 @@ Partial Class frmSettings
Me.Name = "frmSettings" Me.Name = "frmSettings"
Me.ShowIcon = False Me.ShowIcon = False
Me.ShowInTaskbar = False Me.ShowInTaskbar = False
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "Settings" Me.Text = "Settings"
Me.grpGeneral.ResumeLayout(False) Me.grpGeneral.ResumeLayout(False)
Me.grpGeneral.PerformLayout() Me.grpGeneral.PerformLayout()
@@ -301,6 +335,8 @@ Partial Class frmSettings
Me.grpBackup.ResumeLayout(False) Me.grpBackup.ResumeLayout(False)
Me.grpBackup.PerformLayout() Me.grpBackup.PerformLayout()
CType(Me.nudSupressBackupThreshold, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.nudSupressBackupThreshold, System.ComponentModel.ISupportInitialize).EndInit()
Me.grp7z.ResumeLayout(False)
Me.grp7z.PerformLayout()
Me.ResumeLayout(False) Me.ResumeLayout(False)
End Sub End Sub
@@ -326,4 +362,7 @@ Partial Class frmSettings
Friend WithEvents lblMinutes As Label Friend WithEvents lblMinutes As Label
Friend WithEvents nudSupressBackupThreshold As NumericUpDown Friend WithEvents nudSupressBackupThreshold As NumericUpDown
Friend WithEvents chkSupressBackup As CheckBox Friend WithEvents chkSupressBackup As CheckBox
Friend WithEvents grp7z As GroupBox
Friend WithEvents cboCompression As ComboBox
Friend WithEvents lblCompression As Label
End Class End Class
+47 -13
View File
@@ -58,6 +58,7 @@ Public Class frmSettings
oSettings.TimeTracking = chkTimeTracking.Checked oSettings.TimeTracking = chkTimeTracking.Checked
oSettings.SupressBackup = chkSupressBackup.Checked oSettings.SupressBackup = chkSupressBackup.Checked
oSettings.SupressBackupThreshold = nudSupressBackupThreshold.Value oSettings.SupressBackupThreshold = nudSupressBackupThreshold.Value
oSettings.CompressionLevel = cboCompression.SelectedValue
'We need to clear all checksums its turned off 'We need to clear all checksums its turned off
If chkCheckSum.Checked = False And oSettings.CheckSum = True Then If chkCheckSum.Checked = False And oSettings.CheckSum = True Then
@@ -111,24 +112,30 @@ Public Class frmSettings
chkSupressBackup.Checked = oSettings.SupressBackup chkSupressBackup.Checked = oSettings.SupressBackup
nudSupressBackupThreshold.Value = oSettings.SupressBackupThreshold nudSupressBackupThreshold.Value = oSettings.SupressBackupThreshold
nudSupressBackupThreshold.Enabled = chkSupressBackup.Checked nudSupressBackupThreshold.Enabled = chkSupressBackup.Checked
End Sub cboCompression.SelectedValue = oSettings.CompressionLevel
Private Sub btnSave_Click(sender As System.Object, e As System.EventArgs) Handles btnSave.Click 'Unix Handler
If SaveSettings() Then If mgrCommon.IsUnix Then
bShutdown = True chkStartToTray.Checked = False
Me.Close() chkStartWindows.Checked = False
End If End If
End Sub End Sub
Private Sub btnCancel_Click(sender As System.Object, e As System.EventArgs) Handles btnCancel.Click Private Sub LoadCombos()
bShutdown = True Dim oComboItems As New List(Of KeyValuePair(Of Integer, String))
Me.Close()
End Sub
Private Sub frmSettings_FormClosing(sender As System.Object, e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing 'cboCompression
If bShutdown = False Then cboCompression.ValueMember = "Key"
e.Cancel = True cboCompression.DisplayMember = "Value"
End If
oComboItems.Add(New KeyValuePair(Of Integer, String)(0, frmSettings_cboCompression_None))
oComboItems.Add(New KeyValuePair(Of Integer, String)(1, frmSettings_cboCompression_Fastest))
oComboItems.Add(New KeyValuePair(Of Integer, String)(3, frmSettings_cboCompression_Fast))
oComboItems.Add(New KeyValuePair(Of Integer, String)(5, frmSettings_cboCompression_Normal))
oComboItems.Add(New KeyValuePair(Of Integer, String)(7, frmSettings_cboCompression_Maximum))
oComboItems.Add(New KeyValuePair(Of Integer, String)(9, frmSettings_cboCompression_Ultra))
cboCompression.DataSource = oComboItems
End Sub End Sub
Private Sub SetForm() Private Sub SetForm()
@@ -156,10 +163,37 @@ Public Class frmSettings
chkShowDetectionTips.Text = frmSettings_chkShowDetectionTips chkShowDetectionTips.Text = frmSettings_chkShowDetectionTips
chkStartToTray.Text = frmSettings_chkStartToTray chkStartToTray.Text = frmSettings_chkStartToTray
chkMonitorOnStartup.Text = frmSettings_chkMonitorOnStartup chkMonitorOnStartup.Text = frmSettings_chkMonitorOnStartup
grp7z.Text = frmSettings_grp7z
lblCompression.Text = frmSettings_lblCompression
'Unix Handler
If mgrCommon.IsUnix Then
chkStartToTray.Enabled = False
chkStartWindows.Enabled = False
End If
End Sub
Private Sub btnSave_Click(sender As System.Object, e As System.EventArgs) Handles btnSave.Click
If SaveSettings() Then
bShutdown = True
Me.Close()
End If
End Sub
Private Sub btnCancel_Click(sender As System.Object, e As System.EventArgs) Handles btnCancel.Click
bShutdown = True
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 End Sub
Private Sub frmSettings_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load Private Sub frmSettings_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
SetForm() SetForm()
LoadCombos()
LoadSettings() LoadSettings()
End Sub End Sub
+1 -2
View File
@@ -96,11 +96,10 @@ Partial Class frmStartUpWizard
' '
'llbManual 'llbManual
' '
Me.llbManual.AutoSize = True
Me.llbManual.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!) Me.llbManual.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
Me.llbManual.Location = New System.Drawing.Point(14, 158) Me.llbManual.Location = New System.Drawing.Point(14, 158)
Me.llbManual.Name = "llbManual" Me.llbManual.Name = "llbManual"
Me.llbManual.Size = New System.Drawing.Size(151, 13) Me.llbManual.Size = New System.Drawing.Size(303, 13)
Me.llbManual.TabIndex = 3 Me.llbManual.TabIndex = 3
Me.llbManual.TabStop = True Me.llbManual.TabStop = True
Me.llbManual.Text = "Game Backup Monitor Manual" Me.llbManual.Text = "Game Backup Monitor Manual"
+6
View File
@@ -98,6 +98,12 @@ Public Class frmStartUpWizard
End Sub End Sub
Private Sub DownloadSettings() Private Sub DownloadSettings()
If mgrCommon.IsUnix Then
If mgrCommon.ShowMessage(frmGameManager_ConfirmUnixImportWarning, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
Exit Sub
End If
End If
If mgrCommon.ShowMessage(frmStartUpWizard_ConfirmOfficialImport, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then If mgrCommon.ShowMessage(frmStartUpWizard_ConfirmOfficialImport, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
If mgrMonitorList.DoImport(App_URLImport) Then If mgrMonitorList.DoImport(App_URLImport) Then
oGameData = mgrMonitorList.ReadList(mgrMonitorList.eListTypes.FullList) oGameData = mgrMonitorList.ReadList(mgrMonitorList.eListTypes.FullList)
+18 -12
View File
@@ -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"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -90,13 +90,21 @@
<PlatformTarget>x64</PlatformTarget> <PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<PostBuildEvent Condition="$(Platform)==x64">echo Running x64 Post Build Event...
COPY /Y "$(SolutionDir)\GBM\x64\sqlite3.dll" .
RMDIR /S /Q Utilities\x86</PostBuildEvent>
<PostBuildEvent Condition="$(Platform)==x86">echo Running x86 Post Build Event...
COPY /Y "$(SolutionDir)\GBM\x86\sqlite3.dll" .
RMDIR /S /Q Utilities\x64</PostBuildEvent>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Mono.Data.Sqlite, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>References\Mono.Data.Sqlite.dll</HintPath>
</Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Data.SQLite, Version=1.0.94.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>References\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
@@ -320,7 +328,8 @@
<Content Include="License\credits.txt"> <Content Include="License\credits.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="References\System.Data.SQLite.dll" /> <Content Include="References\Mono.Data.Sqlite.dll" />
<Content Include="x86\sqlite3.dll" />
<None Include="Resources\gbm.ico" /> <None Include="Resources\gbm.ico" />
<Content Include="Resources\Admin.png" /> <Content Include="Resources\Admin.png" />
<Content Include="Resources\Clock.png" /> <Content Include="Resources\Clock.png" />
@@ -332,6 +341,7 @@
<Content Include="Resources\Inbox.png" /> <Content Include="Resources\Inbox.png" />
<Content Include="Resources\type.ico" /> <Content Include="Resources\type.ico" />
<Content Include="Resources\User.png" /> <Content Include="Resources\User.png" />
<Content Include="x64\sqlite3.dll" />
<Content Include="Utilities\x64\7za.dll"> <Content Include="Utilities\x64\7za.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
@@ -350,12 +360,6 @@
<Content Include="Utilities\x86\7zxa.dll"> <Content Include="Utilities\x86\7zxa.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="x64\SQLite.Interop.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="x86\SQLite.Interop.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="Resources\Stopped.png" /> <None Include="Resources\Stopped.png" />
<None Include="Resources\Detected.png" /> <None Include="Resources\Detected.png" />
<None Include="Resources\Ready.png" /> <None Include="Resources\Ready.png" />
@@ -387,6 +391,7 @@
<EmbedInteropTypes>True</EmbedInteropTypes> <EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference> </COMReference>
</ItemGroup> </ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
@@ -394,5 +399,6 @@
</Target> </Target>
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
</Project> </Project>
+35 -22
View File
@@ -42,7 +42,7 @@ Public Class mgrBackup
'Create manifest item 'Create manifest item
oItem.Name = oGameInfo.Name oItem.Name = oGameInfo.Name
'Keep the path relative to the manifest location 'Keep the path relative to the manifest location
oItem.FileName = sBackupFile.Replace(Path.GetDirectoryName(mgrPath.RemoteDatabaseLocation) & "\", "") oItem.FileName = sBackupFile.Replace(Path.GetDirectoryName(mgrPath.RemoteDatabaseLocation) & Path.DirectorySeparatorChar, "")
oItem.RestorePath = oGameInfo.TruePath oItem.RestorePath = oGameInfo.TruePath
oItem.AbsolutePath = oGameInfo.AbsolutePath oItem.AbsolutePath = oGameInfo.AbsolutePath
oItem.DateUpdated = dTimeStamp oItem.DateUpdated = dTimeStamp
@@ -75,7 +75,7 @@ Public Class mgrBackup
Using oStream Using oStream
If sList <> String.Empty Then If sList <> String.Empty Then
For Each sTypeItem As String In sList.Split(":") For Each sTypeItem As String In sList.Split(":")
oStream.WriteLine("""" & sBackupPath & "\" & sTypeItem & """") oStream.WriteLine("""" & sBackupPath & Path.DirectorySeparatorChar & sTypeItem & """")
Next Next
End If End If
oStream.Flush() oStream.Flush()
@@ -85,6 +85,28 @@ Public Class mgrBackup
End Try End Try
End Sub End Sub
Public Function CheckBackupPrereq(ByVal oGame As clsGame) As Boolean
Dim sBackupFile As String = oSettings.BackupFolder
If oSettings.CreateSubFolder Then sBackupFile = sBackupFile & Path.DirectorySeparatorChar & oGame.Name
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & oGame.Name & ".7z"
If mgrRestore.CheckManifest(oGame.Name) Then
If mgrCommon.ShowMessage(mgrBackup_ConfirmManifestConflict, oGame.Name, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
RaiseEvent UpdateLog(mgrBackup_ErrorManifestConflict, False, ToolTipIcon.Error, True)
Return False
End If
End If
If oSettings.ShowOverwriteWarning And File.Exists(sBackupFile) And Not oGame.AppendTimeStamp Then
If mgrCommon.ShowMessage(mgrBackup_ConfirmOverwrite, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorOverwriteAbort, oGame.Name), False, ToolTipIcon.Error, True)
Return False
End If
End If
Return True
End Function
Public Sub DoBackup(ByVal oBackupList As List(Of clsGame)) Public Sub DoBackup(ByVal oBackupList As List(Of clsGame))
Dim oGame As clsGame Dim oGame As clsGame
Dim bDoBackup As Boolean Dim bDoBackup As Boolean
@@ -109,15 +131,8 @@ Public Class mgrBackup
CancelOperation = False CancelOperation = False
RaiseEvent UpdateBackupInfo(oGame) RaiseEvent UpdateBackupInfo(oGame)
If mgrRestore.CheckManifest(oGame.Name) Then
If mgrCommon.ShowMessage(mgrBackup_ConfirmManifestConflict, oGame.Name, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
RaiseEvent UpdateLog(mgrBackup_ErrorManifestConflict, False, ToolTipIcon.Error, True)
bDoBackup = False
End If
End If
If oSettings.CreateSubFolder Then If oSettings.CreateSubFolder Then
sBackupFile = sBackupFile & "\" & oGame.Name sBackupFile = sBackupFile & Path.DirectorySeparatorChar & oGame.Name
Try Try
If Not Directory.Exists(sBackupFile) Then If Not Directory.Exists(sBackupFile) Then
Directory.CreateDirectory(sBackupFile) Directory.CreateDirectory(sBackupFile)
@@ -129,22 +144,15 @@ Public Class mgrBackup
End If End If
If oGame.AppendTimeStamp Then If oGame.AppendTimeStamp Then
sBackupFile = sBackupFile & "\" & oGame.Name & sTimeStamp & ".7z" sBackupFile = sBackupFile & Path.DirectorySeparatorChar & oGame.Name & sTimeStamp & ".7z"
Else Else
sBackupFile = sBackupFile & "\" & oGame.Name & ".7z" sBackupFile = sBackupFile & Path.DirectorySeparatorChar & oGame.Name & ".7z"
End If
If oSettings.ShowOverwriteWarning And File.Exists(sBackupFile) Then
If mgrCommon.ShowMessage(mgrBackup_ConfirmOverwrite, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorOverwriteAbort, oGame.Name), False, ToolTipIcon.Error, True)
bDoBackup = False
End If
End If End If
If bDoBackup Then If bDoBackup Then
If oGame.AbsolutePath = False Then If oGame.AbsolutePath = False Then
If oGame.Path <> String.Empty Then If oGame.Path <> String.Empty Then
sSavePath = oGame.ProcessPath & "\" & oGame.Path sSavePath = oGame.ProcessPath & Path.DirectorySeparatorChar & oGame.Path
Else Else
sSavePath = oGame.ProcessPath sSavePath = oGame.ProcessPath
End If End If
@@ -168,7 +176,12 @@ Public Class mgrBackup
End If End If
If Directory.Exists(sSavePath) Then If Directory.Exists(sSavePath) Then
prs7z.StartInfo.Arguments = "a -t7z " & "-i@""" & mgrPath.IncludeFileLocation & """ -x@""" & mgrPath.ExcludeFileLocation & """ """ & sBackupFile & """ -r" '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.FileName = mgrPath.Utility7zLocation
prs7z.StartInfo.UseShellExecute = False prs7z.StartInfo.UseShellExecute = False
prs7z.StartInfo.RedirectStandardOutput = True prs7z.StartInfo.RedirectStandardOutput = True
@@ -186,7 +199,7 @@ Public Class mgrBackup
prs7z.WaitForExit() prs7z.WaitForExit()
If Not CancelOperation Then If Not CancelOperation Then
If prs7z.ExitCode = 0 Then If prs7z.ExitCode = 0 Then
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_BackupComplete, oGame.Name), False, ToolTipIcon.Info, True) RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_BackupComplete, New String() {oGame.Name, mgrCommon.GetFileSize(sBackupFile)}), False, ToolTipIcon.Info, True)
bBackupCompleted = True bBackupCompleted = True
Else Else
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_BackupWarnings, oGame.Name), True, ToolTipIcon.Warning, True) RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_BackupWarnings, oGame.Name), True, ToolTipIcon.Warning, True)
+86 -4
View File
@@ -1,5 +1,7 @@
Imports GBM.My.Resources Imports GBM.My.Resources
Imports System.Net Imports System.Net
Imports System.IO
Imports System.Security.Principal
Public Class mgrCommon Public Class mgrCommon
@@ -19,6 +21,7 @@ Public Class mgrCommon
Try Try
Dim request As WebRequest = WebRequest.Create(URL) Dim request As WebRequest = WebRequest.Create(URL)
Dim response As WebResponse = request.GetResponse() Dim response As WebResponse = request.GetResponse()
response.Close()
Catch ex As Exception Catch ex As Exception
Return False Return False
End Try End Try
@@ -96,6 +99,11 @@ Public Class mgrCommon
Dim sExemptList As String() = {"dosbox", "scummvm"} Dim sExemptList As String() = {"dosbox", "scummvm"}
Dim bFound As Boolean = False Dim bFound As Boolean = False
'We can't search if we don't have a configuration
If oGame.Temporary Then
Return True
End If
For Each s As String In sExemptList For Each s As String In sExemptList
If oGame.ProcessName.ToLower.Contains(s) Then bFound = True If oGame.ProcessName.ToLower.Contains(s) Then bFound = True
Next Next
@@ -107,12 +115,18 @@ Public Class mgrCommon
End If End If
End Function End Function
Public Shared Function IsElevated() As Boolean Public Shared Function IsUnix() As Boolean
If My.User.IsInRole(ApplicationServices.BuiltInRole.Administrator) Then If Path.DirectorySeparatorChar = "/" Then
Return True Return True
Else
Return False
End If End If
Return False
End Function
Public Shared Function IsElevated() As Boolean
Dim oID As WindowsIdentity = WindowsIdentity.GetCurrent
Dim oPrincipal As New WindowsPrincipal(oID)
Return oPrincipal.IsInRole(WindowsBuiltInRole.Administrator)
End Function End Function
Public Shared Sub RestartAsAdmin() Public Shared Sub RestartAsAdmin()
@@ -126,6 +140,65 @@ Public Class mgrCommon
oProcess.Start() oProcess.Start()
End Sub End Sub
'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
If IsUnix() Then
File.Delete(sPath)
Else
If bRecycle Then
My.Computer.FileSystem.DeleteFile(sPath, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.SendToRecycleBin)
Else
File.Delete(sPath)
End If
End If
End If
End Sub
'Delete directory based on OS type
Public Shared Sub DeleteDirectory(ByVal sPath As String, Optional ByVal bRecursive As Boolean = False)
If Directory.Exists(sPath) Then
If IsUnix() Then
Directory.Delete(sPath, bRecursive)
Else
My.Computer.FileSystem.DeleteDirectory(sPath, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.SendToRecycleBin)
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
Try
If File.Exists(sPath) Then DeleteFile(sPath, False)
oStream = New StreamWriter(sPath)
oStream.Write(sText)
oStream.Flush()
oStream.Close()
Catch ex As Exception
ShowMessage(mgrCommon_ErrorWritingTextFile, ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
'Get a file size
Public Shared Function GetFileSize(ByVal sFile As String) As String
Dim oFileInfo As FileInfo
Dim dFileSize As Double
Try
oFileInfo = New FileInfo(sFile)
dFileSize = oFileInfo.Length
If dFileSize > 1048576 Then
Return FormatString(App_MB, Math.Round(dFileSize / 1048576, 2).ToString)
Else
Return FormatString(App_KB, Math.Round(dFileSize / 1024, 2).ToString)
End If
Catch ex As Exception
Return String.Empty
End Try
End Function
'Handles no extra parameters 'Handles no extra parameters
Public Shared Function ShowMessage(ByVal sMsg As String, ByVal oType As MsgBoxStyle) As MsgBoxResult Public Shared Function ShowMessage(ByVal sMsg As String, ByVal oType As MsgBoxStyle) As MsgBoxResult
Dim oResult As MsgBoxResult Dim oResult As MsgBoxResult
@@ -178,6 +251,15 @@ Public Class mgrCommon
Return sString Return sString
End Function End Function
'Compare functions
Public Shared Function CompareImportTagsByName(oItem1 As Tag, oItem2 As Tag) As Integer
Return String.Compare(oItem1.Name, oItem2.Name)
End Function
Public Shared Function CompareByListBoxItemByValue(sItem1 As KeyValuePair(Of String, String), sItem2 As KeyValuePair(Of String, String)) As Integer
Return String.Compare(sItem1.Value, sItem2.Value)
End Function
'Maintenance Only - Function for string management 'Maintenance Only - Function for string management
Public Shared Sub GetAllStrings(ByVal ctlParent As Control, ByRef sResource As String, ByRef sCode As String, ByVal sFormName As String) Public Shared Sub GetAllStrings(ByVal ctlParent As Control, ByRef sResource As String, ByRef sCode As String, ByVal sFormName As String)
For Each ctl As Control In ctlParent.Controls For Each ctl As Control In ctlParent.Controls
+1 -1
View File
@@ -82,7 +82,7 @@
Dim sSQL As String Dim sSQL As String
Dim hshParams As New Hashtable Dim hshParams As New Hashtable
sSQL = "INSERT INTO manifest VALUES (@ID, @Name, @FileName, @Path, @AbsolutePath, @DateUpdated, @UpdatedBy, @CheckSum)" sSQL = "INSERT OR REPLACE INTO manifest VALUES (@ID, @Name, @FileName, @Path, @AbsolutePath, @DateUpdated, @UpdatedBy, @CheckSum)"
hshParams.Add("ID", oBackupItem.ID) hshParams.Add("ID", oBackupItem.ID)
hshParams.Add("Name", oBackupItem.Name) hshParams.Add("Name", oBackupItem.Name)
+2 -2
View File
@@ -228,8 +228,8 @@ Public Class mgrMonitorList
If frm.ShowDialog() = DialogResult.OK Then If frm.ShowDialog() = DialogResult.OK Then
Cursor.Current = Cursors.WaitCursor Cursor.Current = Cursors.WaitCursor
DoListAddUpdateSync(frm.ImportData) DoListAddUpdateSync(frm.FinalData)
mgrTags.DoTagAddImport(frm.ImportData) mgrTags.DoTagAddImport(frm.FinalData)
Cursor.Current = Cursors.Default Cursor.Current = Cursors.Default
mgrCommon.ShowMessage(mgrMonitorList_ImportComplete, MsgBoxStyle.Information) mgrCommon.ShowMessage(mgrMonitorList_ImportComplete, MsgBoxStyle.Information)
+84 -54
View File
@@ -5,10 +5,11 @@ Imports System.Reflection
Public Class mgrPath Public Class mgrPath
'Important Note: Any changes to sSettingsRoot & sDBLocation need to be mirrored in frmMain.vb -> VerifyGameDataPath '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 sSettingsRoot As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "/gbm"
Private Shared sDBLocation As String = sSettingsRoot & "\gbm.s3db" Private Shared sDBLocation As String = sSettingsRoot & "/gbm.s3db"
Private Shared sIncludeFile As String = sSettingsRoot & "\gbm_include.txt" Private Shared sIncludeFile As String = sSettingsRoot & "/gbm_include.txt"
Private Shared sExcludeFile As String = sSettingsRoot & "\gbm_exclude.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 sRemoteDatabaseLocation As String Private Shared sRemoteDatabaseLocation As String
Private Shared hshCustomVariables As Hashtable Private Shared hshCustomVariables As Hashtable
Private Shared oReleaseType As ProcessorArchitecture = AssemblyName.GetAssemblyName(Application.ExecutablePath()).ProcessorArchitecture Private Shared oReleaseType As ProcessorArchitecture = AssemblyName.GetAssemblyName(Application.ExecutablePath()).ProcessorArchitecture
@@ -38,20 +39,24 @@ Public Class mgrPath
Shared ReadOnly Property Utility7zLocation As String Shared ReadOnly Property Utility7zLocation As String
Get Get
If mgrCommon.IsUnix Then
Return "/usr/bin/7za"
End If
Select Case oReleaseType Select Case oReleaseType
Case ProcessorArchitecture.Amd64 Case ProcessorArchitecture.Amd64
Return Application.StartupPath & "\Utilities\x64\7za.exe" Return Application.StartupPath & "/Utilities/x64/7za.exe"
Case ProcessorArchitecture.IA64 Case ProcessorArchitecture.IA64
Return Application.StartupPath & "\Utilities\x64\7za.exe" Return Application.StartupPath & "/Utilities/x64/7za.exe"
Case ProcessorArchitecture.MSIL Case ProcessorArchitecture.MSIL
Return Application.StartupPath & "\Utilities\x86\7za.exe" Return Application.StartupPath & "/Utilities/x86/7za.exe"
Case ProcessorArchitecture.X86 Case ProcessorArchitecture.X86
Return Application.StartupPath & "\Utilities\x86\7za.exe" Return Application.StartupPath & "/Utilities/x86/7za.exe"
Case ProcessorArchitecture.None Case ProcessorArchitecture.None
Return Application.StartupPath & "\Utilities\x86\7za.exe" Return Application.StartupPath & "/Utilities/x86/7za.exe"
End Select End Select
Return Application.StartupPath & "\Utilities\x86\7za.exe" Return Application.StartupPath & "/Utilities/x86/7za.exe"
End Get End Get
End Property End Property
@@ -73,6 +78,12 @@ Public Class mgrPath
End Get End Get
End Property End Property
Shared ReadOnly Property LogFileLocation As String
Get
Return sLogFile
End Get
End Property
Shared ReadOnly Property SettingsRoot As String Shared ReadOnly Property SettingsRoot As String
Get Get
Return sSettingsRoot Return sSettingsRoot
@@ -84,7 +95,7 @@ Public Class mgrPath
Return sRemoteDatabaseLocation Return sRemoteDatabaseLocation
End Get End Get
Set(value As String) Set(value As String)
sRemoteDatabaseLocation = value & "\gbm.s3db" sRemoteDatabaseLocation = value & "/gbm.s3db"
End Set End Set
End Property End Property
@@ -112,19 +123,27 @@ Public Class mgrPath
Dim iRemove As Integer = 0 Dim iRemove As Integer = 0
Dim iBackFolders As Integer = 0 Dim iBackFolders As Integer = 0
Dim bDeep As Boolean Dim bDeep As Boolean
Dim cDS As Char = Path.DirectorySeparatorChar 'Set the directory seperator based on the OS
'We are working with a case insenstive file system, ensure a uniform case If Not mgrCommon.IsUnix Then
'If we are working with a case insenstive file system, use a uniform case to reduce possible issues
sProcessPath = sProcessPath.ToLower sProcessPath = sProcessPath.ToLower
sSavePath = sSavePath.ToLower sSavePath = sSavePath.ToLower
Else
'If we are on Unix trim the root off
sProcessPath = sProcessPath.TrimStart(cDS)
sSavePath = sSavePath.TrimStart(cDS)
End If
'We need to ensure we have a single trailing slash on the parameters 'We need to ensure we have a single trailing slash on the parameters
sProcessPath = sProcessPath.TrimEnd("\") sProcessPath = sProcessPath.TrimEnd(cDS)
sSavePath = sSavePath.TrimEnd("\") sSavePath = sSavePath.TrimEnd(cDS)
sProcessPath &= "\" sProcessPath &= cDS
sSavePath &= "\" sSavePath &= cDS
'Determines the direction we need to go, we always want to be relative to the process location 'Determines the direction we need to go, we always want to be relative to the process location
If sSavePath.Split("\").Length > sProcessPath.Split("\").Length Then If sSavePath.Split(cDS).Length > sProcessPath.Split(cDS).Length Then
sPath1 = sProcessPath sPath1 = sProcessPath
sPath2 = sSavePath sPath2 = sSavePath
bDeep = True bDeep = True
@@ -135,8 +154,8 @@ Public Class mgrPath
End If End If
'Build an array of folders to work with from each path 'Build an array of folders to work with from each path
sPath1Array = sPath1.Split("\") sPath1Array = sPath1.Split(cDS)
sPath2Array = sPath2.Split("\") sPath2Array = sPath2.Split(cDS)
'Take the shortest path and remove the common folders from both 'Take the shortest path and remove the common folders from both
For Each s As String In sPath1Array For Each s As String In sPath1Array
@@ -148,25 +167,25 @@ Public Class mgrPath
Next Next
'Remove the trailing slashes 'Remove the trailing slashes
sPath1 = sPath1.TrimEnd("\") sPath1 = sPath1.TrimEnd(cDS)
sPath2 = sPath2.TrimEnd("\") sPath2 = sPath2.TrimEnd(cDS)
'Determine which way we go 'Determine which way we go
If bDeep Then If bDeep Then
If sPath1.Length > 0 Then If sPath1.Length > 0 Then
iBackFolders = sPath1.Split("\").Length iBackFolders = sPath1.Split(cDS).Length
End If End If
sResult = sPath2 sResult = sPath2
Else Else
If sPath2.Length > 0 Then If sPath2.Length > 0 Then
iBackFolders = sPath2.Split("\").Length iBackFolders = sPath2.Split(cDS).Length
End If End If
sResult = sPath1 sResult = sPath1
End If End If
'Insert direction modifiers based on how many folders are left 'Insert direction modifiers based on how many folders are left
For i = 1 To iBackFolders For i = 1 To iBackFolders
sResult = "..\" & sResult sResult = ".." & cDS & sResult
Next i Next i
'Done 'Done
@@ -181,13 +200,12 @@ Public Class mgrPath
Dim sCurrentUser As String = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) Dim sCurrentUser As String = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)
Dim oCustomVariable As clsPathVariable Dim oCustomVariable As clsPathVariable
If sValue.Contains("*mydocs*") Then
Return sValue.Replace("*mydocs*", sMyDocs)
End If
If sValue.Contains("*publicdocs*") Then For Each oCustomVariable In hshCustomVariables.Values
Return sValue.Replace("*publicdocs*", sPublicDocs) If sValue.Contains(oCustomVariable.FormattedName) Then
Return sValue.Replace(oCustomVariable.FormattedName, oCustomVariable.Path)
End If End If
Next
If sValue.Contains("*appdatalocal*") Then If sValue.Contains("*appdatalocal*") Then
Return sValue.Replace("*appdatalocal*", sAppDataLocal) Return sValue.Replace("*appdatalocal*", sAppDataLocal)
@@ -197,15 +215,21 @@ Public Class mgrPath
Return sValue.Replace("*appdataroaming*", sAppDataRoaming) Return sValue.Replace("*appdataroaming*", sAppDataRoaming)
End If End If
'This needs to be tested last for Unix compatability
If sValue.Contains("*mydocs*") Then
Return sValue.Replace("*mydocs*", sMyDocs)
End If
'Don't use these in Unix
If Not mgrCommon.IsUnix Then
If sValue.Contains("*publicdocs*") Then
Return sValue.Replace("*publicdocs*", sPublicDocs)
End If
If sValue.Contains("*currentuser*") Then If sValue.Contains("*currentuser*") Then
Return sValue.Replace("*currentuser*", sCurrentUser) Return sValue.Replace("*currentuser*", sCurrentUser)
End If End If
For Each oCustomVariable In hshCustomVariables.Values
If sValue.Contains(oCustomVariable.FormattedName) Then
Return sValue.Replace(oCustomVariable.FormattedName, oCustomVariable.Path)
End If End If
Next
Return sValue Return sValue
End Function End Function
@@ -218,13 +242,11 @@ Public Class mgrPath
Dim sCurrentUser As String = "*currentuser*" Dim sCurrentUser As String = "*currentuser*"
Dim oCustomVariable As clsPathVariable Dim oCustomVariable As clsPathVariable
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)) Then For Each oCustomVariable In hshCustomVariables.Values
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), sMyDocs) If sValue.Contains(oCustomVariable.Path) Then
End If Return sValue.Replace(oCustomVariable.Path, oCustomVariable.FormattedName)
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments)) Then
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments), sPublicDocs)
End If End If
Next
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)) Then If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)) Then
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), sAppDataLocal) Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), sAppDataLocal)
@@ -234,15 +256,21 @@ Public Class mgrPath
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), sAppDataRoaming) Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), sAppDataRoaming)
End If End If
'This needs to be tested last for Unix compatability
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)) Then
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), sMyDocs)
End If
'Don't use these in Unix
If Not mgrCommon.IsUnix Then
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments)) Then
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments), sPublicDocs)
End If
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)) Then If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)) Then
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), sCurrentUser) Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), sCurrentUser)
End If End If
For Each oCustomVariable In hshCustomVariables.Values
If sValue.Contains(oCustomVariable.Path) Then
Return sValue.Replace(oCustomVariable.Path, oCustomVariable.FormattedName)
End If End If
Next
Return sValue Return sValue
End Function End Function
@@ -252,11 +280,16 @@ Public Class mgrPath
Dim hshCustomVariables As Hashtable = mgrVariables.ReadVariables Dim hshCustomVariables As Hashtable = mgrVariables.ReadVariables
Dim oCustomVariable As clsPathVariable Dim oCustomVariable As clsPathVariable
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.ApplicationData)) 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.LocalApplicationData))
'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)) hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.UserProfile))
End If
'Load Custom Variables 'Load Custom Variables
For Each oCustomVariable In hshCustomVariables.Values For Each oCustomVariable In hshCustomVariables.Values
@@ -313,6 +346,7 @@ Public Class mgrPath
Dim sFolder As String = String.Empty Dim sFolder As String = String.Empty
Dim bSearchFailed As Boolean = False Dim bSearchFailed As Boolean = False
frmFind.GameName = sGameName
frmFind.SearchItem = sProcess & ".*" frmFind.SearchItem = sProcess & ".*"
frmFind.FolderSearch = False frmFind.FolderSearch = False
@@ -333,13 +367,7 @@ Public Class mgrPath
frmFind.ShowDialog() frmFind.ShowDialog()
If frmFind.FoundItem <> String.Empty Then If frmFind.FoundItem <> String.Empty Then
sFolder = IO.Path.GetDirectoryName(frmFind.FoundItem) Return frmFind.FoundItem
sMessage = mgrCommon.FormatString(mgrPath_ConfirmPathCorrect, New String() {sGameName, sFolder})
If mgrCommon.ShowMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
Return sFolder
Else
sFolder = String.Empty
End If
Else Else
bSearchFailed = True bSearchFailed = True
End If End If
@@ -353,6 +381,8 @@ Public Class mgrPath
If mgrCommon.ShowMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then If mgrCommon.ShowMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
sFolder = SetManualgamePath() sFolder = SetManualgamePath()
End If End If
frmFind.Dispose()
End If End If
Return sFolder Return sFolder
+66 -1
View File
@@ -85,13 +85,70 @@ Public Class mgrProcesses
Next Next
End Sub End Sub
Public Function SearchRunningProcesses(ByVal hshScanList As Hashtable, ByRef bNeedsPath As Boolean, ByRef iErrorCode As Integer) As Boolean 'This function will only work correctly on Unix
Private Function GetUnixProcessArguments(ByVal prs As Process) As String()
Dim sArguments As String
Try
sArguments = File.ReadAllText("/proc/" & prs.Id.ToString() & "/cmdline")
Return sArguments.Split(vbNullChar)
Catch ex As Exception
Return New String() {String.Empty}
End Try
End Function
'This function will only work correctly on Unix
Private Function GetUnixSymLinkDirectory(ByVal prs As Process) As String
Dim prsls As Process
Dim slsinfo As String()
'This is the best way I can think of to determine the end point of a symlink without doing even more crazy shit
Try
prsls = New Process
prsls.StartInfo.FileName = "/bin/bash"
prsls.StartInfo.Arguments = "-c ""ls -l /proc/" & prs.Id.ToString & " | grep cwd"""
prsls.StartInfo.UseShellExecute = False
prsls.StartInfo.RedirectStandardOutput = True
prsls.StartInfo.CreateNoWindow = True
prsls.Start()
slsinfo = prsls.StandardOutput.ReadToEnd().Split(">")
Return slsinfo(slsinfo.Length - 1).Trim
Catch ex As Exception
Return String.Empty
End Try
End Function
Public Function SearchRunningProcesses(ByVal hshScanList As Hashtable, ByRef bNeedsPath As Boolean, ByRef iErrorCode As Integer, ByVal bDebugMode As Boolean) As Boolean
Dim prsList() As Process = Process.GetProcesses Dim prsList() As Process = Process.GetProcesses
Dim sProcessCheck As String = String.Empty Dim sProcessCheck As String = String.Empty
Dim sProcessList As String = String.Empty
Dim bWineProcess As Boolean = False
For Each prsCurrent As Process In prsList For Each prsCurrent As Process In prsList
'This needs to be wrapped due to issues with Mono.
Try
sProcessCheck = prsCurrent.ProcessName sProcessCheck = prsCurrent.ProcessName
'Unix Handler
'We need some special handling for Wine processes
If mgrCommon.IsUnix And sProcessCheck.ToLower = "wine-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.
sWinePath = GetUnixProcessArguments(prsCurrent)(0).Split("\")
sProcessCheck = sWinePath(sWinePath.Length - 1).Replace(".exe", "")
bWineProcess = True
Else
bWineProcess = False
End If
If bDebugMode And mgrCommon.IsUnix Then
sProcessList &= prsCurrent.Id & " " & prsCurrent.ProcessName & " " & GetUnixProcessArguments(prsCurrent)(0) & vbCrLf
ElseIf bDebugMode Then
sProcessList &= prsCurrent.Id & " " & prsCurrent.ProcessName & vbCrLf
End If
Catch ex As Exception
'Do Nothing
End Try
If hshScanList.ContainsKey(sProcessCheck) Then If hshScanList.ContainsKey(sProcessCheck) Then
prsFoundProcess = prsCurrent prsFoundProcess = prsCurrent
oGame = DirectCast(hshScanList.Item(sProcessCheck), clsGame).ShallowCopy oGame = DirectCast(hshScanList.Item(sProcessCheck), clsGame).ShallowCopy
@@ -105,7 +162,11 @@ Public Class mgrProcesses
If Not oGame.AbsolutePath Or oGame.Duplicate Then If Not oGame.AbsolutePath Or oGame.Duplicate Then
Try Try
If Not bWineProcess Then
oGame.ProcessPath = Path.GetDirectoryName(prsCurrent.MainModule.FileName) oGame.ProcessPath = Path.GetDirectoryName(prsCurrent.MainModule.FileName)
Else
oGame.ProcessPath = GetUnixSymLinkDirectory(prsCurrent)
End If
Catch exWin32 As System.ComponentModel.Win32Exception Catch exWin32 As System.ComponentModel.Win32Exception
'If an exception occurs the process is: 'If an exception occurs the process is:
'Running as administrator and the app isn't. 'Running as administrator and the app isn't.
@@ -117,10 +178,12 @@ Public Class mgrProcesses
bNeedsPath = True bNeedsPath = True
iErrorCode = 299 iErrorCode = 299
Else Else
If bDebugMode Then mgrCommon.ShowMessage(exWin32.NativeErrorCode & " " & exWin32.Message & vbCrLf & vbCrLf & exWin32.StackTrace, MsgBoxStyle.Critical)
'A different failure occured, drop out and continue to scan. 'A different failure occured, drop out and continue to scan.
Return False Return False
End If End If
Catch exAll As Exception Catch exAll As Exception
If bDebugMode Then mgrCommon.ShowMessage(exAll.Message & vbCrLf & vbCrLf & exAll.StackTrace, MsgBoxStyle.Critical)
'A different failure occured, drop out and continue to scan. 'A different failure occured, drop out and continue to scan.
Return False Return False
End Try End Try
@@ -137,6 +200,8 @@ Public Class mgrProcesses
End If End If
Next Next
If bDebugMode Then mgrCommon.SaveText(sProcessList, mgrPath.SettingsRoot & "/gbm_process_list.txt")
Return False Return False
End Function End Function
+44 -42
View File
@@ -28,39 +28,28 @@ Public Class mgrRestore
Public Event UpdateRestoreInfo(oRestoreInfo As clsBackup) Public Event UpdateRestoreInfo(oRestoreInfo As clsBackup)
Public Event SetLastAction(sMessage As String) Public Event SetLastAction(sMessage As String)
Private Shared Function CheckForPathOverride(ByRef oCheckBackup As clsBackup, ByVal oCheckGame As clsGame) As Boolean Public Shared Sub DoPathOverride(ByRef oCheckBackup As clsBackup, ByVal oCheckGame As clsGame)
Dim oResult As MsgBoxResult 'Always override the manifest restore path with the current configuration path if possible
If Not oCheckGame.Temporary Then
If oCheckBackup.RestorePath <> oCheckGame.Path Then
oResult = mgrCommon.ShowMessage(mgrRestore_ConfirmPathMismatch, oCheckBackup.CroppedName, MsgBoxStyle.YesNoCancel)
If oResult = MsgBoxResult.Yes Then
If Path.IsPathRooted(oCheckGame.Path) Then If Path.IsPathRooted(oCheckGame.Path) Then
oCheckBackup.AbsolutePath = True oCheckBackup.AbsolutePath = True
oCheckBackup.RestorePath = oCheckGame.Path
Else Else
oCheckBackup.AbsolutePath = False
End If
oCheckBackup.RestorePath = oCheckGame.Path oCheckBackup.RestorePath = oCheckGame.Path
End If End If
ElseIf oResult = MsgBoxResult.Cancel Then End Sub
Return False
End If
End If
Return True
End Function
Public Shared Function CheckPath(ByRef oRestoreInfo As clsBackup, ByVal oGame As clsGame, ByRef bTriggerReload As Boolean) As Boolean Public Shared Function CheckPath(ByRef oRestoreInfo As clsBackup, ByVal oGame As clsGame, ByRef bTriggerReload As Boolean) As Boolean
Dim sProcess As String Dim sProcess As String
Dim sRestorePath As String Dim sRestorePath As String
Dim bNoAuto As Boolean Dim bNoAuto As Boolean
'Before we do anything check if we need to override the current path DoPathOverride(oRestoreInfo, oGame)
If Not CheckForPathOverride(oRestoreInfo, oGame) Then
Return False
End If
If Not oRestoreInfo.AbsolutePath Then If Not oRestoreInfo.AbsolutePath Then
If oGame.ProcessPath <> String.Empty Then If oGame.ProcessPath <> String.Empty Then
oRestoreInfo.RelativeRestorePath = oGame.ProcessPath & "\" & oRestoreInfo.RestorePath oRestoreInfo.RelativeRestorePath = oGame.ProcessPath & Path.DirectorySeparatorChar & oRestoreInfo.RestorePath
Else Else
sProcess = oGame.TrueProcess sProcess = oGame.TrueProcess
If mgrCommon.IsProcessNotSearchable(oGame) Then bNoAuto = True If mgrCommon.IsProcessNotSearchable(oGame) Then bNoAuto = True
@@ -73,7 +62,7 @@ Public Class mgrRestore
bTriggerReload = True bTriggerReload = True
'Set path for restore 'Set path for restore
oRestoreInfo.RelativeRestorePath = sRestorePath & "\" & oRestoreInfo.RestorePath oRestoreInfo.RelativeRestorePath = sRestorePath & Path.DirectorySeparatorChar & oRestoreInfo.RestorePath
Else Else
Return False Return False
End If End If
@@ -172,23 +161,10 @@ Public Class mgrRestore
Return slRemovedItems Return slRemovedItems
End Function End Function
Public Sub DoRestore(ByVal oRestoreList As List(Of clsBackup)) Public Function CheckRestorePrereq(ByVal oBackupInfo As clsBackup) As Boolean
Dim prs7z As Process
Dim sBackupFile As String
Dim sExtractPath As String
Dim bDoRestore As Boolean
Dim bRestoreCompleted As Boolean
Dim sHash As String Dim sHash As String
Dim sExtractPath As String
For Each oBackupInfo In oRestoreList Dim sBackupFile As String = oSettings.BackupFolder & Path.DirectorySeparatorChar & oBackupInfo.FileName
'Init
prs7z = New Process
sBackupFile = oSettings.BackupFolder & "\" & oBackupInfo.FileName
sExtractPath = String.Empty
bDoRestore = True
bRestoreCompleted = False
CancelOperation = False
RaiseEvent UpdateRestoreInfo(oBackupInfo)
If oBackupInfo.AbsolutePath Then If oBackupInfo.AbsolutePath Then
sExtractPath = oBackupInfo.RestorePath sExtractPath = oBackupInfo.RestorePath
@@ -203,11 +179,11 @@ Public Class mgrRestore
Directory.CreateDirectory(sExtractPath) Directory.CreateDirectory(sExtractPath)
Catch ex As Exception Catch ex As Exception
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorCreatePath, ex.Message), False, ToolTipIcon.Error, True) RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorCreatePath, ex.Message), False, ToolTipIcon.Error, True)
bDoRestore = False Return False
End Try End Try
Else Else
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorNoPath, sExtractPath), False, ToolTipIcon.Error, True) RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorNoPath, sExtractPath), False, ToolTipIcon.Error, True)
bDoRestore = False Return False
End If End If
End If End If
@@ -219,7 +195,7 @@ Public Class mgrRestore
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorFailedCheck, oBackupInfo.Name), False, ToolTipIcon.Info, True) RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorFailedCheck, oBackupInfo.Name), False, ToolTipIcon.Info, True)
If mgrCommon.ShowMessage(mgrRestore_ConfirmFailedCheck, oBackupInfo.Name, MsgBoxStyle.YesNo) = MsgBoxResult.No Then If mgrCommon.ShowMessage(mgrRestore_ConfirmFailedCheck, oBackupInfo.Name, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
RaiseEvent UpdateLog(mgrRestore_ErrorCheckAbort, False, ToolTipIcon.Info, True) RaiseEvent UpdateLog(mgrRestore_ErrorCheckAbort, False, ToolTipIcon.Info, True)
bDoRestore = False Return False
End If End If
Else Else
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_Verified, oBackupInfo.Name), False, ToolTipIcon.Info, True) RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_Verified, oBackupInfo.Name), False, ToolTipIcon.Info, True)
@@ -229,10 +205,37 @@ Public Class mgrRestore
End If End If
End If End If
If bDoRestore Then Return True
End Function
Public Sub DoRestore(ByVal oRestoreList As List(Of clsBackup))
Dim prs7z As Process
Dim sBackupFile As String
Dim sExtractPath As String
Dim bRestoreCompleted As Boolean
For Each oBackupInfo In oRestoreList
'Init
prs7z = New Process
sBackupFile = oSettings.BackupFolder & Path.DirectorySeparatorChar & oBackupInfo.FileName
sExtractPath = String.Empty
bRestoreCompleted = False
CancelOperation = False
RaiseEvent UpdateRestoreInfo(oBackupInfo)
If oBackupInfo.AbsolutePath Then
sExtractPath = oBackupInfo.RestorePath
Else
sExtractPath = oBackupInfo.RelativeRestorePath
End If
Try Try
If File.Exists(sBackupFile) Then If File.Exists(sBackupFile) Then
prs7z.StartInfo.Arguments = "x """ & sBackupFile & """ -o""" & sExtractPath & "\"" -aoa -r" 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 prs7z.StartInfo.FileName = mgrPath.Utility7zLocation
prs7z.StartInfo.UseShellExecute = False prs7z.StartInfo.UseShellExecute = False
prs7z.StartInfo.RedirectStandardOutput = True prs7z.StartInfo.RedirectStandardOutput = True
@@ -279,7 +282,6 @@ Public Class mgrRestore
Else Else
RaiseEvent SetLastAction(mgrCommon.FormatString(mgrRestore_ActionFailed, oBackupInfo.CroppedName)) RaiseEvent SetLastAction(mgrCommon.FormatString(mgrRestore_ActionFailed, oBackupInfo.CroppedName))
End If End If
End If
Next Next
End Sub End Sub
+27 -3
View File
@@ -1,6 +1,6 @@
Imports GBM.My.Resources Imports GBM.My.Resources
Imports System.IO Imports System.IO
Imports System.Data.SQLite Imports Mono.Data.Sqlite
Public Class mgrSQLite Public Class mgrSQLite
@@ -73,7 +73,7 @@ Public Class mgrSQLite
sSql = "CREATE TABLE settings (SettingsID INTEGER NOT NULL PRIMARY KEY, MonitorOnStartup BOOLEAN NOT NULL, StartToTray BOOLEAN NOT NULL, ShowDetectionToolTips BOOLEAN NOT NULL, " & 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, " & "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, " & "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);" "SupressBackup BOOLEAN NOT NULL, SupressBackupThreshold INTEGER NOT NULL, CompressionLevel INTEGER NOT NULL);"
'Add Tables (Monitor List) 'Add Tables (Monitor List)
sSql &= "CREATE TABLE monitorlist (MonitorID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL, Process TEXT NOT NULL, Path TEXT, " & sSql &= "CREATE TABLE monitorlist (MonitorID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL, Process TEXT NOT NULL, Path TEXT, " &
@@ -232,7 +232,8 @@ Public Class mgrSQLite
BuildParams(command, hshParams) BuildParams(command, hshParams)
Try Try
adapter = New SQLiteDataAdapter(command) adapter = New SqliteDataAdapter()
adapter.SelectCommand = command
adapter.Fill(oData) adapter.Fill(oData)
Catch ex As Exception Catch ex As Exception
mgrCommon.ShowMessage(mgrSQLite_ErrorQueryFailure, New String() {sSQL, ex.Message}, MsgBoxStyle.Exclamation) mgrCommon.ShowMessage(mgrSQLite_ErrorQueryFailure, New String() {sSQL, ex.Message}, MsgBoxStyle.Exclamation)
@@ -506,6 +507,29 @@ Public Class mgrSQLite
End If End If
End If End If
'0.96 Upgrade
If GetDatabaseVersion() < 96 Then
If eDatabase = Database.Local Then
'Backup DB before starting
BackupDB("v95")
'Add new setting
sSQL = "ALTER TABLE settings ADD COLUMN CompressionLevel INTEGER NOT NULL DEFAULT 5;"
sSQL &= "PRAGMA user_version=96"
RunParamQuery(sSQL, New Hashtable)
End If
If eDatabase = Database.Remote Then
'Backup DB before starting
BackupDB("v95")
sSQL = "PRAGMA user_version=96"
RunParamQuery(sSQL, New Hashtable)
End If
End If
End Sub End Sub
Public Function GetDBSize() As Long Public Function GetDBSize() As Long
+13 -1
View File
@@ -14,6 +14,7 @@ Public Class mgrSettings
Private bTimeTracking As Boolean = True Private bTimeTracking As Boolean = True
Private bSupressBackup As Boolean = False Private bSupressBackup As Boolean = False
Private iSupressBackupThreshold As Integer = 10 Private iSupressBackupThreshold As Integer = 10
Private iCompressionLevel As Integer = 5
Private sBackupFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments).TrimEnd(New Char() {"\", "/"}) Private sBackupFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments).TrimEnd(New Char() {"\", "/"})
Property StartWithWindows As Boolean Property StartWithWindows As Boolean
@@ -133,6 +134,15 @@ Public Class mgrSettings
End Set End Set
End Property End Property
Property CompressionLevel As Integer
Get
Return iCompressionLevel
End Get
Set(value As Integer)
iCompressionLevel = value
End Set
End Property
Property BackupFolder As String Property BackupFolder As String
Get Get
Return sBackupFolder Return sBackupFolder
@@ -152,7 +162,7 @@ Public Class mgrSettings
sSQL = "INSERT INTO settings VALUES (1, @MonitorOnStartup, @StartToTray, @ShowDetectionToolTips, @DisableConfirmation, " sSQL = "INSERT INTO settings VALUES (1, @MonitorOnStartup, @StartToTray, @ShowDetectionToolTips, @DisableConfirmation, "
sSQL &= "@CreateSubFolder, @ShowOverwriteWarning, @RestoreOnLaunch, @BackupFolder, @Sync, @CheckSum, @StartWithWindows, " sSQL &= "@CreateSubFolder, @ShowOverwriteWarning, @RestoreOnLaunch, @BackupFolder, @Sync, @CheckSum, @StartWithWindows, "
sSQL &= "@TimeTracking, @SupressBackup, @SupressBackupThreshold)" sSQL &= "@TimeTracking, @SupressBackup, @SupressBackupThreshold, @CompressionLevel)"
hshParams.Add("MonitorOnStartup", MonitorOnStartup) hshParams.Add("MonitorOnStartup", MonitorOnStartup)
hshParams.Add("StartToTray", StartToTray) hshParams.Add("StartToTray", StartToTray)
@@ -168,6 +178,7 @@ Public Class mgrSettings
hshParams.Add("TimeTracking", TimeTracking) hshParams.Add("TimeTracking", TimeTracking)
hshParams.Add("SupressBackup", SupressBackup) hshParams.Add("SupressBackup", SupressBackup)
hshParams.Add("SupressBackupThreshold", SupressBackupThreshold) hshParams.Add("SupressBackupThreshold", SupressBackupThreshold)
hshParams.Add("CompressionLevel", CompressionLevel)
oDatabase.RunParamQuery(sSQL, hshParams) oDatabase.RunParamQuery(sSQL, hshParams)
End Sub End Sub
@@ -197,6 +208,7 @@ Public Class mgrSettings
TimeTracking = CBool(dr("TimeTracking")) TimeTracking = CBool(dr("TimeTracking"))
SupressBackup = CBool(dr("SupressBackup")) SupressBackup = CBool(dr("SupressBackup"))
SupressBackupThreshold = CInt(dr("SupressBackupThreshold")) SupressBackupThreshold = CInt(dr("SupressBackupThreshold"))
CompressionLevel = CInt(dr("CompressionLevel"))
Next Next
oDatabase.Disconnect() oDatabase.Disconnect()
+2 -2
View File
@@ -33,7 +33,7 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below: ' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("0.95.*")> <Assembly: AssemblyVersion("0.96.*")>
<Assembly: AssemblyFileVersion("0.95.0.0")> <Assembly: AssemblyFileVersion("0.96.0.0")>
<Assembly: NeutralResourcesLanguageAttribute("en")> <Assembly: NeutralResourcesLanguageAttribute("en")>
+376 -34
View File
@@ -70,7 +70,7 @@ Namespace My.Resources
End Property End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to 2015 Michael J. Seiferling. ''' Looks up a localized string similar to [PARAM] Michael J. Seiferling.
'''</summary> '''</summary>
Friend ReadOnly Property App_Copyright() As String Friend ReadOnly Property App_Copyright() As String
Get Get
@@ -78,6 +78,15 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Looks up a localized string similar to This function is currently not available on a Unix based operating system..
'''</summary>
Friend ReadOnly Property App_ErrorUnixNotAvailable() As String
Get
Return ResourceManager.GetString("App_ErrorUnixNotAvailable", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to [PARAM] KB. ''' Looks up a localized string similar to [PARAM] KB.
'''</summary> '''</summary>
@@ -429,24 +438,6 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Looks up a localized string similar to Drag a shortcut here to complete this step..
'''</summary>
Friend ReadOnly Property frmAddWizard_lblDrag1() As String
Get
Return ResourceManager.GetString("frmAddWizard_lblDrag1", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Drag a shortcut here to complete this step..
'''</summary>
Friend ReadOnly Property frmAddWizard_lblDrag2() As String
Get
Return ResourceManager.GetString("frmAddWizard_lblDrag2", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to Save Path. ''' Looks up a localized string similar to Save Path.
'''</summary> '''</summary>
@@ -484,7 +475,7 @@ Namespace My.Resources
End Property End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to The name will be automatically filtered for length and invalid characters. . ''' 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> '''</summary>
Friend ReadOnly Property frmAddWizard_lblStep1Instructions() As String Friend ReadOnly Property frmAddWizard_lblStep1Instructions() As String
Get Get
@@ -511,7 +502,7 @@ Namespace My.Resources
End Property End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to Some games use launchers. Do not monitor launchers, be sure to choose the game&apos;s actual exe file.. ''' Looks up a localized string similar to Some games use launchers. Do not monitor launchers, be sure to choose the game&apos;s actual exe file. You may drag and drop a shortcut here to complete this step, only Windows shortcuts are currently supported..
'''</summary> '''</summary>
Friend ReadOnly Property frmAddWizard_lblStep2Instructions() As String Friend ReadOnly Property frmAddWizard_lblStep2Instructions() As String
Get Get
@@ -717,6 +708,60 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Looks up a localized string similar to Select All.
'''</summary>
Friend ReadOnly Property frmAdvancedImport_chkSelectAll() As String
Get
Return ResourceManager.GetString("frmAdvancedImport_chkSelectAll", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Name.
'''</summary>
Friend ReadOnly Property frmAdvancedImport_ColumnName() As String
Get
Return ResourceManager.GetString("frmAdvancedImport_ColumnName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Monitored Process.
'''</summary>
Friend ReadOnly Property frmAdvancedImport_ColumnProcess() As String
Get
Return ResourceManager.GetString("frmAdvancedImport_ColumnProcess", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Tags.
'''</summary>
Friend ReadOnly Property frmAdvancedImport_ColumnTags() As String
Get
Return ResourceManager.GetString("frmAdvancedImport_ColumnTags", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Configurations ([PARAM]).
'''</summary>
Friend ReadOnly Property frmAdvancedImport_Configs() As String
Get
Return ResourceManager.GetString("frmAdvancedImport_Configs", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to [Filtered].
'''</summary>
Friend ReadOnly Property frmAdvancedImport_Filtered() As String
Get
Return ResourceManager.GetString("frmAdvancedImport_Filtered", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to Import Game Configurations. ''' Looks up a localized string similar to Import Game Configurations.
'''</summary> '''</summary>
@@ -727,16 +772,16 @@ Namespace My.Resources
End Property End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to [PARAM] new configurations available.. ''' Looks up a localized string similar to Filter:.
'''</summary> '''</summary>
Friend ReadOnly Property frmAdvancedImport_NewConfigs() As String Friend ReadOnly Property frmAdvancedImport_lblFilter() As String
Get Get
Return ResourceManager.GetString("frmAdvancedImport_NewConfigs", resourceCulture) Return ResourceManager.GetString("frmAdvancedImport_lblFilter", resourceCulture)
End Get End Get
End Property End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to [PARAM] Selected. ''' Looks up a localized string similar to Selected ([PARAM]).
'''</summary> '''</summary>
Friend ReadOnly Property frmAdvancedImport_Selected() As String Friend ReadOnly Property frmAdvancedImport_Selected() As String
Get Get
@@ -789,6 +834,15 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Looks up a localized string similar to &amp;OK.
'''</summary>
Friend ReadOnly Property frmFileFolderSearch_btnOk() As String
Get
Return ResourceManager.GetString("frmFileFolderSearch_btnOk", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to Search. ''' Looks up a localized string similar to Search.
'''</summary> '''</summary>
@@ -799,7 +853,34 @@ Namespace My.Resources
End Property End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to The location was not found on the [PARAM] drive. Do you wish to search the [PARAM] drive?. ''' Looks up a localized string similar to Search Results.
'''</summary>
Friend ReadOnly Property frmFileFolderSearch_lblResults() As String
Get
Return ResourceManager.GetString("frmFileFolderSearch_lblResults", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Search Aborted!.
'''</summary>
Friend ReadOnly Property frmFileFolderSearch_SearchCancel() As String
Get
Return ResourceManager.GetString("frmFileFolderSearch_SearchCancel", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Search Complete!.
'''</summary>
Friend ReadOnly Property frmFileFolderSearch_SearchComplete() As String
Get
Return ResourceManager.GetString("frmFileFolderSearch_SearchComplete", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Do you wish to search the [PARAM] drive?.
'''</summary> '''</summary>
Friend ReadOnly Property frmFileFolderSearch_SwitchDrives() As String Friend ReadOnly Property frmFileFolderSearch_SwitchDrives() As String
Get Get
@@ -1374,6 +1455,24 @@ Namespace My.Resources
End Get End Get
End Property 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>
Friend ReadOnly Property frmGameManager_DefaultExportFileName() As String
Get
Return ResourceManager.GetString("frmGameManager_DefaultExportFileName", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to A game with this exact name and process already exists.. ''' Looks up a localized string similar to A game with this exact name and process already exists..
'''</summary> '''</summary>
@@ -2040,6 +2139,15 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Looks up a localized string similar to at [PARAM]..
'''</summary>
Friend ReadOnly Property frmMain_AtTime() As String
Get
Return ResourceManager.GetString("frmMain_AtTime", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to Backup in Progress.... ''' Looks up a localized string similar to Backup in Progress....
'''</summary> '''</summary>
@@ -2085,6 +2193,33 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Looks up a localized string similar to Choose a location for the log file.
'''</summary>
Friend ReadOnly Property frmMain_ChooseLogFile() As String
Get
Return ResourceManager.GetString("frmMain_ChooseLogFile", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The command has failed..
'''</summary>
Friend ReadOnly Property frmMain_CommandFail() As String
Get
Return ResourceManager.GetString("frmMain_CommandFail", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The command was executed successfully..
'''</summary>
Friend ReadOnly Property frmMain_CommandSucess() As String
Get
Return ResourceManager.GetString("frmMain_CommandSucess", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to Do you wish to backup data from [PARAM]?. ''' Looks up a localized string similar to Do you wish to backup data from [PARAM]?.
'''</summary> '''</summary>
@@ -2094,6 +2229,15 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Looks up a localized string similar to Are you sure you want to clear the log?.
'''</summary>
Friend ReadOnly Property frmMain_ConfirmLogClear() As String
Get
Return ResourceManager.GetString("frmMain_ConfirmLogClear", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to This tool removes orphaned backup information from the local manifest based on the current backup folder. Data can become orphaned when backups are deleted by various computers that share the same backup folder on a cloud or network.[BR][BR]When alternating between different backup folders you should NOT use this tool.[BR][BR]Do you wish to proceed?. ''' Looks up a localized string similar to This tool removes orphaned backup information from the local manifest based on the current backup folder. Data can become orphaned when backups are deleted by various computers that share the same backup folder on a cloud or network.[BR][BR]When alternating between different backup folders you should NOT use this tool.[BR][BR]Do you wish to proceed?.
'''</summary> '''</summary>
@@ -2130,6 +2274,33 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Looks up a localized string similar to Game Backup Monitor Log.
'''</summary>
Friend ReadOnly Property frmMain_DefaultLogFileName() As String
Get
Return ResourceManager.GetString("frmMain_DefaultLogFileName", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Developer Console.
'''</summary>
Friend ReadOnly Property frmMain_DeveloperConsole() As String
Get
Return ResourceManager.GetString("frmMain_DeveloperConsole", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Enter Command.
'''</summary>
Friend ReadOnly Property frmMain_EnterCommand() As String
Get
Return ResourceManager.GetString("frmMain_EnterCommand", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to [PARAM] is a 64-bit game, GBM cannot detect the required information to save your backup.. ''' Looks up a localized string similar to [PARAM] is a 64-bit game, GBM cannot detect the required information to save your backup..
'''</summary> '''</summary>
@@ -2140,7 +2311,7 @@ Namespace My.Resources
End Property End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to 7-Zip was not found in the Game Backup Monitor utilities folder. The application cannot continue.. ''' Looks up a localized string similar to 7-Zip was not found. The application cannot continue..
'''</summary> '''</summary>
Friend ReadOnly Property frmMain_Error7zip() As String Friend ReadOnly Property frmMain_Error7zip() As String
Get Get
@@ -2211,6 +2382,24 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Looks up a localized string similar to Bad parameter ([PARAM]) for command [PARAM]..
'''</summary>
Friend ReadOnly Property frmMain_ErrorCommandBadParam() As String
Get
Return ResourceManager.GetString("frmMain_ErrorCommandBadParam", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The command [PARAM] was not recognized..
'''</summary>
Friend ReadOnly Property frmMain_ErrorCommandInvalid() As String
Get
Return ResourceManager.GetString("frmMain_ErrorCommandInvalid", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to The following monitored game(s) contain a custom path variable that is not set.[BR][PARAM][BR][BR]You will encounter backup/restore errors with these games until the variables are set.. ''' Looks up a localized string similar to The following monitored game(s) contain a custom path variable that is not set.[BR][PARAM][BR][BR]You will encounter backup/restore errors with these games until the variables are set..
'''</summary> '''</summary>
@@ -2238,6 +2427,24 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Looks up a localized string similar to An unexpected error occured while initializing GBM.[BR][BR][PARAM][BR][BR]Do you wish to continue anyway? (Not Recommended).
'''</summary>
Friend ReadOnly Property frmMain_ErrorInitFailure() As String
Get
Return ResourceManager.GetString("frmMain_ErrorInitFailure", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to The command [PARAM] requires more parameters..
'''</summary>
Friend ReadOnly Property frmMain_ErrorMissingParams() As String
Get
Return ResourceManager.GetString("frmMain_ErrorMissingParams", resourceCulture)
End Get
End Property
'''<summary> '''<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 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..
'''</summary> '''</summary>
@@ -2427,6 +2634,24 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Looks up a localized string similar to &amp;Clear.
'''</summary>
Friend ReadOnly Property frmMain_gMonLogClear() As String
Get
Return ResourceManager.GetString("frmMain_gMonLogClear", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to &amp;Save.
'''</summary>
Friend ReadOnly Property frmMain_gMonLogSave() As String
Get
Return ResourceManager.GetString("frmMain_gMonLogSave", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to &amp;Setup. ''' Looks up a localized string similar to &amp;Setup.
'''</summary> '''</summary>
@@ -2517,6 +2742,15 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Looks up a localized string similar to &amp;Log.
'''</summary>
Friend ReadOnly Property frmMain_gMonToolsLog() As String
Get
Return ResourceManager.GetString("frmMain_gMonToolsLog", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to Show / Hide. ''' Looks up a localized string similar to Show / Hide.
'''</summary> '''</summary>
@@ -2571,6 +2805,15 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Looks up a localized string similar to The session log has been cleared due to size and auto-saved to [PARAM]..
'''</summary>
Friend ReadOnly Property frmMain_LogAutoSave() As String
Get
Return ResourceManager.GetString("frmMain_LogAutoSave", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to The local manifest is clean.. ''' Looks up a localized string similar to The local manifest is clean..
'''</summary> '''</summary>
@@ -2706,6 +2949,15 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Looks up a localized string similar to PNG files (*.png)|*.png.
'''</summary>
Friend ReadOnly Property frmMain_PNGFilter() As String
Get
Return ResourceManager.GetString("frmMain_PNGFilter", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to Remote Database Vacuum Completed: [PARAM] KB. ''' Looks up a localized string similar to Remote Database Vacuum Completed: [PARAM] KB.
'''</summary> '''</summary>
@@ -2769,6 +3021,15 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Looks up a localized string similar to Text.
'''</summary>
Friend ReadOnly Property frmMain_Text() As String
Get
Return ResourceManager.GetString("frmMain_Text", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to the unidentified game. ''' Looks up a localized string similar to the unidentified game.
'''</summary> '''</summary>
@@ -2832,6 +3093,60 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Looks up a localized string similar to Fast.
'''</summary>
Friend ReadOnly Property frmSettings_cboCompression_Fast() As String
Get
Return ResourceManager.GetString("frmSettings_cboCompression_Fast", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Fastest.
'''</summary>
Friend ReadOnly Property frmSettings_cboCompression_Fastest() As String
Get
Return ResourceManager.GetString("frmSettings_cboCompression_Fastest", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Maximum.
'''</summary>
Friend ReadOnly Property frmSettings_cboCompression_Maximum() As String
Get
Return ResourceManager.GetString("frmSettings_cboCompression_Maximum", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to None.
'''</summary>
Friend ReadOnly Property frmSettings_cboCompression_None() As String
Get
Return ResourceManager.GetString("frmSettings_cboCompression_None", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Normal.
'''</summary>
Friend ReadOnly Property frmSettings_cboCompression_Normal() As String
Get
Return ResourceManager.GetString("frmSettings_cboCompression_Normal", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Ultra.
'''</summary>
Friend ReadOnly Property frmSettings_cboCompression_Ultra() As String
Get
Return ResourceManager.GetString("frmSettings_cboCompression_Ultra", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to Disable backup confirmation. ''' Looks up a localized string similar to Disable backup confirmation.
'''</summary> '''</summary>
@@ -2958,6 +3273,15 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Looks up a localized string similar to 7z Options.
'''</summary>
Friend ReadOnly Property frmSettings_grp7z() As String
Get
Return ResourceManager.GetString("frmSettings_grp7z", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to Backup and Restore. ''' Looks up a localized string similar to Backup and Restore.
'''</summary> '''</summary>
@@ -2986,7 +3310,7 @@ Namespace My.Resources
End Property End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to Backup Folder. ''' Looks up a localized string similar to Backup Folder:.
'''</summary> '''</summary>
Friend ReadOnly Property frmSettings_lblBackupFolder() As String Friend ReadOnly Property frmSettings_lblBackupFolder() As String
Get Get
@@ -2994,6 +3318,15 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Looks up a localized string similar to Compression:.
'''</summary>
Friend ReadOnly Property frmSettings_lblCompression() As String
Get
Return ResourceManager.GetString("frmSettings_lblCompression", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to minutes. ''' Looks up a localized string similar to minutes.
'''</summary> '''</summary>
@@ -3638,7 +3971,7 @@ Namespace My.Resources
End Property End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to [PARAM] backup completed. ''' Looks up a localized string similar to [PARAM] backup completed..
'''</summary> '''</summary>
Friend ReadOnly Property mgrBackup_ActionComplete() As String Friend ReadOnly Property mgrBackup_ActionComplete() As String
Get Get
@@ -3647,7 +3980,7 @@ Namespace My.Resources
End Property End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to [PARAM] backup failed. ''' Looks up a localized string similar to [PARAM] backup failed..
'''</summary> '''</summary>
Friend ReadOnly Property mgrBackup_ActionFailed() As String Friend ReadOnly Property mgrBackup_ActionFailed() As String
Get Get
@@ -3656,7 +3989,7 @@ Namespace My.Resources
End Property End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to [PARAM] backup completed.. ''' Looks up a localized string similar to [PARAM] backup ([PARAM]) completed. .
'''</summary> '''</summary>
Friend ReadOnly Property mgrBackup_BackupComplete() As String Friend ReadOnly Property mgrBackup_BackupComplete() As String
Get Get
@@ -3782,7 +4115,16 @@ Namespace My.Resources
End Property End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to [PARAM] files (*.[PARAM])|*.[PARAM]. ''' Looks up a localized string similar to An error has occured writing the text file.[BR][BR][PARAM].
'''</summary>
Friend ReadOnly Property mgrCommon_ErrorWritingTextFile() As String
Get
Return ResourceManager.GetString("mgrCommon_ErrorWritingTextFile", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to [PARAM] files (*.[PARAM])|*.[PARAM]|All files (*.*)|*.*.
'''</summary> '''</summary>
Friend ReadOnly Property mgrCommon_FilesFilter() As String Friend ReadOnly Property mgrCommon_FilesFilter() As String
Get Get
@@ -3953,7 +4295,7 @@ Namespace My.Resources
End Property End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to [PARAM] backup restored. ''' Looks up a localized string similar to [PARAM] backup restored..
'''</summary> '''</summary>
Friend ReadOnly Property mgrRestore_ActionComplete() As String Friend ReadOnly Property mgrRestore_ActionComplete() As String
Get Get
@@ -3962,7 +4304,7 @@ Namespace My.Resources
End Property End Property
'''<summary> '''<summary>
''' Looks up a localized string similar to [PARAM] restore failed. ''' Looks up a localized string similar to [PARAM] restore failed..
'''</summary> '''</summary>
Friend ReadOnly Property mgrRestore_ActionFailed() As String Friend ReadOnly Property mgrRestore_ActionFailed() As String
Get Get
+135 -21
View File
@@ -140,7 +140,7 @@
<value>This will rebuild all databases and shrink them to an optimal size.[BR]This should only be used if your gbm.s3db files are becoming very large.[BR][BR]Do you wish to continue?</value> <value>This will rebuild all databases and shrink them to an optimal size.[BR]This should only be used if your gbm.s3db files are becoming very large.[BR][BR]Do you wish to continue?</value>
</data> </data>
<data name="App_Copyright" xml:space="preserve"> <data name="App_Copyright" xml:space="preserve">
<value>2015 Michael J. Seiferling</value> <value>[PARAM] Michael J. Seiferling</value>
</data> </data>
<data name="frmMain_Exit" xml:space="preserve"> <data name="frmMain_Exit" xml:space="preserve">
<value>Are you sure you want to exit? Your games will no longer be monitored.</value> <value>Are you sure you want to exit? Your games will no longer be monitored.</value>
@@ -194,7 +194,7 @@
<value>[PARAM] is a 64-bit game, GBM cannot detect the required information to save your backup.</value> <value>[PARAM] is a 64-bit game, GBM cannot detect the required information to save your backup.</value>
</data> </data>
<data name="frmMain_Error7zip" xml:space="preserve"> <data name="frmMain_Error7zip" xml:space="preserve">
<value>7-Zip was not found in the Game Backup Monitor utilities folder. The application cannot continue.</value> <value>7-Zip was not found. The application cannot continue.</value>
</data> </data>
<data name="frmMain_ErrorAdminBackup" xml:space="preserve"> <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] is running as Administrator and GBM is not, GBM cannot detect the required information to save your backup.</value>
@@ -772,12 +772,6 @@
<data name="frmAddWizard_ItemsSelectedNone" xml:space="preserve"> <data name="frmAddWizard_ItemsSelectedNone" xml:space="preserve">
<value>0 item(s) selected</value> <value>0 item(s) selected</value>
</data> </data>
<data name="frmAddWizard_lblDrag1" xml:space="preserve">
<value>Drag a shortcut here to complete this step.</value>
</data>
<data name="frmAddWizard_lblDrag2" xml:space="preserve">
<value>Drag a shortcut here to complete this step.</value>
</data>
<data name="frmAddWizard_lblExcludePath" xml:space="preserve"> <data name="frmAddWizard_lblExcludePath" xml:space="preserve">
<value>Save Path</value> <value>Save Path</value>
</data> </data>
@@ -791,7 +785,7 @@
<value>Saved Game Folder:</value> <value>Saved Game Folder:</value>
</data> </data>
<data name="frmAddWizard_lblStep1Instructions" xml:space="preserve"> <data name="frmAddWizard_lblStep1Instructions" xml:space="preserve">
<value>The name will be automatically filtered for length and invalid characters. </value> <value>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.</value>
</data> </data>
<data name="frmAddWizard_lblStep1Intro" xml:space="preserve"> <data name="frmAddWizard_lblStep1Intro" xml:space="preserve">
<value>Enter the name of the game to monitor:</value> <value>Enter the name of the game to monitor:</value>
@@ -800,7 +794,7 @@
<value>Game Name</value> <value>Game Name</value>
</data> </data>
<data name="frmAddWizard_lblStep2Instructions" xml:space="preserve"> <data name="frmAddWizard_lblStep2Instructions" xml:space="preserve">
<value>Some games use launchers. Do not monitor launchers, be sure to choose the game's actual exe file.</value> <value>Some games use launchers. Do not monitor launchers, be sure to choose the game's actual exe file. You may drag and drop a shortcut here to complete this step, only Windows shortcuts are currently supported.</value>
</data> </data>
<data name="frmAddWizard_lblStep2Intro" xml:space="preserve"> <data name="frmAddWizard_lblStep2Intro" xml:space="preserve">
<value>Choose the game's executable file or shortcut:</value> <value>Choose the game's executable file or shortcut:</value>
@@ -871,11 +865,11 @@
<data name="frmAdvancedImport_FormName" xml:space="preserve"> <data name="frmAdvancedImport_FormName" xml:space="preserve">
<value>Import Game Configurations</value> <value>Import Game Configurations</value>
</data> </data>
<data name="frmAdvancedImport_NewConfigs" xml:space="preserve"> <data name="frmAdvancedImport_Configs" xml:space="preserve">
<value>[PARAM] new configurations available.</value> <value>Configurations ([PARAM])</value>
</data> </data>
<data name="frmAdvancedImport_Selected" xml:space="preserve"> <data name="frmAdvancedImport_Selected" xml:space="preserve">
<value>[PARAM] Selected</value> <value>Selected ([PARAM])</value>
</data> </data>
<data name="frmChooseGame_btnCancel" xml:space="preserve"> <data name="frmChooseGame_btnCancel" xml:space="preserve">
<value>&amp;Cancel</value> <value>&amp;Cancel</value>
@@ -896,7 +890,7 @@
<value>Search</value> <value>Search</value>
</data> </data>
<data name="frmFileFolderSearch_SwitchDrives" xml:space="preserve"> <data name="frmFileFolderSearch_SwitchDrives" xml:space="preserve">
<value>The location was not found on the [PARAM] drive. Do you wish to search the [PARAM] drive?</value> <value>Do you wish to search the [PARAM] drive?</value>
</data> </data>
<data name="frmFilter_btnAdd" xml:space="preserve"> <data name="frmFilter_btnAdd" xml:space="preserve">
<value>&gt;</value> <value>&gt;</value>
@@ -1133,7 +1127,7 @@
<value>Paths</value> <value>Paths</value>
</data> </data>
<data name="frmSettings_lblBackupFolder" xml:space="preserve"> <data name="frmSettings_lblBackupFolder" xml:space="preserve">
<value>Backup Folder</value> <value>Backup Folder:</value>
</data> </data>
<data name="frmSettings_lblMinutes" xml:space="preserve"> <data name="frmSettings_lblMinutes" xml:space="preserve">
<value>minutes</value> <value>minutes</value>
@@ -1307,13 +1301,13 @@
<value>Do you wish to manually set the game path? (Path will be saved)</value> <value>Do you wish to manually set the game path? (Path will be saved)</value>
</data> </data>
<data name="mgrBackup_ActionComplete" xml:space="preserve"> <data name="mgrBackup_ActionComplete" xml:space="preserve">
<value>[PARAM] backup completed</value> <value>[PARAM] backup completed.</value>
</data> </data>
<data name="mgrBackup_ActionFailed" xml:space="preserve"> <data name="mgrBackup_ActionFailed" xml:space="preserve">
<value>[PARAM] backup failed</value> <value>[PARAM] backup failed.</value>
</data> </data>
<data name="mgrBackup_BackupComplete" xml:space="preserve"> <data name="mgrBackup_BackupComplete" xml:space="preserve">
<value>[PARAM] backup completed.</value> <value>[PARAM] backup ([PARAM]) completed. </value>
</data> </data>
<data name="mgrBackup_BackupInProgress" xml:space="preserve"> <data name="mgrBackup_BackupInProgress" xml:space="preserve">
<value>Backup of [PARAM] in progress...</value> <value>Backup of [PARAM] in progress...</value>
@@ -1355,7 +1349,7 @@
<value>Generating SHA-256 hash for [PARAM] backup file.</value> <value>Generating SHA-256 hash for [PARAM] backup file.</value>
</data> </data>
<data name="mgrCommon_FilesFilter" xml:space="preserve"> <data name="mgrCommon_FilesFilter" xml:space="preserve">
<value>[PARAM] files (*.[PARAM])|*.[PARAM]</value> <value>[PARAM] files (*.[PARAM])|*.[PARAM]|All files (*.*)|*.*</value>
</data> </data>
<data name="mgrCommon_No" xml:space="preserve"> <data name="mgrCommon_No" xml:space="preserve">
<value>No</value> <value>No</value>
@@ -1412,10 +1406,10 @@
<value>[PARAM] was located in the following folder:[BR][BR][PARAM][BR][BR]Is this correct?</value> <value>[PARAM] was located in the following folder:[BR][BR][PARAM][BR][BR]Is this correct?</value>
</data> </data>
<data name="mgrRestore_ActionComplete" xml:space="preserve"> <data name="mgrRestore_ActionComplete" xml:space="preserve">
<value>[PARAM] backup restored</value> <value>[PARAM] backup restored.</value>
</data> </data>
<data name="mgrRestore_ActionFailed" xml:space="preserve"> <data name="mgrRestore_ActionFailed" xml:space="preserve">
<value>[PARAM] restore failed</value> <value>[PARAM] restore failed.</value>
</data> </data>
<data name="mgrRestore_ConfirmCreatePath" xml:space="preserve"> <data name="mgrRestore_ConfirmCreatePath" xml:space="preserve">
<value>The restore path [PARAM] does not exist.[BR][BR]Do you want to create the folder and continue?</value> <value>The restore path [PARAM] does not exist.[BR][BR]Do you want to create the folder and continue?</value>
@@ -1483,4 +1477,124 @@
<data name="mgrXML_ErrorImportFailure" xml:space="preserve"> <data name="mgrXML_ErrorImportFailure" xml:space="preserve">
<value>The XML file cannot be read, it may be an invalid format or corrupted.[BR][BR][PARAM]</value> <value>The XML file cannot be read, it may be an invalid format or corrupted.[BR][BR][PARAM]</value>
</data> </data>
<data name="frmGameManager_DefaultExportFileName" xml:space="preserve">
<value>Game Backup Monitor Export</value>
</data>
<data name="frmMain_ChooseLogFile" xml:space="preserve">
<value>Choose a location for the log file</value>
</data>
<data name="frmMain_ConfirmLogClear" xml:space="preserve">
<value>Are you sure you want to clear the log?</value>
</data>
<data name="frmMain_DefaultLogFileName" xml:space="preserve">
<value>Game Backup Monitor Log</value>
</data>
<data name="frmMain_gMonLogClear" xml:space="preserve">
<value>&amp;Clear</value>
</data>
<data name="frmMain_gMonLogSave" xml:space="preserve">
<value>&amp;Save</value>
</data>
<data name="frmMain_gMonToolsLog" xml:space="preserve">
<value>&amp;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>
</data>
<data name="frmMain_Text" xml:space="preserve">
<value>Text</value>
</data>
<data name="mgrCommon_ErrorWritingTextFile" xml:space="preserve">
<value>An error has occured writing the text file.[BR][BR][PARAM]</value>
</data>
<data name="frmSettings_cboCompression_Fast" xml:space="preserve">
<value>Fast</value>
</data>
<data name="frmSettings_cboCompression_Fastest" xml:space="preserve">
<value>Fastest</value>
</data>
<data name="frmSettings_cboCompression_Maximum" xml:space="preserve">
<value>Maximum</value>
</data>
<data name="frmSettings_cboCompression_None" xml:space="preserve">
<value>None</value>
</data>
<data name="frmSettings_cboCompression_Normal" xml:space="preserve">
<value>Normal</value>
</data>
<data name="frmSettings_cboCompression_Ultra" xml:space="preserve">
<value>Ultra</value>
</data>
<data name="frmSettings_grp7z" xml:space="preserve">
<value>7z Options</value>
</data>
<data name="frmSettings_lblCompression" xml:space="preserve">
<value>Compression:</value>
</data>
<data name="frmMain_CommandFail" xml:space="preserve">
<value>The command has failed.</value>
</data>
<data name="frmMain_CommandSucess" xml:space="preserve">
<value>The command was executed successfully.</value>
</data>
<data name="frmMain_DeveloperConsole" xml:space="preserve">
<value>Developer Console</value>
</data>
<data name="frmMain_EnterCommand" xml:space="preserve">
<value>Enter Command</value>
</data>
<data name="frmMain_ErrorCommandBadParam" xml:space="preserve">
<value>Bad parameter ([PARAM]) for command [PARAM].</value>
</data>
<data name="frmMain_ErrorCommandInvalid" xml:space="preserve">
<value>The command [PARAM] was not recognized.</value>
</data>
<data name="frmMain_ErrorMissingParams" xml:space="preserve">
<value>The command [PARAM] requires more parameters.</value>
</data>
<data name="frmMain_ErrorInitFailure" xml:space="preserve">
<value>An unexpected error occured while initializing GBM.[BR][BR][PARAM][BR][BR]Do you wish to continue anyway? (Not Recommended)</value>
</data>
<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>
<data name="frmAdvancedImport_lblFilter" xml:space="preserve">
<value>Filter:</value>
</data>
<data name="frmAdvancedImport_ColumnName" xml:space="preserve">
<value>Name</value>
</data>
<data name="frmAdvancedImport_ColumnProcess" xml:space="preserve">
<value>Monitored Process</value>
</data>
<data name="frmAdvancedImport_ColumnTags" xml:space="preserve">
<value>Tags</value>
</data>
<data name="frmAdvancedImport_Filtered" xml:space="preserve">
<value>[Filtered]</value>
</data>
<data name="frmAdvancedImport_chkSelectAll" xml:space="preserve">
<value>Select All</value>
</data>
<data name="frmMain_AtTime" xml:space="preserve">
<value>at [PARAM].</value>
</data>
<data name="frmFileFolderSearch_btnOk" xml:space="preserve">
<value>&amp;OK</value>
</data>
<data name="frmFileFolderSearch_lblResults" xml:space="preserve">
<value>Search Results</value>
</data>
<data name="frmFileFolderSearch_SearchComplete" xml:space="preserve">
<value>Search Complete!</value>
</data>
<data name="frmFileFolderSearch_SearchCancel" xml:space="preserve">
<value>Search Aborted!</value>
</data>
</root> </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.
Binary file not shown.
Binary file not shown.
+37 -24
View File
@@ -1,36 +1,49 @@
Game Backup Monitor v0.95 Readme Game Backup Monitor v0.96 Readme
http://mikemaximus.github.io/gbm-web/ http://mikemaximus.github.io/gbm-web/
gamebackupmonitor@gmail.com gamebackupmonitor@gmail.com
January 1, 2016 March 24, 2016
Disclaimer: Disclaimer:
This is beta release software. You may still encounter some bugs. This is beta release software. You may still encounter some bugs.
Important Upgrade Notice: New in 0.96
- v0.95 changes how DOSBox games are detected and will break DOSBox configurations from prior versions. Sorry for the inconvenience. For more information regarding Linux support read the FAQ at http://mikemaximus.github.io/gbm-web/linux.html
- To repair a configuration, you'll need to delete the DOS executable part of the process field and make sure the case matches the DOSBox executable being used by the game.
- For example, Capitalism Plus using a process of "dosbox:CAPPLUS" and DOSBox.exe would become just "DOSBox".
- You can use the new "Custom" filter to easily find and update all your DOSBox games in the Game Manager.
- Due to this change GBM can only detect DOS games that are using their own copy of DOSBox in a unique location. Most users will be unaffected, classic games sold online are already packaged in this format.
- Official configurations for DOSBox games are updated for this change.
New in 0.95 - (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.
- Fixed a regression that caused non-critical fields (Game Path, Company, Version, Icon, Enabled, Monitor Only) to be wiped or reset on sync. - (All) Overhauled the Import screen for better usability. Added game tags, simple filtering, sorting and general fixes.
- The "Check for new backups" feature has been renamed and redesigned. Instead of an annoying pop-up, it now shows a simple notification in the main menu or tray menu. - (Linux) Fixed some bad code causing the "Official Import" connection to time out when making multiple connections in the same session.
- Added the ability to trigger backups only after a certain session time has elapsed (Global Setting), this setting will be disabled by default. - (Linux) Fixed cross-platform issues with opening backup files and restore locations from the Game Manager.
- You can now cancel out of the "Choose Game" window when GBM detects multiple games may be running. - (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.
- Added the ability to filter by game information such as name, process and company. - (Linux) Fixed cross-platform issues with automatic file/folder searching. It's now enabled on Linux.
- Many UI improvements and fixes with filtering. The "Tag" filter is now called "Custom" filter, due to the new options available. - (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.
- Added a new, more intuitive way of including and excluding items in a backup. See the Game Manager section of the GBM manual for details. - (Linux) Added Linux support via Mono!
- Updated the "Add Game Wizard" to use the new include / exclude and tagging features. - (All) Replaced System.Data.SQLite with the Mono.Data.Sqlite for cross-platform support.
- Removed the special handling of DOSBox games for future proofing, DOSBox games will now be handled like all other games. - (Windows) Updated GBM's version of 7-Zip to 15.14 (2015-12-31)
- Moved the import and export game list features from the Tools menu into the Game Manager. - (All) Added the ability to set the 7-Zip compression level on the Settings screen.
- Made some visual improvements to the main app window. - (Windows) GBM now deletes all user files to the Windows recycle bin by default.
- Made changes that will allow GBM to be easily translated to other languages. - (All) Added the ability to clear and save the session log from the Tools menu.
- Many minor UI improvements and bug fixes. - (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.
The entire version history of GBM releases is available at http://mikemaximus.github.io/gbm-web/versionhistory.html The entire version history of GBM releases is available at http://mikemaximus.github.io/gbm-web/versionhistory.html
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!
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+3 -2
View File
@@ -2,12 +2,13 @@
![Screenshot] (http://mikemaximus.github.io/gbm-web/images/manual/manual_01.jpg) ![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 Windows game or application. 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 /> **License**: GNU General Public License version 3.0 (GPLv3)<br />
**Language**: English Only<br /> **Language**: English Only<br />
**Platform**: Windows Only (.NET 4) **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 FAQ] (http://mikemaximus.github.io/gbm-web/faq.html) <br />
[Game Backup Monitor Manual] (http://mikemaximus.github.io/gbm-web/manual.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 /> [List of Preconfigured Games] (http://mikemaximus.github.io/gbm-web/GBM_Official.xml) <br /> <br />