v0.94 bug fixes and feature additions
This commit is contained in:
+34
-4
@@ -367,8 +367,10 @@ Public Class frmMain
|
||||
lblGameTitle.Text = "Last Game: " & oProcess.GameInfo.CroppedName
|
||||
pbIcon.Image = oPriorImage
|
||||
txtGameInfo.Text = sPriorDetails
|
||||
lblTimeTitle.Visible = True
|
||||
lblTimeSpent.Visible = True
|
||||
If oSettings.TimeTracking Then
|
||||
lblTimeTitle.Visible = True
|
||||
lblTimeSpent.Visible = True
|
||||
End If
|
||||
Else
|
||||
pbIcon.Image = My.Resources.Searching
|
||||
lblGameTitle.Text = "No Game Detected"
|
||||
@@ -451,7 +453,7 @@ Public Class frmMain
|
||||
End If
|
||||
|
||||
'Do Time Update
|
||||
UpdateTimeSpent(oProcess.GameInfo.Hours, 0)
|
||||
If oSettings.TimeTracking Then UpdateTimeSpent(oProcess.GameInfo.Hours, 0)
|
||||
|
||||
'Set Details
|
||||
If sFileName = String.Empty Then
|
||||
@@ -703,6 +705,13 @@ Public Class frmMain
|
||||
UpdateLog("The correct version of 7-Zip was not found! Please re-install GBM, you may experience an application crash if a backup or restore is performed.", True, ToolTipIcon.Error)
|
||||
End If
|
||||
|
||||
'Verify the "Start with Windows" setting
|
||||
If oSettings.StartWithWindows Then
|
||||
If Not VerifyStartWithWindows() Then
|
||||
UpdateLog("GBM is running from a new location, the Windows startup entry has been updated.", True, ToolTipIcon.Info)
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
'Functions that handle buttons, menus and other GUI features on this form
|
||||
@@ -1047,6 +1056,27 @@ Public Class frmMain
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function VerifyStartWithWindows() As Boolean
|
||||
Dim oKey As Microsoft.Win32.RegistryKey
|
||||
Dim sAppName As String = Application.ProductName
|
||||
Dim sAppPath As String = Application.ExecutablePath
|
||||
Dim sRegPath As String
|
||||
|
||||
oKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True)
|
||||
sRegPath = oKey.GetValue(sAppName, String.Empty).ToString.Replace("""", "")
|
||||
oKey.Close()
|
||||
|
||||
If sAppPath.ToLower <> sRegPath.ToLower Then
|
||||
oKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True)
|
||||
oKey.SetValue(sAppName, """" & sAppPath & """")
|
||||
oKey.Close()
|
||||
Return False
|
||||
Else
|
||||
Return True
|
||||
End If
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub CheckForSavedDuplicate()
|
||||
For Each o As clsGame In oProcess.DuplicateList
|
||||
If o.ProcessPath.ToLower = oProcess.GameInfo.ProcessPath.ToLower Then
|
||||
@@ -1337,7 +1367,7 @@ Public Class frmMain
|
||||
If Not bCancelledByUser Then
|
||||
DoMultiGameCheck()
|
||||
UpdateLog(oProcess.GameInfo.Name & " has ended.", False)
|
||||
HandleTimeSpent()
|
||||
If oSettings.TimeTracking Then HandleTimeSpent()
|
||||
RunBackup()
|
||||
End If
|
||||
bCancelledByUser = False
|
||||
|
||||
Generated
+20
-7
@@ -25,6 +25,7 @@ Partial Class frmSettings
|
||||
Me.chkMonitorOnStartup = New System.Windows.Forms.CheckBox()
|
||||
Me.chkBackupConfirm = New System.Windows.Forms.CheckBox()
|
||||
Me.grpGeneral = New System.Windows.Forms.GroupBox()
|
||||
Me.chkTimeTracking = New System.Windows.Forms.CheckBox()
|
||||
Me.chkStartWindows = New System.Windows.Forms.CheckBox()
|
||||
Me.chkSync = New System.Windows.Forms.CheckBox()
|
||||
Me.chkShowDetectionTips = New System.Windows.Forms.CheckBox()
|
||||
@@ -68,6 +69,7 @@ Partial Class frmSettings
|
||||
'
|
||||
'grpGeneral
|
||||
'
|
||||
Me.grpGeneral.Controls.Add(Me.chkTimeTracking)
|
||||
Me.grpGeneral.Controls.Add(Me.chkStartWindows)
|
||||
Me.grpGeneral.Controls.Add(Me.chkSync)
|
||||
Me.grpGeneral.Controls.Add(Me.chkShowDetectionTips)
|
||||
@@ -75,11 +77,21 @@ Partial Class frmSettings
|
||||
Me.grpGeneral.Controls.Add(Me.chkMonitorOnStartup)
|
||||
Me.grpGeneral.Location = New System.Drawing.Point(12, 12)
|
||||
Me.grpGeneral.Name = "grpGeneral"
|
||||
Me.grpGeneral.Size = New System.Drawing.Size(360, 145)
|
||||
Me.grpGeneral.Size = New System.Drawing.Size(360, 165)
|
||||
Me.grpGeneral.TabIndex = 0
|
||||
Me.grpGeneral.TabStop = False
|
||||
Me.grpGeneral.Text = "General"
|
||||
'
|
||||
'chkTimeTracking
|
||||
'
|
||||
Me.chkTimeTracking.AutoSize = True
|
||||
Me.chkTimeTracking.Location = New System.Drawing.Point(6, 111)
|
||||
Me.chkTimeTracking.Name = "chkTimeTracking"
|
||||
Me.chkTimeTracking.Size = New System.Drawing.Size(122, 17)
|
||||
Me.chkTimeTracking.TabIndex = 5
|
||||
Me.chkTimeTracking.Text = "Enable time tracking"
|
||||
Me.chkTimeTracking.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkStartWindows
|
||||
'
|
||||
Me.chkStartWindows.AutoSize = True
|
||||
@@ -93,7 +105,7 @@ Partial Class frmSettings
|
||||
'chkSync
|
||||
'
|
||||
Me.chkSync.AutoSize = True
|
||||
Me.chkSync.Location = New System.Drawing.Point(6, 111)
|
||||
Me.chkSync.Location = New System.Drawing.Point(6, 134)
|
||||
Me.chkSync.Name = "chkSync"
|
||||
Me.chkSync.Size = New System.Drawing.Size(208, 17)
|
||||
Me.chkSync.TabIndex = 4
|
||||
@@ -125,7 +137,7 @@ Partial Class frmSettings
|
||||
Me.grpPaths.Controls.Add(Me.btnBackupFolder)
|
||||
Me.grpPaths.Controls.Add(Me.lblBackupFolder)
|
||||
Me.grpPaths.Controls.Add(Me.txtBackupFolder)
|
||||
Me.grpPaths.Location = New System.Drawing.Point(12, 311)
|
||||
Me.grpPaths.Location = New System.Drawing.Point(12, 331)
|
||||
Me.grpPaths.Name = "grpPaths"
|
||||
Me.grpPaths.Size = New System.Drawing.Size(360, 60)
|
||||
Me.grpPaths.TabIndex = 2
|
||||
@@ -160,7 +172,7 @@ Partial Class frmSettings
|
||||
'btnSave
|
||||
'
|
||||
Me.btnSave.DialogResult = System.Windows.Forms.DialogResult.OK
|
||||
Me.btnSave.Location = New System.Drawing.Point(216, 377)
|
||||
Me.btnSave.Location = New System.Drawing.Point(216, 397)
|
||||
Me.btnSave.Name = "btnSave"
|
||||
Me.btnSave.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnSave.TabIndex = 3
|
||||
@@ -170,7 +182,7 @@ Partial Class frmSettings
|
||||
'btnCancel
|
||||
'
|
||||
Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
|
||||
Me.btnCancel.Location = New System.Drawing.Point(297, 377)
|
||||
Me.btnCancel.Location = New System.Drawing.Point(297, 397)
|
||||
Me.btnCancel.Name = "btnCancel"
|
||||
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnCancel.TabIndex = 4
|
||||
@@ -184,7 +196,7 @@ Partial Class frmSettings
|
||||
Me.grpBackup.Controls.Add(Me.chkOverwriteWarning)
|
||||
Me.grpBackup.Controls.Add(Me.chkCreateFolder)
|
||||
Me.grpBackup.Controls.Add(Me.chkBackupConfirm)
|
||||
Me.grpBackup.Location = New System.Drawing.Point(12, 163)
|
||||
Me.grpBackup.Location = New System.Drawing.Point(12, 183)
|
||||
Me.grpBackup.Name = "grpBackup"
|
||||
Me.grpBackup.Size = New System.Drawing.Size(360, 142)
|
||||
Me.grpBackup.TabIndex = 1
|
||||
@@ -235,7 +247,7 @@ Partial Class frmSettings
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(384, 412)
|
||||
Me.ClientSize = New System.Drawing.Size(384, 431)
|
||||
Me.Controls.Add(Me.grpBackup)
|
||||
Me.Controls.Add(Me.btnCancel)
|
||||
Me.Controls.Add(Me.btnSave)
|
||||
@@ -277,4 +289,5 @@ Partial Class frmSettings
|
||||
Friend WithEvents chkSync As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkCheckSum As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkStartWindows As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkTimeTracking As System.Windows.Forms.CheckBox
|
||||
End Class
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
oSettings.CreateSubFolder = chkCreateFolder.Checked
|
||||
oSettings.ShowOverwriteWarning = chkOverwriteWarning.Checked
|
||||
oSettings.RestoreOnLaunch = chkRestoreOnLaunch.Checked
|
||||
oSettings.TimeTracking = chkTimeTracking.Checked
|
||||
|
||||
'We need to clear all checksums its turned off
|
||||
If chkCheckSum.Checked = False And oSettings.CheckSum = True Then
|
||||
@@ -102,6 +103,7 @@
|
||||
txtBackupFolder.Text = oSettings.BackupFolder
|
||||
chkSync.Checked = oSettings.Sync
|
||||
chkCheckSum.Checked = oSettings.CheckSum
|
||||
chkTimeTracking.Checked = oSettings.TimeTracking
|
||||
End Sub
|
||||
|
||||
Private Sub btnSave_Click(sender As System.Object, e As System.EventArgs) Handles btnSave.Click
|
||||
|
||||
Reference in New Issue
Block a user