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 0000000..0dfe411 Binary files /dev/null and b/GBM/Resources/Inbox.png differ