Compare commits
51 Commits
v0.95-beta
...
v0.96
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
970b1f4e58 | ||
|
|
911b3bdfc4 | ||
|
|
ce759fe87f | ||
|
|
d1ca0a150e | ||
|
|
b149a19a8b | ||
|
|
b458b89b46 | ||
|
|
83df2edc90 | ||
|
|
31b72488b2 | ||
|
|
3dbf5d0e62 | ||
|
|
2eb6693275 | ||
|
|
d1e292d4bf | ||
|
|
640690514b | ||
|
|
aade2dcee9 | ||
|
|
76ffc79a6b | ||
|
|
a6341ffa76 | ||
|
|
09c7bf8f05 | ||
|
|
039f47fccd | ||
|
|
164bb4255e | ||
|
|
df5e8f2d2a | ||
|
|
7766a07cf3 | ||
|
|
e71b2f4064 | ||
|
|
be2335b61e | ||
|
|
ca9fef33ea | ||
|
|
93c9b1a5ee | ||
|
|
730305b694 | ||
|
|
8880373f34 | ||
|
|
321c72b6bf | ||
|
|
163b6cd3a0 | ||
|
|
44c2d98f25 | ||
|
|
f050061b76 | ||
|
|
0cafd00bf3 | ||
|
|
feb8a9d0b2 | ||
|
|
d46360b244 | ||
|
|
ca8798a460 | ||
|
|
da16a89baa | ||
|
|
b03545d86f | ||
|
|
430e1171fb | ||
|
|
e531ec5701 | ||
|
|
7a7fa65ce6 | ||
|
|
4c7d36baef | ||
|
|
de7a993abe | ||
|
|
ec47697434 | ||
|
|
a7b97912f2 | ||
|
|
8222f518f6 | ||
|
|
0a564ca510 | ||
|
|
85d9cc0c5f | ||
|
|
abbc6a4a70 | ||
|
|
5947b7d0b2 | ||
|
|
2fb18c5f19 | ||
|
|
47f4b0774d | ||
|
|
70be04b750 |
@@ -41,7 +41,11 @@
|
||||
|
||||
Property FileName As String
|
||||
Get
|
||||
Return sFileName
|
||||
If mgrCommon.IsUnix Then
|
||||
Return sFileName.Replace("\", "/")
|
||||
Else
|
||||
Return sFileName.Replace("/", "\")
|
||||
End If
|
||||
End Get
|
||||
Set(value As String)
|
||||
sFileName = value
|
||||
|
||||
Generated
+9
-31
@@ -22,17 +22,16 @@ Partial Class frmAddWizard
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAddWizard))
|
||||
Me.tabWizard = New System.Windows.Forms.TabControl()
|
||||
Me.tbPage1 = New System.Windows.Forms.TabPage()
|
||||
Me.lblStep1Title = New System.Windows.Forms.Label()
|
||||
Me.lblDrag1 = New System.Windows.Forms.Label()
|
||||
Me.lblStep1Instructions = New System.Windows.Forms.Label()
|
||||
Me.txtName = New System.Windows.Forms.TextBox()
|
||||
Me.lblStep1Intro = New System.Windows.Forms.Label()
|
||||
Me.tbPage2 = New System.Windows.Forms.TabPage()
|
||||
Me.lblStep2Title = 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.txtProcessPath = New System.Windows.Forms.TextBox()
|
||||
Me.lblStep2Intro = New System.Windows.Forms.Label()
|
||||
@@ -95,7 +94,6 @@ Partial Class frmAddWizard
|
||||
'
|
||||
Me.tbPage1.BackColor = System.Drawing.SystemColors.Control
|
||||
Me.tbPage1.Controls.Add(Me.lblStep1Title)
|
||||
Me.tbPage1.Controls.Add(Me.lblDrag1)
|
||||
Me.tbPage1.Controls.Add(Me.lblStep1Instructions)
|
||||
Me.tbPage1.Controls.Add(Me.txtName)
|
||||
Me.tbPage1.Controls.Add(Me.lblStep1Intro)
|
||||
@@ -116,23 +114,16 @@ Partial Class frmAddWizard
|
||||
Me.lblStep1Title.TabIndex = 8
|
||||
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
|
||||
'
|
||||
Me.lblStep1Instructions.AllowDrop = True
|
||||
Me.lblStep1Instructions.Location = New System.Drawing.Point(14, 93)
|
||||
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.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
|
||||
'
|
||||
@@ -156,7 +147,6 @@ Partial Class frmAddWizard
|
||||
Me.tbPage2.BackColor = System.Drawing.SystemColors.Control
|
||||
Me.tbPage2.Controls.Add(Me.lblStep2Title)
|
||||
Me.tbPage2.Controls.Add(Me.lblStep2Instructions)
|
||||
Me.tbPage2.Controls.Add(Me.lblDrag2)
|
||||
Me.tbPage2.Controls.Add(Me.btnProcessBrowse)
|
||||
Me.tbPage2.Controls.Add(Me.txtProcessPath)
|
||||
Me.tbPage2.Controls.Add(Me.lblStep2Intro)
|
||||
@@ -179,22 +169,12 @@ Partial Class frmAddWizard
|
||||
'
|
||||
'lblStep2Instructions
|
||||
'
|
||||
Me.lblStep2Instructions.AllowDrop = True
|
||||
Me.lblStep2Instructions.Location = New System.Drawing.Point(14, 93)
|
||||
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.Text = "Some games use launchers. Do not monitor launchers, be sure to choose the game'" & _
|
||||
"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."
|
||||
Me.lblStep2Instructions.Text = resources.GetString("lblStep2Instructions.Text")
|
||||
'
|
||||
'btnProcessBrowse
|
||||
'
|
||||
@@ -578,12 +558,10 @@ Partial Class frmAddWizard
|
||||
Friend WithEvents tbPage3a As System.Windows.Forms.TabPage
|
||||
Friend WithEvents tbPage4 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 txtName As System.Windows.Forms.TextBox
|
||||
Friend WithEvents lblStep1Intro 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 txtProcessPath As System.Windows.Forms.TextBox
|
||||
Friend WithEvents lblStep2Intro As System.Windows.Forms.Label
|
||||
|
||||
@@ -117,4 +117,7 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</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>
|
||||
@@ -36,12 +36,10 @@ Public Class frmAddWizard
|
||||
btnNext.Text = frmAddWizard_btnNext
|
||||
btnBack.Text = frmAddWizard_btnBack
|
||||
lblStep1Title.Text = frmAddWizard_lblStep1Title
|
||||
lblDrag1.Text = frmAddWizard_lblDrag1
|
||||
lblStep1Instructions.Text = frmAddWizard_lblStep1Instructions
|
||||
lblStep1Intro.Text = frmAddWizard_lblStep1Intro
|
||||
lblStep2Title.Text = frmAddWizard_lblStep2Title
|
||||
lblStep2Instructions.Text = frmAddWizard_lblStep2Instructions
|
||||
lblDrag2.Text = frmAddWizard_lblDrag2
|
||||
btnProcessBrowse.Text = frmAddWizard_btnProcessBrowse
|
||||
lblStep2Intro.Text = frmAddWizard_lblStep2Intro
|
||||
lblStep3Title.Text = frmAddWizard_lblStep3Title
|
||||
@@ -178,7 +176,7 @@ Public Class frmAddWizard
|
||||
Return False
|
||||
End If
|
||||
|
||||
If Path.GetExtension(strPath.ToLower) <> ".exe" Then
|
||||
If Path.GetExtension(strPath.ToLower) <> ".exe" And Not mgrCommon.IsUnix Then
|
||||
sErrorMessage = frmAddWizard_ErrorNotAProcess
|
||||
txtProcessPath.Focus()
|
||||
Return False
|
||||
@@ -459,13 +457,13 @@ Public Class frmAddWizard
|
||||
SetForm()
|
||||
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
|
||||
e.Effect = DragDropEffects.Copy
|
||||
End If
|
||||
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)
|
||||
For Each sPath In oFiles
|
||||
ReadShortcut(sPath)
|
||||
|
||||
Generated
+47
-23
@@ -22,47 +22,40 @@ Partial Class frmAdvancedImport
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.lstGames = New System.Windows.Forms.CheckedListBox()
|
||||
Me.btnImport = New System.Windows.Forms.Button()
|
||||
Me.chkSelectAll = New System.Windows.Forms.CheckBox()
|
||||
Me.lblGames = New System.Windows.Forms.Label()
|
||||
Me.lblSelected = New System.Windows.Forms.Label()
|
||||
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()
|
||||
'
|
||||
'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
|
||||
'
|
||||
Me.btnImport.Location = New System.Drawing.Point(191, 370)
|
||||
Me.btnImport.Location = New System.Drawing.Point(416, 375)
|
||||
Me.btnImport.Name = "btnImport"
|
||||
Me.btnImport.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnImport.TabIndex = 2
|
||||
Me.btnImport.TabIndex = 3
|
||||
Me.btnImport.Text = "&Import"
|
||||
Me.btnImport.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkSelectAll
|
||||
'
|
||||
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.Size = New System.Drawing.Size(15, 14)
|
||||
Me.chkSelectAll.Size = New System.Drawing.Size(70, 17)
|
||||
Me.chkSelectAll.TabIndex = 0
|
||||
Me.chkSelectAll.Text = "Select All"
|
||||
Me.chkSelectAll.UseVisualStyleBackColor = True
|
||||
'
|
||||
'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.Size = New System.Drawing.Size(335, 14)
|
||||
Me.lblGames.Size = New System.Drawing.Size(560, 14)
|
||||
Me.lblGames.TabIndex = 0
|
||||
Me.lblGames.Text = "Games"
|
||||
Me.lblGames.TextAlign = System.Drawing.ContentAlignment.TopCenter
|
||||
@@ -70,7 +63,7 @@ Partial Class frmAdvancedImport
|
||||
'lblSelected
|
||||
'
|
||||
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.Size = New System.Drawing.Size(77, 13)
|
||||
Me.lblSelected.TabIndex = 0
|
||||
@@ -78,23 +71,52 @@ Partial Class frmAdvancedImport
|
||||
'
|
||||
'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.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnCancel.TabIndex = 3
|
||||
Me.btnCancel.TabIndex = 4
|
||||
Me.btnCancel.Text = "&Cancel"
|
||||
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
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
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.lblSelected)
|
||||
Me.Controls.Add(Me.chkSelectAll)
|
||||
Me.Controls.Add(Me.btnImport)
|
||||
Me.Controls.Add(Me.lstGames)
|
||||
Me.Controls.Add(Me.lblGames)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||
Me.MaximizeBox = False
|
||||
@@ -107,10 +129,12 @@ Partial Class frmAdvancedImport
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents lstGames As System.Windows.Forms.CheckedListBox
|
||||
Friend WithEvents btnImport As System.Windows.Forms.Button
|
||||
Friend WithEvents chkSelectAll As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents lblGames As System.Windows.Forms.Label
|
||||
Friend WithEvents lblSelected As System.Windows.Forms.Label
|
||||
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
|
||||
|
||||
+138
-24
@@ -3,8 +3,11 @@
|
||||
Public Class frmAdvancedImport
|
||||
|
||||
Private hshImportData As Hashtable
|
||||
Private hshFinalData As New Hashtable
|
||||
Private bSelectAll As Boolean = False
|
||||
Private bIsLoading As Boolean = False
|
||||
Private iCurrentSort As Integer = 0
|
||||
Private WithEvents tmFilterTimer As Timer
|
||||
|
||||
Public Property ImportData As Hashtable
|
||||
Set(value As Hashtable)
|
||||
@@ -15,26 +18,103 @@ Public Class frmAdvancedImport
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property FinalData As Hashtable
|
||||
Get
|
||||
Return hshFinalData
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Sub SelectToggle()
|
||||
Cursor.Current = Cursors.WaitCursor
|
||||
lstGames.BeginUpdate()
|
||||
bSelectAll = Not bSelectAll
|
||||
For i As Integer = 0 To lstGames.Items.Count - 1
|
||||
lstGames.SetItemChecked(i, bSelectAll)
|
||||
lstGames.Items(i).Checked = bSelectAll
|
||||
Next
|
||||
lstGames.EndUpdate()
|
||||
Cursor.Current = Cursors.Default
|
||||
UpdateSelected()
|
||||
End Sub
|
||||
|
||||
Private Sub LoadData()
|
||||
Dim oApp As clsGame
|
||||
Dim oData As KeyValuePair(Of String, String)
|
||||
Private Sub SaveChecked(ByVal oItem As ListViewItem)
|
||||
If oItem.Checked Then
|
||||
FinalData.Add(oItem.Tag, ImportData(oItem.Tag))
|
||||
Else
|
||||
FinalData.Remove(oItem.Tag)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
lstGames.ValueMember = "Key"
|
||||
lstGames.DisplayMember = "Value"
|
||||
Private Sub LoadData(Optional ByVal sFilter As String = "")
|
||||
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
|
||||
bAddItem = False
|
||||
oApp = DirectCast(de.Value, clsGame)
|
||||
oData = New KeyValuePair(Of String, String)(oApp.CompoundKey, oApp.Name & " (" & oApp.TrueProcess & ")")
|
||||
lstGames.Items.Add(oData)
|
||||
sTags = String.Empty
|
||||
oApp.ImportTags.Sort(AddressOf mgrCommon.CompareImportTagsByName)
|
||||
For Each oTag As Tag In oApp.ImportTags
|
||||
sTags &= oTag.Name & ", "
|
||||
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
|
||||
|
||||
Private Sub SetForm()
|
||||
@@ -42,26 +122,21 @@ Public Class frmAdvancedImport
|
||||
Me.Text = frmAdvancedImport_FormName
|
||||
|
||||
'Set Form Text
|
||||
lblFilter.Text = frmAdvancedImport_lblFilter
|
||||
btnCancel.Text = frmAdvancedImport_btnCancel
|
||||
btnImport.Text = frmAdvancedImport_btnImport
|
||||
chkSelectAll.Text = frmAdvancedImport_chkSelectAll
|
||||
|
||||
chkSelectAll.Checked = True
|
||||
lblGames.Text = mgrCommon.FormatString(frmAdvancedImport_NewConfigs, ImportData.Count)
|
||||
End Sub
|
||||
|
||||
Private Sub BuildList()
|
||||
Dim oData As KeyValuePair(Of String, String)
|
||||
|
||||
For i As Integer = 0 To lstGames.Items.Count - 1
|
||||
If Not lstGames.GetItemChecked(i) Then
|
||||
oData = lstGames.Items(i)
|
||||
ImportData.Remove(oData.Key)
|
||||
End If
|
||||
Next
|
||||
'Init Filter Timer
|
||||
tmFilterTimer = New Timer()
|
||||
tmFilterTimer.Interval = 1000
|
||||
tmFilterTimer.Enabled = False
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateSelected()
|
||||
lblSelected.Text = mgrCommon.FormatString(frmAdvancedImport_Selected, lstGames.CheckedItems.Count)
|
||||
lblSelected.Text = mgrCommon.FormatString(frmAdvancedImport_Selected, FinalData.Count)
|
||||
End Sub
|
||||
|
||||
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()
|
||||
End Sub
|
||||
|
||||
Private Sub lstGames_SelectedValueChanged(sender As Object, e As EventArgs) Handles lstGames.SelectedValueChanged
|
||||
If Not bIsLoading Then UpdateSelected()
|
||||
Private Sub lstGames_ItemChecked(sender As Object, e As ItemCheckedEventArgs) Handles lstGames.ItemChecked
|
||||
SaveChecked(e.Item)
|
||||
If Not bIsLoading Then
|
||||
UpdateSelected()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click
|
||||
@@ -85,8 +163,44 @@ Public Class frmAdvancedImport
|
||||
End Sub
|
||||
|
||||
Private Sub btnImport_Click(sender As Object, e As EventArgs) Handles btnImport.Click
|
||||
BuildList()
|
||||
If ImportData.Count > 0 Then Me.DialogResult = Windows.Forms.DialogResult.OK
|
||||
If FinalData.Count > 0 Then Me.DialogResult = Windows.Forms.DialogResult.OK
|
||||
Me.Close()
|
||||
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
|
||||
@@ -65,11 +65,6 @@ Public Class frmChooseGame
|
||||
SetForm()
|
||||
FillComboBox()
|
||||
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
|
||||
|
||||
Private Sub btnChoose_Click(sender As System.Object, e As System.EventArgs) Handles btnChoose.Click
|
||||
|
||||
+52
-16
@@ -22,35 +22,30 @@ Partial Class frmFileFolderSearch
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.pgbProgress = New System.Windows.Forms.ProgressBar()
|
||||
Me.txtCurrentLocation = New System.Windows.Forms.TextBox()
|
||||
Me.btnCancel = New System.Windows.Forms.Button()
|
||||
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()
|
||||
'
|
||||
'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
|
||||
'
|
||||
Me.txtCurrentLocation.Location = New System.Drawing.Point(12, 43)
|
||||
Me.txtCurrentLocation.Location = New System.Drawing.Point(102, 13)
|
||||
Me.txtCurrentLocation.Name = "txtCurrentLocation"
|
||||
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.TabStop = False
|
||||
'
|
||||
'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.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnCancel.TabIndex = 0
|
||||
Me.btnCancel.TabIndex = 4
|
||||
Me.btnCancel.Text = "&Cancel"
|
||||
Me.btnCancel.UseVisualStyleBackColor = True
|
||||
'
|
||||
@@ -58,14 +53,52 @@ Partial Class frmFileFolderSearch
|
||||
'
|
||||
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
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
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.txtCurrentLocation)
|
||||
Me.Controls.Add(Me.pgbProgress)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||
Me.MaximizeBox = False
|
||||
Me.MinimizeBox = False
|
||||
@@ -77,8 +110,11 @@ Partial Class frmFileFolderSearch
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents pgbProgress As System.Windows.Forms.ProgressBar
|
||||
Friend WithEvents txtCurrentLocation As System.Windows.Forms.TextBox
|
||||
Friend WithEvents btnCancel As System.Windows.Forms.Button
|
||||
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
|
||||
|
||||
@@ -3,14 +3,34 @@ Imports System.IO
|
||||
|
||||
Public Class frmFileFolderSearch
|
||||
Private sSearchItem As String
|
||||
Private sGameName As String = String.Empty
|
||||
Private bIsLoading As Boolean
|
||||
Private bIsFolder As Boolean
|
||||
Private sFoundItem As String
|
||||
Private oDrives As List(Of DriveInfo)
|
||||
Private iCurrentDrive As Integer
|
||||
Private oSearchDrive As DirectoryInfo
|
||||
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 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
|
||||
Get
|
||||
@@ -48,19 +68,38 @@ Public Class frmFileFolderSearch
|
||||
End If
|
||||
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
|
||||
Dim sSubSearch As String = String.Empty
|
||||
Dim sFoundItem As String = String.Empty
|
||||
|
||||
If bwSearch.CancellationPending Then
|
||||
Return "Cancel"
|
||||
End If
|
||||
|
||||
'Ignore Symlinks
|
||||
If (dir.Attributes And FileAttributes.ReparsePoint) = FileAttributes.ReparsePoint Then
|
||||
Return String.Empty
|
||||
End If
|
||||
|
||||
UpdateInfo(dir.FullName)
|
||||
|
||||
Try
|
||||
'Search Current Directory
|
||||
If dir.GetDirectories(sDirectoryName).Length > 0 Then
|
||||
Return dir.FullName & "\" & sDirectoryName
|
||||
sFoundItem = dir.FullName & Path.DirectorySeparatorChar & sDirectoryName
|
||||
UpdateResults(sFoundItem)
|
||||
End If
|
||||
|
||||
'Search Sub Directory
|
||||
@@ -69,7 +108,7 @@ Public Class frmFileFolderSearch
|
||||
sSubSearch = SearchDirectory(newDir, sDirectoryName)
|
||||
If sSubSearch <> String.Empty Then
|
||||
Return sSubSearch
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Catch e As System.UnauthorizedAccessException
|
||||
'Do Nothing
|
||||
@@ -82,26 +121,34 @@ Public Class frmFileFolderSearch
|
||||
|
||||
Private Function SearchFile(ByVal dir As DirectoryInfo, ByVal sFileName As String) As String
|
||||
Dim sSubSearch As String = String.Empty
|
||||
Dim sFoundItem As String = String.Empty
|
||||
|
||||
If bwSearch.CancellationPending Then
|
||||
Return "Cancel"
|
||||
End If
|
||||
|
||||
'Ignore Symlinks
|
||||
If (dir.Attributes And FileAttributes.ReparsePoint) = FileAttributes.ReparsePoint Then
|
||||
Return String.Empty
|
||||
End If
|
||||
|
||||
UpdateInfo(dir.FullName)
|
||||
|
||||
Try
|
||||
'Search Current Directory
|
||||
If dir.GetFiles(sFileName).Length > 0 Then
|
||||
Return dir.FullName & "\" & sFileName
|
||||
sFoundItem = Path.GetDirectoryName(dir.FullName & Path.DirectorySeparatorChar & sFileName)
|
||||
UpdateResults(sFoundItem)
|
||||
End If
|
||||
|
||||
'Search Sub Directory
|
||||
Dim subdirs() As DirectoryInfo = dir.GetDirectories("*")
|
||||
For Each newDir As DirectoryInfo In subdirs
|
||||
sSubSearch = SearchFile(newDir, sFileName)
|
||||
If sSubSearch <> String.Empty Then
|
||||
Return sSubSearch
|
||||
End If
|
||||
sSubSearch = SearchFile(newDir, sFileName)
|
||||
|
||||
If sSubSearch <> String.Empty Then
|
||||
Return sSubSearch
|
||||
End If
|
||||
Next
|
||||
Catch e As System.UnauthorizedAccessException
|
||||
'Do Nothing
|
||||
@@ -113,39 +160,60 @@ Public Class frmFileFolderSearch
|
||||
End Function
|
||||
|
||||
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)
|
||||
For Each oDrive As DriveInfo In My.Computer.FileSystem.Drives
|
||||
If oDrive.DriveType = IO.DriveType.Fixed Then
|
||||
oDrives.Add(oDrive)
|
||||
oComboItems.Add(New KeyValuePair(Of Integer, String)(iCount, oDrive.RootDirectory.ToString))
|
||||
iCount += 1
|
||||
End If
|
||||
Next
|
||||
cboDrive.DataSource = oComboItems
|
||||
End Sub
|
||||
|
||||
Private Sub Search(ByVal oDrive As DriveInfo)
|
||||
pgbProgress.Style = ProgressBarStyle.Marquee
|
||||
pgbProgress.MarqueeAnimationSpeed = 5
|
||||
iStopStatus = eStopStatus.FinishedDrive
|
||||
oSearchDrive = oDrive.RootDirectory
|
||||
bwSearch.RunWorkerAsync()
|
||||
iCurrentDrive += 1
|
||||
End Sub
|
||||
|
||||
Private Sub EndSearch()
|
||||
Dim oResult As MsgBoxResult
|
||||
pgbProgress.MarqueeAnimationSpeed = 0
|
||||
|
||||
If FoundItem = "Cancel" Then FoundItem = String.Empty
|
||||
|
||||
If oDrives.Count > iCurrentDrive And FoundItem = String.Empty Then
|
||||
oResult = mgrCommon.ShowMessage(frmFileFolderSearch_SwitchDrives, New String() {oSearchDrive.Root.ToString, oDrives(iCurrentDrive).RootDirectory.ToString}, MsgBoxStyle.YesNo)
|
||||
If oResult = MsgBoxResult.Yes Then
|
||||
Search(oDrives(iCurrentDrive))
|
||||
Else
|
||||
Select Case iStopStatus
|
||||
Case eStopStatus.Cancel
|
||||
SearchComplete(frmFileFolderSearch_SearchCancel)
|
||||
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
|
||||
cboDrive.SelectedIndex = cboDrive.SelectedIndex + 1
|
||||
End If
|
||||
Else
|
||||
SearchComplete(frmFileFolderSearch_SearchComplete)
|
||||
End If
|
||||
Case eStopStatus.FoundResult
|
||||
FoundItem = lstResults.SelectedItem.ToString
|
||||
bShutdown = True
|
||||
Me.Close()
|
||||
End If
|
||||
Else
|
||||
bShutdown = True
|
||||
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 Sub
|
||||
|
||||
@@ -154,13 +222,17 @@ Public Class frmFileFolderSearch
|
||||
Me.Text = frmFileFolderSearch_FormName
|
||||
|
||||
'Set Form Text
|
||||
lblResults.Text = frmFileFolderSearch_lblResults
|
||||
btnOk.Text = frmFileFolderSearch_btnOk
|
||||
btnCancel.Text = frmFileFolderSearch_btnCancel
|
||||
End Sub
|
||||
|
||||
Private Sub frmFileFolderSearch_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
bIsLoading = True
|
||||
SetForm()
|
||||
GetDrives()
|
||||
Search(oDrives(iCurrentDrive))
|
||||
bIsLoading = False
|
||||
Search(oDrives(0))
|
||||
End Sub
|
||||
|
||||
Private Sub bwSearch_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles bwSearch.DoWork
|
||||
@@ -176,11 +248,54 @@ Public Class frmFileFolderSearch
|
||||
End Sub
|
||||
|
||||
Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click
|
||||
bwSearch.CancelAsync()
|
||||
If bwSearch.IsBusy Then
|
||||
iStopStatus = eStopStatus.Cancel
|
||||
bwSearch.CancelAsync()
|
||||
Else
|
||||
bShutdown = True
|
||||
Me.Close()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub frmFileFolderSearch_FormClosing(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosing
|
||||
bwSearch.CancelAsync()
|
||||
If Not bShutdown Then e.Cancel = True
|
||||
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
|
||||
Generated
-6
@@ -99,7 +99,6 @@ Partial Class frmFilter
|
||||
'
|
||||
'optAll
|
||||
'
|
||||
Me.optAll.AutoSize = True
|
||||
Me.optAll.Location = New System.Drawing.Point(77, 19)
|
||||
Me.optAll.Name = "optAll"
|
||||
Me.optAll.Size = New System.Drawing.Size(63, 17)
|
||||
@@ -110,7 +109,6 @@ Partial Class frmFilter
|
||||
'
|
||||
'optAny
|
||||
'
|
||||
Me.optAny.AutoSize = True
|
||||
Me.optAny.Checked = True
|
||||
Me.optAny.Location = New System.Drawing.Point(6, 19)
|
||||
Me.optAny.Name = "optAny"
|
||||
@@ -213,7 +211,6 @@ Partial Class frmFilter
|
||||
'
|
||||
'optOr
|
||||
'
|
||||
Me.optOr.AutoSize = True
|
||||
Me.optOr.Location = New System.Drawing.Point(56, 19)
|
||||
Me.optOr.Name = "optOr"
|
||||
Me.optOr.Size = New System.Drawing.Size(36, 17)
|
||||
@@ -224,7 +221,6 @@ Partial Class frmFilter
|
||||
'
|
||||
'optAnd
|
||||
'
|
||||
Me.optAnd.AutoSize = True
|
||||
Me.optAnd.Checked = True
|
||||
Me.optAnd.Location = New System.Drawing.Point(6, 19)
|
||||
Me.optAnd.Name = "optAnd"
|
||||
@@ -302,11 +298,9 @@ Partial Class frmFilter
|
||||
Me.grpTagFilter.ResumeLayout(False)
|
||||
Me.grpTagFilter.PerformLayout()
|
||||
Me.grpTagOptions.ResumeLayout(False)
|
||||
Me.grpTagOptions.PerformLayout()
|
||||
Me.grpGameFilter.ResumeLayout(False)
|
||||
Me.grpGameFilter.PerformLayout()
|
||||
Me.grpGameInfoOptions.ResumeLayout(False)
|
||||
Me.grpGameInfoOptions.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
|
||||
Generated
-1
@@ -630,7 +630,6 @@ Partial Class frmGameManager
|
||||
Me.lstGames.Name = "lstGames"
|
||||
Me.lstGames.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
|
||||
Me.lstGames.Size = New System.Drawing.Size(228, 381)
|
||||
Me.lstGames.Sorted = True
|
||||
Me.lstGames.TabIndex = 1
|
||||
'
|
||||
'btnCancel
|
||||
|
||||
+122
-62
@@ -34,7 +34,7 @@ Public Class frmGameManager
|
||||
|
||||
Property BackupFolder As String
|
||||
Get
|
||||
Return sBackupFolder & "\"
|
||||
Return sBackupFolder & Path.DirectorySeparatorChar
|
||||
End Get
|
||||
Set(value As String)
|
||||
sBackupFolder = value
|
||||
@@ -175,7 +175,7 @@ Public Class frmGameManager
|
||||
sFileName = BackupFolder & oBackupItem.FileName
|
||||
|
||||
'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
|
||||
FileSystem.Rename(sFileName, sNewFileName)
|
||||
End If
|
||||
@@ -265,7 +265,7 @@ Public Class frmGameManager
|
||||
Next
|
||||
End If
|
||||
|
||||
lstGames.Items.Clear()
|
||||
lstGames.DataSource = Nothing
|
||||
FormatAndFillList()
|
||||
End Sub
|
||||
|
||||
@@ -336,8 +336,14 @@ Public Class frmGameManager
|
||||
End If
|
||||
End If
|
||||
|
||||
sNewPath = mgrCommon.OpenFileBrowser(frmGameManager_ChooseCustomIcon, "ico", _
|
||||
frmGameManager_Icon, sDefaultFolder, False)
|
||||
'Unix Handler
|
||||
If Not mgrCommon.IsUnix Then
|
||||
sNewPath = mgrCommon.OpenFileBrowser(frmGameManager_ChooseCustomIcon, "ico", _
|
||||
frmGameManager_Icon, sDefaultFolder, False)
|
||||
Else
|
||||
sNewPath = mgrCommon.OpenFileBrowser(frmGameManager_ChooseCustomIcon, "png", _
|
||||
"PNG", sDefaultFolder, False)
|
||||
End If
|
||||
|
||||
If sNewPath <> String.Empty Then
|
||||
txtIcon.Text = sNewPath
|
||||
@@ -370,33 +376,40 @@ Public Class frmGameManager
|
||||
|
||||
Dim oApp As clsGame
|
||||
Dim oData As KeyValuePair(Of String, String)
|
||||
|
||||
lstGames.ValueMember = "Key"
|
||||
lstGames.DisplayMember = "Value"
|
||||
|
||||
lstGames.BeginUpdate()
|
||||
Dim oList As New List(Of KeyValuePair(Of String, String))
|
||||
|
||||
For Each de As DictionaryEntry In AppData
|
||||
oApp = DirectCast(de.Value, clsGame)
|
||||
oData = New KeyValuePair(Of String, String)(oApp.ID, oApp.Name)
|
||||
lstGames.Items.Add(oData)
|
||||
oList.Add(oData)
|
||||
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
|
||||
End Sub
|
||||
|
||||
Private Sub OpenBackupFile()
|
||||
Dim sFileName As String
|
||||
Dim oProcessStartInfo As ProcessStartInfo
|
||||
|
||||
sFileName = BackupFolder & CurrentBackupItem.FileName
|
||||
|
||||
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
|
||||
mgrCommon.ShowMessage(frmGameManager_ErrorNoBackupExists, MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
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
|
||||
Else
|
||||
If txtAppPath.Text <> String.Empty Then
|
||||
If Directory.Exists(txtAppPath.Text & "\" & txtSavePath.Text) Then
|
||||
sRoot = txtAppPath.Text & "\" & txtSavePath.Text
|
||||
If Directory.Exists(txtAppPath.Text & Path.DirectorySeparatorChar & txtSavePath.Text) Then
|
||||
sRoot = txtAppPath.Text & Path.DirectorySeparatorChar & txtSavePath.Text
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -451,14 +464,14 @@ Public Class frmGameManager
|
||||
|
||||
If Not CurrentBackupItem.AbsolutePath Then
|
||||
If CurrentGame.ProcessPath <> String.Empty Then
|
||||
CurrentBackupItem.RelativeRestorePath = CurrentGame.ProcessPath & "\" & CurrentBackupItem.RestorePath
|
||||
CurrentBackupItem.RelativeRestorePath = CurrentGame.ProcessPath & Path.DirectorySeparatorChar & CurrentBackupItem.RestorePath
|
||||
Else
|
||||
sProcess = CurrentGame.TrueProcess
|
||||
If mgrCommon.IsProcessNotSearchable(CurrentGame) Then bNoAuto = True
|
||||
sRestorePath = mgrPath.ProcessPathSearch(CurrentBackupItem.Name, sProcess, mgrCommon.FormatString(frmGameManager_ErrorPathNotSet, CurrentBackupItem.Name), bNoAuto)
|
||||
|
||||
If sRestorePath <> String.Empty Then
|
||||
CurrentBackupItem.RelativeRestorePath = sRestorePath & "\" & CurrentBackupItem.RestorePath
|
||||
CurrentBackupItem.RelativeRestorePath = sRestorePath & Path.DirectorySeparatorChar & CurrentBackupItem.RestorePath
|
||||
txtAppPath.Text = sRestorePath
|
||||
Else
|
||||
Return False
|
||||
@@ -471,21 +484,25 @@ Public Class frmGameManager
|
||||
|
||||
Private Sub OpenRestorePath()
|
||||
Dim sPath As String = String.Empty
|
||||
Dim oProcessStartInfo As ProcessStartInfo
|
||||
|
||||
If CurrentBackupItem.AbsolutePath Then
|
||||
sPath = CurrentBackupItem.RestorePath
|
||||
Else
|
||||
If FindRestorePath() Then
|
||||
sPath = CurrentBackupItem.RelativeRestorePath
|
||||
sPath = CurrentBackupItem.RestorePath
|
||||
Else
|
||||
If FindRestorePath() Then
|
||||
sPath = CurrentBackupItem.RelativeRestorePath
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
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
|
||||
mgrCommon.ShowMessage(frmGameManager_ErrorNoRestorePathExists, MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub OpenTags()
|
||||
@@ -518,8 +535,6 @@ Public Class frmGameManager
|
||||
Private Sub GetBackupInfo(ByVal oApp As clsGame)
|
||||
Dim oBackupInfo As clsBackup
|
||||
Dim sFileName As String
|
||||
Dim oFileInfo As FileInfo
|
||||
Dim dFileSize As Double
|
||||
|
||||
If oRemoteBackupData.Contains(oApp.Name) Then
|
||||
CurrentBackupItem = DirectCast(oRemoteBackupData(oApp.Name), clsBackup)
|
||||
@@ -532,16 +547,12 @@ Public Class frmGameManager
|
||||
btnDeleteBackup.Enabled = True
|
||||
|
||||
If File.Exists(sFileName) Then
|
||||
oFileInfo = New FileInfo(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
|
||||
txtFileSize.Text = mgrCommon.GetFileSize(sFileName)
|
||||
Else
|
||||
txtFileSize.Text = frmGameManager_ErrorNoBackupExists
|
||||
End If
|
||||
|
||||
mgrRestore.DoPathOverride(CurrentBackupItem, oApp)
|
||||
txtRestorePath.Text = CurrentBackupItem.RestorePath
|
||||
Else
|
||||
txtCurrentBackup.Text = frmGameManager_Never
|
||||
@@ -589,10 +600,10 @@ Public Class frmGameManager
|
||||
mgrManifest.DoManifestDelete(CurrentBackupItem, mgrSQLite.Database.Remote)
|
||||
|
||||
'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)
|
||||
If CurrentBackupItem.FileName.StartsWith(CurrentBackupItem.Name & "\") Then
|
||||
If CurrentBackupItem.FileName.StartsWith(CurrentBackupItem.Name & Path.DirectorySeparatorChar) Then
|
||||
'Build sub-dir backup path
|
||||
sSubDir = BackupFolder & CurrentBackupItem.Name
|
||||
|
||||
@@ -602,11 +613,11 @@ Public Class frmGameManager
|
||||
If oDir.GetDirectories.Length > 0 Or oDir.GetFiles.Length > 0 Then
|
||||
'Confirm
|
||||
If mgrCommon.ShowMessage(frmGameManager_ConfirmBackupFolderDelete, New String() {sSubDir, oDir.GetDirectories.Length, oDir.GetFiles.Length}, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
If Directory.Exists(sSubDir) Then Directory.Delete(sSubDir, True)
|
||||
If Directory.Exists(sSubDir) Then mgrCommon.DeleteDirectory(sSubDir, True)
|
||||
End If
|
||||
Else
|
||||
'Folder is empty, delete the empty sub-folder
|
||||
If Directory.Exists(sSubDir) Then Directory.Delete(sSubDir)
|
||||
If Directory.Exists(sSubDir) Then mgrCommon.DeleteDirectory(sSubDir)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -819,6 +830,7 @@ Public Class frmGameManager
|
||||
btnAdd.Enabled = True
|
||||
btnDelete.Enabled = False
|
||||
btnBackup.Enabled = False
|
||||
btnOpenRestorePath.Enabled = False
|
||||
btnTags.Enabled = False
|
||||
lblTags.Visible = False
|
||||
btnInclude.Text = frmGameManager_btnInclude
|
||||
@@ -883,6 +895,51 @@ Public Class frmGameManager
|
||||
IsLoading = False
|
||||
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()
|
||||
eCurrentMode = eModes.Edit
|
||||
ModeChange()
|
||||
@@ -975,7 +1032,7 @@ Public Class frmGameManager
|
||||
Case eModes.MultiSelect
|
||||
Dim sMonitorIDs As New List(Of String)
|
||||
For Each oData In lstGames.SelectedItems
|
||||
sMonitorIDs.Add(AppData(oData.Key))
|
||||
sMonitorIDs.Add(oData.Key)
|
||||
Next
|
||||
|
||||
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
|
||||
|
||||
If bSuccess Then
|
||||
Dim iSelected As Integer
|
||||
IsDirty = False
|
||||
LoadData()
|
||||
iSelected = lstGames.Items.IndexOf(New KeyValuePair(Of String, String)(oApp.ID, oApp.Name))
|
||||
If iSelected = -1 Then eCurrentMode = eModes.Disabled
|
||||
ModeChange()
|
||||
If eCurrentMode = eModes.View Then lstGames.SelectedIndex = iSelected
|
||||
If eCurrentMode = eModes.View Then lstGames.SelectedValue = oApp.ID
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1028,13 +1082,15 @@ Public Class frmGameManager
|
||||
End Sub
|
||||
|
||||
Private Sub SwitchApp()
|
||||
If lstGames.SelectedItems.Count = 1 Then
|
||||
eCurrentMode = eModes.View
|
||||
FillData()
|
||||
ModeChange()
|
||||
ElseIf lstGames.SelectedItems.Count > 1 Then
|
||||
eCurrentMode = eModes.MultiSelect
|
||||
ModeChange()
|
||||
If Not bIsLoading Then
|
||||
If lstGames.SelectedItems.Count = 1 Then
|
||||
eCurrentMode = eModes.View
|
||||
FillData()
|
||||
ModeChange()
|
||||
ElseIf lstGames.SelectedItems.Count > 1 Then
|
||||
eCurrentMode = eModes.MultiSelect
|
||||
ModeChange()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1204,7 +1260,7 @@ Public Class frmGameManager
|
||||
Private Sub ExportGameList()
|
||||
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
|
||||
mgrMonitorList.ExportMonitorList(sLocation)
|
||||
@@ -1213,13 +1269,17 @@ Public Class frmGameManager
|
||||
End Sub
|
||||
|
||||
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 mgrMonitorList.DoImport(App_URLImport) Then
|
||||
LoadData()
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub SetForm()
|
||||
@@ -1300,6 +1360,9 @@ Public Class frmGameManager
|
||||
AssignDirtyHandlers(grpExtra.Controls)
|
||||
AssignDirtyHandlers(grpStats.Controls)
|
||||
AssignDirtyHandlersMisc()
|
||||
|
||||
LoadData(False)
|
||||
ModeChange()
|
||||
End Sub
|
||||
|
||||
Private Sub lstGames_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lstGames.SelectedIndexChanged
|
||||
@@ -1403,15 +1466,11 @@ Public Class frmGameManager
|
||||
End Sub
|
||||
|
||||
Private Sub chkFolderSave_CheckedChanged(sender As Object, e As EventArgs) Handles chkFolderSave.CheckedChanged
|
||||
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
|
||||
FolderSaveModeChange()
|
||||
End Sub
|
||||
|
||||
Private Sub chkMonitorOnly_CheckedChanged(sender As Object, e As EventArgs) Handles chkMonitorOnly.CheckedChanged
|
||||
MonitorOnlyModeChange()
|
||||
End Sub
|
||||
|
||||
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
|
||||
ExportGameList()
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
End Class
|
||||
|
||||
Generated
-3
@@ -170,7 +170,6 @@ Partial Class frmIncludeExclude
|
||||
'
|
||||
'optFileTypes
|
||||
'
|
||||
Me.optFileTypes.AutoSize = True
|
||||
Me.optFileTypes.Location = New System.Drawing.Point(6, 19)
|
||||
Me.optFileTypes.Name = "optFileTypes"
|
||||
Me.optFileTypes.Size = New System.Drawing.Size(73, 17)
|
||||
@@ -181,7 +180,6 @@ Partial Class frmIncludeExclude
|
||||
'
|
||||
'optIndividualFiles
|
||||
'
|
||||
Me.optIndividualFiles.AutoSize = True
|
||||
Me.optIndividualFiles.Location = New System.Drawing.Point(85, 19)
|
||||
Me.optIndividualFiles.Name = "optIndividualFiles"
|
||||
Me.optIndividualFiles.Size = New System.Drawing.Size(94, 17)
|
||||
@@ -250,7 +248,6 @@ Partial Class frmIncludeExclude
|
||||
Me.Text = "Include / Exclude Builder"
|
||||
Me.cmsItems.ResumeLayout(False)
|
||||
Me.grpFileOptions.ResumeLayout(False)
|
||||
Me.grpFileOptions.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAB6
|
||||
CQAAAk1TRnQBSQFMAgEBAwEAAbABAAGwAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
CQAAAk1TRnQBSQFMAgEBAwEAAbgBAAG4AQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
|
||||
@@ -30,7 +30,7 @@ Public Class frmIncludeExclude
|
||||
Return sRootFolder
|
||||
End Get
|
||||
Set(value As String)
|
||||
sRootFolder = value.TrimEnd("\")
|
||||
sRootFolder = value.TrimEnd(Path.DirectorySeparatorChar)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -52,7 +52,7 @@ Public Class frmIncludeExclude
|
||||
|
||||
If sFolders.Length <> 0 Then
|
||||
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.Tag = 0
|
||||
oNode.Nodes.Add(oChild)
|
||||
@@ -64,7 +64,7 @@ Public Class frmIncludeExclude
|
||||
|
||||
If sFiles.Length <> 0 Then
|
||||
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
|
||||
oNode.Nodes.Add(oChild)
|
||||
Next
|
||||
@@ -195,7 +195,7 @@ Public Class frmIncludeExclude
|
||||
If Path.GetFileName(txtRootFolder.Text) = sNewLabel Then
|
||||
sFolderCheck = txtRootFolder.Text
|
||||
Else
|
||||
sFolderCheck = txtRootFolder.Text & "\" & sNewLabel
|
||||
sFolderCheck = txtRootFolder.Text & Path.DirectorySeparatorChar & sNewLabel
|
||||
End If
|
||||
If Directory.Exists(sFolderCheck) Then
|
||||
iType = 0
|
||||
@@ -205,7 +205,7 @@ Public Class frmIncludeExclude
|
||||
End If
|
||||
End If
|
||||
|
||||
oListItem.ImageIndex = iType
|
||||
oListItem.ImageIndex = iType
|
||||
End Sub
|
||||
|
||||
Private Function CreateNewBuilderString() As String
|
||||
@@ -329,16 +329,21 @@ Public Class frmIncludeExclude
|
||||
Private Sub cmsAdd_Click(sender As Object, e As EventArgs) Handles cmsAdd.Click
|
||||
Dim oNewItem As New ListViewItem(frmIncludeExclude_CustomItem, 1)
|
||||
oNewItem.Selected = True
|
||||
lstBuilder.Items.Add(oNewItem)
|
||||
lstBuilder.Items.Add(oNewItem)
|
||||
lstBuilder.SelectedItems(0).BeginEdit()
|
||||
End Sub
|
||||
|
||||
Private Sub lstBuilder_AfterLabelEdit(sender As Object, e As LabelEditEventArgs) Handles lstBuilder.AfterLabelEdit
|
||||
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
|
||||
e.CancelEdit = True
|
||||
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 Sub
|
||||
|
||||
Generated
+64
-21
@@ -39,14 +39,17 @@ Partial Class frmMain
|
||||
Me.gMonTrayTools = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTrayToolsCleanMan = 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.gMonTrayExit = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.bwMonitor = New System.ComponentModel.BackgroundWorker()
|
||||
Me.txtLog = New System.Windows.Forms.TextBox()
|
||||
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.gMonStripStatusButton = New System.Windows.Forms.ToolStripSplitButton()
|
||||
Me.gMonStripStatusButton = New System.Windows.Forms.ToolStripStatusLabel()
|
||||
Me.gMonMainMenu = New System.Windows.Forms.MenuStrip()
|
||||
Me.gMonFile = 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.gMonToolsCleanMan = 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.gMonHelpWebSite = 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.Icon = CType(resources.GetObject("gMonTray.Icon"), System.Drawing.Icon)
|
||||
Me.gMonTray.Text = "GBM"
|
||||
Me.gMonTray.Visible = True
|
||||
'
|
||||
'gMonTrayMenu
|
||||
'
|
||||
@@ -164,7 +169,7 @@ Partial Class frmMain
|
||||
'
|
||||
'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.Size = New System.Drawing.Size(161, 22)
|
||||
Me.gMonTrayTools.Text = "&Tools"
|
||||
@@ -181,6 +186,25 @@ Partial Class frmMain
|
||||
Me.gMonTrayToolsCompact.Size = New System.Drawing.Size(184, 22)
|
||||
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
|
||||
'
|
||||
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.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.ShowItemToolTips = True
|
||||
Me.gMonStatusStrip.Size = New System.Drawing.Size(524, 22)
|
||||
@@ -223,33 +247,26 @@ Partial Class frmMain
|
||||
'gMonStripAdminButton
|
||||
'
|
||||
Me.gMonStripAdminButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.gMonStripAdminButton.DropDownButtonWidth = 0
|
||||
Me.gMonStripAdminButton.Image = Global.GBM.My.Resources.Resources.Icon_User
|
||||
Me.gMonStripAdminButton.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.gMonStripAdminButton.Name = "gMonStripAdminButton"
|
||||
Me.gMonStripAdminButton.Size = New System.Drawing.Size(21, 20)
|
||||
Me.gMonStripAdminButton.Text = "Elevation"
|
||||
Me.gMonStripAdminButton.ToolTipText = "Elevation"
|
||||
Me.gMonStripAdminButton.Size = New System.Drawing.Size(16, 17)
|
||||
Me.gMonStripAdminButton.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage
|
||||
'
|
||||
'gMonStripTxtStatus
|
||||
'
|
||||
Me.gMonStripTxtStatus.Margin = New System.Windows.Forms.Padding(5, 0, 0, 0)
|
||||
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.Text = "Monitor Status"
|
||||
Me.gMonStripTxtStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
'
|
||||
'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.Size = New System.Drawing.Size(93, 20)
|
||||
Me.gMonStripStatusButton.Size = New System.Drawing.Size(88, 17)
|
||||
Me.gMonStripStatusButton.Text = "Monitor Status:"
|
||||
Me.gMonStripStatusButton.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage
|
||||
Me.gMonStripStatusButton.ToolTipText = "Click to toggle monitoring on or off."
|
||||
'
|
||||
'gMonMainMenu
|
||||
'
|
||||
@@ -329,7 +346,7 @@ Partial Class frmMain
|
||||
'
|
||||
'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.Size = New System.Drawing.Size(47, 20)
|
||||
Me.gMonTools.Text = "&Tools"
|
||||
@@ -346,6 +363,25 @@ Partial Class frmMain
|
||||
Me.gMonToolsCompact.Size = New System.Drawing.Size(184, 22)
|
||||
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
|
||||
'
|
||||
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.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.lblStatus3)
|
||||
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.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||
Me.KeyPreview = True
|
||||
Me.MainMenuStrip = Me.gMonMainMenu
|
||||
Me.MaximizeBox = False
|
||||
Me.MinimizeBox = False
|
||||
@@ -548,7 +585,6 @@ Partial Class frmMain
|
||||
Friend WithEvents gMonHelpAbout As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents gMonTraySetupGameManager 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 btnLogToggle As System.Windows.Forms.Button
|
||||
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 gMonHelpCheckforUpdates As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents btnCancelOperation As System.Windows.Forms.Button
|
||||
Friend WithEvents gMonStripAdminButton As ToolStripSplitButton
|
||||
Friend WithEvents gMonTraySetupTags As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents gMonSetupTags As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents lblStatus1 As Label
|
||||
@@ -578,4 +613,12 @@ Partial Class frmMain
|
||||
Friend WithEvents pbTime As System.Windows.Forms.PictureBox
|
||||
Friend WithEvents gMonTrayToolsCleanMan 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
|
||||
|
||||
+268
-75
@@ -23,11 +23,13 @@ Public Class frmMain
|
||||
Private eCurrentOperation As eOperation = eOperation.None
|
||||
Private bCancelledByUser As Boolean = False
|
||||
Private bShutdown As Boolean = False
|
||||
Private bInitFail As Boolean = False
|
||||
Private bMenuEnabled As Boolean = True
|
||||
Private bLockdown As Boolean = True
|
||||
Private bFirstRun As Boolean = False
|
||||
Private bProcessIsAdmin As Boolean = False
|
||||
Private bLogToggle As Boolean = False
|
||||
Private bShowToggle As Boolean = True
|
||||
Private bAllowIcon As Boolean = False
|
||||
Private bAllowDetails As Boolean = False
|
||||
Private oPriorImage As Image
|
||||
@@ -35,6 +37,9 @@ Public Class frmMain
|
||||
Private sPriorCompany As String
|
||||
Private sPriorVersion As String
|
||||
|
||||
'Developer Debug Flags
|
||||
Private bProcessDebugMode As Boolean = False
|
||||
|
||||
WithEvents oFileWatcher As New System.IO.FileSystemWatcher
|
||||
WithEvents tmScanTimer As New Timer
|
||||
|
||||
@@ -59,8 +64,8 @@ Public Class frmMain
|
||||
Me.Invoke(d, New Object() {sMessage})
|
||||
Else
|
||||
Dim sPattern As String = "h:mm tt"
|
||||
lblLastActionTitle.Visible = True
|
||||
lblLastAction.Text = sMessage & " at " & TimeOfDay.ToString(sPattern)
|
||||
lblLastActionTitle.Visible = True
|
||||
lblLastAction.Text = sMessage.TrimEnd(".") & " " & mgrCommon.FormatString(frmMain_AtTime, TimeOfDay.ToString(sPattern))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -92,7 +97,7 @@ Public Class frmMain
|
||||
If oGame.AbsolutePath Then
|
||||
sStatus2 = oGame.Path
|
||||
Else
|
||||
sStatus2 = oGame.ProcessPath & "\" & oGame.Path
|
||||
sStatus2 = oGame.ProcessPath & System.IO.Path.DirectorySeparatorChar & oGame.Path
|
||||
End If
|
||||
sStatus3 = String.Empty
|
||||
|
||||
@@ -141,15 +146,11 @@ Public Class frmMain
|
||||
End Sub
|
||||
|
||||
Private Sub ExecuteBackup(ByVal oBackupList As List(Of clsGame))
|
||||
'Init Backup Settings
|
||||
oBackup.Settings = oSettings
|
||||
oBackup.DoBackup(oBackupList)
|
||||
OperationEnded()
|
||||
End Sub
|
||||
|
||||
Private Sub ExecuteRestore(ByVal oRestoreList As List(Of clsBackup))
|
||||
'Init Restore Settings
|
||||
oRestore.Settings = oSettings
|
||||
Private Sub ExecuteRestore(ByVal oRestoreList As List(Of clsBackup))
|
||||
oRestore.DoRestore(oRestoreList)
|
||||
OperationEnded()
|
||||
End Sub
|
||||
@@ -160,19 +161,26 @@ Public Class frmMain
|
||||
Dim oReadyList As New List(Of clsBackup)
|
||||
Dim oRestoreInfo As clsBackup
|
||||
Dim bTriggerReload As Boolean = False
|
||||
|
||||
Dim bPathVerified As Boolean
|
||||
eCurrentOperation = eOperation.Restore
|
||||
OperationStarted()
|
||||
|
||||
'Build Restore List
|
||||
For Each oGame In oRestoreList
|
||||
bPathVerified = False
|
||||
oRestoreInfo = oBackupData(oGame.Name)
|
||||
|
||||
If mgrRestore.CheckPath(oRestoreInfo, oGame, bTriggerReload) Then
|
||||
oReadyList.Add(oRestoreInfo)
|
||||
bPathVerified = True
|
||||
Else
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_ErrorRestorePath, oRestoreInfo.Name), False, ToolTipIcon.Error, True)
|
||||
End If
|
||||
|
||||
If bPathVerified Then
|
||||
If oRestore.CheckRestorePrereq(oRestoreInfo) Then
|
||||
oReadyList.Add(oRestoreInfo)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
'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))
|
||||
Dim oGame As clsGame
|
||||
Dim bNoAuto As Boolean
|
||||
Dim bPathVerified As Boolean
|
||||
Dim oReadyList As New List(Of clsGame)
|
||||
|
||||
eCurrentOperation = eOperation.Backup
|
||||
@@ -200,6 +209,7 @@ Public Class frmMain
|
||||
'Build Backup List
|
||||
For Each oGame In oBackupList
|
||||
bNoAuto = False
|
||||
bPathVerified = False
|
||||
gMonStripStatusButton.Enabled = False
|
||||
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_ManualBackup, oGame.Name), False)
|
||||
@@ -211,12 +221,18 @@ Public Class frmMain
|
||||
End If
|
||||
|
||||
If oGame.ProcessPath <> String.Empty Then
|
||||
oReadyList.Add(oGame)
|
||||
bPathVerified = True
|
||||
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
|
||||
Else
|
||||
oReadyList.Add(oGame)
|
||||
bPathVerified = True
|
||||
End If
|
||||
|
||||
If bPathVerified Then
|
||||
If oBackup.CheckBackupPrereq(oGame) Then
|
||||
oReadyList.Add(oGame)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
@@ -267,13 +283,13 @@ Public Class frmMain
|
||||
eCurrentOperation = eOperation.Backup
|
||||
OperationStarted(False)
|
||||
|
||||
If SupressBackup() Then
|
||||
bDoBackup = False
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_ErrorBackupSessionLength, oProcess.GameInfo.Name), False)
|
||||
SetLastAction(mgrCommon.FormatString(frmMain_ErrorBackupSessionLength, oProcess.GameInfo.CroppedName))
|
||||
OperationEnded()
|
||||
Else
|
||||
If oProcess.GameInfo.MonitorOnly = False Then
|
||||
If oProcess.GameInfo.MonitorOnly = False Then
|
||||
If SupressBackup() Then
|
||||
bDoBackup = False
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_ErrorBackupSessionLength, oProcess.GameInfo.Name), False)
|
||||
SetLastAction(mgrCommon.FormatString(frmMain_ErrorBackupSessionLength, oProcess.GameInfo.CroppedName))
|
||||
OperationEnded()
|
||||
Else
|
||||
If oSettings.DisableConfirmation Then
|
||||
bDoBackup = True
|
||||
Else
|
||||
@@ -286,20 +302,25 @@ Public Class frmMain
|
||||
OperationEnded()
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
bDoBackup = False
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_MonitorEnded, oProcess.GameInfo.Name), False)
|
||||
SetLastAction(mgrCommon.FormatString(frmMain_MonitorEnded, oProcess.GameInfo.CroppedName))
|
||||
OperationEnded()
|
||||
End If
|
||||
Else
|
||||
bDoBackup = False
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_MonitorEnded, oProcess.GameInfo.Name), False)
|
||||
SetLastAction(mgrCommon.FormatString(frmMain_MonitorEnded, oProcess.GameInfo.CroppedName))
|
||||
OperationEnded()
|
||||
End If
|
||||
|
||||
If bDoBackup Then
|
||||
'Run the backup
|
||||
oReadyList.Add(oProcess.GameInfo)
|
||||
Dim trd As New System.Threading.Thread(AddressOf ExecuteBackup)
|
||||
trd.IsBackground = True
|
||||
trd.Start(oReadyList)
|
||||
If Not oBackup.CheckBackupPrereq(oProcess.GameInfo) Then
|
||||
SetLastAction(mgrCommon.FormatString(frmMain_ErrorBackupCancel, oProcess.GameInfo.CroppedName))
|
||||
OperationEnded()
|
||||
Else
|
||||
'Run the backup
|
||||
oReadyList.Add(oProcess.GameInfo)
|
||||
Dim trd As New System.Threading.Thread(AddressOf ExecuteBackup)
|
||||
trd.IsBackground = True
|
||||
trd.Start(oReadyList)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -328,8 +349,16 @@ Public Class frmMain
|
||||
Dim fbBrowser As New OpenFileDialog
|
||||
|
||||
fbBrowser.Title = mgrCommon.FormatString(frmMain_ChooseIcon, oProcess.GameInfo.CroppedName)
|
||||
fbBrowser.DefaultExt = "ico"
|
||||
fbBrowser.Filter = frmMain_IconFilter
|
||||
|
||||
'Unix Handler
|
||||
If Not mgrCommon.IsUnix Then
|
||||
fbBrowser.DefaultExt = "ico"
|
||||
fbBrowser.Filter = frmMain_IconFilter
|
||||
Else
|
||||
fbBrowser.DefaultExt = "png"
|
||||
fbBrowser.Filter = frmMain_PNGFilter
|
||||
End If
|
||||
|
||||
Try
|
||||
fbBrowser.InitialDirectory = IO.Path.GetDirectoryName(oProcess.FoundProcess.MainModule.FileName)
|
||||
Catch ex As Exception
|
||||
@@ -545,12 +574,93 @@ Public Class frmMain
|
||||
End Function
|
||||
|
||||
'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()
|
||||
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 sProcessType = [Enum].GetName(GetType(System.Reflection.ProcessorArchitecture), iProcessType)
|
||||
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)
|
||||
End Sub
|
||||
@@ -590,6 +700,8 @@ Public Class frmMain
|
||||
PauseScan()
|
||||
If frm.ShowDialog() = Windows.Forms.DialogResult.OK Then
|
||||
oSettings = frm.Settings
|
||||
oBackup.Settings = oSettings
|
||||
oRestore.Settings = oSettings
|
||||
'Set Remote Database Location
|
||||
mgrPath.RemoteDatabaseLocation = oSettings.BackupFolder
|
||||
SetupSyncWatcher()
|
||||
@@ -712,6 +824,8 @@ Public Class frmMain
|
||||
|
||||
'Load Settings
|
||||
oSettings.LoadSettings()
|
||||
oBackup.Settings = oSettings
|
||||
oRestore.Settings = oSettings
|
||||
|
||||
If Not bFirstRun Then
|
||||
'The application cannot continue if this fails
|
||||
@@ -747,30 +861,37 @@ Public Class frmMain
|
||||
Private Sub ToggleLog()
|
||||
If bLogToggle = False Then
|
||||
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
|
||||
btnLogToggle.Text = frmMain_btnToggleLog_Hide
|
||||
txtLog.Select(txtLog.TextLength, 0)
|
||||
txtLog.ScrollToCaret()
|
||||
Else
|
||||
txtLog.Visible = False
|
||||
Me.Size = New System.Drawing.Size(540, 245)
|
||||
Me.Size = New System.Drawing.Size(Me.Size.Width, 245)
|
||||
bLogToggle = False
|
||||
btnLogToggle.Text = frmMain_btnToggleLog_Show
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ToggleState()
|
||||
'Toggle State with Tray Clicks
|
||||
If Me.WindowState = FormWindowState.Minimized Then
|
||||
'Toggle State with Tray Clicks
|
||||
If Not bShowToggle Then
|
||||
bShowToggle = True
|
||||
Me.Visible = True
|
||||
Me.ShowInTaskbar = True
|
||||
Me.WindowState = FormWindowState.Normal
|
||||
Me.Focus()
|
||||
Else
|
||||
bShowToggle = False
|
||||
Me.Visible = False
|
||||
Me.ShowInTaskbar = False
|
||||
Me.WindowState = FormWindowState.Minimized
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -920,9 +1041,12 @@ Public Class frmMain
|
||||
Dim d As New UpdateLogCallBack(AddressOf UpdateLog)
|
||||
Me.Invoke(d, New Object() {sLogUpdate, bTrayUpdate, objIcon, bTimeStamp})
|
||||
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
|
||||
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
|
||||
|
||||
'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()
|
||||
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()
|
||||
'Set Form Name
|
||||
Me.Name = App_NameLong
|
||||
@@ -966,6 +1106,9 @@ Public Class frmMain
|
||||
gMonTools.Text = frmMain_gMonTools
|
||||
gMonToolsCleanMan.Text = frmMain_gMonToolsCleanMan
|
||||
gMonToolsCompact.Text = frmMain_gMonToolsCompact
|
||||
gMonToolsLog.Text = frmMain_gMonToolsLog
|
||||
gMonLogClear.Text = frmMain_gMonLogClear
|
||||
gMonLogSave.Text = frmMain_gMonLogSave
|
||||
gMonHelp.Text = frmMain_gMonHelp
|
||||
gMonHelpWebSite.Text = frmMain_gMonHelpWebSite
|
||||
gMonHelpManual.Text = frmMain_gMonHelpManual
|
||||
@@ -984,6 +1127,9 @@ Public Class frmMain
|
||||
gMonTrayTools.Text = frmMain_gMonTools
|
||||
gMonTrayToolsCleanMan.Text = frmMain_gMonToolsCleanMan
|
||||
gMonTrayToolsCompact.Text = frmMain_gMonToolsCompact
|
||||
gMonTrayToolsLog.Text = frmMain_gMonToolsLog
|
||||
gMonTrayLogClear.Text = frmMain_gMonLogClear
|
||||
gMonTrayLogSave.Text = frmMain_gMonLogSave
|
||||
gMonTrayExit.Text = frmMain_gMonFileExit
|
||||
|
||||
'Set Form Text
|
||||
@@ -1006,7 +1152,7 @@ Public Class frmMain
|
||||
lblLastAction.Text = String.Empty
|
||||
pbTime.SizeMode = PictureBoxSizeMode.AutoSize
|
||||
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
|
||||
ResetGameInfo()
|
||||
End Sub
|
||||
@@ -1098,8 +1244,8 @@ Public Class frmMain
|
||||
|
||||
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
|
||||
Dim sSettingsRoot As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "\gbm"
|
||||
Dim sDBLocation As String = sSettingsRoot & "\gbm.s3db"
|
||||
Dim sSettingsRoot As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "/gbm"
|
||||
Dim sDBLocation As String = sSettingsRoot & "/gbm.s3db"
|
||||
|
||||
If Not IO.Directory.Exists(sSettingsRoot) Then
|
||||
Try
|
||||
@@ -1171,14 +1317,19 @@ Public Class frmMain
|
||||
|
||||
'Functions to handle other features
|
||||
Private Sub RestartAsAdmin()
|
||||
If mgrCommon.IsElevated Then
|
||||
mgrCommon.ShowMessage(frmMain_ErrorAlreadyAdmin, MsgBoxStyle.Information)
|
||||
Else
|
||||
If mgrCommon.ShowMessage(frmMain_ConfirmRunAsAdmin, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
mgrCommon.RestartAsAdmin()
|
||||
bShutdown = True
|
||||
ShutdownApp(False)
|
||||
'Unix Hanlder
|
||||
If Not mgrCommon.IsUnix Then
|
||||
If mgrCommon.IsElevated Then
|
||||
mgrCommon.ShowMessage(frmMain_ErrorAlreadyAdmin, MsgBoxStyle.Information)
|
||||
Else
|
||||
If mgrCommon.ShowMessage(frmMain_ConfirmRunAsAdmin, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
mgrCommon.RestartAsAdmin()
|
||||
bShutdown = True
|
||||
ShutdownApp(False)
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
mgrCommon.ShowMessage(App_ErrorUnixNotAvailable, MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1294,6 +1445,14 @@ Public Class frmMain
|
||||
OpenCheckforUpdates()
|
||||
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
|
||||
gMonNotification.Visible = False
|
||||
gMonTrayNotification.Visible = False
|
||||
@@ -1304,7 +1463,7 @@ Public Class frmMain
|
||||
ToggleLog()
|
||||
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()
|
||||
End Sub
|
||||
|
||||
@@ -1315,9 +1474,9 @@ Public Class frmMain
|
||||
End Sub
|
||||
|
||||
Private Sub gMonTray_BalloonTipClicked(sender As System.Object, e As System.EventArgs) Handles gMonTray.BalloonTipClicked
|
||||
bShowToggle = True
|
||||
Me.Visible = True
|
||||
Me.ShowInTaskbar = True
|
||||
Me.WindowState = FormWindowState.Normal
|
||||
Me.Focus()
|
||||
End Sub
|
||||
|
||||
@@ -1325,7 +1484,7 @@ Public Class frmMain
|
||||
OperationCancel()
|
||||
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()
|
||||
End Sub
|
||||
|
||||
@@ -1335,12 +1494,19 @@ Public Class frmMain
|
||||
End Sub
|
||||
|
||||
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
|
||||
e.Cancel = True
|
||||
Me.Visible = False
|
||||
Me.ShowInTaskbar = False
|
||||
Me.WindowState = FormWindowState.Minimized
|
||||
If Not mgrCommon.IsUnix Then
|
||||
bShowToggle = False
|
||||
Me.Visible = False
|
||||
Me.ShowInTaskbar = False
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1351,7 +1517,7 @@ Public Class frmMain
|
||||
Dim iErrorCode As Integer = 0
|
||||
Dim sErrorMessage As String = String.Empty
|
||||
|
||||
If oProcess.SearchRunningProcesses(hshScanList, bNeedsPath, iErrorCode) Then
|
||||
If oProcess.SearchRunningProcesses(hshScanList, bNeedsPath, iErrorCode, bProcessDebugMode) Then
|
||||
PauseScan()
|
||||
|
||||
If bNeedsPath Then
|
||||
@@ -1443,6 +1609,7 @@ Public Class frmMain
|
||||
RunBackup()
|
||||
Else
|
||||
UpdateLog(frmMain_UnknownGameEnded, False)
|
||||
oProcess.GameInfo = Nothing
|
||||
ResetGameInfo()
|
||||
ResumeScan()
|
||||
End If
|
||||
@@ -1453,30 +1620,49 @@ Public Class frmMain
|
||||
End Sub
|
||||
|
||||
Private Sub Main_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
||||
SetForm()
|
||||
VerifyGameDataPath()
|
||||
LoadAndVerify()
|
||||
VerifyCustomPathVariables()
|
||||
'Init
|
||||
Try
|
||||
SetForm()
|
||||
VerifyGameDataPath()
|
||||
LoadAndVerify()
|
||||
VerifyCustomPathVariables()
|
||||
|
||||
If oSettings.StartToTray Then
|
||||
Me.Visible = False
|
||||
Me.ShowInTaskbar = False
|
||||
Me.WindowState = FormWindowState.Minimized
|
||||
End If
|
||||
If oSettings.StartToTray And Not mgrCommon.IsUnix Then
|
||||
bShowToggle = False
|
||||
Me.Visible = False
|
||||
Me.ShowInTaskbar = False
|
||||
End If
|
||||
|
||||
If oSettings.MonitorOnStartup Then
|
||||
eCurrentStatus = eStatus.Stopped
|
||||
If oSettings.MonitorOnStartup Then
|
||||
eCurrentStatus = eStatus.Stopped
|
||||
Else
|
||||
eCurrentStatus = eStatus.Running
|
||||
End If
|
||||
|
||||
HandleScan()
|
||||
CheckForNewBackups()
|
||||
Catch ex As Exception
|
||||
If mgrCommon.ShowMessage(frmMain_ErrorInitFailure, ex.Message, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
bInitFail = True
|
||||
End If
|
||||
End Try
|
||||
|
||||
'Unix Handler
|
||||
If mgrCommon.IsUnix Then
|
||||
Me.MinimizeBox = True
|
||||
Else
|
||||
eCurrentStatus = eStatus.Running
|
||||
Me.gMonTray.Visible = True
|
||||
End If
|
||||
|
||||
HandleScan()
|
||||
CheckForNewBackups()
|
||||
|
||||
End Sub
|
||||
|
||||
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()
|
||||
End If
|
||||
End Sub
|
||||
@@ -1484,4 +1670,11 @@ Public Class frmMain
|
||||
Private Sub txtGameInfo_Enter(sender As Object, e As EventArgs)
|
||||
btnLogToggle.Focus()
|
||||
End Sub
|
||||
|
||||
Private Sub frmMain_KeyDown(sender As Object, e As KeyEventArgs) Handles MyBase.KeyDown
|
||||
If e.KeyCode = Keys.Oemtilde AndAlso e.Modifiers = Keys.Control Then
|
||||
OpenDevConsole()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Generated
+46
-7
@@ -44,10 +44,14 @@ Partial Class frmSettings
|
||||
Me.chkRestoreOnLaunch = New System.Windows.Forms.CheckBox()
|
||||
Me.chkOverwriteWarning = New System.Windows.Forms.CheckBox()
|
||||
Me.chkCreateFolder = New System.Windows.Forms.CheckBox()
|
||||
Me.grp7z = New System.Windows.Forms.GroupBox()
|
||||
Me.lblCompression = New System.Windows.Forms.Label()
|
||||
Me.cboCompression = New System.Windows.Forms.ComboBox()
|
||||
Me.grpGeneral.SuspendLayout()
|
||||
Me.grpPaths.SuspendLayout()
|
||||
Me.grpBackup.SuspendLayout()
|
||||
CType(Me.nudSupressBackupThreshold, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.grp7z.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'chkMonitorOnStartup
|
||||
@@ -140,10 +144,10 @@ Partial Class frmSettings
|
||||
Me.grpPaths.Controls.Add(Me.btnBackupFolder)
|
||||
Me.grpPaths.Controls.Add(Me.lblBackupFolder)
|
||||
Me.grpPaths.Controls.Add(Me.txtBackupFolder)
|
||||
Me.grpPaths.Location = New System.Drawing.Point(12, 360)
|
||||
Me.grpPaths.Location = New System.Drawing.Point(12, 410)
|
||||
Me.grpPaths.Name = "grpPaths"
|
||||
Me.grpPaths.Size = New System.Drawing.Size(360, 60)
|
||||
Me.grpPaths.TabIndex = 2
|
||||
Me.grpPaths.TabIndex = 3
|
||||
Me.grpPaths.TabStop = False
|
||||
Me.grpPaths.Text = "Paths"
|
||||
'
|
||||
@@ -175,7 +179,7 @@ Partial Class frmSettings
|
||||
'btnSave
|
||||
'
|
||||
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.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnSave.TabIndex = 3
|
||||
@@ -185,7 +189,7 @@ Partial Class frmSettings
|
||||
'btnCancel
|
||||
'
|
||||
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.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnCancel.TabIndex = 4
|
||||
@@ -204,7 +208,7 @@ Partial Class frmSettings
|
||||
Me.grpBackup.Controls.Add(Me.chkBackupConfirm)
|
||||
Me.grpBackup.Location = New System.Drawing.Point(12, 183)
|
||||
Me.grpBackup.Name = "grpBackup"
|
||||
Me.grpBackup.Size = New System.Drawing.Size(360, 171)
|
||||
Me.grpBackup.Size = New System.Drawing.Size(360, 168)
|
||||
Me.grpBackup.TabIndex = 1
|
||||
Me.grpBackup.TabStop = False
|
||||
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.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
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
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.btnCancel)
|
||||
Me.Controls.Add(Me.btnSave)
|
||||
@@ -292,7 +326,7 @@ Partial Class frmSettings
|
||||
Me.Name = "frmSettings"
|
||||
Me.ShowIcon = False
|
||||
Me.ShowInTaskbar = False
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Settings"
|
||||
Me.grpGeneral.ResumeLayout(False)
|
||||
Me.grpGeneral.PerformLayout()
|
||||
@@ -301,6 +335,8 @@ Partial Class frmSettings
|
||||
Me.grpBackup.ResumeLayout(False)
|
||||
Me.grpBackup.PerformLayout()
|
||||
CType(Me.nudSupressBackupThreshold, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.grp7z.ResumeLayout(False)
|
||||
Me.grp7z.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
@@ -326,4 +362,7 @@ Partial Class frmSettings
|
||||
Friend WithEvents lblMinutes As Label
|
||||
Friend WithEvents nudSupressBackupThreshold As NumericUpDown
|
||||
Friend WithEvents chkSupressBackup As CheckBox
|
||||
Friend WithEvents grp7z As GroupBox
|
||||
Friend WithEvents cboCompression As ComboBox
|
||||
Friend WithEvents lblCompression As Label
|
||||
End Class
|
||||
|
||||
+47
-13
@@ -58,6 +58,7 @@ Public Class frmSettings
|
||||
oSettings.TimeTracking = chkTimeTracking.Checked
|
||||
oSettings.SupressBackup = chkSupressBackup.Checked
|
||||
oSettings.SupressBackupThreshold = nudSupressBackupThreshold.Value
|
||||
oSettings.CompressionLevel = cboCompression.SelectedValue
|
||||
|
||||
'We need to clear all checksums its turned off
|
||||
If chkCheckSum.Checked = False And oSettings.CheckSum = True Then
|
||||
@@ -111,24 +112,30 @@ Public Class frmSettings
|
||||
chkSupressBackup.Checked = oSettings.SupressBackup
|
||||
nudSupressBackupThreshold.Value = oSettings.SupressBackupThreshold
|
||||
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
|
||||
If SaveSettings() Then
|
||||
bShutdown = True
|
||||
Me.Close()
|
||||
'Unix Handler
|
||||
If mgrCommon.IsUnix Then
|
||||
chkStartToTray.Checked = False
|
||||
chkStartWindows.Checked = False
|
||||
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 LoadCombos()
|
||||
Dim oComboItems As New List(Of KeyValuePair(Of Integer, String))
|
||||
|
||||
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
|
||||
'cboCompression
|
||||
cboCompression.ValueMember = "Key"
|
||||
cboCompression.DisplayMember = "Value"
|
||||
|
||||
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
|
||||
|
||||
Private Sub SetForm()
|
||||
@@ -156,10 +163,37 @@ Public Class frmSettings
|
||||
chkShowDetectionTips.Text = frmSettings_chkShowDetectionTips
|
||||
chkStartToTray.Text = frmSettings_chkStartToTray
|
||||
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
|
||||
|
||||
Private Sub frmSettings_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
||||
SetForm()
|
||||
LoadCombos()
|
||||
LoadSettings()
|
||||
End Sub
|
||||
|
||||
|
||||
Generated
+1
-2
@@ -96,11 +96,10 @@ Partial Class frmStartUpWizard
|
||||
'
|
||||
'llbManual
|
||||
'
|
||||
Me.llbManual.AutoSize = True
|
||||
Me.llbManual.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
|
||||
Me.llbManual.Location = New System.Drawing.Point(14, 158)
|
||||
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.TabStop = True
|
||||
Me.llbManual.Text = "Game Backup Monitor Manual"
|
||||
|
||||
@@ -98,6 +98,12 @@ Public Class frmStartUpWizard
|
||||
End Sub
|
||||
|
||||
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 mgrMonitorList.DoImport(App_URLImport) Then
|
||||
oGameData = mgrMonitorList.ReadList(mgrMonitorList.eListTypes.FullList)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -90,13 +90,21 @@
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
|
||||
</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>
|
||||
<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.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.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
@@ -320,7 +328,8 @@
|
||||
<Content Include="License\credits.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</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" />
|
||||
<Content Include="Resources\Admin.png" />
|
||||
<Content Include="Resources\Clock.png" />
|
||||
@@ -332,6 +341,7 @@
|
||||
<Content Include="Resources\Inbox.png" />
|
||||
<Content Include="Resources\type.ico" />
|
||||
<Content Include="Resources\User.png" />
|
||||
<Content Include="x64\sqlite3.dll" />
|
||||
<Content Include="Utilities\x64\7za.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
@@ -350,12 +360,6 @@
|
||||
<Content Include="Utilities\x86\7zxa.dll">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</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\Detected.png" />
|
||||
<None Include="Resources\Ready.png" />
|
||||
@@ -387,6 +391,7 @@
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</COMReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<!-- 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.
|
||||
@@ -394,5 +399,6 @@
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
|
||||
-->
|
||||
</Project>
|
||||
+36
-23
@@ -42,7 +42,7 @@ Public Class mgrBackup
|
||||
'Create manifest item
|
||||
oItem.Name = oGameInfo.Name
|
||||
'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.AbsolutePath = oGameInfo.AbsolutePath
|
||||
oItem.DateUpdated = dTimeStamp
|
||||
@@ -75,7 +75,7 @@ Public Class mgrBackup
|
||||
Using oStream
|
||||
If sList <> String.Empty Then
|
||||
For Each sTypeItem As String In sList.Split(":")
|
||||
oStream.WriteLine("""" & sBackupPath & "\" & sTypeItem & """")
|
||||
oStream.WriteLine("""" & sBackupPath & Path.DirectorySeparatorChar & sTypeItem & """")
|
||||
Next
|
||||
End If
|
||||
oStream.Flush()
|
||||
@@ -85,6 +85,28 @@ Public Class mgrBackup
|
||||
End Try
|
||||
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))
|
||||
Dim oGame As clsGame
|
||||
Dim bDoBackup As Boolean
|
||||
@@ -109,15 +131,8 @@ Public Class mgrBackup
|
||||
CancelOperation = False
|
||||
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
|
||||
sBackupFile = sBackupFile & "\" & oGame.Name
|
||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & oGame.Name
|
||||
Try
|
||||
If Not Directory.Exists(sBackupFile) Then
|
||||
Directory.CreateDirectory(sBackupFile)
|
||||
@@ -129,22 +144,15 @@ Public Class mgrBackup
|
||||
End If
|
||||
|
||||
If oGame.AppendTimeStamp Then
|
||||
sBackupFile = sBackupFile & "\" & oGame.Name & sTimeStamp & ".7z"
|
||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & oGame.Name & sTimeStamp & ".7z"
|
||||
Else
|
||||
sBackupFile = sBackupFile & "\" & 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
|
||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & oGame.Name & ".7z"
|
||||
End If
|
||||
|
||||
If bDoBackup Then
|
||||
If oGame.AbsolutePath = False Then
|
||||
If oGame.Path <> String.Empty Then
|
||||
sSavePath = oGame.ProcessPath & "\" & oGame.Path
|
||||
sSavePath = oGame.ProcessPath & Path.DirectorySeparatorChar & oGame.Path
|
||||
Else
|
||||
sSavePath = oGame.ProcessPath
|
||||
End If
|
||||
@@ -168,7 +176,12 @@ Public Class mgrBackup
|
||||
End If
|
||||
|
||||
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.UseShellExecute = False
|
||||
prs7z.StartInfo.RedirectStandardOutput = True
|
||||
@@ -186,7 +199,7 @@ Public Class mgrBackup
|
||||
prs7z.WaitForExit()
|
||||
If Not CancelOperation 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
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_BackupWarnings, oGame.Name), True, ToolTipIcon.Warning, True)
|
||||
@@ -203,7 +216,7 @@ Public Class mgrBackup
|
||||
If bBackupCompleted Then
|
||||
If oSettings.CheckSum Then
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_GenerateHash, oGame.Name), False, ToolTipIcon.Info, True)
|
||||
sHash = mgrHash.Generate_SHA256_Hash(sBackupFile)
|
||||
sHash = mgrHash.Generate_SHA256_Hash(sBackupFile)
|
||||
End If
|
||||
|
||||
If Not DoManifestUpdate(oGame, sBackupFile, dTimeStamp, sHash) Then
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
Imports GBM.My.Resources
|
||||
Imports System.Net
|
||||
Imports System.IO
|
||||
Imports System.Security.Principal
|
||||
|
||||
Public Class mgrCommon
|
||||
|
||||
@@ -19,6 +21,7 @@ Public Class mgrCommon
|
||||
Try
|
||||
Dim request As WebRequest = WebRequest.Create(URL)
|
||||
Dim response As WebResponse = request.GetResponse()
|
||||
response.Close()
|
||||
Catch ex As Exception
|
||||
Return False
|
||||
End Try
|
||||
@@ -96,6 +99,11 @@ Public Class mgrCommon
|
||||
Dim sExemptList As String() = {"dosbox", "scummvm"}
|
||||
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
|
||||
If oGame.ProcessName.ToLower.Contains(s) Then bFound = True
|
||||
Next
|
||||
@@ -107,12 +115,18 @@ Public Class mgrCommon
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function IsElevated() As Boolean
|
||||
If My.User.IsInRole(ApplicationServices.BuiltInRole.Administrator) Then
|
||||
Public Shared Function IsUnix() As Boolean
|
||||
If Path.DirectorySeparatorChar = "/" Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
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
|
||||
|
||||
Public Shared Sub RestartAsAdmin()
|
||||
@@ -126,6 +140,65 @@ Public Class mgrCommon
|
||||
oProcess.Start()
|
||||
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
|
||||
Public Shared Function ShowMessage(ByVal sMsg As String, ByVal oType As MsgBoxStyle) As MsgBoxResult
|
||||
Dim oResult As MsgBoxResult
|
||||
@@ -178,6 +251,15 @@ Public Class mgrCommon
|
||||
Return sString
|
||||
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
|
||||
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
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
Dim sSQL As String
|
||||
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("Name", oBackupItem.Name)
|
||||
|
||||
@@ -228,8 +228,8 @@ Public Class mgrMonitorList
|
||||
If frm.ShowDialog() = DialogResult.OK Then
|
||||
Cursor.Current = Cursors.WaitCursor
|
||||
|
||||
DoListAddUpdateSync(frm.ImportData)
|
||||
mgrTags.DoTagAddImport(frm.ImportData)
|
||||
DoListAddUpdateSync(frm.FinalData)
|
||||
mgrTags.DoTagAddImport(frm.FinalData)
|
||||
|
||||
Cursor.Current = Cursors.Default
|
||||
mgrCommon.ShowMessage(mgrMonitorList_ImportComplete, MsgBoxStyle.Information)
|
||||
@@ -243,7 +243,7 @@ Public Class mgrMonitorList
|
||||
|
||||
Public Shared Function DoImport(ByVal sPath As String) As Boolean
|
||||
If (sPath.IndexOf("http://", 0, StringComparison.CurrentCultureIgnoreCase) > -1) Or _
|
||||
(sPath.IndexOf("https://", 0, StringComparison.CurrentCultureIgnoreCase) > -1) Then
|
||||
(sPath.IndexOf("https://", 0, StringComparison.CurrentCultureIgnoreCase) > -1) Then
|
||||
If mgrCommon.CheckAddress(sPath) Then
|
||||
ImportMonitorList(sPath, True)
|
||||
Return True
|
||||
|
||||
+92
-62
@@ -5,10 +5,11 @@ Imports System.Reflection
|
||||
|
||||
Public Class mgrPath
|
||||
'Important Note: Any changes to sSettingsRoot & sDBLocation need to be mirrored in frmMain.vb -> VerifyGameDataPath
|
||||
Private Shared sSettingsRoot As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "\gbm"
|
||||
Private Shared sDBLocation As String = sSettingsRoot & "\gbm.s3db"
|
||||
Private Shared sIncludeFile As String = sSettingsRoot & "\gbm_include.txt"
|
||||
Private Shared sExcludeFile As String = sSettingsRoot & "\gbm_exclude.txt"
|
||||
Private Shared sSettingsRoot As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "/gbm"
|
||||
Private Shared sDBLocation As String = sSettingsRoot & "/gbm.s3db"
|
||||
Private Shared sIncludeFile As String = sSettingsRoot & "/gbm_include.txt"
|
||||
Private Shared sExcludeFile As String = sSettingsRoot & "/gbm_exclude.txt"
|
||||
Private Shared sLogFile As String = sSettingsRoot & "/gbm_log_" & Date.Now.ToString("dd-MM-yyyy-HH-mm-ss") & ".txt"
|
||||
Private Shared sRemoteDatabaseLocation As String
|
||||
Private Shared hshCustomVariables As Hashtable
|
||||
Private Shared oReleaseType As ProcessorArchitecture = AssemblyName.GetAssemblyName(Application.ExecutablePath()).ProcessorArchitecture
|
||||
@@ -38,20 +39,24 @@ Public Class mgrPath
|
||||
|
||||
Shared ReadOnly Property Utility7zLocation As String
|
||||
Get
|
||||
If mgrCommon.IsUnix Then
|
||||
Return "/usr/bin/7za"
|
||||
End If
|
||||
|
||||
Select Case oReleaseType
|
||||
Case ProcessorArchitecture.Amd64
|
||||
Return Application.StartupPath & "\Utilities\x64\7za.exe"
|
||||
Return Application.StartupPath & "/Utilities/x64/7za.exe"
|
||||
Case ProcessorArchitecture.IA64
|
||||
Return Application.StartupPath & "\Utilities\x64\7za.exe"
|
||||
Return Application.StartupPath & "/Utilities/x64/7za.exe"
|
||||
Case ProcessorArchitecture.MSIL
|
||||
Return Application.StartupPath & "\Utilities\x86\7za.exe"
|
||||
Return Application.StartupPath & "/Utilities/x86/7za.exe"
|
||||
Case ProcessorArchitecture.X86
|
||||
Return Application.StartupPath & "\Utilities\x86\7za.exe"
|
||||
Return Application.StartupPath & "/Utilities/x86/7za.exe"
|
||||
Case ProcessorArchitecture.None
|
||||
Return Application.StartupPath & "\Utilities\x86\7za.exe"
|
||||
Return Application.StartupPath & "/Utilities/x86/7za.exe"
|
||||
End Select
|
||||
|
||||
Return Application.StartupPath & "\Utilities\x86\7za.exe"
|
||||
Return Application.StartupPath & "/Utilities/x86/7za.exe"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -73,6 +78,12 @@ Public Class mgrPath
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Shared ReadOnly Property LogFileLocation As String
|
||||
Get
|
||||
Return sLogFile
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Shared ReadOnly Property SettingsRoot As String
|
||||
Get
|
||||
Return sSettingsRoot
|
||||
@@ -84,7 +95,7 @@ Public Class mgrPath
|
||||
Return sRemoteDatabaseLocation
|
||||
End Get
|
||||
Set(value As String)
|
||||
sRemoteDatabaseLocation = value & "\gbm.s3db"
|
||||
sRemoteDatabaseLocation = value & "/gbm.s3db"
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -111,20 +122,28 @@ Public Class mgrPath
|
||||
Dim i As Integer = 0
|
||||
Dim iRemove 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
|
||||
sProcessPath = sProcessPath.ToLower
|
||||
sSavePath = sSavePath.ToLower
|
||||
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
|
||||
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
|
||||
sProcessPath = sProcessPath.TrimEnd("\")
|
||||
sSavePath = sSavePath.TrimEnd("\")
|
||||
sProcessPath &= "\"
|
||||
sSavePath &= "\"
|
||||
sProcessPath = sProcessPath.TrimEnd(cDS)
|
||||
sSavePath = sSavePath.TrimEnd(cDS)
|
||||
sProcessPath &= cDS
|
||||
sSavePath &= cDS
|
||||
|
||||
|
||||
'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
|
||||
sPath2 = sSavePath
|
||||
bDeep = True
|
||||
@@ -135,8 +154,8 @@ Public Class mgrPath
|
||||
End If
|
||||
|
||||
'Build an array of folders to work with from each path
|
||||
sPath1Array = sPath1.Split("\")
|
||||
sPath2Array = sPath2.Split("\")
|
||||
sPath1Array = sPath1.Split(cDS)
|
||||
sPath2Array = sPath2.Split(cDS)
|
||||
|
||||
'Take the shortest path and remove the common folders from both
|
||||
For Each s As String In sPath1Array
|
||||
@@ -148,25 +167,25 @@ Public Class mgrPath
|
||||
Next
|
||||
|
||||
'Remove the trailing slashes
|
||||
sPath1 = sPath1.TrimEnd("\")
|
||||
sPath2 = sPath2.TrimEnd("\")
|
||||
sPath1 = sPath1.TrimEnd(cDS)
|
||||
sPath2 = sPath2.TrimEnd(cDS)
|
||||
|
||||
'Determine which way we go
|
||||
If bDeep Then
|
||||
If sPath1.Length > 0 Then
|
||||
iBackFolders = sPath1.Split("\").Length
|
||||
iBackFolders = sPath1.Split(cDS).Length
|
||||
End If
|
||||
sResult = sPath2
|
||||
Else
|
||||
If sPath2.Length > 0 Then
|
||||
iBackFolders = sPath2.Split("\").Length
|
||||
iBackFolders = sPath2.Split(cDS).Length
|
||||
End If
|
||||
sResult = sPath1
|
||||
End If
|
||||
|
||||
'Insert direction modifiers based on how many folders are left
|
||||
For i = 1 To iBackFolders
|
||||
sResult = "..\" & sResult
|
||||
sResult = ".." & cDS & sResult
|
||||
Next i
|
||||
|
||||
'Done
|
||||
@@ -181,13 +200,12 @@ Public Class mgrPath
|
||||
Dim sCurrentUser As String = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)
|
||||
Dim oCustomVariable As clsPathVariable
|
||||
|
||||
If sValue.Contains("*mydocs*") Then
|
||||
Return sValue.Replace("*mydocs*", sMyDocs)
|
||||
End If
|
||||
|
||||
If sValue.Contains("*publicdocs*") Then
|
||||
Return sValue.Replace("*publicdocs*", sPublicDocs)
|
||||
End If
|
||||
For Each oCustomVariable In hshCustomVariables.Values
|
||||
If sValue.Contains(oCustomVariable.FormattedName) Then
|
||||
Return sValue.Replace(oCustomVariable.FormattedName, oCustomVariable.Path)
|
||||
End If
|
||||
Next
|
||||
|
||||
If sValue.Contains("*appdatalocal*") Then
|
||||
Return sValue.Replace("*appdatalocal*", sAppDataLocal)
|
||||
@@ -197,15 +215,21 @@ Public Class mgrPath
|
||||
Return sValue.Replace("*appdataroaming*", sAppDataRoaming)
|
||||
End If
|
||||
|
||||
If sValue.Contains("*currentuser*") Then
|
||||
Return sValue.Replace("*currentuser*", sCurrentUser)
|
||||
'This needs to be tested last for Unix compatability
|
||||
If sValue.Contains("*mydocs*") Then
|
||||
Return sValue.Replace("*mydocs*", sMyDocs)
|
||||
End If
|
||||
|
||||
For Each oCustomVariable In hshCustomVariables.Values
|
||||
If sValue.Contains(oCustomVariable.FormattedName) Then
|
||||
Return sValue.Replace(oCustomVariable.FormattedName, oCustomVariable.Path)
|
||||
'Don't use these in Unix
|
||||
If Not mgrCommon.IsUnix Then
|
||||
If sValue.Contains("*publicdocs*") Then
|
||||
Return sValue.Replace("*publicdocs*", sPublicDocs)
|
||||
End If
|
||||
Next
|
||||
|
||||
If sValue.Contains("*currentuser*") Then
|
||||
Return sValue.Replace("*currentuser*", sCurrentUser)
|
||||
End If
|
||||
End If
|
||||
|
||||
Return sValue
|
||||
End Function
|
||||
@@ -218,13 +242,11 @@ Public Class mgrPath
|
||||
Dim sCurrentUser As String = "*currentuser*"
|
||||
Dim oCustomVariable As clsPathVariable
|
||||
|
||||
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)) Then
|
||||
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), sMyDocs)
|
||||
End If
|
||||
|
||||
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments)) Then
|
||||
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments), sPublicDocs)
|
||||
End If
|
||||
For Each oCustomVariable In hshCustomVariables.Values
|
||||
If sValue.Contains(oCustomVariable.Path) Then
|
||||
Return sValue.Replace(oCustomVariable.Path, oCustomVariable.FormattedName)
|
||||
End If
|
||||
Next
|
||||
|
||||
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)) Then
|
||||
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)
|
||||
End If
|
||||
|
||||
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)) Then
|
||||
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), sCurrentUser)
|
||||
'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
|
||||
|
||||
For Each oCustomVariable In hshCustomVariables.Values
|
||||
If sValue.Contains(oCustomVariable.Path) Then
|
||||
Return sValue.Replace(oCustomVariable.Path, oCustomVariable.FormattedName)
|
||||
'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
|
||||
Next
|
||||
|
||||
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)) Then
|
||||
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), sCurrentUser)
|
||||
End If
|
||||
End If
|
||||
|
||||
Return sValue
|
||||
End Function
|
||||
@@ -252,11 +280,16 @@ Public Class mgrPath
|
||||
Dim hshCustomVariables As Hashtable = mgrVariables.ReadVariables
|
||||
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.LocalApplicationData))
|
||||
hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.UserProfile))
|
||||
|
||||
'Don't use these in Unix
|
||||
If Not mgrCommon.IsUnix Then
|
||||
hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments))
|
||||
hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments))
|
||||
hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.UserProfile))
|
||||
End If
|
||||
|
||||
'Load Custom Variables
|
||||
For Each oCustomVariable In hshCustomVariables.Values
|
||||
@@ -313,6 +346,7 @@ Public Class mgrPath
|
||||
Dim sFolder As String = String.Empty
|
||||
Dim bSearchFailed As Boolean = False
|
||||
|
||||
frmFind.GameName = sGameName
|
||||
frmFind.SearchItem = sProcess & ".*"
|
||||
frmFind.FolderSearch = False
|
||||
|
||||
@@ -333,13 +367,7 @@ Public Class mgrPath
|
||||
frmFind.ShowDialog()
|
||||
|
||||
If frmFind.FoundItem <> String.Empty Then
|
||||
sFolder = IO.Path.GetDirectoryName(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
|
||||
Return frmFind.FoundItem
|
||||
Else
|
||||
bSearchFailed = True
|
||||
End If
|
||||
@@ -353,6 +381,8 @@ Public Class mgrPath
|
||||
If mgrCommon.ShowMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
sFolder = SetManualgamePath()
|
||||
End If
|
||||
|
||||
frmFind.Dispose()
|
||||
End If
|
||||
|
||||
Return sFolder
|
||||
|
||||
@@ -85,12 +85,69 @@ Public Class mgrProcesses
|
||||
Next
|
||||
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 sProcessCheck As String = String.Empty
|
||||
Dim sProcessList As String = String.Empty
|
||||
Dim bWineProcess As Boolean = False
|
||||
|
||||
For Each prsCurrent As Process In prsList
|
||||
sProcessCheck = prsCurrent.ProcessName
|
||||
'This needs to be wrapped due to issues with Mono.
|
||||
Try
|
||||
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
|
||||
prsFoundProcess = prsCurrent
|
||||
@@ -105,7 +162,11 @@ Public Class mgrProcesses
|
||||
|
||||
If Not oGame.AbsolutePath Or oGame.Duplicate Then
|
||||
Try
|
||||
oGame.ProcessPath = Path.GetDirectoryName(prsCurrent.MainModule.FileName)
|
||||
If Not bWineProcess Then
|
||||
oGame.ProcessPath = Path.GetDirectoryName(prsCurrent.MainModule.FileName)
|
||||
Else
|
||||
oGame.ProcessPath = GetUnixSymLinkDirectory(prsCurrent)
|
||||
End If
|
||||
Catch exWin32 As System.ComponentModel.Win32Exception
|
||||
'If an exception occurs the process is:
|
||||
'Running as administrator and the app isn't.
|
||||
@@ -117,10 +178,12 @@ Public Class mgrProcesses
|
||||
bNeedsPath = True
|
||||
iErrorCode = 299
|
||||
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.
|
||||
Return False
|
||||
End If
|
||||
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.
|
||||
Return False
|
||||
End Try
|
||||
@@ -137,6 +200,8 @@ Public Class mgrProcesses
|
||||
End If
|
||||
Next
|
||||
|
||||
If bDebugMode Then mgrCommon.SaveText(sProcessList, mgrPath.SettingsRoot & "/gbm_process_list.txt")
|
||||
|
||||
Return False
|
||||
End Function
|
||||
|
||||
|
||||
+104
-102
@@ -28,39 +28,28 @@ Public Class mgrRestore
|
||||
Public Event UpdateRestoreInfo(oRestoreInfo As clsBackup)
|
||||
Public Event SetLastAction(sMessage As String)
|
||||
|
||||
Private Shared Function CheckForPathOverride(ByRef oCheckBackup As clsBackup, ByVal oCheckGame As clsGame) As Boolean
|
||||
Dim oResult As MsgBoxResult
|
||||
|
||||
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
|
||||
oCheckBackup.AbsolutePath = True
|
||||
oCheckBackup.RestorePath = oCheckGame.Path
|
||||
Else
|
||||
oCheckBackup.RestorePath = oCheckGame.Path
|
||||
End If
|
||||
ElseIf oResult = MsgBoxResult.Cancel Then
|
||||
Return False
|
||||
Public Shared Sub DoPathOverride(ByRef oCheckBackup As clsBackup, ByVal oCheckGame As clsGame)
|
||||
'Always override the manifest restore path with the current configuration path if possible
|
||||
If Not oCheckGame.Temporary Then
|
||||
If Path.IsPathRooted(oCheckGame.Path) Then
|
||||
oCheckBackup.AbsolutePath = True
|
||||
Else
|
||||
oCheckBackup.AbsolutePath = False
|
||||
End If
|
||||
oCheckBackup.RestorePath = oCheckGame.Path
|
||||
End If
|
||||
|
||||
Return True
|
||||
End Function
|
||||
End Sub
|
||||
|
||||
Public Shared Function CheckPath(ByRef oRestoreInfo As clsBackup, ByVal oGame As clsGame, ByRef bTriggerReload As Boolean) As Boolean
|
||||
Dim sProcess As String
|
||||
Dim sRestorePath As String
|
||||
Dim bNoAuto As Boolean
|
||||
|
||||
'Before we do anything check if we need to override the current path
|
||||
If Not CheckForPathOverride(oRestoreInfo, oGame) Then
|
||||
Return False
|
||||
End If
|
||||
DoPathOverride(oRestoreInfo, oGame)
|
||||
|
||||
If Not oRestoreInfo.AbsolutePath Then
|
||||
If oGame.ProcessPath <> String.Empty Then
|
||||
oRestoreInfo.RelativeRestorePath = oGame.ProcessPath & "\" & oRestoreInfo.RestorePath
|
||||
oRestoreInfo.RelativeRestorePath = oGame.ProcessPath & Path.DirectorySeparatorChar & oRestoreInfo.RestorePath
|
||||
Else
|
||||
sProcess = oGame.TrueProcess
|
||||
If mgrCommon.IsProcessNotSearchable(oGame) Then bNoAuto = True
|
||||
@@ -73,7 +62,7 @@ Public Class mgrRestore
|
||||
bTriggerReload = True
|
||||
|
||||
'Set path for restore
|
||||
oRestoreInfo.RelativeRestorePath = sRestorePath & "\" & oRestoreInfo.RestorePath
|
||||
oRestoreInfo.RelativeRestorePath = sRestorePath & Path.DirectorySeparatorChar & oRestoreInfo.RestorePath
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
@@ -172,20 +161,64 @@ Public Class mgrRestore
|
||||
Return slRemovedItems
|
||||
End Function
|
||||
|
||||
Public Function CheckRestorePrereq(ByVal oBackupInfo As clsBackup) As Boolean
|
||||
Dim sHash As String
|
||||
Dim sExtractPath As String
|
||||
Dim sBackupFile As String = oSettings.BackupFolder & Path.DirectorySeparatorChar & oBackupInfo.FileName
|
||||
|
||||
If oBackupInfo.AbsolutePath Then
|
||||
sExtractPath = oBackupInfo.RestorePath
|
||||
Else
|
||||
sExtractPath = oBackupInfo.RelativeRestorePath
|
||||
End If
|
||||
|
||||
'Check if restore location exists, prompt to create if it doesn't.
|
||||
If Not Directory.Exists(sExtractPath) Then
|
||||
If mgrCommon.ShowMessage(mgrRestore_ConfirmCreatePath, sExtractPath, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
Try
|
||||
Directory.CreateDirectory(sExtractPath)
|
||||
Catch ex As Exception
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorCreatePath, ex.Message), False, ToolTipIcon.Error, True)
|
||||
Return False
|
||||
End Try
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorNoPath, sExtractPath), False, ToolTipIcon.Error, True)
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
|
||||
'Check file integrity
|
||||
If oSettings.CheckSum Then
|
||||
If oBackupInfo.CheckSum <> String.Empty Then
|
||||
sHash = mgrHash.Generate_SHA256_Hash(sBackupFile)
|
||||
If sHash <> oBackupInfo.CheckSum Then
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorFailedCheck, oBackupInfo.Name), False, ToolTipIcon.Info, True)
|
||||
If mgrCommon.ShowMessage(mgrRestore_ConfirmFailedCheck, oBackupInfo.Name, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
RaiseEvent UpdateLog(mgrRestore_ErrorCheckAbort, False, ToolTipIcon.Info, True)
|
||||
Return False
|
||||
End If
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_Verified, oBackupInfo.Name), False, ToolTipIcon.Info, True)
|
||||
End If
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_NoVerify, oBackupInfo.Name), False, ToolTipIcon.Info, True)
|
||||
End If
|
||||
End If
|
||||
|
||||
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 bDoRestore As Boolean
|
||||
Dim bRestoreCompleted As Boolean
|
||||
Dim sHash As String
|
||||
|
||||
For Each oBackupInfo In oRestoreList
|
||||
'Init
|
||||
prs7z = New Process
|
||||
sBackupFile = oSettings.BackupFolder & "\" & oBackupInfo.FileName
|
||||
sBackupFile = oSettings.BackupFolder & Path.DirectorySeparatorChar & oBackupInfo.FileName
|
||||
sExtractPath = String.Empty
|
||||
bDoRestore = True
|
||||
bRestoreCompleted = False
|
||||
CancelOperation = False
|
||||
RaiseEvent UpdateRestoreInfo(oBackupInfo)
|
||||
@@ -196,90 +229,59 @@ Public Class mgrRestore
|
||||
sExtractPath = oBackupInfo.RelativeRestorePath
|
||||
End If
|
||||
|
||||
'Check if restore location exists, prompt to create if it doesn't.
|
||||
If Not Directory.Exists(sExtractPath) Then
|
||||
If mgrCommon.ShowMessage(mgrRestore_ConfirmCreatePath, sExtractPath, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
Try
|
||||
Directory.CreateDirectory(sExtractPath)
|
||||
Catch ex As Exception
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorCreatePath, ex.Message), False, ToolTipIcon.Error, True)
|
||||
bDoRestore = False
|
||||
End Try
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorNoPath, sExtractPath), False, ToolTipIcon.Error, True)
|
||||
bDoRestore = False
|
||||
End If
|
||||
End If
|
||||
|
||||
'Check file integrity
|
||||
If oSettings.CheckSum Then
|
||||
If oBackupInfo.CheckSum <> String.Empty Then
|
||||
sHash = mgrHash.Generate_SHA256_Hash(sBackupFile)
|
||||
If sHash <> oBackupInfo.CheckSum Then
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorFailedCheck, oBackupInfo.Name), False, ToolTipIcon.Info, True)
|
||||
If mgrCommon.ShowMessage(mgrRestore_ConfirmFailedCheck, oBackupInfo.Name, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
RaiseEvent UpdateLog(mgrRestore_ErrorCheckAbort, False, ToolTipIcon.Info, True)
|
||||
bDoRestore = False
|
||||
End If
|
||||
Try
|
||||
If File.Exists(sBackupFile) Then
|
||||
If mgrCommon.IsUnix Then
|
||||
prs7z.StartInfo.Arguments = "x """ & sBackupFile & """ -o""" & sExtractPath & Path.DirectorySeparatorChar & """ -aoa -r"
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_Verified, oBackupInfo.Name), False, ToolTipIcon.Info, True)
|
||||
prs7z.StartInfo.Arguments = "x -bb1 -bt """ & sBackupFile & """ -o""" & sExtractPath & Path.DirectorySeparatorChar & """ -aoa -r"
|
||||
End If
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_NoVerify, oBackupInfo.Name), False, ToolTipIcon.Info, True)
|
||||
End If
|
||||
End If
|
||||
|
||||
If bDoRestore Then
|
||||
Try
|
||||
If File.Exists(sBackupFile) Then
|
||||
prs7z.StartInfo.Arguments = "x """ & sBackupFile & """ -o""" & sExtractPath & "\"" -aoa -r"
|
||||
prs7z.StartInfo.FileName = mgrPath.Utility7zLocation
|
||||
prs7z.StartInfo.UseShellExecute = False
|
||||
prs7z.StartInfo.RedirectStandardOutput = True
|
||||
prs7z.StartInfo.CreateNoWindow = True
|
||||
prs7z.Start()
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_RestoreInProgress, sExtractPath), False, ToolTipIcon.Info, True)
|
||||
While Not prs7z.StandardOutput.EndOfStream
|
||||
If CancelOperation Then
|
||||
prs7z.Kill()
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorFullAbort, oBackupInfo.Name), True, ToolTipIcon.Error, True)
|
||||
Exit While
|
||||
End If
|
||||
RaiseEvent UpdateLog(prs7z.StandardOutput.ReadLine, False, ToolTipIcon.Info, False)
|
||||
End While
|
||||
prs7z.WaitForExit()
|
||||
If Not CancelOperation Then
|
||||
If prs7z.ExitCode = 0 Then
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_RestoreComplete, oBackupInfo.Name), False, ToolTipIcon.Info, True)
|
||||
bRestoreCompleted = True
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_RestoreWarnings, oBackupInfo.Name), True, ToolTipIcon.Warning, True)
|
||||
bRestoreCompleted = False
|
||||
End If
|
||||
prs7z.StartInfo.FileName = mgrPath.Utility7zLocation
|
||||
prs7z.StartInfo.UseShellExecute = False
|
||||
prs7z.StartInfo.RedirectStandardOutput = True
|
||||
prs7z.StartInfo.CreateNoWindow = True
|
||||
prs7z.Start()
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_RestoreInProgress, sExtractPath), False, ToolTipIcon.Info, True)
|
||||
While Not prs7z.StandardOutput.EndOfStream
|
||||
If CancelOperation Then
|
||||
prs7z.Kill()
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorFullAbort, oBackupInfo.Name), True, ToolTipIcon.Error, True)
|
||||
Exit While
|
||||
End If
|
||||
prs7z.Dispose()
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrRestore_ErrorNoBackup, True, ToolTipIcon.Error, True)
|
||||
End If
|
||||
|
||||
If bRestoreCompleted Then
|
||||
'Save Local Manifest
|
||||
If mgrManifest.DoManifestCheck(oBackupInfo.Name, mgrSQLite.Database.Local) Then
|
||||
mgrManifest.DoManifestUpdate(oBackupInfo, mgrSQLite.Database.Local)
|
||||
RaiseEvent UpdateLog(prs7z.StandardOutput.ReadLine, False, ToolTipIcon.Info, False)
|
||||
End While
|
||||
prs7z.WaitForExit()
|
||||
If Not CancelOperation Then
|
||||
If prs7z.ExitCode = 0 Then
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_RestoreComplete, oBackupInfo.Name), False, ToolTipIcon.Info, True)
|
||||
bRestoreCompleted = True
|
||||
Else
|
||||
mgrManifest.DoManifestAdd(oBackupInfo, mgrSQLite.Database.Local)
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_RestoreWarnings, oBackupInfo.Name), True, ToolTipIcon.Warning, True)
|
||||
bRestoreCompleted = False
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorOtherFailure, ex.Message), False, ToolTipIcon.Error, True)
|
||||
End Try
|
||||
prs7z.Dispose()
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrRestore_ErrorNoBackup, True, ToolTipIcon.Error, True)
|
||||
End If
|
||||
|
||||
If bRestoreCompleted Then
|
||||
RaiseEvent SetLastAction(mgrCommon.FormatString(mgrRestore_ActionComplete, oBackupInfo.CroppedName))
|
||||
Else
|
||||
RaiseEvent SetLastAction(mgrCommon.FormatString(mgrRestore_ActionFailed, oBackupInfo.CroppedName))
|
||||
'Save Local Manifest
|
||||
If mgrManifest.DoManifestCheck(oBackupInfo.Name, mgrSQLite.Database.Local) Then
|
||||
mgrManifest.DoManifestUpdate(oBackupInfo, mgrSQLite.Database.Local)
|
||||
Else
|
||||
mgrManifest.DoManifestAdd(oBackupInfo, mgrSQLite.Database.Local)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorOtherFailure, ex.Message), False, ToolTipIcon.Error, True)
|
||||
End Try
|
||||
|
||||
If bRestoreCompleted Then
|
||||
RaiseEvent SetLastAction(mgrCommon.FormatString(mgrRestore_ActionComplete, oBackupInfo.CroppedName))
|
||||
Else
|
||||
RaiseEvent SetLastAction(mgrCommon.FormatString(mgrRestore_ActionFailed, oBackupInfo.CroppedName))
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Imports GBM.My.Resources
|
||||
Imports System.IO
|
||||
Imports System.Data.SQLite
|
||||
Imports Mono.Data.Sqlite
|
||||
|
||||
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, " &
|
||||
"DisableConfirmation BOOLEAN NOT NULL, CreateSubFolder BOOLEAN NOT NULL, ShowOverwriteWarning BOOLEAN NOT NULL, RestoreOnLaunch BOOLEAN NOT NULL, " &
|
||||
"BackupFolder TEXT NOT NULL, Sync BOOLEAN NOT NULL, CheckSum BOOLEAN NOT NULL, StartWithWindows BOOLEAN NOT NULL, TimeTracking BOOLEAN NOT NULL, " &
|
||||
"SupressBackup BOOLEAN NOT NULL, SupressBackupThreshold INTEGER NOT NULL);"
|
||||
"SupressBackup BOOLEAN NOT NULL, SupressBackupThreshold INTEGER NOT NULL, CompressionLevel INTEGER NOT NULL);"
|
||||
|
||||
'Add Tables (Monitor List)
|
||||
sSql &= "CREATE TABLE monitorlist (MonitorID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL, Process TEXT NOT NULL, Path TEXT, " &
|
||||
@@ -232,7 +232,8 @@ Public Class mgrSQLite
|
||||
BuildParams(command, hshParams)
|
||||
|
||||
Try
|
||||
adapter = New SQLiteDataAdapter(command)
|
||||
adapter = New SqliteDataAdapter()
|
||||
adapter.SelectCommand = command
|
||||
adapter.Fill(oData)
|
||||
Catch ex As Exception
|
||||
mgrCommon.ShowMessage(mgrSQLite_ErrorQueryFailure, New String() {sSQL, ex.Message}, MsgBoxStyle.Exclamation)
|
||||
@@ -506,6 +507,29 @@ Public Class mgrSQLite
|
||||
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
|
||||
|
||||
Public Function GetDBSize() As Long
|
||||
|
||||
@@ -14,6 +14,7 @@ Public Class mgrSettings
|
||||
Private bTimeTracking As Boolean = True
|
||||
Private bSupressBackup As Boolean = False
|
||||
Private iSupressBackupThreshold As Integer = 10
|
||||
Private iCompressionLevel As Integer = 5
|
||||
Private sBackupFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments).TrimEnd(New Char() {"\", "/"})
|
||||
|
||||
Property StartWithWindows As Boolean
|
||||
@@ -133,6 +134,15 @@ Public Class mgrSettings
|
||||
End Set
|
||||
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
|
||||
Get
|
||||
Return sBackupFolder
|
||||
@@ -152,7 +162,7 @@ Public Class mgrSettings
|
||||
|
||||
sSQL = "INSERT INTO settings VALUES (1, @MonitorOnStartup, @StartToTray, @ShowDetectionToolTips, @DisableConfirmation, "
|
||||
sSQL &= "@CreateSubFolder, @ShowOverwriteWarning, @RestoreOnLaunch, @BackupFolder, @Sync, @CheckSum, @StartWithWindows, "
|
||||
sSQL &= "@TimeTracking, @SupressBackup, @SupressBackupThreshold)"
|
||||
sSQL &= "@TimeTracking, @SupressBackup, @SupressBackupThreshold, @CompressionLevel)"
|
||||
|
||||
hshParams.Add("MonitorOnStartup", MonitorOnStartup)
|
||||
hshParams.Add("StartToTray", StartToTray)
|
||||
@@ -168,6 +178,7 @@ Public Class mgrSettings
|
||||
hshParams.Add("TimeTracking", TimeTracking)
|
||||
hshParams.Add("SupressBackup", SupressBackup)
|
||||
hshParams.Add("SupressBackupThreshold", SupressBackupThreshold)
|
||||
hshParams.Add("CompressionLevel", CompressionLevel)
|
||||
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
End Sub
|
||||
@@ -197,6 +208,7 @@ Public Class mgrSettings
|
||||
TimeTracking = CBool(dr("TimeTracking"))
|
||||
SupressBackup = CBool(dr("SupressBackup"))
|
||||
SupressBackupThreshold = CInt(dr("SupressBackupThreshold"))
|
||||
CompressionLevel = CInt(dr("CompressionLevel"))
|
||||
Next
|
||||
|
||||
oDatabase.Disconnect()
|
||||
|
||||
@@ -33,7 +33,7 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("0.95.*")>
|
||||
<Assembly: AssemblyFileVersion("0.95.0.0")>
|
||||
<Assembly: AssemblyVersion("0.96.*")>
|
||||
<Assembly: AssemblyFileVersion("0.96.0.0")>
|
||||
|
||||
<Assembly: NeutralResourcesLanguageAttribute("en")>
|
||||
Generated
+376
-34
@@ -70,7 +70,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to 2015 Michael J. Seiferling.
|
||||
''' Looks up a localized string similar to [PARAM] Michael J. Seiferling.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property App_Copyright() As String
|
||||
Get
|
||||
@@ -78,6 +78,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
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>
|
||||
''' Looks up a localized string similar to [PARAM] KB.
|
||||
'''</summary>
|
||||
@@ -429,24 +438,6 @@ Namespace My.Resources
|
||||
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_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>
|
||||
''' Looks up a localized string similar to Save Path.
|
||||
'''</summary>
|
||||
@@ -484,7 +475,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<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>
|
||||
Friend ReadOnly Property frmAddWizard_lblStep1Instructions() As String
|
||||
Get
|
||||
@@ -511,7 +502,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Some games use launchers. Do not monitor launchers, be sure to choose the game'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's actual exe file. You may drag and drop a shortcut here to complete this step, only Windows shortcuts are currently supported..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmAddWizard_lblStep2Instructions() As String
|
||||
Get
|
||||
@@ -717,6 +708,60 @@ Namespace My.Resources
|
||||
End Get
|
||||
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>
|
||||
''' Looks up a localized string similar to Import Game Configurations.
|
||||
'''</summary>
|
||||
@@ -727,16 +772,16 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to [PARAM] new configurations available..
|
||||
''' Looks up a localized string similar to Filter:.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmAdvancedImport_NewConfigs() As String
|
||||
Friend ReadOnly Property frmAdvancedImport_lblFilter() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmAdvancedImport_NewConfigs", resourceCulture)
|
||||
Return ResourceManager.GetString("frmAdvancedImport_lblFilter", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to [PARAM] Selected.
|
||||
''' Looks up a localized string similar to Selected ([PARAM]).
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmAdvancedImport_Selected() As String
|
||||
Get
|
||||
@@ -789,6 +834,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to &OK.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmFileFolderSearch_btnOk() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmFileFolderSearch_btnOk", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Search.
|
||||
'''</summary>
|
||||
@@ -799,7 +853,34 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<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>
|
||||
Friend ReadOnly Property frmFileFolderSearch_SwitchDrives() As String
|
||||
Get
|
||||
@@ -1374,6 +1455,24 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to You appear to be using a Unix based operating system. The official list currently contains only Microsoft Windows game configurations.[BR][BR]Do you wish to continue?.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_ConfirmUnixImportWarning() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_ConfirmUnixImportWarning", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Game Backup Monitor Export.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmGameManager_DefaultExportFileName() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmGameManager_DefaultExportFileName", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to A game with this exact name and process already exists..
|
||||
'''</summary>
|
||||
@@ -2040,6 +2139,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
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>
|
||||
''' Looks up a localized string similar to Backup in Progress....
|
||||
'''</summary>
|
||||
@@ -2085,6 +2193,33 @@ Namespace My.Resources
|
||||
End Get
|
||||
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>
|
||||
''' Looks up a localized string similar to Do you wish to backup data from [PARAM]?.
|
||||
'''</summary>
|
||||
@@ -2094,6 +2229,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
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>
|
||||
''' 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>
|
||||
@@ -2130,6 +2274,33 @@ Namespace My.Resources
|
||||
End Get
|
||||
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>
|
||||
''' Looks up a localized string similar to [PARAM] is a 64-bit game, GBM cannot detect the required information to save your backup..
|
||||
'''</summary>
|
||||
@@ -2140,7 +2311,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<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>
|
||||
Friend ReadOnly Property frmMain_Error7zip() As String
|
||||
Get
|
||||
@@ -2211,6 +2382,24 @@ Namespace My.Resources
|
||||
End Get
|
||||
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>
|
||||
''' 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>
|
||||
@@ -2238,6 +2427,24 @@ Namespace My.Resources
|
||||
End Get
|
||||
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>
|
||||
''' 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>
|
||||
@@ -2427,6 +2634,24 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to &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 &Save.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmMain_gMonLogSave() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmMain_gMonLogSave", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to &Setup.
|
||||
'''</summary>
|
||||
@@ -2517,6 +2742,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to &Log.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmMain_gMonToolsLog() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmMain_gMonToolsLog", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Show / Hide.
|
||||
'''</summary>
|
||||
@@ -2571,6 +2805,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
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>
|
||||
''' Looks up a localized string similar to The local manifest is clean..
|
||||
'''</summary>
|
||||
@@ -2706,6 +2949,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
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>
|
||||
''' Looks up a localized string similar to Remote Database Vacuum Completed: [PARAM] KB.
|
||||
'''</summary>
|
||||
@@ -2769,6 +3021,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
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>
|
||||
''' Looks up a localized string similar to the unidentified game.
|
||||
'''</summary>
|
||||
@@ -2832,6 +3093,60 @@ Namespace My.Resources
|
||||
End Get
|
||||
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>
|
||||
''' Looks up a localized string similar to Disable backup confirmation.
|
||||
'''</summary>
|
||||
@@ -2958,6 +3273,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
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>
|
||||
''' Looks up a localized string similar to Backup and Restore.
|
||||
'''</summary>
|
||||
@@ -2986,7 +3310,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Backup Folder.
|
||||
''' Looks up a localized string similar to Backup Folder:.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_lblBackupFolder() As String
|
||||
Get
|
||||
@@ -2994,6 +3318,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
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>
|
||||
''' Looks up a localized string similar to minutes.
|
||||
'''</summary>
|
||||
@@ -3638,7 +3971,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to [PARAM] backup completed.
|
||||
''' Looks up a localized string similar to [PARAM] backup completed..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property mgrBackup_ActionComplete() As String
|
||||
Get
|
||||
@@ -3647,7 +3980,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to [PARAM] backup failed.
|
||||
''' Looks up a localized string similar to [PARAM] backup failed..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property mgrBackup_ActionFailed() As String
|
||||
Get
|
||||
@@ -3656,7 +3989,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to [PARAM] backup completed..
|
||||
''' Looks up a localized string similar to [PARAM] backup ([PARAM]) completed. .
|
||||
'''</summary>
|
||||
Friend ReadOnly Property mgrBackup_BackupComplete() As String
|
||||
Get
|
||||
@@ -3782,7 +4115,16 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<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>
|
||||
Friend ReadOnly Property mgrCommon_FilesFilter() As String
|
||||
Get
|
||||
@@ -3953,7 +4295,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to [PARAM] backup restored.
|
||||
''' Looks up a localized string similar to [PARAM] backup restored..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property mgrRestore_ActionComplete() As String
|
||||
Get
|
||||
@@ -3962,7 +4304,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to [PARAM] restore failed.
|
||||
''' Looks up a localized string similar to [PARAM] restore failed..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property mgrRestore_ActionFailed() As String
|
||||
Get
|
||||
|
||||
+135
-21
@@ -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>
|
||||
</data>
|
||||
<data name="App_Copyright" xml:space="preserve">
|
||||
<value>2015 Michael J. Seiferling</value>
|
||||
<value>[PARAM] Michael J. Seiferling</value>
|
||||
</data>
|
||||
<data name="frmMain_Exit" xml:space="preserve">
|
||||
<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>
|
||||
</data>
|
||||
<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 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>
|
||||
@@ -772,12 +772,6 @@
|
||||
<data name="frmAddWizard_ItemsSelectedNone" xml:space="preserve">
|
||||
<value>0 item(s) selected</value>
|
||||
</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">
|
||||
<value>Save Path</value>
|
||||
</data>
|
||||
@@ -791,7 +785,7 @@
|
||||
<value>Saved Game Folder:</value>
|
||||
</data>
|
||||
<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 name="frmAddWizard_lblStep1Intro" xml:space="preserve">
|
||||
<value>Enter the name of the game to monitor:</value>
|
||||
@@ -800,7 +794,7 @@
|
||||
<value>Game Name</value>
|
||||
</data>
|
||||
<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 name="frmAddWizard_lblStep2Intro" xml:space="preserve">
|
||||
<value>Choose the game's executable file or shortcut:</value>
|
||||
@@ -871,11 +865,11 @@
|
||||
<data name="frmAdvancedImport_FormName" xml:space="preserve">
|
||||
<value>Import Game Configurations</value>
|
||||
</data>
|
||||
<data name="frmAdvancedImport_NewConfigs" xml:space="preserve">
|
||||
<value>[PARAM] new configurations available.</value>
|
||||
<data name="frmAdvancedImport_Configs" xml:space="preserve">
|
||||
<value>Configurations ([PARAM])</value>
|
||||
</data>
|
||||
<data name="frmAdvancedImport_Selected" xml:space="preserve">
|
||||
<value>[PARAM] Selected</value>
|
||||
<value>Selected ([PARAM])</value>
|
||||
</data>
|
||||
<data name="frmChooseGame_btnCancel" xml:space="preserve">
|
||||
<value>&Cancel</value>
|
||||
@@ -896,7 +890,7 @@
|
||||
<value>Search</value>
|
||||
</data>
|
||||
<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 name="frmFilter_btnAdd" xml:space="preserve">
|
||||
<value>></value>
|
||||
@@ -1133,7 +1127,7 @@
|
||||
<value>Paths</value>
|
||||
</data>
|
||||
<data name="frmSettings_lblBackupFolder" xml:space="preserve">
|
||||
<value>Backup Folder</value>
|
||||
<value>Backup Folder:</value>
|
||||
</data>
|
||||
<data name="frmSettings_lblMinutes" xml:space="preserve">
|
||||
<value>minutes</value>
|
||||
@@ -1307,13 +1301,13 @@
|
||||
<value>Do you wish to manually set the game path? (Path will be saved)</value>
|
||||
</data>
|
||||
<data name="mgrBackup_ActionComplete" xml:space="preserve">
|
||||
<value>[PARAM] backup completed</value>
|
||||
<value>[PARAM] backup completed.</value>
|
||||
</data>
|
||||
<data name="mgrBackup_ActionFailed" xml:space="preserve">
|
||||
<value>[PARAM] backup failed</value>
|
||||
<value>[PARAM] backup failed.</value>
|
||||
</data>
|
||||
<data name="mgrBackup_BackupComplete" xml:space="preserve">
|
||||
<value>[PARAM] backup completed.</value>
|
||||
<value>[PARAM] backup ([PARAM]) completed. </value>
|
||||
</data>
|
||||
<data name="mgrBackup_BackupInProgress" xml:space="preserve">
|
||||
<value>Backup of [PARAM] in progress...</value>
|
||||
@@ -1355,7 +1349,7 @@
|
||||
<value>Generating SHA-256 hash for [PARAM] backup file.</value>
|
||||
</data>
|
||||
<data name="mgrCommon_FilesFilter" xml:space="preserve">
|
||||
<value>[PARAM] files (*.[PARAM])|*.[PARAM]</value>
|
||||
<value>[PARAM] files (*.[PARAM])|*.[PARAM]|All files (*.*)|*.*</value>
|
||||
</data>
|
||||
<data name="mgrCommon_No" xml:space="preserve">
|
||||
<value>No</value>
|
||||
@@ -1412,10 +1406,10 @@
|
||||
<value>[PARAM] was located in the following folder:[BR][BR][PARAM][BR][BR]Is this correct?</value>
|
||||
</data>
|
||||
<data name="mgrRestore_ActionComplete" xml:space="preserve">
|
||||
<value>[PARAM] backup restored</value>
|
||||
<value>[PARAM] backup restored.</value>
|
||||
</data>
|
||||
<data name="mgrRestore_ActionFailed" xml:space="preserve">
|
||||
<value>[PARAM] restore failed</value>
|
||||
<value>[PARAM] restore failed.</value>
|
||||
</data>
|
||||
<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>
|
||||
@@ -1483,4 +1477,124 @@
|
||||
<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>
|
||||
</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>&Clear</value>
|
||||
</data>
|
||||
<data name="frmMain_gMonLogSave" xml:space="preserve">
|
||||
<value>&Save</value>
|
||||
</data>
|
||||
<data name="frmMain_gMonToolsLog" xml:space="preserve">
|
||||
<value>&Log</value>
|
||||
</data>
|
||||
<data name="frmMain_LogAutoSave" xml:space="preserve">
|
||||
<value>The session log has been cleared due to size and auto-saved to [PARAM].</value>
|
||||
</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>&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>
|
||||
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
@@ -1,36 +1,49 @@
|
||||
Game Backup Monitor v0.95 Readme
|
||||
Game Backup Monitor v0.96 Readme
|
||||
http://mikemaximus.github.io/gbm-web/
|
||||
gamebackupmonitor@gmail.com
|
||||
|
||||
January 1, 2016
|
||||
March 24, 2016
|
||||
|
||||
Disclaimer:
|
||||
|
||||
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.
|
||||
- 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.
|
||||
For more information regarding Linux support read the FAQ at http://mikemaximus.github.io/gbm-web/linux.html
|
||||
|
||||
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.
|
||||
- (All) Overhauled the Import screen for better usability. Added game tags, simple filtering, sorting and general fixes.
|
||||
- (Linux) Fixed some bad code causing the "Official Import" connection to time out when making multiple connections in the same session.
|
||||
- (Linux) Fixed cross-platform issues with opening backup files and restore locations from the Game Manager.
|
||||
- (All) Backup files opened from the Game Manager will now open directly in the app they are associated with, like 7-Zip GUI or File Roller.
|
||||
- (Linux) Fixed cross-platform issues with automatic file/folder searching. It's now enabled on Linux.
|
||||
- (All) GBM now restores saved games to the currently configured saved game path by default. The stored manfiest location is only used when there's no configuration for the game.
|
||||
- (Linux) Added Linux support via Mono!
|
||||
- (All) Replaced System.Data.SQLite with the Mono.Data.Sqlite for cross-platform support.
|
||||
- (Windows) Updated GBM's version of 7-Zip to 15.14 (2015-12-31)
|
||||
- (All) Added the ability to set the 7-Zip compression level on the Settings screen.
|
||||
- (Windows) GBM now deletes all user files to the Windows recycle bin by default.
|
||||
- (All) Added the ability to clear and save the session log from the Tools menu.
|
||||
- (All) GBM now auto-saves and clears the session log to %localappdata%\gbm if it reaches it's limit (2 MB).
|
||||
- (All) The file size will be displayed in the session log after each backup.
|
||||
|
||||
- Fixed a regression that caused non-critical fields (Game Path, Company, Version, Icon, Enabled, Monitor Only) to be wiped or reset on sync.
|
||||
- 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.
|
||||
- Added the ability to trigger backups only after a certain session time has elapsed (Global Setting), this setting will be disabled by default.
|
||||
- You can now cancel out of the "Choose Game" window when GBM detects multiple games may be running.
|
||||
- Added the ability to filter by game information such as name, process and company.
|
||||
- Many UI improvements and fixes with filtering. The "Tag" filter is now called "Custom" filter, due to the new options available.
|
||||
- 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.
|
||||
- Updated the "Add Game Wizard" to use the new include / exclude and tagging features.
|
||||
- Removed the special handling of DOSBox games for future proofing, DOSBox games will now be handled like all other games.
|
||||
- Moved the import and export game list features from the Tools menu into the Game Manager.
|
||||
- Made some visual improvements to the main app window.
|
||||
- Made changes that will allow GBM to be easily translated to other languages.
|
||||
- Many minor UI improvements and bug fixes.
|
||||
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.
@@ -2,12 +2,13 @@
|
||||
|
||||
![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 />
|
||||
**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 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 />
|
||||
|
||||
Reference in New Issue
Block a user