Added ability to edit game ID and updated validation
This commit is contained in:
@@ -264,22 +264,11 @@ Public Class frmAddWizard
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub DoSave()
|
Private Sub DoSave()
|
||||||
Dim hshDupeCheck As New Hashtable
|
|
||||||
Dim sNewGame As String = oGameToSave.CompoundKey
|
|
||||||
|
|
||||||
For Each o As clsGame In GameData.Values
|
|
||||||
hshDupeCheck.Add(o.CompoundKey, String.Empty)
|
|
||||||
Next
|
|
||||||
|
|
||||||
If hshDupeCheck.Contains(sNewGame) Then
|
|
||||||
mgrCommon.ShowMessage(frmAddWizard_ErrorGameDupe, MsgBoxStyle.Exclamation)
|
|
||||||
Else
|
|
||||||
mgrMonitorList.DoListAdd(oGameToSave)
|
mgrMonitorList.DoListAdd(oGameToSave)
|
||||||
If mgrCommon.ShowMessage(frmAddWizard_ConfirmSaveTags, New String() {oGameToSave.Name, oGameToSave.Name}, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
If mgrCommon.ShowMessage(frmAddWizard_ConfirmSaveTags, New String() {oGameToSave.Name, oGameToSave.Name}, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
OpenTags(oGameToSave)
|
OpenTags(oGameToSave)
|
||||||
End If
|
End If
|
||||||
Me.Close()
|
Me.Close()
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ValidateBack()
|
Private Sub ValidateBack()
|
||||||
|
|||||||
Generated
+30
-18
@@ -101,6 +101,7 @@ Partial Class frmGameManager
|
|||||||
Me.cmsDeleteBackup = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
Me.cmsDeleteBackup = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||||
Me.cmsDeleteOne = New System.Windows.Forms.ToolStripMenuItem()
|
Me.cmsDeleteOne = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.cmsDeleteAll = New System.Windows.Forms.ToolStripMenuItem()
|
Me.cmsDeleteAll = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
|
Me.btnGameID = New System.Windows.Forms.Button()
|
||||||
Me.grpConfig.SuspendLayout()
|
Me.grpConfig.SuspendLayout()
|
||||||
CType(Me.nudLimit, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.nudLimit, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
Me.grpExtra.SuspendLayout()
|
Me.grpExtra.SuspendLayout()
|
||||||
@@ -157,6 +158,7 @@ Partial Class frmGameManager
|
|||||||
'grpConfig
|
'grpConfig
|
||||||
'
|
'
|
||||||
Me.grpConfig.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
Me.grpConfig.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||||
|
Me.grpConfig.Controls.Add(Me.btnGameID)
|
||||||
Me.grpConfig.Controls.Add(Me.chkRegEx)
|
Me.grpConfig.Controls.Add(Me.chkRegEx)
|
||||||
Me.grpConfig.Controls.Add(Me.lblComments)
|
Me.grpConfig.Controls.Add(Me.lblComments)
|
||||||
Me.grpConfig.Controls.Add(Me.txtComments)
|
Me.grpConfig.Controls.Add(Me.txtComments)
|
||||||
@@ -194,7 +196,7 @@ Partial Class frmGameManager
|
|||||||
Me.chkRegEx.Location = New System.Drawing.Point(402, 46)
|
Me.chkRegEx.Location = New System.Drawing.Point(402, 46)
|
||||||
Me.chkRegEx.Name = "chkRegEx"
|
Me.chkRegEx.Name = "chkRegEx"
|
||||||
Me.chkRegEx.Size = New System.Drawing.Size(117, 17)
|
Me.chkRegEx.Size = New System.Drawing.Size(117, 17)
|
||||||
Me.chkRegEx.TabIndex = 5
|
Me.chkRegEx.TabIndex = 6
|
||||||
Me.chkRegEx.Text = "Regular Expression"
|
Me.chkRegEx.Text = "Regular Expression"
|
||||||
Me.chkRegEx.UseVisualStyleBackColor = True
|
Me.chkRegEx.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
@@ -204,7 +206,7 @@ Partial Class frmGameManager
|
|||||||
Me.lblComments.Location = New System.Drawing.Point(7, 181)
|
Me.lblComments.Location = New System.Drawing.Point(7, 181)
|
||||||
Me.lblComments.Name = "lblComments"
|
Me.lblComments.Name = "lblComments"
|
||||||
Me.lblComments.Size = New System.Drawing.Size(59, 13)
|
Me.lblComments.Size = New System.Drawing.Size(59, 13)
|
||||||
Me.lblComments.TabIndex = 18
|
Me.lblComments.TabIndex = 19
|
||||||
Me.lblComments.Text = "Comments:"
|
Me.lblComments.Text = "Comments:"
|
||||||
'
|
'
|
||||||
'txtComments
|
'txtComments
|
||||||
@@ -214,14 +216,14 @@ Partial Class frmGameManager
|
|||||||
Me.txtComments.Name = "txtComments"
|
Me.txtComments.Name = "txtComments"
|
||||||
Me.txtComments.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
|
Me.txtComments.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
|
||||||
Me.txtComments.Size = New System.Drawing.Size(413, 71)
|
Me.txtComments.Size = New System.Drawing.Size(413, 71)
|
||||||
Me.txtComments.TabIndex = 19
|
Me.txtComments.TabIndex = 20
|
||||||
'
|
'
|
||||||
'txtParameter
|
'txtParameter
|
||||||
'
|
'
|
||||||
Me.txtParameter.Location = New System.Drawing.Point(70, 71)
|
Me.txtParameter.Location = New System.Drawing.Point(70, 71)
|
||||||
Me.txtParameter.Name = "txtParameter"
|
Me.txtParameter.Name = "txtParameter"
|
||||||
Me.txtParameter.Size = New System.Drawing.Size(414, 20)
|
Me.txtParameter.Size = New System.Drawing.Size(414, 20)
|
||||||
Me.txtParameter.TabIndex = 7
|
Me.txtParameter.TabIndex = 8
|
||||||
'
|
'
|
||||||
'lblParameter
|
'lblParameter
|
||||||
'
|
'
|
||||||
@@ -229,7 +231,7 @@ Partial Class frmGameManager
|
|||||||
Me.lblParameter.Location = New System.Drawing.Point(7, 74)
|
Me.lblParameter.Location = New System.Drawing.Point(7, 74)
|
||||||
Me.lblParameter.Name = "lblParameter"
|
Me.lblParameter.Name = "lblParameter"
|
||||||
Me.lblParameter.Size = New System.Drawing.Size(58, 13)
|
Me.lblParameter.Size = New System.Drawing.Size(58, 13)
|
||||||
Me.lblParameter.TabIndex = 6
|
Me.lblParameter.TabIndex = 7
|
||||||
Me.lblParameter.Text = "Parameter:"
|
Me.lblParameter.Text = "Parameter:"
|
||||||
'
|
'
|
||||||
'chkCleanFolder
|
'chkCleanFolder
|
||||||
@@ -248,7 +250,7 @@ Partial Class frmGameManager
|
|||||||
Me.lblLimit.Location = New System.Drawing.Point(376, 157)
|
Me.lblLimit.Location = New System.Drawing.Point(376, 157)
|
||||||
Me.lblLimit.Name = "lblLimit"
|
Me.lblLimit.Name = "lblLimit"
|
||||||
Me.lblLimit.Size = New System.Drawing.Size(68, 13)
|
Me.lblLimit.Size = New System.Drawing.Size(68, 13)
|
||||||
Me.lblLimit.TabIndex = 17
|
Me.lblLimit.TabIndex = 18
|
||||||
Me.lblLimit.Text = "Backup Limit"
|
Me.lblLimit.Text = "Backup Limit"
|
||||||
Me.lblLimit.Visible = False
|
Me.lblLimit.Visible = False
|
||||||
'
|
'
|
||||||
@@ -258,7 +260,7 @@ Partial Class frmGameManager
|
|||||||
Me.nudLimit.Minimum = New Decimal(New Integer() {2, 0, 0, 0})
|
Me.nudLimit.Minimum = New Decimal(New Integer() {2, 0, 0, 0})
|
||||||
Me.nudLimit.Name = "nudLimit"
|
Me.nudLimit.Name = "nudLimit"
|
||||||
Me.nudLimit.Size = New System.Drawing.Size(40, 20)
|
Me.nudLimit.Size = New System.Drawing.Size(40, 20)
|
||||||
Me.nudLimit.TabIndex = 16
|
Me.nudLimit.TabIndex = 17
|
||||||
Me.nudLimit.Value = New Decimal(New Integer() {2, 0, 0, 0})
|
Me.nudLimit.Value = New Decimal(New Integer() {2, 0, 0, 0})
|
||||||
Me.nudLimit.Visible = False
|
Me.nudLimit.Visible = False
|
||||||
'
|
'
|
||||||
@@ -267,7 +269,7 @@ Partial Class frmGameManager
|
|||||||
Me.btnExclude.Location = New System.Drawing.Point(10, 152)
|
Me.btnExclude.Location = New System.Drawing.Point(10, 152)
|
||||||
Me.btnExclude.Name = "btnExclude"
|
Me.btnExclude.Name = "btnExclude"
|
||||||
Me.btnExclude.Size = New System.Drawing.Size(175, 23)
|
Me.btnExclude.Size = New System.Drawing.Size(175, 23)
|
||||||
Me.btnExclude.TabIndex = 12
|
Me.btnExclude.TabIndex = 15
|
||||||
Me.btnExclude.Text = "E&xclude Items..."
|
Me.btnExclude.Text = "E&xclude Items..."
|
||||||
Me.btnExclude.UseVisualStyleBackColor = True
|
Me.btnExclude.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
@@ -276,14 +278,14 @@ Partial Class frmGameManager
|
|||||||
Me.btnInclude.Location = New System.Drawing.Point(10, 123)
|
Me.btnInclude.Location = New System.Drawing.Point(10, 123)
|
||||||
Me.btnInclude.Name = "btnInclude"
|
Me.btnInclude.Name = "btnInclude"
|
||||||
Me.btnInclude.Size = New System.Drawing.Size(175, 23)
|
Me.btnInclude.Size = New System.Drawing.Size(175, 23)
|
||||||
Me.btnInclude.TabIndex = 11
|
Me.btnInclude.TabIndex = 12
|
||||||
Me.btnInclude.Text = "In&clude Items..."
|
Me.btnInclude.Text = "In&clude Items..."
|
||||||
Me.btnInclude.UseVisualStyleBackColor = True
|
Me.btnInclude.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
'txtID
|
'txtID
|
||||||
'
|
'
|
||||||
Me.txtID.Enabled = False
|
Me.txtID.Enabled = False
|
||||||
Me.txtID.Location = New System.Drawing.Point(489, 19)
|
Me.txtID.Location = New System.Drawing.Point(489, 180)
|
||||||
Me.txtID.Name = "txtID"
|
Me.txtID.Name = "txtID"
|
||||||
Me.txtID.Size = New System.Drawing.Size(30, 20)
|
Me.txtID.Size = New System.Drawing.Size(30, 20)
|
||||||
Me.txtID.TabIndex = 0
|
Me.txtID.TabIndex = 0
|
||||||
@@ -295,7 +297,7 @@ Partial Class frmGameManager
|
|||||||
Me.btnSavePathBrowse.Location = New System.Drawing.Point(490, 97)
|
Me.btnSavePathBrowse.Location = New System.Drawing.Point(490, 97)
|
||||||
Me.btnSavePathBrowse.Name = "btnSavePathBrowse"
|
Me.btnSavePathBrowse.Name = "btnSavePathBrowse"
|
||||||
Me.btnSavePathBrowse.Size = New System.Drawing.Size(30, 20)
|
Me.btnSavePathBrowse.Size = New System.Drawing.Size(30, 20)
|
||||||
Me.btnSavePathBrowse.TabIndex = 10
|
Me.btnSavePathBrowse.TabIndex = 11
|
||||||
Me.btnSavePathBrowse.Text = "..."
|
Me.btnSavePathBrowse.Text = "..."
|
||||||
Me.btnSavePathBrowse.UseVisualStyleBackColor = True
|
Me.btnSavePathBrowse.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
@@ -304,7 +306,7 @@ Partial Class frmGameManager
|
|||||||
Me.btnProcessBrowse.Location = New System.Drawing.Point(366, 44)
|
Me.btnProcessBrowse.Location = New System.Drawing.Point(366, 44)
|
||||||
Me.btnProcessBrowse.Name = "btnProcessBrowse"
|
Me.btnProcessBrowse.Name = "btnProcessBrowse"
|
||||||
Me.btnProcessBrowse.Size = New System.Drawing.Size(30, 20)
|
Me.btnProcessBrowse.Size = New System.Drawing.Size(30, 20)
|
||||||
Me.btnProcessBrowse.TabIndex = 4
|
Me.btnProcessBrowse.TabIndex = 5
|
||||||
Me.btnProcessBrowse.Text = "..."
|
Me.btnProcessBrowse.Text = "..."
|
||||||
Me.btnProcessBrowse.UseVisualStyleBackColor = True
|
Me.btnProcessBrowse.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
@@ -314,7 +316,7 @@ Partial Class frmGameManager
|
|||||||
Me.lblSavePath.Location = New System.Drawing.Point(7, 101)
|
Me.lblSavePath.Location = New System.Drawing.Point(7, 101)
|
||||||
Me.lblSavePath.Name = "lblSavePath"
|
Me.lblSavePath.Name = "lblSavePath"
|
||||||
Me.lblSavePath.Size = New System.Drawing.Size(60, 13)
|
Me.lblSavePath.Size = New System.Drawing.Size(60, 13)
|
||||||
Me.lblSavePath.TabIndex = 8
|
Me.lblSavePath.TabIndex = 9
|
||||||
Me.lblSavePath.Text = "Save Path:"
|
Me.lblSavePath.Text = "Save Path:"
|
||||||
'
|
'
|
||||||
'lblProcess
|
'lblProcess
|
||||||
@@ -323,7 +325,7 @@ Partial Class frmGameManager
|
|||||||
Me.lblProcess.Location = New System.Drawing.Point(7, 47)
|
Me.lblProcess.Location = New System.Drawing.Point(7, 47)
|
||||||
Me.lblProcess.Name = "lblProcess"
|
Me.lblProcess.Name = "lblProcess"
|
||||||
Me.lblProcess.Size = New System.Drawing.Size(48, 13)
|
Me.lblProcess.Size = New System.Drawing.Size(48, 13)
|
||||||
Me.lblProcess.TabIndex = 2
|
Me.lblProcess.TabIndex = 3
|
||||||
Me.lblProcess.Text = "Process:"
|
Me.lblProcess.Text = "Process:"
|
||||||
'
|
'
|
||||||
'lblName
|
'lblName
|
||||||
@@ -359,7 +361,7 @@ Partial Class frmGameManager
|
|||||||
Me.chkTimeStamp.Location = New System.Drawing.Point(191, 156)
|
Me.chkTimeStamp.Location = New System.Drawing.Point(191, 156)
|
||||||
Me.chkTimeStamp.Name = "chkTimeStamp"
|
Me.chkTimeStamp.Name = "chkTimeStamp"
|
||||||
Me.chkTimeStamp.Size = New System.Drawing.Size(133, 17)
|
Me.chkTimeStamp.Size = New System.Drawing.Size(133, 17)
|
||||||
Me.chkTimeStamp.TabIndex = 15
|
Me.chkTimeStamp.TabIndex = 16
|
||||||
Me.chkTimeStamp.Text = "Save multiple backups"
|
Me.chkTimeStamp.Text = "Save multiple backups"
|
||||||
Me.chkTimeStamp.UseVisualStyleBackColor = True
|
Me.chkTimeStamp.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
@@ -378,20 +380,20 @@ Partial Class frmGameManager
|
|||||||
Me.txtSavePath.Location = New System.Drawing.Point(70, 97)
|
Me.txtSavePath.Location = New System.Drawing.Point(70, 97)
|
||||||
Me.txtSavePath.Name = "txtSavePath"
|
Me.txtSavePath.Name = "txtSavePath"
|
||||||
Me.txtSavePath.Size = New System.Drawing.Size(414, 20)
|
Me.txtSavePath.Size = New System.Drawing.Size(414, 20)
|
||||||
Me.txtSavePath.TabIndex = 9
|
Me.txtSavePath.TabIndex = 10
|
||||||
'
|
'
|
||||||
'txtProcess
|
'txtProcess
|
||||||
'
|
'
|
||||||
Me.txtProcess.Location = New System.Drawing.Point(70, 44)
|
Me.txtProcess.Location = New System.Drawing.Point(70, 44)
|
||||||
Me.txtProcess.Name = "txtProcess"
|
Me.txtProcess.Name = "txtProcess"
|
||||||
Me.txtProcess.Size = New System.Drawing.Size(290, 20)
|
Me.txtProcess.Size = New System.Drawing.Size(290, 20)
|
||||||
Me.txtProcess.TabIndex = 3
|
Me.txtProcess.TabIndex = 4
|
||||||
'
|
'
|
||||||
'txtName
|
'txtName
|
||||||
'
|
'
|
||||||
Me.txtName.Location = New System.Drawing.Point(70, 19)
|
Me.txtName.Location = New System.Drawing.Point(70, 19)
|
||||||
Me.txtName.Name = "txtName"
|
Me.txtName.Name = "txtName"
|
||||||
Me.txtName.Size = New System.Drawing.Size(414, 20)
|
Me.txtName.Size = New System.Drawing.Size(326, 20)
|
||||||
Me.txtName.TabIndex = 1
|
Me.txtName.TabIndex = 1
|
||||||
'
|
'
|
||||||
'chkMonitorOnly
|
'chkMonitorOnly
|
||||||
@@ -873,6 +875,15 @@ Partial Class frmGameManager
|
|||||||
Me.cmsDeleteAll.Size = New System.Drawing.Size(114, 22)
|
Me.cmsDeleteAll.Size = New System.Drawing.Size(114, 22)
|
||||||
Me.cmsDeleteAll.Text = "&All Files"
|
Me.cmsDeleteAll.Text = "&All Files"
|
||||||
'
|
'
|
||||||
|
'btnGameID
|
||||||
|
'
|
||||||
|
Me.btnGameID.Location = New System.Drawing.Point(402, 17)
|
||||||
|
Me.btnGameID.Name = "btnGameID"
|
||||||
|
Me.btnGameID.Size = New System.Drawing.Size(117, 23)
|
||||||
|
Me.btnGameID.TabIndex = 2
|
||||||
|
Me.btnGameID.Text = "&Game ID..."
|
||||||
|
Me.btnGameID.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
'frmGameManager
|
'frmGameManager
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
@@ -1000,4 +1011,5 @@ Partial Class frmGameManager
|
|||||||
Friend WithEvents lblComments As Label
|
Friend WithEvents lblComments As Label
|
||||||
Friend WithEvents txtComments As TextBox
|
Friend WithEvents txtComments As TextBox
|
||||||
Friend WithEvents chkRegEx As CheckBox
|
Friend WithEvents chkRegEx As CheckBox
|
||||||
|
Friend WithEvents btnGameID As Button
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -430,6 +430,28 @@ Public Class frmGameManager
|
|||||||
IsLoading = False
|
IsLoading = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OpenGameIDEdit()
|
||||||
|
Dim sCurrentID As String
|
||||||
|
Dim sNewID As String
|
||||||
|
|
||||||
|
If txtID.Text = String.Empty Then
|
||||||
|
txtID.Text = Guid.NewGuid.ToString
|
||||||
|
End If
|
||||||
|
|
||||||
|
sCurrentID = txtID.Text
|
||||||
|
|
||||||
|
sNewID = InputBox(frmGameManager_GameIDEditInfo, frmGameManager_GameIDEditTitle, sCurrentID)
|
||||||
|
|
||||||
|
If sNewID <> String.Empty Then
|
||||||
|
txtID.Text = sNewID
|
||||||
|
|
||||||
|
If sCurrentID <> sNewID Then
|
||||||
|
UpdateGenericButtonLabel(frmGameManager_btnGameID, btnGameID, True)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub OpenBackupFile()
|
Private Sub OpenBackupFile()
|
||||||
Dim sFileName As String
|
Dim sFileName As String
|
||||||
Dim oProcessStartInfo As ProcessStartInfo
|
Dim oProcessStartInfo As ProcessStartInfo
|
||||||
@@ -463,6 +485,16 @@ Public Class frmGameManager
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub UpdateGenericButtonLabel(ByVal sLabel As String, ByVal btn As Button, ByVal bDirty As Boolean)
|
||||||
|
btn.Text = sLabel
|
||||||
|
|
||||||
|
If bDirty Then
|
||||||
|
btn.Font = New Font(FontFamily.GenericSansSerif, 8.25, FontStyle.Bold)
|
||||||
|
Else
|
||||||
|
btn.Font = New Font(FontFamily.GenericSansSerif, 8.25, FontStyle.Regular)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Function GetBuilderRoot() As String
|
Private Function GetBuilderRoot() As String
|
||||||
Dim sRoot As String = String.Empty
|
Dim sRoot As String = String.Empty
|
||||||
|
|
||||||
@@ -750,6 +782,7 @@ Public Class frmGameManager
|
|||||||
'Update Buttons
|
'Update Buttons
|
||||||
UpdateBuilderButtonLabel(oApp.FileType, frmGameManager_IncludeShortcut, btnInclude, False)
|
UpdateBuilderButtonLabel(oApp.FileType, frmGameManager_IncludeShortcut, btnInclude, False)
|
||||||
UpdateBuilderButtonLabel(oApp.ExcludeList, frmGameManager_ExcludeShortcut, btnExclude, False)
|
UpdateBuilderButtonLabel(oApp.ExcludeList, frmGameManager_ExcludeShortcut, btnExclude, False)
|
||||||
|
UpdateGenericButtonLabel(frmGameManager_btnGameID, btnGameID, False)
|
||||||
|
|
||||||
'Extra
|
'Extra
|
||||||
txtAppPath.Text = oApp.ProcessPath
|
txtAppPath.Text = oApp.ProcessPath
|
||||||
@@ -975,6 +1008,9 @@ Public Class frmGameManager
|
|||||||
btnExclude.Text = frmGameManager_btnExclude
|
btnExclude.Text = frmGameManager_btnExclude
|
||||||
btnImport.Enabled = True
|
btnImport.Enabled = True
|
||||||
btnExport.Enabled = True
|
btnExport.Enabled = True
|
||||||
|
UpdateGenericButtonLabel(frmGameManager_IncludeShortcut, btnInclude, False)
|
||||||
|
UpdateGenericButtonLabel(frmGameManager_ExcludeShortcut, btnExclude, False)
|
||||||
|
UpdateGenericButtonLabel(frmGameManager_btnGameID, btnGameID, False)
|
||||||
Case eModes.MultiSelect
|
Case eModes.MultiSelect
|
||||||
lstGames.Enabled = True
|
lstGames.Enabled = True
|
||||||
lblQuickFilter.Enabled = False
|
lblQuickFilter.Enabled = False
|
||||||
@@ -1163,17 +1199,17 @@ Public Class frmGameManager
|
|||||||
|
|
||||||
Select Case eCurrentMode
|
Select Case eCurrentMode
|
||||||
Case eModes.Add
|
Case eModes.Add
|
||||||
If CoreValidatation(oApp) Then
|
If CoreValidatation(oApp, True) Then
|
||||||
bSuccess = True
|
bSuccess = True
|
||||||
mgrMonitorList.DoListAdd(oApp)
|
mgrMonitorList.DoListAdd(oApp)
|
||||||
SaveTags(oApp.ID)
|
SaveTags(oApp.ID)
|
||||||
eCurrentMode = eModes.View
|
eCurrentMode = eModes.View
|
||||||
End If
|
End If
|
||||||
Case eModes.Edit
|
Case eModes.Edit
|
||||||
If CoreValidatation(oApp) Then
|
If CoreValidatation(oApp, False) Then
|
||||||
bSuccess = True
|
bSuccess = True
|
||||||
mgrMonitorList.DoListUpdate(oApp)
|
|
||||||
CheckManifestandUpdate(oCurrentGame, oApp)
|
CheckManifestandUpdate(oCurrentGame, oApp)
|
||||||
|
mgrMonitorList.DoListUpdate(oApp, CurrentGame.ID)
|
||||||
eCurrentMode = eModes.View
|
eCurrentMode = eModes.View
|
||||||
End If
|
End If
|
||||||
Case eModes.MultiSelect
|
Case eModes.MultiSelect
|
||||||
@@ -1250,7 +1286,15 @@ Public Class frmGameManager
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function CoreValidatation(ByVal oApp As clsGame) As Boolean
|
Private Function CoreValidatation(ByVal oApp As clsGame, ByVal bNewGame As Boolean) As Boolean
|
||||||
|
Dim sCurrentID As String
|
||||||
|
|
||||||
|
If bNewGame Then
|
||||||
|
sCurrentID = String.Empty
|
||||||
|
Else
|
||||||
|
sCurrentID = CurrentGame.ID
|
||||||
|
End If
|
||||||
|
|
||||||
If txtName.Text.Trim = String.Empty Then
|
If txtName.Text.Trim = String.Empty Then
|
||||||
mgrCommon.ShowMessage(frmGameManager_ErrorValidName, MsgBoxStyle.Exclamation)
|
mgrCommon.ShowMessage(frmGameManager_ErrorValidName, MsgBoxStyle.Exclamation)
|
||||||
txtName.Focus()
|
txtName.Focus()
|
||||||
@@ -1269,14 +1313,14 @@ Public Class frmGameManager
|
|||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If mgrMonitorList.DoDuplicateListCheck(oApp.Name, oApp.ProcessName, , oApp.ID) Then
|
If mgrMonitorList.DoDuplicateListCheck(oApp.ID, , sCurrentID) Then
|
||||||
mgrCommon.ShowMessage(frmGameManager_ErrorGameDupe, MsgBoxStyle.Exclamation)
|
mgrCommon.ShowMessage(frmGameManager_ErrorGameDupe, oApp.ID, MsgBoxStyle.Exclamation)
|
||||||
txtName.Focus()
|
txtName.Focus()
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If oApp.Parameter <> String.Empty Then
|
If oApp.Parameter <> String.Empty Then
|
||||||
If mgrMonitorList.DoDuplicateParameterCheck(oApp.ProcessName, oApp.Parameter, , oApp.ID) Then
|
If mgrMonitorList.DoDuplicateParameterCheck(oApp.ProcessName, oApp.Parameter, , sCurrentID) Then
|
||||||
mgrCommon.ShowMessage(frmGameManager_ErrorProcessParameterDupe, MsgBoxStyle.Exclamation)
|
mgrCommon.ShowMessage(frmGameManager_ErrorProcessParameterDupe, MsgBoxStyle.Exclamation)
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
@@ -1537,6 +1581,7 @@ Public Class frmGameManager
|
|||||||
cmsDeleteAll.Text = frmGameManager_cmsDeleteAll
|
cmsDeleteAll.Text = frmGameManager_cmsDeleteAll
|
||||||
lblComments.Text = frmGameManager_lblComments
|
lblComments.Text = frmGameManager_lblComments
|
||||||
chkRegEx.Text = frmGameManager_chkRegEx
|
chkRegEx.Text = frmGameManager_chkRegEx
|
||||||
|
btnGameID.Text = frmGameManager_btnGameID
|
||||||
|
|
||||||
'Init Filter Timer
|
'Init Filter Timer
|
||||||
tmFilterTimer = New Timer()
|
tmFilterTimer = New Timer()
|
||||||
@@ -1716,6 +1761,10 @@ Public Class frmGameManager
|
|||||||
ExportGameList()
|
ExportGameList()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnGameID_Click(sender As Object, e As EventArgs) Handles btnGameID.Click
|
||||||
|
OpenGameIDEdit()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub txtQuickFilter_TextChanged(sender As Object, e As EventArgs) Handles txtQuickFilter.TextChanged
|
Private Sub txtQuickFilter_TextChanged(sender As Object, e As EventArgs) Handles txtQuickFilter.TextChanged
|
||||||
If Not tmFilterTimer.Enabled Then
|
If Not tmFilterTimer.Enabled Then
|
||||||
tmFilterTimer.Enabled = True
|
tmFilterTimer.Enabled = True
|
||||||
|
|||||||
@@ -142,18 +142,23 @@ Public Class mgrMonitorList
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Shared Sub DoListUpdate(ByVal oGame As clsGame, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local)
|
Public Shared Sub DoListUpdate(ByVal oGame As clsGame, Optional ByVal sQueryID As String = "", Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local)
|
||||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||||
Dim sSQL As String
|
Dim sSQL As String
|
||||||
Dim hshParams As Hashtable
|
Dim hshParams As Hashtable
|
||||||
|
|
||||||
sSQL = "UPDATE monitorlist SET Name=@Name, Process=@Process, Path=@Path, AbsolutePath=@AbsolutePath, FolderSave=@FolderSave, "
|
sSQL = "UPDATE monitorlist SET MonitorID=@ID, Name=@Name, Process=@Process, Path=@Path, AbsolutePath=@AbsolutePath, FolderSave=@FolderSave, "
|
||||||
sSQL &= "FileType=@FileType, TimeStamp=@TimeStamp, ExcludeList=@ExcludeList, ProcessPath=@ProcessPath, Icon=@Icon, "
|
sSQL &= "FileType=@FileType, TimeStamp=@TimeStamp, ExcludeList=@ExcludeList, ProcessPath=@ProcessPath, Icon=@Icon, "
|
||||||
sSQL &= "Hours=@Hours, Version=@Version, Company=@Company, Enabled=@Enabled, MonitorOnly=@MonitorOnly, BackupLimit=@BackupLimit, "
|
sSQL &= "Hours=@Hours, Version=@Version, Company=@Company, Enabled=@Enabled, MonitorOnly=@MonitorOnly, BackupLimit=@BackupLimit, "
|
||||||
sSQL &= "CleanFolder=@CleanFolder, Parameter=@Parameter, Comments=@Comments, IsRegEx=@IsRegEx WHERE MonitorID=@ID"
|
sSQL &= "CleanFolder=@CleanFolder, Parameter=@Parameter, Comments=@Comments, IsRegEx=@IsRegEx WHERE MonitorID=@QueryID"
|
||||||
|
|
||||||
'Parameters
|
'Parameters
|
||||||
hshParams = SetCoreParameters(oGame)
|
hshParams = SetCoreParameters(oGame)
|
||||||
|
If sQueryID <> String.Empty Then
|
||||||
|
hshParams.Add("QueryID", sQueryID)
|
||||||
|
Else
|
||||||
|
hshParams.Add("QueryID", oGame.ID)
|
||||||
|
End If
|
||||||
|
|
||||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||||
|
|
||||||
@@ -295,7 +300,7 @@ Public Class mgrMonitorList
|
|||||||
Dim hshParams As New Hashtable
|
Dim hshParams As New Hashtable
|
||||||
Dim iCounter As Integer = 0
|
Dim iCounter As Integer = 0
|
||||||
|
|
||||||
sSQL = "SELECT * from monitorlist "
|
sSQL = "SELECT * FROM monitorlist "
|
||||||
sSQL &= "WHERE MonitorID = @MonitorID"
|
sSQL &= "WHERE MonitorID = @MonitorID"
|
||||||
|
|
||||||
hshParams.Add("MonitorID", sMonitorID)
|
hshParams.Add("MonitorID", sMonitorID)
|
||||||
@@ -311,20 +316,19 @@ Public Class mgrMonitorList
|
|||||||
Return hshGames
|
Return hshGames
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function DoDuplicateListCheck(ByVal sName As String, ByVal sProcess As String, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local, Optional ByVal sExcludeID As String = "") As Boolean
|
Public Shared Function DoDuplicateListCheck(ByVal sMonitorID As String, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local, Optional ByVal sExcludeID As String = "") As Boolean
|
||||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||||
Dim sSQL As String
|
Dim sSQL As String
|
||||||
Dim oData As DataSet
|
Dim oData As DataSet
|
||||||
Dim hshParams As New Hashtable
|
Dim hshParams As New Hashtable
|
||||||
|
|
||||||
sSQL = "SELECT * FROM monitorlist WHERE Name = @Name AND Process= @Process"
|
sSQL = "SELECT * FROM monitorlist WHERE MonitorID = @MonitorID"
|
||||||
|
|
||||||
hshParams.Add("Name", sName)
|
hshParams.Add("MonitorID", sMonitorID)
|
||||||
hshParams.Add("Process", sProcess)
|
|
||||||
|
|
||||||
If sExcludeID <> String.Empty Then
|
If sExcludeID <> String.Empty Then
|
||||||
sSQL &= " AND MonitorID <> @MonitorID"
|
sSQL &= " AND MonitorID <> @QueryID"
|
||||||
hshParams.Add("MonitorID", sExcludeID)
|
hshParams.Add("QueryID", sExcludeID)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||||
@@ -478,13 +482,11 @@ Public Class mgrMonitorList
|
|||||||
sSQL &= "WHERE MonitorID = @MonitorID;"
|
sSQL &= "WHERE MonitorID = @MonitorID;"
|
||||||
End If
|
End If
|
||||||
sSQL &= "DELETE FROM monitorlist "
|
sSQL &= "DELETE FROM monitorlist "
|
||||||
sSQL &= "WHERE Name = @Name AND Process= @Process;"
|
sSQL &= "WHERE MonitorID = @MonitorID;"
|
||||||
|
|
||||||
For Each oGame As clsGame In hshGames.Values
|
For Each oGame As clsGame In hshGames.Values
|
||||||
hshParams = New Hashtable
|
hshParams = New Hashtable
|
||||||
hshParams.Add("MonitorID", oGame.ID)
|
hshParams.Add("MonitorID", oGame.ID)
|
||||||
hshParams.Add("Name", oGame.Name)
|
|
||||||
hshParams.Add("Process", oGame.TrueProcess)
|
|
||||||
oParamList.Add(hshParams)
|
oParamList.Add(hshParams)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|||||||
Generated
+28
-1
@@ -1500,6 +1500,15 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to &Game ID....
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property frmGameManager_btnGameID() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("frmGameManager_btnGameID", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to ....
|
''' Looks up a localized string similar to ....
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -1906,7 +1915,7 @@ Namespace My.Resources
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to A game with this exact name and process already exists..
|
''' Looks up a localized string similar to A game with the same ID ([PARAM]) already exists..
|
||||||
'''</summary>
|
'''</summary>
|
||||||
Friend ReadOnly Property frmGameManager_ErrorGameDupe() As String
|
Friend ReadOnly Property frmGameManager_ErrorGameDupe() As String
|
||||||
Get
|
Get
|
||||||
@@ -2040,6 +2049,24 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to The unique Game ID is generated by GBM. Changing this value is not recommended..
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property frmGameManager_GameIDEditInfo() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("frmGameManager_GameIDEditInfo", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to Edit Game ID.
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property frmGameManager_GameIDEditTitle() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("frmGameManager_GameIDEditTitle", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to Configuration.
|
''' Looks up a localized string similar to Configuration.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
|
|||||||
@@ -554,7 +554,7 @@
|
|||||||
<value>[PARAM] is already up to date.[BR][BR]Would you like to restore this backup anyway?</value>
|
<value>[PARAM] is already up to date.[BR][BR]Would you like to restore this backup anyway?</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="frmGameManager_ErrorGameDupe" xml:space="preserve">
|
<data name="frmGameManager_ErrorGameDupe" xml:space="preserve">
|
||||||
<value>A game with this exact name and process already exists.</value>
|
<value>A game with the same ID ([PARAM]) already exists.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="frmGameManager_ErrorNoBackupData" xml:space="preserve">
|
<data name="frmGameManager_ErrorNoBackupData" xml:space="preserve">
|
||||||
<value>The selected game(s) have no backup data or can't be restored with their current configuration.</value>
|
<value>The selected game(s) have no backup data or can't be restored with their current configuration.</value>
|
||||||
@@ -2023,4 +2023,13 @@
|
|||||||
<data name="frmGameManager_ErrorRegExFailure" xml:space="preserve">
|
<data name="frmGameManager_ErrorRegExFailure" xml:space="preserve">
|
||||||
<value>The process is not a a valid regular expression.[BR][BR]Would you like help validating and testing your regular expression? [BR][BR]This will open your web browser and requires the internet.</value>
|
<value>The process is not a a valid regular expression.[BR][BR]Would you like help validating and testing your regular expression? [BR][BR]This will open your web browser and requires the internet.</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="frmGameManager_btnGameID" xml:space="preserve">
|
||||||
|
<value>&Game ID...</value>
|
||||||
|
</data>
|
||||||
|
<data name="frmGameManager_GameIDEditInfo" xml:space="preserve">
|
||||||
|
<value>The unique Game ID is generated by GBM. Changing this value is not recommended.</value>
|
||||||
|
</data>
|
||||||
|
<data name="frmGameManager_GameIDEditTitle" xml:space="preserve">
|
||||||
|
<value>Edit Game ID</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
Reference in New Issue
Block a user