Updated for issue 25

This commit is contained in:
Michael J. Seiferling
2015-12-09 12:00:10 -06:00
parent 87326981dd
commit 19802a5883
8 changed files with 458 additions and 227 deletions
+252 -88
View File
@@ -22,94 +22,80 @@ Partial Class frmFilter
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.btnOK = New System.Windows.Forms.Button()
Me.optGameInfo = New System.Windows.Forms.RadioButton()
Me.optTag = New System.Windows.Forms.RadioButton()
Me.grpTagFilter = New System.Windows.Forms.GroupBox()
Me.grpTagOptions = New System.Windows.Forms.GroupBox()
Me.optAll = New System.Windows.Forms.RadioButton()
Me.optAny = New System.Windows.Forms.RadioButton()
Me.lblGameTags = New System.Windows.Forms.Label()
Me.lblTags = New System.Windows.Forms.Label()
Me.btnRemove = New System.Windows.Forms.Button()
Me.btnAdd = New System.Windows.Forms.Button()
Me.lstFilter = New System.Windows.Forms.ListBox()
Me.lstTags = New System.Windows.Forms.ListBox()
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.optAll = New System.Windows.Forms.RadioButton()
Me.optAny = New System.Windows.Forms.RadioButton()
Me.GroupBox1.SuspendLayout()
Me.btnOK = New System.Windows.Forms.Button()
Me.grpGameFilter = New System.Windows.Forms.GroupBox()
Me.txtProcess = New System.Windows.Forms.TextBox()
Me.lblProcess = New System.Windows.Forms.Label()
Me.lblName = New System.Windows.Forms.Label()
Me.txtName = New System.Windows.Forms.TextBox()
Me.txtCompany = New System.Windows.Forms.TextBox()
Me.lblCompany = New System.Windows.Forms.Label()
Me.grpGameInfoOptions = New System.Windows.Forms.GroupBox()
Me.optOr = New System.Windows.Forms.RadioButton()
Me.optAnd = New System.Windows.Forms.RadioButton()
Me.grpTagFilter.SuspendLayout()
Me.grpTagOptions.SuspendLayout()
Me.grpGameFilter.SuspendLayout()
Me.grpGameInfoOptions.SuspendLayout()
Me.SuspendLayout()
'
'btnOK
'optGameInfo
'
Me.btnOK.Location = New System.Drawing.Point(297, 229)
Me.btnOK.Name = "btnOK"
Me.btnOK.Size = New System.Drawing.Size(75, 23)
Me.btnOK.TabIndex = 7
Me.btnOK.Text = "&OK"
Me.btnOK.UseVisualStyleBackColor = True
Me.optGameInfo.AutoSize = True
Me.optGameInfo.Location = New System.Drawing.Point(12, 12)
Me.optGameInfo.Name = "optGameInfo"
Me.optGameInfo.Size = New System.Drawing.Size(108, 17)
Me.optGameInfo.TabIndex = 0
Me.optGameInfo.Text = "Game Information"
Me.optGameInfo.UseVisualStyleBackColor = True
'
'lblGameTags
'optTag
'
Me.lblGameTags.AutoSize = True
Me.lblGameTags.Location = New System.Drawing.Point(263, 8)
Me.lblGameTags.Name = "lblGameTags"
Me.lblGameTags.Size = New System.Drawing.Size(66, 13)
Me.lblGameTags.TabIndex = 5
Me.lblGameTags.Text = "Current Filter"
Me.optTag.AutoSize = True
Me.optTag.Location = New System.Drawing.Point(12, 190)
Me.optTag.Name = "optTag"
Me.optTag.Size = New System.Drawing.Size(44, 17)
Me.optTag.TabIndex = 2
Me.optTag.Text = "Tag"
Me.optTag.UseVisualStyleBackColor = True
'
'lblTags
'grpTagFilter
'
Me.lblTags.AutoSize = True
Me.lblTags.Location = New System.Drawing.Point(49, 8)
Me.lblTags.Name = "lblTags"
Me.lblTags.Size = New System.Drawing.Size(77, 13)
Me.lblTags.TabIndex = 0
Me.lblTags.Text = "Available Tags"
Me.grpTagFilter.Controls.Add(Me.grpTagOptions)
Me.grpTagFilter.Controls.Add(Me.lblGameTags)
Me.grpTagFilter.Controls.Add(Me.lblTags)
Me.grpTagFilter.Controls.Add(Me.btnRemove)
Me.grpTagFilter.Controls.Add(Me.btnAdd)
Me.grpTagFilter.Controls.Add(Me.lstFilter)
Me.grpTagFilter.Controls.Add(Me.lstTags)
Me.grpTagFilter.Location = New System.Drawing.Point(12, 213)
Me.grpTagFilter.Name = "grpTagFilter"
Me.grpTagFilter.Size = New System.Drawing.Size(385, 265)
Me.grpTagFilter.TabIndex = 3
Me.grpTagFilter.TabStop = False
'
'btnRemove
'grpTagOptions
'
Me.btnRemove.Location = New System.Drawing.Point(168, 114)
Me.btnRemove.Name = "btnRemove"
Me.btnRemove.Size = New System.Drawing.Size(48, 23)
Me.btnRemove.TabIndex = 4
Me.btnRemove.Text = "<"
Me.btnRemove.UseVisualStyleBackColor = True
'
'btnAdd
'
Me.btnAdd.Location = New System.Drawing.Point(168, 85)
Me.btnAdd.Name = "btnAdd"
Me.btnAdd.Size = New System.Drawing.Size(48, 23)
Me.btnAdd.TabIndex = 3
Me.btnAdd.Text = ">"
Me.btnAdd.UseVisualStyleBackColor = True
'
'lstFilter
'
Me.lstFilter.FormattingEnabled = True
Me.lstFilter.Location = New System.Drawing.Point(222, 24)
Me.lstFilter.Name = "lstFilter"
Me.lstFilter.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
Me.lstFilter.Size = New System.Drawing.Size(150, 173)
Me.lstFilter.Sorted = True
Me.lstFilter.TabIndex = 6
'
'lstTags
'
Me.lstTags.FormattingEnabled = True
Me.lstTags.Location = New System.Drawing.Point(12, 24)
Me.lstTags.Name = "lstTags"
Me.lstTags.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
Me.lstTags.Size = New System.Drawing.Size(150, 173)
Me.lstTags.Sorted = True
Me.lstTags.TabIndex = 1
'
'GroupBox1
'
Me.GroupBox1.Controls.Add(Me.optAll)
Me.GroupBox1.Controls.Add(Me.optAny)
Me.GroupBox1.Location = New System.Drawing.Point(12, 206)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(150, 46)
Me.GroupBox1.TabIndex = 2
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Matching Options"
Me.grpTagOptions.Controls.Add(Me.optAll)
Me.grpTagOptions.Controls.Add(Me.optAny)
Me.grpTagOptions.Location = New System.Drawing.Point(6, 211)
Me.grpTagOptions.Name = "grpTagOptions"
Me.grpTagOptions.Size = New System.Drawing.Size(150, 46)
Me.grpTagOptions.TabIndex = 6
Me.grpTagOptions.TabStop = False
Me.grpTagOptions.Text = "Options"
'
'optAll
'
@@ -134,40 +120,218 @@ Partial Class frmFilter
Me.optAny.Text = "Any Tag"
Me.optAny.UseVisualStyleBackColor = True
'
'lblGameTags
'
Me.lblGameTags.AutoSize = True
Me.lblGameTags.Location = New System.Drawing.Point(271, 16)
Me.lblGameTags.Name = "lblGameTags"
Me.lblGameTags.Size = New System.Drawing.Size(66, 13)
Me.lblGameTags.TabIndex = 4
Me.lblGameTags.Text = "Current Filter"
'
'lblTags
'
Me.lblTags.AutoSize = True
Me.lblTags.Location = New System.Drawing.Point(43, 16)
Me.lblTags.Name = "lblTags"
Me.lblTags.Size = New System.Drawing.Size(77, 13)
Me.lblTags.TabIndex = 0
Me.lblTags.Text = "Available Tags"
'
'btnRemove
'
Me.btnRemove.Location = New System.Drawing.Point(162, 122)
Me.btnRemove.Name = "btnRemove"
Me.btnRemove.Size = New System.Drawing.Size(61, 23)
Me.btnRemove.TabIndex = 3
Me.btnRemove.Text = "<"
Me.btnRemove.UseVisualStyleBackColor = True
'
'btnAdd
'
Me.btnAdd.Location = New System.Drawing.Point(162, 93)
Me.btnAdd.Name = "btnAdd"
Me.btnAdd.Size = New System.Drawing.Size(61, 23)
Me.btnAdd.TabIndex = 2
Me.btnAdd.Text = ">"
Me.btnAdd.UseVisualStyleBackColor = True
'
'lstFilter
'
Me.lstFilter.FormattingEnabled = True
Me.lstFilter.Location = New System.Drawing.Point(229, 32)
Me.lstFilter.Name = "lstFilter"
Me.lstFilter.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
Me.lstFilter.Size = New System.Drawing.Size(150, 173)
Me.lstFilter.Sorted = True
Me.lstFilter.TabIndex = 5
'
'lstTags
'
Me.lstTags.FormattingEnabled = True
Me.lstTags.Location = New System.Drawing.Point(6, 32)
Me.lstTags.Name = "lstTags"
Me.lstTags.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
Me.lstTags.Size = New System.Drawing.Size(150, 173)
Me.lstTags.Sorted = True
Me.lstTags.TabIndex = 1
'
'btnOK
'
Me.btnOK.Location = New System.Drawing.Point(322, 484)
Me.btnOK.Name = "btnOK"
Me.btnOK.Size = New System.Drawing.Size(75, 23)
Me.btnOK.TabIndex = 4
Me.btnOK.Text = "&OK"
Me.btnOK.UseVisualStyleBackColor = True
'
'grpGameFilter
'
Me.grpGameFilter.Controls.Add(Me.grpGameInfoOptions)
Me.grpGameFilter.Controls.Add(Me.txtCompany)
Me.grpGameFilter.Controls.Add(Me.lblCompany)
Me.grpGameFilter.Controls.Add(Me.txtProcess)
Me.grpGameFilter.Controls.Add(Me.lblProcess)
Me.grpGameFilter.Controls.Add(Me.lblName)
Me.grpGameFilter.Controls.Add(Me.txtName)
Me.grpGameFilter.Location = New System.Drawing.Point(12, 35)
Me.grpGameFilter.Name = "grpGameFilter"
Me.grpGameFilter.Size = New System.Drawing.Size(385, 150)
Me.grpGameFilter.TabIndex = 1
Me.grpGameFilter.TabStop = False
'
'txtProcess
'
Me.txtProcess.Location = New System.Drawing.Point(86, 45)
Me.txtProcess.Name = "txtProcess"
Me.txtProcess.Size = New System.Drawing.Size(293, 20)
Me.txtProcess.TabIndex = 3
'
'lblProcess
'
Me.lblProcess.AutoSize = True
Me.lblProcess.Location = New System.Drawing.Point(11, 48)
Me.lblProcess.Name = "lblProcess"
Me.lblProcess.Size = New System.Drawing.Size(48, 13)
Me.lblProcess.TabIndex = 2
Me.lblProcess.Text = "Process:"
'
'lblName
'
Me.lblName.AutoSize = True
Me.lblName.Location = New System.Drawing.Point(11, 22)
Me.lblName.Name = "lblName"
Me.lblName.Size = New System.Drawing.Size(38, 13)
Me.lblName.TabIndex = 0
Me.lblName.Text = "Name:"
'
'txtName
'
Me.txtName.Location = New System.Drawing.Point(86, 19)
Me.txtName.Name = "txtName"
Me.txtName.Size = New System.Drawing.Size(293, 20)
Me.txtName.TabIndex = 1
'
'txtCompany
'
Me.txtCompany.Location = New System.Drawing.Point(86, 71)
Me.txtCompany.Name = "txtCompany"
Me.txtCompany.Size = New System.Drawing.Size(293, 20)
Me.txtCompany.TabIndex = 5
'
'lblCompany
'
Me.lblCompany.AutoSize = True
Me.lblCompany.Location = New System.Drawing.Point(11, 74)
Me.lblCompany.Name = "lblCompany"
Me.lblCompany.Size = New System.Drawing.Size(54, 13)
Me.lblCompany.TabIndex = 4
Me.lblCompany.Text = "Company:"
'
'grpGameInfoOptions
'
Me.grpGameInfoOptions.Controls.Add(Me.optOr)
Me.grpGameInfoOptions.Controls.Add(Me.optAnd)
Me.grpGameInfoOptions.Location = New System.Drawing.Point(14, 97)
Me.grpGameInfoOptions.Name = "grpGameInfoOptions"
Me.grpGameInfoOptions.Size = New System.Drawing.Size(106, 46)
Me.grpGameInfoOptions.TabIndex = 6
Me.grpGameInfoOptions.TabStop = False
Me.grpGameInfoOptions.Text = "Options"
'
'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)
Me.optOr.TabIndex = 1
Me.optOr.TabStop = True
Me.optOr.Text = "Or"
Me.optOr.UseVisualStyleBackColor = True
'
'optAnd
'
Me.optAnd.AutoSize = True
Me.optAnd.Checked = True
Me.optAnd.Location = New System.Drawing.Point(6, 19)
Me.optAnd.Name = "optAnd"
Me.optAnd.Size = New System.Drawing.Size(44, 17)
Me.optAnd.TabIndex = 0
Me.optAnd.TabStop = True
Me.optAnd.Text = "And"
Me.optAnd.UseVisualStyleBackColor = True
'
'frmFilter
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(384, 261)
Me.Controls.Add(Me.GroupBox1)
Me.ClientSize = New System.Drawing.Size(409, 516)
Me.Controls.Add(Me.grpGameFilter)
Me.Controls.Add(Me.grpTagFilter)
Me.Controls.Add(Me.btnOK)
Me.Controls.Add(Me.lblGameTags)
Me.Controls.Add(Me.lblTags)
Me.Controls.Add(Me.btnRemove)
Me.Controls.Add(Me.btnAdd)
Me.Controls.Add(Me.lstFilter)
Me.Controls.Add(Me.lstTags)
Me.Controls.Add(Me.optTag)
Me.Controls.Add(Me.optGameInfo)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "frmFilter"
Me.ShowIcon = False
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "Filter by Tags"
Me.GroupBox1.ResumeLayout(False)
Me.GroupBox1.PerformLayout()
Me.Text = "Custom Filter"
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()
End Sub
Friend WithEvents btnOK As System.Windows.Forms.Button
Friend WithEvents optGameInfo As System.Windows.Forms.RadioButton
Friend WithEvents optTag As System.Windows.Forms.RadioButton
Friend WithEvents grpTagFilter As System.Windows.Forms.GroupBox
Friend WithEvents grpTagOptions As System.Windows.Forms.GroupBox
Friend WithEvents optAll As System.Windows.Forms.RadioButton
Friend WithEvents optAny As System.Windows.Forms.RadioButton
Friend WithEvents lblGameTags As System.Windows.Forms.Label
Friend WithEvents lblTags As System.Windows.Forms.Label
Friend WithEvents btnRemove As System.Windows.Forms.Button
Friend WithEvents btnAdd As System.Windows.Forms.Button
Friend WithEvents lstFilter As System.Windows.Forms.ListBox
Friend WithEvents lstTags As System.Windows.Forms.ListBox
Friend WithEvents GroupBox1 As GroupBox
Friend WithEvents optAll As RadioButton
Friend WithEvents optAny As RadioButton
Friend WithEvents btnOK As System.Windows.Forms.Button
Friend WithEvents grpGameFilter As System.Windows.Forms.GroupBox
Friend WithEvents txtProcess As System.Windows.Forms.TextBox
Friend WithEvents lblProcess As System.Windows.Forms.Label
Friend WithEvents lblName As System.Windows.Forms.Label
Friend WithEvents txtName As System.Windows.Forms.TextBox
Friend WithEvents txtCompany As System.Windows.Forms.TextBox
Friend WithEvents lblCompany As System.Windows.Forms.Label
Friend WithEvents grpGameInfoOptions As System.Windows.Forms.GroupBox
Friend WithEvents optOr As System.Windows.Forms.RadioButton
Friend WithEvents optAnd As System.Windows.Forms.RadioButton
End Class
+59 -19
View File
@@ -5,16 +5,25 @@
AnyTag = 2
AllTags = 3
NoTags = 4
FieldAnd = 5
FieldOr = 6
End Enum
Dim oFilters As New List(Of clsTag)
Dim oTagFilters As New List(Of clsTag)
Dim hshStringFilters As New Hashtable
Dim eCurrentFilterType As eFilterType = eFilterType.AnyTag
Dim hshTags As New Hashtable
Dim bShutdown As Boolean = False
Public ReadOnly Property Filters As List(Of clsTag)
Public ReadOnly Property StringFilters As Hashtable
Get
Return oFilters
Return hshStringFilters
End Get
End Property
Public ReadOnly Property TagFilters As List(Of clsTag)
Get
Return oTagFilters
End Get
End Property
@@ -39,7 +48,7 @@
oTags.Add(oData)
Next
For Each kp As KeyValuePair(Of String, String) In oTags
For Each kp As KeyValuePair(Of String, String) In oTags
lstFilter.Items.Add(kp)
lstTags.Items.Remove(kp)
Next
@@ -50,7 +59,7 @@
Private Sub RemoveTag()
Dim oData As KeyValuePair(Of String, String)
Dim oTags As List(Of KeyValuePair(Of String, String))
If lstFilter.SelectedItems.Count = 1 Then
oData = lstFilter.SelectedItems(0)
lstFilter.Items.Remove(oData)
@@ -62,7 +71,7 @@
oTags.Add(oData)
Next
For Each kp As KeyValuePair(Of String, String) In oTags
For Each kp As KeyValuePair(Of String, String) In oTags
lstFilter.Items.Remove(kp)
lstTags.Items.Add(kp)
Next
@@ -76,7 +85,7 @@
'Handle Data
hshTags = mgrTags.ReadTags()
'Handle Lists
lstTags.Items.Clear()
lstFilter.Items.Clear()
@@ -98,31 +107,52 @@
Dim oData As KeyValuePair(Of String, String)
Dim oTag As clsTag
'Set Tags
For Each oData In lstFilter.Items
oTag = DirectCast(hshTags(oData.Value), clsTag)
Filters.Add(oTag)
Next
'Set Filter Type
If Filters.Count = 0 Then
eCurrentFilterType = eFilterType.NoTags
ElseIf optAll.Checked Then
eCurrentFilterType = eFilterType.AllTags
If optGameInfo.Checked Then
'Set Filter Type
If optAnd.Checked Then
eCurrentFilterType = eFilterType.FieldAnd
Else
eCurrentFilterType = eFilterType.FieldOr
End If
'Set String Filter
If txtName.Text <> String.Empty Then
hshStringFilters.Add("Name", txtName.Text)
End If
If txtProcess.Text <> String.Empty Then
hshStringFilters.Add("Process", txtProcess.Text)
End If
If txtCompany.Text <> String.Empty Then
hshStringFilters.Add("Company", txtCompany.Text)
End If
Else
eCurrentFilterType = eFilterType.AnyTag
'Set Tags
For Each oData In lstFilter.Items
oTag = DirectCast(hshTags(oData.Value), clsTag)
TagFilters.Add(oTag)
Next
'Set Filter Type
If TagFilters.Count = 0 Then
eCurrentFilterType = eFilterType.NoTags
ElseIf optAll.Checked Then
eCurrentFilterType = eFilterType.AllTags
Else
eCurrentFilterType = eFilterType.AnyTag
End If
End If
End Sub
Private Sub frmGameTags_Load(sender As Object, e As EventArgs) Handles MyBase.Load
optGameInfo.Checked = True
LoadData()
End Sub
Private Sub btnOK_Click(sender As Object, e As EventArgs) Handles btnOK.Click
GetFilters()
bShutdown = True
Me.close
Me.Close()
End Sub
Private Sub btnAdd_Click(sender As Object, e As EventArgs) Handles btnAdd.Click
@@ -138,4 +168,14 @@
e.Cancel = True
End If
End Sub
Private Sub optGameInfo_Click(sender As Object, e As EventArgs) Handles optGameInfo.Click, optTag.Click
If optGameInfo.Checked = True Then
grpGameFilter.Enabled = True
grpTagFilter.Enabled = False
Else
grpGameFilter.Enabled = False
grpTagFilter.Enabled = True
End If
End Sub
End Class
+12 -12
View File
@@ -79,7 +79,7 @@ Partial Class frmGameManager
Me.btnCancel = New System.Windows.Forms.Button()
Me.chkEnabled = New System.Windows.Forms.CheckBox()
Me.grpFilter = New System.Windows.Forms.GroupBox()
Me.optTag = New System.Windows.Forms.RadioButton()
Me.optCustom = New System.Windows.Forms.RadioButton()
Me.optBackupData = New System.Windows.Forms.RadioButton()
Me.optPendingRestores = New System.Windows.Forms.RadioButton()
Me.optAllGames = New System.Windows.Forms.RadioButton()
@@ -648,7 +648,7 @@ Partial Class frmGameManager
'
'grpFilter
'
Me.grpFilter.Controls.Add(Me.optTag)
Me.grpFilter.Controls.Add(Me.optCustom)
Me.grpFilter.Controls.Add(Me.optBackupData)
Me.grpFilter.Controls.Add(Me.optPendingRestores)
Me.grpFilter.Controls.Add(Me.optAllGames)
@@ -659,16 +659,16 @@ Partial Class frmGameManager
Me.grpFilter.TabStop = False
Me.grpFilter.Text = "Games Filter"
'
'optTag
'optCustom
'
Me.optTag.AutoSize = True
Me.optTag.Location = New System.Drawing.Point(6, 87)
Me.optTag.Name = "optTag"
Me.optTag.Size = New System.Drawing.Size(49, 17)
Me.optTag.TabIndex = 3
Me.optTag.TabStop = True
Me.optTag.Text = "Tags"
Me.optTag.UseVisualStyleBackColor = True
Me.optCustom.AutoSize = True
Me.optCustom.Location = New System.Drawing.Point(6, 87)
Me.optCustom.Name = "optCustom"
Me.optCustom.Size = New System.Drawing.Size(60, 17)
Me.optCustom.TabIndex = 3
Me.optCustom.TabStop = True
Me.optCustom.Text = "Custom"
Me.optCustom.UseVisualStyleBackColor = True
'
'optBackupData
'
@@ -801,7 +801,7 @@ Partial Class frmGameManager
Friend WithEvents btnOpenRestorePath As System.Windows.Forms.Button
Friend WithEvents btnTags As System.Windows.Forms.Button
Friend WithEvents lblTags As System.Windows.Forms.Label
Friend WithEvents optTag As System.Windows.Forms.RadioButton
Friend WithEvents optCustom As System.Windows.Forms.RadioButton
Friend WithEvents btnInclude As System.Windows.Forms.Button
Friend WithEvents btnExclude As System.Windows.Forms.Button
Friend WithEvents lblRestorePath As Label
+18 -15
View File
@@ -16,7 +16,8 @@ Public Class frmGameManager
Private oRemoteBackupData As SortedList
Private bIsDirty As Boolean = False
Private bIsLoading As Boolean = False
Private oCurrentFilters As New List(Of clsTag)
Private oCurrentTagFilters As New List(Of clsTag)
Private oCurrentStringFilters As New Hashtable
Private eCurrentFilter As frmFilter.eFilterType = frmFilter.eFilterType.NoFilter
Private Enum eModes As Integer
@@ -209,19 +210,21 @@ Public Class frmGameManager
Dim oBackup As clsBackup
Dim frm As frmFilter
If optTag.Checked Then
If optCustom.Checked Then
If Not bRetainFilter Then
frm = New frmFilter
frm.ShowDialog()
oCurrentFilters = frm.Filters
eCurrentFilter = frm.FilterType
oCurrentTagFilters = frm.TagFilters
oCurrentStringFilters = frm.StringFilters
eCurrentFilter = frm.FilterType
End If
Else
oCurrentFilters.Clear()
oCurrentTagFilters.Clear()
oCurrentStringFilters.Clear()
eCurrentFilter = frmFilter.eFilterType.NoFilter
End If
AppData = mgrMonitorList.ReadFilteredList(oCurrentFilters, eCurrentFilter)
AppData = mgrMonitorList.ReadFilteredList(oCurrentTagFilters, oCurrentStringFilters, eCurrentFilter)
If optPendingRestores.Checked Then
oRestoreData = mgrRestore.CompareManifests
@@ -502,7 +505,7 @@ Public Class frmGameManager
If lstGames.SelectedItems.Count = 1 Then FillTags(CurrentGame.ID)
'If a tag filter is enabled, reload list to reflect changes
If optTag.Checked Then
If optCustom.Checked Then
LoadData()
End If
@@ -538,7 +541,7 @@ Public Class frmGameManager
Else
txtFileSize.Text = "Backup file was not found!"
End If
txtRestorePath.Text = CurrentBackupItem.RestorePath
txtRestorePath.Text = CurrentBackupItem.RestorePath
Else
txtCurrentBackup.Text = "Never"
txtFileSize.Text = String.Empty
@@ -546,7 +549,7 @@ Public Class frmGameManager
btnOpenBackupFile.Enabled = False
btnOpenRestorePath.Enabled = False
btnRestore.Enabled = False
btnDeleteBackup.Enabled = False
btnDeleteBackup.Enabled = False
End If
If oLocalBackupData.Contains(oApp.Name) Then
@@ -760,7 +763,7 @@ Public Class frmGameManager
btnTags.Enabled = False
lblTags.Visible = False
btnInclude.Text = "In&clude Items..."
btnExclude.Text = "E&xclude Items..."
btnExclude.Text = "E&xclude Items..."
Case eModes.Edit
grpFilter.Enabled = False
lstGames.Enabled = False
@@ -795,7 +798,7 @@ Public Class frmGameManager
btnDelete.Enabled = True
btnBackup.Enabled = True
btnTags.Enabled = True
lblTags.Visible = True
lblTags.Visible = True
Case eModes.ViewTemp
grpFilter.Enabled = True
lstGames.Enabled = True
@@ -812,7 +815,7 @@ Public Class frmGameManager
btnTags.Enabled = False
lblTags.Visible = False
btnInclude.Text = "In&clude Items..."
btnExclude.Text = "E&xclude Items..."
btnExclude.Text = "E&xclude Items..."
Case eModes.Disabled
grpFilter.Enabled = True
lstGames.Enabled = True
@@ -837,7 +840,7 @@ Public Class frmGameManager
lblTags.Visible = False
btnInclude.Text = "In&clude Items..."
btnExclude.Text = "E&xclude Items..."
txtRestorePath.ReadOnly = True
txtRestorePath.ReadOnly = True
Case eModes.MultiSelect
lstGames.Enabled = True
WipeControls(grpConfig.Controls)
@@ -861,7 +864,7 @@ Public Class frmGameManager
btnMarkAsRestored.Enabled = True
btnTags.Enabled = True
lblTags.Visible = False
txtRestorePath.ReadOnly = True
txtRestorePath.ReadOnly = True
End Select
lstGames.Focus()
@@ -1277,7 +1280,7 @@ Public Class frmGameManager
TriggerSelectedRestore()
End Sub
Private Sub optGamesFilter_Click(sender As Object, e As EventArgs) Handles optPendingRestores.Click, optAllGames.Click, optBackupData.Click, optTag.Click
Private Sub optGamesFilter_Click(sender As Object, e As EventArgs) Handles optPendingRestores.Click, optAllGames.Click, optBackupData.Click, optCustom.Click
lstGames.ClearSelected()
eCurrentMode = eModes.Disabled
ModeChange()
+26 -18
View File
@@ -26,6 +26,7 @@ Partial Class frmMain
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmMain))
Me.gMonTray = New System.Windows.Forms.NotifyIcon(Me.components)
Me.gMonTrayMenu = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.gMonTrayNotification = New System.Windows.Forms.ToolStripMenuItem()
Me.gMonTrayShow = New System.Windows.Forms.ToolStripMenuItem()
Me.gMonTraySep2 = New System.Windows.Forms.ToolStripSeparator()
Me.gMonTrayMon = New System.Windows.Forms.ToolStripMenuItem()
@@ -85,7 +86,7 @@ Partial Class frmMain
Me.lblStatus1 = New System.Windows.Forms.Label()
Me.lblStatus2 = New System.Windows.Forms.Label()
Me.lblStatus3 = New System.Windows.Forms.Label()
Me.gMonTrayNotification = New System.Windows.Forms.ToolStripMenuItem()
Me.gMonHelpWebSite = New System.Windows.Forms.ToolStripMenuItem()
Me.gMonTrayMenu.SuspendLayout()
Me.gMonStatusStrip.SuspendLayout()
Me.gMonMainMenu.SuspendLayout()
@@ -105,7 +106,14 @@ Partial Class frmMain
'
Me.gMonTrayMenu.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonTrayNotification, Me.gMonTrayShow, Me.gMonTraySep2, Me.gMonTrayMon, Me.gMonTraySettings, Me.gMonTraySetup, Me.gMonTrayTools, Me.gMonTraySep1, Me.gMonTrayExit})
Me.gMonTrayMenu.Name = "gMonTrayMenu"
Me.gMonTrayMenu.Size = New System.Drawing.Size(162, 192)
Me.gMonTrayMenu.Size = New System.Drawing.Size(162, 170)
'
'gMonTrayNotification
'
Me.gMonTrayNotification.Name = "gMonTrayNotification"
Me.gMonTrayNotification.Size = New System.Drawing.Size(161, 22)
Me.gMonTrayNotification.Text = "Notification"
Me.gMonTrayNotification.Visible = False
'
'gMonTrayShow
'
@@ -367,19 +375,19 @@ Partial Class frmMain
'gMonToolsGameImportOfficialList
'
Me.gMonToolsGameImportOfficialList.Name = "gMonToolsGameImportOfficialList"
Me.gMonToolsGameImportOfficialList.Size = New System.Drawing.Size(201, 22)
Me.gMonToolsGameImportOfficialList.Text = "Import from &Official List"
Me.gMonToolsGameImportOfficialList.Size = New System.Drawing.Size(210, 22)
Me.gMonToolsGameImportOfficialList.Text = "Import from &Official List..."
'
'gMonToolsGameImportList
'
Me.gMonToolsGameImportList.Name = "gMonToolsGameImportList"
Me.gMonToolsGameImportList.Size = New System.Drawing.Size(201, 22)
Me.gMonToolsGameImportList.Text = "I&mport Game List"
Me.gMonToolsGameImportList.Size = New System.Drawing.Size(210, 22)
Me.gMonToolsGameImportList.Text = "I&mport Game List..."
'
'gMonToolsGameExportList
'
Me.gMonToolsGameExportList.Name = "gMonToolsGameExportList"
Me.gMonToolsGameExportList.Size = New System.Drawing.Size(201, 22)
Me.gMonToolsGameExportList.Size = New System.Drawing.Size(210, 22)
Me.gMonToolsGameExportList.Text = "E&xport Game List"
'
'gMonToolsSyncMan
@@ -396,7 +404,7 @@ Partial Class frmMain
'
'gMonHelp
'
Me.gMonHelp.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonHelpManual, Me.gMonHelpCheckforUpdates, Me.gMonHelpAbout})
Me.gMonHelp.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonHelpWebSite, Me.gMonHelpManual, Me.gMonHelpCheckforUpdates, Me.gMonHelpAbout})
Me.gMonHelp.Name = "gMonHelp"
Me.gMonHelp.Size = New System.Drawing.Size(44, 20)
Me.gMonHelp.Text = "&Help"
@@ -404,19 +412,19 @@ Partial Class frmMain
'gMonHelpManual
'
Me.gMonHelpManual.Name = "gMonHelpManual"
Me.gMonHelpManual.Size = New System.Drawing.Size(171, 22)
Me.gMonHelpManual.Text = "Online &Manual"
Me.gMonHelpManual.Size = New System.Drawing.Size(180, 22)
Me.gMonHelpManual.Text = "Online &Manual..."
'
'gMonHelpCheckforUpdates
'
Me.gMonHelpCheckforUpdates.Name = "gMonHelpCheckforUpdates"
Me.gMonHelpCheckforUpdates.Size = New System.Drawing.Size(171, 22)
Me.gMonHelpCheckforUpdates.Text = "Check for Updates"
Me.gMonHelpCheckforUpdates.Size = New System.Drawing.Size(180, 22)
Me.gMonHelpCheckforUpdates.Text = "Check for Updates..."
'
'gMonHelpAbout
'
Me.gMonHelpAbout.Name = "gMonHelpAbout"
Me.gMonHelpAbout.Size = New System.Drawing.Size(171, 22)
Me.gMonHelpAbout.Size = New System.Drawing.Size(180, 22)
Me.gMonHelpAbout.Text = "&About"
'
'gMonNotification
@@ -527,12 +535,11 @@ Partial Class frmMain
Me.lblStatus3.Size = New System.Drawing.Size(365, 13)
Me.lblStatus3.TabIndex = 17
'
'gMonTrayNotification
'gMonHelpWebSite
'
Me.gMonTrayNotification.Name = "gMonTrayNotification"
Me.gMonTrayNotification.Size = New System.Drawing.Size(161, 22)
Me.gMonTrayNotification.Text = "Notification"
Me.gMonTrayNotification.Visible = False
Me.gMonHelpWebSite.Name = "gMonHelpWebSite"
Me.gMonHelpWebSite.Size = New System.Drawing.Size(180, 22)
Me.gMonHelpWebSite.Text = "&Official Web Site..."
'
'frmMain
'
@@ -635,4 +642,5 @@ Partial Class frmMain
Friend WithEvents lblStatus3 As Label
Friend WithEvents gMonNotification As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents gMonTrayNotification As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents gMonHelpWebSite As System.Windows.Forms.ToolStripMenuItem
End Class
+8 -1
View File
@@ -673,6 +673,10 @@ Public Class frmMain
ResumeScan()
End Sub
Private Sub OpenWebSite()
Process.Start(mgrPath.OfficialWebURL)
End Sub
Private Sub OpenOnlineManual()
Process.Start(mgrPath.OfficialManualURL)
End Sub
@@ -1294,6 +1298,10 @@ Public Class frmMain
OpenAbout()
End Sub
Private Sub gMonHelpWebSite_Click(sender As Object, e As EventArgs) Handles gMonHelpWebSite.Click
OpenWebSite()
End Sub
Private Sub gMonHelpManual_Click(sender As Object, e As EventArgs) Handles gMonHelpManual.Click
OpenOnlineManual()
End Sub
@@ -1494,5 +1502,4 @@ Public Class frmMain
Private Sub txtGameInfo_Enter(sender As Object, e As EventArgs)
btnLogToggle.Focus()
End Sub
End Class