Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
85588686cd | ||
|
|
2cab8b7ec4 | ||
|
|
93361bcd87 | ||
|
|
a89fdceb1a | ||
|
|
fa2910e184 | ||
|
|
ef6df6e89e | ||
|
|
36af55cacc | ||
|
|
f6a5d7bba1 | ||
|
|
27917f5859 | ||
|
|
2c8e0a1275 | ||
|
|
04f7b76456 | ||
|
|
477c1fa623 | ||
|
|
a5d7d6697a | ||
|
|
b1e6e7a9e6 | ||
|
|
c8db7ae4e4 | ||
|
|
f9a9074e56 | ||
|
|
77df7cf3dc | ||
|
|
1122499609 | ||
|
|
ecedda0779 | ||
|
|
40e36aaafd | ||
|
|
3c72799ceb | ||
|
|
0779132be9 | ||
|
|
35cb711ca1 | ||
|
|
aacda9eeb9 | ||
|
|
1ec5439c5d | ||
|
|
ebd7081b29 | ||
|
|
03becc209c |
Vendored
+1
-2
@@ -188,5 +188,4 @@ _Pvt_Extensions/
|
||||
ModelManifest.xml
|
||||
/.vs/slnx.sqlite
|
||||
/.vs/VSWorkspaceState.json
|
||||
/.vs/Game Backup Monitor/v15/sqlite3/storage.ide
|
||||
/.vs/Game Backup Monitor/v15/sqlite3/storage.ide-journal
|
||||
/.vs/Game Backup Monitor/v15
|
||||
|
||||
+30
-17
@@ -1,9 +1,8 @@
|
||||
Public Class clsSession
|
||||
|
||||
Private sMonitorID As String
|
||||
Private dStart As DateTime
|
||||
Private dEnd As DateTime
|
||||
Private sComputerName As String = My.Computer.Name
|
||||
Private iStart As Int64
|
||||
Private iEnd As Int64
|
||||
|
||||
Public Property MonitorID As String
|
||||
Set(value As String)
|
||||
@@ -14,31 +13,45 @@
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property SessionStart As DateTime
|
||||
Public Property SessionStart As Int64
|
||||
Set(value As Int64)
|
||||
iStart = value
|
||||
End Set
|
||||
Get
|
||||
Return iStart
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public WriteOnly Property SessionStartFromDate As DateTime
|
||||
Set(value As DateTime)
|
||||
dStart = value
|
||||
iStart = mgrCommon.DateToUnix(value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property SessionStartFormatted As DateTime
|
||||
Get
|
||||
Return dStart
|
||||
Return mgrCommon.UnixToDate(iStart)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property SessionEnd As DateTime
|
||||
Public Property SessionEnd As Int64
|
||||
Set(value As Int64)
|
||||
iEnd = value
|
||||
End Set
|
||||
Get
|
||||
Return iEnd
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public WriteOnly Property SessionEndFromDate As DateTime
|
||||
Set(value As DateTime)
|
||||
dEnd = value
|
||||
iEnd = mgrCommon.DateToUnix(value)
|
||||
End Set
|
||||
Get
|
||||
Return dEnd
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property ComputerName As String
|
||||
Set(value As String)
|
||||
sComputerName = value
|
||||
End Set
|
||||
Public ReadOnly Property SessionEndFormatted As DateTime
|
||||
Get
|
||||
Return sComputerName
|
||||
Return mgrCommon.UnixToDate(iEnd)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Class
|
||||
|
||||
+11
-8
@@ -294,7 +294,7 @@ Public Class frmMain
|
||||
OperationStarted(False)
|
||||
|
||||
If oProcess.GameInfo.MonitorOnly = False Then
|
||||
If SupressBackup() Then
|
||||
If SupressSession() Then
|
||||
bDoBackup = False
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_ErrorBackupSessionLength, oProcess.GameInfo.Name), False)
|
||||
SetLastAction(mgrCommon.FormatString(frmMain_ErrorBackupSessionLength, oProcess.GameInfo.CroppedName))
|
||||
@@ -715,17 +715,20 @@ Public Class frmMain
|
||||
End Sub
|
||||
|
||||
Private Sub HandleSession()
|
||||
Dim oSession As New clsSession
|
||||
Dim oSession As clsSession
|
||||
|
||||
'Record Session
|
||||
oSession.MonitorID = oProcess.GameInfo.ID
|
||||
oSession.SessionStart = oProcess.StartTime
|
||||
oSession.SessionEnd = oProcess.EndTime
|
||||
If Not SupressSession() Then
|
||||
'Record Session
|
||||
oSession = New clsSession
|
||||
oSession.MonitorID = oProcess.GameInfo.ID
|
||||
oSession.SessionStartFromDate = oProcess.StartTime
|
||||
oSession.SessionEndFromDate = oProcess.EndTime
|
||||
|
||||
mgrSessions.AddSession(oSession)
|
||||
mgrSessions.AddSession(oSession)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function SupressBackup() As Boolean
|
||||
Private Function SupressSession() As Boolean
|
||||
Dim iSession As Integer
|
||||
If oSettings.SupressBackup Then
|
||||
iSession = Math.Ceiling(oProcess.TimeSpent.TotalMinutes)
|
||||
|
||||
@@ -1,19 +1,41 @@
|
||||
Imports GBM.My.Resources
|
||||
Imports System.Globalization
|
||||
Imports System.ComponentModel
|
||||
|
||||
Public Class frmSessions
|
||||
|
||||
Private bInitFinished As Boolean = False
|
||||
Private WithEvents tmFilterTimer As Timer
|
||||
Private bStartSortAsc As Boolean = True
|
||||
Private iStartDataCol As Integer
|
||||
Private iStartDisplayCol As Integer
|
||||
Private bEndSortAsc As Boolean = True
|
||||
Private iEndDataCol As Integer
|
||||
Private iEndDisplayCol As Integer
|
||||
|
||||
Private Sub FormatGrid()
|
||||
'Build Columns
|
||||
dgSessions.Columns.Add("MonitorID", frmSessions_ColumnMonitorID)
|
||||
dgSessions.Columns.Add("Name", frmSessions_ColumnGameName)
|
||||
dgSessions.Columns.Add("StartUnix", frmSessions_ColumnStart)
|
||||
dgSessions.Columns.Add("Start", frmSessions_ColumnStart)
|
||||
dgSessions.Columns.Add("EndUnix", frmSessions_ColumnEnd)
|
||||
dgSessions.Columns.Add("End", frmSessions_ColumnEnd)
|
||||
|
||||
'Hide the ID
|
||||
'Get Column Indexes
|
||||
iStartDataCol = dgSessions.Columns.IndexOf(dgSessions.Columns("StartUnix"))
|
||||
iStartDisplayCol = dgSessions.Columns.IndexOf(dgSessions.Columns("Start"))
|
||||
iEndDataCol = dgSessions.Columns.IndexOf(dgSessions.Columns("EndUnix"))
|
||||
iEndDisplayCol = dgSessions.Columns.IndexOf(dgSessions.Columns("End"))
|
||||
|
||||
'Set Sorting
|
||||
dgSessions.Columns("Start").SortMode = DataGridViewColumnSortMode.Programmatic
|
||||
dgSessions.Columns("End").SortMode = DataGridViewColumnSortMode.Programmatic
|
||||
|
||||
'Hide Columns
|
||||
dgSessions.Columns("MonitorID").Visible = False
|
||||
dgSessions.Columns("StartUnix").Visible = False
|
||||
dgSessions.Columns("EndUnix").Visible = False
|
||||
End Sub
|
||||
|
||||
Private Sub LoadData()
|
||||
@@ -30,7 +52,7 @@ Public Class frmSessions
|
||||
dgSessions.Rows.Clear()
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
dgSessions.Rows.Add(New Object() {dr("MonitorID"), dr("Name"), mgrCommon.UnixToDate(dr("Start")), mgrCommon.UnixToDate(dr("End"))})
|
||||
dgSessions.Rows.Add(New Object() {dr("MonitorID"), dr("Name"), dr("Start"), mgrCommon.UnixToDate(dr("Start")), dr("End"), mgrCommon.UnixToDate(dr("End"))})
|
||||
Next
|
||||
|
||||
dgSessions.AutoResizeColumns()
|
||||
@@ -51,14 +73,18 @@ Public Class frmSessions
|
||||
tmFilterTimer.Interval = 1000
|
||||
tmFilterTimer.Enabled = False
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ResetFilterFields()
|
||||
Dim dtMinDate As DateTime = mgrSessions.GetMinimumDateTime
|
||||
Dim dtMaxDate As DateTime = mgrSessions.GetMaximumDateTime
|
||||
Dim dtRecent As DateTime = dtMaxDate.Subtract(TimeSpan.FromDays(7))
|
||||
Dim sDateTimeFormat = CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern & " " & CultureInfo.CurrentCulture.DateTimeFormat.LongTimePattern
|
||||
|
||||
If dtRecent < dtMinDate Then
|
||||
dtRecent = dtMinDate
|
||||
End If
|
||||
|
||||
bInitFinished = False
|
||||
|
||||
'Init Date Fields
|
||||
@@ -75,7 +101,7 @@ Public Class frmSessions
|
||||
dtpEnd.MaxDate = dtMaxDate
|
||||
End If
|
||||
|
||||
dtpStart.Value = dtMinDate
|
||||
dtpStart.Value = dtRecent
|
||||
dtpEnd.Value = dtMaxDate
|
||||
|
||||
'Init Text Filter
|
||||
@@ -85,6 +111,7 @@ Public Class frmSessions
|
||||
End Sub
|
||||
|
||||
Private Sub Reset()
|
||||
ClearManualSortGlyphs()
|
||||
ResetFilterFields()
|
||||
LoadData()
|
||||
End Sub
|
||||
@@ -96,8 +123,8 @@ Public Class frmSessions
|
||||
For Each dgvRow As DataGridViewRow In dgSessions.SelectedRows
|
||||
oSession = New clsSession
|
||||
oSession.MonitorID = dgvRow.Cells(0).Value
|
||||
oSession.SessionStart = dgvRow.Cells(2).Value
|
||||
oSession.SessionEnd = dgvRow.Cells(3).Value
|
||||
oSession.SessionStart = CInt(dgvRow.Cells(iStartDataCol).Value)
|
||||
oSession.SessionEnd = CInt(dgvRow.Cells(iEndDataCol).Value)
|
||||
oSessions.Add(oSession)
|
||||
Next
|
||||
|
||||
@@ -106,6 +133,38 @@ Public Class frmSessions
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ClearManualSortGlyphs()
|
||||
dgSessions.Columns(iStartDisplayCol).HeaderCell.SortGlyphDirection = SortOrder.None
|
||||
dgSessions.Columns(iEndDisplayCol).HeaderCell.SortGlyphDirection = SortOrder.None
|
||||
End Sub
|
||||
|
||||
Private Function GetSortOrder(ByVal bToggle As Boolean, ByVal iCol As Integer) As ListSortDirection
|
||||
Dim oSortType As ListSortDirection
|
||||
|
||||
If bToggle Then
|
||||
oSortType = ListSortDirection.Ascending
|
||||
dgSessions.Columns(iCol).HeaderCell.SortGlyphDirection = SortOrder.Ascending
|
||||
Else
|
||||
oSortType = ListSortDirection.Descending
|
||||
dgSessions.Columns(iCol).HeaderCell.SortGlyphDirection = SortOrder.Descending
|
||||
End If
|
||||
|
||||
Return oSortType
|
||||
End Function
|
||||
|
||||
Private Sub HandleSort(ByVal iCol As Integer)
|
||||
ClearManualSortGlyphs()
|
||||
|
||||
Select Case iCol
|
||||
Case iStartDisplayCol
|
||||
bStartSortAsc = Not bStartSortAsc
|
||||
dgSessions.Sort(dgSessions.Columns(iCol), GetSortOrder(bStartSortAsc, iCol))
|
||||
Case iEndDisplayCol
|
||||
bEndSortAsc = Not bEndSortAsc
|
||||
dgSessions.Sort(dgSessions.Columns(iCol), GetSortOrder(bEndSortAsc, iCol))
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub frmSession_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
SetForm()
|
||||
ResetFilterFields()
|
||||
@@ -146,8 +205,12 @@ Public Class frmSessions
|
||||
If dgSessions.SelectedRows.Count > 0 Then
|
||||
If mgrCommon.ShowMessage(frmSessions_ConfirmDelete, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
DeleteSession()
|
||||
Reset()
|
||||
LoadData()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub dgSessions_ColumnHeaderMouseClick(sender As Object, e As DataGridViewCellMouseEventArgs) Handles dgSessions.ColumnHeaderMouseClick
|
||||
HandleSort(e.ColumnIndex)
|
||||
End Sub
|
||||
End Class
|
||||
Generated
+61
-61
@@ -50,9 +50,6 @@ Partial Class frmSettings
|
||||
Me.lbl7zProduct = New System.Windows.Forms.Label()
|
||||
Me.btnDefaults = New System.Windows.Forms.Button()
|
||||
Me.pnlBackup = New System.Windows.Forms.Panel()
|
||||
Me.lblMinutes = New System.Windows.Forms.Label()
|
||||
Me.nudSupressBackupThreshold = New System.Windows.Forms.NumericUpDown()
|
||||
Me.chkSupressBackup = New System.Windows.Forms.CheckBox()
|
||||
Me.chkBackupConfirm = New System.Windows.Forms.CheckBox()
|
||||
Me.chkOverwriteWarning = New System.Windows.Forms.CheckBox()
|
||||
Me.grpBackupHandling = New System.Windows.Forms.GroupBox()
|
||||
@@ -63,19 +60,22 @@ Partial Class frmSettings
|
||||
Me.grp7zAdvanced = New System.Windows.Forms.GroupBox()
|
||||
Me.grp7zInformation = New System.Windows.Forms.GroupBox()
|
||||
Me.pnlGeneral = New System.Windows.Forms.Panel()
|
||||
Me.lblMinutes = New System.Windows.Forms.Label()
|
||||
Me.nudSupressBackupThreshold = New System.Windows.Forms.NumericUpDown()
|
||||
Me.chkSupressBackup = New System.Windows.Forms.CheckBox()
|
||||
Me.grpGameData = New System.Windows.Forms.GroupBox()
|
||||
Me.lstSettings = New System.Windows.Forms.ListBox()
|
||||
Me.chkSessionTracking = New System.Windows.Forms.CheckBox()
|
||||
Me.lstSettings = New System.Windows.Forms.ListBox()
|
||||
Me.grpStartup.SuspendLayout()
|
||||
Me.grpFolderOptions.SuspendLayout()
|
||||
Me.grp7zGeneral.SuspendLayout()
|
||||
Me.pnlBackup.SuspendLayout()
|
||||
CType(Me.nudSupressBackupThreshold, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.grpBackupHandling.SuspendLayout()
|
||||
Me.pnl7z.SuspendLayout()
|
||||
Me.grp7zAdvanced.SuspendLayout()
|
||||
Me.grp7zInformation.SuspendLayout()
|
||||
Me.pnlGeneral.SuspendLayout()
|
||||
CType(Me.nudSupressBackupThreshold, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.grpGameData.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
@@ -124,10 +124,10 @@ Partial Class frmSettings
|
||||
'chkAutoSaveLog
|
||||
'
|
||||
Me.chkAutoSaveLog.AutoSize = True
|
||||
Me.chkAutoSaveLog.Location = New System.Drawing.Point(12, 228)
|
||||
Me.chkAutoSaveLog.Location = New System.Drawing.Point(12, 251)
|
||||
Me.chkAutoSaveLog.Name = "chkAutoSaveLog"
|
||||
Me.chkAutoSaveLog.Size = New System.Drawing.Size(231, 17)
|
||||
Me.chkAutoSaveLog.TabIndex = 3
|
||||
Me.chkAutoSaveLog.TabIndex = 5
|
||||
Me.chkAutoSaveLog.Text = "Autosave log when max length is exceeded"
|
||||
Me.chkAutoSaveLog.UseVisualStyleBackColor = True
|
||||
'
|
||||
@@ -136,7 +136,7 @@ Partial Class frmSettings
|
||||
Me.btnOptionalFields.Location = New System.Drawing.Point(103, 61)
|
||||
Me.btnOptionalFields.Name = "btnOptionalFields"
|
||||
Me.btnOptionalFields.Size = New System.Drawing.Size(134, 23)
|
||||
Me.btnOptionalFields.TabIndex = 2
|
||||
Me.btnOptionalFields.TabIndex = 3
|
||||
Me.btnOptionalFields.Text = "Choose &Optional Fields..."
|
||||
Me.btnOptionalFields.UseVisualStyleBackColor = True
|
||||
'
|
||||
@@ -156,17 +156,17 @@ Partial Class frmSettings
|
||||
Me.chkSync.Location = New System.Drawing.Point(6, 65)
|
||||
Me.chkSync.Name = "chkSync"
|
||||
Me.chkSync.Size = New System.Drawing.Size(98, 17)
|
||||
Me.chkSync.TabIndex = 1
|
||||
Me.chkSync.TabIndex = 2
|
||||
Me.chkSync.Text = "Enable syncing"
|
||||
Me.chkSync.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkShowDetectionTips
|
||||
'
|
||||
Me.chkShowDetectionTips.AutoSize = True
|
||||
Me.chkShowDetectionTips.Location = New System.Drawing.Point(12, 205)
|
||||
Me.chkShowDetectionTips.Location = New System.Drawing.Point(12, 228)
|
||||
Me.chkShowDetectionTips.Name = "chkShowDetectionTips"
|
||||
Me.chkShowDetectionTips.Size = New System.Drawing.Size(159, 17)
|
||||
Me.chkShowDetectionTips.TabIndex = 2
|
||||
Me.chkShowDetectionTips.TabIndex = 4
|
||||
Me.chkShowDetectionTips.Text = "Show detection notifications"
|
||||
Me.chkShowDetectionTips.UseVisualStyleBackColor = True
|
||||
'
|
||||
@@ -337,9 +337,6 @@ Partial Class frmSettings
|
||||
'
|
||||
'pnlBackup
|
||||
'
|
||||
Me.pnlBackup.Controls.Add(Me.lblMinutes)
|
||||
Me.pnlBackup.Controls.Add(Me.nudSupressBackupThreshold)
|
||||
Me.pnlBackup.Controls.Add(Me.chkSupressBackup)
|
||||
Me.pnlBackup.Controls.Add(Me.chkBackupConfirm)
|
||||
Me.pnlBackup.Controls.Add(Me.chkOverwriteWarning)
|
||||
Me.pnlBackup.Controls.Add(Me.grpBackupHandling)
|
||||
@@ -349,37 +346,10 @@ Partial Class frmSettings
|
||||
Me.pnlBackup.Size = New System.Drawing.Size(367, 314)
|
||||
Me.pnlBackup.TabIndex = 3
|
||||
'
|
||||
'lblMinutes
|
||||
'
|
||||
Me.lblMinutes.AutoSize = True
|
||||
Me.lblMinutes.Location = New System.Drawing.Point(286, 228)
|
||||
Me.lblMinutes.Name = "lblMinutes"
|
||||
Me.lblMinutes.Size = New System.Drawing.Size(43, 13)
|
||||
Me.lblMinutes.TabIndex = 14
|
||||
Me.lblMinutes.Text = "minutes"
|
||||
'
|
||||
'nudSupressBackupThreshold
|
||||
'
|
||||
Me.nudSupressBackupThreshold.Location = New System.Drawing.Point(229, 226)
|
||||
Me.nudSupressBackupThreshold.Maximum = New Decimal(New Integer() {999, 0, 0, 0})
|
||||
Me.nudSupressBackupThreshold.Name = "nudSupressBackupThreshold"
|
||||
Me.nudSupressBackupThreshold.Size = New System.Drawing.Size(51, 20)
|
||||
Me.nudSupressBackupThreshold.TabIndex = 5
|
||||
'
|
||||
'chkSupressBackup
|
||||
'
|
||||
Me.chkSupressBackup.AutoSize = True
|
||||
Me.chkSupressBackup.Location = New System.Drawing.Point(6, 228)
|
||||
Me.chkSupressBackup.Name = "chkSupressBackup"
|
||||
Me.chkSupressBackup.Size = New System.Drawing.Size(217, 17)
|
||||
Me.chkSupressBackup.TabIndex = 4
|
||||
Me.chkSupressBackup.Text = "Backup only when session time exceeds"
|
||||
Me.chkSupressBackup.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkBackupConfirm
|
||||
'
|
||||
Me.chkBackupConfirm.AutoSize = True
|
||||
Me.chkBackupConfirm.Location = New System.Drawing.Point(6, 180)
|
||||
Me.chkBackupConfirm.Location = New System.Drawing.Point(14, 180)
|
||||
Me.chkBackupConfirm.Name = "chkBackupConfirm"
|
||||
Me.chkBackupConfirm.Size = New System.Drawing.Size(160, 17)
|
||||
Me.chkBackupConfirm.TabIndex = 2
|
||||
@@ -389,7 +359,7 @@ Partial Class frmSettings
|
||||
'chkOverwriteWarning
|
||||
'
|
||||
Me.chkOverwriteWarning.AutoSize = True
|
||||
Me.chkOverwriteWarning.Location = New System.Drawing.Point(6, 204)
|
||||
Me.chkOverwriteWarning.Location = New System.Drawing.Point(14, 203)
|
||||
Me.chkOverwriteWarning.Name = "chkOverwriteWarning"
|
||||
Me.chkOverwriteWarning.Size = New System.Drawing.Size(139, 17)
|
||||
Me.chkOverwriteWarning.TabIndex = 3
|
||||
@@ -402,9 +372,9 @@ Partial Class frmSettings
|
||||
Me.grpBackupHandling.Controls.Add(Me.chkRestoreNotify)
|
||||
Me.grpBackupHandling.Controls.Add(Me.chkAutoMark)
|
||||
Me.grpBackupHandling.Location = New System.Drawing.Point(6, 88)
|
||||
Me.grpBackupHandling.Margin = New System.Windows.Forms.Padding(2)
|
||||
Me.grpBackupHandling.Margin = New System.Windows.Forms.Padding(2, 2, 2, 2)
|
||||
Me.grpBackupHandling.Name = "grpBackupHandling"
|
||||
Me.grpBackupHandling.Padding = New System.Windows.Forms.Padding(2)
|
||||
Me.grpBackupHandling.Padding = New System.Windows.Forms.Padding(2, 2, 2, 2)
|
||||
Me.grpBackupHandling.Size = New System.Drawing.Size(354, 87)
|
||||
Me.grpBackupHandling.TabIndex = 1
|
||||
Me.grpBackupHandling.TabStop = False
|
||||
@@ -414,7 +384,7 @@ Partial Class frmSettings
|
||||
'
|
||||
Me.chkAutoRestore.AutoSize = True
|
||||
Me.chkAutoRestore.Location = New System.Drawing.Point(8, 41)
|
||||
Me.chkAutoRestore.Margin = New System.Windows.Forms.Padding(2)
|
||||
Me.chkAutoRestore.Margin = New System.Windows.Forms.Padding(2, 2, 2, 2)
|
||||
Me.chkAutoRestore.Name = "chkAutoRestore"
|
||||
Me.chkAutoRestore.Size = New System.Drawing.Size(190, 17)
|
||||
Me.chkAutoRestore.TabIndex = 1
|
||||
@@ -425,7 +395,7 @@ Partial Class frmSettings
|
||||
'
|
||||
Me.chkRestoreNotify.AutoSize = True
|
||||
Me.chkRestoreNotify.Location = New System.Drawing.Point(8, 19)
|
||||
Me.chkRestoreNotify.Margin = New System.Windows.Forms.Padding(2)
|
||||
Me.chkRestoreNotify.Margin = New System.Windows.Forms.Padding(2, 2, 2, 2)
|
||||
Me.chkRestoreNotify.Name = "chkRestoreNotify"
|
||||
Me.chkRestoreNotify.Size = New System.Drawing.Size(216, 17)
|
||||
Me.chkRestoreNotify.TabIndex = 0
|
||||
@@ -479,6 +449,9 @@ Partial Class frmSettings
|
||||
'
|
||||
'pnlGeneral
|
||||
'
|
||||
Me.pnlGeneral.Controls.Add(Me.lblMinutes)
|
||||
Me.pnlGeneral.Controls.Add(Me.nudSupressBackupThreshold)
|
||||
Me.pnlGeneral.Controls.Add(Me.chkSupressBackup)
|
||||
Me.pnlGeneral.Controls.Add(Me.chkAutoSaveLog)
|
||||
Me.pnlGeneral.Controls.Add(Me.grpGameData)
|
||||
Me.pnlGeneral.Controls.Add(Me.chkShowDetectionTips)
|
||||
@@ -488,6 +461,33 @@ Partial Class frmSettings
|
||||
Me.pnlGeneral.Size = New System.Drawing.Size(367, 314)
|
||||
Me.pnlGeneral.TabIndex = 1
|
||||
'
|
||||
'lblMinutes
|
||||
'
|
||||
Me.lblMinutes.AutoSize = True
|
||||
Me.lblMinutes.Location = New System.Drawing.Point(232, 205)
|
||||
Me.lblMinutes.Name = "lblMinutes"
|
||||
Me.lblMinutes.Size = New System.Drawing.Size(43, 13)
|
||||
Me.lblMinutes.TabIndex = 17
|
||||
Me.lblMinutes.Text = "minutes"
|
||||
'
|
||||
'nudSupressBackupThreshold
|
||||
'
|
||||
Me.nudSupressBackupThreshold.Location = New System.Drawing.Point(176, 203)
|
||||
Me.nudSupressBackupThreshold.Maximum = New Decimal(New Integer() {999, 0, 0, 0})
|
||||
Me.nudSupressBackupThreshold.Name = "nudSupressBackupThreshold"
|
||||
Me.nudSupressBackupThreshold.Size = New System.Drawing.Size(51, 20)
|
||||
Me.nudSupressBackupThreshold.TabIndex = 3
|
||||
'
|
||||
'chkSupressBackup
|
||||
'
|
||||
Me.chkSupressBackup.AutoSize = True
|
||||
Me.chkSupressBackup.Location = New System.Drawing.Point(12, 204)
|
||||
Me.chkSupressBackup.Name = "chkSupressBackup"
|
||||
Me.chkSupressBackup.Size = New System.Drawing.Size(158, 17)
|
||||
Me.chkSupressBackup.TabIndex = 2
|
||||
Me.chkSupressBackup.Text = "Ignore sessions shorter than"
|
||||
Me.chkSupressBackup.UseVisualStyleBackColor = True
|
||||
'
|
||||
'grpGameData
|
||||
'
|
||||
Me.grpGameData.Controls.Add(Me.chkSessionTracking)
|
||||
@@ -501,6 +501,16 @@ Partial Class frmSettings
|
||||
Me.grpGameData.TabStop = False
|
||||
Me.grpGameData.Text = "Game Data"
|
||||
'
|
||||
'chkSessionTracking
|
||||
'
|
||||
Me.chkSessionTracking.AutoSize = True
|
||||
Me.chkSessionTracking.Location = New System.Drawing.Point(6, 42)
|
||||
Me.chkSessionTracking.Name = "chkSessionTracking"
|
||||
Me.chkSessionTracking.Size = New System.Drawing.Size(138, 17)
|
||||
Me.chkSessionTracking.TabIndex = 1
|
||||
Me.chkSessionTracking.Text = "Enable session tracking"
|
||||
Me.chkSessionTracking.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lstSettings
|
||||
'
|
||||
Me.lstSettings.FormattingEnabled = True
|
||||
@@ -509,16 +519,6 @@ Partial Class frmSettings
|
||||
Me.lstSettings.Size = New System.Drawing.Size(162, 303)
|
||||
Me.lstSettings.TabIndex = 0
|
||||
'
|
||||
'chkSessionTracking
|
||||
'
|
||||
Me.chkSessionTracking.AutoSize = True
|
||||
Me.chkSessionTracking.Location = New System.Drawing.Point(6, 42)
|
||||
Me.chkSessionTracking.Name = "chkSessionTracking"
|
||||
Me.chkSessionTracking.Size = New System.Drawing.Size(138, 17)
|
||||
Me.chkSessionTracking.TabIndex = 3
|
||||
Me.chkSessionTracking.Text = "Enable session tracking"
|
||||
Me.chkSessionTracking.UseVisualStyleBackColor = True
|
||||
'
|
||||
'frmSettings
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -547,7 +547,6 @@ Partial Class frmSettings
|
||||
Me.grp7zGeneral.PerformLayout()
|
||||
Me.pnlBackup.ResumeLayout(False)
|
||||
Me.pnlBackup.PerformLayout()
|
||||
CType(Me.nudSupressBackupThreshold, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.grpBackupHandling.ResumeLayout(False)
|
||||
Me.grpBackupHandling.PerformLayout()
|
||||
Me.pnl7z.ResumeLayout(False)
|
||||
@@ -556,6 +555,7 @@ Partial Class frmSettings
|
||||
Me.grp7zInformation.ResumeLayout(False)
|
||||
Me.pnlGeneral.ResumeLayout(False)
|
||||
Me.pnlGeneral.PerformLayout()
|
||||
CType(Me.nudSupressBackupThreshold, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.grpGameData.ResumeLayout(False)
|
||||
Me.grpGameData.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
@@ -595,9 +595,6 @@ Partial Class frmSettings
|
||||
Friend WithEvents lstSettings As ListBox
|
||||
Friend WithEvents grp7zAdvanced As GroupBox
|
||||
Friend WithEvents grp7zInformation As GroupBox
|
||||
Friend WithEvents lblMinutes As Label
|
||||
Friend WithEvents nudSupressBackupThreshold As NumericUpDown
|
||||
Friend WithEvents chkSupressBackup As CheckBox
|
||||
Friend WithEvents chkBackupConfirm As CheckBox
|
||||
Friend WithEvents chkOverwriteWarning As CheckBox
|
||||
Friend WithEvents grpBackupHandling As GroupBox
|
||||
@@ -605,4 +602,7 @@ Partial Class frmSettings
|
||||
Friend WithEvents chkAutoRestore As CheckBox
|
||||
Friend WithEvents chkRestoreNotify As CheckBox
|
||||
Friend WithEvents chkSessionTracking As CheckBox
|
||||
Friend WithEvents lblMinutes As Label
|
||||
Friend WithEvents nudSupressBackupThreshold As NumericUpDown
|
||||
Friend WithEvents chkSupressBackup As CheckBox
|
||||
End Class
|
||||
|
||||
@@ -34,6 +34,11 @@ Public Class frmSettings
|
||||
|
||||
Private Function ValidateSettings() As Boolean
|
||||
|
||||
'Show Start with Windows warning if running as admin
|
||||
If chkStartWindows.Checked And mgrCommon.IsElevated Then
|
||||
mgrCommon.ShowMessage(frmSettings_WarningAdminStart, MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
|
||||
'Only modify registry key when the value changed
|
||||
If chkStartWindows.Checked <> oSettings.StartWithWindows Then
|
||||
HandleRegistryUpdate(chkStartWindows.Checked)
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
Game Backup Monitor would like to credit the following people/organizations:
|
||||
|
||||
7-zip - Igor Pavlov
|
||||
Contributors:
|
||||
|
||||
Michael J. Seiferling (MikeMaximus) - Design, Programming and Windows Game Configuration Maintainer.
|
||||
Sebastian Riedel (basxto) - Linux Packaging, Installation and Game Configuration Maintainer.
|
||||
|
||||
Special Thanks:
|
||||
|
||||
7-Zip - Igor Pavlov
|
||||
Sixpack Status Icons - JankoAtWarpSpeed.com
|
||||
Primo Icon Set - webdesignerdepot.com
|
||||
@@ -4,8 +4,8 @@
|
||||
Dim oSession As New clsSession
|
||||
|
||||
oSession.MonitorID = CStr(dr("MonitorID"))
|
||||
oSession.SessionStart = mgrCommon.UnixToDate(CInt(dr("Start")))
|
||||
oSession.SessionEnd = mgrCommon.UnixToDate(CInt(dr("End")))
|
||||
oSession.SessionStart = CInt(dr("Start"))
|
||||
oSession.SessionEnd = CInt(dr("End"))
|
||||
|
||||
Return oSession
|
||||
End Function
|
||||
@@ -14,8 +14,8 @@
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
hshParams.Add("MonitorID", oSession.MonitorID)
|
||||
hshParams.Add("Start", mgrCommon.DateToUnix(oSession.SessionStart))
|
||||
hshParams.Add("End", mgrCommon.DateToUnix(oSession.SessionEnd))
|
||||
hshParams.Add("Start", oSession.SessionStart)
|
||||
hshParams.Add("End", oSession.SessionEnd)
|
||||
|
||||
Return hshParams
|
||||
End Function
|
||||
@@ -80,7 +80,7 @@
|
||||
For Each oSession As clsSession In oSessions
|
||||
hshParams = New Hashtable
|
||||
hshParams.Add("MonitorID", oSession.MonitorID)
|
||||
hshParams.Add("Start", mgrCommon.DateToUnix(oSession.SessionStart))
|
||||
hshParams.Add("Start", oSession.SessionStart)
|
||||
oParamList.Add(hshParams)
|
||||
Next
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ Imports System.Runtime.InteropServices
|
||||
<Assembly: AssemblyDescription("Game Backup Monitor")>
|
||||
<Assembly: AssemblyCompany("Michael J. Seiferling")>
|
||||
<Assembly: AssemblyProduct("Game Backup Monitor")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2017 Michael J. Seiferling")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2018 Michael J. Seiferling")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
@@ -33,7 +33,7 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.5.*")>
|
||||
<Assembly: AssemblyFileVersion("1.0.5.0")>
|
||||
<Assembly: AssemblyVersion("1.0.6.*")>
|
||||
<Assembly: AssemblyFileVersion("1.0.6.0")>
|
||||
|
||||
<Assembly: NeutralResourcesLanguageAttribute("en")>
|
||||
Generated
+10
-1
@@ -3958,7 +3958,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Backup only when session time exceeds.
|
||||
''' Looks up a localized string similar to Ignore sessions shorter than.
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_chkSupressBackup() As String
|
||||
Get
|
||||
@@ -4155,6 +4155,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Please note that GBM will not "Start with Windows" as Administrator.[BR][BR]See the Online Manual in the Help menu for details..
|
||||
'''</summary>
|
||||
Friend ReadOnly Property frmSettings_WarningAdminStart() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("frmSettings_WarningAdminStart", resourceCulture)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Looks up a localized string similar to Invalid or poorly formatted 7-Zip arguments can cause backup or restore operations to fail.[BR][BR]If problems occur, clear the custom arguments and try again..
|
||||
'''</summary>
|
||||
|
||||
@@ -1082,7 +1082,7 @@
|
||||
<value>Start with Windows</value>
|
||||
</data>
|
||||
<data name="frmSettings_chkSupressBackup" xml:space="preserve">
|
||||
<value>Backup only when session time exceeds</value>
|
||||
<value>Ignore sessions shorter than</value>
|
||||
</data>
|
||||
<data name="frmSettings_chkSync" xml:space="preserve">
|
||||
<value>Enable syncing</value>
|
||||
@@ -1945,4 +1945,7 @@
|
||||
<data name="frmSettings_chkSessionTracking" xml:space="preserve">
|
||||
<value>Enable session tracking</value>
|
||||
</data>
|
||||
<data name="frmSettings_WarningAdminStart" xml:space="preserve">
|
||||
<value>Please note that GBM will not "Start with Windows" as Administrator.[BR][BR]See the Online Manual in the Help menu for details.</value>
|
||||
</data>
|
||||
</root>
|
||||
+19
-17
@@ -1,31 +1,33 @@
|
||||
Game Backup Monitor v1.0.5 Readme
|
||||
Game Backup Monitor v1.0.6 Readme
|
||||
http://mikemaximus.github.io/gbm-web/
|
||||
gamebackupmonitor@gmail.com
|
||||
|
||||
December 8, 2017
|
||||
January 15, 2018
|
||||
|
||||
New in 1.0.5
|
||||
New in 1.0.6
|
||||
|
||||
All Platforms:
|
||||
|
||||
- You can now add Comments to a game configuration.
|
||||
- You can now exclude tags and use negative filters on the Game Manager.
|
||||
- Fixed a bug causing backup size calculations to be incorrect when including sub-folders in a configuration.
|
||||
- Fixed a bug causing GBM to calculate the backup size of an incorrect location when using a relative path configuration. This could cause very long delays when a backup was running.
|
||||
- XML export files now contain the date, version and amount of configurations. The Import window will now display the date of the XML file in the title bar if applicable.
|
||||
- Fixed a bug causing games not to be detected if more than one copy of the process was running.
|
||||
- GBM can now save statistical data from each detected gaming session:
|
||||
- This feature records the start and end time of each detected gaming session. In future versions more data may be available.
|
||||
- You can view session data using the new "Session Viewer" available in the Tools menu.
|
||||
- This feature is disabled by default. It can be enabled on the Setting screen.
|
||||
- Session data is stored locally, it is currently not synced with the backup folder.
|
||||
|
||||
- Session Viewer Updates
|
||||
- The viewer now defaults to show seven days from the last recorded session, instead of all sessions.
|
||||
- Fixed issues with date sorting, it will now sort correctly regardless of format.
|
||||
- The recording of short sessions can now be ignored using a setting.
|
||||
- Changed setting "Backup only when session time exceeds XX minutes" to "Ignore sessions shorter than XX minutes".
|
||||
- This setting is now used to ignore recording sessions times (when enabled) in addition to ignoring a backup.
|
||||
- This setting has been moved to the "General" section.
|
||||
- This change requires no update from the user, it will function exactly as it did before.
|
||||
|
||||
Windows Only:
|
||||
|
||||
- Only one instance of GBM can now be running.
|
||||
- A warning is now displayed if the "Start with Windows" setting is enabled while GBM is running as administrator.
|
||||
- GBM currently will not "Start with Windows" as administrator when this setting is enabled.
|
||||
- Please see http://mikemaximus.github.io/gbm-web/gbm_task_scheduler.html for a work-around.
|
||||
|
||||
Linux Only:
|
||||
|
||||
- Added makefile for easy Linux installation. Thanks basxto!
|
||||
- Enhanced makefile and added start script for Linux installations (basxto)
|
||||
- GBM is now available on the archlinux user repository. https://aur.archlinux.org/packages/gbm/ (basxto)
|
||||
- GBM is now available as a deb package for installation. (basxto)
|
||||
|
||||
|
||||
The entire version history of GBM releases is available at http://mikemaximus.github.io/gbm-web/versionhistory.html
|
||||
@@ -0,0 +1,9 @@
|
||||
Package: gbm
|
||||
Architecture: all
|
||||
Maintainer: Sebastian Riedel <git@basxto.de>
|
||||
Priority: optional
|
||||
Version: 1.0.5
|
||||
Homepage: https://mikemaximus.github.io/gbm-web/
|
||||
Bugs: https://github.com/MikeMaximus/gbm/issues
|
||||
Depends: mono-vbnc, libsqlite3-0, p7zip-full
|
||||
Description: Automatically backup your saved games!
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
XDG_DESKTOP_MENU="`which xdg-desktop-menu 2> /dev/null`"
|
||||
XDG_ICON_RESOURCE="`which xdg-icon-resource 2> /dev/null`"
|
||||
|
||||
if [ -x "$XDG_DESKTOP_MENU" ]; then
|
||||
xdg-desktop-menu forceupdate --mode system;
|
||||
fi
|
||||
|
||||
if [ -x "$XDG_ICON_RESOURCE" ]; then
|
||||
xdg-icon-resource forceupdate --mode system;
|
||||
fi
|
||||
+1
-2
@@ -6,9 +6,8 @@ Name=Game Backup Monitor
|
||||
Comment=Monitors games and backs up their savegames
|
||||
Comment[de]=Beobachtet Spiele und sichert ihre Spielstände
|
||||
|
||||
Path=/usr/local/bin
|
||||
TryExec=mono
|
||||
Exec=mono gbm
|
||||
Exec=gbm
|
||||
Terminal=false
|
||||
|
||||
Icon=gbm
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh -e
|
||||
#check for all dependencies
|
||||
for prog in mono readlink df 7za;do
|
||||
[ -n "`whereis -b ${prog} | cut -sd' ' -f2`" ] || (echo "Please install ${prog}" && exit 1);
|
||||
done
|
||||
for lib in libsqlite3;do
|
||||
[ -n "`ldconfig -p | grep ${lib}`" ] || (echo "Please install ${lib}" && exit 1);
|
||||
done
|
||||
dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
|
||||
echo "Located in ${dir}";
|
||||
gbmpath='./';
|
||||
#locate GBM.exe
|
||||
if [ "${dir}" = '/usr/bin' ] && [ -s '/usr/share/gbm/GBM.exe' ]; then
|
||||
gbmpath='/usr/share/gbm/';
|
||||
elif [ "${dir}" = '/usr/local/bin' ] && [ -s '/usr/local/share/gbm/GBM.exe' ]; then
|
||||
gbmpath='/usr/local/share/gbm/';
|
||||
elif [ ! -s './GBM.exe' ]; then
|
||||
echo 'GBM.exe not found';
|
||||
exit 2;
|
||||
fi
|
||||
mono --desktop ${gbmpath}'GBM.exe' "$@";
|
||||
exit $?;
|
||||
@@ -1,31 +1,44 @@
|
||||
ICONSIZES := 16 24 32 48 64 72 96 128 256
|
||||
IMGMAGICK := $(shell command -v convert 2> /dev/null)
|
||||
XDGUTILS := $(shell command -v xdg-desktop-menu 2> /dev/null)
|
||||
DESTDIR :=
|
||||
PREFIX := usr/local
|
||||
define \n
|
||||
|
||||
|
||||
endef
|
||||
|
||||
install: GBM.exe $(foreach size,$(ICONSIZES),gbm_$(size)x$(size).png)
|
||||
ifndef XDGUTILS
|
||||
$(error "xdg-desktop-menu is not available, please install xdg-utils")
|
||||
endif
|
||||
#rename it in a way, it can easily started from terminal
|
||||
install GBM.exe /usr/local/bin/gbm;
|
||||
install -d $(DESTDIR)/$(PREFIX)/bin;
|
||||
install gbm.sh $(DESTDIR)/$(PREFIX)/bin/gbm;
|
||||
install -d $(DESTDIR)/$(PREFIX)/share/gbm/;
|
||||
install GBM.exe $(DESTDIR)/$(PREFIX)/share/gbm/;
|
||||
#install icon in different sizes
|
||||
$(foreach size,$(ICONSIZES),xdg-icon-resource install --mode system --novendor --noupdate --size $(size) gbm_$(size)x$(size).png gbm;$(\n))
|
||||
xdg-icon-resource forceupdate --mode system;
|
||||
$(foreach size,$(ICONSIZES),install -d $(DESTDIR)/$(PREFIX)/share/icons/hicolor/$(size)x$(size)/apps/;$(\n))
|
||||
$(foreach size,$(ICONSIZES),install -m644 gbm_$(size)x$(size).png $(DESTDIR)/$(PREFIX)/share/icons/hicolor/$(size)x$(size)/apps/gbm.png;$(\n))
|
||||
#install .desktop file, which is used for running gbm from desktop and menus
|
||||
xdg-desktop-menu install --mode system --novendor gbm.desktop;
|
||||
|
||||
uninstall: /usr/local/bin/gbm
|
||||
ifndef XDGUTILS
|
||||
$(error "xdg-desktop-menu is not available, please install xdg-utils")
|
||||
install -d $(DESTDIR)/$(PREFIX)/share/applications/
|
||||
install -m644 gbm.desktop $(DESTDIR)/$(PREFIX)/share/applications/gbm.desktop
|
||||
ifeq ($(DESTDIR),)
|
||||
-xdg-icon-resource forceupdate --mode system;
|
||||
-xdg-desktop-menu forceupdate --mode system;
|
||||
endif
|
||||
rm /usr/local/bin/gbm;
|
||||
$(foreach size,$(ICONSIZES),xdg-icon-resource uninstall --mode system --novendor --noupdate --size $(size) gbm;$(\n))
|
||||
xdg-icon-resource forceupdate --mode system;
|
||||
xdg-desktop-menu uninstall --mode system --novendor gbm.desktop;
|
||||
|
||||
uninstall: $(DESTDIR)/$(PREFIX)/bin/gbm
|
||||
-rm $(DESTDIR)/$(PREFIX)/bin/gbm;
|
||||
-rm -r $(DESTDIR)/$(PREFIX)/share/gbm/;
|
||||
$(foreach size,$(ICONSIZES),-rm $(DESTDIR)/$(PREFIX)/share/icons/hicolor/$(size)x$(size)/apps/gbm.png;$(\n))
|
||||
-rm $(DESTDIR)/$(PREFIX)/share/applications/gbm.desktop
|
||||
ifeq ($(DESTDIR),)
|
||||
-xdg-icon-resource forceupdate --mode system;
|
||||
-xdg-desktop-menu forceupdate --mode system;
|
||||
endif
|
||||
|
||||
#must be root
|
||||
deb: DESTDIR := deb-package/gbm
|
||||
deb: PREFIX := usr
|
||||
deb: install
|
||||
cd deb-package;dpkg-deb --build gbm
|
||||
|
||||
gbm_%.png: gbm.ico
|
||||
ifndef IMGMAGICK
|
||||
|
||||
Reference in New Issue
Block a user