From f22bcb91a99492fff3985ba6e2632247073ba4b0 Mon Sep 17 00:00:00 2001 From: "Michael J. Seiferling" Date: Mon, 7 Dec 2015 16:31:28 -0600 Subject: [PATCH] Update for issues 23 and 24 --- GBM/Forms/frmGameManager.vb | 2 +- GBM/Forms/frmMain.Designer.vb | 14 ++++++++++++-- GBM/Forms/frmMain.vb | 20 +++++++++++++------- GBM/Forms/frmSettings.Designer.vb | 12 ++++++------ GBM/Game Backup Monitor.vbproj | 1 + GBM/Managers/mgrRestore.vb | 2 +- GBM/My Project/Resources.Designer.vb | 10 ++++++++++ GBM/My Project/Resources.resx | 3 +++ GBM/Resources/Inbox.png | Bin 0 -> 1778 bytes 9 files changed, 47 insertions(+), 17 deletions(-) create mode 100644 GBM/Resources/Inbox.png diff --git a/GBM/Forms/frmGameManager.vb b/GBM/Forms/frmGameManager.vb index 3e1fc5e..47cc269 100644 --- a/GBM/Forms/frmGameManager.vb +++ b/GBM/Forms/frmGameManager.vb @@ -1186,7 +1186,7 @@ Public Class frmGameManager 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 recommend you do NOT change it." & + 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 diff --git a/GBM/Forms/frmMain.Designer.vb b/GBM/Forms/frmMain.Designer.vb index d16065a..12483fb 100644 --- a/GBM/Forms/frmMain.Designer.vb +++ b/GBM/Forms/frmMain.Designer.vb @@ -84,6 +84,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.gMonTrayMenu.SuspendLayout() Me.gMonStatusStrip.SuspendLayout() Me.gMonMainMenu.SuspendLayout() @@ -103,7 +104,7 @@ Partial Class frmMain ' 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.Name = "gMonTrayMenu" - Me.gMonTrayMenu.Size = New System.Drawing.Size(162, 170) + Me.gMonTrayMenu.Size = New System.Drawing.Size(162, 148) ' 'gMonTrayShow ' @@ -274,7 +275,7 @@ Partial Class frmMain ' 'gMonMainMenu ' - Me.gMonMainMenu.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonFile, Me.gMonSetup, Me.gMonTools, Me.gMonHelp}) + Me.gMonMainMenu.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonFile, Me.gMonSetup, Me.gMonTools, Me.gMonHelp, Me.gMonNotification}) Me.gMonMainMenu.Location = New System.Drawing.Point(0, 0) Me.gMonMainMenu.Name = "gMonMainMenu" Me.gMonMainMenu.RenderMode = System.Windows.Forms.ToolStripRenderMode.System @@ -517,6 +518,14 @@ Partial Class frmMain Me.lblStatus3.Size = New System.Drawing.Size(365, 13) Me.lblStatus3.TabIndex = 17 ' + '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 + ' 'frmMain ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -616,4 +625,5 @@ Partial Class frmMain Friend WithEvents lblStatus1 As Label Friend WithEvents lblStatus2 As Label Friend WithEvents lblStatus3 As Label + Friend WithEvents gMonNotification As System.Windows.Forms.ToolStripMenuItem End Class diff --git a/GBM/Forms/frmMain.vb b/GBM/Forms/frmMain.vb index 9c76128..e215d79 100644 --- a/GBM/Forms/frmMain.vb +++ b/GBM/Forms/frmMain.vb @@ -172,14 +172,16 @@ Public Class frmMain For Each oGame In oRestoreList oRestoreInfo = oBackupData(oGame.Name) - If mgrRestore.CheckPath(oRestoreInfo, oGame, bTriggerReload) Then - If bTriggerReload Then LoadGameSettings() + 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) End If Next + 'Reload the monitor list if any game data was changed during the path checks + If bTriggerReload Then LoadGameSettings() + 'Run restores If oReadyList.Count > 0 Then Dim oThread As New System.Threading.Thread(AddressOf ExecuteRestore) @@ -309,10 +311,9 @@ Public Class frmMain Dim slRestoreData As SortedList = mgrRestore.CompareManifests() If slRestoreData.Count > 0 Then - If MsgBox("You have " & slRestoreData.Count & " new backup(s) to restore on this computer." & vbCrLf & vbCrLf & "Do you want to review them in the Game Manager now?", - MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then - OpenGameManager(True) - End If + gMonNotification.Image = My.Resources.Inbox + gMonNotification.Text = slRestoreData.Count & " pending restore(s)" + gMonNotification.Visible = True End If End Sub @@ -1118,7 +1119,7 @@ Public Class frmMain End If End Sub - Private Function VerifyStartWithWindows() As Boolean + Private Function VerifyStartWithWindows() As Boolean Dim oKey As Microsoft.Win32.RegistryKey Dim sAppName As String = Application.ProductName Dim sAppPath As String = Application.ExecutablePath @@ -1293,6 +1294,11 @@ Public Class frmMain OpenCheckforUpdates() End Sub + Private Sub gMonNotification_Click(sender As Object, e As EventArgs) Handles gMonNotification.Click + gMonNotification.Visible = False + OpenGameManager(True) + End Sub + Private Sub btnLogToggle_Click(sender As Object, e As EventArgs) Handles btnLogToggle.Click ToggleLog() End Sub diff --git a/GBM/Forms/frmSettings.Designer.vb b/GBM/Forms/frmSettings.Designer.vb index c76730f..c6c4ad7 100644 --- a/GBM/Forms/frmSettings.Designer.vb +++ b/GBM/Forms/frmSettings.Designer.vb @@ -240,21 +240,21 @@ Partial Class frmSettings 'chkCheckSum ' Me.chkCheckSum.AutoSize = True - Me.chkCheckSum.Location = New System.Drawing.Point(6, 111) + Me.chkCheckSum.Location = New System.Drawing.Point(6, 88) Me.chkCheckSum.Name = "chkCheckSum" Me.chkCheckSum.Size = New System.Drawing.Size(195, 17) - Me.chkCheckSum.TabIndex = 4 + Me.chkCheckSum.TabIndex = 3 Me.chkCheckSum.Text = "Verify backup files with a checksum" Me.chkCheckSum.UseVisualStyleBackColor = True ' 'chkRestoreOnLaunch ' Me.chkRestoreOnLaunch.AutoSize = True - Me.chkRestoreOnLaunch.Location = New System.Drawing.Point(6, 88) + Me.chkRestoreOnLaunch.Location = New System.Drawing.Point(6, 111) Me.chkRestoreOnLaunch.Name = "chkRestoreOnLaunch" - Me.chkRestoreOnLaunch.Size = New System.Drawing.Size(249, 17) - Me.chkRestoreOnLaunch.TabIndex = 3 - Me.chkRestoreOnLaunch.Text = "Check for new backup files to restore at launch" + Me.chkRestoreOnLaunch.Size = New System.Drawing.Size(257, 17) + Me.chkRestoreOnLaunch.TabIndex = 4 + Me.chkRestoreOnLaunch.Text = "Notify when there are new backup files to restore" Me.chkRestoreOnLaunch.UseVisualStyleBackColor = True ' 'chkOverwriteWarning diff --git a/GBM/Game Backup Monitor.vbproj b/GBM/Game Backup Monitor.vbproj index a8e8770..c76df06 100644 --- a/GBM/Game Backup Monitor.vbproj +++ b/GBM/Game Backup Monitor.vbproj @@ -328,6 +328,7 @@ + diff --git a/GBM/Managers/mgrRestore.vb b/GBM/Managers/mgrRestore.vb index 09c9ea5..f9219f8 100644 --- a/GBM/Managers/mgrRestore.vb +++ b/GBM/Managers/mgrRestore.vb @@ -27,7 +27,7 @@ Public Class mgrRestore Public Event UpdateRestoreInfo(oRestoreInfo As clsBackup) Public Event SetLastAction(sMessage As String) - Public Shared Function CheckPath(ByRef oRestoreInfo As clsBackup, ByVal oGame As clsGame, Optional ByRef bTriggerReload As Boolean = False) As Boolean + Public Shared Function CheckPath(ByRef oRestoreInfo As clsBackup, ByVal oGame As clsGame, ByRef bTriggerReload As Boolean) As Boolean Dim sProcess As String Dim sRestorePath As String Dim bNoAuto As Boolean diff --git a/GBM/My Project/Resources.Designer.vb b/GBM/My Project/Resources.Designer.vb index ea98961..b74b4cb 100644 --- a/GBM/My Project/Resources.Designer.vb +++ b/GBM/My Project/Resources.Designer.vb @@ -110,6 +110,16 @@ Namespace My.Resources End Get End Property + ''' + ''' Looks up a localized resource of type System.Drawing.Bitmap. + ''' + Friend ReadOnly Property Inbox() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("Inbox", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + ''' ''' Looks up a localized resource of type System.Drawing.Bitmap. ''' diff --git a/GBM/My Project/Resources.resx b/GBM/My Project/Resources.resx index 3269a52..b3e63b7 100644 --- a/GBM/My Project/Resources.resx +++ b/GBM/My Project/Resources.resx @@ -133,6 +133,9 @@ ..\Resources\GBM_Tray_Stopped.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Inbox.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\Lock.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a diff --git a/GBM/Resources/Inbox.png b/GBM/Resources/Inbox.png new file mode 100644 index 0000000000000000000000000000000000000000..0dfe41188be429b2fc76c8f5d96130c9398518c1 GIT binary patch literal 1778 zcmVoSr2;h(1QmLNGf>n;DLiT58@3E28bj`sM;ur6eKBF zfrJ);Knu!8_jBgWyf@?jz1{5>OFPq6N@FK^op!qO-tYJS`2GLyE%7`L=JTb%JiitQ zED-p=6VNI>B!u{$VE@m*H|ZhcpdPMDD5?rXQK0zx#5p_=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