Updates for issues 20 and 24

This commit is contained in:
Michael J. Seiferling
2015-12-08 10:10:44 -06:00
parent f22bcb91a9
commit 87326981dd
11 changed files with 69 additions and 114 deletions
+1 -13
View File
@@ -60,7 +60,6 @@ Partial Class frmGameManager
Me.lblHours = New System.Windows.Forms.Label()
Me.btnTags = New System.Windows.Forms.Button()
Me.grpStats = New System.Windows.Forms.GroupBox()
Me.btnRestorePathLock = New System.Windows.Forms.Button()
Me.lblRestorePath = New System.Windows.Forms.Label()
Me.txtRestorePath = New System.Windows.Forms.TextBox()
Me.btnOpenRestorePath = New System.Windows.Forms.Button()
@@ -460,7 +459,6 @@ Partial Class frmGameManager
'grpStats
'
Me.grpStats.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.grpStats.Controls.Add(Me.btnRestorePathLock)
Me.grpStats.Controls.Add(Me.lblRestorePath)
Me.grpStats.Controls.Add(Me.txtRestorePath)
Me.grpStats.Controls.Add(Me.btnOpenRestorePath)
@@ -480,15 +478,6 @@ Partial Class frmGameManager
Me.grpStats.TabStop = False
Me.grpStats.Text = "Backup Information"
'
'btnRestorePathLock
'
Me.btnRestorePathLock.Image = Global.GBM.My.Resources.Resources.Lock
Me.btnRestorePathLock.Location = New System.Drawing.Point(495, 97)
Me.btnRestorePathLock.Name = "btnRestorePathLock"
Me.btnRestorePathLock.Size = New System.Drawing.Size(33, 23)
Me.btnRestorePathLock.TabIndex = 9
Me.btnRestorePathLock.UseVisualStyleBackColor = True
'
'lblRestorePath
'
Me.lblRestorePath.AutoSize = True
@@ -503,7 +492,7 @@ Partial Class frmGameManager
Me.txtRestorePath.Location = New System.Drawing.Point(96, 99)
Me.txtRestorePath.Name = "txtRestorePath"
Me.txtRestorePath.ReadOnly = True
Me.txtRestorePath.Size = New System.Drawing.Size(396, 20)
Me.txtRestorePath.Size = New System.Drawing.Size(432, 20)
Me.txtRestorePath.TabIndex = 8
'
'btnOpenRestorePath
@@ -817,5 +806,4 @@ Partial Class frmGameManager
Friend WithEvents btnExclude As System.Windows.Forms.Button
Friend WithEvents lblRestorePath As Label
Friend WithEvents txtRestorePath As TextBox
Friend WithEvents btnRestorePathLock As Button
End Class
+9 -58
View File
@@ -538,8 +538,7 @@ Public Class frmGameManager
Else
txtFileSize.Text = "Backup file was not found!"
End If
txtRestorePath.Text = CurrentBackupItem.RestorePath
btnRestorePathLock.Enabled = True
txtRestorePath.Text = CurrentBackupItem.RestorePath
Else
txtCurrentBackup.Text = "Never"
txtFileSize.Text = String.Empty
@@ -547,8 +546,7 @@ Public Class frmGameManager
btnOpenBackupFile.Enabled = False
btnOpenRestorePath.Enabled = False
btnRestore.Enabled = False
btnDeleteBackup.Enabled = False
btnRestorePathLock.Enabled = False
btnDeleteBackup.Enabled = False
End If
If oLocalBackupData.Contains(oApp.Name) Then
@@ -762,10 +760,7 @@ Public Class frmGameManager
btnTags.Enabled = False
lblTags.Visible = False
btnInclude.Text = "In&clude Items..."
btnExclude.Text = "E&xclude Items..."
txtRestorePath.ReadOnly = True
btnRestorePathLock.Image = My.Resources.Lock
btnRestorePathLock.Enabled = False
btnExclude.Text = "E&xclude Items..."
Case eModes.Edit
grpFilter.Enabled = False
lstGames.Enabled = False
@@ -800,9 +795,7 @@ Public Class frmGameManager
btnDelete.Enabled = True
btnBackup.Enabled = True
btnTags.Enabled = True
lblTags.Visible = True
txtRestorePath.ReadOnly = True
btnRestorePathLock.Image = My.Resources.Lock
lblTags.Visible = True
Case eModes.ViewTemp
grpFilter.Enabled = True
lstGames.Enabled = True
@@ -819,9 +812,7 @@ Public Class frmGameManager
btnTags.Enabled = False
lblTags.Visible = False
btnInclude.Text = "In&clude Items..."
btnExclude.Text = "E&xclude Items..."
txtRestorePath.ReadOnly = True
btnRestorePathLock.Image = My.Resources.Lock
btnExclude.Text = "E&xclude Items..."
Case eModes.Disabled
grpFilter.Enabled = True
lstGames.Enabled = True
@@ -846,9 +837,7 @@ Public Class frmGameManager
lblTags.Visible = False
btnInclude.Text = "In&clude Items..."
btnExclude.Text = "E&xclude Items..."
txtRestorePath.ReadOnly = True
btnRestorePathLock.Image = My.Resources.Lock
btnRestorePathLock.Enabled = False
txtRestorePath.ReadOnly = True
Case eModes.MultiSelect
lstGames.Enabled = True
WipeControls(grpConfig.Controls)
@@ -872,11 +861,11 @@ Public Class frmGameManager
btnMarkAsRestored.Enabled = True
btnTags.Enabled = True
lblTags.Visible = False
txtRestorePath.ReadOnly = True
btnRestorePathLock.Image = My.Resources.Lock
btnRestorePathLock.Enabled = False
txtRestorePath.ReadOnly = True
End Select
lstGames.Focus()
IsLoading = False
End Sub
@@ -1181,40 +1170,6 @@ Public Class frmGameManager
End If
End Sub
Private Sub HandleRestorePathOverride()
Dim bUnlock As Boolean = False
If txtRestorePath.ReadOnly Then
If CurrentBackupItem.RestorePath = txtSavePath.Text Then
If MsgBox("No problems were detected with the current backup's Restore Path, it's highly recommended you do NOT change it." &
vbCrLf & vbCrLf & "Do you still want to unlock the field for editing?",
MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
bUnlock = True
End If
Else
bUnlock = True
End If
If bUnlock Then
txtRestorePath.ReadOnly = False
btnRestorePathLock.Image = My.Resources.Unlock
MsgBox("You may now edit the Restore Path." & vbCrLf & vbCrLf & "Click the Lock button to save any changes.", MsgBoxStyle.Information, "Game Backup Monitor")
End If
Else
txtRestorePath.ReadOnly = True
btnRestorePathLock.Image = My.Resources.Lock
If CurrentBackupItem.RestorePath <> txtRestorePath.Text Then
If Path.IsPathRooted(txtRestorePath.Text) Then
CurrentBackupItem.AbsolutePath = True
CurrentBackupItem.RestorePath = txtRestorePath.Text
Else
CurrentBackupItem.RestorePath = txtRestorePath.Text
End If
mgrManifest.DoManifestUpdate(CurrentBackupItem, mgrSQLite.Database.Remote)
End If
End If
End Sub
Private Sub frmGameManager_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If DisableExternalFunctions Then
@@ -1352,8 +1307,4 @@ Public Class frmGameManager
btnInclude.Enabled = True
End If
End Sub
Private Sub btnTogglePathLock_Click(sender As Object, e As EventArgs) Handles btnRestorePathLock.Click
HandleRestorePathOverride()
End Sub
End Class
+18 -9
View File
@@ -73,6 +73,7 @@ Partial Class frmMain
Me.gMonHelpManual = New System.Windows.Forms.ToolStripMenuItem()
Me.gMonHelpCheckforUpdates = New System.Windows.Forms.ToolStripMenuItem()
Me.gMonHelpAbout = New System.Windows.Forms.ToolStripMenuItem()
Me.gMonNotification = New System.Windows.Forms.ToolStripMenuItem()
Me.pbIcon = New System.Windows.Forms.PictureBox()
Me.btnLogToggle = New System.Windows.Forms.Button()
Me.lblGameTitle = New System.Windows.Forms.Label()
@@ -84,7 +85,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.gMonNotification = New System.Windows.Forms.ToolStripMenuItem()
Me.gMonTrayNotification = New System.Windows.Forms.ToolStripMenuItem()
Me.gMonTrayMenu.SuspendLayout()
Me.gMonStatusStrip.SuspendLayout()
Me.gMonMainMenu.SuspendLayout()
@@ -102,9 +103,9 @@ Partial Class frmMain
'
'gMonTrayMenu
'
Me.gMonTrayMenu.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonTrayShow, Me.gMonTraySep2, Me.gMonTrayMon, Me.gMonTraySettings, Me.gMonTraySetup, Me.gMonTrayTools, Me.gMonTraySep1, Me.gMonTrayExit})
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, 148)
Me.gMonTrayMenu.Size = New System.Drawing.Size(162, 192)
'
'gMonTrayShow
'
@@ -418,6 +419,14 @@ Partial Class frmMain
Me.gMonHelpAbout.Size = New System.Drawing.Size(171, 22)
Me.gMonHelpAbout.Text = "&About"
'
'gMonNotification
'
Me.gMonNotification.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right
Me.gMonNotification.Name = "gMonNotification"
Me.gMonNotification.Size = New System.Drawing.Size(82, 20)
Me.gMonNotification.Text = "Notification"
Me.gMonNotification.Visible = False
'
'pbIcon
'
Me.pbIcon.Location = New System.Drawing.Point(12, 36)
@@ -518,13 +527,12 @@ Partial Class frmMain
Me.lblStatus3.Size = New System.Drawing.Size(365, 13)
Me.lblStatus3.TabIndex = 17
'
'gMonNotification
'gMonTrayNotification
'
Me.gMonNotification.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right
Me.gMonNotification.Name = "gMonNotification"
Me.gMonNotification.Size = New System.Drawing.Size(82, 20)
Me.gMonNotification.Text = "Notification"
Me.gMonNotification.Visible = False
Me.gMonTrayNotification.Name = "gMonTrayNotification"
Me.gMonTrayNotification.Size = New System.Drawing.Size(161, 22)
Me.gMonTrayNotification.Text = "Notification"
Me.gMonTrayNotification.Visible = False
'
'frmMain
'
@@ -626,4 +634,5 @@ Partial Class frmMain
Friend WithEvents lblStatus2 As Label
Friend WithEvents lblStatus3 As Label
Friend WithEvents gMonNotification As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents gMonTrayNotification As System.Windows.Forms.ToolStripMenuItem
End Class
+13 -4
View File
@@ -175,7 +175,7 @@ Public Class frmMain
If mgrRestore.CheckPath(oRestoreInfo, oGame, bTriggerReload) Then
oReadyList.Add(oRestoreInfo)
Else
UpdateLog(oRestoreInfo.Name & " restore was cancelled due to unknown restore path.", False, ToolTipIcon.Error, True)
UpdateLog(oRestoreInfo.Name & " restore was cancelled due to a restore path issue.", False, ToolTipIcon.Error, True)
End If
Next
@@ -309,13 +309,21 @@ Public Class frmMain
Private Sub CheckRestore()
Dim slRestoreData As SortedList = mgrRestore.CompareManifests()
Dim sNotification As String
If slRestoreData.Count > 0 Then
If slRestoreData.Count > 1 Then
sNotification = slRestoreData.Count & " Games Pending Restore"
Else
sNotification = slRestoreData.Count & " Game Pending Restore"
End If
gMonNotification.Image = My.Resources.Inbox
gMonNotification.Text = slRestoreData.Count & " pending restore(s)"
gMonTrayNotification.Image = My.Resources.Inbox
gMonNotification.Text = sNotification
gMonTrayNotification.Text = sNotification
gMonNotification.Visible = True
gMonTrayNotification.Visible = True
End If
End Sub
'Functions to handle monitor list features
@@ -1294,8 +1302,9 @@ Public Class frmMain
OpenCheckforUpdates()
End Sub
Private Sub gMonNotification_Click(sender As Object, e As EventArgs) Handles gMonNotification.Click
Private Sub gMonNotification_Click(sender As Object, e As EventArgs) Handles gMonNotification.Click, gMonTrayNotification.Click
gMonNotification.Visible = False
gMonTrayNotification.Visible = False
OpenGameManager(True)
End Sub