39 Commits

Author SHA1 Message Date
Michael J. Seiferling
0ed067e36f Updated readme for v1.1.4 2018-08-23 13:27:53 -06:00
Michael J. Seiferling
bca2fe2239 Removed ico compression for issue #146 2018-08-23 12:42:28 -06:00
Michael J. Seiferling
fa5d03ef52 Fixed sort logic for issue #145 2018-08-23 10:26:50 -06:00
Michael J. Seiferling
998a680999 Removed icon file extraction 2018-08-22 11:18:58 -06:00
Michael J. Seiferling
f5972da9eb Prevent file locking of custom icons 2018-08-22 10:26:19 -06:00
MikeMaximus
794b0f9908 Stop useless manifest conflict checks 2018-08-01 10:02:46 -06:00
Michael J. Seiferling
daa5f928bf Fixes and changes for issue #142 2018-07-30 08:44:39 -06:00
Michael J. Seiferling
72e3ccb661 Fixed precision of total hours on session viewer 2018-07-29 16:00:57 -06:00
Michael J. Seiferling
9e7a4b5efc Tweaks to icon extraction and error handling 2018-07-29 09:06:33 -06:00
Michael J. Seiferling
692deaaef9 Changes for issue #142 2018-07-25 09:21:50 -06:00
Michael J. Seiferling
a3572abb3d Add special folder verification for issue #144 2018-07-24 13:53:52 -06:00
MikeMaximus
2680f857a9 Update README.md 2018-07-08 09:43:18 -06:00
Michael J. Seiferling
1e2f4de816 Fixed another issue with renaming backups 2018-07-05 11:04:44 -06:00
MikeMaximus
b9b959f96c Fixed renaming backup files and sub-folders 2018-07-02 10:05:58 -06:00
MikeMaximus
2ae705be18 Fixed removing sub-folders when game name includes unsafe characters 2018-07-02 09:23:39 -06:00
MikeMaximus
ccade84b65 Removed sync warning when manually deleting all game configurations 2018-07-02 09:08:56 -06:00
MikeMaximus
017c5def56 Fixed removing empty sub-folders 2018-07-02 08:39:16 -06:00
MikeMaximus
1f9dc18c49 Updated readme.txt 2018-07-01 08:53:15 -06:00
MikeMaximus
bc1630a122 Changes for issue #141 2018-07-01 08:39:27 -06:00
MikeMaximus
478721dbd1 Fixed updated import flag for issue #140 2018-06-26 09:48:57 -06:00
MikeMaximus
8ad4810011 Updated readme.txt 2018-06-26 09:32:25 -06:00
MikeMaximus
93bc974cc3 Changes for issues #138 and #140 2018-06-26 09:24:22 -06:00
MikeMaximus
c9463c3a36 Fixes for issue #138 and #139 2018-06-25 18:56:48 -06:00
MikeMaximus
8b2c5f376b Updated readme.txt 2018-06-25 14:31:21 -06:00
MikeMaximus
9e329476a2 Allow restoring selected backups for issue #138 2018-06-25 13:47:28 -06:00
MikeMaximus
626fca3e1e Allow infinite backups for issue #138 2018-06-25 13:15:20 -06:00
MikeMaximus
039f91cd6f Fixed an optional sync field issue 2018-06-25 13:02:21 -06:00
MikeMaximus
f98a98af99 Added backup file verify for issue #138 2018-06-25 12:48:42 -06:00
MikeMaximus
d9bd7f38f5 Merge pull request #136 from basxto/master
Check in linux start script whether gbm is running
2018-06-21 22:28:14 -06:00
Sebastian Riedel
4e2ab9a0fb Check in linux start script whether gbm is running
Fix #112 for linux
2018-06-22 04:45:15 +02:00
MikeMaximus
218ce3f367 Changes for issue #135 2018-06-21 11:08:10 -06:00
MikeMaximus
b3cfab7ee6 Merge pull request #134 from basxto/master
Fix info for raw edit, colon is the delimiter
2018-06-20 15:04:03 -06:00
Sebastian Riedel
39440e1f98 Fix info for raw edit, colon is the delimiter 2018-06-20 01:21:24 +02:00
MikeMaximus
9b9d3f9125 Changes for issue #131 2018-06-15 16:02:31 -06:00
Michael J. Seiferling
7eab3b8841 Updated readme.txt for v1.1.2 2018-06-07 10:50:26 -06:00
Michael J. Seiferling
539009c5de Updated SQLite to 3.23.1 2018-05-20 21:07:00 -06:00
MikeMaximus
01b46107ad Fixed a possible issue with Game Manager quick filter 2018-05-12 23:14:31 -06:00
MikeMaximus
a5d2ce2255 Minor UI change for Game Manager 2018-05-07 20:59:06 -06:00
MikeMaximus
c0764d0c08 Fixed rare crash situation in Game Manager 2018-05-07 16:24:23 -06:00
25 changed files with 428 additions and 205 deletions
+20
View File
@@ -6,6 +6,8 @@
Private sPath As String
Private bAbsolutePath As Boolean
Private bFolderSave As Boolean
Private bAppendTimeStamp As Boolean
Private iBackupLimit As Integer
Private sFileType As String
Private sExcludeList As String
Private bMonitorOnly As Boolean
@@ -76,6 +78,24 @@
End Get
End Property
Property AppendTimeStamp As Boolean
Set(value As Boolean)
bAppendTimeStamp = value
End Set
Get
Return bAppendTimeStamp
End Get
End Property
Property BackupLimit As Integer
Set(value As Integer)
iBackupLimit = value
End Set
Get
Return iBackupLimit
End Get
End Property
Property FileType As String
Set(value As String)
sFileType = value
+6
View File
@@ -47,6 +47,12 @@
End Get
End Property
ReadOnly Property FileSafeName As String
Get
Return mgrPath.ValidateFileNameForOS(sName)
End Get
End Property
Property FileName As String
Get
If mgrCommon.IsUnix Then
+10 -12
View File
@@ -9,7 +9,7 @@ Public Class clsGame
Private bFolderSave As Boolean = False
Private sFileType As String = String.Empty
Private bAppendTimeStamp As Boolean = False
Private iBackupLimit As Integer = 2
Private iBackupLimit As Integer = 0
Private bCleanFolder As Boolean = False
Private sExcludeList As String = String.Empty
Private sProcessPath As String = String.Empty
@@ -31,7 +31,7 @@ Public Class clsGame
Company = 2
Version = 4
Icon = 16
TimeStamp = 32
Unused = 32 'Do not remove to maintain compatability, re-use for a future field.
MonitorGame = 64
End Enum
@@ -340,10 +340,13 @@ Public Class clsGame
If FolderSave <> oGame.FolderSave Then
Return False
End If
If CleanFolder <> oGame.CleanFolder Then
If AppendTimeStamp <> oGame.AppendTimeStamp Then
Return False
End If
If AppendTimeStamp <> oGame.AppendTimeStamp Then
If BackupLimit <> oGame.BackupLimit Then
Return False
End If
If CleanFolder <> oGame.CleanFolder Then
Return False
End If
If Hours <> oGame.Hours Then
@@ -380,14 +383,6 @@ Public Class clsGame
Return False
End If
End If
If (eSyncFields And eOptionalSyncFields.TimeStamp) = eOptionalSyncFields.TimeStamp Then
If AppendTimeStamp <> oGame.AppendTimeStamp Then
Return False
End If
If BackupLimit <> oGame.BackupLimit Then
Return False
End If
End If
If (eSyncFields And eOptionalSyncFields.Version) = eOptionalSyncFields.Version Then
If Version <> oGame.Version Then
Return False
@@ -430,6 +425,9 @@ Public Class clsGame
If FolderSave <> oGame.FolderSave Then
Return False
End If
If AppendTimeStamp <> oGame.AppendTimeStamp Then
Return False
End If
If MonitorOnly <> oGame.MonitorOnly Then
Return False
End If
-2
View File
@@ -267,11 +267,9 @@ Partial Class frmGameManager
'nudLimit
'
Me.nudLimit.Location = New System.Drawing.Point(330, 155)
Me.nudLimit.Minimum = New Decimal(New Integer() {2, 0, 0, 0})
Me.nudLimit.Name = "nudLimit"
Me.nudLimit.Size = New System.Drawing.Size(40, 20)
Me.nudLimit.TabIndex = 17
Me.nudLimit.Value = New Decimal(New Integer() {2, 0, 0, 0})
Me.nudLimit.Visible = False
'
'btnExclude
+99 -38
View File
@@ -175,40 +175,33 @@ Public Class frmGameManager
Return sPath
End Function
Private Sub CheckManifestandUpdate(ByVal oOriginalApp As clsGame, ByVal oNewApp As clsGame)
Private Sub CheckManifestandUpdate(ByVal oOriginalApp As clsGame, ByVal oNewApp As clsGame, ByVal bUseGameID As Boolean)
Dim oBackupItems As List(Of clsBackup)
Dim sDirectory As String
Dim sNewDirectory As String
Dim sFileName As String
Dim sNewFileName As String
Dim sNewAppItem As String
Dim sOriginalAppItem As String
'If there is a valid change, check and update the manifest
If (oNewApp.ID <> oOriginalApp.ID) Or (oNewApp.FileSafeName <> oOriginalApp.FileSafeName) Then
'Choose how to perform file & folder renames
If bUseGameID Then
sNewAppItem = oNewApp.ID
sOriginalAppItem = oOriginalApp.ID
Else
sNewAppItem = oNewApp.FileSafeName
sOriginalAppItem = oOriginalApp.FileSafeName
End If
'If there is an ID change, check and update the manifest
If oNewApp.ID <> oOriginalApp.ID Then
'Local
If mgrManifest.DoManifestCheck(oOriginalApp.ID, mgrSQLite.Database.Local) Then
oBackupItems = mgrManifest.DoManifestGetByMonitorID(oOriginalApp.ID, mgrSQLite.Database.Local)
'The local manifest will only have one entry per game, therefore this runs only once
For Each oBackupItem As clsBackup In oBackupItems
'Rename Current Backup File & Folder
sFileName = BackupFolder & oBackupItem.FileName
'Rename Backup File
sNewFileName = Path.GetDirectoryName(sFileName) & Path.DirectorySeparatorChar & Path.GetFileName(sFileName).Replace(oOriginalApp.ID, oNewApp.ID)
If File.Exists(sFileName) And Not sFileName = sNewFileName Then
FileSystem.Rename(sFileName, sNewFileName)
End If
'Rename Directory
sDirectory = Path.GetDirectoryName(sFileName)
sNewDirectory = sDirectory.Replace(oOriginalApp.ID, oNewApp.ID)
If sDirectory <> sNewDirectory Then
If Directory.Exists(sDirectory) And Not sDirectory = sNewDirectory Then
FileSystem.Rename(sDirectory, sNewDirectory)
End If
End If
oBackupItem.MonitorID = oNewApp.ID
oBackupItem.FileName = oBackupItem.FileName.Replace(oOriginalApp.ID, oNewApp.ID)
oBackupItem.FileName = oBackupItem.FileName.Replace(sOriginalAppItem, sNewAppItem)
mgrManifest.DoManifestUpdateByManifestID(oBackupItem, mgrSQLite.Database.Local)
Next
End If
@@ -218,10 +211,24 @@ Public Class frmGameManager
oBackupItems = mgrManifest.DoManifestGetByMonitorID(oOriginalApp.ID, mgrSQLite.Database.Remote)
For Each oBackupItem As clsBackup In oBackupItems
'Rename Current Backup File
sFileName = BackupFolder & oBackupItem.FileName
sNewFileName = Path.GetDirectoryName(sFileName) & Path.DirectorySeparatorChar & Path.GetFileName(sFileName).Replace(sOriginalAppItem, sNewAppItem)
If File.Exists(sFileName) And Not sFileName = sNewFileName Then
FileSystem.Rename(sFileName, sNewFileName)
End If
oBackupItem.MonitorID = oNewApp.ID
oBackupItem.FileName = oBackupItem.FileName.Replace(oOriginalApp.ID, oNewApp.ID)
oBackupItem.FileName = oBackupItem.FileName.Replace(sOriginalAppItem, sNewAppItem)
mgrManifest.DoManifestUpdateByManifestID(oBackupItem, mgrSQLite.Database.Remote)
Next
'Rename folder if there is one
sDirectory = BackupFolder & sOriginalAppItem
sNewDirectory = sDirectory.Replace(sOriginalAppItem, sNewAppItem)
If Directory.Exists(sDirectory) And Not sDirectory = sNewDirectory Then
FileSystem.Rename(sDirectory, sNewDirectory)
End If
End If
End If
End Sub
@@ -375,7 +382,7 @@ Public Class frmGameManager
If sNewPath <> String.Empty Then
txtIcon.Text = sNewPath
If IO.File.Exists(sNewPath) Then
pbIcon.Image = Image.FromFile(sNewPath)
pbIcon.Image = mgrCommon.SafeIconFromFile(sNewPath)
End If
End If
End Sub
@@ -675,6 +682,36 @@ Public Class frmGameManager
End Sub
Public Sub VerifyBackups(ByVal oApp As clsGame)
Dim oCurrentBackup As clsBackup
Dim oCurrentBackups As List(Of clsBackup)
Dim oBackupsRemoved As New List(Of clsBackup)
oCurrentBackups = mgrManifest.DoManifestGetByMonitorID(oApp.ID, mgrSQLite.Database.Remote)
Cursor.Current = Cursors.WaitCursor
For Each oCurrentBackup In oCurrentBackups
If Not File.Exists(BackupFolder & oCurrentBackup.FileName) Then
oBackupsRemoved.Add(oCurrentBackup)
mgrManifest.DoManifestDeleteByManifestID(oCurrentBackup, mgrSQLite.Database.Remote)
End If
Next
If oBackupsRemoved.Count > 0 Then
For Each oCurrentBackup In oBackupsRemoved
oCurrentBackups.Remove(oCurrentBackup)
If oCurrentBackups.Count = 0 Then
mgrManifest.DoManifestDeleteByMonitorID(oCurrentBackup, mgrSQLite.Database.Local)
End If
Next
LoadBackupData()
GetBackupInfo(oApp)
End If
Cursor.Current = Cursors.Default
End Sub
Private Sub GetBackupInfo(ByVal oApp As clsGame)
Dim oBackupInfo As clsBackup
Dim oCurrentBackup As clsBackup
@@ -757,7 +794,7 @@ Public Class frmGameManager
For Each oBackup In oBackupData
'Delete the specific remote manifest entry
mgrManifest.DoManifestDeletebyManifestID(oBackup, mgrSQLite.Database.Remote)
mgrManifest.DoManifestDeleteByManifestID(oBackup, mgrSQLite.Database.Remote)
'Delete referenced backup file from the backup folder
mgrCommon.DeleteFile(BackupFolder & oBackup.FileName)
'Check for sub-directory and delete if empty (we need to do this every pass just in case the user had a mix of settings at one point)
@@ -765,7 +802,7 @@ Public Class frmGameManager
Next
'Delete local manifest entry
mgrManifest.DoManifestDeletebyMonitorID(CurrentBackupItem, mgrSQLite.Database.Local)
mgrManifest.DoManifestDeleteByMonitorID(CurrentBackupItem, mgrSQLite.Database.Local)
LoadBackupData()
FillData()
@@ -831,7 +868,7 @@ Public Class frmGameManager
'Icon
If IO.File.Exists(oApp.Icon) Then
pbIcon.Image = Image.FromFile(oApp.Icon)
pbIcon.Image = mgrCommon.SafeIconFromFile(oApp.Icon)
Else
pbIcon.Image = Icon_Unknown
End If
@@ -847,14 +884,14 @@ Public Class frmGameManager
End Sub
Private Sub FillTagsbyID(ByVal sID As String)
Dim hshTags As Hashtable
Dim slTags As SortedList
Dim oTag As clsTag
Dim sTags As String = String.Empty
Dim cTrim() As Char = {",", " "}
hshTags = mgrGameTags.GetTagsByGame(sID)
slTags = mgrGameTags.GetTagsByGame(sID)
For Each de As DictionaryEntry In hshTags
For Each de As DictionaryEntry In slTags
oTag = DirectCast(de.Value, clsTag)
sTags &= "#" & oTag.Name & ", "
Next
@@ -913,7 +950,7 @@ Public Class frmGameManager
Next
End Sub
Private Sub ModeChange()
Private Sub ModeChange(Optional ByVal bNoFocusChange As Boolean = False)
IsLoading = True
Select Case eCurrentMode
@@ -1060,7 +1097,7 @@ Public Class frmGameManager
btnExport.Enabled = True
End Select
lstGames.Focus()
If Not bNoFocusChange Then lstGames.Focus()
IsLoading = False
End Sub
@@ -1082,28 +1119,34 @@ Public Class frmGameManager
If chkMonitorOnly.Checked Then
chkFolderSave.Enabled = False
chkTimeStamp.Enabled = False
lblLimit.Enabled = False
nudLimit.Enabled = False
lblSavePath.Enabled = False
txtSavePath.Enabled = False
btnSavePathBrowse.Enabled = False
btnInclude.Enabled = False
btnExclude.Enabled = False
chkCleanFolder.Enabled = False
Else
chkFolderSave.Enabled = True
chkTimeStamp.Enabled = True
lblLimit.Enabled = True
nudLimit.Enabled = True
lblSavePath.Enabled = True
txtSavePath.Enabled = True
btnSavePathBrowse.Enabled = True
btnInclude.Enabled = True
btnExclude.Enabled = True
FolderSaveModeChange()
VerifyCleanFolder()
End If
VerifyCleanFolder()
End Sub
Private Sub TimeStampModeChange()
If chkTimeStamp.Checked Then
nudLimit.Visible = True
lblLimit.Visible = True
nudLimit.Value = 5
nudLimit.Value = 0
Else
nudLimit.Visible = False
nudLimit.Value = nudLimit.Minimum
@@ -1249,7 +1292,7 @@ Public Class frmGameManager
Case eModes.Edit
If CoreValidatation(oApp, False) Then
bSuccess = True
CheckManifestandUpdate(oCurrentGame, oApp)
CheckManifestandUpdate(oCurrentGame, oApp, oSettings.UseGameID)
mgrMonitorList.DoListUpdate(oApp, CurrentGame.ID)
eCurrentMode = eModes.View
End If
@@ -1294,7 +1337,7 @@ Public Class frmGameManager
If mgrCommon.ShowMessage(frmGameManager_ConfirmGameDelete, oApp.Name, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
mgrMonitorList.DoListDelete(oApp.ID)
mgrMonitorList.SyncMonitorLists(Settings)
mgrMonitorList.SyncMonitorLists(Settings,, False)
LoadData()
eCurrentMode = eModes.Disabled
ModeChange()
@@ -1309,7 +1352,7 @@ Public Class frmGameManager
If mgrCommon.ShowMessage(frmGameManager_ConfirmMultiGameDelete, sMonitorIDs.Count, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
mgrMonitorList.DoListDeleteMulti(sMonitorIDs)
mgrMonitorList.SyncMonitorLists(Settings)
mgrMonitorList.SyncMonitorLists(Settings,, False)
LoadData()
eCurrentMode = eModes.Disabled
ModeChange()
@@ -1479,7 +1522,6 @@ Public Class frmGameManager
If lstGames.SelectedItems.Count > 0 Then
RestoreList.Clear()
For Each oData In lstGames.SelectedItems
If oRemoteBackupData.Contains(oData.Key) Then
oGame = DirectCast(GameData(oData.Key), clsGame)
@@ -1494,6 +1536,12 @@ Public Class frmGameManager
For Each de As DictionaryEntry In RestoreList
oGame = DirectCast(de.Key, clsGame)
Next
'FIXME: This is a really lazy fix. This whole function needs a rewrite at some point.
'Replace backup entry with currently selected backup item in case the user wants to restore an older backup.
RestoreList.Clear()
RestoreList.Add(oGame, oCurrentBackupItem)
If Not mgrRestore.CheckManifest(oGame.Name) Then
sMsg = mgrCommon.FormatString(frmGameManager_ConfirmRestoreAnyway, oGame.Name)
Else
@@ -1785,6 +1833,10 @@ Public Class frmGameManager
TimeStampModeChange()
End Sub
Private Sub cboRemoteBackup_Enter(sender As Object, e As EventArgs) Handles cboRemoteBackup.Enter, cboRemoteBackup.Click
If Not oCurrentGame Is Nothing Then VerifyBackups(oCurrentGame)
End Sub
Private Sub cboRemoteBackup_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboRemoteBackup.SelectedIndexChanged
If Not bIsLoading Then
UpdateBackupInfo(DirectCast(cboRemoteBackup.SelectedItem, KeyValuePair(Of String, String)).Key)
@@ -1812,7 +1864,14 @@ Public Class frmGameManager
End Sub
Private Sub txtQuickFilter_TextChanged(sender As Object, e As EventArgs) Handles txtQuickFilter.TextChanged
If Not eCurrentMode = eModes.Disabled Then
eCurrentMode = eModes.Disabled
ModeChange(True)
lstGames.ClearSelected()
End If
If Not tmFilterTimer.Enabled Then
lstGames.Enabled = False
tmFilterTimer.Enabled = True
tmFilterTimer.Start()
End If
@@ -1827,6 +1886,7 @@ Public Class frmGameManager
FormatAndFillList()
tmFilterTimer.Stop()
tmFilterTimer.Enabled = False
lstGames.Enabled = True
End Sub
Private Sub frmGameManager_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
@@ -1836,4 +1896,5 @@ Public Class frmGameManager
Private Sub chkMonitorOnly_CheckedChanged(sender As Object, e As EventArgs) Handles chkMonitorOnly.CheckedChanged
MonitorOnlyModeChange()
End Sub
End Class
+46 -16
View File
@@ -526,7 +526,7 @@ Public Class frmMain
sIcon = fbBrowser.FileName
If File.Exists(sIcon) Then
oProcess.GameInfo.Icon = sIcon
pbIcon.Image = Image.FromFile(sIcon)
pbIcon.Image = mgrCommon.SafeIconFromFile(sIcon)
mgrMonitorList.DoListUpdate(oProcess.GameInfo)
End If
End If
@@ -577,6 +577,25 @@ Public Class frmMain
End If
End Sub
Private Sub SetGameIcon()
Dim ic As Icon
Dim oBitmap As Bitmap
Try
'Grab icon from the executable
ic = System.Drawing.Icon.ExtractAssociatedIcon(oProcess.FoundProcess.MainModule.FileName)
oBitmap = New Bitmap(ic.ToBitmap)
ic.Dispose()
'Set the icon, we need to use an intermediary object to prevent file locking
pbIcon.Image = oBitmap
Catch ex As Exception
UpdateLog(mgrCommon.FormatString(frmMain_ErrorGameIcon), False, ToolTipIcon.Error)
UpdateLog(mgrCommon.FormatString(App_GenericError, ex.Message), False,, False)
End Try
End Sub
Private Sub SetGameInfo(Optional ByVal bMulti As Boolean = False)
Dim sFileName As String = String.Empty
Dim sFileVersion As String = String.Empty
@@ -586,6 +605,20 @@ Public Class frmMain
lblStatus1.Text = String.Empty
lblStatus2.Text = String.Empty
lblStatus3.Text = String.Empty
pbIcon.Image = Icon_Unknown
'Set Game Icon
If Not mgrCommon.IsUnix Then SetGameIcon()
Try
'Set Game Details
sFileName = oProcess.FoundProcess.MainModule.FileName
sFileVersion = oProcess.FoundProcess.MainModule.FileVersionInfo.FileVersion
sCompanyName = oProcess.FoundProcess.MainModule.FileVersionInfo.CompanyName
Catch ex As Exception
UpdateLog(mgrCommon.FormatString(frmMain_ErrorGameDetails), False, ToolTipIcon.Error)
UpdateLog(mgrCommon.FormatString(App_GenericError, ex.Message), False,, False)
End Try
'Get Game Details
If bMulti Then
@@ -595,28 +628,19 @@ Public Class frmMain
pbTime.Visible = False
lblTimeSpent.Visible = False
pbIcon.Image = Icon_Unknown
lblStatus1.Text = frmMain_NoDetails
If sFileName = String.Empty Then
lblStatus1.Text = frmMain_NoDetails
Else
lblStatus1.Text = sFileName
End If
Else
bAllowIcon = True
bAllowDetails = True
lblGameTitle.Text = oProcess.GameInfo.Name
Try
Dim ic As Icon = System.Drawing.Icon.ExtractAssociatedIcon(oProcess.FoundProcess.MainModule.FileName)
pbIcon.Image = ic.ToBitmap
'Set Game Details
sFileName = oProcess.FoundProcess.MainModule.FileName
sFileVersion = oProcess.FoundProcess.MainModule.FileVersionInfo.FileVersion
sCompanyName = oProcess.FoundProcess.MainModule.FileVersionInfo.CompanyName
Catch ex As Exception
pbIcon.Image = Icon_Unknown
End Try
'Check for a custom icon & details
If File.Exists(oProcess.GameInfo.Icon) Then
pbIcon.Image = Image.FromFile(oProcess.GameInfo.Icon)
pbIcon.Image = mgrCommon.SafeIconFromFile(oProcess.GameInfo.Icon)
End If
If sFileName = String.Empty Then
If oProcess.GameInfo.ProcessPath <> String.Empty Then
@@ -1046,6 +1070,12 @@ Public Class frmMain
Exit Sub
End If
'Check Special Paths
If Not mgrPath.CheckSpecialPaths Then
bInitFail = True
Exit Sub
End If
'Local Database Check
VerifyDBVersion(mgrSQLite.Database.Local)
LocalDatabaseCheck()
+15 -3
View File
@@ -68,7 +68,7 @@ Public Class frmSessions
dgSessions.Rows.Add(New Object() {dr("MonitorID"), dr("Name"), dr("Start"), dStart, dr("End"), dEnd, dHours})
Next
lblTotalHours.Text = mgrCommon.FormatString(frmSessions_lblTotalHours, dTotalHours)
lblTotalHours.Text = mgrCommon.FormatString(frmSessions_lblTotalHours, Math.Round(dTotalHours, 2))
dgSessions.AutoResizeColumns()
End Sub
@@ -290,9 +290,21 @@ Public Class frmSessions
Select Case iDataTypeCol
Case iDataType.DecimalType
iCompareResult = If(CDec(dgRow1.Cells(iSortCol).Value) < CDec(dgRow2.Cells(iSortCol).Value), -1, 1)
If (CDec(dgRow1.Cells(iSortCol).Value) = CDec(dgRow2.Cells(iSortCol).Value)) Then
iCompareResult = 0
ElseIf (CDec(dgRow1.Cells(iSortCol).Value) < CDec(dgRow2.Cells(iSortCol).Value)) Then
iCompareResult = -1
Else
iCompareResult = 1
End If
Case iDataType.IntType
iCompareResult = If(CInt(dgRow1.Cells(iSortCol).Value) < CInt(dgRow2.Cells(iSortCol).Value), -1, 1)
If (CInt(dgRow1.Cells(iSortCol).Value) = CInt(dgRow2.Cells(iSortCol).Value)) Then
iCompareResult = 0
ElseIf (CInt(dgRow1.Cells(iSortCol).Value) < CInt(dgRow2.Cells(iSortCol).Value)) Then
iCompareResult = -1
Else
iCompareResult = 1
End If
Case iDataType.StringType
iCompareResult = String.Compare(CStr(dgRow1.Cells(iSortCol).Value), CStr(dgRow2.Cells(iSortCol).Value))
Case iDataType.DateTimeType
+9 -22
View File
@@ -28,7 +28,6 @@ Partial Class frmSyncFields
Me.chkVersion = New System.Windows.Forms.CheckBox()
Me.chkCompany = New System.Windows.Forms.CheckBox()
Me.chkGamePath = New System.Windows.Forms.CheckBox()
Me.chkTimeStamp = New System.Windows.Forms.CheckBox()
Me.btnCancel = New System.Windows.Forms.Button()
Me.btnSave = New System.Windows.Forms.Button()
Me.grpFields.SuspendLayout()
@@ -41,10 +40,9 @@ Partial Class frmSyncFields
Me.grpFields.Controls.Add(Me.chkVersion)
Me.grpFields.Controls.Add(Me.chkCompany)
Me.grpFields.Controls.Add(Me.chkGamePath)
Me.grpFields.Controls.Add(Me.chkTimeStamp)
Me.grpFields.Location = New System.Drawing.Point(12, 12)
Me.grpFields.Name = "grpFields"
Me.grpFields.Size = New System.Drawing.Size(195, 162)
Me.grpFields.Size = New System.Drawing.Size(195, 135)
Me.grpFields.TabIndex = 0
Me.grpFields.TabStop = False
Me.grpFields.Text = "Available Fields"
@@ -52,7 +50,7 @@ Partial Class frmSyncFields
'chkMonitorGame
'
Me.chkMonitorGame.AutoSize = True
Me.chkMonitorGame.Location = New System.Drawing.Point(6, 134)
Me.chkMonitorGame.Location = New System.Drawing.Point(6, 111)
Me.chkMonitorGame.Name = "chkMonitorGame"
Me.chkMonitorGame.Size = New System.Drawing.Size(109, 17)
Me.chkMonitorGame.TabIndex = 5
@@ -62,7 +60,7 @@ Partial Class frmSyncFields
'chkIcon
'
Me.chkIcon.AutoSize = True
Me.chkIcon.Location = New System.Drawing.Point(6, 111)
Me.chkIcon.Location = New System.Drawing.Point(6, 88)
Me.chkIcon.Name = "chkIcon"
Me.chkIcon.Size = New System.Drawing.Size(148, 17)
Me.chkIcon.TabIndex = 4
@@ -72,7 +70,7 @@ Partial Class frmSyncFields
'chkVersion
'
Me.chkVersion.AutoSize = True
Me.chkVersion.Location = New System.Drawing.Point(6, 88)
Me.chkVersion.Location = New System.Drawing.Point(6, 65)
Me.chkVersion.Name = "chkVersion"
Me.chkVersion.Size = New System.Drawing.Size(61, 17)
Me.chkVersion.TabIndex = 3
@@ -82,7 +80,7 @@ Partial Class frmSyncFields
'chkCompany
'
Me.chkCompany.AutoSize = True
Me.chkCompany.Location = New System.Drawing.Point(6, 65)
Me.chkCompany.Location = New System.Drawing.Point(6, 42)
Me.chkCompany.Name = "chkCompany"
Me.chkCompany.Size = New System.Drawing.Size(70, 17)
Me.chkCompany.TabIndex = 2
@@ -92,27 +90,17 @@ Partial Class frmSyncFields
'chkGamePath
'
Me.chkGamePath.AutoSize = True
Me.chkGamePath.Location = New System.Drawing.Point(6, 42)
Me.chkGamePath.Location = New System.Drawing.Point(6, 19)
Me.chkGamePath.Name = "chkGamePath"
Me.chkGamePath.Size = New System.Drawing.Size(180, 17)
Me.chkGamePath.TabIndex = 1
Me.chkGamePath.Text = "Game Path (Not Recommended)"
Me.chkGamePath.UseVisualStyleBackColor = True
'
'chkTimeStamp
'
Me.chkTimeStamp.AutoSize = True
Me.chkTimeStamp.Location = New System.Drawing.Point(6, 19)
Me.chkTimeStamp.Name = "chkTimeStamp"
Me.chkTimeStamp.Size = New System.Drawing.Size(133, 17)
Me.chkTimeStamp.TabIndex = 0
Me.chkTimeStamp.Text = "Save multiple backups"
Me.chkTimeStamp.UseVisualStyleBackColor = True
'
'btnCancel
'
Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.btnCancel.Location = New System.Drawing.Point(132, 180)
Me.btnCancel.Location = New System.Drawing.Point(132, 153)
Me.btnCancel.Name = "btnCancel"
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
Me.btnCancel.TabIndex = 2
@@ -122,7 +110,7 @@ Partial Class frmSyncFields
'btnSave
'
Me.btnSave.DialogResult = System.Windows.Forms.DialogResult.OK
Me.btnSave.Location = New System.Drawing.Point(52, 180)
Me.btnSave.Location = New System.Drawing.Point(52, 153)
Me.btnSave.Name = "btnSave"
Me.btnSave.Size = New System.Drawing.Size(75, 23)
Me.btnSave.TabIndex = 1
@@ -133,7 +121,7 @@ Partial Class frmSyncFields
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(219, 211)
Me.ClientSize = New System.Drawing.Size(219, 186)
Me.Controls.Add(Me.btnCancel)
Me.Controls.Add(Me.btnSave)
Me.Controls.Add(Me.grpFields)
@@ -157,7 +145,6 @@ Partial Class frmSyncFields
Friend WithEvents chkVersion As CheckBox
Friend WithEvents chkCompany As CheckBox
Friend WithEvents chkGamePath As CheckBox
Friend WithEvents chkTimeStamp As CheckBox
Friend WithEvents btnCancel As Button
Friend WithEvents btnSave As Button
End Class
-12
View File
@@ -26,9 +26,6 @@ Public Class frmSyncFields
If (eSyncFields And clsGame.eOptionalSyncFields.MonitorGame) = clsGame.eOptionalSyncFields.MonitorGame Then
chkMonitorGame.Checked = True
End If
If (eSyncFields And clsGame.eOptionalSyncFields.TimeStamp) = clsGame.eOptionalSyncFields.TimeStamp Then
chkTimeStamp.Checked = True
End If
If (eSyncFields And clsGame.eOptionalSyncFields.Version) = clsGame.eOptionalSyncFields.Version Then
chkVersion.Checked = True
End If
@@ -47,7 +44,6 @@ Public Class frmSyncFields
chkVersion.Text = frmSyncFields_chkVersion
chkCompany.Text = frmSyncFields_chkCompany
chkGamePath.Text = frmSyncFields_chkGamePath
chkTimeStamp.Text = frmSyncFields_chkTimeStamp
End Sub
Private Sub frmSyncFields_Load(sender As Object, e As EventArgs) Handles MyBase.Load
@@ -65,14 +61,6 @@ Public Class frmSyncFields
Me.Close()
End Sub
Private Sub chkTimeStamp_CheckedChanged(sender As Object, e As EventArgs) Handles chkTimeStamp.CheckedChanged
If chkTimeStamp.Checked Then
SyncFields = clsGame.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.TimeStamp)
Else
SyncFields = clsGame.RemoveSyncField(SyncFields, clsGame.eOptionalSyncFields.TimeStamp)
End If
End Sub
Private Sub chkGamePath_CheckedChanged(sender As Object, e As EventArgs) Handles chkGamePath.CheckedChanged
If chkGamePath.Checked Then
SyncFields = clsGame.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.GamePath)
+17 -7
View File
@@ -116,6 +116,7 @@ Public Class mgrBackup
Public Function CheckBackupPrereq(ByVal oGame As clsGame) As Boolean
Dim sBackupFile As String = oSettings.BackupFolder
Dim sSavePath As String
Dim sOverwriteMessage As String
Dim lAvailableSpace As Long
Dim lFolderSize As Long
@@ -142,21 +143,30 @@ Public Class mgrBackup
End If
End If
If mgrRestore.CheckManifest(oGame.ID) Then
If mgrCommon.ShowMessage(mgrBackup_ConfirmManifestConflict, oGame.Name, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
RaiseEvent UpdateLog(mgrBackup_ErrorManifestConflict, False, ToolTipIcon.Error, True)
Return False
'A manifest check is only required when "Save Multiple Backups" is disabled
If Not oGame.AppendTimeStamp Then
If mgrRestore.CheckManifest(oGame.ID) Then
If mgrCommon.ShowMessage(mgrBackup_ConfirmManifestConflict, oGame.Name, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
RaiseEvent UpdateLog(mgrBackup_ErrorManifestConflict, False, ToolTipIcon.Error, True)
Return False
End If
End If
End If
If oSettings.ShowOverwriteWarning And File.Exists(sBackupFile) And Not oGame.AppendTimeStamp Then
If mgrCommon.ShowMessage(mgrBackup_ConfirmOverwrite, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
If oGame.AbsolutePath Then
sOverwriteMessage = mgrBackup_ConfirmOverwrite
Else
sOverwriteMessage = mgrBackup_ConfirmOverwriteRelative
End If
If mgrCommon.ShowMessage(sOverwriteMessage, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorOverwriteAbort, oGame.Name), False, ToolTipIcon.Error, True)
Return False
End If
End If
Return True
Return True
End Function
Private Sub CheckOldBackups(ByVal oGame As clsGame)
@@ -223,7 +233,7 @@ Public Class mgrBackup
End If
If oGame.AppendTimeStamp Then
CheckOldBackups(oGame)
If oGame.BackupLimit > 0 Then CheckOldBackups(oGame)
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame) & sTimeStamp & ".7z"
Else
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame) & ".7z"
+27 -8
View File
@@ -65,6 +65,18 @@ Public Class mgrCommon
Return oFormatter.Deserialize(oStream)
End Function
Public Shared Function SafeIconFromFile(ByVal sPath As String) As Image
Dim oImage As Image
Dim oReturnImage As Image
Dim oImageSize As Size = New Size(48, 48)
oImage = Image.FromFile(sPath)
oReturnImage = New Bitmap(oImage, oImageSize)
oImage.Dispose()
Return oReturnImage
End Function
Public Shared Function IsAddress(ByVal sURL As String) As Boolean
If (sURL.IndexOf("http://", 0, StringComparison.CurrentCultureIgnoreCase) > -1) Or (sURL.IndexOf("https://", 0, StringComparison.CurrentCultureIgnoreCase) > -1) Then
Return True
@@ -434,15 +446,22 @@ Public Class mgrCommon
Dim oDir As DirectoryInfo
Dim sDir As String = sBackupFolder & oBackup.MonitorID
'Delete sub directory if it's empty
'Check if the sub-folder is an ID or Name
If oBackup.FileName.StartsWith(oBackup.MonitorID & Path.DirectorySeparatorChar) Then
If Directory.Exists(sDir) Then
'Check if there's any sub-directories or files remaining
oDir = New DirectoryInfo(sDir)
If oDir.GetDirectories.Length = 0 And oDir.GetFiles.Length = 0 Then
'Folder is empty, delete the empty sub-folder
If Directory.Exists(sDir) Then DeleteDirectory(sDir)
End If
sDir = sBackupFolder & oBackup.MonitorID
ElseIf oBackup.FileName.StartsWith(oBackup.FileSafeName & Path.DirectorySeparatorChar) Then
sDir = sBackupFolder & oBackup.FileSafeName
Else
Exit Sub
End If
'Delete sub directory if it's empty
If Directory.Exists(sDir) Then
'Check if there's any sub-directories or files remaining
oDir = New DirectoryInfo(sDir)
If oDir.GetDirectories.Length = 0 And oDir.GetFiles.Length = 0 Then
'Folder is empty, delete the empty sub-folder
If Directory.Exists(sDir) Then DeleteDirectory(sDir)
End If
End If
End Sub
+5 -5
View File
@@ -76,11 +76,11 @@
End Sub
Public Shared Function GetTagsByGame(ByVal sMonitorID As String) As Hashtable
Public Shared Function GetTagsByGame(ByVal sMonitorID As String) As SortedList
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
Dim oData As DataSet
Dim sSQL As String
Dim hshList As New Hashtable
Dim slList As New SortedList
Dim hshParams As New Hashtable
Dim oTag As clsTag
@@ -94,10 +94,10 @@
oTag = New clsTag
oTag.ID = CStr(dr("TagID"))
oTag.Name = CStr(dr("Name"))
hshList.Add(oTag.Name, oTag)
slList.Add(oTag.Name, oTag)
Next
Return hshList
Return slList
End Function
Public Shared Function GetTagsByGameForExport(ByVal sMonitorID As String) As List(Of Tag)
@@ -108,7 +108,7 @@
Dim hshParams As New Hashtable
Dim oTag As Tag
sSQL = "SELECT TagID, tags.Name FROM gametags NATURAL JOIN tags WHERE MonitorID = @ID"
sSQL = "SELECT TagID, tags.Name FROM gametags NATURAL JOIN tags WHERE MonitorID = @ID ORDER BY tags.Name ASC"
hshParams.Add("ID", sMonitorID)
+16 -21
View File
@@ -373,8 +373,6 @@ Public Class mgrMonitorList
Dim sVersion As String
Dim sCompany As String
Dim sMonitorGame As String
Dim sTimeStamp As String
Dim sBackupLimit As String
'Setup SQL for optional fields
If (eSyncFields And clsGame.eOptionalSyncFields.Company) = clsGame.eOptionalSyncFields.Company Then
@@ -397,13 +395,6 @@ Public Class mgrMonitorList
Else
sMonitorGame = "COALESCE((SELECT Enabled FROM monitorlist WHERE MonitorID=@ID),1)"
End If
If (eSyncFields And clsGame.eOptionalSyncFields.TimeStamp) = clsGame.eOptionalSyncFields.TimeStamp Then
sTimeStamp = "@TimeStamp"
sBackupLimit = "@BackupLimit"
Else
sTimeStamp = "COALESCE((SELECT TimeStamp FROM monitorlist WHERE MonitorID=@ID),0)"
sBackupLimit = "COALESCE((SELECT BackupLimit FROM monitorlist WHERE MonitorID=@ID),2)"
End If
If (eSyncFields And clsGame.eOptionalSyncFields.Version) = clsGame.eOptionalSyncFields.Version Then
sVersion = "@Version"
Else
@@ -412,9 +403,9 @@ Public Class mgrMonitorList
sSQL = "INSERT OR REPLACE INTO monitorlist (MonitorID, Name, Process, Path, AbsolutePath, FolderSave, FileType, TimeStamp, ExcludeList, ProcessPath, Icon, Hours, Version, Company, Enabled, MonitorOnly, BackupLimit, CleanFolder, Parameter, Comments, IsRegEx) "
sSQL &= "VALUES (@ID, @Name, @Process, @Path, @AbsolutePath, @FolderSave, @FileType, "
sSQL &= sTimeStamp & ", @ExcludeList, " & sGamePath & ", "
sSQL &= "@TimeStamp, @ExcludeList, " & sGamePath & ", "
sSQL &= sIcon & ", @Hours, " & sVersion & ", "
sSQL &= sCompany & ", " & sMonitorGame & ", @MonitorOnly, " & sBackupLimit & ", @CleanFolder, @Parameter, @Comments, @IsRegEx);"
sSQL &= sCompany & ", " & sMonitorGame & ", @MonitorOnly, @BackupLimit, @CleanFolder, @Parameter, @Comments, @IsRegEx);"
For Each oGame As clsGame In hshGames.Values
hshParams = New Hashtable
@@ -426,6 +417,8 @@ Public Class mgrMonitorList
hshParams.Add("Path", oGame.TruePath)
hshParams.Add("AbsolutePath", oGame.AbsolutePath)
hshParams.Add("FolderSave", oGame.FolderSave)
hshParams.Add("TimeStamp", oGame.AppendTimeStamp)
hshParams.Add("BackupLimit", oGame.BackupLimit)
hshParams.Add("FileType", oGame.FileType)
hshParams.Add("ExcludeList", oGame.ExcludeList)
hshParams.Add("Hours", oGame.Hours)
@@ -448,10 +441,6 @@ Public Class mgrMonitorList
If (eSyncFields And clsGame.eOptionalSyncFields.MonitorGame) = clsGame.eOptionalSyncFields.MonitorGame Then
hshParams.Add("Enabled", oGame.Enabled)
End If
If (eSyncFields And clsGame.eOptionalSyncFields.TimeStamp) = clsGame.eOptionalSyncFields.TimeStamp Then
hshParams.Add("TimeStamp", oGame.AppendTimeStamp)
hshParams.Add("BackupLimit", oGame.BackupLimit)
End If
If (eSyncFields And clsGame.eOptionalSyncFields.Version) = clsGame.eOptionalSyncFields.Version Then
hshParams.Add("Version", oGame.Version)
End If
@@ -491,7 +480,7 @@ Public Class mgrMonitorList
oDatabase.RunMassParamQuery(sSQL, oParamList)
End Sub
Public Shared Sub SyncMonitorLists(ByVal oSettings As mgrSettings, Optional ByVal bToRemote As Boolean = True)
Public Shared Sub SyncMonitorLists(ByVal oSettings As mgrSettings, Optional ByVal bToRemote As Boolean = True, Optional ByVal bSyncProtection As Boolean = True)
Dim hshCompareFrom As Hashtable
Dim hshCompareTo As Hashtable
Dim hshSyncItems As Hashtable
@@ -520,11 +509,15 @@ Public Class mgrMonitorList
End If
'Sync Wipe Protection
If hshCompareFrom.Count = 0 And hshCompareTo.Count > 0 Then
If mgrCommon.ShowMessage(mgrMonitorList_WarningSyncProtection, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
'We will always show this one in the log regardless of setting
RaiseEvent UpdateLog(mgrMonitorList_ErrorSyncCancel, False, ToolTipIcon.Warning, True)
Exit Sub
If bSyncProtection Then
If hshCompareFrom.Count = 0 And hshCompareTo.Count > 0 Then
Cursor.Current = Cursors.Default
If mgrCommon.ShowMessage(mgrMonitorList_WarningSyncProtection, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
'We will always show this one in the log regardless of setting
RaiseEvent UpdateLog(mgrMonitorList_ErrorSyncCancel, False, ToolTipIcon.Warning, True)
Exit Sub
End If
Cursor.Current = Cursors.WaitCursor
End If
End If
@@ -778,6 +771,8 @@ Public Class mgrMonitorList
If Not IsDBNull(dr("Path")) Then oGame.Path = CStr(dr("Path"))
oGame.AbsolutePath = CBool(dr("AbsolutePath"))
oGame.FolderSave = CBool(dr("FolderSave"))
oGame.AppendTimeStamp = CBool(dr("TimeStamp"))
oGame.BackupLimit = CInt(dr("BackupLimit"))
If Not IsDBNull(dr("FileType")) Then oGame.FileType = CStr(dr("FileType"))
If Not IsDBNull(dr("ExcludeList")) Then oGame.ExcludeList = CStr(dr("ExcludeList"))
oGame.MonitorOnly = CBool(dr("MonitorOnly"))
+40 -12
View File
@@ -202,6 +202,28 @@ Public Class mgrPath
Return sResult
End Function
Public Shared Function CheckSpecialPaths() As Boolean
Dim hshEnvs As New Hashtable
Dim bNoError As Boolean = True
hshEnvs.Add("Documents", Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments))
hshEnvs.Add("AppDataRoaming", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData))
hshEnvs.Add("AppDataLocal", Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData))
If Not mgrCommon.IsUnix Then
hshEnvs.Add("UserData", Environment.GetFolderPath(Environment.SpecialFolder.UserProfile))
hshEnvs.Add("PublicDocuments", Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments))
End If
For Each de As DictionaryEntry In hshEnvs
If de.Value = String.Empty Then
mgrCommon.ShowMessage(mgrPath_SpecialPathError, de.Key, MsgBoxStyle.Critical)
bNoError = False
End If
Next
Return bNoError
End Function
Public Shared Function ReplaceSpecialPaths(sValue As String) As String
Dim sMyDocs As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
Dim sPublicDocs As String = Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments)
@@ -246,39 +268,45 @@ Public Class mgrPath
Public Shared Function ReverseSpecialPaths(sValue As String) As String
Dim sMyDocs As String = "*mydocs*"
Dim sEnvMyDocs As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
Dim sPublicDocs As String = "*publicdocs*"
Dim sAppDataRoaming As String = "*appdatalocal*"
Dim sAppDataLocal As String = "*appdataroaming*"
Dim sEnvPublicDocs As String = Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments)
Dim sAppDataLocal As String = "*appdatalocal*"
Dim sEnvAppDataLocal As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
Dim sAppDataRoaming As String = "*appdataroaming*"
Dim sEnvAppDataRoaming As String = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
Dim sCurrentUser As String = "*currentuser*"
Dim sEnvCurrentUser As String = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)
Dim oCustomVariable As clsPathVariable
For Each oCustomVariable In hshCustomVariables.Values
If sValue.Contains(oCustomVariable.Path) Then
Return sValue.Replace(oCustomVariable.Path, oCustomVariable.FormattedName)
End If
Next
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)) Then
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), sAppDataLocal)
If sValue.Contains(sEnvAppDataRoaming) Then
Return sValue.Replace(sEnvAppDataRoaming, sAppDataRoaming)
End If
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)) Then
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), sAppDataRoaming)
If sValue.Contains(sEnvAppDataLocal) Then
Return sValue.Replace(sEnvAppDataLocal, sAppDataLocal)
End If
'This needs to be tested last for Unix compatability
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)) Then
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), sMyDocs)
If sValue.Contains(sEnvMyDocs) Then
Return sValue.Replace(sEnvMyDocs, sMyDocs)
End If
'Don't use these in Unix
If Not mgrCommon.IsUnix Then
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments)) Then
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments), sPublicDocs)
If sValue.Contains(sEnvPublicDocs) Then
Return sValue.Replace(sEnvPublicDocs, sPublicDocs)
End If
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)) Then
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), sCurrentUser)
If sValue.Contains(sEnvCurrentUser) Then
Return sValue.Replace(sEnvCurrentUser, sCurrentUser)
End If
End If
+1 -1
View File
@@ -19,7 +19,7 @@ Public Class mgrSettings
Private s7zArguments As String = String.Empty
Private s7zLocation As String = String.Empty
Private sBackupFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments).TrimEnd(New Char() {"\", "/"})
Private eSyncFields As clsGame.eOptionalSyncFields = clsGame.eOptionalSyncFields.None Or clsGame.eOptionalSyncFields.TimeStamp
Private eSyncFields As clsGame.eOptionalSyncFields = clsGame.eOptionalSyncFields.None
Private eMessages As eSuppressMessages = eSuppressMessages.None
Private bAutoSaveLog As Boolean = False
Private bBackupOnLaunch As Boolean = True
+2
View File
@@ -33,6 +33,8 @@ Public Class mgrXML
oGame.AbsolutePath = g.AbsolutePath
oGame.Path = g.Path
oGame.FolderSave = g.FolderSave
oGame.AppendTimeStamp = g.AppendTimeStamp
oGame.BackupLimit = g.BackupLimit
oGame.FileType = g.FileType
oGame.ExcludeList = g.ExcludeList
oGame.MonitorOnly = g.MonitorOnly
+2 -2
View File
@@ -33,7 +33,7 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.1.1.*")>
<Assembly: AssemblyFileVersion("1.1.1.0")>
<Assembly: AssemblyVersion("1.1.4.*")>
<Assembly: AssemblyFileVersion("1.1.4.0")>
<Assembly: NeutralResourcesLanguageAttribute("en")>
+38 -11
View File
@@ -2698,7 +2698,7 @@ Namespace My.Resources
End Property
'''<summary>
''' Looks up a localized string similar to Items are semi-colon delimited..
''' Looks up a localized string similar to Items are colon delimited..
'''</summary>
Friend ReadOnly Property frmIncludeExclude_RawEditInfo() As String
Get
@@ -2877,15 +2877,6 @@ Namespace My.Resources
End Get
End Property
'''<summary>
''' Looks up a localized string similar to This tool removes orphaned backup information from the local manifest based on the current backup folder. Data can become orphaned when backups are deleted by various computers that share the same backup folder on a cloud or network.[BR][BR]When alternating between different backup folders you should NOT use this tool.[BR][BR]Do you wish to proceed?.
'''</summary>
Friend ReadOnly Property frmMain_ConfirmManifestClean() As String
Get
Return ResourceManager.GetString("frmMain_ConfirmManifestClean", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Do you wish to cancel the monitoring of [PARAM]?[BR][BR]Warning: When monitoring is cancelled, session time is NOT saved..
'''</summary>
@@ -3084,6 +3075,24 @@ Namespace My.Resources
End Get
End Property
'''<summary>
''' Looks up a localized string similar to An error occured while obtaining the details of the detected game..
'''</summary>
Friend ReadOnly Property frmMain_ErrorGameDetails() As String
Get
Return ResourceManager.GetString("frmMain_ErrorGameDetails", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to An error occured while extracting the executable icon..
'''</summary>
Friend ReadOnly Property frmMain_ErrorGameIcon() As String
Get
Return ResourceManager.GetString("frmMain_ErrorGameIcon", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to An unexpected error occured while initializing GBM.[BR][BR][PARAM][BR][BR]Do you wish to continue anyway? (Not Recommended).
'''</summary>
@@ -5620,7 +5629,7 @@ Namespace My.Resources
End Property
'''<summary>
''' Looks up a localized string similar to The manifest shows the backup folder contains a backup for [PARAM] that has not been restored on this computer.[BR][BR]Do you want to overwrite this file anyway?.
''' Looks up a localized string similar to The manifest shows the backup folder contains a more recent backup for [PARAM] that has not been restored on this computer.[BR][BR]Do you want to overwrite this file anyway?.
'''</summary>
Friend ReadOnly Property mgrBackup_ConfirmManifestConflict() As String
Get
@@ -5637,6 +5646,15 @@ Namespace My.Resources
End Get
End Property
'''<summary>
''' Looks up a localized string similar to A file with the same name already exists in the backup folder.[BR][BR]This game stores saves in a relative location, you may need to restore the current backup if the game was recently re-installed.[BR][BR]Do you want to overwrite this file?.
'''</summary>
Friend ReadOnly Property mgrBackup_ConfirmOverwriteRelative() As String
Get
Return ResourceManager.GetString("mgrBackup_ConfirmOverwriteRelative", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to Backup aborted due to lack of disk space..
'''</summary>
@@ -6051,6 +6069,15 @@ Namespace My.Resources
End Get
End Property
'''<summary>
''' Looks up a localized string similar to An error occured while determining a required system path. [BR][BR]The environment value for [PARAM] is empty.[BR][BR]The application will now exit..
'''</summary>
Friend ReadOnly Property mgrPath_SpecialPathError() As String
Get
Return ResourceManager.GetString("mgrPath_SpecialPathError", resourceCulture)
End Get
End Property
'''<summary>
''' Looks up a localized string similar to [PARAM] backup restored..
'''</summary>
+15 -6
View File
@@ -133,9 +133,6 @@
<data name="frmMain_ManifestTotalRemoved" xml:space="preserve">
<value>[PARAM] entries were removed from the local manifest.</value>
</data>
<data name="frmMain_ConfirmManifestClean" xml:space="preserve">
<value>This tool removes orphaned backup information from the local manifest based on the current backup folder. Data can become orphaned when backups are deleted by various computers that share the same backup folder on a cloud or network.[BR][BR]When alternating between different backup folders you should NOT use this tool.[BR][BR]Do you wish to proceed?</value>
</data>
<data name="frmMain_ConfirmRebuild" xml:space="preserve">
<value>This will rebuild all databases and shrink them to an optimal size.[BR]This should only be used if your gbm.s3db files are becoming very large.[BR][BR]Do you wish to continue?</value>
</data>
@@ -986,7 +983,7 @@
<value>Individual Files</value>
</data>
<data name="frmIncludeExclude_RawEditInfo" xml:space="preserve">
<value>Items are semi-colon delimited.</value>
<value>Items are colon delimited.</value>
</data>
<data name="frmIncludeExclude_RawEditTitle" xml:space="preserve">
<value>[PARAM] Raw Edit</value>
@@ -1283,7 +1280,7 @@
<value>[PARAM] backup completed with warnings.</value>
</data>
<data name="mgrBackup_ConfirmManifestConflict" xml:space="preserve">
<value>The manifest shows the backup folder contains a backup for [PARAM] that has not been restored on this computer.[BR][BR]Do you want to overwrite this file anyway?</value>
<value>The manifest shows the backup folder contains a more recent backup for [PARAM] that has not been restored on this computer.[BR][BR]Do you want to overwrite this file anyway?</value>
</data>
<data name="mgrBackup_ConfirmOverwrite" xml:space="preserve">
<value>A file with the same name already exists in the backup folder.[BR][BR]Do you want to overwrite this file?</value>
@@ -2188,4 +2185,16 @@
<data name="frmSettings_lstSettings_Startup" xml:space="preserve">
<value>Startup</value>
</data>
</root>
<data name="mgrBackup_ConfirmOverwriteRelative" xml:space="preserve">
<value>A file with the same name already exists in the backup folder.[BR][BR]This game stores saves in a relative location, you may need to restore the current backup if the game was recently re-installed.[BR][BR]Do you want to overwrite this file?</value>
</data>
<data name="mgrPath_SpecialPathError" xml:space="preserve">
<value>An error occured while determining a required system path. [BR][BR]The environment value for [PARAM] is empty.[BR][BR]The application will now exit.</value>
</data>
<data name="frmMain_ErrorGameDetails" xml:space="preserve">
<value>An error occured while obtaining the details of the detected game.</value>
</data>
<data name="frmMain_ErrorGameIcon" xml:space="preserve">
<value>An error occured while extracting the executable icon.</value>
</data>
</root>
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB

After

Width:  |  Height:  |  Size: 358 KiB

+14 -6
View File
@@ -1,17 +1,25 @@
Game Backup Monitor v1.1.1 Readme
Game Backup Monitor v1.1.4 Readme
http://mikemaximus.github.io/gbm-web/
gamebackupmonitor@gmail.com
May 4, 2018
August 25th, 2018
New in 1.1.1
New in 1.1.4
All Platforms:
- Spelling error fixed in manual backup message
- Changed method of handling required OS environment paths and added a new path check on startup.
- Incorrect conflict warnings will no longer be shown in some situations when running a backup configuration with "Save Multiple Backups" enabled.
- Fixed the precision of "Total Hours" on the Session Viewer, it now always rounds to 2 decimal places.
Windows Only:
Windows:
- Updated 7-Zip to v18.05
- GBM will no longer keep an open file handle on detected processes and custom icons.
Linux:
- Sorting by "Hours" in the Session Viewer will no longer crash GBM on certain systems.
- GBM no longer attempts to get icons from a Linux binary.
- Removed compression from GBM icon to prevent issues with recent versions of imagemagick.
The entire version history of GBM releases is available at http://mikemaximus.github.io/gbm-web/versionhistory.html
Binary file not shown.
Binary file not shown.
+3 -1
View File
@@ -9,7 +9,9 @@ Game Backup Monitor is a simple, but flexible application that detects games as
**Platform**: Windows (.NET 4) & Linux (Mono)
[About Game Backup Monitor](http://mikemaximus.github.io/gbm-web/about.html) <br />
[Contribute to Game Backup Monitor](http://mikemaximus.github.io/gbm-web/contribute.html) <br />
[Game Backup Monitor FAQ](http://mikemaximus.github.io/gbm-web/faq.html) <br />
[Game Backup Monitor Manual](http://mikemaximus.github.io/gbm-web/manual.html) <br />
[List of Preconfigured Games](http://mikemaximus.github.io/gbm-web/GBM_Official.xml) <br /> <br />
[Preconfigured Windows Games](http://mikemaximus.github.io/gbm-web/GBM_Official.xml) <br />
[Preconfigured Linux Games](http://mikemaximus.github.io/gbm-web/GBM_Official_Linux.xml) <br /> <br />
Updates regarding this project are available via the [Game Backup Monitor web site](http://mikemaximus.github.io/gbm-web/).
+43 -20
View File
@@ -1,22 +1,45 @@
#!/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;
# prepare
if [ -z "${XDG_DATA_HOME}" ]; then
XDG_DATA_HOME="${HOME}/.local/share"
fi
mkdir -p "${XDG_DATA_HOME}/gbm"
pidfile="${XDG_DATA_HOME}/gbm/pid"
# check whether pid file exists and process is running
if ( ! [ -e "${pidfile}" ] || ! pgrep -F "${pidfile}" ); then
# 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
# directory this script is located in
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
# pass our arguments to GBM and run it in background
mono --desktop "${gbmpath}GBM.exe" "$@" &
# store pid and wait for process to end
echo $! > "${pidfile}"
wait $!
rm "${pidfile}"
exit $?;
else
echo "GBM is already running"
exit 1;
fi
mono --desktop ${gbmpath}'GBM.exe' "$@";
exit $?;