Compare commits
84 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8aa35491d | ||
|
|
b7d62f38af | ||
|
|
58e4c3f3f2 | ||
|
|
9d439e3d12 | ||
|
|
9a046bcb4c | ||
|
|
a556fa5da1 | ||
|
|
42726ac0ab | ||
|
|
58ac76eba0 | ||
|
|
f9b325ae67 | ||
|
|
8d82b2efd3 | ||
|
|
cb49434a46 | ||
|
|
f659edff64 | ||
|
|
e325678e76 | ||
|
|
854d2ed537 | ||
|
|
c7e3e62ce1 | ||
|
|
898e72f163 | ||
|
|
333f7ac36a | ||
|
|
ace287f42a | ||
|
|
0f800565fe | ||
|
|
7a4caab5a5 | ||
|
|
c1b81585a0 | ||
|
|
0fcbfbe430 | ||
|
|
26d33206df | ||
|
|
dcbfad7513 | ||
|
|
8ab209c1a9 | ||
|
|
b674e4e82b | ||
|
|
9fc53e74b1 | ||
|
|
fd6ddd4b85 | ||
|
|
8800c4ebf4 | ||
|
|
9b89af931f | ||
|
|
874dfd4c86 | ||
|
|
cc8d16f4a9 | ||
|
|
748a921d1c | ||
|
|
d74a6d50b1 | ||
|
|
7ca4178631 | ||
|
|
63da6eba19 | ||
|
|
3e141cebb5 | ||
|
|
52c9fe506f | ||
|
|
b04c1bc18b | ||
|
|
647193f933 | ||
|
|
e6277f1ae4 | ||
|
|
ccd6d1fd39 | ||
|
|
0ed067e36f | ||
|
|
bca2fe2239 | ||
|
|
fa5d03ef52 | ||
|
|
998a680999 | ||
|
|
f5972da9eb | ||
|
|
794b0f9908 | ||
|
|
daa5f928bf | ||
|
|
72e3ccb661 | ||
|
|
9e7a4b5efc | ||
|
|
692deaaef9 | ||
|
|
a3572abb3d | ||
|
|
2680f857a9 | ||
|
|
1e2f4de816 | ||
|
|
b9b959f96c | ||
|
|
2ae705be18 | ||
|
|
ccade84b65 | ||
|
|
017c5def56 | ||
|
|
1f9dc18c49 | ||
|
|
bc1630a122 | ||
|
|
478721dbd1 | ||
|
|
8ad4810011 | ||
|
|
93bc974cc3 | ||
|
|
c9463c3a36 | ||
|
|
8b2c5f376b | ||
|
|
9e329476a2 | ||
|
|
626fca3e1e | ||
|
|
039f91cd6f | ||
|
|
f98a98af99 | ||
|
|
d9bd7f38f5 | ||
|
|
4e2ab9a0fb | ||
|
|
218ce3f367 | ||
|
|
b3cfab7ee6 | ||
|
|
39440e1f98 | ||
|
|
9b9d3f9125 | ||
|
|
7eab3b8841 | ||
|
|
539009c5de | ||
|
|
01b46107ad | ||
|
|
a5d2ce2255 | ||
|
|
c0764d0c08 | ||
|
|
35ea6fb74b | ||
|
|
a51a7bea89 | ||
|
|
b5f3408261 |
Vendored
+1
-3
@@ -186,6 +186,4 @@ FakesAssemblies/
|
|||||||
GeneratedArtifacts/
|
GeneratedArtifacts/
|
||||||
_Pvt_Extensions/
|
_Pvt_Extensions/
|
||||||
ModelManifest.xml
|
ModelManifest.xml
|
||||||
/.vs/slnx.sqlite
|
/.vs
|
||||||
/.vs/VSWorkspaceState.json
|
|
||||||
/.vs/Game Backup Monitor/v15
|
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
Private sPath As String
|
Private sPath As String
|
||||||
Private bAbsolutePath As Boolean
|
Private bAbsolutePath As Boolean
|
||||||
Private bFolderSave As Boolean
|
Private bFolderSave As Boolean
|
||||||
|
Private bAppendTimeStamp As Boolean
|
||||||
|
Private iBackupLimit As Integer
|
||||||
Private sFileType As String
|
Private sFileType As String
|
||||||
Private sExcludeList As String
|
Private sExcludeList As String
|
||||||
Private bMonitorOnly As Boolean
|
Private bMonitorOnly As Boolean
|
||||||
@@ -76,6 +78,24 @@
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
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
|
Property FileType As String
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
sFileType = value
|
sFileType = value
|
||||||
|
|||||||
@@ -47,6 +47,12 @@
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
ReadOnly Property FileSafeName As String
|
||||||
|
Get
|
||||||
|
Return mgrPath.ValidateFileNameForOS(sName)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Property FileName As String
|
Property FileName As String
|
||||||
Get
|
Get
|
||||||
If mgrCommon.IsUnix Then
|
If mgrCommon.IsUnix Then
|
||||||
|
|||||||
+13
-46
@@ -9,7 +9,7 @@ Public Class clsGame
|
|||||||
Private bFolderSave As Boolean = False
|
Private bFolderSave As Boolean = False
|
||||||
Private sFileType As String = String.Empty
|
Private sFileType As String = String.Empty
|
||||||
Private bAppendTimeStamp As Boolean = False
|
Private bAppendTimeStamp As Boolean = False
|
||||||
Private iBackupLimit As Integer = 2
|
Private iBackupLimit As Integer = 0
|
||||||
Private bCleanFolder As Boolean = False
|
Private bCleanFolder As Boolean = False
|
||||||
Private sExcludeList As String = String.Empty
|
Private sExcludeList As String = String.Empty
|
||||||
Private sProcessPath As String = String.Empty
|
Private sProcessPath As String = String.Empty
|
||||||
@@ -21,7 +21,6 @@ Public Class clsGame
|
|||||||
Private bMonitorOnly As Boolean = False
|
Private bMonitorOnly As Boolean = False
|
||||||
Private sComments As String = String.Empty
|
Private sComments As String = String.Empty
|
||||||
Private bIsRegEx As Boolean = False
|
Private bIsRegEx As Boolean = False
|
||||||
Private bDuplicate As Boolean = False
|
|
||||||
Private oImportTags As New List(Of Tag)
|
Private oImportTags As New List(Of Tag)
|
||||||
Private bImportUpdate As Boolean = False
|
Private bImportUpdate As Boolean = False
|
||||||
|
|
||||||
@@ -31,7 +30,7 @@ Public Class clsGame
|
|||||||
Company = 2
|
Company = 2
|
||||||
Version = 4
|
Version = 4
|
||||||
Icon = 16
|
Icon = 16
|
||||||
TimeStamp = 32
|
Unused = 32 'Do not remove to maintain compatability, re-use for a future field.
|
||||||
MonitorGame = 64
|
MonitorGame = 64
|
||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
@@ -46,12 +45,6 @@ Public Class clsGame
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
ReadOnly Property CompoundKey As String
|
|
||||||
Get
|
|
||||||
Return ProcessName & ":" & ID
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
ReadOnly Property CroppedName As String
|
ReadOnly Property CroppedName As String
|
||||||
Get
|
Get
|
||||||
If Name.Length > 40 Then
|
If Name.Length > 40 Then
|
||||||
@@ -248,27 +241,15 @@ Public Class clsGame
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Property Duplicate As Boolean
|
Property TruePath As String
|
||||||
Get
|
Set(value As String)
|
||||||
Return bDuplicate
|
sPath = value
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
bDuplicate = value
|
|
||||||
End Set
|
End Set
|
||||||
End Property
|
|
||||||
|
|
||||||
ReadOnly Property TruePath As String
|
|
||||||
Get
|
Get
|
||||||
Return sPath
|
Return sPath
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
ReadOnly Property TrueProcess As String
|
|
||||||
Get
|
|
||||||
Return HandleProcessDuplicates()
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Property ImportTags As List(Of Tag)
|
Property ImportTags As List(Of Tag)
|
||||||
Get
|
Get
|
||||||
Return oImportTags
|
Return oImportTags
|
||||||
@@ -340,10 +321,13 @@ Public Class clsGame
|
|||||||
If FolderSave <> oGame.FolderSave Then
|
If FolderSave <> oGame.FolderSave Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
If CleanFolder <> oGame.CleanFolder Then
|
If AppendTimeStamp <> oGame.AppendTimeStamp Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
If AppendTimeStamp <> oGame.AppendTimeStamp Then
|
If BackupLimit <> oGame.BackupLimit Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
If CleanFolder <> oGame.CleanFolder Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
If Hours <> oGame.Hours Then
|
If Hours <> oGame.Hours Then
|
||||||
@@ -380,14 +364,6 @@ Public Class clsGame
|
|||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
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 (eSyncFields And eOptionalSyncFields.Version) = eOptionalSyncFields.Version Then
|
||||||
If Version <> oGame.Version Then
|
If Version <> oGame.Version Then
|
||||||
Return False
|
Return False
|
||||||
@@ -430,6 +406,9 @@ Public Class clsGame
|
|||||||
If FolderSave <> oGame.FolderSave Then
|
If FolderSave <> oGame.FolderSave Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
If AppendTimeStamp <> oGame.AppendTimeStamp Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
If MonitorOnly <> oGame.MonitorOnly Then
|
If MonitorOnly <> oGame.MonitorOnly Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
@@ -459,18 +438,6 @@ Public Class clsGame
|
|||||||
Return DirectCast(Me.MemberwiseClone(), clsGame)
|
Return DirectCast(Me.MemberwiseClone(), clsGame)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function HandleProcessDuplicates() As String
|
|
||||||
Dim sProcessName As String
|
|
||||||
|
|
||||||
'Handle Duplicates
|
|
||||||
sProcessName = Me.ProcessName
|
|
||||||
If Me.Duplicate Then
|
|
||||||
sProcessName = Me.ProcessName.Split(":")(0)
|
|
||||||
End If
|
|
||||||
|
|
||||||
Return sProcessName
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Shared Function SetSyncField(ByVal eSyncFields As eOptionalSyncFields, ByVal eSyncField As eOptionalSyncFields) As eOptionalSyncFields
|
Public Shared Function SetSyncField(ByVal eSyncFields As eOptionalSyncFields, ByVal eSyncField As eOptionalSyncFields) As eOptionalSyncFields
|
||||||
Return eSyncFields Or eSyncField
|
Return eSyncFields Or eSyncField
|
||||||
End Function
|
End Function
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
ReadOnly Property FormattedName As String
|
ReadOnly Property FormattedName As String
|
||||||
Get
|
Get
|
||||||
Return "*" & sVariableName & "*"
|
Return "%" & sVariableName & "%"
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|||||||
@@ -416,7 +416,7 @@ Public Class frmAddWizard
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
sNewPath = mgrCommon.OpenFileBrowser("Wizard_Process_Path", frmAddWizard_ChooseProcess, "exe",
|
sNewPath = mgrCommon.OpenFileBrowser("Wizard_Process_Path", frmAddWizard_ChooseProcess, "exe",
|
||||||
frmAddWizard_Executable, sDefaultFolder, False, False)
|
frmAddWizard_Executable, sDefaultFolder, False)
|
||||||
|
|
||||||
If sNewPath <> String.Empty Then txtProcessPath.Text = sNewPath
|
If sNewPath <> String.Empty Then txtProcessPath.Text = sNewPath
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ Public Class frmAdvancedImport
|
|||||||
Private oImportData As ExportData
|
Private oImportData As ExportData
|
||||||
Private hshImportData As Hashtable
|
Private hshImportData As Hashtable
|
||||||
Private hshFinalData As New Hashtable
|
Private hshFinalData As New Hashtable
|
||||||
|
Private bModWinConfigsForLinux As Boolean
|
||||||
Private bSelectAll As Boolean = True
|
Private bSelectAll As Boolean = True
|
||||||
Private bIsLoading As Boolean = False
|
Private bIsLoading As Boolean = False
|
||||||
Private iCurrentSort As Integer = 0
|
Private iCurrentSort As Integer = 0
|
||||||
@@ -30,6 +31,15 @@ Public Class frmAdvancedImport
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public Property ModWinConfigsForLinux As Boolean
|
||||||
|
Set(value As Boolean)
|
||||||
|
bModWinConfigsForLinux = value
|
||||||
|
End Set
|
||||||
|
Get
|
||||||
|
Return bModWinConfigsForLinux
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property FinalData As Hashtable
|
Public ReadOnly Property FinalData As Hashtable
|
||||||
Get
|
Get
|
||||||
Return hshFinalData
|
Return hshFinalData
|
||||||
@@ -56,6 +66,62 @@ Public Class frmAdvancedImport
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ModTags(ByRef oTags As List(Of Tag))
|
||||||
|
Dim bExists As Boolean
|
||||||
|
Dim oTag As Tag
|
||||||
|
Dim oNewTag As Tag
|
||||||
|
Dim oRemoveTag As New Tag
|
||||||
|
Dim sTag As String
|
||||||
|
Dim sAddTags() As String = {"Wine"}
|
||||||
|
Dim sRemoveTags() As String = {"Official"}
|
||||||
|
|
||||||
|
For Each sTag In sAddTags
|
||||||
|
bExists = False
|
||||||
|
For Each oTag In oTags
|
||||||
|
If oTag.Name = sTag Then
|
||||||
|
bExists = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If Not bExists Then
|
||||||
|
oNewTag = New Tag
|
||||||
|
oNewTag.Name = sTag
|
||||||
|
oTags.Add(oNewTag)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
For Each sTag In sRemoveTags
|
||||||
|
bExists = False
|
||||||
|
For Each oTag In oTags
|
||||||
|
If oTag.Name = sTag Then
|
||||||
|
bExists = True
|
||||||
|
oRemoveTag = oTag
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If bExists Then
|
||||||
|
oTags.Remove(oRemoveTag)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function CheckIgnoreTags(ByVal oTags As List(Of Tag)) As Boolean
|
||||||
|
Dim oTag As Tag
|
||||||
|
Dim sTag As String
|
||||||
|
Dim sIgnoreTags() As String = {"DOSBox", "ScummVM"}
|
||||||
|
|
||||||
|
For Each oTag In oTags
|
||||||
|
For Each sTag In sIgnoreTags
|
||||||
|
If oTag.Name = sTag Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Sub LoadData(Optional ByVal sFilter As String = "", Optional ByVal bAutoDetect As Boolean = False)
|
Private Sub LoadData(Optional ByVal sFilter As String = "", Optional ByVal bAutoDetect As Boolean = False)
|
||||||
Dim oApp As clsGame
|
Dim oApp As clsGame
|
||||||
Dim oListViewItem As ListViewItem
|
Dim oListViewItem As ListViewItem
|
||||||
@@ -75,6 +141,12 @@ Public Class frmAdvancedImport
|
|||||||
For Each de As DictionaryEntry In ImportData
|
For Each de As DictionaryEntry In ImportData
|
||||||
bAddItem = False
|
bAddItem = False
|
||||||
oApp = DirectCast(de.Value, clsGame)
|
oApp = DirectCast(de.Value, clsGame)
|
||||||
|
|
||||||
|
'Run any required tag mods
|
||||||
|
If ModWinConfigsForLinux Then
|
||||||
|
ModTags(oApp.ImportTags)
|
||||||
|
End If
|
||||||
|
|
||||||
sTags = String.Empty
|
sTags = String.Empty
|
||||||
oApp.ImportTags.Sort(AddressOf mgrCommon.CompareImportTagsByName)
|
oApp.ImportTags.Sort(AddressOf mgrCommon.CompareImportTagsByName)
|
||||||
For Each oTag As Tag In oApp.ImportTags
|
For Each oTag As Tag In oApp.ImportTags
|
||||||
@@ -82,7 +154,7 @@ Public Class frmAdvancedImport
|
|||||||
Next
|
Next
|
||||||
sTags = sTags.TrimEnd(New Char() {",", " "})
|
sTags = sTags.TrimEnd(New Char() {",", " "})
|
||||||
|
|
||||||
oListViewItem = New ListViewItem(New String() {oApp.Name, oApp.TrueProcess, sTags})
|
oListViewItem = New ListViewItem(New String() {oApp.Name, oApp.ProcessName, sTags})
|
||||||
oListViewItem.Tag = oApp.ID
|
oListViewItem.Tag = oApp.ID
|
||||||
|
|
||||||
If FinalData.ContainsKey(oApp.ID) Then
|
If FinalData.ContainsKey(oApp.ID) Then
|
||||||
@@ -114,11 +186,16 @@ Public Class frmAdvancedImport
|
|||||||
If sFilter = String.Empty Then
|
If sFilter = String.Empty Then
|
||||||
bAddItem = True
|
bAddItem = True
|
||||||
Else
|
Else
|
||||||
If oApp.Name.ToLower.Contains(sFilter.ToLower) Or oApp.TrueProcess.ToLower.Contains(sFilter.ToLower) Or sTags.ToLower.Contains(sFilter.ToLower) Then
|
If oApp.Name.ToLower.Contains(sFilter.ToLower) Or oApp.ProcessName.ToLower.Contains(sFilter.ToLower) Or sTags.ToLower.Contains(sFilter.ToLower) Then
|
||||||
bAddItem = True
|
bAddItem = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'Check for hardcoded ignore tags
|
||||||
|
If bAddItem And ModWinConfigsForLinux Then
|
||||||
|
bAddItem = CheckIgnoreTags(oApp.ImportTags)
|
||||||
|
End If
|
||||||
|
|
||||||
If bAddItem Then
|
If bAddItem Then
|
||||||
If oListViewItem.Checked Then bResetSelectAll = True
|
If oListViewItem.Checked Then bResetSelectAll = True
|
||||||
lstGames.Items.Add(oListViewItem)
|
lstGames.Items.Add(oListViewItem)
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ Public Class frmChooseGame
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SaveSelection()
|
Private Sub SaveSelection()
|
||||||
oGame.ProcessPath = oProcess.GameInfo.ProcessPath
|
oGame.ProcessPath = oProcess.ProcessPath
|
||||||
mgrMonitorList.DoListUpdate(oGame)
|
mgrMonitorList.DoListUpdate(oGame)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
Generated
+51
-16
@@ -70,6 +70,7 @@ Partial Class frmGameManager
|
|||||||
Me.lblHours = New System.Windows.Forms.Label()
|
Me.lblHours = New System.Windows.Forms.Label()
|
||||||
Me.btnTags = New System.Windows.Forms.Button()
|
Me.btnTags = New System.Windows.Forms.Button()
|
||||||
Me.grpStats = New System.Windows.Forms.GroupBox()
|
Me.grpStats = New System.Windows.Forms.GroupBox()
|
||||||
|
Me.btnImportBackup = New System.Windows.Forms.Button()
|
||||||
Me.cboRemoteBackup = New System.Windows.Forms.ComboBox()
|
Me.cboRemoteBackup = New System.Windows.Forms.ComboBox()
|
||||||
Me.lblRestorePathData = New System.Windows.Forms.Label()
|
Me.lblRestorePathData = New System.Windows.Forms.Label()
|
||||||
Me.lblBackupFileData = New System.Windows.Forms.Label()
|
Me.lblBackupFileData = New System.Windows.Forms.Label()
|
||||||
@@ -96,6 +97,8 @@ Partial Class frmGameManager
|
|||||||
Me.btnExport = New System.Windows.Forms.Button()
|
Me.btnExport = New System.Windows.Forms.Button()
|
||||||
Me.cmsImport = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
Me.cmsImport = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||||
Me.cmsOfficial = New System.Windows.Forms.ToolStripMenuItem()
|
Me.cmsOfficial = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
|
Me.cmsOfficialWindows = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
|
Me.cmsOfficialLinux = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.cmsFile = New System.Windows.Forms.ToolStripMenuItem()
|
Me.cmsFile = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.txtQuickFilter = New System.Windows.Forms.TextBox()
|
Me.txtQuickFilter = New System.Windows.Forms.TextBox()
|
||||||
Me.lblQuickFilter = New System.Windows.Forms.Label()
|
Me.lblQuickFilter = New System.Windows.Forms.Label()
|
||||||
@@ -103,6 +106,7 @@ Partial Class frmGameManager
|
|||||||
Me.cmsDeleteOne = New System.Windows.Forms.ToolStripMenuItem()
|
Me.cmsDeleteOne = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.cmsDeleteAll = New System.Windows.Forms.ToolStripMenuItem()
|
Me.cmsDeleteAll = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.btnProcesses = New System.Windows.Forms.Button()
|
Me.btnProcesses = New System.Windows.Forms.Button()
|
||||||
|
Me.ttFullPath = New System.Windows.Forms.ToolTip(Me.components)
|
||||||
Me.grpConfig.SuspendLayout()
|
Me.grpConfig.SuspendLayout()
|
||||||
CType(Me.nudLimit, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.nudLimit, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
Me.grpExtra.SuspendLayout()
|
Me.grpExtra.SuspendLayout()
|
||||||
@@ -142,7 +146,7 @@ Partial Class frmGameManager
|
|||||||
Me.btnBackup.Location = New System.Drawing.Point(616, 626)
|
Me.btnBackup.Location = New System.Drawing.Point(616, 626)
|
||||||
Me.btnBackup.Name = "btnBackup"
|
Me.btnBackup.Name = "btnBackup"
|
||||||
Me.btnBackup.Size = New System.Drawing.Size(75, 23)
|
Me.btnBackup.Size = New System.Drawing.Size(75, 23)
|
||||||
Me.btnBackup.TabIndex = 18
|
Me.btnBackup.TabIndex = 19
|
||||||
Me.btnBackup.Text = "&Backup"
|
Me.btnBackup.Text = "&Backup"
|
||||||
Me.btnBackup.UseVisualStyleBackColor = True
|
Me.btnBackup.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
@@ -152,7 +156,7 @@ Partial Class frmGameManager
|
|||||||
Me.btnClose.Location = New System.Drawing.Point(697, 626)
|
Me.btnClose.Location = New System.Drawing.Point(697, 626)
|
||||||
Me.btnClose.Name = "btnClose"
|
Me.btnClose.Name = "btnClose"
|
||||||
Me.btnClose.Size = New System.Drawing.Size(75, 23)
|
Me.btnClose.Size = New System.Drawing.Size(75, 23)
|
||||||
Me.btnClose.TabIndex = 19
|
Me.btnClose.TabIndex = 20
|
||||||
Me.btnClose.Text = "C&lose"
|
Me.btnClose.Text = "C&lose"
|
||||||
Me.btnClose.UseVisualStyleBackColor = True
|
Me.btnClose.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
@@ -267,11 +271,9 @@ Partial Class frmGameManager
|
|||||||
'nudLimit
|
'nudLimit
|
||||||
'
|
'
|
||||||
Me.nudLimit.Location = New System.Drawing.Point(330, 155)
|
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.Name = "nudLimit"
|
||||||
Me.nudLimit.Size = New System.Drawing.Size(40, 20)
|
Me.nudLimit.Size = New System.Drawing.Size(40, 20)
|
||||||
Me.nudLimit.TabIndex = 17
|
Me.nudLimit.TabIndex = 17
|
||||||
Me.nudLimit.Value = New Decimal(New Integer() {2, 0, 0, 0})
|
|
||||||
Me.nudLimit.Visible = False
|
Me.nudLimit.Visible = False
|
||||||
'
|
'
|
||||||
'btnExclude
|
'btnExclude
|
||||||
@@ -289,7 +291,7 @@ Partial Class frmGameManager
|
|||||||
Me.btnInclude.Name = "btnInclude"
|
Me.btnInclude.Name = "btnInclude"
|
||||||
Me.btnInclude.Size = New System.Drawing.Size(175, 23)
|
Me.btnInclude.Size = New System.Drawing.Size(175, 23)
|
||||||
Me.btnInclude.TabIndex = 12
|
Me.btnInclude.TabIndex = 12
|
||||||
Me.btnInclude.Text = "In&clude Items..."
|
Me.btnInclude.Text = "Incl&ude Items..."
|
||||||
Me.btnInclude.UseVisualStyleBackColor = True
|
Me.btnInclude.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
'txtID
|
'txtID
|
||||||
@@ -567,13 +569,14 @@ Partial Class frmGameManager
|
|||||||
Me.btnTags.Location = New System.Drawing.Point(535, 437)
|
Me.btnTags.Location = New System.Drawing.Point(535, 437)
|
||||||
Me.btnTags.Name = "btnTags"
|
Me.btnTags.Name = "btnTags"
|
||||||
Me.btnTags.Size = New System.Drawing.Size(75, 23)
|
Me.btnTags.Size = New System.Drawing.Size(75, 23)
|
||||||
Me.btnTags.TabIndex = 12
|
Me.btnTags.TabIndex = 13
|
||||||
Me.btnTags.Text = "Tags..."
|
Me.btnTags.Text = "&Tags..."
|
||||||
Me.btnTags.UseVisualStyleBackColor = True
|
Me.btnTags.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
'grpStats
|
'grpStats
|
||||||
'
|
'
|
||||||
Me.grpStats.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
Me.grpStats.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||||
|
Me.grpStats.Controls.Add(Me.btnImportBackup)
|
||||||
Me.grpStats.Controls.Add(Me.cboRemoteBackup)
|
Me.grpStats.Controls.Add(Me.cboRemoteBackup)
|
||||||
Me.grpStats.Controls.Add(Me.lblRestorePathData)
|
Me.grpStats.Controls.Add(Me.lblRestorePathData)
|
||||||
Me.grpStats.Controls.Add(Me.lblBackupFileData)
|
Me.grpStats.Controls.Add(Me.lblBackupFileData)
|
||||||
@@ -588,10 +591,19 @@ Partial Class frmGameManager
|
|||||||
Me.grpStats.Location = New System.Drawing.Point(248, 466)
|
Me.grpStats.Location = New System.Drawing.Point(248, 466)
|
||||||
Me.grpStats.Name = "grpStats"
|
Me.grpStats.Name = "grpStats"
|
||||||
Me.grpStats.Size = New System.Drawing.Size(525, 154)
|
Me.grpStats.Size = New System.Drawing.Size(525, 154)
|
||||||
Me.grpStats.TabIndex = 15
|
Me.grpStats.TabIndex = 16
|
||||||
Me.grpStats.TabStop = False
|
Me.grpStats.TabStop = False
|
||||||
Me.grpStats.Text = "Backup Information"
|
Me.grpStats.Text = "Backup Information"
|
||||||
'
|
'
|
||||||
|
'btnImportBackup
|
||||||
|
'
|
||||||
|
Me.btnImportBackup.Location = New System.Drawing.Point(9, 125)
|
||||||
|
Me.btnImportBackup.Name = "btnImportBackup"
|
||||||
|
Me.btnImportBackup.Size = New System.Drawing.Size(114, 23)
|
||||||
|
Me.btnImportBackup.TabIndex = 8
|
||||||
|
Me.btnImportBackup.Text = "Import B&ackup Files"
|
||||||
|
Me.btnImportBackup.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
'cboRemoteBackup
|
'cboRemoteBackup
|
||||||
'
|
'
|
||||||
Me.cboRemoteBackup.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
Me.cboRemoteBackup.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||||
@@ -666,7 +678,7 @@ Partial Class frmGameManager
|
|||||||
Me.btnDeleteBackup.Location = New System.Drawing.Point(129, 125)
|
Me.btnDeleteBackup.Location = New System.Drawing.Point(129, 125)
|
||||||
Me.btnDeleteBackup.Name = "btnDeleteBackup"
|
Me.btnDeleteBackup.Name = "btnDeleteBackup"
|
||||||
Me.btnDeleteBackup.Size = New System.Drawing.Size(114, 23)
|
Me.btnDeleteBackup.Size = New System.Drawing.Size(114, 23)
|
||||||
Me.btnDeleteBackup.TabIndex = 8
|
Me.btnDeleteBackup.TabIndex = 9
|
||||||
Me.btnDeleteBackup.Text = "&Delete Backup"
|
Me.btnDeleteBackup.Text = "&Delete Backup"
|
||||||
Me.btnDeleteBackup.UseVisualStyleBackColor = True
|
Me.btnDeleteBackup.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
@@ -703,7 +715,7 @@ Partial Class frmGameManager
|
|||||||
Me.btnMarkAsRestored.Location = New System.Drawing.Point(429, 626)
|
Me.btnMarkAsRestored.Location = New System.Drawing.Point(429, 626)
|
||||||
Me.btnMarkAsRestored.Name = "btnMarkAsRestored"
|
Me.btnMarkAsRestored.Name = "btnMarkAsRestored"
|
||||||
Me.btnMarkAsRestored.Size = New System.Drawing.Size(100, 23)
|
Me.btnMarkAsRestored.Size = New System.Drawing.Size(100, 23)
|
||||||
Me.btnMarkAsRestored.TabIndex = 16
|
Me.btnMarkAsRestored.TabIndex = 17
|
||||||
Me.btnMarkAsRestored.Text = "&Mark as Restored"
|
Me.btnMarkAsRestored.Text = "&Mark as Restored"
|
||||||
Me.btnMarkAsRestored.UseVisualStyleBackColor = True
|
Me.btnMarkAsRestored.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
@@ -713,7 +725,7 @@ Partial Class frmGameManager
|
|||||||
Me.btnRestore.Location = New System.Drawing.Point(535, 626)
|
Me.btnRestore.Location = New System.Drawing.Point(535, 626)
|
||||||
Me.btnRestore.Name = "btnRestore"
|
Me.btnRestore.Name = "btnRestore"
|
||||||
Me.btnRestore.Size = New System.Drawing.Size(75, 23)
|
Me.btnRestore.Size = New System.Drawing.Size(75, 23)
|
||||||
Me.btnRestore.TabIndex = 17
|
Me.btnRestore.TabIndex = 18
|
||||||
Me.btnRestore.Text = "&Restore"
|
Me.btnRestore.Text = "&Restore"
|
||||||
Me.btnRestore.UseVisualStyleBackColor = True
|
Me.btnRestore.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
@@ -723,7 +735,7 @@ Partial Class frmGameManager
|
|||||||
Me.btnSave.Location = New System.Drawing.Point(616, 437)
|
Me.btnSave.Location = New System.Drawing.Point(616, 437)
|
||||||
Me.btnSave.Name = "btnSave"
|
Me.btnSave.Name = "btnSave"
|
||||||
Me.btnSave.Size = New System.Drawing.Size(75, 23)
|
Me.btnSave.Size = New System.Drawing.Size(75, 23)
|
||||||
Me.btnSave.TabIndex = 13
|
Me.btnSave.TabIndex = 14
|
||||||
Me.btnSave.Text = "&Save"
|
Me.btnSave.Text = "&Save"
|
||||||
Me.btnSave.UseVisualStyleBackColor = True
|
Me.btnSave.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
@@ -742,8 +754,8 @@ Partial Class frmGameManager
|
|||||||
Me.btnCancel.Location = New System.Drawing.Point(697, 437)
|
Me.btnCancel.Location = New System.Drawing.Point(697, 437)
|
||||||
Me.btnCancel.Name = "btnCancel"
|
Me.btnCancel.Name = "btnCancel"
|
||||||
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
|
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
|
||||||
Me.btnCancel.TabIndex = 14
|
Me.btnCancel.TabIndex = 15
|
||||||
Me.btnCancel.Text = "&Cancel"
|
Me.btnCancel.Text = "Ca&ncel"
|
||||||
Me.btnCancel.UseVisualStyleBackColor = True
|
Me.btnCancel.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
'chkEnabled
|
'chkEnabled
|
||||||
@@ -840,10 +852,23 @@ Partial Class frmGameManager
|
|||||||
'
|
'
|
||||||
'cmsOfficial
|
'cmsOfficial
|
||||||
'
|
'
|
||||||
|
Me.cmsOfficial.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.cmsOfficialWindows, Me.cmsOfficialLinux})
|
||||||
Me.cmsOfficial.Name = "cmsOfficial"
|
Me.cmsOfficial.Name = "cmsOfficial"
|
||||||
Me.cmsOfficial.Size = New System.Drawing.Size(117, 22)
|
Me.cmsOfficial.Size = New System.Drawing.Size(117, 22)
|
||||||
Me.cmsOfficial.Text = "&Official List..."
|
Me.cmsOfficial.Text = "&Official List..."
|
||||||
'
|
'
|
||||||
|
'cmsOfficialWindows
|
||||||
|
'
|
||||||
|
Me.cmsOfficialWindows.Name = "cmsOfficialWindows"
|
||||||
|
Me.cmsOfficialWindows.Size = New System.Drawing.Size(180, 22)
|
||||||
|
Me.cmsOfficialWindows.Text = "&Windows..."
|
||||||
|
'
|
||||||
|
'cmsOfficialLinux
|
||||||
|
'
|
||||||
|
Me.cmsOfficialLinux.Name = "cmsOfficialLinux"
|
||||||
|
Me.cmsOfficialLinux.Size = New System.Drawing.Size(180, 22)
|
||||||
|
Me.cmsOfficialLinux.Text = "&Linux..."
|
||||||
|
'
|
||||||
'cmsFile
|
'cmsFile
|
||||||
'
|
'
|
||||||
Me.cmsFile.Name = "cmsFile"
|
Me.cmsFile.Name = "cmsFile"
|
||||||
@@ -890,10 +915,16 @@ Partial Class frmGameManager
|
|||||||
Me.btnProcesses.Location = New System.Drawing.Point(454, 437)
|
Me.btnProcesses.Location = New System.Drawing.Point(454, 437)
|
||||||
Me.btnProcesses.Name = "btnProcesses"
|
Me.btnProcesses.Name = "btnProcesses"
|
||||||
Me.btnProcesses.Size = New System.Drawing.Size(75, 23)
|
Me.btnProcesses.Size = New System.Drawing.Size(75, 23)
|
||||||
Me.btnProcesses.TabIndex = 20
|
Me.btnProcesses.TabIndex = 12
|
||||||
Me.btnProcesses.Text = "Processes..."
|
Me.btnProcesses.Text = "Pro&cesses..."
|
||||||
Me.btnProcesses.UseVisualStyleBackColor = True
|
Me.btnProcesses.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
|
'ttFullPath
|
||||||
|
'
|
||||||
|
Me.ttFullPath.AutoPopDelay = 5000
|
||||||
|
Me.ttFullPath.InitialDelay = 300
|
||||||
|
Me.ttFullPath.ReshowDelay = 60
|
||||||
|
'
|
||||||
'frmGameManager
|
'frmGameManager
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
@@ -1024,4 +1055,8 @@ Partial Class frmGameManager
|
|||||||
Friend WithEvents chkRegEx As CheckBox
|
Friend WithEvents chkRegEx As CheckBox
|
||||||
Friend WithEvents btnGameID As Button
|
Friend WithEvents btnGameID As Button
|
||||||
Friend WithEvents btnProcesses As Button
|
Friend WithEvents btnProcesses As Button
|
||||||
|
Friend WithEvents ttFullPath As ToolTip
|
||||||
|
Friend WithEvents btnImportBackup As Button
|
||||||
|
Friend WithEvents cmsOfficialWindows As ToolStripMenuItem
|
||||||
|
Friend WithEvents cmsOfficialLinux As ToolStripMenuItem
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -123,4 +123,7 @@
|
|||||||
<metadata name="cmsDeleteBackup.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="cmsDeleteBackup.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>127, 17</value>
|
<value>127, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="ttFullPath.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>275, 17</value>
|
||||||
|
</metadata>
|
||||||
</root>
|
</root>
|
||||||
+299
-91
@@ -14,8 +14,10 @@ Public Class frmGameManager
|
|||||||
Private bDisableExternalFunctions As Boolean = False
|
Private bDisableExternalFunctions As Boolean = False
|
||||||
Private bTriggerBackup As Boolean = False
|
Private bTriggerBackup As Boolean = False
|
||||||
Private bTriggerRestore As Boolean = False
|
Private bTriggerRestore As Boolean = False
|
||||||
|
Private bTriggerImportBackup As Boolean = False
|
||||||
Private oBackupList As New List(Of clsGame)
|
Private oBackupList As New List(Of clsGame)
|
||||||
Private oRestoreList As New Hashtable
|
Private oRestoreList As New Hashtable
|
||||||
|
Private oImportBackupList As New Hashtable
|
||||||
Private oGameData As OrderedDictionary
|
Private oGameData As OrderedDictionary
|
||||||
Private oLocalBackupData As SortedList
|
Private oLocalBackupData As SortedList
|
||||||
Private oRemoteBackupData As SortedList
|
Private oRemoteBackupData As SortedList
|
||||||
@@ -121,6 +123,15 @@ Public Class frmGameManager
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Property TriggerImportBackup As Boolean
|
||||||
|
Get
|
||||||
|
Return bTriggerImportBackup
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
bTriggerImportBackup = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Property BackupList As List(Of clsGame)
|
Property BackupList As List(Of clsGame)
|
||||||
Get
|
Get
|
||||||
Return oBackupList
|
Return oBackupList
|
||||||
@@ -139,6 +150,15 @@ Public Class frmGameManager
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Property ImportBackupList As Hashtable
|
||||||
|
Get
|
||||||
|
Return oImportBackupList
|
||||||
|
End Get
|
||||||
|
Set(value As Hashtable)
|
||||||
|
oImportBackupList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private Property IsDirty As Boolean
|
Private Property IsDirty As Boolean
|
||||||
Get
|
Get
|
||||||
Return bIsDirty
|
Return bIsDirty
|
||||||
@@ -162,69 +182,105 @@ Public Class frmGameManager
|
|||||||
oLocalBackupData = mgrManifest.ReadLatestManifest(mgrSQLite.Database.Local)
|
oLocalBackupData = mgrManifest.ReadLatestManifest(mgrSQLite.Database.Local)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function ConvertToRelativePath(ByVal sSavePath As String, ByVal sAppPath As String) As String
|
Private Function HandleSavePath(ByVal sSavePath As String, ByVal sAppPath As String) As String
|
||||||
Dim sPath As String = sSavePath
|
Dim sPath As String = sSavePath
|
||||||
|
|
||||||
'Determine a relative path if possible
|
If Not mgrPath.IsAbsolute(sSavePath) Then
|
||||||
If sAppPath <> String.Empty And sSavePath <> String.Empty Then
|
'Determine a relative path if possible
|
||||||
If Not mgrPath.IsAbsolute(sSavePath) Then
|
If sAppPath <> String.Empty And sSavePath <> String.Empty Then
|
||||||
sPath = mgrPath.DetermineRelativePath(sAppPath, sSavePath)
|
sPath = mgrPath.DetermineRelativePath(sAppPath, sSavePath)
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
If Not oSettings.ShowResolvedPaths Then
|
||||||
|
sPath = mgrPath.ReverseSpecialPaths(sPath)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return sPath
|
Return sPath
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub CheckManifestandUpdate(ByVal oOriginalApp As clsGame, ByVal oNewApp As clsGame)
|
Private Function CheckManifestandUpdate(ByVal oOriginalApp As clsGame, ByVal oNewApp As clsGame, ByVal bUseGameID As Boolean) As Boolean
|
||||||
Dim oBackupItems As List(Of clsBackup)
|
Dim oBackupItems As List(Of clsBackup)
|
||||||
Dim sDirectory As String
|
Dim sDirectory As String
|
||||||
Dim sNewDirectory As String
|
Dim sNewDirectory As String
|
||||||
Dim sFileName As String
|
Dim sFileName As String
|
||||||
Dim sNewFileName 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
|
||||||
|
|
||||||
|
'Remote
|
||||||
|
If mgrManifest.DoManifestCheck(oOriginalApp.ID, mgrSQLite.Database.Remote) Then
|
||||||
|
|
||||||
|
'Check for existing folder
|
||||||
|
sDirectory = BackupFolder & sOriginalAppItem
|
||||||
|
sNewDirectory = sDirectory.Replace(sOriginalAppItem, sNewAppItem)
|
||||||
|
If Directory.Exists(sNewDirectory) Then
|
||||||
|
If mgrCommon.ShowMessage(frmGameManager_ErrorRenameFolderExists, New String() {sDirectory, sNewDirectory}, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
|
mgrCommon.DeleteDirectory(sNewDirectory, True)
|
||||||
|
Else
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
oBackupItems = mgrManifest.DoManifestGetByMonitorID(oOriginalApp.ID, mgrSQLite.Database.Remote)
|
||||||
|
|
||||||
|
'Check for existing files
|
||||||
|
For Each oBackupItem As clsBackup In oBackupItems
|
||||||
|
sFileName = BackupFolder & oBackupItem.FileName
|
||||||
|
sNewFileName = Path.GetDirectoryName(sFileName) & Path.DirectorySeparatorChar & Path.GetFileName(sFileName).Replace(sOriginalAppItem, sNewAppItem)
|
||||||
|
If File.Exists(sNewFileName) Then
|
||||||
|
If mgrCommon.ShowMessage(frmGameManager_ErrorRenameFilesExist, New String() {sOriginalAppItem, sNewAppItem}, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
'Rename files
|
||||||
|
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
|
||||||
|
If File.Exists(sNewFileName) Then mgrCommon.DeleteFile(sNewFileName)
|
||||||
|
FileSystem.Rename(sFileName, sNewFileName)
|
||||||
|
End If
|
||||||
|
oBackupItem.MonitorID = oNewApp.ID
|
||||||
|
oBackupItem.FileName = oBackupItem.FileName.Replace(sOriginalAppItem, sNewAppItem)
|
||||||
|
mgrManifest.DoManifestUpdateByManifestID(oBackupItem, mgrSQLite.Database.Remote)
|
||||||
|
Next
|
||||||
|
|
||||||
|
'Rename folder
|
||||||
|
If Directory.Exists(sDirectory) And Not sDirectory = sNewDirectory Then
|
||||||
|
FileSystem.Rename(sDirectory, sNewDirectory)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
'If there is an ID change, check and update the manifest
|
|
||||||
If oNewApp.ID <> oOriginalApp.ID Then
|
|
||||||
'Local
|
'Local
|
||||||
If mgrManifest.DoManifestCheck(oOriginalApp.ID, mgrSQLite.Database.Local) Then
|
If mgrManifest.DoManifestCheck(oOriginalApp.ID, mgrSQLite.Database.Local) Then
|
||||||
oBackupItems = mgrManifest.DoManifestGetByMonitorID(oOriginalApp.ID, mgrSQLite.Database.Local)
|
oBackupItems = mgrManifest.DoManifestGetByMonitorID(oOriginalApp.ID, mgrSQLite.Database.Local)
|
||||||
'The local manifest will only have one entry per game, therefore this runs only once
|
'The local manifest will only have one entry per game, therefore this runs only once
|
||||||
For Each oBackupItem As clsBackup In oBackupItems
|
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.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)
|
mgrManifest.DoManifestUpdateByManifestID(oBackupItem, mgrSQLite.Database.Local)
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Remote
|
|
||||||
If mgrManifest.DoManifestCheck(oOriginalApp.ID, mgrSQLite.Database.Remote) Then
|
|
||||||
oBackupItems = mgrManifest.DoManifestGetByMonitorID(oOriginalApp.ID, mgrSQLite.Database.Remote)
|
|
||||||
|
|
||||||
For Each oBackupItem As clsBackup In oBackupItems
|
|
||||||
oBackupItem.MonitorID = oNewApp.ID
|
|
||||||
oBackupItem.FileName = oBackupItem.FileName.Replace(oOriginalApp.ID, oNewApp.ID)
|
|
||||||
mgrManifest.DoManifestUpdateByManifestID(oBackupItem, mgrSQLite.Database.Remote)
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Sub LoadData(Optional ByVal bRetainFilter As Boolean = True)
|
Private Sub LoadData(Optional ByVal bRetainFilter As Boolean = True)
|
||||||
Dim oRestoreData As New SortedList
|
Dim oRestoreData As New SortedList
|
||||||
@@ -308,7 +364,7 @@ Public Class frmGameManager
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
sNewPath = mgrCommon.OpenFileBrowser("GM_Process", frmGameManager_ChooseExe, "exe",
|
sNewPath = mgrCommon.OpenFileBrowser("GM_Process", frmGameManager_ChooseExe, "exe",
|
||||||
frmGameManager_Executable, sDefaultFolder, False, False)
|
frmGameManager_Executable, sDefaultFolder, False)
|
||||||
|
|
||||||
If sNewPath <> String.Empty Then
|
If sNewPath <> String.Empty Then
|
||||||
txtAppPath.Text = Path.GetDirectoryName(sNewPath)
|
txtAppPath.Text = Path.GetDirectoryName(sNewPath)
|
||||||
@@ -348,7 +404,7 @@ Public Class frmGameManager
|
|||||||
|
|
||||||
If sNewPath <> String.Empty Then
|
If sNewPath <> String.Empty Then
|
||||||
txtSavePath.Text = sNewPath
|
txtSavePath.Text = sNewPath
|
||||||
txtSavePath.Text = ConvertToRelativePath(txtSavePath.Text, txtAppPath.Text)
|
txtSavePath.Text = HandleSavePath(txtSavePath.Text, txtAppPath.Text)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -366,16 +422,16 @@ Public Class frmGameManager
|
|||||||
'Unix Handler
|
'Unix Handler
|
||||||
If Not mgrCommon.IsUnix Then
|
If Not mgrCommon.IsUnix Then
|
||||||
sNewPath = mgrCommon.OpenFileBrowser("GM_Icon", frmGameManager_ChooseCustomIcon, "ico",
|
sNewPath = mgrCommon.OpenFileBrowser("GM_Icon", frmGameManager_ChooseCustomIcon, "ico",
|
||||||
frmGameManager_Icon, sDefaultFolder, False, False)
|
frmGameManager_Icon, sDefaultFolder, False)
|
||||||
Else
|
Else
|
||||||
sNewPath = mgrCommon.OpenFileBrowser("GM_Icon", frmGameManager_ChooseCustomIcon, "png",
|
sNewPath = mgrCommon.OpenFileBrowser("GM_Icon", frmGameManager_ChooseCustomIcon, "png",
|
||||||
"PNG", sDefaultFolder, False, False)
|
"PNG", sDefaultFolder, False)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If sNewPath <> String.Empty Then
|
If sNewPath <> String.Empty Then
|
||||||
txtIcon.Text = sNewPath
|
txtIcon.Text = sNewPath
|
||||||
If IO.File.Exists(sNewPath) Then
|
If IO.File.Exists(sNewPath) Then
|
||||||
pbIcon.Image = Image.FromFile(sNewPath)
|
pbIcon.Image = mgrCommon.SafeIconFromFile(sNewPath)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -505,15 +561,18 @@ Public Class frmGameManager
|
|||||||
|
|
||||||
Private Function GetBuilderRoot() As String
|
Private Function GetBuilderRoot() As String
|
||||||
Dim sRoot As String = String.Empty
|
Dim sRoot As String = String.Empty
|
||||||
|
Dim sPath As String = txtSavePath.Text
|
||||||
|
|
||||||
If Path.IsPathRooted(txtSavePath.Text) Then
|
If Not Settings.ShowResolvedPaths Then sPath = mgrPath.ReplaceSpecialPaths(txtSavePath.Text)
|
||||||
If Directory.Exists(txtSavePath.Text) Then
|
|
||||||
sRoot = txtSavePath.Text
|
If Path.IsPathRooted(sPath) Then
|
||||||
|
If Directory.Exists(sPath) Then
|
||||||
|
sRoot = sPath
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If txtAppPath.Text <> String.Empty Then
|
If txtAppPath.Text <> String.Empty Then
|
||||||
If Directory.Exists(txtAppPath.Text & Path.DirectorySeparatorChar & txtSavePath.Text) Then
|
If Directory.Exists(txtAppPath.Text & Path.DirectorySeparatorChar & sPath) Then
|
||||||
sRoot = txtAppPath.Text & Path.DirectorySeparatorChar & txtSavePath.Text
|
sRoot = txtAppPath.Text & Path.DirectorySeparatorChar & sPath
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -542,7 +601,7 @@ Public Class frmGameManager
|
|||||||
If CurrentGame.ProcessPath <> String.Empty Then
|
If CurrentGame.ProcessPath <> String.Empty Then
|
||||||
CurrentBackupItem.RelativeRestorePath = CurrentGame.ProcessPath & Path.DirectorySeparatorChar & CurrentBackupItem.RestorePath
|
CurrentBackupItem.RelativeRestorePath = CurrentGame.ProcessPath & Path.DirectorySeparatorChar & CurrentBackupItem.RestorePath
|
||||||
Else
|
Else
|
||||||
sProcess = CurrentGame.TrueProcess
|
sProcess = CurrentGame.ProcessName
|
||||||
If mgrCommon.IsProcessNotSearchable(CurrentGame) Then bNoAuto = True
|
If mgrCommon.IsProcessNotSearchable(CurrentGame) Then bNoAuto = True
|
||||||
sRestorePath = mgrPath.ProcessPathSearch(CurrentBackupItem.Name, sProcess, mgrCommon.FormatString(frmGameManager_ErrorPathNotSet, CurrentBackupItem.Name), bNoAuto)
|
sRestorePath = mgrPath.ProcessPathSearch(CurrentBackupItem.Name, sProcess, mgrCommon.FormatString(frmGameManager_ErrorPathNotSet, CurrentBackupItem.Name), bNoAuto)
|
||||||
|
|
||||||
@@ -656,23 +715,51 @@ Public Class frmGameManager
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub UpdateBackupInfo(ByVal sManifestID As String)
|
Public Sub VerifyBackups(ByVal oApp As clsGame)
|
||||||
Dim sFileName As String
|
Dim oCurrentBackup As clsBackup
|
||||||
|
Dim oCurrentBackups As List(Of clsBackup)
|
||||||
|
Dim oBackupsRemoved As New List(Of clsBackup)
|
||||||
|
|
||||||
If sManifestID <> String.Empty Then
|
oCurrentBackups = mgrManifest.DoManifestGetByMonitorID(oApp.ID, mgrSQLite.Database.Remote)
|
||||||
CurrentBackupItem = mgrManifest.DoManifestGetByManifestID(sManifestID, mgrSQLite.Database.Remote)
|
|
||||||
|
|
||||||
sFileName = BackupFolder & CurrentBackupItem.FileName
|
Cursor.Current = Cursors.WaitCursor
|
||||||
|
|
||||||
If File.Exists(sFileName) Then
|
For Each oCurrentBackup In oCurrentBackups
|
||||||
lblBackupFileData.Text = Path.GetFileName(CurrentBackupItem.FileName) & " (" & mgrCommon.FormatDiskSpace(mgrCommon.GetFileSize(sFileName)) & ")"
|
If Not File.Exists(BackupFolder & oCurrentBackup.FileName) Then
|
||||||
Else
|
oBackupsRemoved.Add(oCurrentBackup)
|
||||||
lblBackupFileData.Text = frmGameManager_ErrorNoBackupExists
|
mgrManifest.DoManifestDeleteByManifestID(oCurrentBackup, mgrSQLite.Database.Remote)
|
||||||
End If
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
lblRestorePathData.Text = CurrentBackupItem.RestorePath
|
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
|
End If
|
||||||
|
|
||||||
|
Cursor.Current = Cursors.Default
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SetBackupRestorePath(ByVal oApp As clsGame)
|
||||||
|
Dim sttRestorePath As String
|
||||||
|
|
||||||
|
If Not CurrentBackupItem.AbsolutePath And oApp.ProcessPath <> String.Empty Then
|
||||||
|
lblRestorePathData.Text = oApp.ProcessPath & Path.DirectorySeparatorChar & CurrentBackupItem.RestorePath
|
||||||
|
Else
|
||||||
|
If oSettings.ShowResolvedPaths Then
|
||||||
|
lblRestorePathData.Text = CurrentBackupItem.RestorePath
|
||||||
|
sttRestorePath = CurrentBackupItem.TruePath
|
||||||
|
Else
|
||||||
|
lblRestorePathData.Text = CurrentBackupItem.TruePath
|
||||||
|
sttRestorePath = CurrentBackupItem.RestorePath
|
||||||
|
End If
|
||||||
|
If CurrentBackupItem.AbsolutePath Then ttFullPath.SetToolTip(lblRestorePathData, sttRestorePath)
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub GetBackupInfo(ByVal oApp As clsGame)
|
Private Sub GetBackupInfo(ByVal oApp As clsGame)
|
||||||
@@ -684,6 +771,7 @@ Public Class frmGameManager
|
|||||||
Dim bLocalData As Boolean = False
|
Dim bLocalData As Boolean = False
|
||||||
Dim bRemoteData As Boolean = False
|
Dim bRemoteData As Boolean = False
|
||||||
|
|
||||||
|
|
||||||
'cboRemoteBackup
|
'cboRemoteBackup
|
||||||
cboRemoteBackup.ValueMember = "Key"
|
cboRemoteBackup.ValueMember = "Key"
|
||||||
cboRemoteBackup.DisplayMember = "Value"
|
cboRemoteBackup.DisplayMember = "Value"
|
||||||
@@ -711,7 +799,7 @@ Public Class frmGameManager
|
|||||||
lblBackupFileData.Text = frmGameManager_ErrorNoBackupExists
|
lblBackupFileData.Text = frmGameManager_ErrorNoBackupExists
|
||||||
End If
|
End If
|
||||||
|
|
||||||
lblRestorePathData.Text = CurrentBackupItem.RestorePath
|
SetBackupRestorePath(oApp)
|
||||||
Else
|
Else
|
||||||
oComboItems.Add(New KeyValuePair(Of String, String)(String.Empty, frmGameManager_None))
|
oComboItems.Add(New KeyValuePair(Of String, String)(String.Empty, frmGameManager_None))
|
||||||
lblBackupFileData.Text = String.Empty
|
lblBackupFileData.Text = String.Empty
|
||||||
@@ -748,6 +836,24 @@ Public Class frmGameManager
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub UpdateBackupInfo(ByVal sManifestID As String)
|
||||||
|
Dim sFileName As String
|
||||||
|
|
||||||
|
If sManifestID <> String.Empty Then
|
||||||
|
CurrentBackupItem = mgrManifest.DoManifestGetByManifestID(sManifestID, mgrSQLite.Database.Remote)
|
||||||
|
|
||||||
|
sFileName = BackupFolder & CurrentBackupItem.FileName
|
||||||
|
|
||||||
|
If File.Exists(sFileName) Then
|
||||||
|
lblBackupFileData.Text = Path.GetFileName(CurrentBackupItem.FileName) & " (" & mgrCommon.FormatDiskSpace(mgrCommon.GetFileSize(sFileName)) & ")"
|
||||||
|
Else
|
||||||
|
lblBackupFileData.Text = frmGameManager_ErrorNoBackupExists
|
||||||
|
End If
|
||||||
|
|
||||||
|
SetBackupRestorePath(CurrentGame)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub DeleteAllBackups()
|
Private Sub DeleteAllBackups()
|
||||||
Dim oBackupData As List(Of clsBackup)
|
Dim oBackupData As List(Of clsBackup)
|
||||||
Dim oBackup As clsBackup
|
Dim oBackup As clsBackup
|
||||||
@@ -757,7 +863,7 @@ Public Class frmGameManager
|
|||||||
|
|
||||||
For Each oBackup In oBackupData
|
For Each oBackup In oBackupData
|
||||||
'Delete the specific remote manifest entry
|
'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
|
'Delete referenced backup file from the backup folder
|
||||||
mgrCommon.DeleteFile(BackupFolder & oBackup.FileName)
|
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)
|
'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 +871,7 @@ Public Class frmGameManager
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
'Delete local manifest entry
|
'Delete local manifest entry
|
||||||
mgrManifest.DoManifestDeletebyMonitorID(CurrentBackupItem, mgrSQLite.Database.Local)
|
mgrManifest.DoManifestDeleteByMonitorID(CurrentBackupItem, mgrSQLite.Database.Local)
|
||||||
|
|
||||||
LoadBackupData()
|
LoadBackupData()
|
||||||
FillData()
|
FillData()
|
||||||
@@ -798,14 +904,22 @@ Public Class frmGameManager
|
|||||||
|
|
||||||
Dim oData As KeyValuePair(Of String, String) = lstGames.SelectedItems(0)
|
Dim oData As KeyValuePair(Of String, String) = lstGames.SelectedItems(0)
|
||||||
Dim oApp As clsGame = DirectCast(GameData(oData.Key), clsGame)
|
Dim oApp As clsGame = DirectCast(GameData(oData.Key), clsGame)
|
||||||
|
Dim sttPath As String
|
||||||
|
|
||||||
'Core
|
'Core
|
||||||
txtID.Text = oApp.ID
|
txtID.Text = oApp.ID
|
||||||
txtName.Text = oApp.Name
|
txtName.Text = oApp.Name
|
||||||
txtProcess.Text = oApp.TrueProcess
|
txtProcess.Text = oApp.ProcessName
|
||||||
chkRegEx.Checked = oApp.IsRegEx
|
chkRegEx.Checked = oApp.IsRegEx
|
||||||
txtParameter.Text = oApp.Parameter
|
txtParameter.Text = oApp.Parameter
|
||||||
txtSavePath.Text = oApp.Path
|
If oSettings.ShowResolvedPaths Then
|
||||||
|
txtSavePath.Text = oApp.Path
|
||||||
|
sttPath = oApp.TruePath
|
||||||
|
Else
|
||||||
|
txtSavePath.Text = oApp.TruePath
|
||||||
|
sttPath = oApp.Path
|
||||||
|
End If
|
||||||
|
If oApp.AbsolutePath Then ttFullPath.SetToolTip(txtSavePath, sttPath)
|
||||||
txtFileType.Text = oApp.FileType
|
txtFileType.Text = oApp.FileType
|
||||||
txtExclude.Text = oApp.ExcludeList
|
txtExclude.Text = oApp.ExcludeList
|
||||||
chkFolderSave.Checked = oApp.FolderSave
|
chkFolderSave.Checked = oApp.FolderSave
|
||||||
@@ -831,7 +945,7 @@ Public Class frmGameManager
|
|||||||
|
|
||||||
'Icon
|
'Icon
|
||||||
If IO.File.Exists(oApp.Icon) Then
|
If IO.File.Exists(oApp.Icon) Then
|
||||||
pbIcon.Image = Image.FromFile(oApp.Icon)
|
pbIcon.Image = mgrCommon.SafeIconFromFile(oApp.Icon)
|
||||||
Else
|
Else
|
||||||
pbIcon.Image = Icon_Unknown
|
pbIcon.Image = Icon_Unknown
|
||||||
End If
|
End If
|
||||||
@@ -847,14 +961,14 @@ Public Class frmGameManager
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub FillTagsbyID(ByVal sID As String)
|
Private Sub FillTagsbyID(ByVal sID As String)
|
||||||
Dim hshTags As Hashtable
|
Dim slTags As SortedList
|
||||||
Dim oTag As clsTag
|
Dim oTag As clsTag
|
||||||
Dim sTags As String = String.Empty
|
Dim sTags As String = String.Empty
|
||||||
Dim cTrim() As Char = {",", " "}
|
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)
|
oTag = DirectCast(de.Value, clsTag)
|
||||||
sTags &= "#" & oTag.Name & ", "
|
sTags &= "#" & oTag.Name & ", "
|
||||||
Next
|
Next
|
||||||
@@ -913,7 +1027,7 @@ Public Class frmGameManager
|
|||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ModeChange()
|
Private Sub ModeChange(Optional ByVal bNoFocusChange As Boolean = False)
|
||||||
IsLoading = True
|
IsLoading = True
|
||||||
|
|
||||||
Select Case eCurrentMode
|
Select Case eCurrentMode
|
||||||
@@ -942,6 +1056,7 @@ Public Class frmGameManager
|
|||||||
btnBackup.Enabled = False
|
btnBackup.Enabled = False
|
||||||
btnMarkAsRestored.Enabled = False
|
btnMarkAsRestored.Enabled = False
|
||||||
btnRestore.Enabled = False
|
btnRestore.Enabled = False
|
||||||
|
btnImportBackup.Enabled = False
|
||||||
btnDeleteBackup.Enabled = False
|
btnDeleteBackup.Enabled = False
|
||||||
btnOpenBackupFile.Enabled = False
|
btnOpenBackupFile.Enabled = False
|
||||||
btnOpenRestorePath.Enabled = False
|
btnOpenRestorePath.Enabled = False
|
||||||
@@ -972,6 +1087,7 @@ Public Class frmGameManager
|
|||||||
btnBackup.Enabled = False
|
btnBackup.Enabled = False
|
||||||
btnMarkAsRestored.Enabled = False
|
btnMarkAsRestored.Enabled = False
|
||||||
btnRestore.Enabled = False
|
btnRestore.Enabled = False
|
||||||
|
btnImportBackup.Enabled = False
|
||||||
btnDeleteBackup.Enabled = False
|
btnDeleteBackup.Enabled = False
|
||||||
btnOpenBackupFile.Enabled = False
|
btnOpenBackupFile.Enabled = False
|
||||||
btnOpenRestorePath.Enabled = False
|
btnOpenRestorePath.Enabled = False
|
||||||
@@ -1000,6 +1116,7 @@ Public Class frmGameManager
|
|||||||
lblTags.Visible = True
|
lblTags.Visible = True
|
||||||
btnImport.Enabled = True
|
btnImport.Enabled = True
|
||||||
btnExport.Enabled = True
|
btnExport.Enabled = True
|
||||||
|
btnImportBackup.Enabled = True
|
||||||
Case eModes.Disabled
|
Case eModes.Disabled
|
||||||
grpFilter.Enabled = True
|
grpFilter.Enabled = True
|
||||||
lstGames.Enabled = True
|
lstGames.Enabled = True
|
||||||
@@ -1060,7 +1177,7 @@ Public Class frmGameManager
|
|||||||
btnExport.Enabled = True
|
btnExport.Enabled = True
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
lstGames.Focus()
|
If Not bNoFocusChange Then lstGames.Focus()
|
||||||
|
|
||||||
IsLoading = False
|
IsLoading = False
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1082,28 +1199,34 @@ Public Class frmGameManager
|
|||||||
If chkMonitorOnly.Checked Then
|
If chkMonitorOnly.Checked Then
|
||||||
chkFolderSave.Enabled = False
|
chkFolderSave.Enabled = False
|
||||||
chkTimeStamp.Enabled = False
|
chkTimeStamp.Enabled = False
|
||||||
|
lblLimit.Enabled = False
|
||||||
|
nudLimit.Enabled = False
|
||||||
lblSavePath.Enabled = False
|
lblSavePath.Enabled = False
|
||||||
txtSavePath.Enabled = False
|
txtSavePath.Enabled = False
|
||||||
btnSavePathBrowse.Enabled = False
|
btnSavePathBrowse.Enabled = False
|
||||||
btnInclude.Enabled = False
|
btnInclude.Enabled = False
|
||||||
btnExclude.Enabled = False
|
btnExclude.Enabled = False
|
||||||
|
chkCleanFolder.Enabled = False
|
||||||
Else
|
Else
|
||||||
chkFolderSave.Enabled = True
|
chkFolderSave.Enabled = True
|
||||||
chkTimeStamp.Enabled = True
|
chkTimeStamp.Enabled = True
|
||||||
|
lblLimit.Enabled = True
|
||||||
|
nudLimit.Enabled = True
|
||||||
lblSavePath.Enabled = True
|
lblSavePath.Enabled = True
|
||||||
txtSavePath.Enabled = True
|
txtSavePath.Enabled = True
|
||||||
btnSavePathBrowse.Enabled = True
|
btnSavePathBrowse.Enabled = True
|
||||||
btnInclude.Enabled = True
|
btnInclude.Enabled = True
|
||||||
btnExclude.Enabled = True
|
btnExclude.Enabled = True
|
||||||
|
FolderSaveModeChange()
|
||||||
|
VerifyCleanFolder()
|
||||||
End If
|
End If
|
||||||
VerifyCleanFolder()
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub TimeStampModeChange()
|
Private Sub TimeStampModeChange()
|
||||||
If chkTimeStamp.Checked Then
|
If chkTimeStamp.Checked Then
|
||||||
nudLimit.Visible = True
|
nudLimit.Visible = True
|
||||||
lblLimit.Visible = True
|
lblLimit.Visible = True
|
||||||
nudLimit.Value = 5
|
nudLimit.Value = 0
|
||||||
Else
|
Else
|
||||||
nudLimit.Visible = False
|
nudLimit.Visible = False
|
||||||
nudLimit.Value = nudLimit.Minimum
|
nudLimit.Value = nudLimit.Minimum
|
||||||
@@ -1248,10 +1371,11 @@ Public Class frmGameManager
|
|||||||
End If
|
End If
|
||||||
Case eModes.Edit
|
Case eModes.Edit
|
||||||
If CoreValidatation(oApp, False) Then
|
If CoreValidatation(oApp, False) Then
|
||||||
bSuccess = True
|
If CheckManifestandUpdate(oCurrentGame, oApp, oSettings.UseGameID) Then
|
||||||
CheckManifestandUpdate(oCurrentGame, oApp)
|
bSuccess = True
|
||||||
mgrMonitorList.DoListUpdate(oApp, CurrentGame.ID)
|
mgrMonitorList.DoListUpdate(oApp, CurrentGame.ID)
|
||||||
eCurrentMode = eModes.View
|
eCurrentMode = eModes.View
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
Case eModes.MultiSelect
|
Case eModes.MultiSelect
|
||||||
Dim sMonitorIDs As New List(Of String)
|
Dim sMonitorIDs As New List(Of String)
|
||||||
@@ -1294,7 +1418,7 @@ Public Class frmGameManager
|
|||||||
|
|
||||||
If mgrCommon.ShowMessage(frmGameManager_ConfirmGameDelete, oApp.Name, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
If mgrCommon.ShowMessage(frmGameManager_ConfirmGameDelete, oApp.Name, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
mgrMonitorList.DoListDelete(oApp.ID)
|
mgrMonitorList.DoListDelete(oApp.ID)
|
||||||
mgrMonitorList.SyncMonitorLists(Settings)
|
mgrMonitorList.SyncMonitorLists(Settings,, False)
|
||||||
LoadData()
|
LoadData()
|
||||||
eCurrentMode = eModes.Disabled
|
eCurrentMode = eModes.Disabled
|
||||||
ModeChange()
|
ModeChange()
|
||||||
@@ -1309,7 +1433,7 @@ Public Class frmGameManager
|
|||||||
|
|
||||||
If mgrCommon.ShowMessage(frmGameManager_ConfirmMultiGameDelete, sMonitorIDs.Count, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
If mgrCommon.ShowMessage(frmGameManager_ConfirmMultiGameDelete, sMonitorIDs.Count, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
mgrMonitorList.DoListDeleteMulti(sMonitorIDs)
|
mgrMonitorList.DoListDeleteMulti(sMonitorIDs)
|
||||||
mgrMonitorList.SyncMonitorLists(Settings)
|
mgrMonitorList.SyncMonitorLists(Settings,, False)
|
||||||
LoadData()
|
LoadData()
|
||||||
eCurrentMode = eModes.Disabled
|
eCurrentMode = eModes.Disabled
|
||||||
ModeChange()
|
ModeChange()
|
||||||
@@ -1431,6 +1555,48 @@ Public Class frmGameManager
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub TriggerSelectedImportBackup()
|
||||||
|
Dim sDefaultFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
|
||||||
|
Dim oBackup As New mgrBackup
|
||||||
|
Dim sConfirm As String = frmGameManager_ConfirmBackupImport
|
||||||
|
Dim sFile As String
|
||||||
|
Dim sFiles As String()
|
||||||
|
|
||||||
|
'Show one time warning
|
||||||
|
If Not (oSettings.SuppressMessages And mgrSettings.eSuppressMessages.BackupImport) = mgrSettings.eSuppressMessages.BackupImport Then
|
||||||
|
mgrCommon.ShowMessage(frmGameManager_WarningImportBackup, MsgBoxStyle.Information)
|
||||||
|
oSettings.SuppressMessages = oSettings.SetMessageField(oSettings.SuppressMessages, mgrSettings.eSuppressMessages.BackupImport)
|
||||||
|
oSettings.SaveSettings()
|
||||||
|
End If
|
||||||
|
|
||||||
|
ImportBackupList.Clear()
|
||||||
|
|
||||||
|
sFiles = mgrCommon.OpenMultiFileBrowser("GM_ImportBackup", frmGameManager_Choose7zImport, "7z",
|
||||||
|
frmGameManager_7zBackup, sDefaultFolder, True)
|
||||||
|
|
||||||
|
If sFiles.Length > 0 Then
|
||||||
|
For Each sFile In sFiles
|
||||||
|
If Not ImportBackupList.Contains(sFile) Then
|
||||||
|
ImportBackupList.Add(sFile, oCurrentGame)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
If sFiles.Length > 1 And Not CurrentGame.AppendTimeStamp Then
|
||||||
|
mgrCommon.ShowMessage(frmGameManager_WarningImportBackupSaveMulti, MsgBoxStyle.Exclamation)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
If sFiles.Length = 1 And Not CurrentGame.AppendTimeStamp And mgrManifest.DoManifestCheck(CurrentGame.ID, mgrSQLite.Database.Remote) Then
|
||||||
|
sConfirm = frmGameManager_ConfirmBackupImportOverwriteSingle
|
||||||
|
End If
|
||||||
|
|
||||||
|
If mgrCommon.ShowMessage(sConfirm, oCurrentGame.CroppedName, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
|
Me.TriggerImportBackup = True
|
||||||
|
Me.Close()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub TriggerSelectedBackup(Optional ByVal bPrompt As Boolean = True)
|
Private Sub TriggerSelectedBackup(Optional ByVal bPrompt As Boolean = True)
|
||||||
Dim oData As KeyValuePair(Of String, String)
|
Dim oData As KeyValuePair(Of String, String)
|
||||||
Dim sMsg As String = String.Empty
|
Dim sMsg As String = String.Empty
|
||||||
@@ -1479,7 +1645,6 @@ Public Class frmGameManager
|
|||||||
If lstGames.SelectedItems.Count > 0 Then
|
If lstGames.SelectedItems.Count > 0 Then
|
||||||
RestoreList.Clear()
|
RestoreList.Clear()
|
||||||
|
|
||||||
|
|
||||||
For Each oData In lstGames.SelectedItems
|
For Each oData In lstGames.SelectedItems
|
||||||
If oRemoteBackupData.Contains(oData.Key) Then
|
If oRemoteBackupData.Contains(oData.Key) Then
|
||||||
oGame = DirectCast(GameData(oData.Key), clsGame)
|
oGame = DirectCast(GameData(oData.Key), clsGame)
|
||||||
@@ -1494,6 +1659,12 @@ Public Class frmGameManager
|
|||||||
For Each de As DictionaryEntry In RestoreList
|
For Each de As DictionaryEntry In RestoreList
|
||||||
oGame = DirectCast(de.Key, clsGame)
|
oGame = DirectCast(de.Key, clsGame)
|
||||||
Next
|
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
|
If Not mgrRestore.CheckManifest(oGame.Name) Then
|
||||||
sMsg = mgrCommon.FormatString(frmGameManager_ConfirmRestoreAnyway, oGame.Name)
|
sMsg = mgrCommon.FormatString(frmGameManager_ConfirmRestoreAnyway, oGame.Name)
|
||||||
Else
|
Else
|
||||||
@@ -1546,17 +1717,9 @@ Public Class frmGameManager
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ImportOfficialGameList()
|
Private Sub ImportOfficialGameList(ByVal sImportUrl As String, ByVal bWinConfigsInLinux As Boolean)
|
||||||
Dim sImportURL As String
|
|
||||||
|
|
||||||
If mgrCommon.IsUnix Then
|
|
||||||
sImportURL = App_URLImportLinux
|
|
||||||
Else
|
|
||||||
sImportURL = App_URLImport
|
|
||||||
End If
|
|
||||||
|
|
||||||
If mgrCommon.ShowMessage(frmGameManager_ConfirmOfficialImport, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
If mgrCommon.ShowMessage(frmGameManager_ConfirmOfficialImport, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
If mgrMonitorList.DoImport(sImportURL, True, Settings) Then
|
If mgrMonitorList.DoImport(sImportUrl, True, Settings,, bWinConfigsInLinux) Then
|
||||||
mgrMonitorList.SyncMonitorLists(Settings)
|
mgrMonitorList.SyncMonitorLists(Settings)
|
||||||
LoadData()
|
LoadData()
|
||||||
LoadBackupData()
|
LoadBackupData()
|
||||||
@@ -1616,6 +1779,8 @@ Public Class frmGameManager
|
|||||||
btnDelete.Text = frmGameManager_btnDelete
|
btnDelete.Text = frmGameManager_btnDelete
|
||||||
btnAdd.Text = frmGameManager_btnAdd
|
btnAdd.Text = frmGameManager_btnAdd
|
||||||
cmsOfficial.Text = frmGameManager_cmsOfficial
|
cmsOfficial.Text = frmGameManager_cmsOfficial
|
||||||
|
cmsOfficialLinux.Text = frmGameManager_cmsOfficialLinux
|
||||||
|
cmsOfficialWindows.Text = frmGameManager_cmsOfficialWindows
|
||||||
cmsFile.Text = frmGameManager_cmsFile
|
cmsFile.Text = frmGameManager_cmsFile
|
||||||
lblQuickFilter.Text = frmGameManager_lblQuickFilter
|
lblQuickFilter.Text = frmGameManager_lblQuickFilter
|
||||||
lblLimit.Text = frmGameManager_lblLimit
|
lblLimit.Text = frmGameManager_lblLimit
|
||||||
@@ -1624,6 +1789,17 @@ Public Class frmGameManager
|
|||||||
lblComments.Text = frmGameManager_lblComments
|
lblComments.Text = frmGameManager_lblComments
|
||||||
chkRegEx.Text = frmGameManager_chkRegEx
|
chkRegEx.Text = frmGameManager_chkRegEx
|
||||||
btnGameID.Text = frmGameManager_btnGameID
|
btnGameID.Text = frmGameManager_btnGameID
|
||||||
|
btnImportBackup.Text = frmGameManager_btnImportBackup
|
||||||
|
btnProcesses.Text = frmGameManager_btnProcesses
|
||||||
|
|
||||||
|
'Init Official Import Menu
|
||||||
|
If mgrCommon.IsUnix Then
|
||||||
|
cmsOfficial.Text = cmsOfficial.Text.TrimEnd(".")
|
||||||
|
RemoveHandler cmsOfficial.Click, AddressOf cmsOfficialWindows_Click
|
||||||
|
Else
|
||||||
|
cmsOfficialLinux.Visible = False
|
||||||
|
cmsOfficialWindows.Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
'Init Filter Timer
|
'Init Filter Timer
|
||||||
tmFilterTimer = New Timer()
|
tmFilterTimer = New Timer()
|
||||||
@@ -1777,6 +1953,10 @@ Public Class frmGameManager
|
|||||||
UpdateBuilderButtonLabel(txtExclude.Text, frmGameManager_ExcludeShortcut, btnExclude, (sExclude <> txtExclude.Text))
|
UpdateBuilderButtonLabel(txtExclude.Text, frmGameManager_ExcludeShortcut, btnExclude, (sExclude <> txtExclude.Text))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnImportBackup_Click(sender As Object, e As EventArgs) Handles btnImportBackup.Click
|
||||||
|
TriggerSelectedImportBackup()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub chkFolderSave_CheckedChanged(sender As Object, e As EventArgs) Handles chkFolderSave.CheckedChanged
|
Private Sub chkFolderSave_CheckedChanged(sender As Object, e As EventArgs) Handles chkFolderSave.CheckedChanged
|
||||||
FolderSaveModeChange()
|
FolderSaveModeChange()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1785,6 +1965,10 @@ Public Class frmGameManager
|
|||||||
TimeStampModeChange()
|
TimeStampModeChange()
|
||||||
End Sub
|
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
|
Private Sub cboRemoteBackup_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboRemoteBackup.SelectedIndexChanged
|
||||||
If Not bIsLoading Then
|
If Not bIsLoading Then
|
||||||
UpdateBackupInfo(DirectCast(cboRemoteBackup.SelectedItem, KeyValuePair(Of String, String)).Key)
|
UpdateBackupInfo(DirectCast(cboRemoteBackup.SelectedItem, KeyValuePair(Of String, String)).Key)
|
||||||
@@ -1795,8 +1979,23 @@ Public Class frmGameManager
|
|||||||
cmsImport.Show(btnImport, New Drawing.Point(btnImport.Size.Width - Math.Floor(btnImport.Size.Width * 0.1), btnImport.Size.Height - Math.Floor(btnImport.Size.Height * 0.5)), ToolStripDropDownDirection.AboveRight)
|
cmsImport.Show(btnImport, New Drawing.Point(btnImport.Size.Width - Math.Floor(btnImport.Size.Width * 0.1), btnImport.Size.Height - Math.Floor(btnImport.Size.Height * 0.5)), ToolStripDropDownDirection.AboveRight)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub cmsOfficial_Click(sender As Object, e As EventArgs) Handles cmsOfficial.Click
|
Private Sub cmsOfficialWindows_Click(sender As Object, e As EventArgs) Handles cmsOfficialWindows.Click, cmsOfficial.Click
|
||||||
ImportOfficialGameList()
|
Dim bWinConfigsinLinux As Boolean = False
|
||||||
|
'Show one time warning about Windows configs in Linux
|
||||||
|
If mgrCommon.IsUnix Then
|
||||||
|
If Not (oSettings.SuppressMessages And mgrSettings.eSuppressMessages.WinConfigsInLinux) = mgrSettings.eSuppressMessages.WinConfigsInLinux Then
|
||||||
|
mgrCommon.ShowMessage(frmGameManager_WarningWinConfigsInLinux, MsgBoxStyle.Information)
|
||||||
|
oSettings.SuppressMessages = oSettings.SetMessageField(oSettings.SuppressMessages, mgrSettings.eSuppressMessages.WinConfigsInLinux)
|
||||||
|
oSettings.SaveSettings()
|
||||||
|
End If
|
||||||
|
bWinConfigsinLinux = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
ImportOfficialGameList(App_URLImport, bWinConfigsinLinux)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub cmsOfficialLinux_Click(sender As Object, e As EventArgs) Handles cmsOfficialLinux.Click
|
||||||
|
ImportOfficialGameList(App_URLImportLinux, False)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub cmsFile_Click(sender As Object, e As EventArgs) Handles cmsFile.Click
|
Private Sub cmsFile_Click(sender As Object, e As EventArgs) Handles cmsFile.Click
|
||||||
@@ -1812,13 +2011,21 @@ Public Class frmGameManager
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub txtQuickFilter_TextChanged(sender As Object, e As EventArgs) Handles txtQuickFilter.TextChanged
|
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
|
If Not tmFilterTimer.Enabled Then
|
||||||
|
lstGames.Enabled = False
|
||||||
tmFilterTimer.Enabled = True
|
tmFilterTimer.Enabled = True
|
||||||
tmFilterTimer.Start()
|
tmFilterTimer.Start()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub txtSavePath_TextChanged(sender As Object, e As EventArgs) Handles txtSavePath.TextChanged
|
Private Sub txtSavePath_TextChanged(sender As Object, e As EventArgs) Handles txtSavePath.TextChanged
|
||||||
|
ttFullPath.RemoveAll()
|
||||||
VerifyCleanFolder()
|
VerifyCleanFolder()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1827,6 +2034,7 @@ Public Class frmGameManager
|
|||||||
FormatAndFillList()
|
FormatAndFillList()
|
||||||
tmFilterTimer.Stop()
|
tmFilterTimer.Stop()
|
||||||
tmFilterTimer.Enabled = False
|
tmFilterTimer.Enabled = False
|
||||||
|
lstGames.Enabled = True
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub frmGameManager_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
|
Private Sub frmGameManager_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
|
||||||
|
|||||||
+78
-34
@@ -228,7 +228,7 @@ Public Class frmMain
|
|||||||
If oGame.AbsolutePath = False Then
|
If oGame.AbsolutePath = False Then
|
||||||
If oGame.ProcessPath = String.Empty Then
|
If oGame.ProcessPath = String.Empty Then
|
||||||
If mgrCommon.IsProcessNotSearchable(oGame) Then bNoAuto = True
|
If mgrCommon.IsProcessNotSearchable(oGame) Then bNoAuto = True
|
||||||
oGame.ProcessPath = mgrPath.ProcessPathSearch(oGame.Name, oGame.TrueProcess, mgrCommon.FormatString(frmMain_ErrorRelativePath, oGame.Name), bNoAuto)
|
oGame.ProcessPath = mgrPath.ProcessPathSearch(oGame.Name, oGame.ProcessName, mgrCommon.FormatString(frmMain_ErrorRelativePath, oGame.Name), bNoAuto)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If oGame.ProcessPath <> String.Empty Then
|
If oGame.ProcessPath <> String.Empty Then
|
||||||
@@ -258,6 +258,12 @@ Public Class frmMain
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RunImportBackup(ByVal oImportBackupList As Hashtable)
|
||||||
|
PauseScan()
|
||||||
|
oBackup.ImportBackupFiles(oImportBackupList)
|
||||||
|
ResumeScan()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Function DoMultiGameCheck() As Boolean
|
Private Function DoMultiGameCheck() As Boolean
|
||||||
Dim oResult As DialogResult
|
Dim oResult As DialogResult
|
||||||
|
|
||||||
@@ -266,14 +272,9 @@ Public Class frmMain
|
|||||||
frm.Process = oProcess
|
frm.Process = oProcess
|
||||||
oResult = frm.ShowDialog()
|
oResult = frm.ShowDialog()
|
||||||
If oResult = DialogResult.OK Then
|
If oResult = DialogResult.OK Then
|
||||||
Dim sProcessPath As String
|
|
||||||
'Reload settings
|
'Reload settings
|
||||||
LoadGameSettings()
|
LoadGameSettings()
|
||||||
'Retain the process path from old object
|
|
||||||
sProcessPath = oProcess.GameInfo.ProcessPath
|
|
||||||
oProcess.GameInfo = frm.Game
|
oProcess.GameInfo = frm.Game
|
||||||
'Set the process path into the new object
|
|
||||||
oProcess.GameInfo.ProcessPath = sProcessPath
|
|
||||||
'A game was set, return and continue
|
'A game was set, return and continue
|
||||||
Return True
|
Return True
|
||||||
Else
|
Else
|
||||||
@@ -526,7 +527,7 @@ Public Class frmMain
|
|||||||
sIcon = fbBrowser.FileName
|
sIcon = fbBrowser.FileName
|
||||||
If File.Exists(sIcon) Then
|
If File.Exists(sIcon) Then
|
||||||
oProcess.GameInfo.Icon = sIcon
|
oProcess.GameInfo.Icon = sIcon
|
||||||
pbIcon.Image = Image.FromFile(sIcon)
|
pbIcon.Image = mgrCommon.SafeIconFromFile(sIcon)
|
||||||
mgrMonitorList.DoListUpdate(oProcess.GameInfo)
|
mgrMonitorList.DoListUpdate(oProcess.GameInfo)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -577,6 +578,25 @@ Public Class frmMain
|
|||||||
End If
|
End If
|
||||||
End Sub
|
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)
|
Private Sub SetGameInfo(Optional ByVal bMulti As Boolean = False)
|
||||||
Dim sFileName As String = String.Empty
|
Dim sFileName As String = String.Empty
|
||||||
Dim sFileVersion As String = String.Empty
|
Dim sFileVersion As String = String.Empty
|
||||||
@@ -586,6 +606,20 @@ Public Class frmMain
|
|||||||
lblStatus1.Text = String.Empty
|
lblStatus1.Text = String.Empty
|
||||||
lblStatus2.Text = String.Empty
|
lblStatus2.Text = String.Empty
|
||||||
lblStatus3.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
|
'Get Game Details
|
||||||
If bMulti Then
|
If bMulti Then
|
||||||
@@ -595,28 +629,19 @@ Public Class frmMain
|
|||||||
pbTime.Visible = False
|
pbTime.Visible = False
|
||||||
lblTimeSpent.Visible = False
|
lblTimeSpent.Visible = False
|
||||||
pbIcon.Image = Icon_Unknown
|
pbIcon.Image = Icon_Unknown
|
||||||
lblStatus1.Text = frmMain_NoDetails
|
If sFileName = String.Empty Then
|
||||||
|
lblStatus1.Text = frmMain_NoDetails
|
||||||
|
Else
|
||||||
|
lblStatus1.Text = sFileName
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
bAllowIcon = True
|
bAllowIcon = True
|
||||||
bAllowDetails = True
|
bAllowDetails = True
|
||||||
lblGameTitle.Text = oProcess.GameInfo.Name
|
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
|
'Check for a custom icon & details
|
||||||
If File.Exists(oProcess.GameInfo.Icon) Then
|
If File.Exists(oProcess.GameInfo.Icon) Then
|
||||||
pbIcon.Image = Image.FromFile(oProcess.GameInfo.Icon)
|
pbIcon.Image = mgrCommon.SafeIconFromFile(oProcess.GameInfo.Icon)
|
||||||
End If
|
End If
|
||||||
If sFileName = String.Empty Then
|
If sFileName = String.Empty Then
|
||||||
If oProcess.GameInfo.ProcessPath <> String.Empty Then
|
If oProcess.GameInfo.ProcessPath <> String.Empty Then
|
||||||
@@ -870,6 +895,11 @@ Public Class frmMain
|
|||||||
If frm.TriggerRestore Then
|
If frm.TriggerRestore Then
|
||||||
RunRestore(frm.RestoreList)
|
RunRestore(frm.RestoreList)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'Handle import backup trigger
|
||||||
|
If frm.TriggerImportBackup Then
|
||||||
|
RunImportBackup(frm.ImportBackupList)
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OpenSettings()
|
Private Sub OpenSettings()
|
||||||
@@ -916,7 +946,7 @@ Public Class frmMain
|
|||||||
Dim frm As New frmVariableManager
|
Dim frm As New frmVariableManager
|
||||||
PauseScan()
|
PauseScan()
|
||||||
frm.ShowDialog()
|
frm.ShowDialog()
|
||||||
mgrPath.CustomVariablesReload()
|
mgrPath.LoadCustomVariables()
|
||||||
mgrMonitorList.SyncMonitorLists(oSettings)
|
mgrMonitorList.SyncMonitorLists(oSettings)
|
||||||
ResumeScan()
|
ResumeScan()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1046,6 +1076,12 @@ Public Class frmMain
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'Check Special Paths
|
||||||
|
If Not mgrPath.CheckSpecialPaths Then
|
||||||
|
bInitFail = True
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
'Local Database Check
|
'Local Database Check
|
||||||
VerifyDBVersion(mgrSQLite.Database.Local)
|
VerifyDBVersion(mgrSQLite.Database.Local)
|
||||||
LocalDatabaseCheck()
|
LocalDatabaseCheck()
|
||||||
@@ -1659,15 +1695,6 @@ Public Class frmMain
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub CheckForSavedDuplicate()
|
|
||||||
For Each o As clsGame In oProcess.DuplicateList
|
|
||||||
If o.ProcessPath.ToLower = oProcess.GameInfo.ProcessPath.ToLower Then
|
|
||||||
oProcess.GameInfo = o
|
|
||||||
oProcess.Duplicate = False
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Function CheckForSavedPath() As Boolean
|
Private Function CheckForSavedPath() As Boolean
|
||||||
If oProcess.GameInfo.ProcessPath <> String.Empty Then
|
If oProcess.GameInfo.ProcessPath <> String.Empty Then
|
||||||
Return True
|
Return True
|
||||||
@@ -1864,11 +1891,12 @@ Public Class frmMain
|
|||||||
|
|
||||||
Private Sub ScanTimerEventProcessor(myObject As Object, ByVal myEventArgs As EventArgs) Handles tmScanTimer.Tick
|
Private Sub ScanTimerEventProcessor(myObject As Object, ByVal myEventArgs As EventArgs) Handles tmScanTimer.Tick
|
||||||
Dim bNeedsPath As Boolean = False
|
Dim bNeedsPath As Boolean = False
|
||||||
|
Dim bWineProcess As Boolean = False
|
||||||
Dim bContinue As Boolean = True
|
Dim bContinue As Boolean = True
|
||||||
Dim iErrorCode As Integer = 0
|
Dim iErrorCode As Integer = 0
|
||||||
Dim sErrorMessage As String = String.Empty
|
Dim sErrorMessage As String = String.Empty
|
||||||
|
|
||||||
If oProcess.SearchRunningProcesses(hshScanList, bNeedsPath, iErrorCode, bProcessDebugMode) Then
|
If oProcess.SearchRunningProcesses(hshScanList, bNeedsPath, bWineProcess, iErrorCode, bProcessDebugMode) Then
|
||||||
PauseScan(True)
|
PauseScan(True)
|
||||||
|
|
||||||
If bNeedsPath Then
|
If bNeedsPath Then
|
||||||
@@ -1898,8 +1926,24 @@ Public Class frmMain
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If bWineProcess Then
|
||||||
|
'Attempt a path conversion if the game configuration is using an absolute windows path that we can convert
|
||||||
|
If mgrVariables.CheckForReservedVariables(oProcess.GameInfo.TruePath) Then
|
||||||
|
Dim sWinePrefix As String = mgrPath.GetWinePrefix(oProcess.FoundProcess)
|
||||||
|
Dim sWineSavePath As String
|
||||||
|
If Not sWinePrefix = String.Empty Then
|
||||||
|
UpdateLog(mgrCommon.FormatString(frmMain_WinePrefix, New String() {oProcess.GameInfo.Name, sWinePrefix}), False)
|
||||||
|
sWineSavePath = mgrPath.GetWineSavePath(sWinePrefix, oProcess.GameInfo.TruePath)
|
||||||
|
If Not sWineSavePath = oProcess.GameInfo.TruePath Then
|
||||||
|
oProcess.GameInfo.TruePath = sWineSavePath
|
||||||
|
oProcess.GameInfo.AbsolutePath = True
|
||||||
|
UpdateLog(mgrCommon.FormatString(frmMain_WineSavePath, New String() {oProcess.GameInfo.Name, sWineSavePath}), False)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If bContinue = True Then
|
If bContinue = True Then
|
||||||
CheckForSavedDuplicate()
|
|
||||||
If oProcess.Duplicate Then
|
If oProcess.Duplicate Then
|
||||||
UpdateLog(frmMain_MultipleGamesDetected, oSettings.ShowDetectionToolTips)
|
UpdateLog(frmMain_MultipleGamesDetected, oSettings.ShowDetectionToolTips)
|
||||||
UpdateStatus(frmMain_MultipleGamesDetected)
|
UpdateStatus(frmMain_MultipleGamesDetected)
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ Public Class frmProcessManager
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
sNewPath = mgrCommon.OpenFileBrowser("PM_Process", frmProcessManager_ChooseProcess, "exe",
|
sNewPath = mgrCommon.OpenFileBrowser("PM_Process", frmProcessManager_ChooseProcess, "exe",
|
||||||
frmProcessManager_Executable, sDefaultFolder, False, True)
|
frmProcessManager_Executable, sDefaultFolder, True)
|
||||||
|
|
||||||
If sNewPath <> String.Empty Then
|
If sNewPath <> String.Empty Then
|
||||||
txtPath.Text = sNewPath
|
txtPath.Text = sNewPath
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ Public Class frmSessions
|
|||||||
dgSessions.Rows.Add(New Object() {dr("MonitorID"), dr("Name"), dr("Start"), dStart, dr("End"), dEnd, dHours})
|
dgSessions.Rows.Add(New Object() {dr("MonitorID"), dr("Name"), dr("Start"), dStart, dr("End"), dEnd, dHours})
|
||||||
Next
|
Next
|
||||||
|
|
||||||
lblTotalHours.Text = mgrCommon.FormatString(frmSessions_lblTotalHours, dTotalHours)
|
lblTotalHours.Text = mgrCommon.FormatString(frmSessions_lblTotalHours, Math.Round(dTotalHours, 2))
|
||||||
|
|
||||||
dgSessions.AutoResizeColumns()
|
dgSessions.AutoResizeColumns()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -290,9 +290,21 @@ Public Class frmSessions
|
|||||||
|
|
||||||
Select Case iDataTypeCol
|
Select Case iDataTypeCol
|
||||||
Case iDataType.DecimalType
|
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
|
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
|
Case iDataType.StringType
|
||||||
iCompareResult = String.Compare(CStr(dgRow1.Cells(iSortCol).Value), CStr(dgRow2.Cells(iSortCol).Value))
|
iCompareResult = String.Compare(CStr(dgRow1.Cells(iSortCol).Value), CStr(dgRow2.Cells(iSortCol).Value))
|
||||||
Case iDataType.DateTimeType
|
Case iDataType.DateTimeType
|
||||||
|
|||||||
Generated
+17
-4
@@ -64,6 +64,7 @@ Partial Class frmSettings
|
|||||||
Me.grpLogOptions = New System.Windows.Forms.GroupBox()
|
Me.grpLogOptions = New System.Windows.Forms.GroupBox()
|
||||||
Me.chkDisableSyncMessages = New System.Windows.Forms.CheckBox()
|
Me.chkDisableSyncMessages = New System.Windows.Forms.CheckBox()
|
||||||
Me.grpGameData = New System.Windows.Forms.GroupBox()
|
Me.grpGameData = New System.Windows.Forms.GroupBox()
|
||||||
|
Me.chkShowResolvedPaths = New System.Windows.Forms.CheckBox()
|
||||||
Me.chkSessionTracking = New System.Windows.Forms.CheckBox()
|
Me.chkSessionTracking = New System.Windows.Forms.CheckBox()
|
||||||
Me.lstSettings = New System.Windows.Forms.ListBox()
|
Me.lstSettings = New System.Windows.Forms.ListBox()
|
||||||
Me.btnResetMessages = New System.Windows.Forms.Button()
|
Me.btnResetMessages = New System.Windows.Forms.Button()
|
||||||
@@ -102,7 +103,7 @@ Partial Class frmSettings
|
|||||||
'
|
'
|
||||||
'btnOptionalFields
|
'btnOptionalFields
|
||||||
'
|
'
|
||||||
Me.btnOptionalFields.Location = New System.Drawing.Point(6, 65)
|
Me.btnOptionalFields.Location = New System.Drawing.Point(6, 88)
|
||||||
Me.btnOptionalFields.Name = "btnOptionalFields"
|
Me.btnOptionalFields.Name = "btnOptionalFields"
|
||||||
Me.btnOptionalFields.Size = New System.Drawing.Size(216, 23)
|
Me.btnOptionalFields.Size = New System.Drawing.Size(216, 23)
|
||||||
Me.btnOptionalFields.TabIndex = 3
|
Me.btnOptionalFields.TabIndex = 3
|
||||||
@@ -443,7 +444,7 @@ Partial Class frmSettings
|
|||||||
Me.grpGameMonitoringOptions.Controls.Add(Me.lblMinutes)
|
Me.grpGameMonitoringOptions.Controls.Add(Me.lblMinutes)
|
||||||
Me.grpGameMonitoringOptions.Controls.Add(Me.chkShowDetectionTips)
|
Me.grpGameMonitoringOptions.Controls.Add(Me.chkShowDetectionTips)
|
||||||
Me.grpGameMonitoringOptions.Controls.Add(Me.nudSuppressBackupThreshold)
|
Me.grpGameMonitoringOptions.Controls.Add(Me.nudSuppressBackupThreshold)
|
||||||
Me.grpGameMonitoringOptions.Location = New System.Drawing.Point(6, 115)
|
Me.grpGameMonitoringOptions.Location = New System.Drawing.Point(6, 141)
|
||||||
Me.grpGameMonitoringOptions.Name = "grpGameMonitoringOptions"
|
Me.grpGameMonitoringOptions.Name = "grpGameMonitoringOptions"
|
||||||
Me.grpGameMonitoringOptions.Size = New System.Drawing.Size(354, 65)
|
Me.grpGameMonitoringOptions.Size = New System.Drawing.Size(354, 65)
|
||||||
Me.grpGameMonitoringOptions.TabIndex = 1
|
Me.grpGameMonitoringOptions.TabIndex = 1
|
||||||
@@ -481,7 +482,7 @@ Partial Class frmSettings
|
|||||||
'
|
'
|
||||||
Me.grpLogOptions.Controls.Add(Me.chkDisableSyncMessages)
|
Me.grpLogOptions.Controls.Add(Me.chkDisableSyncMessages)
|
||||||
Me.grpLogOptions.Controls.Add(Me.chkAutoSaveLog)
|
Me.grpLogOptions.Controls.Add(Me.chkAutoSaveLog)
|
||||||
Me.grpLogOptions.Location = New System.Drawing.Point(6, 186)
|
Me.grpLogOptions.Location = New System.Drawing.Point(6, 212)
|
||||||
Me.grpLogOptions.Name = "grpLogOptions"
|
Me.grpLogOptions.Name = "grpLogOptions"
|
||||||
Me.grpLogOptions.Size = New System.Drawing.Size(354, 65)
|
Me.grpLogOptions.Size = New System.Drawing.Size(354, 65)
|
||||||
Me.grpLogOptions.TabIndex = 2
|
Me.grpLogOptions.TabIndex = 2
|
||||||
@@ -500,16 +501,27 @@ Partial Class frmSettings
|
|||||||
'
|
'
|
||||||
'grpGameData
|
'grpGameData
|
||||||
'
|
'
|
||||||
|
Me.grpGameData.Controls.Add(Me.chkShowResolvedPaths)
|
||||||
Me.grpGameData.Controls.Add(Me.chkSessionTracking)
|
Me.grpGameData.Controls.Add(Me.chkSessionTracking)
|
||||||
Me.grpGameData.Controls.Add(Me.chkTimeTracking)
|
Me.grpGameData.Controls.Add(Me.chkTimeTracking)
|
||||||
Me.grpGameData.Controls.Add(Me.btnOptionalFields)
|
Me.grpGameData.Controls.Add(Me.btnOptionalFields)
|
||||||
Me.grpGameData.Location = New System.Drawing.Point(6, 12)
|
Me.grpGameData.Location = New System.Drawing.Point(6, 12)
|
||||||
Me.grpGameData.Name = "grpGameData"
|
Me.grpGameData.Name = "grpGameData"
|
||||||
Me.grpGameData.Size = New System.Drawing.Size(354, 97)
|
Me.grpGameData.Size = New System.Drawing.Size(354, 123)
|
||||||
Me.grpGameData.TabIndex = 0
|
Me.grpGameData.TabIndex = 0
|
||||||
Me.grpGameData.TabStop = False
|
Me.grpGameData.TabStop = False
|
||||||
Me.grpGameData.Text = "Game Data Options"
|
Me.grpGameData.Text = "Game Data Options"
|
||||||
'
|
'
|
||||||
|
'chkShowResolvedPaths
|
||||||
|
'
|
||||||
|
Me.chkShowResolvedPaths.AutoSize = True
|
||||||
|
Me.chkShowResolvedPaths.Location = New System.Drawing.Point(6, 65)
|
||||||
|
Me.chkShowResolvedPaths.Name = "chkShowResolvedPaths"
|
||||||
|
Me.chkShowResolvedPaths.Size = New System.Drawing.Size(238, 17)
|
||||||
|
Me.chkShowResolvedPaths.TabIndex = 2
|
||||||
|
Me.chkShowResolvedPaths.Text = "Show resolved save paths in Game Manager"
|
||||||
|
Me.chkShowResolvedPaths.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
'chkSessionTracking
|
'chkSessionTracking
|
||||||
'
|
'
|
||||||
Me.chkSessionTracking.AutoSize = True
|
Me.chkSessionTracking.AutoSize = True
|
||||||
@@ -698,4 +710,5 @@ Partial Class frmSettings
|
|||||||
Friend WithEvents chkStartToTray As CheckBox
|
Friend WithEvents chkStartToTray As CheckBox
|
||||||
Friend WithEvents chkMonitorOnStartup As CheckBox
|
Friend WithEvents chkMonitorOnStartup As CheckBox
|
||||||
Friend WithEvents grpGameMonitoringOptions As GroupBox
|
Friend WithEvents grpGameMonitoringOptions As GroupBox
|
||||||
|
Friend WithEvents chkShowResolvedPaths As CheckBox
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ Public Class frmSettings
|
|||||||
oSettings.AutoMark = chkAutoMark.Checked
|
oSettings.AutoMark = chkAutoMark.Checked
|
||||||
oSettings.TimeTracking = chkTimeTracking.Checked
|
oSettings.TimeTracking = chkTimeTracking.Checked
|
||||||
oSettings.SessionTracking = chkSessionTracking.Checked
|
oSettings.SessionTracking = chkSessionTracking.Checked
|
||||||
|
oSettings.ShowResolvedPaths = chkShowResolvedPaths.Checked
|
||||||
oSettings.SuppressBackup = chkSuppressBackup.Checked
|
oSettings.SuppressBackup = chkSuppressBackup.Checked
|
||||||
oSettings.SuppressBackupThreshold = nudSuppressBackupThreshold.Value
|
oSettings.SuppressBackupThreshold = nudSuppressBackupThreshold.Value
|
||||||
oSettings.CompressionLevel = cboCompression.SelectedValue
|
oSettings.CompressionLevel = cboCompression.SelectedValue
|
||||||
@@ -189,6 +190,7 @@ Public Class frmSettings
|
|||||||
txtBackupFolder.Text = oSettings.BackupFolder
|
txtBackupFolder.Text = oSettings.BackupFolder
|
||||||
chkTimeTracking.Checked = oSettings.TimeTracking
|
chkTimeTracking.Checked = oSettings.TimeTracking
|
||||||
chkSessionTracking.Checked = oSettings.SessionTracking
|
chkSessionTracking.Checked = oSettings.SessionTracking
|
||||||
|
chkShowResolvedPaths.Checked = oSettings.ShowResolvedPaths
|
||||||
chkSuppressBackup.Checked = oSettings.SuppressBackup
|
chkSuppressBackup.Checked = oSettings.SuppressBackup
|
||||||
nudSuppressBackupThreshold.Value = oSettings.SuppressBackupThreshold
|
nudSuppressBackupThreshold.Value = oSettings.SuppressBackupThreshold
|
||||||
nudSuppressBackupThreshold.Enabled = chkSuppressBackup.Checked
|
nudSuppressBackupThreshold.Enabled = chkSuppressBackup.Checked
|
||||||
@@ -322,6 +324,7 @@ Public Class frmSettings
|
|||||||
grpLogOptions.Text = frmSettings_grpLogOptions
|
grpLogOptions.Text = frmSettings_grpLogOptions
|
||||||
chkDisableSyncMessages.Text = frmSettings_chkDisableSyncMessages
|
chkDisableSyncMessages.Text = frmSettings_chkDisableSyncMessages
|
||||||
grpGameMonitoringOptions.Text = frmSettings_grpGameMonitoringOptions
|
grpGameMonitoringOptions.Text = frmSettings_grpGameMonitoringOptions
|
||||||
|
chkShowResolvedPaths.Text = frmSettings_chkShowResolvedPaths
|
||||||
|
|
||||||
'Unix Handler
|
'Unix Handler
|
||||||
If mgrCommon.IsUnix Then
|
If mgrCommon.IsUnix Then
|
||||||
|
|||||||
Generated
+9
-22
@@ -28,7 +28,6 @@ Partial Class frmSyncFields
|
|||||||
Me.chkVersion = New System.Windows.Forms.CheckBox()
|
Me.chkVersion = New System.Windows.Forms.CheckBox()
|
||||||
Me.chkCompany = New System.Windows.Forms.CheckBox()
|
Me.chkCompany = New System.Windows.Forms.CheckBox()
|
||||||
Me.chkGamePath = 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.btnCancel = New System.Windows.Forms.Button()
|
||||||
Me.btnSave = New System.Windows.Forms.Button()
|
Me.btnSave = New System.Windows.Forms.Button()
|
||||||
Me.grpFields.SuspendLayout()
|
Me.grpFields.SuspendLayout()
|
||||||
@@ -41,10 +40,9 @@ Partial Class frmSyncFields
|
|||||||
Me.grpFields.Controls.Add(Me.chkVersion)
|
Me.grpFields.Controls.Add(Me.chkVersion)
|
||||||
Me.grpFields.Controls.Add(Me.chkCompany)
|
Me.grpFields.Controls.Add(Me.chkCompany)
|
||||||
Me.grpFields.Controls.Add(Me.chkGamePath)
|
Me.grpFields.Controls.Add(Me.chkGamePath)
|
||||||
Me.grpFields.Controls.Add(Me.chkTimeStamp)
|
|
||||||
Me.grpFields.Location = New System.Drawing.Point(12, 12)
|
Me.grpFields.Location = New System.Drawing.Point(12, 12)
|
||||||
Me.grpFields.Name = "grpFields"
|
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.TabIndex = 0
|
||||||
Me.grpFields.TabStop = False
|
Me.grpFields.TabStop = False
|
||||||
Me.grpFields.Text = "Available Fields"
|
Me.grpFields.Text = "Available Fields"
|
||||||
@@ -52,7 +50,7 @@ Partial Class frmSyncFields
|
|||||||
'chkMonitorGame
|
'chkMonitorGame
|
||||||
'
|
'
|
||||||
Me.chkMonitorGame.AutoSize = True
|
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.Name = "chkMonitorGame"
|
||||||
Me.chkMonitorGame.Size = New System.Drawing.Size(109, 17)
|
Me.chkMonitorGame.Size = New System.Drawing.Size(109, 17)
|
||||||
Me.chkMonitorGame.TabIndex = 5
|
Me.chkMonitorGame.TabIndex = 5
|
||||||
@@ -62,7 +60,7 @@ Partial Class frmSyncFields
|
|||||||
'chkIcon
|
'chkIcon
|
||||||
'
|
'
|
||||||
Me.chkIcon.AutoSize = True
|
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.Name = "chkIcon"
|
||||||
Me.chkIcon.Size = New System.Drawing.Size(148, 17)
|
Me.chkIcon.Size = New System.Drawing.Size(148, 17)
|
||||||
Me.chkIcon.TabIndex = 4
|
Me.chkIcon.TabIndex = 4
|
||||||
@@ -72,7 +70,7 @@ Partial Class frmSyncFields
|
|||||||
'chkVersion
|
'chkVersion
|
||||||
'
|
'
|
||||||
Me.chkVersion.AutoSize = True
|
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.Name = "chkVersion"
|
||||||
Me.chkVersion.Size = New System.Drawing.Size(61, 17)
|
Me.chkVersion.Size = New System.Drawing.Size(61, 17)
|
||||||
Me.chkVersion.TabIndex = 3
|
Me.chkVersion.TabIndex = 3
|
||||||
@@ -82,7 +80,7 @@ Partial Class frmSyncFields
|
|||||||
'chkCompany
|
'chkCompany
|
||||||
'
|
'
|
||||||
Me.chkCompany.AutoSize = True
|
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.Name = "chkCompany"
|
||||||
Me.chkCompany.Size = New System.Drawing.Size(70, 17)
|
Me.chkCompany.Size = New System.Drawing.Size(70, 17)
|
||||||
Me.chkCompany.TabIndex = 2
|
Me.chkCompany.TabIndex = 2
|
||||||
@@ -92,27 +90,17 @@ Partial Class frmSyncFields
|
|||||||
'chkGamePath
|
'chkGamePath
|
||||||
'
|
'
|
||||||
Me.chkGamePath.AutoSize = True
|
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.Name = "chkGamePath"
|
||||||
Me.chkGamePath.Size = New System.Drawing.Size(180, 17)
|
Me.chkGamePath.Size = New System.Drawing.Size(180, 17)
|
||||||
Me.chkGamePath.TabIndex = 1
|
Me.chkGamePath.TabIndex = 1
|
||||||
Me.chkGamePath.Text = "Game Path (Not Recommended)"
|
Me.chkGamePath.Text = "Game Path (Not Recommended)"
|
||||||
Me.chkGamePath.UseVisualStyleBackColor = True
|
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
|
'btnCancel
|
||||||
'
|
'
|
||||||
Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
|
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.Name = "btnCancel"
|
||||||
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
|
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
|
||||||
Me.btnCancel.TabIndex = 2
|
Me.btnCancel.TabIndex = 2
|
||||||
@@ -122,7 +110,7 @@ Partial Class frmSyncFields
|
|||||||
'btnSave
|
'btnSave
|
||||||
'
|
'
|
||||||
Me.btnSave.DialogResult = System.Windows.Forms.DialogResult.OK
|
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.Name = "btnSave"
|
||||||
Me.btnSave.Size = New System.Drawing.Size(75, 23)
|
Me.btnSave.Size = New System.Drawing.Size(75, 23)
|
||||||
Me.btnSave.TabIndex = 1
|
Me.btnSave.TabIndex = 1
|
||||||
@@ -133,7 +121,7 @@ Partial Class frmSyncFields
|
|||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
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.btnCancel)
|
||||||
Me.Controls.Add(Me.btnSave)
|
Me.Controls.Add(Me.btnSave)
|
||||||
Me.Controls.Add(Me.grpFields)
|
Me.Controls.Add(Me.grpFields)
|
||||||
@@ -157,7 +145,6 @@ Partial Class frmSyncFields
|
|||||||
Friend WithEvents chkVersion As CheckBox
|
Friend WithEvents chkVersion As CheckBox
|
||||||
Friend WithEvents chkCompany As CheckBox
|
Friend WithEvents chkCompany As CheckBox
|
||||||
Friend WithEvents chkGamePath As CheckBox
|
Friend WithEvents chkGamePath As CheckBox
|
||||||
Friend WithEvents chkTimeStamp As CheckBox
|
|
||||||
Friend WithEvents btnCancel As Button
|
Friend WithEvents btnCancel As Button
|
||||||
Friend WithEvents btnSave As Button
|
Friend WithEvents btnSave As Button
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -26,9 +26,6 @@ Public Class frmSyncFields
|
|||||||
If (eSyncFields And clsGame.eOptionalSyncFields.MonitorGame) = clsGame.eOptionalSyncFields.MonitorGame Then
|
If (eSyncFields And clsGame.eOptionalSyncFields.MonitorGame) = clsGame.eOptionalSyncFields.MonitorGame Then
|
||||||
chkMonitorGame.Checked = True
|
chkMonitorGame.Checked = True
|
||||||
End If
|
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
|
If (eSyncFields And clsGame.eOptionalSyncFields.Version) = clsGame.eOptionalSyncFields.Version Then
|
||||||
chkVersion.Checked = True
|
chkVersion.Checked = True
|
||||||
End If
|
End If
|
||||||
@@ -47,7 +44,6 @@ Public Class frmSyncFields
|
|||||||
chkVersion.Text = frmSyncFields_chkVersion
|
chkVersion.Text = frmSyncFields_chkVersion
|
||||||
chkCompany.Text = frmSyncFields_chkCompany
|
chkCompany.Text = frmSyncFields_chkCompany
|
||||||
chkGamePath.Text = frmSyncFields_chkGamePath
|
chkGamePath.Text = frmSyncFields_chkGamePath
|
||||||
chkTimeStamp.Text = frmSyncFields_chkTimeStamp
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub frmSyncFields_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
Private Sub frmSyncFields_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
@@ -65,14 +61,6 @@ Public Class frmSyncFields
|
|||||||
Me.Close()
|
Me.Close()
|
||||||
End Sub
|
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
|
Private Sub chkGamePath_CheckedChanged(sender As Object, e As EventArgs) Handles chkGamePath.CheckedChanged
|
||||||
If chkGamePath.Checked Then
|
If chkGamePath.Checked Then
|
||||||
SyncFields = clsGame.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.GamePath)
|
SyncFields = clsGame.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.GamePath)
|
||||||
|
|||||||
@@ -289,6 +289,12 @@ Public Class frmVariableManager
|
|||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If mgrVariables.GetReservedVariables.Contains(txtName.Text.ToUpper) Then
|
||||||
|
mgrCommon.ShowMessage(frmVariableManager_ErrorVariableReserved, txtName.Text, MsgBoxStyle.Exclamation)
|
||||||
|
txtName.Focus()
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
+97
-17
@@ -42,7 +42,7 @@ Public Class mgrBackup
|
|||||||
'Create manifest item
|
'Create manifest item
|
||||||
oItem.MonitorID = oGameInfo.ID
|
oItem.MonitorID = oGameInfo.ID
|
||||||
'Keep the path relative to the manifest location
|
'Keep the path relative to the manifest location
|
||||||
oItem.FileName = sBackupFile.Replace(Path.GetDirectoryName(mgrPath.RemoteDatabaseLocation) & Path.DirectorySeparatorChar, "")
|
oItem.FileName = sBackupFile.Replace(Settings.BackupFolder & Path.DirectorySeparatorChar, String.Empty)
|
||||||
oItem.DateUpdated = dTimeStamp
|
oItem.DateUpdated = dTimeStamp
|
||||||
oItem.UpdatedBy = My.Computer.Name
|
oItem.UpdatedBy = My.Computer.Name
|
||||||
oItem.CheckSum = sCheckSum
|
oItem.CheckSum = sCheckSum
|
||||||
@@ -116,6 +116,7 @@ Public Class mgrBackup
|
|||||||
Public Function CheckBackupPrereq(ByVal oGame As clsGame) As Boolean
|
Public Function CheckBackupPrereq(ByVal oGame As clsGame) As Boolean
|
||||||
Dim sBackupFile As String = oSettings.BackupFolder
|
Dim sBackupFile As String = oSettings.BackupFolder
|
||||||
Dim sSavePath As String
|
Dim sSavePath As String
|
||||||
|
Dim sOverwriteMessage As String
|
||||||
Dim lAvailableSpace As Long
|
Dim lAvailableSpace As Long
|
||||||
Dim lFolderSize As Long
|
Dim lFolderSize As Long
|
||||||
|
|
||||||
@@ -142,21 +143,30 @@ Public Class mgrBackup
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If mgrRestore.CheckManifest(oGame.ID) Then
|
'A manifest check is only required when "Save Multiple Backups" is disabled
|
||||||
If mgrCommon.ShowMessage(mgrBackup_ConfirmManifestConflict, oGame.Name, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
If Not oGame.AppendTimeStamp Then
|
||||||
RaiseEvent UpdateLog(mgrBackup_ErrorManifestConflict, False, ToolTipIcon.Error, True)
|
If mgrRestore.CheckManifest(oGame.ID) Then
|
||||||
Return False
|
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
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If oSettings.ShowOverwriteWarning And File.Exists(sBackupFile) And Not oGame.AppendTimeStamp Then
|
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)
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorOverwriteAbort, oGame.Name), False, ToolTipIcon.Error, True)
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub CheckOldBackups(ByVal oGame As clsGame)
|
Private Sub CheckOldBackups(ByVal oGame As clsGame)
|
||||||
@@ -186,6 +196,83 @@ Public Class mgrBackup
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Function BuildFileTimeStamp(ByVal dDate As Date) As String
|
||||||
|
Return " " & dDate.Month & "-" & dDate.Day & "-" & dDate.Year & "-" & dDate.Hour & "-" & dDate.Minute & "-" & dDate.Second
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function HandleSubFolder(ByVal oGame As clsGame, ByVal sPath As String) As Boolean
|
||||||
|
Try
|
||||||
|
If Not Directory.Exists(sPath) Then
|
||||||
|
Directory.CreateDirectory(sPath)
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorSubFolderCreate, New String() {oGame.Name, ex.Message}), False, ToolTipIcon.Error, True)
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Sub ImportBackupFiles(ByVal hshImportList As Hashtable)
|
||||||
|
Dim oGame As clsGame
|
||||||
|
Dim bOverwriteCurrent As Boolean = False
|
||||||
|
Dim bContinue As Boolean = True
|
||||||
|
Dim sFileToImport As String
|
||||||
|
Dim sBackupFile As String
|
||||||
|
Dim oBackup As clsBackup
|
||||||
|
|
||||||
|
For Each de As DictionaryEntry In hshImportList
|
||||||
|
sFileToImport = CStr(de.Key)
|
||||||
|
oGame = DirectCast(de.Value, clsGame)
|
||||||
|
|
||||||
|
'Enter overwite mode if we are importing a single backup and "Save Multiple Backups" is not enabled.
|
||||||
|
If hshImportList.Count = 1 And Not oGame.AppendTimeStamp Then bOverwriteCurrent = True
|
||||||
|
|
||||||
|
If File.Exists(sFileToImport) Then
|
||||||
|
sBackupFile = oSettings.BackupFolder
|
||||||
|
|
||||||
|
If oSettings.CreateSubFolder Then
|
||||||
|
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame)
|
||||||
|
bContinue = HandleSubFolder(oGame, sBackupFile)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If bContinue Then
|
||||||
|
oBackup = New clsBackup
|
||||||
|
oBackup.MonitorID = oGame.ID
|
||||||
|
oBackup.DateUpdated = File.GetLastWriteTime(sFileToImport)
|
||||||
|
oBackup.UpdatedBy = mgrBackup_ImportedFile
|
||||||
|
If bOverwriteCurrent Then
|
||||||
|
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame) & ".7z"
|
||||||
|
Else
|
||||||
|
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame) & BuildFileTimeStamp(oBackup.DateUpdated) & ".7z"
|
||||||
|
End If
|
||||||
|
|
||||||
|
oBackup.FileName = sBackupFile.Replace(Settings.BackupFolder & Path.DirectorySeparatorChar, String.Empty)
|
||||||
|
|
||||||
|
If bOverwriteCurrent Then
|
||||||
|
If mgrCommon.CopyFile(sFileToImport, sBackupFile, True) Then
|
||||||
|
oBackup.CheckSum = mgrHash.Generate_SHA256_Hash(sBackupFile)
|
||||||
|
If Not mgrManifest.DoUpdateLatestManifest(oBackup, mgrSQLite.Database.Remote) Then
|
||||||
|
mgrManifest.DoManifestAdd(oBackup, mgrSQLite.Database.Remote)
|
||||||
|
End If
|
||||||
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ImportSuccess, New String() {sFileToImport, oGame.Name}), False, ToolTipIcon.Info, True)
|
||||||
|
Else
|
||||||
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorImportBackupCopy, sFileToImport), False, ToolTipIcon.Error, True)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If mgrCommon.CopyFile(sFileToImport, sBackupFile, False) Then
|
||||||
|
oBackup.CheckSum = mgrHash.Generate_SHA256_Hash(sBackupFile)
|
||||||
|
mgrManifest.DoManifestAdd(oBackup, mgrSQLite.Database.Remote)
|
||||||
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ImportSuccess, New String() {sFileToImport, oGame.Name}), False, ToolTipIcon.Info, True)
|
||||||
|
Else
|
||||||
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorImportBackupCopy, sFileToImport), False, ToolTipIcon.Error, True)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
Public Sub DoBackup(ByVal oBackupList As List(Of clsGame))
|
Public Sub DoBackup(ByVal oBackupList As List(Of clsGame))
|
||||||
Dim oGame As clsGame
|
Dim oGame As clsGame
|
||||||
Dim bDoBackup As Boolean
|
Dim bDoBackup As Boolean
|
||||||
@@ -203,7 +290,7 @@ Public Class mgrBackup
|
|||||||
sBackupFile = oSettings.BackupFolder
|
sBackupFile = oSettings.BackupFolder
|
||||||
sSavePath = String.Empty
|
sSavePath = String.Empty
|
||||||
dTimeStamp = Date.Now
|
dTimeStamp = Date.Now
|
||||||
sTimeStamp = " " & dTimeStamp.Month & "-" & dTimeStamp.Day & "-" & dTimeStamp.Year & "-" & dTimeStamp.Hour & "-" & dTimeStamp.Minute & "-" & dTimeStamp.Second
|
sTimeStamp = BuildFileTimeStamp(dTimeStamp)
|
||||||
sHash = String.Empty
|
sHash = String.Empty
|
||||||
bDoBackup = True
|
bDoBackup = True
|
||||||
bBackupCompleted = False
|
bBackupCompleted = False
|
||||||
@@ -212,18 +299,11 @@ Public Class mgrBackup
|
|||||||
|
|
||||||
If oSettings.CreateSubFolder Then
|
If oSettings.CreateSubFolder Then
|
||||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame)
|
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame)
|
||||||
Try
|
bDoBackup = HandleSubFolder(oGame, sBackupFile)
|
||||||
If Not Directory.Exists(sBackupFile) Then
|
|
||||||
Directory.CreateDirectory(sBackupFile)
|
|
||||||
End If
|
|
||||||
Catch ex As Exception
|
|
||||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorSubFolderCreate, New String() {oGame.Name, ex.Message}), False, ToolTipIcon.Error, True)
|
|
||||||
bDoBackup = False
|
|
||||||
End Try
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If oGame.AppendTimeStamp Then
|
If oGame.AppendTimeStamp Then
|
||||||
CheckOldBackups(oGame)
|
If oGame.BackupLimit > 0 Then CheckOldBackups(oGame)
|
||||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame) & sTimeStamp & ".7z"
|
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame) & sTimeStamp & ".7z"
|
||||||
Else
|
Else
|
||||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame) & ".7z"
|
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame) & ".7z"
|
||||||
|
|||||||
+77
-24
@@ -9,8 +9,8 @@ Imports System.Runtime.Serialization.Formatters.Binary
|
|||||||
Public Class mgrCommon
|
Public Class mgrCommon
|
||||||
|
|
||||||
'These need to be updated when upgrading the packaged 7z utility
|
'These need to be updated when upgrading the packaged 7z utility
|
||||||
Private Shared sUtility64Hash As String = "F558DFBB7F2BF5D9A002AC68843A2E79E4EC045EDD7F56213562ACFA75CC77AD" 'v18.01 7za.exe x64
|
Private Shared sUtility64Hash As String = "8BC2A3D6C37C4DB9BD487AD35039AE0DC8A1DDF2C3B1F0B76B3E678FEBB9F223" 'v18.05 7za.exe x64
|
||||||
Private Shared sUtility32Hash As String = "E6855553350FA6FB23E05839C7F3EF140DAD29D9A0E3495DE4D1B17A9FBF5CA4" 'v18.01 7za.exe x86
|
Private Shared sUtility32Hash As String = "77613CCA716EDF68B9D5BAB951463ED7FADE5BC0EC465B36190A76299C50F117" 'v18.05 7za.exe x86
|
||||||
|
|
||||||
Public Shared ReadOnly Property UtilityHash As String
|
Public Shared ReadOnly Property UtilityHash As String
|
||||||
Get
|
Get
|
||||||
@@ -65,6 +65,18 @@ Public Class mgrCommon
|
|||||||
Return oFormatter.Deserialize(oStream)
|
Return oFormatter.Deserialize(oStream)
|
||||||
End Function
|
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
|
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
|
If (sURL.IndexOf("http://", 0, StringComparison.CurrentCultureIgnoreCase) > -1) Or (sURL.IndexOf("https://", 0, StringComparison.CurrentCultureIgnoreCase) > -1) Then
|
||||||
Return True
|
Return True
|
||||||
@@ -132,9 +144,9 @@ Public Class mgrCommon
|
|||||||
Return String.Empty
|
Return String.Empty
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function OpenFileBrowser(ByVal sName As String, ByVal sTitle As String, ByVal sExtension As String, ByVal sFileType As String, ByVal sDefaultFolder As String,
|
Private Shared Function BuildFileBrowser(ByVal sName As String, ByVal sTitle As String, ByVal sExtension As String, ByVal sFileType As String, ByVal sDefaultFolder As String,
|
||||||
ByVal bMulti As Boolean, Optional ByVal bSavedPath As Boolean = True) As String
|
ByVal bMulti As Boolean, ByRef fbBrowser As OpenFileDialog, Optional ByVal bSavedPath As Boolean = True) As Boolean
|
||||||
Dim fbBrowser As New OpenFileDialog
|
|
||||||
Dim oSavedPath As New clsSavedPath
|
Dim oSavedPath As New clsSavedPath
|
||||||
|
|
||||||
fbBrowser.Title = sTitle
|
fbBrowser.Title = sTitle
|
||||||
@@ -159,21 +171,40 @@ Public Class mgrCommon
|
|||||||
mgrSavedPath.AddUpdatePath(oSavedPath)
|
mgrSavedPath.AddUpdatePath(oSavedPath)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If bMulti Then
|
Return True
|
||||||
Dim sFileNames As String = String.Empty
|
End If
|
||||||
For Each sFileName As String In fbBrowser.FileNames
|
|
||||||
sFileNames &= sFileName & "|"
|
Return False
|
||||||
Next
|
End Function
|
||||||
sFileNames = sFileNames.TrimEnd("|")
|
|
||||||
Return sFileNames
|
Public Shared Function OpenFileBrowser(ByVal sName As String, ByVal sTitle As String, ByVal sExtension As String, ByVal sFileType As String, ByVal sDefaultFolder As String,
|
||||||
Else
|
Optional ByVal bSavedPath As Boolean = True) As String
|
||||||
Return fbBrowser.FileName
|
Dim fbBrowser As New OpenFileDialog
|
||||||
End If
|
Dim bResult As Boolean
|
||||||
|
|
||||||
|
bResult = BuildFileBrowser(sName, sTitle, sExtension, sFileType, sDefaultFolder, False, fbBrowser, bSavedPath)
|
||||||
|
|
||||||
|
If bResult Then
|
||||||
|
Return fbBrowser.FileName
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return String.Empty
|
Return String.Empty
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function OpenMultiFileBrowser(ByVal sName As String, ByVal sTitle As String, ByVal sExtension As String, ByVal sFileType As String, ByVal sDefaultFolder As String,
|
||||||
|
Optional ByVal bSavedPath As Boolean = True) As String()
|
||||||
|
Dim fbBrowser As New OpenFileDialog
|
||||||
|
Dim bResult As Boolean
|
||||||
|
|
||||||
|
bResult = BuildFileBrowser(sName, sTitle, sExtension, sFileType, sDefaultFolder, True, fbBrowser, bSavedPath)
|
||||||
|
|
||||||
|
If bResult Then
|
||||||
|
Return fbBrowser.FileNames
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return New String() {}
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Shared Function OpenFolderBrowser(ByVal sName As String, ByVal sTitle As String, ByVal sDefaultFolder As String, ByVal bEnableNewFolder As Boolean,
|
Public Shared Function OpenFolderBrowser(ByVal sName As String, ByVal sTitle As String, ByVal sDefaultFolder As String, ByVal bEnableNewFolder As Boolean,
|
||||||
Optional ByVal bSavedPath As Boolean = True) As String
|
Optional ByVal bSavedPath As Boolean = True) As String
|
||||||
Dim fbBrowser As New FolderBrowserDialog
|
Dim fbBrowser As New FolderBrowserDialog
|
||||||
@@ -213,7 +244,7 @@ Public Class mgrCommon
|
|||||||
If oGame.ProcessName.ToLower.Contains(s) Then bFound = True
|
If oGame.ProcessName.ToLower.Contains(s) Then bFound = True
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If bFound Or oGame.Duplicate = True Then
|
If bFound Then
|
||||||
Return True
|
Return True
|
||||||
Else
|
Else
|
||||||
Return False
|
Return False
|
||||||
@@ -403,6 +434,21 @@ Public Class mgrCommon
|
|||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
'Copy a file
|
||||||
|
Public Shared Function CopyFile(ByVal sSourcePath As String, ByVal sDestinationPath As String, ByVal bOverWrite As Boolean) As Boolean
|
||||||
|
Try
|
||||||
|
If File.Exists(sSourcePath) Then
|
||||||
|
File.Copy(sSourcePath, sDestinationPath, bOverWrite)
|
||||||
|
Else
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Catch
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
'Delete file based on OS type
|
'Delete file based on OS type
|
||||||
Public Shared Sub DeleteFile(ByVal sPath As String, Optional ByVal bRecycle As Boolean = True)
|
Public Shared Sub DeleteFile(ByVal sPath As String, Optional ByVal bRecycle As Boolean = True)
|
||||||
If File.Exists(sPath) Then
|
If File.Exists(sPath) Then
|
||||||
@@ -434,15 +480,22 @@ Public Class mgrCommon
|
|||||||
Dim oDir As DirectoryInfo
|
Dim oDir As DirectoryInfo
|
||||||
Dim sDir As String = sBackupFolder & oBackup.MonitorID
|
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 oBackup.FileName.StartsWith(oBackup.MonitorID & Path.DirectorySeparatorChar) Then
|
||||||
If Directory.Exists(sDir) Then
|
sDir = sBackupFolder & oBackup.MonitorID
|
||||||
'Check if there's any sub-directories or files remaining
|
ElseIf oBackup.FileName.StartsWith(oBackup.FileSafeName & Path.DirectorySeparatorChar) Then
|
||||||
oDir = New DirectoryInfo(sDir)
|
sDir = sBackupFolder & oBackup.FileSafeName
|
||||||
If oDir.GetDirectories.Length = 0 And oDir.GetFiles.Length = 0 Then
|
Else
|
||||||
'Folder is empty, delete the empty sub-folder
|
Exit Sub
|
||||||
If Directory.Exists(sDir) Then DeleteDirectory(sDir)
|
End If
|
||||||
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 If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -76,11 +76,11 @@
|
|||||||
|
|
||||||
End Sub
|
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 oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||||
Dim oData As DataSet
|
Dim oData As DataSet
|
||||||
Dim sSQL As String
|
Dim sSQL As String
|
||||||
Dim hshList As New Hashtable
|
Dim slList As New SortedList
|
||||||
Dim hshParams As New Hashtable
|
Dim hshParams As New Hashtable
|
||||||
Dim oTag As clsTag
|
Dim oTag As clsTag
|
||||||
|
|
||||||
@@ -94,10 +94,10 @@
|
|||||||
oTag = New clsTag
|
oTag = New clsTag
|
||||||
oTag.ID = CStr(dr("TagID"))
|
oTag.ID = CStr(dr("TagID"))
|
||||||
oTag.Name = CStr(dr("Name"))
|
oTag.Name = CStr(dr("Name"))
|
||||||
hshList.Add(oTag.Name, oTag)
|
slList.Add(oTag.Name, oTag)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Return hshList
|
Return slList
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function GetTagsByGameForExport(ByVal sMonitorID As String) As List(Of Tag)
|
Public Shared Function GetTagsByGameForExport(ByVal sMonitorID As String) As List(Of Tag)
|
||||||
@@ -108,7 +108,7 @@
|
|||||||
Dim hshParams As New Hashtable
|
Dim hshParams As New Hashtable
|
||||||
Dim oTag As Tag
|
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)
|
hshParams.Add("ID", sMonitorID)
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ Public Class mgrMonitorList
|
|||||||
|
|
||||||
hshParams.Add("ID", oGame.ID)
|
hshParams.Add("ID", oGame.ID)
|
||||||
hshParams.Add("Name", oGame.Name)
|
hshParams.Add("Name", oGame.Name)
|
||||||
hshParams.Add("Process", oGame.TrueProcess)
|
hshParams.Add("Process", oGame.ProcessName)
|
||||||
hshParams.Add("Path", oGame.TruePath)
|
hshParams.Add("Path", oGame.TruePath)
|
||||||
hshParams.Add("AbsolutePath", oGame.AbsolutePath)
|
hshParams.Add("AbsolutePath", oGame.AbsolutePath)
|
||||||
hshParams.Add("FolderSave", oGame.FolderSave)
|
hshParams.Add("FolderSave", oGame.FolderSave)
|
||||||
@@ -75,10 +75,8 @@ Public Class mgrMonitorList
|
|||||||
Dim hshList As New Hashtable
|
Dim hshList As New Hashtable
|
||||||
Dim hshDupeList As New Hashtable
|
Dim hshDupeList As New Hashtable
|
||||||
Dim oGame As clsGame
|
Dim oGame As clsGame
|
||||||
Dim oCompareGame As clsGame
|
|
||||||
Dim bIsDupe As Boolean
|
|
||||||
|
|
||||||
sSQL = "Select * FROM monitorlist ORDER BY Name Asc"
|
sSQL = "SELECT * FROM monitorlist ORDER BY Name ASC"
|
||||||
oData = oDatabase.ReadParamData(sSQL, New Hashtable)
|
oData = oDatabase.ReadParamData(sSQL, New Hashtable)
|
||||||
|
|
||||||
For Each dr As DataRow In oData.Tables(0).Rows
|
For Each dr As DataRow In oData.Tables(0).Rows
|
||||||
@@ -87,39 +85,7 @@ Public Class mgrMonitorList
|
|||||||
Case eListTypes.FullList
|
Case eListTypes.FullList
|
||||||
hshList.Add(oGame.ID, oGame)
|
hshList.Add(oGame.ID, oGame)
|
||||||
Case eListTypes.ScanList
|
Case eListTypes.ScanList
|
||||||
For Each de As DictionaryEntry In hshList
|
If oGame.Enabled Then hshList.Add(oGame.ID, oGame)
|
||||||
bIsDupe = False
|
|
||||||
oCompareGame = DirectCast(de.Value, clsGame)
|
|
||||||
|
|
||||||
If oCompareGame.IsRegEx Then
|
|
||||||
If oGame.IsRegEx Then
|
|
||||||
If oCompareGame.ProcessName = oGame.ProcessName Then
|
|
||||||
bIsDupe = True
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
If Regex.IsMatch(oGame.ProcessName, oCompareGame.ProcessName) Then
|
|
||||||
bIsDupe = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
If oGame.IsRegEx Then
|
|
||||||
If Regex.IsMatch(oCompareGame.ProcessName, oGame.ProcessName) Then
|
|
||||||
bIsDupe = True
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
If oGame.ProcessName = oCompareGame.ProcessName Then
|
|
||||||
bIsDupe = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If bIsDupe Then
|
|
||||||
DirectCast(hshList.Item(oCompareGame.ProcessName), clsGame).Duplicate = True
|
|
||||||
oGame.ProcessName = oGame.CompoundKey
|
|
||||||
oGame.Duplicate = True
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
If oGame.Enabled Then hshList.Add(oGame.ProcessName, oGame)
|
|
||||||
End Select
|
End Select
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@@ -373,8 +339,6 @@ Public Class mgrMonitorList
|
|||||||
Dim sVersion As String
|
Dim sVersion As String
|
||||||
Dim sCompany As String
|
Dim sCompany As String
|
||||||
Dim sMonitorGame As String
|
Dim sMonitorGame As String
|
||||||
Dim sTimeStamp As String
|
|
||||||
Dim sBackupLimit As String
|
|
||||||
|
|
||||||
'Setup SQL for optional fields
|
'Setup SQL for optional fields
|
||||||
If (eSyncFields And clsGame.eOptionalSyncFields.Company) = clsGame.eOptionalSyncFields.Company Then
|
If (eSyncFields And clsGame.eOptionalSyncFields.Company) = clsGame.eOptionalSyncFields.Company Then
|
||||||
@@ -397,13 +361,6 @@ Public Class mgrMonitorList
|
|||||||
Else
|
Else
|
||||||
sMonitorGame = "COALESCE((SELECT Enabled FROM monitorlist WHERE MonitorID=@ID),1)"
|
sMonitorGame = "COALESCE((SELECT Enabled FROM monitorlist WHERE MonitorID=@ID),1)"
|
||||||
End If
|
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
|
If (eSyncFields And clsGame.eOptionalSyncFields.Version) = clsGame.eOptionalSyncFields.Version Then
|
||||||
sVersion = "@Version"
|
sVersion = "@Version"
|
||||||
Else
|
Else
|
||||||
@@ -412,9 +369,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 = "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 &= "VALUES (@ID, @Name, @Process, @Path, @AbsolutePath, @FolderSave, @FileType, "
|
||||||
sSQL &= sTimeStamp & ", @ExcludeList, " & sGamePath & ", "
|
sSQL &= "@TimeStamp, @ExcludeList, " & sGamePath & ", "
|
||||||
sSQL &= sIcon & ", @Hours, " & sVersion & ", "
|
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
|
For Each oGame As clsGame In hshGames.Values
|
||||||
hshParams = New Hashtable
|
hshParams = New Hashtable
|
||||||
@@ -422,10 +379,12 @@ Public Class mgrMonitorList
|
|||||||
'Core Parameters
|
'Core Parameters
|
||||||
hshParams.Add("ID", oGame.ID)
|
hshParams.Add("ID", oGame.ID)
|
||||||
hshParams.Add("Name", oGame.Name)
|
hshParams.Add("Name", oGame.Name)
|
||||||
hshParams.Add("Process", oGame.TrueProcess)
|
hshParams.Add("Process", oGame.ProcessName)
|
||||||
hshParams.Add("Path", oGame.TruePath)
|
hshParams.Add("Path", oGame.TruePath)
|
||||||
hshParams.Add("AbsolutePath", oGame.AbsolutePath)
|
hshParams.Add("AbsolutePath", oGame.AbsolutePath)
|
||||||
hshParams.Add("FolderSave", oGame.FolderSave)
|
hshParams.Add("FolderSave", oGame.FolderSave)
|
||||||
|
hshParams.Add("TimeStamp", oGame.AppendTimeStamp)
|
||||||
|
hshParams.Add("BackupLimit", oGame.BackupLimit)
|
||||||
hshParams.Add("FileType", oGame.FileType)
|
hshParams.Add("FileType", oGame.FileType)
|
||||||
hshParams.Add("ExcludeList", oGame.ExcludeList)
|
hshParams.Add("ExcludeList", oGame.ExcludeList)
|
||||||
hshParams.Add("Hours", oGame.Hours)
|
hshParams.Add("Hours", oGame.Hours)
|
||||||
@@ -448,10 +407,6 @@ Public Class mgrMonitorList
|
|||||||
If (eSyncFields And clsGame.eOptionalSyncFields.MonitorGame) = clsGame.eOptionalSyncFields.MonitorGame Then
|
If (eSyncFields And clsGame.eOptionalSyncFields.MonitorGame) = clsGame.eOptionalSyncFields.MonitorGame Then
|
||||||
hshParams.Add("Enabled", oGame.Enabled)
|
hshParams.Add("Enabled", oGame.Enabled)
|
||||||
End If
|
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
|
If (eSyncFields And clsGame.eOptionalSyncFields.Version) = clsGame.eOptionalSyncFields.Version Then
|
||||||
hshParams.Add("Version", oGame.Version)
|
hshParams.Add("Version", oGame.Version)
|
||||||
End If
|
End If
|
||||||
@@ -491,7 +446,7 @@ Public Class mgrMonitorList
|
|||||||
oDatabase.RunMassParamQuery(sSQL, oParamList)
|
oDatabase.RunMassParamQuery(sSQL, oParamList)
|
||||||
End Sub
|
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 hshCompareFrom As Hashtable
|
||||||
Dim hshCompareTo As Hashtable
|
Dim hshCompareTo As Hashtable
|
||||||
Dim hshSyncItems As Hashtable
|
Dim hshSyncItems As Hashtable
|
||||||
@@ -520,11 +475,15 @@ Public Class mgrMonitorList
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'Sync Wipe Protection
|
'Sync Wipe Protection
|
||||||
If hshCompareFrom.Count = 0 And hshCompareTo.Count > 0 Then
|
If bSyncProtection Then
|
||||||
If mgrCommon.ShowMessage(mgrMonitorList_WarningSyncProtection, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
If hshCompareFrom.Count = 0 And hshCompareTo.Count > 0 Then
|
||||||
'We will always show this one in the log regardless of setting
|
Cursor.Current = Cursors.Default
|
||||||
RaiseEvent UpdateLog(mgrMonitorList_ErrorSyncCancel, False, ToolTipIcon.Warning, True)
|
If mgrCommon.ShowMessage(mgrMonitorList_WarningSyncProtection, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||||
Exit Sub
|
'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
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -778,6 +737,8 @@ Public Class mgrMonitorList
|
|||||||
If Not IsDBNull(dr("Path")) Then oGame.Path = CStr(dr("Path"))
|
If Not IsDBNull(dr("Path")) Then oGame.Path = CStr(dr("Path"))
|
||||||
oGame.AbsolutePath = CBool(dr("AbsolutePath"))
|
oGame.AbsolutePath = CBool(dr("AbsolutePath"))
|
||||||
oGame.FolderSave = CBool(dr("FolderSave"))
|
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("FileType")) Then oGame.FileType = CStr(dr("FileType"))
|
||||||
If Not IsDBNull(dr("ExcludeList")) Then oGame.ExcludeList = CStr(dr("ExcludeList"))
|
If Not IsDBNull(dr("ExcludeList")) Then oGame.ExcludeList = CStr(dr("ExcludeList"))
|
||||||
oGame.MonitorOnly = CBool(dr("MonitorOnly"))
|
oGame.MonitorOnly = CBool(dr("MonitorOnly"))
|
||||||
@@ -827,13 +788,13 @@ Public Class mgrMonitorList
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function DoImport(ByVal sPath As String, ByVal bOfficial As Boolean, ByRef oSettings As mgrSettings, Optional ByVal bStartUpWizard As Boolean = False) As Boolean
|
Public Shared Function DoImport(ByVal sPath As String, ByVal bOfficial As Boolean, ByRef oSettings As mgrSettings, Optional ByVal bStartUpWizard As Boolean = False, Optional ByVal bWinConfigsInLinux As Boolean = False) As Boolean
|
||||||
If mgrCommon.IsAddress(sPath) Then
|
If mgrCommon.IsAddress(sPath) Then
|
||||||
If mgrCommon.CheckAddress(sPath) Then
|
If mgrCommon.CheckAddress(sPath) Then
|
||||||
If bOfficial And Not bStartUpWizard And Not ((oSettings.SuppressMessages And mgrSettings.eSuppressMessages.GameIDSync) = mgrSettings.eSuppressMessages.GameIDSync) Then
|
If bOfficial And Not bStartUpWizard And Not ((oSettings.SuppressMessages And mgrSettings.eSuppressMessages.GameIDSync) = mgrSettings.eSuppressMessages.GameIDSync) Then
|
||||||
SyncGameIDs(sPath, oSettings, True)
|
SyncGameIDs(sPath, oSettings, True)
|
||||||
End If
|
End If
|
||||||
ImportMonitorList(sPath, True)
|
ImportMonitorList(sPath, True, bWinConfigsInLinux)
|
||||||
Return True
|
Return True
|
||||||
Else
|
Else
|
||||||
mgrCommon.ShowMessage(mgrMonitorList_WebNoReponse, sPath, MsgBoxStyle.Exclamation)
|
mgrCommon.ShowMessage(mgrMonitorList_WebNoReponse, sPath, MsgBoxStyle.Exclamation)
|
||||||
@@ -841,7 +802,7 @@ Public Class mgrMonitorList
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If File.Exists(sPath) Then
|
If File.Exists(sPath) Then
|
||||||
ImportMonitorList(sPath)
|
ImportMonitorList(sPath,, bWinConfigsInLinux)
|
||||||
Return True
|
Return True
|
||||||
Else
|
Else
|
||||||
mgrCommon.ShowMessage(mgrMonitorList_FileNotFound, sPath, MsgBoxStyle.Exclamation)
|
mgrCommon.ShowMessage(mgrMonitorList_FileNotFound, sPath, MsgBoxStyle.Exclamation)
|
||||||
@@ -851,7 +812,7 @@ Public Class mgrMonitorList
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Shared Sub ImportMonitorList(ByVal sLocation As String, Optional ByVal bWebRead As Boolean = False)
|
Private Shared Sub ImportMonitorList(ByVal sLocation As String, Optional ByVal bWebRead As Boolean = False, Optional ByVal bWinConfigsInLinux As Boolean = False)
|
||||||
Dim hshCompareFrom As New Hashtable
|
Dim hshCompareFrom As New Hashtable
|
||||||
Dim hshCompareTo As Hashtable
|
Dim hshCompareTo As Hashtable
|
||||||
Dim hshSyncItems As Hashtable
|
Dim hshSyncItems As Hashtable
|
||||||
@@ -865,7 +826,7 @@ Public Class mgrMonitorList
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If oExportInfo.AppVer < 110 Then
|
If oExportInfo.AppVer < 115 Then
|
||||||
If mgrCommon.ShowMessage(mgrMonitorList_ImportVersionWarning, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
If mgrCommon.ShowMessage(mgrMonitorList_ImportVersionWarning, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
@@ -898,6 +859,7 @@ Public Class mgrMonitorList
|
|||||||
Dim frm As New frmAdvancedImport
|
Dim frm As New frmAdvancedImport
|
||||||
frm.ImportInfo = oExportInfo
|
frm.ImportInfo = oExportInfo
|
||||||
frm.ImportData = hshSyncItems
|
frm.ImportData = hshSyncItems
|
||||||
|
frm.ModWinConfigsForLinux = bWinConfigsInLinux
|
||||||
If frm.ShowDialog() = DialogResult.OK Then
|
If frm.ShowDialog() = DialogResult.OK Then
|
||||||
Cursor.Current = Cursors.WaitCursor
|
Cursor.Current = Cursors.WaitCursor
|
||||||
|
|
||||||
|
|||||||
+249
-55
@@ -15,7 +15,8 @@ Public Class mgrPath
|
|||||||
Private Shared oReleaseType As ProcessorArchitecture = AssemblyName.GetAssemblyName(Application.ExecutablePath()).ProcessorArchitecture
|
Private Shared oReleaseType As ProcessorArchitecture = AssemblyName.GetAssemblyName(Application.ExecutablePath()).ProcessorArchitecture
|
||||||
|
|
||||||
Shared Sub New()
|
Shared Sub New()
|
||||||
hshCustomVariables = mgrVariables.ReadVariables
|
SetEnv()
|
||||||
|
LoadCustomVariables()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Shared ReadOnly Property ReleaseType As Integer
|
Shared ReadOnly Property ReleaseType As Integer
|
||||||
@@ -202,14 +203,149 @@ Public Class mgrPath
|
|||||||
Return sResult
|
Return sResult
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function ReplaceSpecialPaths(sValue As String) As String
|
Private Shared Function BuildWinePath(ByVal sPath As String, ByVal sWinePrefix As String) As String
|
||||||
Dim sMyDocs As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
|
Dim sRealPath As String
|
||||||
Dim sPublicDocs As String = Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments)
|
Dim cDriveLetter As Char
|
||||||
Dim sAppDataRoaming As String = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
|
Dim sWineDrive As String
|
||||||
Dim sAppDataLocal As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
|
|
||||||
Dim sCurrentUser As String = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)
|
|
||||||
Dim oCustomVariable As clsPathVariable
|
|
||||||
|
|
||||||
|
Try
|
||||||
|
'Grab Path
|
||||||
|
sRealPath = sPath.Split("=")(1)
|
||||||
|
|
||||||
|
'Remove Quotes
|
||||||
|
sRealPath = sRealPath.TrimStart("""")
|
||||||
|
sRealPath = sRealPath.TrimEnd("""")
|
||||||
|
|
||||||
|
'Flip Seperators
|
||||||
|
sRealPath = sRealPath.Replace("\\", "/")
|
||||||
|
|
||||||
|
'Change Wine Drive
|
||||||
|
cDriveLetter = sRealPath.Chars(sRealPath.IndexOf(":") - 1)
|
||||||
|
sWineDrive = "drive_" & cDriveLetter
|
||||||
|
sRealPath = sRealPath.Replace(cDriveLetter & ":", sWineDrive.ToLower)
|
||||||
|
|
||||||
|
Return sWinePrefix & Path.DirectorySeparatorChar & sRealPath
|
||||||
|
Catch ex As Exception
|
||||||
|
mgrCommon.ShowMessage(mgrPath_ErrorBuildingWinePath, ex.Message, MsgBoxStyle.Exclamation)
|
||||||
|
Return String.Empty
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function GetWineSavePath(ByVal sPrefix As String, ByVal sPath As String) As String
|
||||||
|
Dim sRegistry As String
|
||||||
|
Dim sWinePath As String
|
||||||
|
Dim sReplace As String
|
||||||
|
Dim oParse As Regex
|
||||||
|
Dim oMatch As Match
|
||||||
|
|
||||||
|
Try
|
||||||
|
If sPath.Contains("%APPDATA%") Then
|
||||||
|
sReplace = "%APPDATA%"
|
||||||
|
sRegistry = File.ReadAllText(sPrefix & Path.DirectorySeparatorChar & "user.reg")
|
||||||
|
oParse = New Regex("""AppData""="".+?(?=\n)")
|
||||||
|
ElseIf sPath.Contains("%LOCALAPPDATA%Low") Then
|
||||||
|
sReplace = "%LOCALAPPDATA%Low"
|
||||||
|
sRegistry = File.ReadAllText(sPrefix & Path.DirectorySeparatorChar & "user.reg")
|
||||||
|
oParse = New Regex("""{A520A1A4-1780-4FF6-BD18-167343C5AF16}""="".+?(?=\n)")
|
||||||
|
ElseIf sPath.Contains("%LOCALAPPDATA%") Then
|
||||||
|
sReplace = "%LOCALAPPDATA%"
|
||||||
|
sRegistry = File.ReadAllText(sPrefix & Path.DirectorySeparatorChar & "user.reg")
|
||||||
|
oParse = New Regex("""Local AppData""="".+?(?=\n)")
|
||||||
|
ElseIf sPath.Contains("%USERDOCUMENTS%") Then
|
||||||
|
sReplace = "%USERDOCUMENTS%"
|
||||||
|
sRegistry = File.ReadAllText(sPrefix & Path.DirectorySeparatorChar & "user.reg")
|
||||||
|
oParse = New Regex("""Personal""="".+?(?=\n)")
|
||||||
|
ElseIf sPath.Contains("%COMMONDOCUMENTS%") Then
|
||||||
|
sReplace = "%COMMONDOCUMENTS%"
|
||||||
|
sRegistry = File.ReadAllText(sPrefix & Path.DirectorySeparatorChar & "system.reg")
|
||||||
|
oParse = New Regex("""Common Documents""="".+?(?=\n)")
|
||||||
|
ElseIf sPath.Contains("%USERPROFILE%") Then
|
||||||
|
sReplace = "%USERPROFILE%"
|
||||||
|
sRegistry = File.ReadAllText(sPrefix & Path.DirectorySeparatorChar & "user.reg")
|
||||||
|
oParse = New Regex("""Desktop""="".+?(?=\\\\Desktop)")
|
||||||
|
Else
|
||||||
|
Return sPath
|
||||||
|
End If
|
||||||
|
|
||||||
|
If oParse.IsMatch(sRegistry) Then
|
||||||
|
oMatch = oParse.Match(sRegistry)
|
||||||
|
sWinePath = BuildWinePath(oMatch.Value, sPrefix)
|
||||||
|
sPath = sPath.Replace("\", Path.DirectorySeparatorChar)
|
||||||
|
Return sPath.Replace(sReplace, sWinePath)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return sPath
|
||||||
|
Catch ex As Exception
|
||||||
|
mgrCommon.ShowMessage(mgrPath_ErrorConvertWineSavePath, ex.Message, MsgBoxStyle.Exclamation)
|
||||||
|
Return sPath
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function GetWinePrefix(ByVal prs As Process) As String
|
||||||
|
Dim prps As Process
|
||||||
|
Dim sPsinfo As String
|
||||||
|
Dim oParse As New Regex("WINEPREFIX=.+?(?= )")
|
||||||
|
Dim oMatch As Match
|
||||||
|
|
||||||
|
Try
|
||||||
|
prps = New Process
|
||||||
|
prps.StartInfo.FileName = "/bin/ps"
|
||||||
|
prps.StartInfo.Arguments = "e " & prs.Id.ToString
|
||||||
|
prps.StartInfo.UseShellExecute = False
|
||||||
|
prps.StartInfo.RedirectStandardOutput = True
|
||||||
|
prps.StartInfo.CreateNoWindow = True
|
||||||
|
prps.Start()
|
||||||
|
sPsinfo = prps.StandardOutput.ReadToEnd()
|
||||||
|
If oParse.IsMatch(sPsinfo) Then
|
||||||
|
oMatch = oParse.Match(sPsinfo)
|
||||||
|
Return oMatch.Value.Trim("/").Split("=")(1)
|
||||||
|
Else
|
||||||
|
Return String.Empty
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
mgrCommon.ShowMessage(mgrPath_ErrorWinePrefix, ex.Message, MsgBoxStyle.Exclamation)
|
||||||
|
Return String.Empty
|
||||||
|
End Try
|
||||||
|
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
|
||||||
|
|
||||||
|
Private Shared Sub SetEnv()
|
||||||
|
If Not mgrCommon.IsUnix Then
|
||||||
|
Environment.SetEnvironmentVariable("USERDOCUMENTS", Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments))
|
||||||
|
Environment.SetEnvironmentVariable("COMMONDOCUMENTS", Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments))
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Shared Function ReplaceSpecialPaths(ByVal sValue As String) As String
|
||||||
|
Dim sXdgData As String = "${XDG_DATA_HOME:-~/.local/share}"
|
||||||
|
Dim sEnvAppDataLocal As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
|
||||||
|
Dim sXdgConfig As String = "${XDG_CONFIG_HOME:-~/.config}"
|
||||||
|
Dim sEnvAppDataRoaming As String = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
|
||||||
|
Dim sHomeDir As String = "${HOME}"
|
||||||
|
Dim sEnvCurrentUser As String = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)
|
||||||
|
Dim oCustomVariable As clsPathVariable
|
||||||
|
|
||||||
For Each oCustomVariable In hshCustomVariables.Values
|
For Each oCustomVariable In hshCustomVariables.Values
|
||||||
If sValue.Contains(oCustomVariable.FormattedName) Then
|
If sValue.Contains(oCustomVariable.FormattedName) Then
|
||||||
@@ -217,39 +353,69 @@ Public Class mgrPath
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If sValue.Contains("*appdatalocal*") Then
|
If mgrCommon.IsUnix Then
|
||||||
Return sValue.Replace("*appdatalocal*", sAppDataLocal)
|
'$VAR_iable
|
||||||
End If
|
Dim oParse As New Regex("\$([a-zA-Z0-9_]+)")
|
||||||
|
'${VAR_iable} but not advanced syntax like ${VAR:-iable}
|
||||||
If sValue.Contains("*appdataroaming*") Then
|
Dim oParseBracketed As New Regex("\$\{([a-zA-Z0-9_]+?)\}")
|
||||||
Return sValue.Replace("*appdataroaming*", sAppDataRoaming)
|
'~ not inside ${...}
|
||||||
End If
|
Dim oParseTilde As New Regex("~(?![^\$\{]*\})")
|
||||||
|
If sEnvCurrentUser = String.Empty Then
|
||||||
'This needs to be tested last for Unix compatability
|
'Fall back
|
||||||
If sValue.Contains("*mydocs*") Then
|
sEnvCurrentUser = Environment.GetFolderPath(Environment.SpecialFolder.Personal)
|
||||||
Return sValue.Replace("*mydocs*", sMyDocs)
|
End If
|
||||||
End If
|
If sEnvCurrentUser = String.Empty Then
|
||||||
|
'Fall back
|
||||||
'Don't use these in Unix
|
sEnvCurrentUser = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
|
||||||
If Not mgrCommon.IsUnix Then
|
|
||||||
If sValue.Contains("*publicdocs*") Then
|
|
||||||
Return sValue.Replace("*publicdocs*", sPublicDocs)
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If sValue.Contains("*currentuser*") Then
|
'$HOME to ${HOME}
|
||||||
Return sValue.Replace("*currentuser*", sCurrentUser)
|
sValue = oParse.Replace(sValue, "${$1}")
|
||||||
End If
|
'Special notations for home directory
|
||||||
|
sValue = oParseTilde.Replace(sValue, "${HOME}")
|
||||||
|
'XDG Base Directory Specification has default values
|
||||||
|
sValue = sValue.Replace("${XDG_DATA_HOME}", sXdgData)
|
||||||
|
sValue = sValue.Replace("${XDG_CONFIG_HOME}", sXdgConfig)
|
||||||
|
|
||||||
|
'Replace with paths
|
||||||
|
sValue = sValue.Replace(sXdgData, sEnvAppDataLocal)
|
||||||
|
sValue = sValue.Replace(sXdgConfig, sEnvAppDataRoaming)
|
||||||
|
sValue = sValue.Replace(sHomeDir, sEnvCurrentUser)
|
||||||
|
|
||||||
|
'Escape real Windows variables
|
||||||
|
sValue = sValue.Replace("%", "\%")
|
||||||
|
'Transform Linux variables to Windows variables
|
||||||
|
sValue = oParseBracketed.Replace(sValue, "%$1%")
|
||||||
|
End If
|
||||||
|
|
||||||
|
'On Linux real Linux environmental variables are used
|
||||||
|
sValue = Environment.ExpandEnvironmentVariables(sValue)
|
||||||
|
|
||||||
|
If mgrCommon.IsUnix Then
|
||||||
|
'Transform missing variables back
|
||||||
|
Dim oParse As New Regex("%([a-zA-Z0-9_]+?)%")
|
||||||
|
sValue = oParse.Replace(sValue, "${$1}")
|
||||||
|
'Unscape real Windows variables
|
||||||
|
sValue = sValue.Replace("\%", "%")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return sValue
|
Return sValue
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function ReverseSpecialPaths(sValue As String) As String
|
Public Shared Function ReverseSpecialPaths(sValue As String) As String
|
||||||
Dim sMyDocs As String = "*mydocs*"
|
Dim sMyDocs As String = "%USERDOCUMENTS%"
|
||||||
Dim sPublicDocs As String = "*publicdocs*"
|
Dim sEnvMyDocs As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
|
||||||
Dim sAppDataRoaming As String = "*appdatalocal*"
|
Dim sPublicDocs As String = "%COMMONDOCUMENTS%"
|
||||||
Dim sAppDataLocal As String = "*appdataroaming*"
|
Dim sEnvPublicDocs As String = Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments)
|
||||||
Dim sCurrentUser As String = "*currentuser*"
|
Dim sAppDataLocal As String = "%LOCALAPPDATA%"
|
||||||
|
Dim sXdgData As String = "${XDG_DATA_HOME:-~/.local/share}"
|
||||||
|
Dim sEnvAppDataLocal As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
|
||||||
|
Dim sAppDataRoaming As String = "%APPDATA%"
|
||||||
|
Dim sXdgConfig As String = "${XDG_CONFIG_HOME:-~/.config}"
|
||||||
|
Dim sEnvAppDataRoaming As String = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
|
||||||
|
Dim sCurrentUser As String = "%USERPROFILE%"
|
||||||
|
Dim sHomeDir As String = "~"
|
||||||
|
Dim sEnvCurrentUser As String = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)
|
||||||
Dim oCustomVariable As clsPathVariable
|
Dim oCustomVariable As clsPathVariable
|
||||||
|
|
||||||
For Each oCustomVariable In hshCustomVariables.Values
|
For Each oCustomVariable In hshCustomVariables.Values
|
||||||
@@ -258,27 +424,49 @@ Public Class mgrPath
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)) Then
|
|
||||||
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), sAppDataLocal)
|
|
||||||
End If
|
|
||||||
|
|
||||||
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)) Then
|
|
||||||
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), sAppDataRoaming)
|
|
||||||
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)
|
|
||||||
End If
|
|
||||||
|
|
||||||
'Don't use these in Unix
|
|
||||||
If Not mgrCommon.IsUnix Then
|
If Not mgrCommon.IsUnix Then
|
||||||
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments)) Then
|
If sValue.Contains(sEnvAppDataRoaming) Then
|
||||||
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments), sPublicDocs)
|
Return sValue.Replace(sEnvAppDataRoaming, sAppDataRoaming)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)) Then
|
If sValue.Contains(sEnvAppDataLocal) Then
|
||||||
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), sCurrentUser)
|
Return sValue.Replace(sEnvAppDataLocal, sAppDataLocal)
|
||||||
|
End If
|
||||||
|
|
||||||
|
'This needs to be tested last for Unix compatability
|
||||||
|
If sValue.Contains(sEnvMyDocs) Then
|
||||||
|
Return sValue.Replace(sEnvMyDocs, sMyDocs)
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Mono doesn't set a path for these folders
|
||||||
|
If sValue.Contains(sEnvPublicDocs) Then
|
||||||
|
Return sValue.Replace(sEnvPublicDocs, sPublicDocs)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If sValue.Contains(sEnvCurrentUser) Then
|
||||||
|
Return sValue.Replace(sEnvCurrentUser, sCurrentUser)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
'Use different paths on Linux
|
||||||
|
If sValue.Contains(sEnvAppDataRoaming) Then
|
||||||
|
Return sValue.Replace(sEnvAppDataRoaming, sXdgConfig)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If sValue.Contains(sEnvAppDataLocal) Then
|
||||||
|
Return sValue.Replace(sEnvAppDataLocal, sXdgData)
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Must be last
|
||||||
|
If sValue.Contains(sEnvCurrentUser) Then
|
||||||
|
If sEnvCurrentUser = String.Empty Then
|
||||||
|
'Fall back
|
||||||
|
sEnvCurrentUser = Environment.GetFolderPath(Environment.SpecialFolder.Personal)
|
||||||
|
End If
|
||||||
|
If sEnvCurrentUser = String.Empty Then
|
||||||
|
'Fall back
|
||||||
|
sEnvCurrentUser = sMyDocs
|
||||||
|
End If
|
||||||
|
Return sValue.Replace(sEnvCurrentUser, sHomeDir)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -317,8 +505,10 @@ Public Class mgrPath
|
|||||||
|
|
||||||
Public Shared Function VerifyCustomVariables(ByVal hshScanlist As Hashtable, ByRef sGames As String) As Boolean
|
Public Shared Function VerifyCustomVariables(ByVal hshScanlist As Hashtable, ByRef sGames As String) As Boolean
|
||||||
Dim hshCustomVariables As Hashtable = mgrVariables.ReadVariables
|
Dim hshCustomVariables As Hashtable = mgrVariables.ReadVariables
|
||||||
|
'Reserved variables will be resolved on Windows, but not on a Linux. Therefore we an ignore list here, otherwise GBM will bitch about them when using Windows configurations for Wine.
|
||||||
|
Dim oReservedVariables As List(Of String) = mgrVariables.GetReservedVariables
|
||||||
Dim sVariableCheck As String
|
Dim sVariableCheck As String
|
||||||
Dim sPattern As String = "\*(.*)\*"
|
Dim sPattern As String = "\%(.*)\%"
|
||||||
Dim oGame As clsGame
|
Dim oGame As clsGame
|
||||||
Dim oMatch As Match
|
Dim oMatch As Match
|
||||||
Dim bClean As Boolean = True
|
Dim bClean As Boolean = True
|
||||||
@@ -326,8 +516,8 @@ Public Class mgrPath
|
|||||||
For Each oGame In hshScanlist.Values
|
For Each oGame In hshScanlist.Values
|
||||||
oMatch = Regex.Match(oGame.Path, sPattern)
|
oMatch = Regex.Match(oGame.Path, sPattern)
|
||||||
If oMatch.Success Then
|
If oMatch.Success Then
|
||||||
sVariableCheck = oMatch.Value.Replace("*", String.Empty)
|
sVariableCheck = oMatch.Value.Replace("%", String.Empty)
|
||||||
If Not hshCustomVariables.ContainsKey(sVariableCheck) Then
|
If Not hshCustomVariables.ContainsKey(sVariableCheck) And Not oReservedVariables.Contains(sVariableCheck) Then
|
||||||
sGames &= vbCrLf & oGame.Name & " (" & sVariableCheck & ")"
|
sGames &= vbCrLf & oGame.Name & " (" & sVariableCheck & ")"
|
||||||
bClean = False
|
bClean = False
|
||||||
End If
|
End If
|
||||||
@@ -337,8 +527,12 @@ Public Class mgrPath
|
|||||||
Return bClean
|
Return bClean
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Sub CustomVariablesReload()
|
Public Shared Sub LoadCustomVariables()
|
||||||
hshCustomVariables = mgrVariables.ReadVariables
|
hshCustomVariables = mgrVariables.ReadVariables
|
||||||
|
|
||||||
|
For Each oVariable As clsPathVariable In hshCustomVariables.Values
|
||||||
|
Environment.SetEnvironmentVariable(oVariable.Name, oVariable.Path)
|
||||||
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Shared Function SetManualGamePath() As String
|
Public Shared Function SetManualGamePath() As String
|
||||||
|
|||||||
+133
-110
@@ -5,13 +5,13 @@ Imports System.Text.RegularExpressions
|
|||||||
Public Class mgrProcessDetection
|
Public Class mgrProcessDetection
|
||||||
|
|
||||||
Private prsFoundProcess As Process
|
Private prsFoundProcess As Process
|
||||||
|
Private sProcessPath As String
|
||||||
Private dStartTime As DateTime = Now, dEndTime As DateTime = Now
|
Private dStartTime As DateTime = Now, dEndTime As DateTime = Now
|
||||||
Private lTimeSpent As Long = 0
|
Private lTimeSpent As Long = 0
|
||||||
Private oGame As clsGame
|
Private oGame As clsGame
|
||||||
Private oDuplicateGames As New ArrayList
|
Private oDuplicateGames As New ArrayList
|
||||||
Private bDuplicates As Boolean
|
Private bDuplicates As Boolean
|
||||||
Private bVerified As Boolean = False
|
Private bVerified As Boolean = False
|
||||||
Private sFullCommand As String = String.Empty
|
|
||||||
|
|
||||||
Property FoundProcess As Process
|
Property FoundProcess As Process
|
||||||
Get
|
Get
|
||||||
@@ -22,6 +22,15 @@ Public Class mgrProcessDetection
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Property ProcessPath As String
|
||||||
|
Get
|
||||||
|
Return sProcessPath
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
sProcessPath = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Property StartTime As DateTime
|
Property StartTime As DateTime
|
||||||
Get
|
Get
|
||||||
Return dStartTime
|
Return dStartTime
|
||||||
@@ -73,85 +82,32 @@ Public Class mgrProcessDetection
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Property FullCommand As String
|
|
||||||
Get
|
|
||||||
Return sFullCommand
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
sFullCommand = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private Function HandleDuplicates(hshScanList As Hashtable) As Boolean
|
|
||||||
Dim sProcess As String
|
|
||||||
Dim sParameter As String = String.Empty
|
|
||||||
Dim bParameter As Boolean = False
|
|
||||||
Dim oInitialDupes As New ArrayList
|
|
||||||
|
|
||||||
bDuplicates = True
|
|
||||||
oDuplicateGames.Clear()
|
|
||||||
|
|
||||||
|
|
||||||
For Each o As clsGame In hshScanList.Values
|
|
||||||
sProcess = o.ProcessName.Split(":")(0)
|
|
||||||
If o.Duplicate = True And (sProcess = oGame.TrueProcess Or Regex.IsMatch(sProcess, oGame.TrueProcess)) Then
|
|
||||||
oInitialDupes.Add(o.ShallowCopy)
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
For Each o As clsGame In oInitialDupes
|
|
||||||
If (o.Parameter <> String.Empty And FullCommand.Contains(o.Parameter)) Then
|
|
||||||
sParameter = o.Parameter
|
|
||||||
bParameter = True
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
If bParameter Then
|
|
||||||
For Each o As clsGame In oInitialDupes
|
|
||||||
If (o.Parameter = sParameter) Then
|
|
||||||
oDuplicateGames.Add(o.ShallowCopy)
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
Else
|
|
||||||
For Each o As clsGame In oInitialDupes
|
|
||||||
If (o.Parameter = String.Empty) Then
|
|
||||||
oDuplicateGames.Add(o.ShallowCopy)
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
|
|
||||||
If oDuplicateGames.Count = 1 Then
|
|
||||||
oGame = DirectCast(oDuplicateGames(0), clsGame).ShallowCopy
|
|
||||||
Return True
|
|
||||||
End If
|
|
||||||
|
|
||||||
Return False
|
|
||||||
End Function
|
|
||||||
|
|
||||||
'This function will only work correctly on Windows
|
'This function will only work correctly on Windows
|
||||||
Private Sub GetWindowsCommand(ByVal prs As Process)
|
Private Function GetWindowsCommand(ByVal prs As Process) As String
|
||||||
FullCommand = String.Empty
|
Dim sFullCommand As String = String.Empty
|
||||||
Try
|
Try
|
||||||
Using searcher As New ManagementObjectSearcher("SELECT CommandLine FROM Win32_Process WHERE ProcessId = " + prs.Id.ToString)
|
Using searcher As New ManagementObjectSearcher("SELECT CommandLine FROM Win32_Process WHERE ProcessId = " + prs.Id.ToString)
|
||||||
For Each o As ManagementObject In searcher.Get()
|
For Each o As ManagementObject In searcher.Get()
|
||||||
FullCommand &= o("CommandLine") & " "
|
sFullCommand &= o("CommandLine") & " "
|
||||||
Next
|
Next
|
||||||
End Using
|
End Using
|
||||||
Catch ex As Exception
|
Catch
|
||||||
'Do Nothing
|
'Do Nothing
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
Return sFullCommand
|
||||||
|
End Function
|
||||||
|
|
||||||
'This function will only work correctly on Unix
|
'This function will only work correctly on Unix
|
||||||
Private Sub GetUnixCommand(ByVal prs As Process)
|
Private Function GetUnixCommand(ByVal prs As Process) As String
|
||||||
FullCommand = String.Empty
|
Dim sFullCommand As String = String.Empty
|
||||||
Try
|
Try
|
||||||
FullCommand = File.ReadAllText("/proc/" & prs.Id.ToString() & "/cmdline").Replace(vbNullChar, " ")
|
sFullCommand = File.ReadAllText("/proc/" & prs.Id.ToString() & "/cmdline").Replace(vbNullChar, " ")
|
||||||
Catch ex As Exception
|
Catch
|
||||||
'Do Nothing
|
'Do Nothing
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
|
||||||
|
Return sFullCommand
|
||||||
|
End Function
|
||||||
|
|
||||||
'This function will only work correctly on Unix
|
'This function will only work correctly on Unix
|
||||||
Private Function GetUnixProcessArguments(ByVal prs As Process) As String()
|
Private Function GetUnixProcessArguments(ByVal prs As Process) As String()
|
||||||
@@ -202,16 +158,104 @@ Public Class mgrProcessDetection
|
|||||||
Return False
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function SearchRunningProcesses(ByVal hshScanList As Hashtable, ByRef bNeedsPath As Boolean, ByRef iErrorCode As Integer, ByVal bDebugMode As Boolean) As Boolean
|
Private Function GetProcessPath(ByVal bWineProcess As Boolean) As String
|
||||||
|
Try
|
||||||
|
If Not bWineProcess Then
|
||||||
|
Return Path.GetDirectoryName(FoundProcess.MainModule.FileName)
|
||||||
|
Else
|
||||||
|
Return GetUnixSymLinkDirectory(FoundProcess)
|
||||||
|
End If
|
||||||
|
Catch
|
||||||
|
Return String.Empty
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub FilterDetected(ByVal oDetectedGames As ArrayList, ByVal bWineProcess As Boolean)
|
||||||
|
Dim bMatch As Boolean = False
|
||||||
|
Dim sFullCommand As String
|
||||||
|
Dim oNotDetectedWithParameters As New ArrayList
|
||||||
|
Dim oDetectedWithParameters As New ArrayList
|
||||||
|
Dim oNotDetectedWithProcessPath As New ArrayList
|
||||||
|
Dim oDetectedWithProcessPath As New ArrayList
|
||||||
|
|
||||||
|
'Get parameters of the found process
|
||||||
|
If mgrCommon.IsUnix Then
|
||||||
|
sFullCommand = GetUnixCommand(FoundProcess)
|
||||||
|
Else
|
||||||
|
sFullCommand = GetWindowsCommand(FoundProcess)
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Get Process Path
|
||||||
|
ProcessPath = GetProcessPath(bWineProcess)
|
||||||
|
|
||||||
|
'Look for any games using parameters and any matches
|
||||||
|
For Each oDetectedGame As clsGame In oDetectedGames
|
||||||
|
If oDetectedGame.Parameter <> String.Empty Then
|
||||||
|
If sFullCommand.Contains(oDetectedGame.Parameter) Then
|
||||||
|
oDetectedWithParameters.Add(oDetectedGame)
|
||||||
|
Else
|
||||||
|
oNotDetectedWithParameters.Add(oDetectedGame)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
'If we detected at least one parameter match, replace full detected list with the detected with parameter list
|
||||||
|
If oDetectedWithParameters.Count > 0 Then
|
||||||
|
oDetectedGames = oDetectedWithParameters
|
||||||
|
Else
|
||||||
|
'If there is no parameter match, remove any games using parameters from the detected list
|
||||||
|
For Each oGameNotDetected As clsGame In oNotDetectedWithParameters
|
||||||
|
oDetectedGames.Remove(oGameNotDetected)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
'If there's only one match after parameter detection, set it as current game and we're done.
|
||||||
|
If oDetectedGames.Count = 1 Then
|
||||||
|
GameInfo = oDetectedGames(0)
|
||||||
|
Duplicate = False
|
||||||
|
Else
|
||||||
|
'Check if we have any exact matches based on process path
|
||||||
|
For Each oDetectedGame As clsGame In oDetectedGames
|
||||||
|
If oDetectedGame.ProcessPath <> String.Empty Then
|
||||||
|
If oDetectedGame.ProcessPath = ProcessPath Then
|
||||||
|
oDetectedWithProcessPath.Add(oDetectedGame)
|
||||||
|
Else
|
||||||
|
oNotDetectedWithProcessPath.Add(oDetectedGame)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
'If there's only one match after process detection, set it as current game and we're done
|
||||||
|
If oDetectedWithProcessPath.Count = 1 Then
|
||||||
|
GameInfo = oDetectedWithProcessPath(0)
|
||||||
|
Duplicate = False
|
||||||
|
Else
|
||||||
|
'Remove any games with a process path that does not match the current process
|
||||||
|
For Each oGameNotDetected As clsGame In oNotDetectedWithProcessPath
|
||||||
|
oDetectedGames.Remove(oGameNotDetected)
|
||||||
|
Next
|
||||||
|
|
||||||
|
'If only a single game remains, set it as current game and we're done
|
||||||
|
If oDetectedGames.Count = 1 Then
|
||||||
|
GameInfo = oDetectedGames(0)
|
||||||
|
Duplicate = False
|
||||||
|
Else
|
||||||
|
'We've done all we can, the user must selected which game they were playing when the process ends
|
||||||
|
Duplicate = True
|
||||||
|
oDuplicateGames = oDetectedGames
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function SearchRunningProcesses(ByVal hshScanList As Hashtable, ByRef bNeedsPath As Boolean, ByRef bWineProcess As Boolean, ByRef iErrorCode As Integer, ByVal bDebugMode As Boolean) As Boolean
|
||||||
Dim prsList() As Process = Process.GetProcesses
|
Dim prsList() As Process = Process.GetProcesses
|
||||||
Dim sProcessCheck As String = String.Empty
|
Dim sProcessCheck As String = String.Empty
|
||||||
Dim sProcessList As String = String.Empty
|
Dim sProcessList As String = String.Empty
|
||||||
Dim bWineProcess As Boolean = False
|
Dim oDetectedGames As New ArrayList
|
||||||
Dim bPass As Boolean
|
|
||||||
|
|
||||||
For Each prsCurrent As Process In prsList
|
For Each prsCurrent As Process In prsList
|
||||||
bPass = False
|
|
||||||
|
|
||||||
'This needs to be wrapped due to issues with Mono.
|
'This needs to be wrapped due to issues with Mono.
|
||||||
Try
|
Try
|
||||||
sProcessCheck = prsCurrent.ProcessName
|
sProcessCheck = prsCurrent.ProcessName
|
||||||
@@ -219,57 +263,41 @@ Public Class mgrProcessDetection
|
|||||||
'Unix Handler
|
'Unix Handler
|
||||||
'We need some special handling for Wine processes
|
'We need some special handling for Wine processes
|
||||||
If mgrCommon.IsUnix And (sProcessCheck.ToLower = "wine-preloader" Or sProcessCheck.ToLower = "wine64-preloader") Then
|
If mgrCommon.IsUnix And (sProcessCheck.ToLower = "wine-preloader" Or sProcessCheck.ToLower = "wine64-preloader") Then
|
||||||
|
Dim sArgs As String() = GetUnixProcessArguments(prsCurrent)
|
||||||
|
Dim sParameter As String
|
||||||
Dim sWinePath As String()
|
Dim sWinePath As String()
|
||||||
'We can't use Path.GetFileName here, Wine uses the Windows seperator in arguments and Mono expects a different one in Unix.
|
'The wine-preloader parameters can refer to a path on the host system, windows based path within in the prefix, or mixed notation.
|
||||||
sWinePath = GetUnixProcessArguments(prsCurrent)(0).Split("\")
|
sParameter = sArgs(0).Replace("\", "/")
|
||||||
sProcessCheck = sWinePath(sWinePath.Length - 1).Replace(".exe", "")
|
sWinePath = sParameter.Split("/")
|
||||||
|
sProcessCheck = Path.GetFileNameWithoutExtension(sWinePath(sWinePath.Length - 1))
|
||||||
bWineProcess = True
|
bWineProcess = True
|
||||||
Else
|
Else
|
||||||
bWineProcess = False
|
bWineProcess = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If bDebugMode And mgrCommon.IsUnix Then
|
If bDebugMode And mgrCommon.IsUnix Then
|
||||||
sProcessList &= prsCurrent.Id & " " & prsCurrent.ProcessName & " " & GetUnixProcessArguments(prsCurrent)(0) & vbCrLf
|
sProcessList &= prsCurrent.Id & " " & prsCurrent.ProcessName & " " & GetUnixCommand(prsCurrent) & vbCrLf
|
||||||
ElseIf bDebugMode Then
|
ElseIf bDebugMode Then
|
||||||
sProcessList &= prsCurrent.Id & " " & prsCurrent.ProcessName & vbCrLf
|
sProcessList &= prsCurrent.Id & " " & prsCurrent.ProcessName & " " & GetWindowsCommand(prsCurrent) & vbCrLf
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
'Do Nothing
|
'Do Nothing
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
'Detection Pass 1
|
|
||||||
For Each oCurrentGame As clsGame In hshScanList.Values
|
For Each oCurrentGame As clsGame In hshScanList.Values
|
||||||
If IsMatch(oCurrentGame, sProcessCheck) Then
|
If IsMatch(oCurrentGame, sProcessCheck) Then
|
||||||
prsFoundProcess = prsCurrent
|
prsFoundProcess = prsCurrent
|
||||||
oGame = oCurrentGame.ShallowCopy
|
oGame = oCurrentGame.ShallowCopy
|
||||||
bPass = True
|
oDetectedGames.Add(oGame.ShallowCopy)
|
||||||
|
|
||||||
If mgrCommon.IsUnix Then
|
|
||||||
GetUnixCommand(prsCurrent)
|
|
||||||
Else
|
|
||||||
GetWindowsCommand(prsCurrent)
|
|
||||||
End If
|
|
||||||
|
|
||||||
If oGame.Duplicate = True Then
|
|
||||||
If HandleDuplicates(hshScanList) Then
|
|
||||||
bDuplicates = False
|
|
||||||
oDuplicateGames.Clear()
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
bDuplicates = False
|
|
||||||
oDuplicateGames.Clear()
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Duplicate And DuplicateList.Count = 0 Then bPass = False
|
|
||||||
|
|
||||||
If oGame.Parameter <> String.Empty And Not Duplicate And Not FullCommand.Contains(oGame.Parameter) Then bPass = False
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
'Detection Pass 2
|
If oDetectedGames.Count > 0 Then
|
||||||
If bPass Then
|
FilterDetected(oDetectedGames, bWineProcess)
|
||||||
'Determine the process path if we need it
|
End If
|
||||||
If Not oGame.AbsolutePath Or oGame.Duplicate Then
|
|
||||||
|
If oDetectedGames.Count > 0 Then
|
||||||
|
If Not oGame.AbsolutePath And Not oGame.MonitorOnly Then
|
||||||
Try
|
Try
|
||||||
If Not bWineProcess Then
|
If Not bWineProcess Then
|
||||||
oGame.ProcessPath = Path.GetDirectoryName(prsCurrent.MainModule.FileName)
|
oGame.ProcessPath = Path.GetDirectoryName(prsCurrent.MainModule.FileName)
|
||||||
@@ -277,9 +305,6 @@ Public Class mgrProcessDetection
|
|||||||
oGame.ProcessPath = GetUnixSymLinkDirectory(prsCurrent)
|
oGame.ProcessPath = GetUnixSymLinkDirectory(prsCurrent)
|
||||||
End If
|
End If
|
||||||
Catch exWin32 As System.ComponentModel.Win32Exception
|
Catch exWin32 As System.ComponentModel.Win32Exception
|
||||||
'If an exception occurs the process is:
|
|
||||||
'Running as administrator and the app isn't.
|
|
||||||
'The process is 64-bit and the process folder is required, shouldn't happen often.
|
|
||||||
If exWin32.NativeErrorCode = 5 Then
|
If exWin32.NativeErrorCode = 5 Then
|
||||||
bNeedsPath = True
|
bNeedsPath = True
|
||||||
iErrorCode = 5
|
iErrorCode = 5
|
||||||
@@ -288,13 +313,11 @@ Public Class mgrProcessDetection
|
|||||||
iErrorCode = 299
|
iErrorCode = 299
|
||||||
Else
|
Else
|
||||||
If bDebugMode Then mgrCommon.ShowMessage(exWin32.NativeErrorCode & " " & exWin32.Message & vbCrLf & vbCrLf & exWin32.StackTrace, MsgBoxStyle.Critical)
|
If bDebugMode Then mgrCommon.ShowMessage(exWin32.NativeErrorCode & " " & exWin32.Message & vbCrLf & vbCrLf & exWin32.StackTrace, MsgBoxStyle.Critical)
|
||||||
'A different failure occured, drop out and continue to scan.
|
Return False
|
||||||
bPass = False
|
|
||||||
End If
|
End If
|
||||||
Catch exAll As Exception
|
Catch exAll As Exception
|
||||||
If bDebugMode Then mgrCommon.ShowMessage(exAll.Message & vbCrLf & vbCrLf & exAll.StackTrace, MsgBoxStyle.Critical)
|
If bDebugMode Then mgrCommon.ShowMessage(exAll.Message & vbCrLf & vbCrLf & exAll.StackTrace, MsgBoxStyle.Critical)
|
||||||
'A different failure occured, drop out and continue to scan.
|
Return False
|
||||||
bPass = False
|
|
||||||
End Try
|
End Try
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ Public Class mgrRestore
|
|||||||
If oGame.ProcessPath <> String.Empty Then
|
If oGame.ProcessPath <> String.Empty Then
|
||||||
oRestoreInfo.RelativeRestorePath = oGame.ProcessPath & Path.DirectorySeparatorChar & oRestoreInfo.RestorePath
|
oRestoreInfo.RelativeRestorePath = oGame.ProcessPath & Path.DirectorySeparatorChar & oRestoreInfo.RestorePath
|
||||||
Else
|
Else
|
||||||
sProcess = oGame.TrueProcess
|
sProcess = oGame.ProcessName
|
||||||
If mgrCommon.IsProcessNotSearchable(oGame) Then bNoAuto = True
|
If mgrCommon.IsProcessNotSearchable(oGame) Then bNoAuto = True
|
||||||
sRestorePath = mgrPath.ProcessPathSearch(oRestoreInfo.Name, sProcess, mgrCommon.FormatString(mgrRestore_RelativeNeedPath, oRestoreInfo.Name), bNoAuto)
|
sRestorePath = mgrPath.ProcessPathSearch(oRestoreInfo.Name, sProcess, mgrCommon.FormatString(mgrRestore_RelativeNeedPath, oRestoreInfo.Name), bNoAuto)
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ Public Class mgrSQLite
|
|||||||
"BackupFolder TEXT NOT NULL, StartWithWindows BOOLEAN NOT NULL, TimeTracking BOOLEAN NOT NULL, " &
|
"BackupFolder TEXT NOT NULL, StartWithWindows BOOLEAN NOT NULL, TimeTracking BOOLEAN NOT NULL, " &
|
||||||
"SuppressBackup BOOLEAN NOT NULL, SuppressBackupThreshold INTEGER NOT NULL, CompressionLevel INTEGER NOT NULL, Custom7zArguments TEXT, " &
|
"SuppressBackup BOOLEAN NOT NULL, SuppressBackupThreshold INTEGER NOT NULL, CompressionLevel INTEGER NOT NULL, Custom7zArguments TEXT, " &
|
||||||
"Custom7zLocation TEXT, SyncFields INTEGER NOT NULL, AutoSaveLog BOOLEAN NOT NULL, AutoRestore BOOLEAN NOT NULL, AutoMark BOOLEAN NOT NULL, SessionTracking BOOLEAN NOT NULL, " &
|
"Custom7zLocation TEXT, SyncFields INTEGER NOT NULL, AutoSaveLog BOOLEAN NOT NULL, AutoRestore BOOLEAN NOT NULL, AutoMark BOOLEAN NOT NULL, SessionTracking BOOLEAN NOT NULL, " &
|
||||||
"SuppressMessages INTEGER NOT NULL, BackupOnLaunch BOOLEAN NOT NULL, UseGameID BOOLEAN NOT NULL, DisableSyncMessages BOOLEAN NOT NULL);"
|
"SuppressMessages INTEGER NOT NULL, BackupOnLaunch BOOLEAN NOT NULL, UseGameID BOOLEAN NOT NULL, DisableSyncMessages BOOLEAN NOT NULL, ShowResolvedPaths BOOLEAN NOT NULL);"
|
||||||
|
|
||||||
'Add Tables (SavedPath)
|
'Add Tables (SavedPath)
|
||||||
sSql &= "CREATE TABLE savedpath (PathName TEXT NOT NULL PRIMARY KEY, Path TEXT NOT NULL);"
|
sSql &= "CREATE TABLE savedpath (PathName TEXT NOT NULL PRIMARY KEY, Path TEXT NOT NULL);"
|
||||||
@@ -848,6 +848,50 @@ Public Class mgrSQLite
|
|||||||
CompactDatabase()
|
CompactDatabase()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'1.15 Upgrade
|
||||||
|
If GetDatabaseVersion() < 115 Then
|
||||||
|
If eDatabase = Database.Local Then
|
||||||
|
'Backup DB before starting
|
||||||
|
BackupDB("v110")
|
||||||
|
|
||||||
|
'Add new setting
|
||||||
|
sSQL = "ALTER TABLE settings ADD COLUMN ShowResolvedPaths BOOLEAN NOT NULL DEFAULT 1;"
|
||||||
|
|
||||||
|
sSQL &= "PRAGMA user_version=115"
|
||||||
|
|
||||||
|
RunParamQuery(sSQL, New Hashtable)
|
||||||
|
End If
|
||||||
|
If eDatabase = Database.Remote Then
|
||||||
|
'Backup DB before starting
|
||||||
|
BackupDB("v110")
|
||||||
|
|
||||||
|
'Convert core path variables to new standard
|
||||||
|
If Not mgrCommon.IsUnix Then
|
||||||
|
sSQL = "UPDATE monitorlist SET Path = Replace(Path,'*appdatalocal*','%LOCALAPPDATA%');"
|
||||||
|
sSQL &= "UPDATE monitorlist SET Path = Replace(Path,'*appdataroaming*','%APPDATA%');"
|
||||||
|
sSQL &= "UPDATE monitorlist SET Path = Replace(Path,'*mydocs*','%USERDOCUMENTS%');"
|
||||||
|
sSQL &= "UPDATE monitorlist SET Path = Replace(Path,'*currentuser*','%USERPROFILE%');"
|
||||||
|
sSQL &= "UPDATE monitorlist SET Path = Replace(Path,'*publicdocs*','%COMMONDOCUMENTS%');"
|
||||||
|
Else
|
||||||
|
sSQL = "UPDATE monitorlist SET Path = Replace(Path,'*appdatalocal*','${XDG_DATA_HOME:-~/.local/share}');"
|
||||||
|
sSQL &= "UPDATE monitorlist SET Path = Replace(Path,'*appdataroaming*','${XDG_CONFIG_HOME:-~/.config}');"
|
||||||
|
sSQL &= "UPDATE monitorlist SET Path = Replace(Path,'*mydocs*','~');"
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Convert custom variables to new standard
|
||||||
|
Dim hshVariables As Hashtable = mgrVariables.ReadVariables()
|
||||||
|
Dim sOldVariable As String
|
||||||
|
For Each oVariable As clsPathVariable In hshVariables.Values
|
||||||
|
sOldVariable = "*" & oVariable.Name & "*"
|
||||||
|
sSQL &= "UPDATE monitorlist SET Path = Replace(Path,'" & sOldVariable & "','" & oVariable.FormattedName & "');"
|
||||||
|
Next
|
||||||
|
|
||||||
|
sSQL &= "PRAGMA user_version=115"
|
||||||
|
|
||||||
|
RunParamQuery(sSQL, New Hashtable)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Function GetDBSize() As Long
|
Public Function GetDBSize() As Long
|
||||||
|
|||||||
@@ -19,16 +19,19 @@ Public Class mgrSettings
|
|||||||
Private s7zArguments As String = String.Empty
|
Private s7zArguments As String = String.Empty
|
||||||
Private s7zLocation As String = String.Empty
|
Private s7zLocation As String = String.Empty
|
||||||
Private sBackupFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments).TrimEnd(New Char() {"\", "/"})
|
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 eMessages As eSuppressMessages = eSuppressMessages.None
|
||||||
Private bAutoSaveLog As Boolean = False
|
Private bAutoSaveLog As Boolean = False
|
||||||
Private bBackupOnLaunch As Boolean = True
|
Private bBackupOnLaunch As Boolean = True
|
||||||
Private bUseGameID As Boolean = False
|
Private bUseGameID As Boolean = False
|
||||||
Private bDisableSyncMessages As Boolean = True
|
Private bDisableSyncMessages As Boolean = True
|
||||||
|
Private bShowResolvedPaths As Boolean = True
|
||||||
|
|
||||||
<Flags()> Public Enum eSuppressMessages
|
<Flags()> Public Enum eSuppressMessages
|
||||||
None = 0
|
None = 0
|
||||||
GameIDSync = 1
|
GameIDSync = 1
|
||||||
|
BackupImport = 2
|
||||||
|
WinConfigsInLinux = 4
|
||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
Property StartWithWindows As Boolean
|
Property StartWithWindows As Boolean
|
||||||
@@ -175,6 +178,15 @@ Public Class mgrSettings
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Property ShowResolvedPaths As Boolean
|
||||||
|
Get
|
||||||
|
Return bShowResolvedPaths
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
bShowResolvedPaths = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
ReadOnly Property Prepared7zArguments As String
|
ReadOnly Property Prepared7zArguments As String
|
||||||
Get
|
Get
|
||||||
'Prepare custom 7z arguments
|
'Prepare custom 7z arguments
|
||||||
@@ -309,7 +321,7 @@ Public Class mgrSettings
|
|||||||
sSQL &= "@CreateSubFolder, @ShowOverwriteWarning, @RestoreOnLaunch, @BackupFolder, @StartWithWindows, "
|
sSQL &= "@CreateSubFolder, @ShowOverwriteWarning, @RestoreOnLaunch, @BackupFolder, @StartWithWindows, "
|
||||||
sSQL &= "@TimeTracking, @SuppressBackup, @SuppressBackupThreshold, @CompressionLevel, @Custom7zArguments, @Custom7zLocation, "
|
sSQL &= "@TimeTracking, @SuppressBackup, @SuppressBackupThreshold, @CompressionLevel, @Custom7zArguments, @Custom7zLocation, "
|
||||||
sSQL &= "@SyncFields, @AutoSaveLog, @AutoRestore, @AutoMark, @SessionTracking, @SuppressMessages, @BackupOnLaunch, @UseGameID, "
|
sSQL &= "@SyncFields, @AutoSaveLog, @AutoRestore, @AutoMark, @SessionTracking, @SuppressMessages, @BackupOnLaunch, @UseGameID, "
|
||||||
sSQL &= "@DisableSyncMessages)"
|
sSQL &= "@DisableSyncMessages, @ShowResolvedPaths)"
|
||||||
|
|
||||||
hshParams.Add("MonitorOnStartup", MonitorOnStartup)
|
hshParams.Add("MonitorOnStartup", MonitorOnStartup)
|
||||||
hshParams.Add("StartToTray", StartToTray)
|
hshParams.Add("StartToTray", StartToTray)
|
||||||
@@ -335,6 +347,7 @@ Public Class mgrSettings
|
|||||||
hshParams.Add("BackupOnLaunch", BackupOnLaunch)
|
hshParams.Add("BackupOnLaunch", BackupOnLaunch)
|
||||||
hshParams.Add("UseGameID", UseGameID)
|
hshParams.Add("UseGameID", UseGameID)
|
||||||
hshParams.Add("DisableSyncMessages", DisableSyncMessages)
|
hshParams.Add("DisableSyncMessages", DisableSyncMessages)
|
||||||
|
hshParams.Add("ShowResolvedPaths", ShowResolvedPaths)
|
||||||
|
|
||||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -374,6 +387,7 @@ Public Class mgrSettings
|
|||||||
BackupOnLaunch = CBool(dr("BackupOnLaunch"))
|
BackupOnLaunch = CBool(dr("BackupOnLaunch"))
|
||||||
UseGameID = CBool(dr("UseGameID"))
|
UseGameID = CBool(dr("UseGameID"))
|
||||||
DisableSyncMessages = CBool(dr("DisableSyncMessages"))
|
DisableSyncMessages = CBool(dr("DisableSyncMessages"))
|
||||||
|
ShowResolvedPaths = CBool(dr("ShowResolvedPaths"))
|
||||||
Next
|
Next
|
||||||
|
|
||||||
oDatabase.Disconnect()
|
oDatabase.Disconnect()
|
||||||
|
|||||||
@@ -154,4 +154,29 @@
|
|||||||
|
|
||||||
Return hshList
|
Return hshList
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function GetReservedVariables() As List(Of String)
|
||||||
|
Dim oList As New List(Of String)
|
||||||
|
|
||||||
|
oList.Add("APPDATA")
|
||||||
|
oList.Add("LOCALAPPDATA")
|
||||||
|
oList.Add("USERDOCUMENTS")
|
||||||
|
oList.Add("COMMONDOCUMENTS")
|
||||||
|
oList.Add("USERPROFILE")
|
||||||
|
|
||||||
|
Return oList
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function CheckForReservedVariables(ByVal sPath As String) As Boolean
|
||||||
|
Dim s As String
|
||||||
|
|
||||||
|
For Each s In GetReservedVariables()
|
||||||
|
s = "%" & s & "%"
|
||||||
|
If sPath.Contains(s) Then
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ Public Class mgrXML
|
|||||||
oGame.AbsolutePath = g.AbsolutePath
|
oGame.AbsolutePath = g.AbsolutePath
|
||||||
oGame.Path = g.Path
|
oGame.Path = g.Path
|
||||||
oGame.FolderSave = g.FolderSave
|
oGame.FolderSave = g.FolderSave
|
||||||
|
oGame.AppendTimeStamp = g.AppendTimeStamp
|
||||||
|
oGame.BackupLimit = g.BackupLimit
|
||||||
oGame.FileType = g.FileType
|
oGame.FileType = g.FileType
|
||||||
oGame.ExcludeList = g.ExcludeList
|
oGame.ExcludeList = g.ExcludeList
|
||||||
oGame.MonitorOnly = g.MonitorOnly
|
oGame.MonitorOnly = g.MonitorOnly
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ Imports System.Runtime.InteropServices
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("1.1.0.*")>
|
<Assembly: AssemblyVersion("1.1.5.*")>
|
||||||
<Assembly: AssemblyFileVersion("1.1.0.0")>
|
<Assembly: AssemblyFileVersion("1.1.5.0")>
|
||||||
|
|
||||||
<Assembly: NeutralResourcesLanguageAttribute("en")>
|
<Assembly: NeutralResourcesLanguageAttribute("en")>
|
||||||
Generated
+261
-18
@@ -1410,6 +1410,15 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to 7-Zip.
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property frmGameManager_7zBackup() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("frmGameManager_7zBackup", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to [PARAM] ([PARAM]).
|
''' Looks up a localized string similar to [PARAM] ([PARAM]).
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -1465,7 +1474,7 @@ Namespace My.Resources
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to &Cancel.
|
''' Looks up a localized string similar to Ca&ncel.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
Friend ReadOnly Property frmGameManager_btnCancel() As String
|
Friend ReadOnly Property frmGameManager_btnCancel() As String
|
||||||
Get
|
Get
|
||||||
@@ -1555,7 +1564,16 @@ Namespace My.Resources
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to In&clude Items....
|
''' Looks up a localized string similar to Import B&ackup Files.
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property frmGameManager_btnImportBackup() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("frmGameManager_btnImportBackup", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to Incl&ude Items....
|
||||||
'''</summary>
|
'''</summary>
|
||||||
Friend ReadOnly Property frmGameManager_btnInclude() As String
|
Friend ReadOnly Property frmGameManager_btnInclude() As String
|
||||||
Get
|
Get
|
||||||
@@ -1599,6 +1617,15 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to Pro&cesses....
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property frmGameManager_btnProcesses() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("frmGameManager_btnProcesses", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to &Restore.
|
''' Looks up a localized string similar to &Restore.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -1627,7 +1654,7 @@ Namespace My.Resources
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to Tags....
|
''' Looks up a localized string similar to &Tags....
|
||||||
'''</summary>
|
'''</summary>
|
||||||
Friend ReadOnly Property frmGameManager_btnTags() As String
|
Friend ReadOnly Property frmGameManager_btnTags() As String
|
||||||
Get
|
Get
|
||||||
@@ -1689,6 +1716,15 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to Choose compatible backup file(s).
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property frmGameManager_Choose7zImport() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("frmGameManager_Choose7zImport", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to Choose a custom icon for the game.
|
''' Looks up a localized string similar to Choose a custom icon for the game.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -1779,6 +1815,24 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to &Linux....
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property frmGameManager_cmsOfficialLinux() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("frmGameManager_cmsOfficialLinux", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to &Windows....
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property frmGameManager_cmsOfficialWindows() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("frmGameManager_cmsOfficialWindows", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to Are you sure you want to run a backup for [PARAM]? This will close the form..
|
''' Looks up a localized string similar to Are you sure you want to run a backup for [PARAM]? This will close the form..
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -1824,6 +1878,24 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to Are you sure you want to import the selected file(s) for [PARAM]. This will close the form..
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property frmGameManager_ConfirmBackupImport() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("frmGameManager_ConfirmBackupImport", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to Importing this backup file will overwrite the current backup file for [PARAM].[BR][BR]Do you want to continue? This will close the form..
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property frmGameManager_ConfirmBackupImportOverwriteSingle() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("frmGameManager_ConfirmBackupImportOverwriteSingle", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to Are you sure you want to delete [PARAM]? This cannot be undone.[BR][BR]This will not delete any backup files that already exist for this game..
|
''' Looks up a localized string similar to Are you sure you want to delete [PARAM]? This cannot be undone.[BR][BR]This will not delete any backup files that already exist for this game..
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -2013,6 +2085,24 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to The backup folder contains one or more backup files that cannot be renamed to [PARAM] because a file using that name already exists.[BR][BR]Do you want to continue and remove the existing files?.
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property frmGameManager_ErrorRenameFilesExist() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("frmGameManager_ErrorRenameFilesExist", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to The backup folder [PARAM] cannot be renamed to [PARAM] because a folder with that name already exists.[BR][BR]Do you want to continue and remove the existing folder?.
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property frmGameManager_ErrorRenameFolderExists() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("frmGameManager_ErrorRenameFolderExists", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to You must enter a valid game name..
|
''' Looks up a localized string similar to You must enter a valid game name..
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -2140,7 +2230,7 @@ Namespace My.Resources
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to In&clude.
|
''' Looks up a localized string similar to Incl&ude.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
Friend ReadOnly Property frmGameManager_IncludeShortcut() As String
|
Friend ReadOnly Property frmGameManager_IncludeShortcut() As String
|
||||||
Get
|
Get
|
||||||
@@ -2382,6 +2472,33 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to This feature is intended to import 7-Zip backup archives compatible with the selected game configuration.[BR][BR]GBM does NOT verify these files, you should only use files created by GBM or compatible archives created using the same settings as the current game configuration.[BR][BR]This message will only be shown once..
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property frmGameManager_WarningImportBackup() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("frmGameManager_WarningImportBackup", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to The "Save multiple backups" option must be enabled on this configuration to import multiple backup files..
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property frmGameManager_WarningImportBackupSaveMulti() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("frmGameManager_WarningImportBackupSaveMulti", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to Official Windows configurations can be used in Linux for games running in Wine or Proton.[BR][BR]You do not need to modify these configurations, GBM will automatically do any required path conversions the first time the game is detected.[BR][BR]This message will only be shown once..
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property frmGameManager_WarningWinConfigsInLinux() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("frmGameManager_WarningWinConfigsInLinux", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to XML.
|
''' Looks up a localized string similar to XML.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -2698,7 +2815,7 @@ Namespace My.Resources
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<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>
|
'''</summary>
|
||||||
Friend ReadOnly Property frmIncludeExclude_RawEditInfo() As String
|
Friend ReadOnly Property frmIncludeExclude_RawEditInfo() As String
|
||||||
Get
|
Get
|
||||||
@@ -2877,15 +2994,6 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
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>
|
'''<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..
|
''' 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>
|
'''</summary>
|
||||||
@@ -3084,6 +3192,24 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
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>
|
'''<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).
|
''' 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>
|
'''</summary>
|
||||||
@@ -3562,7 +3688,7 @@ Namespace My.Resources
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to A manaul backup of [PARAM] was triggered..
|
''' Looks up a localized string similar to A manual backup of [PARAM] was triggered..
|
||||||
'''</summary>
|
'''</summary>
|
||||||
Friend ReadOnly Property frmMain_ManualBackup() As String
|
Friend ReadOnly Property frmMain_ManualBackup() As String
|
||||||
Get
|
Get
|
||||||
@@ -3849,6 +3975,24 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to [PARAM] Wine Prefix: [PARAM].
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property frmMain_WinePrefix() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("frmMain_WinePrefix", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to [PARAM] Converted Save Path: [PARAM].
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property frmMain_WineSavePath() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("frmMain_WineSavePath", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to +.
|
''' Looks up a localized string similar to +.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -4515,6 +4659,15 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to Show resolved save paths in Game Manager.
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property frmSettings_chkShowResolvedPaths() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("frmSettings_chkShowResolvedPaths", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to Start to system tray.
|
''' Looks up a localized string similar to Start to system tray.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -5334,6 +5487,15 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to [PARAM] is a reserved variable, you must enter a different name..
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property frmVariableManager_ErrorVariableReserved() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("frmVariableManager_ErrorVariableReserved", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to Custom Variable Manager.
|
''' Looks up a localized string similar to Custom Variable Manager.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -5620,7 +5782,7 @@ Namespace My.Resources
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<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>
|
'''</summary>
|
||||||
Friend ReadOnly Property mgrBackup_ConfirmManifestConflict() As String
|
Friend ReadOnly Property mgrBackup_ConfirmManifestConflict() As String
|
||||||
Get
|
Get
|
||||||
@@ -5637,6 +5799,15 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
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>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to Backup aborted due to lack of disk space..
|
''' Looks up a localized string similar to Backup aborted due to lack of disk space..
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -5664,6 +5835,15 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to Failed to import [PARAM], the file could not be copied..
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property mgrBackup_ErrorImportBackupCopy() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("mgrBackup_ErrorImportBackupCopy", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to Backup aborted by user due to manifest conflict..
|
''' Looks up a localized string similar to Backup aborted by user due to manifest conflict..
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -5710,7 +5890,7 @@ Namespace My.Resources
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to Backup aborted. A failure occured while creating a backup sub-folder for [PARAM].[BR][PARAM].
|
''' Looks up a localized string similar to A failure occured while creating a backup sub-folder for [PARAM].[BR][PARAM].
|
||||||
'''</summary>
|
'''</summary>
|
||||||
Friend ReadOnly Property mgrBackup_ErrorSubFolderCreate() As String
|
Friend ReadOnly Property mgrBackup_ErrorSubFolderCreate() As String
|
||||||
Get
|
Get
|
||||||
@@ -5727,6 +5907,24 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to Imported Backup.
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property mgrBackup_ImportedFile() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("mgrBackup_ImportedFile", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to Imported backup file [PARAM] for [PARAM]..
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property mgrBackup_ImportSuccess() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("mgrBackup_ImportSuccess", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to Available Disk Space: [PARAM].
|
''' Looks up a localized string similar to Available Disk Space: [PARAM].
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -5944,7 +6142,7 @@ Namespace My.Resources
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to This export file was created with a version of GBM prior to 1.1.0 and does not contain unique game identifiers.[BR][BR]Do you still want to import configurations from this file? (Not Recommended).
|
''' Looks up a localized string similar to This export file was created with a version of GBM prior to 1.1.5 and may contain incompatible configuration data.[BR][BR]Do you still want to import configurations from this file? (Not Recommended).
|
||||||
'''</summary>
|
'''</summary>
|
||||||
Friend ReadOnly Property mgrMonitorList_ImportVersionWarning() As String
|
Friend ReadOnly Property mgrMonitorList_ImportVersionWarning() As String
|
||||||
Get
|
Get
|
||||||
@@ -6051,6 +6249,51 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to An error occured when building a Wine path.[BR][BR][PARAM].
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property mgrPath_ErrorBuildingWinePath() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("mgrPath_ErrorBuildingWinePath", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to An error occured when converting to a Wine save path.[BR][BR][PARAM].
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property mgrPath_ErrorConvertWineSavePath() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("mgrPath_ErrorConvertWineSavePath", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to An error occured while building a list of environment variables.[BR][BR][PARAM].
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property mgrPath_ErrorUnixEnv() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("mgrPath_ErrorUnixEnv", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to An error occured when determining a Wine prefix.[BR][BR][PARAM].
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property mgrPath_ErrorWinePrefix() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("mgrPath_ErrorWinePrefix", resourceCulture)
|
||||||
|
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>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to [PARAM] backup restored..
|
''' Looks up a localized string similar to [PARAM] backup restored..
|
||||||
'''</summary>
|
'''</summary>
|
||||||
|
|||||||
@@ -133,9 +133,6 @@
|
|||||||
<data name="frmMain_ManifestTotalRemoved" xml:space="preserve">
|
<data name="frmMain_ManifestTotalRemoved" xml:space="preserve">
|
||||||
<value>[PARAM] entries were removed from the local manifest.</value>
|
<value>[PARAM] entries were removed from the local manifest.</value>
|
||||||
</data>
|
</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">
|
<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>
|
<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>
|
</data>
|
||||||
@@ -269,7 +266,7 @@
|
|||||||
<value>Last Game: [PARAM]</value>
|
<value>Last Game: [PARAM]</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="frmMain_ManualBackup" xml:space="preserve">
|
<data name="frmMain_ManualBackup" xml:space="preserve">
|
||||||
<value>A manaul backup of [PARAM] was triggered.</value>
|
<value>A manual backup of [PARAM] was triggered.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="frmMain_MasterListChanged" xml:space="preserve">
|
<data name="frmMain_MasterListChanged" xml:space="preserve">
|
||||||
<value>The master game list has been changed by a program other than GBM.</value>
|
<value>The master game list has been changed by a program other than GBM.</value>
|
||||||
@@ -434,7 +431,7 @@
|
|||||||
<value>&Backup</value>
|
<value>&Backup</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="frmGameManager_btnCancel" xml:space="preserve">
|
<data name="frmGameManager_btnCancel" xml:space="preserve">
|
||||||
<value>&Cancel</value>
|
<value>Ca&ncel</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="frmGameManager_btnClose" xml:space="preserve">
|
<data name="frmGameManager_btnClose" xml:space="preserve">
|
||||||
<value>C&lose</value>
|
<value>C&lose</value>
|
||||||
@@ -458,7 +455,7 @@
|
|||||||
<value>&Import</value>
|
<value>&Import</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="frmGameManager_btnInclude" xml:space="preserve">
|
<data name="frmGameManager_btnInclude" xml:space="preserve">
|
||||||
<value>In&clude Items...</value>
|
<value>Incl&ude Items...</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="frmGameManager_btnMarkAsRestored" xml:space="preserve">
|
<data name="frmGameManager_btnMarkAsRestored" xml:space="preserve">
|
||||||
<value>&Mark as Restored</value>
|
<value>&Mark as Restored</value>
|
||||||
@@ -482,7 +479,7 @@
|
|||||||
<value>...</value>
|
<value>...</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="frmGameManager_btnTags" xml:space="preserve">
|
<data name="frmGameManager_btnTags" xml:space="preserve">
|
||||||
<value>Tags...</value>
|
<value>&Tags...</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="frmGameManager_chkEnabled" xml:space="preserve">
|
<data name="frmGameManager_chkEnabled" xml:space="preserve">
|
||||||
<value>Monitor this game</value>
|
<value>Monitor this game</value>
|
||||||
@@ -593,7 +590,7 @@
|
|||||||
<value>Include</value>
|
<value>Include</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="frmGameManager_IncludeShortcut" xml:space="preserve">
|
<data name="frmGameManager_IncludeShortcut" xml:space="preserve">
|
||||||
<value>In&clude</value>
|
<value>Incl&ude</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="frmGameManager_Items" xml:space="preserve">
|
<data name="frmGameManager_Items" xml:space="preserve">
|
||||||
<value>Items...</value>
|
<value>Items...</value>
|
||||||
@@ -986,7 +983,7 @@
|
|||||||
<value>Individual Files</value>
|
<value>Individual Files</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="frmIncludeExclude_RawEditInfo" xml:space="preserve">
|
<data name="frmIncludeExclude_RawEditInfo" xml:space="preserve">
|
||||||
<value>Items are semi-colon delimited.</value>
|
<value>Items are colon delimited.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="frmIncludeExclude_RawEditTitle" xml:space="preserve">
|
<data name="frmIncludeExclude_RawEditTitle" xml:space="preserve">
|
||||||
<value>[PARAM] Raw Edit</value>
|
<value>[PARAM] Raw Edit</value>
|
||||||
@@ -1283,7 +1280,7 @@
|
|||||||
<value>[PARAM] backup completed with warnings.</value>
|
<value>[PARAM] backup completed with warnings.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="mgrBackup_ConfirmManifestConflict" xml:space="preserve">
|
<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>
|
||||||
<data name="mgrBackup_ConfirmOverwrite" xml:space="preserve">
|
<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>
|
<value>A file with the same name already exists in the backup folder.[BR][BR]Do you want to overwrite this file?</value>
|
||||||
@@ -1310,7 +1307,7 @@
|
|||||||
<value>[PARAM] backup aborted by user due to overwrite.</value>
|
<value>[PARAM] backup aborted by user due to overwrite.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="mgrBackup_ErrorSubFolderCreate" xml:space="preserve">
|
<data name="mgrBackup_ErrorSubFolderCreate" xml:space="preserve">
|
||||||
<value>Backup aborted. A failure occured while creating a backup sub-folder for [PARAM].[BR][PARAM]</value>
|
<value>A failure occured while creating a backup sub-folder for [PARAM].[BR][PARAM]</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="mgrBackup_GenerateHash" xml:space="preserve">
|
<data name="mgrBackup_GenerateHash" xml:space="preserve">
|
||||||
<value>Generating SHA-256 hash for [PARAM] backup file.</value>
|
<value>Generating SHA-256 hash for [PARAM] backup file.</value>
|
||||||
@@ -2030,7 +2027,7 @@
|
|||||||
<value>This file cannot be used to sync game indentifiers. It was created with an older version of GBM.</value>
|
<value>This file cannot be used to sync game indentifiers. It was created with an older version of GBM.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="mgrMonitorList_ImportVersionWarning" xml:space="preserve">
|
<data name="mgrMonitorList_ImportVersionWarning" xml:space="preserve">
|
||||||
<value>This export file was created with a version of GBM prior to 1.1.0 and does not contain unique game identifiers.[BR][BR]Do you still want to import configurations from this file? (Not Recommended)</value>
|
<value>This export file was created with a version of GBM prior to 1.1.5 and may contain incompatible configuration data.[BR][BR]Do you still want to import configurations from this file? (Not Recommended)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="mgrMonitorList_ConfirmFileGameIDSync" xml:space="preserve">
|
<data name="mgrMonitorList_ConfirmFileGameIDSync" xml:space="preserve">
|
||||||
<value>Do you want to sync your game identifiers with this export file?[BR][BR]You should only do this if you're managing your own game configurations. If you use GBM on multiple PCs, please see "Tools" section of the online manual before using this feature.</value>
|
<value>Do you want to sync your game identifiers with this export file?[BR][BR]You should only do this if you're managing your own game configurations. If you use GBM on multiple PCs, please see "Tools" section of the online manual before using this feature.</value>
|
||||||
@@ -2188,4 +2185,88 @@
|
|||||||
<data name="frmSettings_lstSettings_Startup" xml:space="preserve">
|
<data name="frmSettings_lstSettings_Startup" xml:space="preserve">
|
||||||
<value>Startup</value>
|
<value>Startup</value>
|
||||||
</data>
|
</data>
|
||||||
|
<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>
|
||||||
|
<data name="frmGameManager_ErrorRenameFilesExist" xml:space="preserve">
|
||||||
|
<value>The backup folder contains one or more backup files that cannot be renamed to [PARAM] because a file using that name already exists.[BR][BR]Do you want to continue and remove the existing files?</value>
|
||||||
|
</data>
|
||||||
|
<data name="frmGameManager_ErrorRenameFolderExists" xml:space="preserve">
|
||||||
|
<value>The backup folder [PARAM] cannot be renamed to [PARAM] because a folder with that name already exists.[BR][BR]Do you want to continue and remove the existing folder?</value>
|
||||||
|
</data>
|
||||||
|
<data name="frmMain_WinePrefix" xml:space="preserve">
|
||||||
|
<value>[PARAM] Wine Prefix: [PARAM]</value>
|
||||||
|
</data>
|
||||||
|
<data name="frmMain_WineSavePath" xml:space="preserve">
|
||||||
|
<value>[PARAM] Converted Save Path: [PARAM]</value>
|
||||||
|
</data>
|
||||||
|
<data name="mgrPath_ErrorBuildingWinePath" xml:space="preserve">
|
||||||
|
<value>An error occured when building a Wine path.[BR][BR][PARAM]</value>
|
||||||
|
</data>
|
||||||
|
<data name="mgrPath_ErrorConvertWineSavePath" xml:space="preserve">
|
||||||
|
<value>An error occured when converting to a Wine save path.[BR][BR][PARAM]</value>
|
||||||
|
</data>
|
||||||
|
<data name="mgrPath_ErrorWinePrefix" xml:space="preserve">
|
||||||
|
<value>An error occured when determining a Wine prefix.[BR][BR][PARAM]</value>
|
||||||
|
</data>
|
||||||
|
<data name="mgrPath_ErrorUnixEnv" xml:space="preserve">
|
||||||
|
<value>An error occured while building a list of environment variables.[BR][BR][PARAM]</value>
|
||||||
|
</data>
|
||||||
|
<data name="frmSettings_chkShowResolvedPaths" xml:space="preserve">
|
||||||
|
<value>Show resolved save paths in Game Manager</value>
|
||||||
|
</data>
|
||||||
|
<data name="frmGameManager_7zBackup" xml:space="preserve">
|
||||||
|
<value>7-Zip</value>
|
||||||
|
</data>
|
||||||
|
<data name="frmGameManager_btnImportBackup" xml:space="preserve">
|
||||||
|
<value>Import B&ackup Files</value>
|
||||||
|
</data>
|
||||||
|
<data name="frmGameManager_Choose7zImport" xml:space="preserve">
|
||||||
|
<value>Choose compatible backup file(s)</value>
|
||||||
|
</data>
|
||||||
|
<data name="frmGameManager_ConfirmBackupImport" xml:space="preserve">
|
||||||
|
<value>Are you sure you want to import the selected file(s) for [PARAM]. This will close the form.</value>
|
||||||
|
</data>
|
||||||
|
<data name="mgrBackup_ErrorImportBackupCopy" xml:space="preserve">
|
||||||
|
<value>Failed to import [PARAM], the file could not be copied.</value>
|
||||||
|
</data>
|
||||||
|
<data name="mgrBackup_ImportedFile" xml:space="preserve">
|
||||||
|
<value>Imported Backup</value>
|
||||||
|
</data>
|
||||||
|
<data name="mgrBackup_ImportSuccess" xml:space="preserve">
|
||||||
|
<value>Imported backup file [PARAM] for [PARAM].</value>
|
||||||
|
</data>
|
||||||
|
<data name="frmGameManager_btnProcesses" xml:space="preserve">
|
||||||
|
<value>Pro&cesses...</value>
|
||||||
|
</data>
|
||||||
|
<data name="frmGameManager_WarningImportBackup" xml:space="preserve">
|
||||||
|
<value>This feature is intended to import 7-Zip backup archives compatible with the selected game configuration.[BR][BR]GBM does NOT verify these files, you should only use files created by GBM or compatible archives created using the same settings as the current game configuration.[BR][BR]This message will only be shown once.</value>
|
||||||
|
</data>
|
||||||
|
<data name="frmVariableManager_ErrorVariableReserved" xml:space="preserve">
|
||||||
|
<value>[PARAM] is a reserved variable, you must enter a different name.</value>
|
||||||
|
</data>
|
||||||
|
<data name="frmGameManager_WarningImportBackupSaveMulti" xml:space="preserve">
|
||||||
|
<value>The "Save multiple backups" option must be enabled on this configuration to import multiple backup files.</value>
|
||||||
|
</data>
|
||||||
|
<data name="frmGameManager_cmsOfficialLinux" xml:space="preserve">
|
||||||
|
<value>&Linux...</value>
|
||||||
|
</data>
|
||||||
|
<data name="frmGameManager_cmsOfficialWindows" xml:space="preserve">
|
||||||
|
<value>&Windows...</value>
|
||||||
|
</data>
|
||||||
|
<data name="frmGameManager_WarningWinConfigsInLinux" xml:space="preserve">
|
||||||
|
<value>Official Windows configurations can be used in Linux for games running in Wine or Proton.[BR][BR]You do not need to modify these configurations, GBM will automatically do any required path conversions the first time the game is detected.[BR][BR]This message will only be shown once.</value>
|
||||||
|
</data>
|
||||||
|
<data name="frmGameManager_ConfirmBackupImportOverwriteSingle" xml:space="preserve">
|
||||||
|
<value>Importing this backup file will overwrite the current backup file for [PARAM].[BR][BR]Do you want to continue? This will close the form.</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 170 KiB After Width: | Height: | Size: 358 KiB |
+45
-85
@@ -1,98 +1,58 @@
|
|||||||
Game Backup Monitor v1.1.0 Readme
|
Game Backup Monitor v1.1.5 Readme
|
||||||
http://mikemaximus.github.io/gbm-web/
|
http://mikemaximus.github.io/gbm-web/
|
||||||
gamebackupmonitor@gmail.com
|
gamebackupmonitor@gmail.com
|
||||||
|
|
||||||
April 1, 2018
|
October 10th, 2018
|
||||||
|
|
||||||
New in 1.1.0
|
New in 1.1.5
|
||||||
|
|
||||||
Disclaimer:
|
|
||||||
|
|
||||||
Version 1.1.0 makes fundamental changes to how GBM works with game configurations and backup data, in addition to many other updates. Read the changes below carefully before upgrading.
|
|
||||||
|
|
||||||
I've done my best to make sure the upgrade process allows everyone to continue using their existing data and configurations.
|
|
||||||
|
|
||||||
However, users who are sharing a backup folder between multiple PCs may experience data loss at some point due to the changes in this version. Please read "Known Issue #1" in this file for details.
|
|
||||||
|
|
||||||
All Platforms:
|
All Platforms:
|
||||||
|
|
||||||
- Core Design Changes (Game Configuration)
|
- Fixed a crash that could occur when renaming a game configuration.
|
||||||
- Game ID is now exposed to the user and can be changed. This feature is mainly for developer and contributer usage.
|
- Rewrote portions of game detection:
|
||||||
- Game ID is generated automatically by GBM or acquired from an import, the user doesn't need to set it unless they want to.
|
- The handling of duplicate game configurations has been flawed since regular expression support was added in v1.1. This has been fixed.
|
||||||
- Game ID (instead of Game Name) can now be used to name backup files and folders.
|
- GBM is now more efficient when detecting games by parameter and/or process path.
|
||||||
- GBM will continue to use the name by default for ease of use.
|
- Changed how save path variables are handled:
|
||||||
- This behavior can be toggled in the "Backup and Restore" section of Settings.
|
- GBM no longer uses it's own format and naming scheme for path variables.
|
||||||
- Using the game Name for backup files has a minor risk associated with it. See "Known Issue #2 and #4" for more details.
|
- GBM now uses Windows environment variables in game configurations.
|
||||||
- Game Name can now contain any character.
|
- For example, *appdatalocal* is now %LOCALAPPDATA% in a Windows configuration.
|
||||||
- When a game is deleted via Game Manager (or sync), all backup manifest entries for that particular game are now deleted. The backup files themselves are not.
|
- GBM also uses some custom environment variables, such as %USERDOCUMENTS% and %COMMONDOCUMENTS%. These are needed for compatability and to handle some limitations with how GBM interacts with 7-Zip.
|
||||||
- The Game Manager now syncs changes to the remote database immediately, instead of only when closed.
|
- GBM now uses the XDG specification for game configurations in Linux. (Thanks basxto!)
|
||||||
|
- For example, *appdatalocal* is now ${XDG_DATA_HOME:-~/.local/share} in a Linux configuration.
|
||||||
|
- Custom Path Variables have changed. For example, *Steam User Data* will now be %Steam User Data%.
|
||||||
|
- They will appear this way in Windows and Linux.
|
||||||
|
- GBM will no longer allow the creation of variables using reserved names, such as APPDATA.
|
||||||
|
- Your configurations will be automatically updated to these new formats when upgrading to v1.1.5.
|
||||||
|
- These changes will break game list compatability with other versions of GBM. Archived lists are available at http://mikemaximus.github.io/gbm-web/archive.html for those that wish to stay on an older version.
|
||||||
|
- Added a new setting, "Show resolved save paths in Game Manager".
|
||||||
|
- This new setting is enabled by default.
|
||||||
|
- When enabled, GBM will display resolved save paths in the Game Manager. This is how GBM displayed paths prior to v1.1.5.
|
||||||
|
- When disabled, GBM will display save paths with their variables when applicable.
|
||||||
|
- Added a tooltip to applicable "Path" fields on the Game Manager.
|
||||||
|
- This tooltip either displays either a resolved or unresolved path.
|
||||||
|
- The behaviour is toggled by the "Show resolved save paths" setting.
|
||||||
|
- Added "Import Backup Files" feature to the Game Manager.
|
||||||
|
- This feature allows you to import one or more backup files for a specific game configuration.
|
||||||
|
- This is useful if you lost your GBM database(s), but not the backup files. It also can be used to easily move compatible saved game backups between Windows and Linux.
|
||||||
|
- GBM cannot verify that the backups being imported are compatible with the current configuration. This is up to the user!
|
||||||
|
- This feature will be expanded and refined in future releases.
|
||||||
|
|
||||||
- Feature Additions & Changes
|
Linux:
|
||||||
- Added Regular Expression support for game detection.
|
|
||||||
- This feature allows GBM to detect games based on a pattern instead of a single process name.
|
|
||||||
- This allows GBM to better support games that run from multiple executables and games that use interpreters or emulators.
|
|
||||||
- Use the new "Regular Expression" checkbox on the Game Manager and enter the pattern in the "Process" field.
|
|
||||||
- GBM will validate patterns and offer to help troubleshoot (using regexr.com) when validation fails.
|
|
||||||
- Added the ability to start another process (or multiple processes) whenever a game is detected. (Thanks for the suggestion Naliel Supremo)
|
|
||||||
- This is useful to automatically start utilities, such as custom control schemes or overlays when a specific game is detected.
|
|
||||||
- The "Process Manager" allows you to manage any programs you'd like to launch.
|
|
||||||
- The "Processes..." button on the Game Manager allows you to assign processes to any selected game.
|
|
||||||
- A process can be set to end when the game is closed.
|
|
||||||
- Processes and related settings are specific to the local machine only. They are not synced to the backup folder and are not part of the import/export.
|
|
||||||
- Added "Backup GBM data files on launch" to the settings. A long overdue feature, this will backup both the remote and local databases (as gbm.s3db.launch.bak) each time GBM starts.
|
|
||||||
- This new setting is enabled by default.
|
|
||||||
- Only one backup is kept, the prior one will be overwritten.
|
|
||||||
- Added the ability to display messages or warnings that can be suppressed after one view. These messages can be reset via the Settings screen.
|
|
||||||
- The "Enable Sync" feature is now mandatory and the option been removed from Settings.
|
|
||||||
- The "Clean Local Manifest" feature has been removed. It is not required because manfiest entries are no longer orphaned by design. Existing orphaned entries will be removed during the v1.1.0 database upgrade.
|
|
||||||
- Added "Sync Game IDs" feature. This allows the user to update their game configuration identifiers to match the official list or an export file.
|
|
||||||
- This is mainly an optional upgrade tool for users with existing data from older versions. It allows the import feature to properly recognize and update game configurations.
|
|
||||||
- The sync is based on similarly named game configurations, therefore it's not 100% effective. Some games may be missed and require manual changes.
|
|
||||||
- If you share a backup folder with multiple PCs, this feature will cause some data loss when the new IDs are synced to the other PCs. See "Known Issue #1"
|
|
||||||
- Added "Disable sync event messages" to the settings. This will remove all sync related information messages in the log.
|
|
||||||
- This new setting is enabled by default.
|
|
||||||
- Sync messages can cause a lot of useless clutter in the log and are not useful to most users.
|
|
||||||
- Re-organized the Setting screen to clear up some space for the future.
|
|
||||||
|
|
||||||
- Import / Export Changes
|
- Fixed an issue that prevented Wine / Proton games from being detected in some cases.
|
||||||
- GBM now uses the Game ID to determine if a game is new or has an updated configuration.
|
- GBM can now use any Windows configuration to detect and backup games running in Wine / Proton.
|
||||||
- GBM will offer to "Sync Game IDs" when importing from the official list after upgrading to v1.1.0.
|
- An absolute Windows save path, such "%APPDATA%\Game\Saved Games" will be automatically converted to the proper path within the detected Wine prefix.
|
||||||
- This allows the import to recognize and update your configurations from older versions.
|
- The converted path will be saved to the configuration once game has been detected at least once.
|
||||||
- This offer only appears once and only appears for users that have upgraded from an older version.
|
- You cannot restore a backup using an absolute Windows path. The game needs to be detected at least once so the correct save path can be determined.
|
||||||
- Added icons to the import list to indicate a "New" or "Updated" game.
|
- This feature should be considered "Beta" and may not work in all scenarios. Please report any issues you may encounter!
|
||||||
|
|
||||||
- Updated session CSV export to adhere to RFC 4180. It now handles commas, quotes and line breaks correctly.
|
Website:
|
||||||
|
|
||||||
Windows Only:
|
- Search features have been added to the Official Game Lists (Thanks basxto!)
|
||||||
|
- Includes advanced features such as searching by tag and excludes.
|
||||||
- Updated 7-Zip to v18.01
|
- Tags are now clickable for automatic searching of similar games.
|
||||||
|
- Searches are linkable.
|
||||||
Linux Only:
|
- You can now link directly to a single configuration using the new link icon.
|
||||||
|
- Configurations intelligently collapse or uncollapse based on search results.
|
||||||
- GBM now uses notify-send (libnotify) if it's available to display notifications on Linux.
|
|
||||||
- Mono style notifications will be displayed if notify-send is not available.
|
|
||||||
- The GBM icon will be displayed on notifications if it's been installed via the makefile or a package installer.
|
|
||||||
|
|
||||||
Known Issues:
|
|
||||||
|
|
||||||
1. If one or more Game IDs are changed (manually or via Game ID Sync) on one computer and these changes are synced to another PC sharing the same backup folder, the following data will be lost.
|
|
||||||
- The local session data on that PC for the changed game(s) will be lost.
|
|
||||||
- The local backup manifest data for the changed game(s) on that PC will be lost. GBM will see any backups for the changed game(s) as new and will handle them accordingly.
|
|
||||||
- Any processes assigned to the changed games(s) on that PC will be lost.
|
|
||||||
Once your PCs are back in sync, this will no longer be an issue unless you are constantly changing your Game IDs, which is not recommended.
|
|
||||||
2. Backup files are not being renamed or removed when a new backup is created.
|
|
||||||
- This happens on the first backup after toggling between using the Name or ID for your file names. It's best to choose one setting and stick with it.
|
|
||||||
3. The error "The requested operation requires elevation" occurs when GBM tries to launch a process associated with a game.
|
|
||||||
- This means the process you're trying to launch with GBM requires administrator privilege.
|
|
||||||
- Click the blue "user" icon on the bottom left of the GBM window to quickly switch to administrator mode.
|
|
||||||
4. Game configurations using the same name, and configurations that end up with the same name when special characters are stripped will overwrite each other's backup files.
|
|
||||||
- For most users this should be a non-issue. Toggle "Use Game ID for folder and file names" to on in the Settings screen if this is a problem for you.
|
|
||||||
|
|
||||||
Important Notices:
|
|
||||||
|
|
||||||
1. Configurations on the official game lists are no longer compatible with older GBM versions.
|
|
||||||
- Configurations can now use Regular Expressions to detect when a game is running, which old versions of GBM will not understand how to handle.
|
|
||||||
- Configurations can now use any character in the game name, which may cause backups to fail in old versions of GBM.
|
|
||||||
- The last official lists compatible with v1.0.7 and prior versions are archived and available to download from http://mikemaximus.github.io/gbm-web/archive.html for users who wish to stay on an older version.
|
|
||||||
|
|
||||||
The entire version history of GBM releases is available at http://mikemaximus.github.io/gbm-web/versionhistory.html
|
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.
@@ -9,7 +9,9 @@ Game Backup Monitor is a simple, but flexible application that detects games as
|
|||||||
**Platform**: Windows (.NET 4) & Linux (Mono)
|
**Platform**: Windows (.NET 4) & Linux (Mono)
|
||||||
|
|
||||||
[About Game Backup Monitor](http://mikemaximus.github.io/gbm-web/about.html) <br />
|
[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 FAQ](http://mikemaximus.github.io/gbm-web/faq.html) <br />
|
||||||
[Game Backup Monitor Manual](http://mikemaximus.github.io/gbm-web/manual.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/).
|
Updates regarding this project are available via the [Game Backup Monitor web site](http://mikemaximus.github.io/gbm-web/).
|
||||||
|
|||||||
@@ -1,22 +1,45 @@
|
|||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
#check for all dependencies
|
# prepare
|
||||||
for prog in mono readlink df 7za;do
|
if [ -z "${XDG_DATA_HOME}" ]; then
|
||||||
[ -n "`whereis -b ${prog} | cut -sd' ' -f2`" ] || (echo "Please install ${prog}" && exit 1);
|
XDG_DATA_HOME="${HOME}/.local/share"
|
||||||
done
|
fi
|
||||||
for lib in libsqlite3;do
|
mkdir -p "${XDG_DATA_HOME}/gbm"
|
||||||
[ -n "`ldconfig -p | grep ${lib}`" ] || (echo "Please install ${lib}" && exit 1);
|
pidfile="${XDG_DATA_HOME}/gbm/pid"
|
||||||
done
|
|
||||||
dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
|
# check whether pid file exists and process is running
|
||||||
echo "Located in ${dir}";
|
if ( ! [ -e "${pidfile}" ] || ! pgrep -F "${pidfile}" ); then
|
||||||
gbmpath='./';
|
|
||||||
#locate GBM.exe
|
# check for all dependencies
|
||||||
if [ "${dir}" = '/usr/bin' ] && [ -s '/usr/share/gbm/GBM.exe' ]; then
|
for prog in mono readlink df 7za;do
|
||||||
gbmpath='/usr/share/gbm/';
|
[ -n "`whereis -b ${prog} | cut -sd' ' -f2`" ] || (echo "Please install ${prog}" && exit 1);
|
||||||
elif [ "${dir}" = '/usr/local/bin' ] && [ -s '/usr/local/share/gbm/GBM.exe' ]; then
|
done
|
||||||
gbmpath='/usr/local/share/gbm/';
|
for lib in libsqlite3;do
|
||||||
elif [ ! -s './GBM.exe' ]; then
|
[ -n "`ldconfig -p | grep ${lib}`" ] || (echo "Please install ${lib}" && exit 1);
|
||||||
echo 'GBM.exe not found';
|
done
|
||||||
exit 2;
|
|
||||||
|
# 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
|
fi
|
||||||
mono --desktop ${gbmpath}'GBM.exe' "$@";
|
|
||||||
exit $?;
|
|
||||||
|
|||||||
Reference in New Issue
Block a user