Fixes for backup threshold setting
This commit is contained in:
@@ -269,8 +269,8 @@ Public Class frmMain
|
|||||||
|
|
||||||
If SupressBackup() Then
|
If SupressBackup() Then
|
||||||
bDoBackup = False
|
bDoBackup = False
|
||||||
UpdateLog(oProcess.GameInfo.Name & " backup was cancelled due to session time.", False)
|
UpdateLog(oProcess.GameInfo.Name & " backup was cancelled due to session length.", False)
|
||||||
SetLastAction(oProcess.GameInfo.CroppedName & " backup was cancelled due to session time")
|
SetLastAction(oProcess.GameInfo.CroppedName & " backup was cancelled due to session length")
|
||||||
OperationEnded()
|
OperationEnded()
|
||||||
Else
|
Else
|
||||||
If oProcess.GameInfo.MonitorOnly = False Then
|
If oProcess.GameInfo.MonitorOnly = False Then
|
||||||
@@ -566,14 +566,13 @@ Public Class frmMain
|
|||||||
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists()
|
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists()
|
||||||
|
|
||||||
UpdateTimeSpent(dCurrentHours, oProcess.TimeSpent.TotalHours)
|
UpdateTimeSpent(dCurrentHours, oProcess.TimeSpent.TotalHours)
|
||||||
|
|
||||||
'Reset
|
|
||||||
oProcess.StartTime = Now : oProcess.EndTime = Now
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function SupressBackup() As Boolean
|
Private Function SupressBackup() As Boolean
|
||||||
|
Dim iSession As Integer
|
||||||
If oSettings.SupressBackup Then
|
If oSettings.SupressBackup Then
|
||||||
If oProcess.TimeSpent.Minutes > oSettings.SupressBackupThreshold Then
|
iSession = Math.Ceiling(oProcess.TimeSpent.TotalMinutes)
|
||||||
|
If iSession > oSettings.SupressBackupThreshold Then
|
||||||
Return False
|
Return False
|
||||||
Else
|
Else
|
||||||
Return True
|
Return True
|
||||||
@@ -1429,6 +1428,7 @@ Public Class frmMain
|
|||||||
|
|
||||||
Private Sub bwMain_RunWorkerCompleted(sender As System.Object, e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles bwMonitor.RunWorkerCompleted
|
Private Sub bwMain_RunWorkerCompleted(sender As System.Object, e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles bwMonitor.RunWorkerCompleted
|
||||||
oProcess.EndTime = Now
|
oProcess.EndTime = Now
|
||||||
|
|
||||||
If Not bCancelledByUser Then
|
If Not bCancelledByUser Then
|
||||||
If DoMultiGameCheck() Then
|
If DoMultiGameCheck() Then
|
||||||
UpdateLog(oProcess.GameInfo.Name & " has ended.", False)
|
UpdateLog(oProcess.GameInfo.Name & " has ended.", False)
|
||||||
@@ -1440,7 +1440,9 @@ Public Class frmMain
|
|||||||
ResumeScan()
|
ResumeScan()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
bCancelledByUser = False
|
bCancelledByUser = False
|
||||||
|
oProcess.StartTime = Now : oProcess.EndTime = Now
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Main_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
Private Sub Main_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
||||||
|
|||||||
Generated
+10
-10
@@ -38,7 +38,7 @@ Partial Class frmSettings
|
|||||||
Me.btnSave = New System.Windows.Forms.Button()
|
Me.btnSave = New System.Windows.Forms.Button()
|
||||||
Me.btnCancel = New System.Windows.Forms.Button()
|
Me.btnCancel = New System.Windows.Forms.Button()
|
||||||
Me.grpBackup = New System.Windows.Forms.GroupBox()
|
Me.grpBackup = New System.Windows.Forms.GroupBox()
|
||||||
Me.Label1 = New System.Windows.Forms.Label()
|
Me.lblMinutes = New System.Windows.Forms.Label()
|
||||||
Me.nudSupressBackupThreshold = New System.Windows.Forms.NumericUpDown()
|
Me.nudSupressBackupThreshold = New System.Windows.Forms.NumericUpDown()
|
||||||
Me.chkSupressBackup = New System.Windows.Forms.CheckBox()
|
Me.chkSupressBackup = New System.Windows.Forms.CheckBox()
|
||||||
Me.chkCheckSum = New System.Windows.Forms.CheckBox()
|
Me.chkCheckSum = New System.Windows.Forms.CheckBox()
|
||||||
@@ -195,7 +195,7 @@ Partial Class frmSettings
|
|||||||
'
|
'
|
||||||
'grpBackup
|
'grpBackup
|
||||||
'
|
'
|
||||||
Me.grpBackup.Controls.Add(Me.Label1)
|
Me.grpBackup.Controls.Add(Me.lblMinutes)
|
||||||
Me.grpBackup.Controls.Add(Me.nudSupressBackupThreshold)
|
Me.grpBackup.Controls.Add(Me.nudSupressBackupThreshold)
|
||||||
Me.grpBackup.Controls.Add(Me.chkSupressBackup)
|
Me.grpBackup.Controls.Add(Me.chkSupressBackup)
|
||||||
Me.grpBackup.Controls.Add(Me.chkCheckSum)
|
Me.grpBackup.Controls.Add(Me.chkCheckSum)
|
||||||
@@ -210,14 +210,14 @@ Partial Class frmSettings
|
|||||||
Me.grpBackup.TabStop = False
|
Me.grpBackup.TabStop = False
|
||||||
Me.grpBackup.Text = "Backup and Restore Options"
|
Me.grpBackup.Text = "Backup and Restore Options"
|
||||||
'
|
'
|
||||||
'Label1
|
'lblMinutes
|
||||||
'
|
'
|
||||||
Me.Label1.AutoSize = True
|
Me.lblMinutes.AutoSize = True
|
||||||
Me.Label1.Location = New System.Drawing.Point(286, 135)
|
Me.lblMinutes.Location = New System.Drawing.Point(286, 135)
|
||||||
Me.Label1.Name = "Label1"
|
Me.lblMinutes.Name = "lblMinutes"
|
||||||
Me.Label1.Size = New System.Drawing.Size(43, 13)
|
Me.lblMinutes.Size = New System.Drawing.Size(43, 13)
|
||||||
Me.Label1.TabIndex = 7
|
Me.lblMinutes.TabIndex = 7
|
||||||
Me.Label1.Text = "minutes"
|
Me.lblMinutes.Text = "minutes"
|
||||||
'
|
'
|
||||||
'nudSupressBackupThreshold
|
'nudSupressBackupThreshold
|
||||||
'
|
'
|
||||||
@@ -325,7 +325,7 @@ Partial Class frmSettings
|
|||||||
Friend WithEvents chkCheckSum As System.Windows.Forms.CheckBox
|
Friend WithEvents chkCheckSum As System.Windows.Forms.CheckBox
|
||||||
Friend WithEvents chkStartWindows As System.Windows.Forms.CheckBox
|
Friend WithEvents chkStartWindows As System.Windows.Forms.CheckBox
|
||||||
Friend WithEvents chkTimeTracking As System.Windows.Forms.CheckBox
|
Friend WithEvents chkTimeTracking As System.Windows.Forms.CheckBox
|
||||||
Friend WithEvents Label1 As Label
|
Friend WithEvents lblMinutes As Label
|
||||||
Friend WithEvents nudSupressBackupThreshold As NumericUpDown
|
Friend WithEvents nudSupressBackupThreshold As NumericUpDown
|
||||||
Friend WithEvents chkSupressBackup As CheckBox
|
Friend WithEvents chkSupressBackup As CheckBox
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user