Compare commits
169 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8ff2d5149b | |||
| 15e306d8e1 | |||
| b69e0f1474 | |||
| c568e5e675 | |||
| 7185ca5e61 | |||
| 9c3643fa2e | |||
| cd185755c8 | |||
| 68dc0fcfc2 | |||
|
|
b8849f8d0c | ||
|
|
23102a90eb | ||
| 66c4258f64 | |||
|
|
e7e2e86a8e | ||
|
|
8d1396d992 | ||
|
|
afc89e8dfe | ||
|
|
11db38108e | ||
|
|
b48be71acc | ||
|
|
aa37c6525d | ||
|
|
f77a900f56 | ||
|
|
9b45ae7b1c | ||
|
|
3a54cddf98 | ||
|
|
fa88d2b03d | ||
|
|
7062f4b4ea | ||
|
|
076295069e | ||
| 2f141f9e31 | |||
| 4de2aa527f | |||
| 92cf33d840 | |||
| bcd40eb55f | |||
|
|
ee6d211929 | ||
|
|
203c745f09 | ||
|
|
56f60b7685 | ||
| 8c3c6876eb | |||
|
|
02c2aeff67 | ||
|
|
1c5cbc3a93 | ||
|
|
3b40217d69 | ||
|
|
8b0819119c | ||
|
|
b199b2a221 | ||
| ab0c7a05af | |||
| aff8059b5b | |||
| db3670d7d7 | |||
| 9349b7e0fd | |||
| b97139cd6d | |||
| 5fbbfa97e3 | |||
| 88d97a6027 | |||
| f29a58329e | |||
| d89b4fd824 | |||
| c557b2554b | |||
| edfcd5ebe9 | |||
|
|
e507930994 | ||
|
|
c3cd8dce3a | ||
|
|
c362e511a8 | ||
|
|
65458b4dc9 | ||
|
|
619ea75641 | ||
|
|
f5626a2613 | ||
|
|
80172aaa31 | ||
|
|
029e8d482b | ||
| b9104273c9 | |||
|
|
ce8b0ffaf7 | ||
|
|
04f6521035 | ||
|
|
58cccc1e21 | ||
|
|
1fb726c9d0 | ||
|
|
9d67c82d83 | ||
|
|
7fa0c66ca1 | ||
|
|
7ca0a50411 | ||
|
|
832bb9fbc4 | ||
|
|
720829a9b4 | ||
|
|
5d8a1954a2 | ||
|
|
967b0d80cc | ||
|
|
afbf54e3e7 | ||
|
|
b9f5ea2505 | ||
|
|
e2951174da | ||
|
|
1fc6c8ed3b | ||
|
|
64a01c97c5 | ||
|
|
5ee55ef2ef | ||
|
|
0b7d382f0f | ||
|
|
b7eaec2dca | ||
|
|
dec4c3d0b8 | ||
|
|
2682274e57 | ||
|
|
94a6cfb074 | ||
|
|
04593df988 | ||
|
|
fdcef783fb | ||
|
|
b31ca7b084 | ||
|
|
8edd916830 | ||
|
|
08ac487f72 | ||
|
|
f872e5d62e | ||
|
|
e1f2aef863 | ||
|
|
a7728c7bb1 | ||
|
|
cf2080916f | ||
|
|
2bceca2976 | ||
|
|
e0b3d3c394 | ||
|
|
fcff6dc2b7 | ||
|
|
5ca1d2f5a8 | ||
|
|
030d8fca30 | ||
|
|
f21ad89189 | ||
|
|
012f978741 | ||
|
|
7e1f7d15d5 | ||
|
|
fe6e0d9d37 | ||
|
|
783bf89241 | ||
|
|
21cce19c92 | ||
|
|
c93af8821f | ||
|
|
7dc61e76ab | ||
|
|
54b624a1cb | ||
|
|
1b0f26cea1 | ||
|
|
2e7189f047 | ||
|
|
5a6b7fe2c5 | ||
|
|
f204f6ccc6 | ||
|
|
9fdc35c43d | ||
|
|
9dc409415f | ||
|
|
4e1dc101e5 | ||
|
|
87f8840b72 | ||
|
|
c7565f5487 | ||
|
|
ffe34d29e7 | ||
|
|
4b201fb60e | ||
|
|
02a4a72409 | ||
|
|
376c1ad418 | ||
|
|
b7ebc41ba9 | ||
|
|
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 |
@@ -186,6 +186,4 @@ FakesAssemblies/
|
||||
GeneratedArtifacts/
|
||||
_Pvt_Extensions/
|
||||
ModelManifest.xml
|
||||
/.vs/slnx.sqlite
|
||||
/.vs/VSWorkspaceState.json
|
||||
/.vs/Game Backup Monitor/v15
|
||||
/.vs
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
Private bMonitorOnly As Boolean
|
||||
Private sComments As String
|
||||
Private bIsRegEx As Boolean
|
||||
Private bRecurseSubFolders As Boolean
|
||||
Private iOS As clsGame.eOS
|
||||
Private oTags As List(Of Tag)
|
||||
|
||||
Property ID As String
|
||||
@@ -141,6 +143,24 @@
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property RecurseSubFolders As Boolean
|
||||
Set(value As Boolean)
|
||||
bRecurseSubFolders = value
|
||||
End Set
|
||||
Get
|
||||
Return bRecurseSubFolders
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property OS As clsGame.eOS
|
||||
Set(value As clsGame.eOS)
|
||||
iOS = value
|
||||
End Set
|
||||
Get
|
||||
Return iOS
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property Tags As List(Of Tag)
|
||||
Get
|
||||
Return oTags
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
ReadOnly Property FileSafeName As String
|
||||
Get
|
||||
Return mgrPath.ValidateFileNameForOS(sName)
|
||||
Return mgrPath.ValidateFileName(sName)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<Serializable()>
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports System.Xml.Serialization
|
||||
|
||||
<Serializable()>
|
||||
Public Class clsGame
|
||||
Private sGameID As String = Guid.NewGuid.ToString
|
||||
Private sGameName As String = String.Empty
|
||||
@@ -21,9 +24,11 @@ Public Class clsGame
|
||||
Private bMonitorOnly As Boolean = False
|
||||
Private sComments As String = String.Empty
|
||||
Private bIsRegEx As Boolean = False
|
||||
Private bDuplicate As Boolean = False
|
||||
Private bRecurseSubFolders As Boolean = True
|
||||
Private iOS As eOS = mgrCommon.GetCurrentOS()
|
||||
Private oImportTags As New List(Of Tag)
|
||||
Private bImportUpdate As Boolean = False
|
||||
Private oCompiledRegEx As Regex
|
||||
|
||||
<Flags()> Public Enum eOptionalSyncFields
|
||||
None = 0
|
||||
@@ -35,10 +40,17 @@ Public Class clsGame
|
||||
MonitorGame = 64
|
||||
End Enum
|
||||
|
||||
Public Enum eOS
|
||||
<XmlEnum("1")>
|
||||
Windows = 1
|
||||
<XmlEnum("2")>
|
||||
Linux = 2
|
||||
End Enum
|
||||
|
||||
Property ID As String
|
||||
Set(value As String)
|
||||
If Not value Is Nothing Then
|
||||
sGameID = mgrPath.ValidateFileNameForOS(value)
|
||||
sGameID = mgrPath.ValidateFileName(value)
|
||||
End If
|
||||
End Set
|
||||
Get
|
||||
@@ -46,12 +58,6 @@ Public Class clsGame
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property CompoundKey As String
|
||||
Get
|
||||
Return ProcessName & ":" & ID
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property CroppedName As String
|
||||
Get
|
||||
If Name.Length > 40 Then
|
||||
@@ -64,7 +70,7 @@ Public Class clsGame
|
||||
|
||||
ReadOnly Property FileSafeName As String
|
||||
Get
|
||||
Return mgrPath.ValidateFileNameForOS(sGameName)
|
||||
Return mgrPath.ValidateFileName(sGameName)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -109,7 +115,12 @@ Public Class clsGame
|
||||
bAbsolutePath = value
|
||||
End Set
|
||||
Get
|
||||
Return bAbsolutePath
|
||||
'This makes sure a registry key path isn't seen as a relative path.
|
||||
If mgrPath.IsSupportedRegistryPath(TruePath) Then
|
||||
Return True
|
||||
Else
|
||||
Return bAbsolutePath
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -248,24 +259,30 @@ Public Class clsGame
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Duplicate As Boolean
|
||||
Property RecurseSubFolders As Boolean
|
||||
Get
|
||||
Return bDuplicate
|
||||
Return bRecurseSubFolders
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bDuplicate = value
|
||||
bRecurseSubFolders = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
ReadOnly Property TruePath As String
|
||||
Property OS As eOS
|
||||
Get
|
||||
Return sPath
|
||||
Return iOS
|
||||
End Get
|
||||
Set(value As eOS)
|
||||
iOS = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
ReadOnly Property TrueProcess As String
|
||||
Property TruePath As String
|
||||
Set(value As String)
|
||||
sPath = value
|
||||
End Set
|
||||
Get
|
||||
Return HandleProcessDuplicates()
|
||||
Return sPath
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -287,6 +304,15 @@ Public Class clsGame
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property CompiledRegEx As Regex
|
||||
Get
|
||||
Return oCompiledRegEx
|
||||
End Get
|
||||
Set(value As Regex)
|
||||
oCompiledRegEx = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
ReadOnly Property IncludeArray As String()
|
||||
Get
|
||||
If FileType = String.Empty Then
|
||||
@@ -361,6 +387,12 @@ Public Class clsGame
|
||||
If IsRegEx <> oGame.IsRegEx Then
|
||||
Return False
|
||||
End If
|
||||
If RecurseSubFolders <> oGame.RecurseSubFolders Then
|
||||
Return False
|
||||
End If
|
||||
If OS <> oGame.OS Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
'Optional Sync Fields
|
||||
If (eSyncFields And eOptionalSyncFields.Company) = eOptionalSyncFields.Company Then
|
||||
@@ -437,6 +469,12 @@ Public Class clsGame
|
||||
If IsRegEx <> oGame.IsRegEx Then
|
||||
Return False
|
||||
End If
|
||||
If RecurseSubFolders <> oGame.RecurseSubFolders Then
|
||||
Return False
|
||||
End If
|
||||
If OS <> oGame.OS Then
|
||||
Return False
|
||||
End If
|
||||
Return True
|
||||
End If
|
||||
End Function
|
||||
@@ -457,18 +495,6 @@ Public Class clsGame
|
||||
Return DirectCast(Me.MemberwiseClone(), clsGame)
|
||||
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
|
||||
Return eSyncFields Or eSyncField
|
||||
End Function
|
||||
|
||||
@@ -4,6 +4,11 @@
|
||||
fString = 1
|
||||
fNumeric = 2
|
||||
fBool = 3
|
||||
fEnum = 4
|
||||
End Enum
|
||||
|
||||
Public Enum eEnumFilterField As Integer
|
||||
OS = 1
|
||||
End Enum
|
||||
|
||||
<Flags()> Public Enum eFieldStatus
|
||||
@@ -15,6 +20,7 @@
|
||||
Private sFieldName As String
|
||||
Private sFriendlyFieldName As String
|
||||
Private eType As eDataType
|
||||
Private eEnumField As eEnumFilterField
|
||||
Private eStatus As eFieldStatus
|
||||
|
||||
Public Property FieldName As String
|
||||
@@ -44,6 +50,15 @@
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property EnumField As eEnumFilterField
|
||||
Get
|
||||
Return eEnumField
|
||||
End Get
|
||||
Set(value As eEnumFilterField)
|
||||
eEnumField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'This is a flag property - Setting a value will toggle that flag on and off.
|
||||
Public Property Status As eFieldStatus
|
||||
Get
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
ReadOnly Property FormattedName As String
|
||||
Get
|
||||
Return "*" & sVariableName & "*"
|
||||
Return "%" & sVariableName & "%"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
Public Class clsWineData
|
||||
Private sMonitorID As String = String.Empty
|
||||
Private sPrefix As String = String.Empty
|
||||
Private sSavePath As String = String.Empty
|
||||
Private sBinaryPath As String = String.Empty
|
||||
|
||||
Property MonitorID As String
|
||||
Get
|
||||
Return sMonitorID
|
||||
End Get
|
||||
Set(value As String)
|
||||
sMonitorID = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Prefix As String
|
||||
Get
|
||||
Return sPrefix
|
||||
End Get
|
||||
Set(value As String)
|
||||
sPrefix = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property SavePath As String
|
||||
Get
|
||||
Return sSavePath
|
||||
End Get
|
||||
Set(value As String)
|
||||
sSavePath = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property BinaryPath As String
|
||||
Get
|
||||
Return sBinaryPath
|
||||
End Get
|
||||
Set(value As String)
|
||||
sBinaryPath = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Class
|
||||
@@ -46,6 +46,7 @@ Partial Class frmAddWizard
|
||||
Me.txtSavePath = New System.Windows.Forms.TextBox()
|
||||
Me.lblStep3Intro = New System.Windows.Forms.Label()
|
||||
Me.tbPage3a = New System.Windows.Forms.TabPage()
|
||||
Me.chkRecurseSubFolders = New System.Windows.Forms.CheckBox()
|
||||
Me.lblIncludePathTitle = New System.Windows.Forms.Label()
|
||||
Me.lblIncludePath = New System.Windows.Forms.Label()
|
||||
Me.lblFileTypes = New System.Windows.Forms.Label()
|
||||
@@ -227,19 +228,17 @@ Partial Class frmAddWizard
|
||||
Me.lblLimit.AutoSize = True
|
||||
Me.lblLimit.Location = New System.Drawing.Point(203, 109)
|
||||
Me.lblLimit.Name = "lblLimit"
|
||||
Me.lblLimit.Size = New System.Drawing.Size(68, 13)
|
||||
Me.lblLimit.Size = New System.Drawing.Size(138, 13)
|
||||
Me.lblLimit.TabIndex = 15
|
||||
Me.lblLimit.Text = "Backup Limit"
|
||||
Me.lblLimit.Text = "Backup Limit (0 = Unlimited)"
|
||||
Me.lblLimit.Visible = False
|
||||
'
|
||||
'nudLimit
|
||||
'
|
||||
Me.nudLimit.Location = New System.Drawing.Point(157, 107)
|
||||
Me.nudLimit.Minimum = New Decimal(New Integer() {2, 0, 0, 0})
|
||||
Me.nudLimit.Name = "nudLimit"
|
||||
Me.nudLimit.Size = New System.Drawing.Size(40, 20)
|
||||
Me.nudLimit.TabIndex = 14
|
||||
Me.nudLimit.Value = New Decimal(New Integer() {2, 0, 0, 0})
|
||||
Me.nudLimit.Visible = False
|
||||
'
|
||||
'lblStep3Title
|
||||
@@ -310,6 +309,7 @@ Partial Class frmAddWizard
|
||||
'tbPage3a
|
||||
'
|
||||
Me.tbPage3a.BackColor = System.Drawing.SystemColors.Control
|
||||
Me.tbPage3a.Controls.Add(Me.chkRecurseSubFolders)
|
||||
Me.tbPage3a.Controls.Add(Me.lblIncludePathTitle)
|
||||
Me.tbPage3a.Controls.Add(Me.lblIncludePath)
|
||||
Me.tbPage3a.Controls.Add(Me.lblFileTypes)
|
||||
@@ -323,6 +323,17 @@ Partial Class frmAddWizard
|
||||
Me.tbPage3a.TabIndex = 3
|
||||
Me.tbPage3a.Text = "TabPage4"
|
||||
'
|
||||
'chkRecurseSubFolders
|
||||
'
|
||||
Me.chkRecurseSubFolders.AutoSize = True
|
||||
Me.chkRecurseSubFolders.Location = New System.Drawing.Point(218, 40)
|
||||
Me.chkRecurseSubFolders.Name = "chkRecurseSubFolders"
|
||||
Me.chkRecurseSubFolders.Size = New System.Drawing.Size(15, 14)
|
||||
Me.chkRecurseSubFolders.TabIndex = 0
|
||||
Me.chkRecurseSubFolders.TabStop = False
|
||||
Me.chkRecurseSubFolders.UseVisualStyleBackColor = True
|
||||
Me.chkRecurseSubFolders.Visible = False
|
||||
'
|
||||
'lblIncludePathTitle
|
||||
'
|
||||
Me.lblIncludePathTitle.AutoSize = True
|
||||
@@ -553,7 +564,6 @@ Partial Class frmAddWizard
|
||||
Me.MaximizeBox = False
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmAddWizard"
|
||||
Me.ShowIcon = False
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
|
||||
Me.Text = "Add Game Wizard"
|
||||
Me.tabWizard.ResumeLayout(False)
|
||||
@@ -618,4 +628,5 @@ Partial Class frmAddWizard
|
||||
Friend WithEvents lblExcludePathTitle As Label
|
||||
Friend WithEvents lblLimit As Label
|
||||
Friend WithEvents nudLimit As NumericUpDown
|
||||
Friend WithEvents chkRecurseSubFolders As CheckBox
|
||||
End Class
|
||||
|
||||
@@ -30,6 +30,7 @@ Public Class frmAddWizard
|
||||
Private Sub SetForm()
|
||||
'Set Form Name
|
||||
Me.Text = frmAddWizard_FormName
|
||||
Me.Icon = GBM_Icon
|
||||
|
||||
'Set Form Text
|
||||
btnCancel.Text = frmAddWizard_btnCancel
|
||||
@@ -66,6 +67,7 @@ Public Class frmAddWizard
|
||||
|
||||
chkFolderSave.Checked = True
|
||||
chkTimeStamp.Checked = False
|
||||
chkRecurseSubFolders.Checked = True
|
||||
StepHandler()
|
||||
End Sub
|
||||
|
||||
@@ -73,10 +75,8 @@ Public Class frmAddWizard
|
||||
If chkTimeStamp.Checked Then
|
||||
nudLimit.Visible = True
|
||||
lblLimit.Visible = True
|
||||
nudLimit.Value = 5
|
||||
Else
|
||||
nudLimit.Visible = False
|
||||
nudLimit.Value = nudLimit.Minimum
|
||||
lblLimit.Visible = False
|
||||
End If
|
||||
End Sub
|
||||
@@ -85,9 +85,13 @@ Public Class frmAddWizard
|
||||
Dim sLimit As String = String.Empty
|
||||
|
||||
If bTimeStamp Then
|
||||
Return mgrCommon.BooleanYesNo(bTimeStamp) & " (" & iLimit & ")"
|
||||
If iLimit <> 0 Then
|
||||
Return mgrCommon.BooleanYesNo(bTimeStamp) & " (" & iLimit & ")"
|
||||
Else
|
||||
Return mgrCommon.BooleanYesNo(bTimeStamp) & " (" & frmAddWizard_Summary_NoLimit & ")"
|
||||
End If
|
||||
Else
|
||||
Return mgrCommon.BooleanYesNo(bTimeStamp)
|
||||
Return mgrCommon.BooleanYesNo(bTimeStamp)
|
||||
End If
|
||||
End Function
|
||||
|
||||
@@ -112,6 +116,7 @@ Public Class frmAddWizard
|
||||
Dim iLimit As Integer = nudLimit.Value
|
||||
Dim sFileType As String = txtFileTypes.Text
|
||||
Dim sExcludeList As String = txtExcludeList.Text
|
||||
Dim bRecurseSubFolders As Boolean = chkRecurseSubFolders.Checked
|
||||
Dim sProcess As String
|
||||
Dim sItem As String()
|
||||
Dim sItems As String()
|
||||
@@ -160,6 +165,7 @@ Public Class frmAddWizard
|
||||
oGame.BackupLimit = iLimit
|
||||
oGame.ExcludeList = sExcludeList
|
||||
oGame.ProcessPath = sProcessPath
|
||||
oGame.RecurseSubFolders = bRecurseSubFolders
|
||||
|
||||
Return oGame
|
||||
End Function
|
||||
@@ -204,7 +210,7 @@ Public Class frmAddWizard
|
||||
End Function
|
||||
|
||||
Private Function ValidateProcessPath(ByVal strPath As String, ByRef sErrorMessage As String) As Boolean
|
||||
strPath = mgrPath.ValidatePathForOS(strPath)
|
||||
strPath = mgrPath.ValidatePath(strPath)
|
||||
|
||||
If strPath.Trim = String.Empty Then
|
||||
sErrorMessage = frmAddWizard_ErrorValidProcess
|
||||
@@ -234,8 +240,6 @@ Public Class frmAddWizard
|
||||
End Function
|
||||
|
||||
Private Function ValidateSavePath(ByVal strPath As String, ByRef sErrorMessage As String) As Boolean
|
||||
strPath = mgrPath.ValidatePathForOS(strPath)
|
||||
|
||||
If strPath.Trim = String.Empty Then
|
||||
sErrorMessage = frmAddWizard_ErrorValidSavePath
|
||||
txtSavePath.Focus()
|
||||
@@ -323,6 +327,7 @@ Public Class frmAddWizard
|
||||
End If
|
||||
|
||||
Case eSteps.Step3
|
||||
txtSavePath.Text = mgrPath.ValidatePath(txtSavePath.Text)
|
||||
If ValidateSavePath(txtSavePath.Text, sErrorMessage) Then
|
||||
lblIncludePath.Text = txtSavePath.Text
|
||||
lblExcludePath.Text = txtSavePath.Text
|
||||
@@ -416,7 +421,7 @@ Public Class frmAddWizard
|
||||
End If
|
||||
|
||||
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
|
||||
End Sub
|
||||
@@ -432,7 +437,7 @@ Public Class frmAddWizard
|
||||
End If
|
||||
End If
|
||||
|
||||
sNewPath = mgrCommon.OpenFolderBrowser("Wizard_Save_Path", frmAddWizard_ChooseSavePath, sDefaultFolder, False, False)
|
||||
sNewPath = mgrCommon.OpenClassicFolderBrowser("Wizard_Save_Path", frmAddWizard_ChooseSavePath, sDefaultFolder, False, False)
|
||||
|
||||
If sNewPath <> String.Empty Then txtSavePath.Text = sNewPath
|
||||
End Sub
|
||||
@@ -452,9 +457,9 @@ Public Class frmAddWizard
|
||||
frm.FormName = sFormText
|
||||
frm.BuilderString = txtBox.Text
|
||||
frm.RootFolder = txtSavePath.Text
|
||||
|
||||
frm.RecurseSubFolders = chkRecurseSubFolders.Checked
|
||||
frm.ShowDialog()
|
||||
|
||||
chkRecurseSubFolders.Checked = frm.RecurseSubFolders
|
||||
txtBox.Text = frm.BuilderString
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -123,6 +123,7 @@ Partial Class frmAdvancedImport
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmAdvancedImport"
|
||||
Me.ShowIcon = False
|
||||
Me.ShowInTaskbar = False
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Import Game Configurations"
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
@@ -41,7 +41,7 @@ Public Class frmAdvancedImport
|
||||
lstGames.BeginUpdate()
|
||||
bSelectAll = Not bSelectAll
|
||||
For i As Integer = 0 To lstGames.Items.Count - 1
|
||||
lstGames.Items(i).Checked = bSelectAll
|
||||
lstGames.Items(i).Checked = bSelectAll
|
||||
Next
|
||||
lstGames.EndUpdate()
|
||||
Cursor.Current = Cursors.Default
|
||||
@@ -56,6 +56,22 @@ Public Class frmAdvancedImport
|
||||
End If
|
||||
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)
|
||||
Dim oApp As clsGame
|
||||
Dim oListViewItem As ListViewItem
|
||||
@@ -75,6 +91,7 @@ Public Class frmAdvancedImport
|
||||
For Each de As DictionaryEntry In ImportData
|
||||
bAddItem = False
|
||||
oApp = DirectCast(de.Value, clsGame)
|
||||
|
||||
sTags = String.Empty
|
||||
oApp.ImportTags.Sort(AddressOf mgrCommon.CompareImportTagsByName)
|
||||
For Each oTag As Tag In oApp.ImportTags
|
||||
@@ -82,7 +99,7 @@ Public Class frmAdvancedImport
|
||||
Next
|
||||
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
|
||||
|
||||
If FinalData.ContainsKey(oApp.ID) Then
|
||||
@@ -114,11 +131,16 @@ Public Class frmAdvancedImport
|
||||
If sFilter = String.Empty Then
|
||||
bAddItem = True
|
||||
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
|
||||
End If
|
||||
End If
|
||||
|
||||
'Check for hardcoded ignore tags
|
||||
If bAddItem And (mgrCommon.IsUnix And oApp.OS = clsGame.eOS.Windows) Then
|
||||
bAddItem = CheckIgnoreTags(oApp.ImportTags)
|
||||
End If
|
||||
|
||||
If bAddItem Then
|
||||
If oListViewItem.Checked Then bResetSelectAll = True
|
||||
lstGames.Items.Add(oListViewItem)
|
||||
@@ -152,6 +174,7 @@ Public Class frmAdvancedImport
|
||||
Private Sub SetForm()
|
||||
'Set Form Name
|
||||
Me.Text = frmAdvancedImport_FormName
|
||||
Me.Icon = GBM_Icon
|
||||
|
||||
'Add configuration date to title if applicable
|
||||
If ImportInfo.Exported <> 0 Then
|
||||
|
||||
@@ -24,8 +24,8 @@ Partial Class frmChooseGame
|
||||
Private Sub InitializeComponent()
|
||||
Me.lblChoose = New System.Windows.Forms.Label()
|
||||
Me.btnChoose = New System.Windows.Forms.Button()
|
||||
Me.lstGameBox = New System.Windows.Forms.ListBox()
|
||||
Me.btnCancel = New System.Windows.Forms.Button()
|
||||
Me.lstGameBox = New System.Windows.Forms.ListView()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'lblChoose
|
||||
@@ -39,38 +39,40 @@ Partial Class frmChooseGame
|
||||
'
|
||||
'btnChoose
|
||||
'
|
||||
Me.btnChoose.Location = New System.Drawing.Point(72, 135)
|
||||
Me.btnChoose.Location = New System.Drawing.Point(201, 176)
|
||||
Me.btnChoose.Name = "btnChoose"
|
||||
Me.btnChoose.Size = New System.Drawing.Size(90, 23)
|
||||
Me.btnChoose.TabIndex = 2
|
||||
Me.btnChoose.TabIndex = 1
|
||||
Me.btnChoose.Text = "C&hoose Game"
|
||||
Me.btnChoose.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lstGameBox
|
||||
'
|
||||
Me.lstGameBox.FormattingEnabled = True
|
||||
Me.lstGameBox.Location = New System.Drawing.Point(15, 34)
|
||||
Me.lstGameBox.Name = "lstGameBox"
|
||||
Me.lstGameBox.Size = New System.Drawing.Size(228, 95)
|
||||
Me.lstGameBox.Sorted = True
|
||||
Me.lstGameBox.TabIndex = 1
|
||||
'
|
||||
'btnCancel
|
||||
'
|
||||
Me.btnCancel.Location = New System.Drawing.Point(168, 135)
|
||||
Me.btnCancel.Location = New System.Drawing.Point(297, 176)
|
||||
Me.btnCancel.Name = "btnCancel"
|
||||
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnCancel.TabIndex = 3
|
||||
Me.btnCancel.TabIndex = 2
|
||||
Me.btnCancel.Text = "&Cancel"
|
||||
Me.btnCancel.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lstGameBox
|
||||
'
|
||||
Me.lstGameBox.FullRowSelect = True
|
||||
Me.lstGameBox.Location = New System.Drawing.Point(12, 25)
|
||||
Me.lstGameBox.MultiSelect = False
|
||||
Me.lstGameBox.Name = "lstGameBox"
|
||||
Me.lstGameBox.Size = New System.Drawing.Size(360, 145)
|
||||
Me.lstGameBox.TabIndex = 0
|
||||
Me.lstGameBox.UseCompatibleStateImageBehavior = False
|
||||
Me.lstGameBox.View = System.Windows.Forms.View.Details
|
||||
'
|
||||
'frmChooseGame
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(255, 166)
|
||||
Me.Controls.Add(Me.btnCancel)
|
||||
Me.ClientSize = New System.Drawing.Size(384, 211)
|
||||
Me.Controls.Add(Me.lstGameBox)
|
||||
Me.Controls.Add(Me.btnCancel)
|
||||
Me.Controls.Add(Me.btnChoose)
|
||||
Me.Controls.Add(Me.lblChoose)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||
@@ -78,6 +80,7 @@ Partial Class frmChooseGame
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmChooseGame"
|
||||
Me.ShowIcon = False
|
||||
Me.ShowInTaskbar = False
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Choose Game"
|
||||
Me.ResumeLayout(False)
|
||||
@@ -86,6 +89,6 @@ Partial Class frmChooseGame
|
||||
End Sub
|
||||
Friend WithEvents lblChoose As System.Windows.Forms.Label
|
||||
Friend WithEvents btnChoose As System.Windows.Forms.Button
|
||||
Friend WithEvents lstGameBox As System.Windows.Forms.ListBox
|
||||
Friend WithEvents btnCancel As Button
|
||||
Friend WithEvents lstGameBox As ListView
|
||||
End Class
|
||||
|
||||
@@ -25,26 +25,35 @@ Public Class frmChooseGame
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Sub FillComboBox()
|
||||
lstGameBox.ValueMember = "Key"
|
||||
lstGameBox.DisplayMember = "Value"
|
||||
Private Sub FillList()
|
||||
Dim sTags As String
|
||||
Dim oListViewItem As ListViewItem
|
||||
|
||||
lstGameBox.BeginUpdate()
|
||||
|
||||
lstGameBox.Columns.Add(frmChooseGame_ColumnName, 180)
|
||||
lstGameBox.Columns.Add(frmChooseGame_ColumnTags, 175)
|
||||
|
||||
For Each o As clsGame In Process.DuplicateList
|
||||
lstGameBox.Items.Add(New KeyValuePair(Of String, String)(o.ID, o.Name))
|
||||
sTags = mgrGameTags.PrintTagsbyID(o.ID)
|
||||
oListViewItem = New ListViewItem(New String() {o.Name, sTags})
|
||||
oListViewItem.Tag = o.ID
|
||||
If lstGameBox.Items.Count = 0 Then oListViewItem.Selected = True
|
||||
lstGameBox.Items.Add(oListViewItem)
|
||||
oGamesHash.Add(o.ID, o)
|
||||
Next
|
||||
|
||||
lstGameBox.SelectedIndex = 0
|
||||
lstGameBox.EndUpdate()
|
||||
End Sub
|
||||
|
||||
Private Sub SaveSelection()
|
||||
oGame.ProcessPath = oProcess.GameInfo.ProcessPath
|
||||
oGame.ProcessPath = oProcess.ProcessPath
|
||||
mgrMonitorList.DoListUpdate(oGame)
|
||||
End Sub
|
||||
|
||||
Private Sub GetSelection()
|
||||
Dim oSelected As KeyValuePair(Of String, String) = lstGameBox.SelectedItem
|
||||
oGame = DirectCast(oGamesHash.Item(oSelected.Key), clsGame)
|
||||
Dim oSelected As String = lstGameBox.SelectedItems(0).Tag
|
||||
oGame = DirectCast(oGamesHash.Item(oSelected), clsGame)
|
||||
SaveSelection()
|
||||
bGameSelected = True
|
||||
Me.DialogResult = DialogResult.OK
|
||||
@@ -54,6 +63,7 @@ Public Class frmChooseGame
|
||||
Private Sub SetForm()
|
||||
'Set Form Name
|
||||
Me.Text = frmChooseGame_FormName
|
||||
Me.Icon = GBM_Icon
|
||||
|
||||
'Set Form Text
|
||||
btnCancel.Text = frmChooseGame_btnCancel
|
||||
@@ -63,12 +73,14 @@ Public Class frmChooseGame
|
||||
|
||||
Private Sub frmChooseGame_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
||||
SetForm()
|
||||
FillComboBox()
|
||||
FillList()
|
||||
Me.Focus()
|
||||
End Sub
|
||||
|
||||
Private Sub btnChoose_Click(sender As System.Object, e As System.EventArgs) Handles btnChoose.Click
|
||||
GetSelection()
|
||||
If lstGameBox.SelectedItems.Count > 0 Then
|
||||
GetSelection()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub frmChooseGame_FormClosing(sender As System.Object, e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
|
||||
|
||||
@@ -104,6 +104,7 @@ Partial Class frmFileFolderSearch
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmFileFolderSearch"
|
||||
Me.ShowIcon = False
|
||||
Me.ShowInTaskbar = False
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Search"
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
@@ -220,6 +220,7 @@ Public Class frmFileFolderSearch
|
||||
Private Sub SetForm()
|
||||
'Set Form Name
|
||||
Me.Text = frmFileFolderSearch_FormName
|
||||
Me.Icon = GBM_Icon
|
||||
|
||||
'Set Form Text
|
||||
lblResults.Text = frmFileFolderSearch_lblResults
|
||||
|
||||
@@ -40,7 +40,7 @@ Partial Class frmFilter
|
||||
Me.grpGameFilter = New System.Windows.Forms.GroupBox()
|
||||
Me.lblNot = New System.Windows.Forms.Label()
|
||||
Me.chkNot = New System.Windows.Forms.CheckBox()
|
||||
Me.cboBoolFilter = New System.Windows.Forms.ComboBox()
|
||||
Me.cboListFilter = New System.Windows.Forms.ComboBox()
|
||||
Me.numFilter = New System.Windows.Forms.NumericUpDown()
|
||||
Me.cboNumericOps = New System.Windows.Forms.ComboBox()
|
||||
Me.lblCurrentFilters = New System.Windows.Forms.Label()
|
||||
@@ -229,7 +229,7 @@ Partial Class frmFilter
|
||||
'
|
||||
Me.grpGameFilter.Controls.Add(Me.lblNot)
|
||||
Me.grpGameFilter.Controls.Add(Me.chkNot)
|
||||
Me.grpGameFilter.Controls.Add(Me.cboBoolFilter)
|
||||
Me.grpGameFilter.Controls.Add(Me.cboListFilter)
|
||||
Me.grpGameFilter.Controls.Add(Me.numFilter)
|
||||
Me.grpGameFilter.Controls.Add(Me.cboNumericOps)
|
||||
Me.grpGameFilter.Controls.Add(Me.lblCurrentFilters)
|
||||
@@ -265,14 +265,14 @@ Partial Class frmFilter
|
||||
Me.chkNot.TabIndex = 10
|
||||
Me.chkNot.UseVisualStyleBackColor = True
|
||||
'
|
||||
'cboBoolFilter
|
||||
'cboListFilter
|
||||
'
|
||||
Me.cboBoolFilter.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.cboBoolFilter.FormattingEnabled = True
|
||||
Me.cboBoolFilter.Location = New System.Drawing.Point(187, 36)
|
||||
Me.cboBoolFilter.Name = "cboBoolFilter"
|
||||
Me.cboBoolFilter.Size = New System.Drawing.Size(136, 21)
|
||||
Me.cboBoolFilter.TabIndex = 3
|
||||
Me.cboListFilter.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.cboListFilter.FormattingEnabled = True
|
||||
Me.cboListFilter.Location = New System.Drawing.Point(187, 36)
|
||||
Me.cboListFilter.Name = "cboListFilter"
|
||||
Me.cboListFilter.Size = New System.Drawing.Size(136, 21)
|
||||
Me.cboListFilter.TabIndex = 3
|
||||
'
|
||||
'numFilter
|
||||
'
|
||||
@@ -501,6 +501,7 @@ Partial Class frmFilter
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmFilter"
|
||||
Me.ShowIcon = False
|
||||
Me.ShowInTaskbar = False
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Custom Filter"
|
||||
Me.grpTagFilter.ResumeLayout(False)
|
||||
@@ -549,7 +550,7 @@ Partial Class frmFilter
|
||||
Friend WithEvents lblFields As Label
|
||||
Friend WithEvents cboNumericOps As ComboBox
|
||||
Friend WithEvents numFilter As NumericUpDown
|
||||
Friend WithEvents cboBoolFilter As ComboBox
|
||||
Friend WithEvents cboListFilter As ComboBox
|
||||
Friend WithEvents lblSortFields As Label
|
||||
Friend WithEvents Label1 As Label
|
||||
Friend WithEvents grpSortOptions As GroupBox
|
||||
|
||||
@@ -202,6 +202,14 @@ Public Class frmFilter
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidFilter
|
||||
oValidFields.Add(oField)
|
||||
|
||||
'Include Sub Folders
|
||||
oField = New clsGameFilterField
|
||||
oField.FieldName = "RecurseSubFolders"
|
||||
oField.FriendlyFieldName = frmFilter_FieldRecurseSubFolders
|
||||
oField.Type = clsGameFilterField.eDataType.fBool
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidFilter
|
||||
oValidFields.Add(oField)
|
||||
|
||||
'Delete Folder on Restore
|
||||
oField = New clsGameFilterField
|
||||
oField.FieldName = "CleanFolder"
|
||||
@@ -234,6 +242,15 @@ Public Class frmFilter
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidFilter
|
||||
oValidFields.Add(oField)
|
||||
|
||||
'OS
|
||||
oField = New clsGameFilterField
|
||||
oField.FieldName = "OS"
|
||||
oField.FriendlyFieldName = frmFilter_FieldOS
|
||||
oField.Type = clsGameFilterField.eDataType.fEnum
|
||||
oField.EnumField = clsGameFilterField.eEnumFilterField.OS
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidFilter
|
||||
oValidFields.Add(oField)
|
||||
|
||||
'IsRegEx
|
||||
oField = New clsGameFilterField
|
||||
oField.FieldName = "IsRegEx"
|
||||
@@ -351,7 +368,7 @@ Public Class frmFilter
|
||||
sFilter = oFilter.Field.FriendlyFieldName & " " & frmFilter_lstFilterContains & " """ & oFilter.Data & """"
|
||||
Case clsGameFilterField.eDataType.fNumeric
|
||||
sFilter = oFilter.Field.FriendlyFieldName & " " & oFilter.NumericOperatorAsString & " " & oFilter.Data
|
||||
Case clsGameFilterField.eDataType.fBool
|
||||
Case clsGameFilterField.eDataType.fBool, clsGameFilterField.eDataType.fEnum
|
||||
sFilter = oFilter.Field.FriendlyFieldName & " = " & oFilter.Data
|
||||
End Select
|
||||
|
||||
@@ -405,23 +422,22 @@ Public Class frmFilter
|
||||
End Sub
|
||||
|
||||
Private Sub ChangeFilterMode()
|
||||
Dim oFilterType As clsGameFilterField.eDataType = DirectCast(cboFilterField.SelectedValue, clsGameFilterField).Type
|
||||
Dim oFilter As clsGameFilterField = DirectCast(cboFilterField.SelectedValue, clsGameFilterField)
|
||||
|
||||
'Reset
|
||||
cboNumericOps.SelectedIndex = 0
|
||||
cboBoolFilter.SelectedIndex = 0
|
||||
numFilter.Value = 0
|
||||
txtStringFilter.Text = String.Empty
|
||||
chkNot.Checked = False
|
||||
|
||||
'Reset Visibilty
|
||||
cboBoolFilter.Visible = False
|
||||
cboListFilter.Visible = False
|
||||
cboNumericOps.Visible = False
|
||||
numFilter.Visible = False
|
||||
txtStringFilter.Visible = False
|
||||
|
||||
'Set Visiblity
|
||||
Select Case oFilterType
|
||||
Select Case oFilter.Type
|
||||
Case clsGameFilterField.eDataType.fString
|
||||
txtStringFilter.Visible = True
|
||||
Case clsGameFilterField.eDataType.fNumeric
|
||||
@@ -429,7 +445,13 @@ Public Class frmFilter
|
||||
numFilter.Visible = True
|
||||
txtStringFilter.Visible = False
|
||||
Case clsGameFilterField.eDataType.fBool
|
||||
cboBoolFilter.Visible = True
|
||||
LoadComboAsBool()
|
||||
cboListFilter.SelectedIndex = 0
|
||||
cboListFilter.Visible = True
|
||||
Case clsGameFilterField.eDataType.fEnum
|
||||
LoadComboAsEnum(oFilter.EnumField)
|
||||
cboListFilter.SelectedIndex = 0
|
||||
cboListFilter.Visible = True
|
||||
End Select
|
||||
|
||||
End Sub
|
||||
@@ -450,8 +472,8 @@ Public Class frmFilter
|
||||
oFilter.Data = numFilter.Value
|
||||
oFilter.NumericOperator = DirectCast(cboNumericOps.SelectedValue, clsGameFilter.eNumericOperators)
|
||||
sFilter = oFilter.Field.FriendlyFieldName & " " & oFilter.NumericOperatorAsString & " " & oFilter.Data
|
||||
Case clsGameFilterField.eDataType.fBool
|
||||
oFilter.Data = cboBoolFilter.SelectedValue
|
||||
Case clsGameFilterField.eDataType.fBool, clsGameFilterField.eDataType.fEnum
|
||||
oFilter.Data = cboListFilter.SelectedValue
|
||||
sFilter = oFilter.Field.FriendlyFieldName & " = " & oFilter.Data
|
||||
End Select
|
||||
|
||||
@@ -523,20 +545,40 @@ Public Class frmFilter
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub LoadCombos()
|
||||
Dim oFilterFields As New List(Of KeyValuePair(Of clsGameFilterField, String))
|
||||
Dim oSortFields As New List(Of KeyValuePair(Of String, String))
|
||||
Dim oNumericOperators As New List(Of KeyValuePair(Of clsGameFilter.eNumericOperators, String))
|
||||
Private Sub LoadComboAsBool()
|
||||
Dim oBoolOperators As New List(Of KeyValuePair(Of Boolean, String))
|
||||
|
||||
'cboBoolFilter
|
||||
cboBoolFilter.ValueMember = "Key"
|
||||
cboBoolFilter.DisplayMember = "Value"
|
||||
'cboListFilter (Boolean)
|
||||
cboListFilter.ValueMember = "Key"
|
||||
cboListFilter.DisplayMember = "Value"
|
||||
|
||||
oBoolOperators.Add(New KeyValuePair(Of Boolean, String)(True, frmFilter_cboBoolFilterEnabled))
|
||||
oBoolOperators.Add(New KeyValuePair(Of Boolean, String)(False, frmFilter_cboBoolFilterDisabled))
|
||||
|
||||
cboBoolFilter.DataSource = oBoolOperators
|
||||
cboListFilter.DataSource = oBoolOperators
|
||||
End Sub
|
||||
|
||||
Private Sub LoadComboAsEnum(ByVal eEnum As clsGameFilterField.eEnumFilterField)
|
||||
Dim oEnums As New List(Of KeyValuePair(Of Integer, String))
|
||||
|
||||
'cboListFilter (Enum)
|
||||
cboListFilter.ValueMember = "Key"
|
||||
cboListFilter.DisplayMember = "Value"
|
||||
|
||||
Select Case eEnum
|
||||
Case clsGameFilterField.eEnumFilterField.OS
|
||||
For Each v As Object In [Enum].GetValues(GetType(clsGame.eOS))
|
||||
oEnums.Add(New KeyValuePair(Of Integer, String)(v, [Enum].GetName(GetType(clsGame.eOS), v)))
|
||||
Next
|
||||
End Select
|
||||
|
||||
cboListFilter.DataSource = oEnums
|
||||
End Sub
|
||||
|
||||
Private Sub LoadCombos()
|
||||
Dim oFilterFields As New List(Of KeyValuePair(Of clsGameFilterField, String))
|
||||
Dim oSortFields As New List(Of KeyValuePair(Of String, String))
|
||||
Dim oNumericOperators As New List(Of KeyValuePair(Of clsGameFilter.eNumericOperators, String))
|
||||
|
||||
'cboNumericOps
|
||||
cboNumericOps.ValueMember = "Key"
|
||||
@@ -583,6 +625,7 @@ Public Class frmFilter
|
||||
Private Sub SetForm()
|
||||
'Set Form Name
|
||||
Me.Text = frmFilter_FormName
|
||||
Me.Icon = GBM_Icon
|
||||
|
||||
'Set Form Text
|
||||
optOr.Text = frmFilter_optOr
|
||||
|
||||
@@ -28,12 +28,16 @@ Partial Class frmGameManager
|
||||
Me.btnBackup = New System.Windows.Forms.Button()
|
||||
Me.btnClose = New System.Windows.Forms.Button()
|
||||
Me.grpConfig = New System.Windows.Forms.GroupBox()
|
||||
Me.btnWineConfig = New System.Windows.Forms.Button()
|
||||
Me.lblOS = New System.Windows.Forms.Label()
|
||||
Me.cboOS = New System.Windows.Forms.ComboBox()
|
||||
Me.chkRecurseSubFolders = New System.Windows.Forms.CheckBox()
|
||||
Me.btnGameID = New System.Windows.Forms.Button()
|
||||
Me.chkRegEx = New System.Windows.Forms.CheckBox()
|
||||
Me.lblComments = New System.Windows.Forms.Label()
|
||||
Me.txtComments = New System.Windows.Forms.TextBox()
|
||||
Me.txtParameter = New System.Windows.Forms.TextBox()
|
||||
Me.lblParameter = New System.Windows.Forms.Label()
|
||||
Me.txtComments = New System.Windows.Forms.TextBox()
|
||||
Me.chkCleanFolder = New System.Windows.Forms.CheckBox()
|
||||
Me.lblLimit = New System.Windows.Forms.Label()
|
||||
Me.nudLimit = New System.Windows.Forms.NumericUpDown()
|
||||
@@ -70,13 +74,14 @@ Partial Class frmGameManager
|
||||
Me.lblHours = New System.Windows.Forms.Label()
|
||||
Me.btnTags = New System.Windows.Forms.Button()
|
||||
Me.grpStats = New System.Windows.Forms.GroupBox()
|
||||
Me.btnImportBackup = New System.Windows.Forms.Button()
|
||||
Me.cboRemoteBackup = New System.Windows.Forms.ComboBox()
|
||||
Me.lblRestorePathData = New System.Windows.Forms.Label()
|
||||
Me.lblBackupFileData = New System.Windows.Forms.Label()
|
||||
Me.lblLocalBackupData = New System.Windows.Forms.Label()
|
||||
Me.lblRestorePath = New System.Windows.Forms.Label()
|
||||
Me.btnOpenRestorePath = New System.Windows.Forms.Button()
|
||||
Me.btnOpenBackupFile = New System.Windows.Forms.Button()
|
||||
Me.btnOpenBackup = New System.Windows.Forms.Button()
|
||||
Me.btnDeleteBackup = New System.Windows.Forms.Button()
|
||||
Me.lblBackupFile = New System.Windows.Forms.Label()
|
||||
Me.lblRemote = New System.Windows.Forms.Label()
|
||||
@@ -96,6 +101,8 @@ Partial Class frmGameManager
|
||||
Me.btnExport = New System.Windows.Forms.Button()
|
||||
Me.cmsImport = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
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.txtQuickFilter = New System.Windows.Forms.TextBox()
|
||||
Me.lblQuickFilter = New System.Windows.Forms.Label()
|
||||
@@ -103,6 +110,10 @@ Partial Class frmGameManager
|
||||
Me.cmsDeleteOne = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cmsDeleteAll = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.btnProcesses = New System.Windows.Forms.Button()
|
||||
Me.ttFullPath = New System.Windows.Forms.ToolTip(Me.components)
|
||||
Me.cmsOpenBackup = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.cmsOpenBackupFile = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cmsOpenBackupFolder = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.grpConfig.SuspendLayout()
|
||||
CType(Me.nudLimit, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.grpExtra.SuspendLayout()
|
||||
@@ -112,6 +123,7 @@ Partial Class frmGameManager
|
||||
Me.grpFilter.SuspendLayout()
|
||||
Me.cmsImport.SuspendLayout()
|
||||
Me.cmsDeleteBackup.SuspendLayout()
|
||||
Me.cmsOpenBackup.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'btnAdd
|
||||
@@ -142,7 +154,7 @@ Partial Class frmGameManager
|
||||
Me.btnBackup.Location = New System.Drawing.Point(616, 626)
|
||||
Me.btnBackup.Name = "btnBackup"
|
||||
Me.btnBackup.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnBackup.TabIndex = 18
|
||||
Me.btnBackup.TabIndex = 19
|
||||
Me.btnBackup.Text = "&Backup"
|
||||
Me.btnBackup.UseVisualStyleBackColor = True
|
||||
'
|
||||
@@ -152,19 +164,23 @@ Partial Class frmGameManager
|
||||
Me.btnClose.Location = New System.Drawing.Point(697, 626)
|
||||
Me.btnClose.Name = "btnClose"
|
||||
Me.btnClose.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnClose.TabIndex = 19
|
||||
Me.btnClose.TabIndex = 20
|
||||
Me.btnClose.Text = "C&lose"
|
||||
Me.btnClose.UseVisualStyleBackColor = True
|
||||
'
|
||||
'grpConfig
|
||||
'
|
||||
Me.grpConfig.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.grpConfig.Controls.Add(Me.btnWineConfig)
|
||||
Me.grpConfig.Controls.Add(Me.lblOS)
|
||||
Me.grpConfig.Controls.Add(Me.cboOS)
|
||||
Me.grpConfig.Controls.Add(Me.chkRecurseSubFolders)
|
||||
Me.grpConfig.Controls.Add(Me.btnGameID)
|
||||
Me.grpConfig.Controls.Add(Me.chkRegEx)
|
||||
Me.grpConfig.Controls.Add(Me.lblComments)
|
||||
Me.grpConfig.Controls.Add(Me.txtComments)
|
||||
Me.grpConfig.Controls.Add(Me.txtParameter)
|
||||
Me.grpConfig.Controls.Add(Me.lblParameter)
|
||||
Me.grpConfig.Controls.Add(Me.txtComments)
|
||||
Me.grpConfig.Controls.Add(Me.chkCleanFolder)
|
||||
Me.grpConfig.Controls.Add(Me.lblLimit)
|
||||
Me.grpConfig.Controls.Add(Me.nudLimit)
|
||||
@@ -191,6 +207,44 @@ Partial Class frmGameManager
|
||||
Me.grpConfig.TabStop = False
|
||||
Me.grpConfig.Text = "Configuration"
|
||||
'
|
||||
'btnWineConfig
|
||||
'
|
||||
Me.btnWineConfig.Location = New System.Drawing.Point(191, 167)
|
||||
Me.btnWineConfig.Name = "btnWineConfig"
|
||||
Me.btnWineConfig.Size = New System.Drawing.Size(175, 23)
|
||||
Me.btnWineConfig.TabIndex = 16
|
||||
Me.btnWineConfig.Text = "&Wine Configuration..."
|
||||
Me.btnWineConfig.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblOS
|
||||
'
|
||||
Me.lblOS.AutoSize = True
|
||||
Me.lblOS.Location = New System.Drawing.Point(7, 172)
|
||||
Me.lblOS.Name = "lblOS"
|
||||
Me.lblOS.Size = New System.Drawing.Size(25, 13)
|
||||
Me.lblOS.TabIndex = 14
|
||||
Me.lblOS.Text = "OS:"
|
||||
'
|
||||
'cboOS
|
||||
'
|
||||
Me.cboOS.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.cboOS.FormattingEnabled = True
|
||||
Me.cboOS.Location = New System.Drawing.Point(70, 169)
|
||||
Me.cboOS.Name = "cboOS"
|
||||
Me.cboOS.Size = New System.Drawing.Size(115, 21)
|
||||
Me.cboOS.TabIndex = 15
|
||||
'
|
||||
'chkRecurseSubFolders
|
||||
'
|
||||
Me.chkRecurseSubFolders.AutoSize = True
|
||||
Me.chkRecurseSubFolders.Location = New System.Drawing.Point(489, 206)
|
||||
Me.chkRecurseSubFolders.Name = "chkRecurseSubFolders"
|
||||
Me.chkRecurseSubFolders.Size = New System.Drawing.Size(15, 14)
|
||||
Me.chkRecurseSubFolders.TabIndex = 0
|
||||
Me.chkRecurseSubFolders.TabStop = False
|
||||
Me.chkRecurseSubFolders.UseVisualStyleBackColor = True
|
||||
Me.chkRecurseSubFolders.Visible = False
|
||||
'
|
||||
'btnGameID
|
||||
'
|
||||
Me.btnGameID.Location = New System.Drawing.Point(402, 17)
|
||||
@@ -213,21 +267,12 @@ Partial Class frmGameManager
|
||||
'lblComments
|
||||
'
|
||||
Me.lblComments.AutoSize = True
|
||||
Me.lblComments.Location = New System.Drawing.Point(7, 181)
|
||||
Me.lblComments.Location = New System.Drawing.Point(7, 128)
|
||||
Me.lblComments.Name = "lblComments"
|
||||
Me.lblComments.Size = New System.Drawing.Size(59, 13)
|
||||
Me.lblComments.TabIndex = 19
|
||||
Me.lblComments.TabIndex = 12
|
||||
Me.lblComments.Text = "Comments:"
|
||||
'
|
||||
'txtComments
|
||||
'
|
||||
Me.txtComments.Location = New System.Drawing.Point(70, 181)
|
||||
Me.txtComments.Multiline = True
|
||||
Me.txtComments.Name = "txtComments"
|
||||
Me.txtComments.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
|
||||
Me.txtComments.Size = New System.Drawing.Size(413, 71)
|
||||
Me.txtComments.TabIndex = 20
|
||||
'
|
||||
'txtParameter
|
||||
'
|
||||
Me.txtParameter.Location = New System.Drawing.Point(70, 71)
|
||||
@@ -244,50 +289,59 @@ Partial Class frmGameManager
|
||||
Me.lblParameter.TabIndex = 7
|
||||
Me.lblParameter.Text = "Parameter:"
|
||||
'
|
||||
'txtComments
|
||||
'
|
||||
Me.txtComments.Location = New System.Drawing.Point(70, 123)
|
||||
Me.txtComments.Multiline = True
|
||||
Me.txtComments.Name = "txtComments"
|
||||
Me.txtComments.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
|
||||
Me.txtComments.Size = New System.Drawing.Size(414, 40)
|
||||
Me.txtComments.TabIndex = 13
|
||||
'
|
||||
'chkCleanFolder
|
||||
'
|
||||
Me.chkCleanFolder.AutoSize = True
|
||||
Me.chkCleanFolder.Location = New System.Drawing.Point(330, 127)
|
||||
Me.chkCleanFolder.Location = New System.Drawing.Point(330, 200)
|
||||
Me.chkCleanFolder.Name = "chkCleanFolder"
|
||||
Me.chkCleanFolder.Size = New System.Drawing.Size(136, 17)
|
||||
Me.chkCleanFolder.TabIndex = 14
|
||||
Me.chkCleanFolder.TabIndex = 19
|
||||
Me.chkCleanFolder.Text = "Delete folder on restore"
|
||||
Me.chkCleanFolder.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblLimit
|
||||
'
|
||||
Me.lblLimit.AutoSize = True
|
||||
Me.lblLimit.Location = New System.Drawing.Point(376, 157)
|
||||
Me.lblLimit.Location = New System.Drawing.Point(376, 229)
|
||||
Me.lblLimit.Name = "lblLimit"
|
||||
Me.lblLimit.Size = New System.Drawing.Size(68, 13)
|
||||
Me.lblLimit.TabIndex = 18
|
||||
Me.lblLimit.Text = "Backup Limit"
|
||||
Me.lblLimit.Size = New System.Drawing.Size(138, 13)
|
||||
Me.lblLimit.TabIndex = 23
|
||||
Me.lblLimit.Text = "Backup Limit (0 = Unlimited)"
|
||||
Me.lblLimit.Visible = False
|
||||
'
|
||||
'nudLimit
|
||||
'
|
||||
Me.nudLimit.Location = New System.Drawing.Point(330, 155)
|
||||
Me.nudLimit.Location = New System.Drawing.Point(330, 227)
|
||||
Me.nudLimit.Name = "nudLimit"
|
||||
Me.nudLimit.Size = New System.Drawing.Size(40, 20)
|
||||
Me.nudLimit.TabIndex = 17
|
||||
Me.nudLimit.TabIndex = 22
|
||||
Me.nudLimit.Visible = False
|
||||
'
|
||||
'btnExclude
|
||||
'
|
||||
Me.btnExclude.Location = New System.Drawing.Point(10, 152)
|
||||
Me.btnExclude.Location = New System.Drawing.Point(10, 224)
|
||||
Me.btnExclude.Name = "btnExclude"
|
||||
Me.btnExclude.Size = New System.Drawing.Size(175, 23)
|
||||
Me.btnExclude.TabIndex = 15
|
||||
Me.btnExclude.TabIndex = 20
|
||||
Me.btnExclude.Text = "E&xclude Items..."
|
||||
Me.btnExclude.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnInclude
|
||||
'
|
||||
Me.btnInclude.Location = New System.Drawing.Point(10, 123)
|
||||
Me.btnInclude.Location = New System.Drawing.Point(10, 196)
|
||||
Me.btnInclude.Name = "btnInclude"
|
||||
Me.btnInclude.Size = New System.Drawing.Size(175, 23)
|
||||
Me.btnInclude.TabIndex = 12
|
||||
Me.btnInclude.Text = "In&clude Items..."
|
||||
Me.btnInclude.TabIndex = 17
|
||||
Me.btnInclude.Text = "Incl&ude Items..."
|
||||
Me.btnInclude.UseVisualStyleBackColor = True
|
||||
'
|
||||
'txtID
|
||||
@@ -366,20 +420,20 @@ Partial Class frmGameManager
|
||||
'chkTimeStamp
|
||||
'
|
||||
Me.chkTimeStamp.AutoSize = True
|
||||
Me.chkTimeStamp.Location = New System.Drawing.Point(191, 156)
|
||||
Me.chkTimeStamp.Location = New System.Drawing.Point(191, 228)
|
||||
Me.chkTimeStamp.Name = "chkTimeStamp"
|
||||
Me.chkTimeStamp.Size = New System.Drawing.Size(133, 17)
|
||||
Me.chkTimeStamp.TabIndex = 16
|
||||
Me.chkTimeStamp.TabIndex = 21
|
||||
Me.chkTimeStamp.Text = "Save multiple backups"
|
||||
Me.chkTimeStamp.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkFolderSave
|
||||
'
|
||||
Me.chkFolderSave.AutoSize = True
|
||||
Me.chkFolderSave.Location = New System.Drawing.Point(191, 127)
|
||||
Me.chkFolderSave.Location = New System.Drawing.Point(191, 200)
|
||||
Me.chkFolderSave.Name = "chkFolderSave"
|
||||
Me.chkFolderSave.Size = New System.Drawing.Size(109, 17)
|
||||
Me.chkFolderSave.TabIndex = 13
|
||||
Me.chkFolderSave.TabIndex = 18
|
||||
Me.chkFolderSave.Text = "Save entire folder"
|
||||
Me.chkFolderSave.UseVisualStyleBackColor = True
|
||||
'
|
||||
@@ -565,20 +619,21 @@ Partial Class frmGameManager
|
||||
Me.btnTags.Location = New System.Drawing.Point(535, 437)
|
||||
Me.btnTags.Name = "btnTags"
|
||||
Me.btnTags.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnTags.TabIndex = 12
|
||||
Me.btnTags.Text = "Tags..."
|
||||
Me.btnTags.TabIndex = 13
|
||||
Me.btnTags.Text = "&Tags..."
|
||||
Me.btnTags.UseVisualStyleBackColor = True
|
||||
'
|
||||
'grpStats
|
||||
'
|
||||
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.lblRestorePathData)
|
||||
Me.grpStats.Controls.Add(Me.lblBackupFileData)
|
||||
Me.grpStats.Controls.Add(Me.lblLocalBackupData)
|
||||
Me.grpStats.Controls.Add(Me.lblRestorePath)
|
||||
Me.grpStats.Controls.Add(Me.btnOpenRestorePath)
|
||||
Me.grpStats.Controls.Add(Me.btnOpenBackupFile)
|
||||
Me.grpStats.Controls.Add(Me.btnOpenBackup)
|
||||
Me.grpStats.Controls.Add(Me.btnDeleteBackup)
|
||||
Me.grpStats.Controls.Add(Me.lblBackupFile)
|
||||
Me.grpStats.Controls.Add(Me.lblRemote)
|
||||
@@ -586,10 +641,19 @@ Partial Class frmGameManager
|
||||
Me.grpStats.Location = New System.Drawing.Point(248, 466)
|
||||
Me.grpStats.Name = "grpStats"
|
||||
Me.grpStats.Size = New System.Drawing.Size(525, 154)
|
||||
Me.grpStats.TabIndex = 15
|
||||
Me.grpStats.TabIndex = 16
|
||||
Me.grpStats.TabStop = False
|
||||
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
|
||||
'
|
||||
Me.cboRemoteBackup.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
@@ -598,6 +662,7 @@ Partial Class frmGameManager
|
||||
Me.cboRemoteBackup.Name = "cboRemoteBackup"
|
||||
Me.cboRemoteBackup.Size = New System.Drawing.Size(387, 21)
|
||||
Me.cboRemoteBackup.TabIndex = 12
|
||||
Me.cboRemoteBackup.Tag = "wipe"
|
||||
'
|
||||
'lblRestorePathData
|
||||
'
|
||||
@@ -650,21 +715,21 @@ Partial Class frmGameManager
|
||||
Me.btnOpenRestorePath.Text = "O&pen Restore Path"
|
||||
Me.btnOpenRestorePath.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnOpenBackupFile
|
||||
'btnOpenBackup
|
||||
'
|
||||
Me.btnOpenBackupFile.Location = New System.Drawing.Point(249, 125)
|
||||
Me.btnOpenBackupFile.Name = "btnOpenBackupFile"
|
||||
Me.btnOpenBackupFile.Size = New System.Drawing.Size(114, 23)
|
||||
Me.btnOpenBackupFile.TabIndex = 10
|
||||
Me.btnOpenBackupFile.Text = "&Open Backup File"
|
||||
Me.btnOpenBackupFile.UseVisualStyleBackColor = True
|
||||
Me.btnOpenBackup.Location = New System.Drawing.Point(249, 125)
|
||||
Me.btnOpenBackup.Name = "btnOpenBackup"
|
||||
Me.btnOpenBackup.Size = New System.Drawing.Size(114, 23)
|
||||
Me.btnOpenBackup.TabIndex = 10
|
||||
Me.btnOpenBackup.Text = "&Open Backup"
|
||||
Me.btnOpenBackup.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnDeleteBackup
|
||||
'
|
||||
Me.btnDeleteBackup.Location = New System.Drawing.Point(129, 125)
|
||||
Me.btnDeleteBackup.Name = "btnDeleteBackup"
|
||||
Me.btnDeleteBackup.Size = New System.Drawing.Size(114, 23)
|
||||
Me.btnDeleteBackup.TabIndex = 8
|
||||
Me.btnDeleteBackup.TabIndex = 9
|
||||
Me.btnDeleteBackup.Text = "&Delete Backup"
|
||||
Me.btnDeleteBackup.UseVisualStyleBackColor = True
|
||||
'
|
||||
@@ -701,7 +766,7 @@ Partial Class frmGameManager
|
||||
Me.btnMarkAsRestored.Location = New System.Drawing.Point(429, 626)
|
||||
Me.btnMarkAsRestored.Name = "btnMarkAsRestored"
|
||||
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.UseVisualStyleBackColor = True
|
||||
'
|
||||
@@ -711,7 +776,7 @@ Partial Class frmGameManager
|
||||
Me.btnRestore.Location = New System.Drawing.Point(535, 626)
|
||||
Me.btnRestore.Name = "btnRestore"
|
||||
Me.btnRestore.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnRestore.TabIndex = 17
|
||||
Me.btnRestore.TabIndex = 18
|
||||
Me.btnRestore.Text = "&Restore"
|
||||
Me.btnRestore.UseVisualStyleBackColor = True
|
||||
'
|
||||
@@ -721,7 +786,7 @@ Partial Class frmGameManager
|
||||
Me.btnSave.Location = New System.Drawing.Point(616, 437)
|
||||
Me.btnSave.Name = "btnSave"
|
||||
Me.btnSave.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnSave.TabIndex = 13
|
||||
Me.btnSave.TabIndex = 14
|
||||
Me.btnSave.Text = "&Save"
|
||||
Me.btnSave.UseVisualStyleBackColor = True
|
||||
'
|
||||
@@ -740,8 +805,8 @@ Partial Class frmGameManager
|
||||
Me.btnCancel.Location = New System.Drawing.Point(697, 437)
|
||||
Me.btnCancel.Name = "btnCancel"
|
||||
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnCancel.TabIndex = 14
|
||||
Me.btnCancel.Text = "&Cancel"
|
||||
Me.btnCancel.TabIndex = 15
|
||||
Me.btnCancel.Text = "Ca&ncel"
|
||||
Me.btnCancel.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkEnabled
|
||||
@@ -838,10 +903,23 @@ Partial Class frmGameManager
|
||||
'
|
||||
'cmsOfficial
|
||||
'
|
||||
Me.cmsOfficial.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.cmsOfficialWindows, Me.cmsOfficialLinux})
|
||||
Me.cmsOfficial.Name = "cmsOfficial"
|
||||
Me.cmsOfficial.Size = New System.Drawing.Size(117, 22)
|
||||
Me.cmsOfficial.Text = "&Official List..."
|
||||
'
|
||||
'cmsOfficialWindows
|
||||
'
|
||||
Me.cmsOfficialWindows.Name = "cmsOfficialWindows"
|
||||
Me.cmsOfficialWindows.Size = New System.Drawing.Size(132, 22)
|
||||
Me.cmsOfficialWindows.Text = "&Windows..."
|
||||
'
|
||||
'cmsOfficialLinux
|
||||
'
|
||||
Me.cmsOfficialLinux.Name = "cmsOfficialLinux"
|
||||
Me.cmsOfficialLinux.Size = New System.Drawing.Size(132, 22)
|
||||
Me.cmsOfficialLinux.Text = "&Linux..."
|
||||
'
|
||||
'cmsFile
|
||||
'
|
||||
Me.cmsFile.Name = "cmsFile"
|
||||
@@ -888,10 +966,35 @@ Partial Class frmGameManager
|
||||
Me.btnProcesses.Location = New System.Drawing.Point(454, 437)
|
||||
Me.btnProcesses.Name = "btnProcesses"
|
||||
Me.btnProcesses.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnProcesses.TabIndex = 20
|
||||
Me.btnProcesses.Text = "Processes..."
|
||||
Me.btnProcesses.TabIndex = 12
|
||||
Me.btnProcesses.Text = "Pro&cesses..."
|
||||
Me.btnProcesses.UseVisualStyleBackColor = True
|
||||
'
|
||||
'ttFullPath
|
||||
'
|
||||
Me.ttFullPath.AutoPopDelay = 5000
|
||||
Me.ttFullPath.InitialDelay = 300
|
||||
Me.ttFullPath.ReshowDelay = 60
|
||||
'
|
||||
'cmsOpenBackup
|
||||
'
|
||||
Me.cmsOpenBackup.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.cmsOpenBackupFile, Me.cmsOpenBackupFolder})
|
||||
Me.cmsOpenBackup.Name = "cmsOpenBackup"
|
||||
Me.cmsOpenBackup.ShowImageMargin = False
|
||||
Me.cmsOpenBackup.Size = New System.Drawing.Size(83, 48)
|
||||
'
|
||||
'cmsOpenBackupFile
|
||||
'
|
||||
Me.cmsOpenBackupFile.Name = "cmsOpenBackupFile"
|
||||
Me.cmsOpenBackupFile.Size = New System.Drawing.Size(82, 22)
|
||||
Me.cmsOpenBackupFile.Text = "&File"
|
||||
'
|
||||
'cmsOpenBackupFolder
|
||||
'
|
||||
Me.cmsOpenBackupFolder.Name = "cmsOpenBackupFolder"
|
||||
Me.cmsOpenBackupFolder.Size = New System.Drawing.Size(82, 22)
|
||||
Me.cmsOpenBackupFolder.Text = "F&older"
|
||||
'
|
||||
'frmGameManager
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
@@ -922,7 +1025,6 @@ Partial Class frmGameManager
|
||||
Me.MaximizeBox = False
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmGameManager"
|
||||
Me.ShowIcon = False
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Game Manager"
|
||||
Me.grpConfig.ResumeLayout(False)
|
||||
@@ -938,6 +1040,7 @@ Partial Class frmGameManager
|
||||
Me.grpFilter.PerformLayout()
|
||||
Me.cmsImport.ResumeLayout(False)
|
||||
Me.cmsDeleteBackup.ResumeLayout(False)
|
||||
Me.cmsOpenBackup.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
@@ -986,7 +1089,7 @@ Partial Class frmGameManager
|
||||
Friend WithEvents btnMarkAsRestored As System.Windows.Forms.Button
|
||||
Friend WithEvents btnRestore As System.Windows.Forms.Button
|
||||
Friend WithEvents btnDeleteBackup As System.Windows.Forms.Button
|
||||
Friend WithEvents btnOpenBackupFile As System.Windows.Forms.Button
|
||||
Friend WithEvents btnOpenBackup As System.Windows.Forms.Button
|
||||
Friend WithEvents grpFilter As System.Windows.Forms.GroupBox
|
||||
Friend WithEvents optPendingRestores As System.Windows.Forms.RadioButton
|
||||
Friend WithEvents optAllGames As System.Windows.Forms.RadioButton
|
||||
@@ -1022,4 +1125,15 @@ Partial Class frmGameManager
|
||||
Friend WithEvents chkRegEx As CheckBox
|
||||
Friend WithEvents btnGameID 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
|
||||
Friend WithEvents chkRecurseSubFolders As CheckBox
|
||||
Friend WithEvents lblOS As Label
|
||||
Friend WithEvents cboOS As ComboBox
|
||||
Friend WithEvents btnWineConfig As Button
|
||||
Friend WithEvents cmsOpenBackup As ContextMenuStrip
|
||||
Friend WithEvents cmsOpenBackupFile As ToolStripMenuItem
|
||||
Friend WithEvents cmsOpenBackupFolder As ToolStripMenuItem
|
||||
End Class
|
||||
|
||||
@@ -123,4 +123,10 @@
|
||||
<metadata name="cmsDeleteBackup.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>127, 17</value>
|
||||
</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>
|
||||
<metadata name="cmsOpenBackup.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>378, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -124,6 +124,7 @@ Partial Class frmGameProcesses
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmGameProcesses"
|
||||
Me.ShowIcon = False
|
||||
Me.ShowInTaskbar = False
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Edit Processes"
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
@@ -211,6 +211,7 @@ Public Class frmGameProcesses
|
||||
Else
|
||||
Me.Text = mgrCommon.FormatString(frmGameProcesses_FormNameSingle, GameName)
|
||||
End If
|
||||
Me.Icon = GBM_Icon
|
||||
|
||||
'Set Form Text
|
||||
btnOpenProcesses.Text = frmGameProcesses_btnOpenProcesses
|
||||
|
||||
@@ -124,6 +124,7 @@ Partial Class frmGameTags
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmGameTags"
|
||||
Me.ShowIcon = False
|
||||
Me.ShowInTaskbar = False
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Edit Tags"
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
@@ -213,6 +213,7 @@ Public Class frmGameTags
|
||||
Else
|
||||
Me.Text = mgrCommon.FormatString(frmGameTags_FormNameSingle, GameName)
|
||||
End If
|
||||
Me.Icon = GBM_Icon
|
||||
|
||||
'Set Form Text
|
||||
btnOpenTags.Text = frmGameTags_btnOpenTags
|
||||
|
||||
@@ -37,7 +37,8 @@ Partial Class frmIncludeExclude
|
||||
Me.cmsAdd = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.btnRemove = New System.Windows.Forms.Button()
|
||||
Me.btnAdd = New System.Windows.Forms.Button()
|
||||
Me.grpFileOptions = New System.Windows.Forms.GroupBox()
|
||||
Me.grpOptions = New System.Windows.Forms.GroupBox()
|
||||
Me.chkRecurseSubFolders = New System.Windows.Forms.CheckBox()
|
||||
Me.optFileTypes = New System.Windows.Forms.RadioButton()
|
||||
Me.optIndividualFiles = New System.Windows.Forms.RadioButton()
|
||||
Me.lblItems = New System.Windows.Forms.Label()
|
||||
@@ -45,7 +46,7 @@ Partial Class frmIncludeExclude
|
||||
Me.lblSaveFolder = New System.Windows.Forms.Label()
|
||||
Me.ttWarning = New System.Windows.Forms.ToolTip(Me.components)
|
||||
Me.cmsItems.SuspendLayout()
|
||||
Me.grpFileOptions.SuspendLayout()
|
||||
Me.grpOptions.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'treFiles
|
||||
@@ -157,16 +158,27 @@ Partial Class frmIncludeExclude
|
||||
Me.btnAdd.Text = ">"
|
||||
Me.btnAdd.UseVisualStyleBackColor = True
|
||||
'
|
||||
'grpFileOptions
|
||||
'grpOptions
|
||||
'
|
||||
Me.grpFileOptions.Controls.Add(Me.optFileTypes)
|
||||
Me.grpFileOptions.Controls.Add(Me.optIndividualFiles)
|
||||
Me.grpFileOptions.Location = New System.Drawing.Point(12, 403)
|
||||
Me.grpFileOptions.Name = "grpFileOptions"
|
||||
Me.grpFileOptions.Size = New System.Drawing.Size(194, 46)
|
||||
Me.grpFileOptions.TabIndex = 2
|
||||
Me.grpFileOptions.TabStop = False
|
||||
Me.grpFileOptions.Text = "File Options"
|
||||
Me.grpOptions.Controls.Add(Me.chkRecurseSubFolders)
|
||||
Me.grpOptions.Controls.Add(Me.optFileTypes)
|
||||
Me.grpOptions.Controls.Add(Me.optIndividualFiles)
|
||||
Me.grpOptions.Location = New System.Drawing.Point(12, 403)
|
||||
Me.grpOptions.Name = "grpOptions"
|
||||
Me.grpOptions.Size = New System.Drawing.Size(317, 46)
|
||||
Me.grpOptions.TabIndex = 2
|
||||
Me.grpOptions.TabStop = False
|
||||
Me.grpOptions.Text = "Options"
|
||||
'
|
||||
'chkRecurseSubFolders
|
||||
'
|
||||
Me.chkRecurseSubFolders.AutoSize = True
|
||||
Me.chkRecurseSubFolders.Location = New System.Drawing.Point(185, 20)
|
||||
Me.chkRecurseSubFolders.Name = "chkRecurseSubFolders"
|
||||
Me.chkRecurseSubFolders.Size = New System.Drawing.Size(120, 17)
|
||||
Me.chkRecurseSubFolders.TabIndex = 2
|
||||
Me.chkRecurseSubFolders.Text = "Recurse sub-folders"
|
||||
Me.chkRecurseSubFolders.UseVisualStyleBackColor = True
|
||||
'
|
||||
'optFileTypes
|
||||
'
|
||||
@@ -230,7 +242,7 @@ Partial Class frmIncludeExclude
|
||||
Me.Controls.Add(Me.lblSaveFolder)
|
||||
Me.Controls.Add(Me.btnRawEdit)
|
||||
Me.Controls.Add(Me.lblItems)
|
||||
Me.Controls.Add(Me.grpFileOptions)
|
||||
Me.Controls.Add(Me.grpOptions)
|
||||
Me.Controls.Add(Me.btnRemove)
|
||||
Me.Controls.Add(Me.btnAdd)
|
||||
Me.Controls.Add(Me.lstBuilder)
|
||||
@@ -244,10 +256,12 @@ Partial Class frmIncludeExclude
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmIncludeExclude"
|
||||
Me.ShowIcon = False
|
||||
Me.ShowInTaskbar = False
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Include / Exclude Builder"
|
||||
Me.cmsItems.ResumeLayout(False)
|
||||
Me.grpFileOptions.ResumeLayout(False)
|
||||
Me.grpOptions.ResumeLayout(False)
|
||||
Me.grpOptions.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
@@ -261,7 +275,7 @@ Partial Class frmIncludeExclude
|
||||
Friend WithEvents lstBuilder As System.Windows.Forms.ListView
|
||||
Friend WithEvents btnRemove As System.Windows.Forms.Button
|
||||
Friend WithEvents btnAdd As System.Windows.Forms.Button
|
||||
Friend WithEvents grpFileOptions As System.Windows.Forms.GroupBox
|
||||
Friend WithEvents grpOptions As System.Windows.Forms.GroupBox
|
||||
Friend WithEvents optFileTypes As System.Windows.Forms.RadioButton
|
||||
Friend WithEvents optIndividualFiles As System.Windows.Forms.RadioButton
|
||||
Friend WithEvents lblItems As System.Windows.Forms.Label
|
||||
@@ -272,4 +286,5 @@ Partial Class frmIncludeExclude
|
||||
Friend WithEvents btnRawEdit As Button
|
||||
Friend WithEvents lblSaveFolder As Label
|
||||
Friend WithEvents ttWarning As ToolTip
|
||||
Friend WithEvents chkRecurseSubFolders As CheckBox
|
||||
End Class
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAB6
|
||||
CQAAAk1TRnQBSQFMAgEBAwEAAbgBAAG4AQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
CQAAAk1TRnQBSQFMAgEBAwEAAcgBAAHIAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
|
||||
@@ -6,6 +6,7 @@ Public Class frmIncludeExclude
|
||||
Dim sFormName As String = String.Empty
|
||||
Dim sRootFolder As String = String.Empty
|
||||
Dim sBuilderString As String
|
||||
Dim bRecurseSubFolders As Boolean
|
||||
|
||||
Public Property BuilderString As String
|
||||
Get
|
||||
@@ -34,6 +35,15 @@ Public Class frmIncludeExclude
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property RecurseSubFolders As Boolean
|
||||
Get
|
||||
Return bRecurseSubFolders
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bRecurseSubFolders = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Sub BuildBranch(ByVal sDirectory As String, ByVal oNode As TreeNode)
|
||||
Dim sFolders As String()
|
||||
Dim sFiles As String()
|
||||
@@ -108,7 +118,7 @@ Public Class frmIncludeExclude
|
||||
End If
|
||||
End If
|
||||
|
||||
sNewPath = mgrCommon.OpenFolderBrowser("IE_Save_Path", frmIncludeExclude_BrowseSaveFolder, sDefaultFolder, False, False)
|
||||
sNewPath = mgrCommon.OpenFolderBrowser("IE_Save_Path", frmIncludeExclude_BrowseSaveFolder, sDefaultFolder, False)
|
||||
|
||||
If sNewPath <> String.Empty Then txtRootFolder.Text = sNewPath
|
||||
End Sub
|
||||
@@ -234,14 +244,16 @@ Public Class frmIncludeExclude
|
||||
Private Sub SetForm()
|
||||
'Set Form Name
|
||||
Me.Text = mgrCommon.FormatString(frmIncludeExclude_FormName, FormName)
|
||||
Me.Icon = GBM_Icon
|
||||
|
||||
'Set Form Text
|
||||
lblSaveFolder.Text = frmIncludeExclude_lblSaveFolder
|
||||
btnRawEdit.Text = frmIncludeExclude_btnRawEdit
|
||||
lblItems.Text = mgrCommon.FormatString(frmIncludeExclude_lblItems, FormName)
|
||||
grpFileOptions.Text = mgrCommon.FormatString(frmIncludeExclude_grpFileOptions, FormName)
|
||||
grpOptions.Text = mgrCommon.FormatString(frmIncludeExclude_grpOptions, FormName)
|
||||
optFileTypes.Text = frmIncludeExclude_optFileTypes
|
||||
optIndividualFiles.Text = frmIncludeExclude_optIndividualFiles
|
||||
chkRecurseSubFolders.Text = frmIncludeExclude_chkRecurseSubFolders
|
||||
btnRemove.Text = frmIncludeExclude_btnRemove
|
||||
btnAdd.Text = frmIncludeExclude_btnAdd
|
||||
btnBrowse.Text = frmIncludeExclude_btnBrowse
|
||||
@@ -254,6 +266,7 @@ Public Class frmIncludeExclude
|
||||
'Set Defaults
|
||||
txtRootFolder.Text = RootFolder
|
||||
optFileTypes.Checked = True
|
||||
chkRecurseSubFolders.Checked = bRecurseSubFolders
|
||||
If BuilderString <> String.Empty Then ParseBuilderString(BuilderString)
|
||||
If txtRootFolder.Text <> String.Empty Then BuildTrunk()
|
||||
End Sub
|
||||
@@ -285,6 +298,7 @@ Public Class frmIncludeExclude
|
||||
|
||||
Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click
|
||||
BuilderString = CreateNewBuilderString()
|
||||
RecurseSubFolders = chkRecurseSubFolders.Checked
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -34,9 +34,9 @@ Partial Class frmMain
|
||||
Me.gMonTraySetup = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTraySetupAddWizard = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTraySetupGameManager = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTraySetupCustomVariables = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTraySetupTags = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTraySetupProcessManager = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTraySetupCustomVariables = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTrayTools = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTrayToolsCompact = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTrayToolsLog = New System.Windows.Forms.ToolStripMenuItem()
|
||||
@@ -64,9 +64,9 @@ Partial Class frmMain
|
||||
Me.gMonSetup = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonSetupGameManager = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonSetupAddWizard = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonSetupCustomVariables = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonSetupTags = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonSetupProcessManager = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonSetupCustomVariables = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTools = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonToolsCompact = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonToolsLog = New System.Windows.Forms.ToolStripMenuItem()
|
||||
@@ -106,6 +106,7 @@ Partial Class frmMain
|
||||
Me.gMonTray.ContextMenuStrip = Me.gMonTrayMenu
|
||||
Me.gMonTray.Icon = CType(resources.GetObject("gMonTray.Icon"), System.Drawing.Icon)
|
||||
Me.gMonTray.Text = "GBM"
|
||||
Me.gMonTray.Visible = True
|
||||
'
|
||||
'gMonTrayMenu
|
||||
'
|
||||
@@ -162,12 +163,6 @@ Partial Class frmMain
|
||||
Me.gMonTraySetupGameManager.Size = New System.Drawing.Size(201, 22)
|
||||
Me.gMonTraySetupGameManager.Text = "&Game Manager..."
|
||||
'
|
||||
'gMonTraySetupCustomVariables
|
||||
'
|
||||
Me.gMonTraySetupCustomVariables.Name = "gMonTraySetupCustomVariables"
|
||||
Me.gMonTraySetupCustomVariables.Size = New System.Drawing.Size(201, 22)
|
||||
Me.gMonTraySetupCustomVariables.Text = "Custom Path &Variables..."
|
||||
'
|
||||
'gMonTraySetupTags
|
||||
'
|
||||
Me.gMonTraySetupTags.Name = "gMonTraySetupTags"
|
||||
@@ -180,6 +175,12 @@ Partial Class frmMain
|
||||
Me.gMonTraySetupProcessManager.Size = New System.Drawing.Size(201, 22)
|
||||
Me.gMonTraySetupProcessManager.Text = "&Process Manager..."
|
||||
'
|
||||
'gMonTraySetupCustomVariables
|
||||
'
|
||||
Me.gMonTraySetupCustomVariables.Name = "gMonTraySetupCustomVariables"
|
||||
Me.gMonTraySetupCustomVariables.Size = New System.Drawing.Size(201, 22)
|
||||
Me.gMonTraySetupCustomVariables.Text = "Custom Path &Variables..."
|
||||
'
|
||||
'gMonTrayTools
|
||||
'
|
||||
Me.gMonTrayTools.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonTrayToolsCompact, Me.gMonTrayToolsLog, Me.gMonTrayToolsSessions, Me.gMonTrayToolsSyncGameID})
|
||||
@@ -257,19 +258,21 @@ Partial Class frmMain
|
||||
Me.txtLog.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.txtLog.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.txtLog.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.txtLog.Location = New System.Drawing.Point(12, 184)
|
||||
Me.txtLog.Location = New System.Drawing.Point(-1, 184)
|
||||
Me.txtLog.MaxLength = 524288
|
||||
Me.txtLog.Multiline = True
|
||||
Me.txtLog.Name = "txtLog"
|
||||
Me.txtLog.ReadOnly = True
|
||||
Me.txtLog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
|
||||
Me.txtLog.Size = New System.Drawing.Size(500, 186)
|
||||
Me.txtLog.Size = New System.Drawing.Size(525, 195)
|
||||
Me.txtLog.TabIndex = 10
|
||||
Me.txtLog.TabStop = False
|
||||
'
|
||||
'gMonStatusStrip
|
||||
'
|
||||
Me.gMonStatusStrip.BackColor = System.Drawing.Color.Transparent
|
||||
Me.gMonStatusStrip.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.gMonStatusStrip.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonStripAdminButton, Me.gMonStripTxtStatus, Me.gMonStripStatusButton})
|
||||
Me.gMonStatusStrip.Location = New System.Drawing.Point(0, 379)
|
||||
@@ -308,7 +311,7 @@ Partial Class frmMain
|
||||
Me.gMonMainMenu.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonFile, Me.gMonSetup, Me.gMonTools, Me.gMonHelp, Me.gMonNotification})
|
||||
Me.gMonMainMenu.Location = New System.Drawing.Point(0, 0)
|
||||
Me.gMonMainMenu.Name = "gMonMainMenu"
|
||||
Me.gMonMainMenu.RenderMode = System.Windows.Forms.ToolStripRenderMode.System
|
||||
Me.gMonMainMenu.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional
|
||||
Me.gMonMainMenu.Size = New System.Drawing.Size(524, 24)
|
||||
Me.gMonMainMenu.TabIndex = 0
|
||||
Me.gMonMainMenu.Text = "MenuStrip1"
|
||||
@@ -367,12 +370,6 @@ Partial Class frmMain
|
||||
Me.gMonSetupAddWizard.Size = New System.Drawing.Size(201, 22)
|
||||
Me.gMonSetupAddWizard.Text = "Add Game &Wizard..."
|
||||
'
|
||||
'gMonSetupCustomVariables
|
||||
'
|
||||
Me.gMonSetupCustomVariables.Name = "gMonSetupCustomVariables"
|
||||
Me.gMonSetupCustomVariables.Size = New System.Drawing.Size(201, 22)
|
||||
Me.gMonSetupCustomVariables.Text = "Custom Path &Variables..."
|
||||
'
|
||||
'gMonSetupTags
|
||||
'
|
||||
Me.gMonSetupTags.Name = "gMonSetupTags"
|
||||
@@ -385,6 +382,12 @@ Partial Class frmMain
|
||||
Me.gMonSetupProcessManager.Size = New System.Drawing.Size(201, 22)
|
||||
Me.gMonSetupProcessManager.Text = "&Process Manager..."
|
||||
'
|
||||
'gMonSetupCustomVariables
|
||||
'
|
||||
Me.gMonSetupCustomVariables.Name = "gMonSetupCustomVariables"
|
||||
Me.gMonSetupCustomVariables.Size = New System.Drawing.Size(201, 22)
|
||||
Me.gMonSetupCustomVariables.Text = "Custom Path &Variables..."
|
||||
'
|
||||
'gMonTools
|
||||
'
|
||||
Me.gMonTools.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonToolsCompact, Me.gMonToolsLog, Me.gMonToolsSessions, Me.gMonToolsSyncGameID})
|
||||
@@ -600,7 +603,6 @@ Partial Class frmMain
|
||||
Me.Controls.Add(Me.gMonStatusStrip)
|
||||
Me.Controls.Add(Me.gMonMainMenu)
|
||||
Me.Controls.Add(Me.txtLog)
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||
Me.KeyPreview = True
|
||||
Me.MainMenuStrip = Me.gMonMainMenu
|
||||
Me.MinimizeBox = False
|
||||
|
||||
@@ -30,6 +30,7 @@ Public Class frmMain
|
||||
Private bMenuEnabled As Boolean = True
|
||||
Private bLockdown As Boolean = True
|
||||
Private bFirstRun As Boolean = False
|
||||
Private bInitialLoad As Boolean = True
|
||||
Private bProcessIsAdmin As Boolean = False
|
||||
Private bLogToggle As Boolean = False
|
||||
Private bShowToggle As Boolean = True
|
||||
@@ -45,6 +46,7 @@ Public Class frmMain
|
||||
|
||||
'Developer Debug Flags
|
||||
Private bProcessDebugMode As Boolean = False
|
||||
Private bMemoryDebugMode As Boolean = False
|
||||
|
||||
WithEvents oFileWatcher As New FileSystemWatcher
|
||||
|
||||
@@ -166,11 +168,46 @@ Public Class frmMain
|
||||
OperationEnded()
|
||||
End Sub
|
||||
|
||||
Private Function VerifyBackupForOS(ByRef oGame As clsGame, ByRef sPath As String) As Boolean
|
||||
Dim bOSVerified As Boolean
|
||||
|
||||
'Handle Windows configurations in Linux
|
||||
If mgrCommon.IsUnix Then
|
||||
If oGame.OS = clsGame.eOS.Windows Then
|
||||
If mgrVariables.CheckForReservedVariables(oGame.TruePath) Then
|
||||
'Absolute Path
|
||||
Dim oWineData As clsWineData = mgrWineData.DoWineDataGetbyID(oGame.ID)
|
||||
If oWineData.SavePath <> String.Empty Then
|
||||
sPath = oWineData.SavePath
|
||||
bOSVerified = True
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_WineSavePath, oWineData.SavePath), False)
|
||||
Else
|
||||
bOSVerified = False
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_ErrorNoWineSavePath, oGame.Name), True, ToolTipIcon.Error, True)
|
||||
End If
|
||||
Else
|
||||
'Relative Path
|
||||
bOSVerified = True
|
||||
End If
|
||||
mgrPath.ModWinePathData(oGame)
|
||||
Else
|
||||
'Linux Configuration
|
||||
bOSVerified = True
|
||||
End If
|
||||
Else
|
||||
'Windows
|
||||
bOSVerified = True
|
||||
End If
|
||||
|
||||
Return bOSVerified
|
||||
End Function
|
||||
|
||||
Private Sub RunRestore(ByVal oRestoreList As Hashtable)
|
||||
Dim oGame As clsGame
|
||||
Dim oReadyList As New List(Of clsBackup)
|
||||
Dim oRestoreInfo As clsBackup
|
||||
Dim bTriggerReload As Boolean = False
|
||||
Dim bOSVerified As Boolean
|
||||
Dim bPathVerified As Boolean
|
||||
eCurrentOperation = eOperation.Restore
|
||||
OperationStarted()
|
||||
@@ -178,16 +215,23 @@ Public Class frmMain
|
||||
'Build Restore List
|
||||
For Each de As DictionaryEntry In oRestoreList
|
||||
bPathVerified = False
|
||||
bOSVerified = False
|
||||
oGame = DirectCast(de.Key, clsGame)
|
||||
oRestoreInfo = DirectCast(de.Value, clsBackup)
|
||||
|
||||
If mgrRestore.CheckPath(oRestoreInfo, oGame, bTriggerReload) Then
|
||||
bOSVerified = VerifyBackupForOS(oGame, oRestoreInfo.RestorePath)
|
||||
|
||||
If mgrPath.IsSupportedRegistryPath(oRestoreInfo.TruePath) Then
|
||||
bPathVerified = True
|
||||
Else
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_ErrorRestorePath, oRestoreInfo.Name), False, ToolTipIcon.Error, True)
|
||||
If mgrRestore.CheckPath(oRestoreInfo, oGame, bTriggerReload) Then
|
||||
bPathVerified = True
|
||||
Else
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_ErrorRestorePath, oRestoreInfo.Name), False, ToolTipIcon.Error, True)
|
||||
End If
|
||||
End If
|
||||
|
||||
If bPathVerified Then
|
||||
If bOSVerified And bPathVerified Then
|
||||
If oRestore.CheckRestorePrereq(oRestoreInfo, oGame.CleanFolder) Then
|
||||
oReadyList.Add(oRestoreInfo)
|
||||
End If
|
||||
@@ -211,6 +255,7 @@ Public Class frmMain
|
||||
Private Sub RunManualBackup(ByVal oBackupList As List(Of clsGame))
|
||||
Dim oGame As clsGame
|
||||
Dim bNoAuto As Boolean
|
||||
Dim bOSVerified As Boolean
|
||||
Dim bPathVerified As Boolean
|
||||
Dim oReadyList As New List(Of clsGame)
|
||||
|
||||
@@ -220,15 +265,18 @@ Public Class frmMain
|
||||
'Build Backup List
|
||||
For Each oGame In oBackupList
|
||||
bNoAuto = False
|
||||
bOSVerified = False
|
||||
bPathVerified = False
|
||||
gMonStripStatusButton.Enabled = False
|
||||
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_ManualBackup, oGame.Name), False)
|
||||
|
||||
bOSVerified = VerifyBackupForOS(oGame, oGame.Path)
|
||||
|
||||
If oGame.AbsolutePath = False Then
|
||||
If oGame.ProcessPath = String.Empty Then
|
||||
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
|
||||
|
||||
If oGame.ProcessPath <> String.Empty Then
|
||||
@@ -240,7 +288,7 @@ Public Class frmMain
|
||||
bPathVerified = True
|
||||
End If
|
||||
|
||||
If bPathVerified Then
|
||||
If bOSVerified And bPathVerified Then
|
||||
If oBackup.CheckBackupPrereq(oGame) Then
|
||||
oReadyList.Add(oGame)
|
||||
End If
|
||||
@@ -258,6 +306,12 @@ Public Class frmMain
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub RunImportBackup(ByVal oImportBackupList As Hashtable)
|
||||
PauseScan()
|
||||
oBackup.ImportBackupFiles(oImportBackupList)
|
||||
ResumeScan()
|
||||
End Sub
|
||||
|
||||
Private Function DoMultiGameCheck() As Boolean
|
||||
Dim oResult As DialogResult
|
||||
|
||||
@@ -266,14 +320,9 @@ Public Class frmMain
|
||||
frm.Process = oProcess
|
||||
oResult = frm.ShowDialog()
|
||||
If oResult = DialogResult.OK Then
|
||||
Dim sProcessPath As String
|
||||
'Reload settings
|
||||
LoadGameSettings()
|
||||
'Retain the process path from old object
|
||||
sProcessPath = oProcess.GameInfo.ProcessPath
|
||||
oProcess.GameInfo = frm.Game
|
||||
'Set the process path into the new object
|
||||
oProcess.GameInfo.ProcessPath = sProcessPath
|
||||
'A game was set, return and continue
|
||||
Return True
|
||||
Else
|
||||
@@ -304,7 +353,7 @@ Public Class frmMain
|
||||
If oSettings.DisableConfirmation Then
|
||||
bDoBackup = True
|
||||
Else
|
||||
If mgrCommon.ShowMessage(frmMain_ConfirmBackup, oProcess.GameInfo.Name, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowPriorityMessage(frmMain_ConfirmBackup, oProcess.GameInfo.Name, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
bDoBackup = True
|
||||
Else
|
||||
bDoBackup = False
|
||||
@@ -418,7 +467,7 @@ Public Class frmMain
|
||||
sExtractPath = oBackup.RelativeRestorePath
|
||||
End If
|
||||
|
||||
If Not Directory.Exists(sExtractPath) Then
|
||||
If Not Directory.Exists(sExtractPath) And Not mgrPath.IsSupportedRegistryPath(oBackup.RestorePath) Then
|
||||
If oSettings.AutoMark Then
|
||||
If mgrManifest.DoManifestCheck(de.Key, mgrSQLite.Database.Local) Then
|
||||
mgrManifest.DoManifestUpdateByMonitorID(de.Value, mgrSQLite.Database.Local)
|
||||
@@ -526,7 +575,7 @@ Public Class frmMain
|
||||
sIcon = fbBrowser.FileName
|
||||
If File.Exists(sIcon) Then
|
||||
oProcess.GameInfo.Icon = sIcon
|
||||
pbIcon.Image = Image.FromFile(sIcon)
|
||||
pbIcon.Image = mgrCommon.SafeIconFromFile(sIcon)
|
||||
mgrMonitorList.DoListUpdate(oProcess.GameInfo)
|
||||
End If
|
||||
End If
|
||||
@@ -577,6 +626,25 @@ Public Class frmMain
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub SetGameIcon()
|
||||
Dim ic As Icon
|
||||
Dim oBitmap As Bitmap
|
||||
|
||||
Try
|
||||
'Grab icon from the executable
|
||||
ic = System.Drawing.Icon.ExtractAssociatedIcon(oProcess.FoundProcess.MainModule.FileName)
|
||||
oBitmap = New Bitmap(ic.ToBitmap)
|
||||
ic.Dispose()
|
||||
|
||||
'Set the icon, we need to use an intermediary object to prevent file locking
|
||||
pbIcon.Image = oBitmap
|
||||
|
||||
Catch ex As Exception
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_ErrorGameIcon), False, ToolTipIcon.Error)
|
||||
UpdateLog(mgrCommon.FormatString(App_GenericError, ex.Message), False,, False)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub SetGameInfo(Optional ByVal bMulti As Boolean = False)
|
||||
Dim sFileName As String = String.Empty
|
||||
Dim sFileVersion As String = String.Empty
|
||||
@@ -586,19 +654,19 @@ Public Class frmMain
|
||||
lblStatus1.Text = String.Empty
|
||||
lblStatus2.Text = String.Empty
|
||||
lblStatus3.Text = String.Empty
|
||||
pbIcon.Image = Icon_Unknown
|
||||
|
||||
'Set Game Icon
|
||||
If Not mgrCommon.IsUnix Then SetGameIcon()
|
||||
|
||||
'Get Process Information
|
||||
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
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_ErrorGameDetails), False, ToolTipIcon.Error)
|
||||
UpdateLog(mgrCommon.FormatString(App_GenericError, ex.Message), False,, False)
|
||||
End Try
|
||||
|
||||
'Get Game Details
|
||||
@@ -621,7 +689,7 @@ Public Class frmMain
|
||||
|
||||
'Check for a custom icon & details
|
||||
If File.Exists(oProcess.GameInfo.Icon) Then
|
||||
pbIcon.Image = Image.FromFile(oProcess.GameInfo.Icon)
|
||||
pbIcon.Image = mgrCommon.SafeIconFromFile(oProcess.GameInfo.Icon)
|
||||
End If
|
||||
If sFileName = String.Empty Then
|
||||
If oProcess.GameInfo.ProcessPath <> String.Empty Then
|
||||
@@ -710,11 +778,11 @@ Public Class frmMain
|
||||
oProcess.GameInfo.Hours = Math.Round(dCurrentHours, 5)
|
||||
|
||||
'Update original object with the new hours without reloading entire list.
|
||||
If hshScanList.Contains(oProcess.GameInfo.ProcessName) Then
|
||||
DirectCast(hshScanList.Item(oProcess.GameInfo.ProcessName), clsGame).Hours = oProcess.GameInfo.Hours
|
||||
If hshScanList.Contains(oProcess.GameInfo.ID) Then
|
||||
DirectCast(hshScanList.Item(oProcess.GameInfo.ID), clsGame).Hours = oProcess.GameInfo.Hours
|
||||
End If
|
||||
|
||||
mgrMonitorList.DoListUpdate(oProcess.GameInfo)
|
||||
mgrMonitorList.DoListFieldUpdate("Hours", oProcess.GameInfo.Hours, oProcess.GameInfo.ID)
|
||||
mgrMonitorList.SyncMonitorLists(oSettings)
|
||||
|
||||
UpdateTimeSpent(dCurrentHours, oProcess.TimeSpent.TotalHours)
|
||||
@@ -822,6 +890,11 @@ Public Class frmMain
|
||||
Case "process"
|
||||
bProcessDebugMode = bDebugEnable
|
||||
mgrCommon.ShowMessage(frmMain_CommandSucess, MsgBoxStyle.Exclamation)
|
||||
Case "memory"
|
||||
bMemoryDebugMode = bDebugEnable
|
||||
mgrCommon.ShowMessage(frmMain_CommandSucess, MsgBoxStyle.Exclamation)
|
||||
Case Else
|
||||
mgrCommon.ShowMessage(frmMain_ErrorInvalidMode, New String() {sCommand(1), sCommand(0)}, MsgBoxStyle.Exclamation)
|
||||
End Select
|
||||
|
||||
Case Else
|
||||
@@ -862,6 +935,7 @@ Public Class frmMain
|
||||
PauseScan()
|
||||
frm.Settings = oSettings
|
||||
frm.PendingRestores = bPendingRestores
|
||||
frm.LastPlayedGame = oProcess.GameInfo
|
||||
frm.ShowDialog()
|
||||
LoadGameSettings()
|
||||
ResumeScan()
|
||||
@@ -875,6 +949,11 @@ Public Class frmMain
|
||||
If frm.TriggerRestore Then
|
||||
RunRestore(frm.RestoreList)
|
||||
End If
|
||||
|
||||
'Handle import backup trigger
|
||||
If frm.TriggerImportBackup Then
|
||||
RunImportBackup(frm.ImportBackupList)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OpenSettings()
|
||||
@@ -889,6 +968,7 @@ Public Class frmMain
|
||||
mgrPath.RemoteDatabaseLocation = oSettings.BackupFolder
|
||||
SetupSyncWatcher()
|
||||
LoadGameSettings()
|
||||
LoadCustomUISettings()
|
||||
End If
|
||||
ResumeScan()
|
||||
End Sub
|
||||
@@ -921,31 +1001,40 @@ Public Class frmMain
|
||||
Dim frm As New frmVariableManager
|
||||
PauseScan()
|
||||
frm.ShowDialog()
|
||||
mgrPath.CustomVariablesReload()
|
||||
mgrPath.LoadCustomVariables()
|
||||
mgrMonitorList.SyncMonitorLists(oSettings)
|
||||
ResumeScan()
|
||||
End Sub
|
||||
|
||||
Private Sub OpenStartupWizard()
|
||||
Dim frm As New frmStartUpWizard()
|
||||
frm.Settings = oSettings
|
||||
PauseScan()
|
||||
frm.Settings = New mgrSettings
|
||||
frm.ShowDialog()
|
||||
LoadAndVerify()
|
||||
bFirstRun = False
|
||||
ResumeScan()
|
||||
End Sub
|
||||
|
||||
Private Sub OpenWebSite()
|
||||
Process.Start(App_URLWebsite)
|
||||
Try
|
||||
Process.Start(App_URLWebsite)
|
||||
Catch ex As Exception
|
||||
mgrCommon.ShowMessage(App_ErrorLaunchExternal, ex.Message, MsgBoxStyle.Exclamation)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub OpenOnlineManual()
|
||||
Process.Start(App_URLManual)
|
||||
Try
|
||||
Process.Start(App_URLManual)
|
||||
Catch ex As Exception
|
||||
mgrCommon.ShowMessage(App_ErrorLaunchExternal, ex.Message, MsgBoxStyle.Exclamation)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub OpenCheckforUpdates()
|
||||
Process.Start(App_URLUpdates)
|
||||
Try
|
||||
Process.Start(App_URLUpdates)
|
||||
Catch ex As Exception
|
||||
mgrCommon.ShowMessage(App_ErrorLaunchExternal, ex.Message, MsgBoxStyle.Exclamation)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub CheckForNewBackups()
|
||||
@@ -1013,12 +1102,12 @@ Public Class frmMain
|
||||
End If
|
||||
|
||||
If bOfficial Then
|
||||
mgrMonitorList.SyncGameIDs(sLocation, oSettings, True)
|
||||
mgrMonitorList.SyncGameIDs(sLocation, True)
|
||||
Else
|
||||
sLocation = mgrCommon.OpenFileBrowser("XML_Import", frmGameManager_ChooseImportXML, "xml", frmGameManager_XML, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), False)
|
||||
|
||||
If sLocation <> String.Empty Then
|
||||
mgrMonitorList.SyncGameIDs(sLocation, oSettings, False)
|
||||
mgrMonitorList.SyncGameIDs(sLocation, False)
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -1051,6 +1140,12 @@ Public Class frmMain
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'Check Special Paths
|
||||
If Not mgrPath.CheckSpecialPaths Then
|
||||
bInitFail = True
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'Local Database Check
|
||||
VerifyDBVersion(mgrSQLite.Database.Local)
|
||||
LocalDatabaseCheck()
|
||||
@@ -1088,8 +1183,15 @@ Public Class frmMain
|
||||
|
||||
'Verify the "Start with Windows" setting
|
||||
If oSettings.StartWithWindows Then
|
||||
If Not VerifyStartWithWindows() Then
|
||||
UpdateLog(frmMain_ErrorAppLocationChanged, False, ToolTipIcon.Info)
|
||||
If mgrCommon.IsUnix Then
|
||||
Dim sVerifyError As String = String.Empty
|
||||
If Not VerifyAutoStartLinux(sVerifyError) Then
|
||||
UpdateLog(sVerifyError, False, ToolTipIcon.Info)
|
||||
End If
|
||||
Else
|
||||
If Not VerifyStartWithWindows() Then
|
||||
UpdateLog(frmMain_ErrorAppLocationChanged, False, ToolTipIcon.Info)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -1391,6 +1493,7 @@ Public Class frmMain
|
||||
|
||||
'Set Form Name
|
||||
Me.Name = App_NameLong
|
||||
Me.Icon = GBM_Icon
|
||||
|
||||
'Set Menu Text
|
||||
gMonFile.Text = frmMain_gMonFile
|
||||
@@ -1460,6 +1563,9 @@ Public Class frmMain
|
||||
pbTime.Image = Icon_Clock
|
||||
AddHandler mgrMonitorList.UpdateLog, AddressOf UpdateLog
|
||||
ResetGameInfo()
|
||||
|
||||
'Initialise and sets interface customizations
|
||||
LoadCustomUISettings()
|
||||
End Sub
|
||||
|
||||
Private Function BuildChildProcesses() As Integer
|
||||
@@ -1523,6 +1629,44 @@ Public Class frmMain
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub LoadCustomUISettings()
|
||||
#Region "Auto-hide log"
|
||||
If oSettings.AutoHideLog Then
|
||||
Size = New Size(0, 0)
|
||||
Else
|
||||
Size = New Size(0, 440)
|
||||
End If
|
||||
#End Region
|
||||
|
||||
#Region "Set application theme"
|
||||
Dim oThemeEngine As New mgrThemeEngine()
|
||||
oThemeEngine.SetTheme(oSettings.ThemeSelection)
|
||||
|
||||
'Base Theme
|
||||
BackColor = oThemeEngine.ColorBase
|
||||
|
||||
'Menu/Status Bars
|
||||
gMonMainMenu.BackColor = oThemeEngine.ColorBase
|
||||
gMonMainMenu.ForeColor = oThemeEngine.ColorHighlightSecondary
|
||||
gMonStatusStrip.BackColor = oThemeEngine.ColorBase
|
||||
gMonStripTxtStatus.ForeColor = oThemeEngine.ColorHighlightSecondary
|
||||
gMonStripStatusButton.ForeColor = oThemeEngine.ColorHighlightSecondary
|
||||
|
||||
'Text Labels
|
||||
lblGameTitle.ForeColor = oThemeEngine.ColorHighlightSecondary
|
||||
lblStatus1.ForeColor = oThemeEngine.ColorHighlightSecondary
|
||||
lblStatus2.ForeColor = oThemeEngine.ColorHighlightSecondary
|
||||
lblStatus3.ForeColor = oThemeEngine.ColorHighlightSecondary
|
||||
lblTimeSpent.ForeColor = oThemeEngine.ColorHighlightSecondary
|
||||
lblLastActionTitle.ForeColor = oThemeEngine.ColorHighlightSecondary
|
||||
lblLastAction.ForeColor = oThemeEngine.ColorHighlightSecondary
|
||||
|
||||
'Output Log
|
||||
txtLog.BackColor = oThemeEngine.ColorBaseSecondary
|
||||
txtLog.ForeColor = oThemeEngine.ColorHighlight
|
||||
#End Region
|
||||
End Sub
|
||||
|
||||
'Functions that control the scanning for games
|
||||
Private Sub StartScan()
|
||||
tmScanTimer.Interval = 5000
|
||||
@@ -1610,8 +1754,8 @@ Public Class frmMain
|
||||
|
||||
Private Sub VerifyGameDataPath()
|
||||
'Important: This function cannot access mgrPath for settings, as that will trigger a database creation and destroy the reason for this function
|
||||
Dim sSettingsRoot As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "/gbm"
|
||||
Dim sDBLocation As String = sSettingsRoot & "/gbm.s3db"
|
||||
Dim sSettingsRoot As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & Path.DirectorySeparatorChar & "gbm"
|
||||
Dim sDBLocation As String = sSettingsRoot & Path.DirectorySeparatorChar & "gbm.s3db"
|
||||
|
||||
If Not Directory.Exists(sSettingsRoot) Then
|
||||
Try
|
||||
@@ -1643,6 +1787,53 @@ Public Class frmMain
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function VerifyAutoStartLinux(ByRef sErrorMessage As String) As Boolean
|
||||
Dim oProcess As Process
|
||||
Dim sDesktopFile As String = String.Empty
|
||||
Dim sAutoStartFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) & Path.DirectorySeparatorChar & ".config/autostart/"
|
||||
|
||||
'Check if the app is still properly installed
|
||||
If mgrPath.VerifyLinuxDesktopFileLocation(sDesktopFile) Then
|
||||
If File.Exists(sAutoStartFolder & Path.DirectorySeparatorChar & "gbm.desktop") Then
|
||||
Return True
|
||||
Else
|
||||
'Create the autostart folder if it doesn't exist yet
|
||||
If Not Directory.Exists(sAutoStartFolder) Then
|
||||
Directory.CreateDirectory(sAutoStartFolder)
|
||||
End If
|
||||
'Create link
|
||||
Try
|
||||
oProcess = New Process
|
||||
oProcess.StartInfo.FileName = "/bin/ln"
|
||||
oProcess.StartInfo.Arguments = "-s " & sDesktopFile & " " & sAutoStartFolder
|
||||
oProcess.StartInfo.UseShellExecute = False
|
||||
oProcess.StartInfo.RedirectStandardOutput = True
|
||||
oProcess.StartInfo.CreateNoWindow = True
|
||||
oProcess.Start()
|
||||
Catch ex As Exception
|
||||
mgrCommon.ShowMessage(frmSettings_ErrorLinuxAutoStart, ex.Message, MsgBoxStyle.Exclamation)
|
||||
End Try
|
||||
|
||||
sErrorMessage = frmMain_ErrorLinuxAutoStartMissing
|
||||
Return False
|
||||
End If
|
||||
Else
|
||||
'If the app is no longer properly installed, disable autostart and the setting.
|
||||
Try
|
||||
oSettings.StartWithWindows = False
|
||||
oSettings.SaveSettings()
|
||||
If File.Exists(sAutoStartFolder & Path.DirectorySeparatorChar & "gbm.desktop") Then
|
||||
File.Delete(sAutoStartFolder & Path.DirectorySeparatorChar & "gbm.desktop")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
mgrCommon.ShowMessage(frmSettings_ErrorLinuxAutoStart, ex.Message, MsgBoxStyle.Exclamation)
|
||||
End Try
|
||||
|
||||
sErrorMessage = frmMain_ErrorLinuxAutoStartLinkMissing
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Function VerifyStartWithWindows() As Boolean
|
||||
Dim oKey As Microsoft.Win32.RegistryKey
|
||||
Dim sAppName As String = Application.ProductName
|
||||
@@ -1664,15 +1855,6 @@ Public Class frmMain
|
||||
|
||||
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
|
||||
If oProcess.GameInfo.ProcessPath <> String.Empty Then
|
||||
Return True
|
||||
@@ -1832,17 +2014,7 @@ Public Class frmMain
|
||||
RestartAsAdmin()
|
||||
End Sub
|
||||
|
||||
Private Sub frmMain_Activated(sender As System.Object, e As System.EventArgs) Handles MyBase.Activated
|
||||
txtLog.Select(txtLog.TextLength, 0)
|
||||
txtLog.ScrollToCaret()
|
||||
End Sub
|
||||
|
||||
Private Sub Main_FormClosing(sender As System.Object, e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
|
||||
'Unix Handler
|
||||
If mgrCommon.IsUnix And Not bShutdown Then
|
||||
ShutdownApp()
|
||||
End If
|
||||
|
||||
Select Case e.CloseReason
|
||||
Case CloseReason.UserClosing
|
||||
If bShutdown = False Then
|
||||
@@ -1853,12 +2025,13 @@ Public Class frmMain
|
||||
Me.WindowState = FormWindowState.Minimized
|
||||
Me.ShowInTaskbar = False
|
||||
Me.Visible = False
|
||||
Else
|
||||
ShutdownApp()
|
||||
End If
|
||||
End If
|
||||
Case CloseReason.TaskManagerClosing, CloseReason.WindowsShutDown
|
||||
'Do nothing and let the app close without warning
|
||||
Case Else
|
||||
ShutdownApp(False)
|
||||
End Select
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub AutoRestoreEventProcessor(myObject As Object, ByVal myEventArgs As EventArgs) Handles tmRestoreCheck.Elapsed
|
||||
@@ -1903,8 +2076,21 @@ Public Class frmMain
|
||||
End If
|
||||
End If
|
||||
|
||||
'We need to determine this Wine information and store it before the process ends.
|
||||
If oProcess.WineProcess Then
|
||||
Dim oWineData As New clsWineData
|
||||
oWineData.Prefix = mgrPath.GetWinePrefix(oProcess.FoundProcess)
|
||||
oWineData.BinaryPath = Path.GetDirectoryName(oProcess.FoundProcess.MainModule.FileName)
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_WineBinaryPath, oWineData.BinaryPath), False)
|
||||
If Not oWineData.Prefix = String.Empty Then
|
||||
oProcess.WineData = oWineData
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_WinePrefix, oWineData.Prefix), False)
|
||||
Else
|
||||
bContinue = False
|
||||
End If
|
||||
End If
|
||||
|
||||
If bContinue = True Then
|
||||
CheckForSavedDuplicate()
|
||||
If oProcess.Duplicate Then
|
||||
UpdateLog(frmMain_MultipleGamesDetected, oSettings.ShowDetectionToolTips)
|
||||
UpdateStatus(frmMain_MultipleGamesDetected)
|
||||
@@ -1925,6 +2111,10 @@ Public Class frmMain
|
||||
StopScan()
|
||||
End If
|
||||
End If
|
||||
|
||||
If bMemoryDebugMode Then
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_DebugMemoryAllocation, Math.Round(GC.GetTotalMemory(False) / 1000000, 2)), False, ToolTipIcon.Info, True)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub bwMonitor_DoWork(sender As System.Object, e As System.ComponentModel.DoWorkEventArgs) Handles bwMonitor.DoWork
|
||||
@@ -1957,7 +2147,7 @@ Public Class frmMain
|
||||
oProcess.GameInfo.ProcessPath = mgrPath.ProcessPathSearch(oProcess.GameInfo.Name, oProcess.GameInfo.ProcessName, sPathDetectionError)
|
||||
If oProcess.GameInfo.ProcessPath <> String.Empty Then
|
||||
'Update and reload
|
||||
mgrMonitorList.DoListUpdate(oProcess.GameInfo)
|
||||
mgrMonitorList.DoListFieldUpdate("ProcessPath", oProcess.GameInfo.ProcessPath, oProcess.GameInfo.ID)
|
||||
LoadGameSettings()
|
||||
Else
|
||||
bContinue = False
|
||||
@@ -1973,6 +2163,20 @@ Public Class frmMain
|
||||
If bContinue Then
|
||||
If DoMultiGameCheck() Then
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_GameEnded, oProcess.GameInfo.Name), False)
|
||||
If oProcess.WineProcess Then
|
||||
oProcess.WineData.MonitorID = oProcess.GameInfo.ID
|
||||
'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
|
||||
oProcess.WineData.SavePath = mgrPath.GetWineSavePath(oProcess.WineData.Prefix, oProcess.GameInfo.TruePath)
|
||||
If Not oProcess.WineData.SavePath = oProcess.GameInfo.TruePath Then
|
||||
oProcess.GameInfo.TruePath = oProcess.WineData.SavePath
|
||||
UpdateLog(mgrCommon.FormatString(frmMain_WineSavePath, oProcess.WineData.SavePath), False)
|
||||
End If
|
||||
End If
|
||||
mgrWineData.DoWineDataAddUpdate(oProcess.WineData)
|
||||
'This does required mods to include/exclude data and relative paths (if required)
|
||||
mgrPath.ModWinePathData(oProcess.GameInfo)
|
||||
End If
|
||||
If oSettings.TimeTracking Then HandleTimeSpent()
|
||||
If oSettings.SessionTracking Then HandleSession()
|
||||
RunBackup()
|
||||
@@ -1992,19 +2196,42 @@ Public Class frmMain
|
||||
oProcess.StartTime = Now : oProcess.EndTime = Now
|
||||
End Sub
|
||||
|
||||
Private Sub Main_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
||||
Private Sub frmMain_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
||||
SetForm()
|
||||
End Sub
|
||||
|
||||
Private Sub frmMain_Activated(sender As System.Object, e As System.EventArgs) Handles MyBase.Activated
|
||||
'Init
|
||||
Try
|
||||
SetForm()
|
||||
VerifyGameDataPath()
|
||||
LoadAndVerify()
|
||||
If Not bInitFail Then
|
||||
If bInitialLoad Then
|
||||
Try
|
||||
VerifyGameDataPath()
|
||||
If bFirstRun Then OpenStartupWizard()
|
||||
LoadAndVerify()
|
||||
Catch ex As Exception
|
||||
If mgrCommon.ShowMessage(frmMain_ErrorInitFailure, ex.Message & vbCrLf & ex.StackTrace, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
bInitFail = True
|
||||
End If
|
||||
End Try
|
||||
|
||||
If bInitFail Then
|
||||
bShutdown = True
|
||||
Me.Close()
|
||||
Else
|
||||
VerifyCustomPathVariables()
|
||||
|
||||
If oSettings.StartToTray And Not mgrCommon.IsUnix Then
|
||||
bShowToggle = False
|
||||
Me.Visible = False
|
||||
Me.ShowInTaskbar = False
|
||||
'Windows and Linux require different settings for the system tray
|
||||
If mgrCommon.IsUnix Then
|
||||
Me.gMonTray.Visible = False
|
||||
Me.MinimizeBox = True
|
||||
If oSettings.StartToTray Then
|
||||
Me.WindowState = FormWindowState.Minimized
|
||||
End If
|
||||
Else
|
||||
If oSettings.StartToTray Then
|
||||
bShowToggle = False
|
||||
Me.Visible = False
|
||||
Me.ShowInTaskbar = False
|
||||
End If
|
||||
End If
|
||||
|
||||
If oSettings.MonitorOnStartup Then
|
||||
@@ -2015,29 +2242,12 @@ Public Class frmMain
|
||||
|
||||
HandleScan()
|
||||
CheckForNewBackups()
|
||||
|
||||
'Unix Handler
|
||||
If mgrCommon.IsUnix Then
|
||||
Me.MinimizeBox = True
|
||||
Else
|
||||
Me.gMonTray.Visible = True
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
If mgrCommon.ShowMessage(frmMain_ErrorInitFailure, ex.Message, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
bInitFail = True
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub frmMain_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
|
||||
If bInitFail Then
|
||||
bShutdown = True
|
||||
Me.Close()
|
||||
End If
|
||||
|
||||
If bFirstRun And Not bShutdown Then
|
||||
OpenStartupWizard()
|
||||
bInitialLoad = False
|
||||
Else
|
||||
txtLog.Select(txtLog.TextLength, 0)
|
||||
txtLog.ScrollToCaret()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -213,7 +213,6 @@ Partial Class frmProcessManager
|
||||
Me.MaximizeBox = False
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmProcessManager"
|
||||
Me.ShowIcon = False
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Process Manager"
|
||||
Me.grpProcess.ResumeLayout(False)
|
||||
|
||||
@@ -56,7 +56,7 @@ Public Class frmProcessManager
|
||||
End If
|
||||
|
||||
sNewPath = mgrCommon.OpenFileBrowser("PM_Process", frmProcessManager_ChooseProcess, "exe",
|
||||
frmProcessManager_Executable, sDefaultFolder, False, True)
|
||||
frmProcessManager_Executable, sDefaultFolder, True)
|
||||
|
||||
If sNewPath <> String.Empty Then
|
||||
txtPath.Text = sNewPath
|
||||
@@ -307,6 +307,7 @@ Public Class frmProcessManager
|
||||
Private Sub SetForm()
|
||||
'Set Form Name
|
||||
Me.Text = frmProcessManager_FormName
|
||||
Me.Icon = GBM_Icon
|
||||
|
||||
'Set Form Text
|
||||
btnCancel.Text = frmProcessManager_btnCancel
|
||||
|
||||
@@ -25,11 +25,11 @@ Partial Class frmSessionExport
|
||||
Me.btnExport = New System.Windows.Forms.Button()
|
||||
Me.btnCancel = New System.Windows.Forms.Button()
|
||||
Me.grpExportType = New System.Windows.Forms.GroupBox()
|
||||
Me.grpDateType = New System.Windows.Forms.GroupBox()
|
||||
Me.optCSV = New System.Windows.Forms.RadioButton()
|
||||
Me.optXML = New System.Windows.Forms.RadioButton()
|
||||
Me.optCurrentLocale = New System.Windows.Forms.RadioButton()
|
||||
Me.optCSV = New System.Windows.Forms.RadioButton()
|
||||
Me.grpDateType = New System.Windows.Forms.GroupBox()
|
||||
Me.optUnix = New System.Windows.Forms.RadioButton()
|
||||
Me.optCurrentLocale = New System.Windows.Forms.RadioButton()
|
||||
Me.grpOptions = New System.Windows.Forms.GroupBox()
|
||||
Me.chkCSVHeaders = New System.Windows.Forms.CheckBox()
|
||||
Me.grpExportType.SuspendLayout()
|
||||
@@ -66,16 +66,16 @@ Partial Class frmSessionExport
|
||||
Me.grpExportType.TabStop = False
|
||||
Me.grpExportType.Text = "Export Type"
|
||||
'
|
||||
'grpDateType
|
||||
'optXML
|
||||
'
|
||||
Me.grpDateType.Controls.Add(Me.optUnix)
|
||||
Me.grpDateType.Controls.Add(Me.optCurrentLocale)
|
||||
Me.grpDateType.Location = New System.Drawing.Point(12, 88)
|
||||
Me.grpDateType.Name = "grpDateType"
|
||||
Me.grpDateType.Size = New System.Drawing.Size(260, 70)
|
||||
Me.grpDateType.TabIndex = 1
|
||||
Me.grpDateType.TabStop = False
|
||||
Me.grpDateType.Text = "Date Type"
|
||||
Me.optXML.AutoSize = True
|
||||
Me.optXML.Location = New System.Drawing.Point(6, 42)
|
||||
Me.optXML.Name = "optXML"
|
||||
Me.optXML.Size = New System.Drawing.Size(47, 17)
|
||||
Me.optXML.TabIndex = 1
|
||||
Me.optXML.TabStop = True
|
||||
Me.optXML.Text = "XML"
|
||||
Me.optXML.UseVisualStyleBackColor = True
|
||||
'
|
||||
'optCSV
|
||||
'
|
||||
@@ -88,27 +88,16 @@ Partial Class frmSessionExport
|
||||
Me.optCSV.Text = "CSV"
|
||||
Me.optCSV.UseVisualStyleBackColor = True
|
||||
'
|
||||
'optXML
|
||||
'grpDateType
|
||||
'
|
||||
Me.optXML.AutoSize = True
|
||||
Me.optXML.Location = New System.Drawing.Point(6, 42)
|
||||
Me.optXML.Name = "optXML"
|
||||
Me.optXML.Size = New System.Drawing.Size(47, 17)
|
||||
Me.optXML.TabIndex = 1
|
||||
Me.optXML.TabStop = True
|
||||
Me.optXML.Text = "XML"
|
||||
Me.optXML.UseVisualStyleBackColor = True
|
||||
'
|
||||
'optCurrentLocale
|
||||
'
|
||||
Me.optCurrentLocale.AutoEllipsis = True
|
||||
Me.optCurrentLocale.Location = New System.Drawing.Point(6, 19)
|
||||
Me.optCurrentLocale.Name = "optCurrentLocale"
|
||||
Me.optCurrentLocale.Size = New System.Drawing.Size(248, 17)
|
||||
Me.optCurrentLocale.TabIndex = 0
|
||||
Me.optCurrentLocale.TabStop = True
|
||||
Me.optCurrentLocale.Text = "Current Locale"
|
||||
Me.optCurrentLocale.UseVisualStyleBackColor = True
|
||||
Me.grpDateType.Controls.Add(Me.optUnix)
|
||||
Me.grpDateType.Controls.Add(Me.optCurrentLocale)
|
||||
Me.grpDateType.Location = New System.Drawing.Point(12, 88)
|
||||
Me.grpDateType.Name = "grpDateType"
|
||||
Me.grpDateType.Size = New System.Drawing.Size(260, 70)
|
||||
Me.grpDateType.TabIndex = 1
|
||||
Me.grpDateType.TabStop = False
|
||||
Me.grpDateType.Text = "Date Type"
|
||||
'
|
||||
'optUnix
|
||||
'
|
||||
@@ -121,6 +110,17 @@ Partial Class frmSessionExport
|
||||
Me.optUnix.Text = "Unix Timestamp"
|
||||
Me.optUnix.UseVisualStyleBackColor = True
|
||||
'
|
||||
'optCurrentLocale
|
||||
'
|
||||
Me.optCurrentLocale.AutoEllipsis = True
|
||||
Me.optCurrentLocale.Location = New System.Drawing.Point(6, 19)
|
||||
Me.optCurrentLocale.Name = "optCurrentLocale"
|
||||
Me.optCurrentLocale.Size = New System.Drawing.Size(248, 17)
|
||||
Me.optCurrentLocale.TabIndex = 0
|
||||
Me.optCurrentLocale.TabStop = True
|
||||
Me.optCurrentLocale.Text = "Current Locale"
|
||||
Me.optCurrentLocale.UseVisualStyleBackColor = True
|
||||
'
|
||||
'grpOptions
|
||||
'
|
||||
Me.grpOptions.Controls.Add(Me.chkCSVHeaders)
|
||||
@@ -155,6 +155,7 @@ Partial Class frmSessionExport
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmSessionExport"
|
||||
Me.ShowIcon = False
|
||||
Me.ShowInTaskbar = False
|
||||
Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
|
||||
Me.Text = "Session Export Options"
|
||||
|
||||
@@ -46,6 +46,7 @@ Public Class frmSessionExport
|
||||
|
||||
Private Sub SetForm()
|
||||
Me.Text = frmSessionExport_FormName
|
||||
Me.Icon = GBM_Icon
|
||||
|
||||
grpExportType.Text = frmSessionExport_grpExportType
|
||||
grpDateType.Text = frmSessionExport_grpDateType
|
||||
|
||||
@@ -175,7 +175,6 @@ Partial Class frmSessions
|
||||
Me.Controls.Add(Me.lblFilter)
|
||||
Me.Controls.Add(Me.txtFilter)
|
||||
Me.Name = "frmSessions"
|
||||
Me.ShowIcon = False
|
||||
Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Session Viewer"
|
||||
|
||||
@@ -68,13 +68,14 @@ Public Class frmSessions
|
||||
dgSessions.Rows.Add(New Object() {dr("MonitorID"), dr("Name"), dr("Start"), dStart, dr("End"), dEnd, dHours})
|
||||
Next
|
||||
|
||||
lblTotalHours.Text = mgrCommon.FormatString(frmSessions_lblTotalHours, dTotalHours)
|
||||
lblTotalHours.Text = mgrCommon.FormatString(frmSessions_lblTotalHours, Math.Round(dTotalHours, 2))
|
||||
|
||||
dgSessions.AutoResizeColumns()
|
||||
End Sub
|
||||
|
||||
Private Sub SetForm()
|
||||
Me.Text = frmSessions_Name
|
||||
Me.Icon = GBM_Icon
|
||||
|
||||
'Init Labels
|
||||
lblFilter.Text = frmSessions_lblFilter
|
||||
@@ -290,9 +291,21 @@ Public Class frmSessions
|
||||
|
||||
Select Case iDataTypeCol
|
||||
Case iDataType.DecimalType
|
||||
iCompareResult = If(CDec(dgRow1.Cells(iSortCol).Value) < CDec(dgRow2.Cells(iSortCol).Value), -1, 1)
|
||||
If (CDec(dgRow1.Cells(iSortCol).Value) = CDec(dgRow2.Cells(iSortCol).Value)) Then
|
||||
iCompareResult = 0
|
||||
ElseIf (CDec(dgRow1.Cells(iSortCol).Value) < CDec(dgRow2.Cells(iSortCol).Value)) Then
|
||||
iCompareResult = -1
|
||||
Else
|
||||
iCompareResult = 1
|
||||
End If
|
||||
Case iDataType.IntType
|
||||
iCompareResult = If(CInt(dgRow1.Cells(iSortCol).Value) < CInt(dgRow2.Cells(iSortCol).Value), -1, 1)
|
||||
If (CInt(dgRow1.Cells(iSortCol).Value) = CInt(dgRow2.Cells(iSortCol).Value)) Then
|
||||
iCompareResult = 0
|
||||
ElseIf (CInt(dgRow1.Cells(iSortCol).Value) < CInt(dgRow2.Cells(iSortCol).Value)) Then
|
||||
iCompareResult = -1
|
||||
Else
|
||||
iCompareResult = 1
|
||||
End If
|
||||
Case iDataType.StringType
|
||||
iCompareResult = String.Compare(CStr(dgRow1.Cells(iSortCol).Value), CStr(dgRow2.Cells(iSortCol).Value))
|
||||
Case iDataType.DateTimeType
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class frmSettings
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Form overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
<System.Diagnostics.DebuggerNonUserCode()>
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
@@ -20,7 +20,7 @@ Partial Class frmSettings
|
||||
'NOTE: The following procedure is required by the Windows Form Designer
|
||||
'It can be modified using the Windows Form Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Me.chkAutoSaveLog = New System.Windows.Forms.CheckBox()
|
||||
Me.btnOptionalFields = New System.Windows.Forms.Button()
|
||||
@@ -47,6 +47,7 @@ Partial Class frmSettings
|
||||
Me.btnDefaults = New System.Windows.Forms.Button()
|
||||
Me.pnlBackup = New System.Windows.Forms.Panel()
|
||||
Me.grpBackupConfirmations = New System.Windows.Forms.GroupBox()
|
||||
Me.chkDisableDiskSpaceCheck = New System.Windows.Forms.CheckBox()
|
||||
Me.chkBackupConfirm = New System.Windows.Forms.CheckBox()
|
||||
Me.chkOverwriteWarning = New System.Windows.Forms.CheckBox()
|
||||
Me.grpBackupHandling = New System.Windows.Forms.GroupBox()
|
||||
@@ -64,15 +65,27 @@ Partial Class frmSettings
|
||||
Me.grpLogOptions = New System.Windows.Forms.GroupBox()
|
||||
Me.chkDisableSyncMessages = New System.Windows.Forms.CheckBox()
|
||||
Me.grpGameData = New System.Windows.Forms.GroupBox()
|
||||
Me.chkShowResolvedPaths = New System.Windows.Forms.CheckBox()
|
||||
Me.chkSessionTracking = New System.Windows.Forms.CheckBox()
|
||||
Me.lstSettings = New System.Windows.Forms.ListBox()
|
||||
Me.btnResetMessages = New System.Windows.Forms.Button()
|
||||
Me.pnlStartup = New System.Windows.Forms.Panel()
|
||||
Me.grpStartup = New System.Windows.Forms.GroupBox()
|
||||
Me.chkBackupOnLaunch = New System.Windows.Forms.CheckBox()
|
||||
Me.chkStartWindows = New System.Windows.Forms.CheckBox()
|
||||
Me.chkStartToTray = New System.Windows.Forms.CheckBox()
|
||||
Me.chkAutoStart = New System.Windows.Forms.CheckBox()
|
||||
Me.chkStartMinimized = New System.Windows.Forms.CheckBox()
|
||||
Me.chkMonitorOnStartup = New System.Windows.Forms.CheckBox()
|
||||
Me.pnlInterface = New System.Windows.Forms.Panel()
|
||||
Me.grpInterfaceOptions = New System.Windows.Forms.GroupBox()
|
||||
Me.lblPreviewTheme_HighlightSecBottom = New System.Windows.Forms.Label()
|
||||
Me.lblPreviewTheme_Highlight = New System.Windows.Forms.Label()
|
||||
Me.lblPreviewTheme_HighlightSecTop = New System.Windows.Forms.Label()
|
||||
Me.btnPreviewTheme_BaseSec = New System.Windows.Forms.Button()
|
||||
Me.btnPreviewTheme_Base = New System.Windows.Forms.Button()
|
||||
Me.chkAutoHideLog = New System.Windows.Forms.CheckBox()
|
||||
Me.cboThemeSelection = New System.Windows.Forms.ComboBox()
|
||||
Me.lblThemeSelection = New System.Windows.Forms.Label()
|
||||
Me.lblPreviewTheme_HighlightSec = New System.Windows.Forms.Label()
|
||||
Me.grpFolderOptions.SuspendLayout()
|
||||
Me.grp7zGeneral.SuspendLayout()
|
||||
Me.pnlBackup.SuspendLayout()
|
||||
@@ -88,6 +101,8 @@ Partial Class frmSettings
|
||||
Me.grpGameData.SuspendLayout()
|
||||
Me.pnlStartup.SuspendLayout()
|
||||
Me.grpStartup.SuspendLayout()
|
||||
Me.pnlInterface.SuspendLayout()
|
||||
Me.grpInterfaceOptions.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'chkAutoSaveLog
|
||||
@@ -102,7 +117,7 @@ Partial Class frmSettings
|
||||
'
|
||||
'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.Size = New System.Drawing.Size(216, 23)
|
||||
Me.btnOptionalFields.TabIndex = 3
|
||||
@@ -317,15 +332,26 @@ Partial Class frmSettings
|
||||
'
|
||||
'grpBackupConfirmations
|
||||
'
|
||||
Me.grpBackupConfirmations.Controls.Add(Me.chkDisableDiskSpaceCheck)
|
||||
Me.grpBackupConfirmations.Controls.Add(Me.chkBackupConfirm)
|
||||
Me.grpBackupConfirmations.Controls.Add(Me.chkOverwriteWarning)
|
||||
Me.grpBackupConfirmations.Location = New System.Drawing.Point(6, 200)
|
||||
Me.grpBackupConfirmations.Name = "grpBackupConfirmations"
|
||||
Me.grpBackupConfirmations.Size = New System.Drawing.Size(354, 65)
|
||||
Me.grpBackupConfirmations.Size = New System.Drawing.Size(354, 90)
|
||||
Me.grpBackupConfirmations.TabIndex = 2
|
||||
Me.grpBackupConfirmations.TabStop = False
|
||||
Me.grpBackupConfirmations.Text = "Backup Confirmations"
|
||||
'
|
||||
'chkDisableDiskSpaceCheck
|
||||
'
|
||||
Me.chkDisableDiskSpaceCheck.AutoSize = True
|
||||
Me.chkDisableDiskSpaceCheck.Location = New System.Drawing.Point(9, 41)
|
||||
Me.chkDisableDiskSpaceCheck.Name = "chkDisableDiskSpaceCheck"
|
||||
Me.chkDisableDiskSpaceCheck.Size = New System.Drawing.Size(222, 17)
|
||||
Me.chkDisableDiskSpaceCheck.TabIndex = 1
|
||||
Me.chkDisableDiskSpaceCheck.Text = "Disable disk space check prior to backup"
|
||||
Me.chkDisableDiskSpaceCheck.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkBackupConfirm
|
||||
'
|
||||
Me.chkBackupConfirm.AutoSize = True
|
||||
@@ -339,10 +365,10 @@ Partial Class frmSettings
|
||||
'chkOverwriteWarning
|
||||
'
|
||||
Me.chkOverwriteWarning.AutoSize = True
|
||||
Me.chkOverwriteWarning.Location = New System.Drawing.Point(9, 41)
|
||||
Me.chkOverwriteWarning.Location = New System.Drawing.Point(9, 64)
|
||||
Me.chkOverwriteWarning.Name = "chkOverwriteWarning"
|
||||
Me.chkOverwriteWarning.Size = New System.Drawing.Size(139, 17)
|
||||
Me.chkOverwriteWarning.TabIndex = 1
|
||||
Me.chkOverwriteWarning.TabIndex = 2
|
||||
Me.chkOverwriteWarning.Text = "Show overwrite warning"
|
||||
Me.chkOverwriteWarning.UseVisualStyleBackColor = True
|
||||
'
|
||||
@@ -443,7 +469,7 @@ Partial Class frmSettings
|
||||
Me.grpGameMonitoringOptions.Controls.Add(Me.lblMinutes)
|
||||
Me.grpGameMonitoringOptions.Controls.Add(Me.chkShowDetectionTips)
|
||||
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.Size = New System.Drawing.Size(354, 65)
|
||||
Me.grpGameMonitoringOptions.TabIndex = 1
|
||||
@@ -481,7 +507,7 @@ Partial Class frmSettings
|
||||
'
|
||||
Me.grpLogOptions.Controls.Add(Me.chkDisableSyncMessages)
|
||||
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.Size = New System.Drawing.Size(354, 65)
|
||||
Me.grpLogOptions.TabIndex = 2
|
||||
@@ -500,16 +526,27 @@ Partial Class frmSettings
|
||||
'
|
||||
'grpGameData
|
||||
'
|
||||
Me.grpGameData.Controls.Add(Me.chkShowResolvedPaths)
|
||||
Me.grpGameData.Controls.Add(Me.chkSessionTracking)
|
||||
Me.grpGameData.Controls.Add(Me.chkTimeTracking)
|
||||
Me.grpGameData.Controls.Add(Me.btnOptionalFields)
|
||||
Me.grpGameData.Location = New System.Drawing.Point(6, 12)
|
||||
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.TabStop = False
|
||||
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
|
||||
'
|
||||
Me.chkSessionTracking.AutoSize = True
|
||||
@@ -548,8 +585,8 @@ Partial Class frmSettings
|
||||
'grpStartup
|
||||
'
|
||||
Me.grpStartup.Controls.Add(Me.chkBackupOnLaunch)
|
||||
Me.grpStartup.Controls.Add(Me.chkStartWindows)
|
||||
Me.grpStartup.Controls.Add(Me.chkStartToTray)
|
||||
Me.grpStartup.Controls.Add(Me.chkAutoStart)
|
||||
Me.grpStartup.Controls.Add(Me.chkStartMinimized)
|
||||
Me.grpStartup.Controls.Add(Me.chkMonitorOnStartup)
|
||||
Me.grpStartup.Location = New System.Drawing.Point(6, 12)
|
||||
Me.grpStartup.Name = "grpStartup"
|
||||
@@ -568,25 +605,25 @@ Partial Class frmSettings
|
||||
Me.chkBackupOnLaunch.Text = "Backup GBM data files on launch"
|
||||
Me.chkBackupOnLaunch.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkStartWindows
|
||||
'chkAutoStart
|
||||
'
|
||||
Me.chkStartWindows.AutoSize = True
|
||||
Me.chkStartWindows.Location = New System.Drawing.Point(6, 19)
|
||||
Me.chkStartWindows.Name = "chkStartWindows"
|
||||
Me.chkStartWindows.Size = New System.Drawing.Size(117, 17)
|
||||
Me.chkStartWindows.TabIndex = 0
|
||||
Me.chkStartWindows.Text = "Start with Windows"
|
||||
Me.chkStartWindows.UseVisualStyleBackColor = True
|
||||
Me.chkAutoStart.AutoSize = True
|
||||
Me.chkAutoStart.Location = New System.Drawing.Point(6, 19)
|
||||
Me.chkAutoStart.Name = "chkAutoStart"
|
||||
Me.chkAutoStart.Size = New System.Drawing.Size(155, 17)
|
||||
Me.chkAutoStart.TabIndex = 0
|
||||
Me.chkAutoStart.Text = "Start automatically on log-in"
|
||||
Me.chkAutoStart.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkStartToTray
|
||||
'chkStartMinimized
|
||||
'
|
||||
Me.chkStartToTray.AutoSize = True
|
||||
Me.chkStartToTray.Location = New System.Drawing.Point(6, 42)
|
||||
Me.chkStartToTray.Name = "chkStartToTray"
|
||||
Me.chkStartToTray.Size = New System.Drawing.Size(115, 17)
|
||||
Me.chkStartToTray.TabIndex = 1
|
||||
Me.chkStartToTray.Text = "Start to system tray"
|
||||
Me.chkStartToTray.UseVisualStyleBackColor = True
|
||||
Me.chkStartMinimized.AutoSize = True
|
||||
Me.chkStartMinimized.Location = New System.Drawing.Point(6, 42)
|
||||
Me.chkStartMinimized.Name = "chkStartMinimized"
|
||||
Me.chkStartMinimized.Size = New System.Drawing.Size(96, 17)
|
||||
Me.chkStartMinimized.TabIndex = 1
|
||||
Me.chkStartMinimized.Text = "Start minimized"
|
||||
Me.chkStartMinimized.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkMonitorOnStartup
|
||||
'
|
||||
@@ -598,15 +635,127 @@ Partial Class frmSettings
|
||||
Me.chkMonitorOnStartup.Text = "Start monitoring on launch"
|
||||
Me.chkMonitorOnStartup.UseVisualStyleBackColor = True
|
||||
'
|
||||
'pnlInterface
|
||||
'
|
||||
Me.pnlInterface.Controls.Add(Me.grpInterfaceOptions)
|
||||
Me.pnlInterface.Location = New System.Drawing.Point(180, 0)
|
||||
Me.pnlInterface.Name = "pnlInterface"
|
||||
Me.pnlInterface.Size = New System.Drawing.Size(367, 314)
|
||||
Me.pnlInterface.TabIndex = 9
|
||||
'
|
||||
'grpInterfaceOptions
|
||||
'
|
||||
Me.grpInterfaceOptions.Controls.Add(Me.lblPreviewTheme_HighlightSec)
|
||||
Me.grpInterfaceOptions.Controls.Add(Me.lblPreviewTheme_HighlightSecBottom)
|
||||
Me.grpInterfaceOptions.Controls.Add(Me.lblPreviewTheme_Highlight)
|
||||
Me.grpInterfaceOptions.Controls.Add(Me.lblPreviewTheme_HighlightSecTop)
|
||||
Me.grpInterfaceOptions.Controls.Add(Me.btnPreviewTheme_BaseSec)
|
||||
Me.grpInterfaceOptions.Controls.Add(Me.btnPreviewTheme_Base)
|
||||
Me.grpInterfaceOptions.Controls.Add(Me.chkAutoHideLog)
|
||||
Me.grpInterfaceOptions.Controls.Add(Me.cboThemeSelection)
|
||||
Me.grpInterfaceOptions.Controls.Add(Me.lblThemeSelection)
|
||||
Me.grpInterfaceOptions.Location = New System.Drawing.Point(6, 12)
|
||||
Me.grpInterfaceOptions.Name = "grpInterfaceOptions"
|
||||
Me.grpInterfaceOptions.Size = New System.Drawing.Size(354, 299)
|
||||
Me.grpInterfaceOptions.TabIndex = 1
|
||||
Me.grpInterfaceOptions.TabStop = False
|
||||
Me.grpInterfaceOptions.Text = "Interface Options"
|
||||
'
|
||||
'lblPreviewTheme_HighlightSecBottom
|
||||
'
|
||||
Me.lblPreviewTheme_HighlightSecBottom.AutoSize = True
|
||||
Me.lblPreviewTheme_HighlightSecBottom.Location = New System.Drawing.Point(15, 229)
|
||||
Me.lblPreviewTheme_HighlightSecBottom.Name = "lblPreviewTheme_HighlightSecBottom"
|
||||
Me.lblPreviewTheme_HighlightSecBottom.Size = New System.Drawing.Size(80, 13)
|
||||
Me.lblPreviewTheme_HighlightSecBottom.TabIndex = 10
|
||||
Me.lblPreviewTheme_HighlightSecBottom.Text = "Status Bar Text"
|
||||
'
|
||||
'lblPreviewTheme_Highlight
|
||||
'
|
||||
Me.lblPreviewTheme_Highlight.AutoSize = True
|
||||
Me.lblPreviewTheme_Highlight.Location = New System.Drawing.Point(18, 145)
|
||||
Me.lblPreviewTheme_Highlight.Name = "lblPreviewTheme_Highlight"
|
||||
Me.lblPreviewTheme_Highlight.Size = New System.Drawing.Size(49, 13)
|
||||
Me.lblPreviewTheme_Highlight.TabIndex = 9
|
||||
Me.lblPreviewTheme_Highlight.Text = "Log Text"
|
||||
'
|
||||
'lblPreviewTheme_HighlightSecTop
|
||||
'
|
||||
Me.lblPreviewTheme_HighlightSecTop.AutoSize = True
|
||||
Me.lblPreviewTheme_HighlightSecTop.Location = New System.Drawing.Point(18, 58)
|
||||
Me.lblPreviewTheme_HighlightSecTop.Name = "lblPreviewTheme_HighlightSecTop"
|
||||
Me.lblPreviewTheme_HighlightSecTop.Size = New System.Drawing.Size(77, 13)
|
||||
Me.lblPreviewTheme_HighlightSecTop.TabIndex = 8
|
||||
Me.lblPreviewTheme_HighlightSecTop.Text = "Menu Bar Text"
|
||||
'
|
||||
'btnPreviewTheme_BaseSec
|
||||
'
|
||||
Me.btnPreviewTheme_BaseSec.Enabled = False
|
||||
Me.btnPreviewTheme_BaseSec.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btnPreviewTheme_BaseSec.Location = New System.Drawing.Point(12, 139)
|
||||
Me.btnPreviewTheme_BaseSec.Name = "btnPreviewTheme_BaseSec"
|
||||
Me.btnPreviewTheme_BaseSec.Size = New System.Drawing.Size(321, 86)
|
||||
Me.btnPreviewTheme_BaseSec.TabIndex = 5
|
||||
Me.btnPreviewTheme_BaseSec.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnPreviewTheme_Base
|
||||
'
|
||||
Me.btnPreviewTheme_Base.Enabled = False
|
||||
Me.btnPreviewTheme_Base.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.btnPreviewTheme_Base.Location = New System.Drawing.Point(12, 52)
|
||||
Me.btnPreviewTheme_Base.Name = "btnPreviewTheme_Base"
|
||||
Me.btnPreviewTheme_Base.Size = New System.Drawing.Size(321, 194)
|
||||
Me.btnPreviewTheme_Base.TabIndex = 4
|
||||
Me.btnPreviewTheme_Base.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkAutoHideLog
|
||||
'
|
||||
Me.chkAutoHideLog.AutoSize = True
|
||||
Me.chkAutoHideLog.Location = New System.Drawing.Point(12, 275)
|
||||
Me.chkAutoHideLog.Name = "chkAutoHideLog"
|
||||
Me.chkAutoHideLog.Size = New System.Drawing.Size(167, 17)
|
||||
Me.chkAutoHideLog.TabIndex = 3
|
||||
Me.chkAutoHideLog.Text = "Automatically hide backup log"
|
||||
Me.chkAutoHideLog.UseVisualStyleBackColor = True
|
||||
'
|
||||
'cboThemeSelection
|
||||
'
|
||||
Me.cboThemeSelection.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.cboThemeSelection.FormattingEnabled = True
|
||||
Me.cboThemeSelection.Location = New System.Drawing.Point(110, 23)
|
||||
Me.cboThemeSelection.Name = "cboThemeSelection"
|
||||
Me.cboThemeSelection.Size = New System.Drawing.Size(223, 21)
|
||||
Me.cboThemeSelection.TabIndex = 1
|
||||
'
|
||||
'lblThemeSelection
|
||||
'
|
||||
Me.lblThemeSelection.AutoSize = True
|
||||
Me.lblThemeSelection.Location = New System.Drawing.Point(9, 27)
|
||||
Me.lblThemeSelection.Name = "lblThemeSelection"
|
||||
Me.lblThemeSelection.Size = New System.Drawing.Size(90, 13)
|
||||
Me.lblThemeSelection.TabIndex = 0
|
||||
Me.lblThemeSelection.Text = "Theme Selection:"
|
||||
'
|
||||
'lblPreviewTheme_HighlightSec
|
||||
'
|
||||
Me.lblPreviewTheme_HighlightSec.AutoSize = True
|
||||
Me.lblPreviewTheme_HighlightSec.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.lblPreviewTheme_HighlightSec.Location = New System.Drawing.Point(16, 77)
|
||||
Me.lblPreviewTheme_HighlightSec.Name = "lblPreviewTheme_HighlightSec"
|
||||
Me.lblPreviewTheme_HighlightSec.Size = New System.Drawing.Size(143, 24)
|
||||
Me.lblPreviewTheme_HighlightSec.TabIndex = 11
|
||||
Me.lblPreviewTheme_HighlightSec.Text = "Game Title Text"
|
||||
'
|
||||
'frmSettings
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(554, 361)
|
||||
Me.Controls.Add(Me.pnlGeneral)
|
||||
Me.Controls.Add(Me.pnlInterface)
|
||||
Me.Controls.Add(Me.pnlStartup)
|
||||
Me.Controls.Add(Me.pnl7z)
|
||||
Me.Controls.Add(Me.pnlBackup)
|
||||
Me.Controls.Add(Me.pnlGeneral)
|
||||
Me.Controls.Add(Me.pnl7z)
|
||||
Me.Controls.Add(Me.btnResetMessages)
|
||||
Me.Controls.Add(Me.lstSettings)
|
||||
Me.Controls.Add(Me.btnDefaults)
|
||||
@@ -616,8 +765,6 @@ Partial Class frmSettings
|
||||
Me.MaximizeBox = False
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmSettings"
|
||||
Me.ShowIcon = False
|
||||
Me.ShowInTaskbar = False
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Settings"
|
||||
Me.grpFolderOptions.ResumeLayout(False)
|
||||
@@ -644,6 +791,9 @@ Partial Class frmSettings
|
||||
Me.pnlStartup.ResumeLayout(False)
|
||||
Me.grpStartup.ResumeLayout(False)
|
||||
Me.grpStartup.PerformLayout()
|
||||
Me.pnlInterface.ResumeLayout(False)
|
||||
Me.grpInterfaceOptions.ResumeLayout(False)
|
||||
Me.grpInterfaceOptions.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
@@ -694,8 +844,21 @@ Partial Class frmSettings
|
||||
Friend WithEvents pnlStartup As Panel
|
||||
Friend WithEvents grpStartup As GroupBox
|
||||
Friend WithEvents chkBackupOnLaunch As CheckBox
|
||||
Friend WithEvents chkStartWindows As CheckBox
|
||||
Friend WithEvents chkStartToTray As CheckBox
|
||||
Friend WithEvents chkAutoStart As CheckBox
|
||||
Friend WithEvents chkStartMinimized As CheckBox
|
||||
Friend WithEvents chkMonitorOnStartup As CheckBox
|
||||
Friend WithEvents grpGameMonitoringOptions As GroupBox
|
||||
Friend WithEvents chkShowResolvedPaths As CheckBox
|
||||
Friend WithEvents chkDisableDiskSpaceCheck As CheckBox
|
||||
Friend WithEvents pnlInterface As Panel
|
||||
Friend WithEvents grpInterfaceOptions As GroupBox
|
||||
Friend WithEvents chkAutoHideLog As CheckBox
|
||||
Friend WithEvents cboThemeSelection As ComboBox
|
||||
Friend WithEvents lblThemeSelection As Label
|
||||
Friend WithEvents btnPreviewTheme_Base As Button
|
||||
Friend WithEvents btnPreviewTheme_BaseSec As Button
|
||||
Friend WithEvents lblPreviewTheme_HighlightSecTop As Label
|
||||
Friend WithEvents lblPreviewTheme_Highlight As Label
|
||||
Friend WithEvents lblPreviewTheme_HighlightSecBottom As Label
|
||||
Friend WithEvents lblPreviewTheme_HighlightSec As Label
|
||||
End Class
|
||||
|
||||
@@ -5,6 +5,7 @@ Public Class frmSettings
|
||||
Dim bShutdown As Boolean = False
|
||||
Dim bSyncSettingsChanged As Boolean = False
|
||||
Dim eCurrentSyncFields As clsGame.eOptionalSyncFields
|
||||
|
||||
Private oSettings As mgrSettings
|
||||
|
||||
Property Settings As mgrSettings
|
||||
@@ -16,6 +17,36 @@ Public Class frmSettings
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Sub HandleLinuxAutoStart(ByVal bToggle As Boolean)
|
||||
Dim oProcess As Process
|
||||
Dim sDesktopFile = String.Empty
|
||||
Dim sAutoStartFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) & Path.DirectorySeparatorChar & ".config/autostart/"
|
||||
|
||||
If bToggle And mgrPath.VerifyLinuxDesktopFileLocation(sDesktopFile) Then
|
||||
'Create the autostart folder if it doesn't exist yet
|
||||
If Not Directory.Exists(sAutoStartFolder) Then
|
||||
Directory.CreateDirectory(sAutoStartFolder)
|
||||
End If
|
||||
'Create link
|
||||
Try
|
||||
oProcess = New Process
|
||||
oProcess.StartInfo.FileName = "/bin/ln"
|
||||
oProcess.StartInfo.Arguments = "-s " & sDesktopFile & " " & sAutoStartFolder
|
||||
oProcess.StartInfo.UseShellExecute = False
|
||||
oProcess.StartInfo.RedirectStandardOutput = True
|
||||
oProcess.StartInfo.CreateNoWindow = True
|
||||
oProcess.Start()
|
||||
Catch ex As Exception
|
||||
mgrCommon.ShowMessage(frmSettings_ErrorLinuxAutoStart, ex.Message, MsgBoxStyle.Exclamation)
|
||||
End Try
|
||||
Else
|
||||
'Delete link
|
||||
If File.Exists(sAutoStartFolder & Path.DirectorySeparatorChar & "gbm.desktop") Then
|
||||
File.Delete(sAutoStartFolder & Path.DirectorySeparatorChar & "gbm.desktop")
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub HandleRegistryUpdate(ByVal bToggle As Boolean)
|
||||
Dim oKey As Microsoft.Win32.RegistryKey
|
||||
Dim sAppName As String = Application.ProductName
|
||||
@@ -35,23 +66,28 @@ Public Class frmSettings
|
||||
Private Function ValidateSettings() As Boolean
|
||||
|
||||
'Show Start with Windows warning if running as admin
|
||||
If chkStartWindows.Checked And mgrCommon.IsElevated Then
|
||||
If Not mgrCommon.IsUnix And chkAutoStart.Checked And mgrCommon.IsElevated Then
|
||||
mgrCommon.ShowMessage(frmSettings_WarningAdminStart, MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
|
||||
'Only modify registry key when the value changed
|
||||
If chkStartWindows.Checked <> oSettings.StartWithWindows Then
|
||||
HandleRegistryUpdate(chkStartWindows.Checked)
|
||||
'Only modify when the value changed
|
||||
If chkAutoStart.Checked <> oSettings.StartWithWindows Then
|
||||
If mgrCommon.IsUnix Then
|
||||
HandleLinuxAutoStart(chkAutoStart.Checked)
|
||||
Else
|
||||
HandleRegistryUpdate(chkAutoStart.Checked)
|
||||
End If
|
||||
End If
|
||||
oSettings.StartWithWindows = chkStartWindows.Checked
|
||||
oSettings.StartWithWindows = chkAutoStart.Checked
|
||||
|
||||
oSettings.MonitorOnStartup = chkMonitorOnStartup.Checked
|
||||
oSettings.StartToTray = chkStartToTray.Checked
|
||||
oSettings.StartToTray = chkStartMinimized.Checked
|
||||
oSettings.BackupOnLaunch = chkBackupOnLaunch.Checked
|
||||
oSettings.ShowDetectionToolTips = chkShowDetectionTips.Checked
|
||||
oSettings.DisableSyncMessages = chkDisableSyncMessages.Checked
|
||||
oSettings.AutoSaveLog = chkAutoSaveLog.Checked
|
||||
oSettings.DisableConfirmation = chkBackupConfirm.Checked
|
||||
oSettings.DisableDiskSpaceCheck = chkDisableDiskSpaceCheck.Checked
|
||||
oSettings.CreateSubFolder = chkCreateFolder.Checked
|
||||
oSettings.UseGameID = chkUseGameID.Checked
|
||||
oSettings.ShowOverwriteWarning = chkOverwriteWarning.Checked
|
||||
@@ -60,9 +96,12 @@ Public Class frmSettings
|
||||
oSettings.AutoMark = chkAutoMark.Checked
|
||||
oSettings.TimeTracking = chkTimeTracking.Checked
|
||||
oSettings.SessionTracking = chkSessionTracking.Checked
|
||||
oSettings.ShowResolvedPaths = chkShowResolvedPaths.Checked
|
||||
oSettings.SuppressBackup = chkSuppressBackup.Checked
|
||||
oSettings.SuppressBackupThreshold = nudSuppressBackupThreshold.Value
|
||||
oSettings.CompressionLevel = cboCompression.SelectedValue
|
||||
oSettings.ThemeSelection = cboThemeSelection.SelectedValue
|
||||
oSettings.AutoHideLog = chkAutoHideLog.Checked
|
||||
|
||||
If oSettings.Custom7zArguments <> txt7zArguments.Text.Trim And txt7zArguments.Text.Trim <> String.Empty Then
|
||||
mgrCommon.ShowMessage(frmSettings_WarningArguments, MsgBoxStyle.Exclamation)
|
||||
@@ -172,14 +211,15 @@ Public Class frmSettings
|
||||
End Sub
|
||||
|
||||
Private Sub LoadSettings()
|
||||
chkStartWindows.Checked = oSettings.StartWithWindows
|
||||
chkAutoStart.Checked = oSettings.StartWithWindows
|
||||
chkMonitorOnStartup.Checked = oSettings.MonitorOnStartup
|
||||
chkStartToTray.Checked = oSettings.StartToTray
|
||||
chkStartMinimized.Checked = oSettings.StartToTray
|
||||
chkBackupOnLaunch.Checked = oSettings.BackupOnLaunch
|
||||
chkShowDetectionTips.Checked = oSettings.ShowDetectionToolTips
|
||||
chkDisableSyncMessages.Checked = oSettings.DisableSyncMessages
|
||||
chkAutoSaveLog.Checked = oSettings.AutoSaveLog
|
||||
chkBackupConfirm.Checked = oSettings.DisableConfirmation
|
||||
chkDisableDiskSpaceCheck.Checked = oSettings.DisableDiskSpaceCheck
|
||||
chkCreateFolder.Checked = oSettings.CreateSubFolder
|
||||
chkUseGameID.Checked = oSettings.UseGameID
|
||||
chkOverwriteWarning.Checked = oSettings.ShowOverwriteWarning
|
||||
@@ -189,6 +229,7 @@ Public Class frmSettings
|
||||
txtBackupFolder.Text = oSettings.BackupFolder
|
||||
chkTimeTracking.Checked = oSettings.TimeTracking
|
||||
chkSessionTracking.Checked = oSettings.SessionTracking
|
||||
chkShowResolvedPaths.Checked = oSettings.ShowResolvedPaths
|
||||
chkSuppressBackup.Checked = oSettings.SuppressBackup
|
||||
nudSuppressBackupThreshold.Value = oSettings.SuppressBackupThreshold
|
||||
nudSuppressBackupThreshold.Enabled = chkSuppressBackup.Checked
|
||||
@@ -196,12 +237,8 @@ Public Class frmSettings
|
||||
txt7zArguments.Text = oSettings.Custom7zArguments
|
||||
txt7zLocation.Text = oSettings.Custom7zLocation
|
||||
eCurrentSyncFields = oSettings.SyncFields
|
||||
|
||||
'Unix Handler
|
||||
If mgrCommon.IsUnix Then
|
||||
chkStartToTray.Checked = False
|
||||
chkStartWindows.Checked = False
|
||||
End If
|
||||
cboThemeSelection.SelectedIndex = oSettings.ThemeSelection
|
||||
chkAutoHideLog.Checked = oSettings.AutoHideLog
|
||||
|
||||
'Retrieve 7z Info
|
||||
GetUtilityInfo(oSettings.Custom7zLocation)
|
||||
@@ -211,6 +248,7 @@ Public Class frmSettings
|
||||
Private Sub LoadCombos()
|
||||
Dim oComboItems As New List(Of KeyValuePair(Of Integer, String))
|
||||
Dim oSettingsItems As New List(Of KeyValuePair(Of Integer, String))
|
||||
Dim oThemeItems As New List(Of KeyValuePair(Of Integer, String))
|
||||
|
||||
'cboCompression
|
||||
cboCompression.ValueMember = "Key"
|
||||
@@ -225,6 +263,18 @@ Public Class frmSettings
|
||||
|
||||
cboCompression.DataSource = oComboItems
|
||||
|
||||
'cboThemes
|
||||
cboThemeSelection.ValueMember = "Key"
|
||||
cboThemeSelection.DisplayMember = "Value"
|
||||
|
||||
oThemeItems.Add(New KeyValuePair(Of Integer, String)(0, frmSettings_cboThemeSelection_Light))
|
||||
oThemeItems.Add(New KeyValuePair(Of Integer, String)(1, frmSettings_cboThemeSelection_Dark))
|
||||
oThemeItems.Add(New KeyValuePair(Of Integer, String)(2, frmSettings_cboThemeSelection_Crimson))
|
||||
oThemeItems.Add(New KeyValuePair(Of Integer, String)(3, frmSettings_cboThemeSelection_Emerald))
|
||||
oThemeItems.Add(New KeyValuePair(Of Integer, String)(4, frmSettings_cboThemeSelection_GBM))
|
||||
|
||||
cboThemeSelection.DataSource = oThemeItems
|
||||
|
||||
'lstSettings
|
||||
lstSettings.ValueMember = "Key"
|
||||
lstSettings.DisplayMember = "Value"
|
||||
@@ -233,6 +283,7 @@ Public Class frmSettings
|
||||
oSettingsItems.Add(New KeyValuePair(Of Integer, String)(1, frmSettings_lstSettings_BackupRestore))
|
||||
oSettingsItems.Add(New KeyValuePair(Of Integer, String)(2, frmSettings_lstSettings_Startup))
|
||||
oSettingsItems.Add(New KeyValuePair(Of Integer, String)(3, frmSettings_lstSettings_7z))
|
||||
oSettingsItems.Add(New KeyValuePair(Of Integer, String)(4, frmSettings_lstSettings_Interface))
|
||||
|
||||
lstSettings.DataSource = oSettingsItems
|
||||
|
||||
@@ -259,22 +310,32 @@ Public Class frmSettings
|
||||
pnlStartup.Visible = False
|
||||
pnlBackup.Visible = False
|
||||
pnl7z.Visible = False
|
||||
pnlInterface.Visible = False
|
||||
Case 1
|
||||
pnlGeneral.Visible = False
|
||||
pnlBackup.Visible = True
|
||||
pnlStartup.Visible = False
|
||||
pnl7z.Visible = False
|
||||
pnlInterface.Visible = False
|
||||
Case 2
|
||||
pnlGeneral.Visible = False
|
||||
pnlBackup.Visible = False
|
||||
pnlStartup.Visible = True
|
||||
pnl7z.Visible = False
|
||||
pnlInterface.Visible = False
|
||||
|
||||
Case 3
|
||||
pnlGeneral.Visible = False
|
||||
pnlBackup.Visible = False
|
||||
pnlStartup.Visible = False
|
||||
pnl7z.Visible = True
|
||||
pnlInterface.Visible = False
|
||||
Case 4
|
||||
pnlGeneral.Visible = False
|
||||
pnlBackup.Visible = False
|
||||
pnlStartup.Visible = False
|
||||
pnl7z.Visible = False
|
||||
pnlInterface.Visible = True
|
||||
End Select
|
||||
End If
|
||||
End Sub
|
||||
@@ -282,6 +343,7 @@ Public Class frmSettings
|
||||
Private Sub SetForm()
|
||||
'Set Form Name
|
||||
Me.Text = frmSettings_FormName
|
||||
Me.Icon = GBM_Icon
|
||||
|
||||
'Set Form Text
|
||||
lblMinutes.Text = frmSettings_lblMinutes
|
||||
@@ -303,10 +365,10 @@ Public Class frmSettings
|
||||
grpGameData.Text = frmSettings_grpGameData
|
||||
chkTimeTracking.Text = frmSettings_chkTimeTracking
|
||||
chkSessionTracking.Text = frmSettings_chkSessionTracking
|
||||
chkStartWindows.Text = frmSettings_chkStartWindows
|
||||
chkAutoStart.Text = frmSettings_chkAutoStart
|
||||
chkShowDetectionTips.Text = frmSettings_chkShowDetectionTips
|
||||
chkAutoSaveLog.Text = frmSettings_chkAutoSaveLog
|
||||
chkStartToTray.Text = frmSettings_chkStartToTray
|
||||
chkStartMinimized.Text = frmSettings_chkStartMinimized
|
||||
chkMonitorOnStartup.Text = frmSettings_chkMonitorOnStartup
|
||||
grp7zGeneral.Text = frmSettings_grp7zGeneral
|
||||
grp7zAdvanced.Text = frmSettings_grp7zAdvanced
|
||||
@@ -322,11 +384,14 @@ Public Class frmSettings
|
||||
grpLogOptions.Text = frmSettings_grpLogOptions
|
||||
chkDisableSyncMessages.Text = frmSettings_chkDisableSyncMessages
|
||||
grpGameMonitoringOptions.Text = frmSettings_grpGameMonitoringOptions
|
||||
chkShowResolvedPaths.Text = frmSettings_chkShowResolvedPaths
|
||||
chkDisableDiskSpaceCheck.Text = frmSettings_chkDisableDiskSpaceCheck
|
||||
|
||||
'Unix Handler
|
||||
If mgrCommon.IsUnix Then
|
||||
chkStartToTray.Enabled = False
|
||||
chkStartWindows.Enabled = False
|
||||
'Only enable this option on Linux if GBM was installed with an official method
|
||||
If Not mgrPath.VerifyLinuxDesktopFileLocation() Then
|
||||
chkAutoStart.Enabled = False
|
||||
End If
|
||||
End If
|
||||
|
||||
'Handle Panels
|
||||
@@ -355,7 +420,7 @@ Public Class frmSettings
|
||||
|
||||
Private Sub btnBackupFolder_Click(sender As System.Object, e As System.EventArgs) Handles btnBackupFolder.Click
|
||||
Dim sNewFolder As String
|
||||
sNewFolder = mgrCommon.OpenFolderBrowser("Settings_Backup_Path", frmSettings_BrowseFolder, oSettings.BackupFolder, True, False)
|
||||
sNewFolder = mgrCommon.OpenClassicFolderBrowser("Settings_Backup_Path", frmSettings_BrowseFolder, oSettings.BackupFolder, True, False)
|
||||
If sNewFolder <> String.Empty Then txtBackupFolder.Text = sNewFolder
|
||||
End Sub
|
||||
|
||||
@@ -391,4 +456,40 @@ Public Class frmSettings
|
||||
Private Sub lstSettings_SelectedValueChanged(sender As Object, e As EventArgs) Handles lstSettings.SelectedValueChanged
|
||||
ChangePanel()
|
||||
End Sub
|
||||
|
||||
Private Sub cboThemeSelection_SelectedValueChanged(sender As Object, e As EventArgs) Handles cboThemeSelection.SelectedValueChanged
|
||||
'Previews theme based on current combo-box selection.
|
||||
Dim oThemeEngine As New mgrThemeEngine()
|
||||
|
||||
If cboThemeSelection.SelectedIndex = 0 Then
|
||||
oThemeEngine.SetTheme(cboThemeSelection.SelectedIndex)
|
||||
ElseIf cboThemeSelection.SelectedIndex = 1 Then
|
||||
oThemeEngine.SetTheme(cboThemeSelection.SelectedIndex)
|
||||
ElseIf cboThemeSelection.SelectedIndex = 2 Then
|
||||
oThemeEngine.SetTheme(cboThemeSelection.SelectedIndex)
|
||||
ElseIf cboThemeSelection.SelectedIndex = 3 Then
|
||||
oThemeEngine.SetTheme(cboThemeSelection.SelectedIndex)
|
||||
ElseIf cboThemeSelection.SelectedIndex = 4 Then
|
||||
oThemeEngine.SetTheme(cboThemeSelection.SelectedIndex)
|
||||
End If
|
||||
|
||||
'Only set the theme once it has been defined.
|
||||
If oThemeEngine.bThemeHasBeenDefined Then
|
||||
'Base Theme
|
||||
btnPreviewTheme_Base.BackColor = oThemeEngine.ColorBase
|
||||
btnPreviewTheme_BaseSec.BackColor = oThemeEngine.ColorBaseSecondary
|
||||
'Log Text
|
||||
lblPreviewTheme_Highlight.ForeColor = oThemeEngine.ColorHighlight
|
||||
lblPreviewTheme_Highlight.BackColor = oThemeEngine.ColorBaseSecondary
|
||||
'Menu Bar Text
|
||||
lblPreviewTheme_HighlightSecTop.ForeColor = oThemeEngine.ColorHighlightSecondary
|
||||
lblPreviewTheme_HighlightSecTop.BackColor = oThemeEngine.ColorBase
|
||||
'Status Bar Text
|
||||
lblPreviewTheme_HighlightSecBottom.ForeColor = oThemeEngine.ColorHighlightSecondary
|
||||
lblPreviewTheme_HighlightSecBottom.BackColor = oThemeEngine.ColorBase
|
||||
'Game Title Text
|
||||
lblPreviewTheme_HighlightSec.ForeColor = oThemeEngine.ColorHighlightSecondary
|
||||
lblPreviewTheme_HighlightSec.BackColor = oThemeEngine.ColorBase
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
@@ -49,6 +49,7 @@ Partial Class frmStartUpWizard
|
||||
Me.lblStep4Instructions = New System.Windows.Forms.Label()
|
||||
Me.btnNext = New System.Windows.Forms.Button()
|
||||
Me.btnBack = New System.Windows.Forms.Button()
|
||||
Me.lblStep2Warning = New System.Windows.Forms.Label()
|
||||
Me.tabWizard.SuspendLayout()
|
||||
Me.tbPage1.SuspendLayout()
|
||||
Me.tbPage2.SuspendLayout()
|
||||
@@ -125,6 +126,7 @@ Partial Class frmStartUpWizard
|
||||
'tbPage2
|
||||
'
|
||||
Me.tbPage2.BackColor = System.Drawing.SystemColors.Control
|
||||
Me.tbPage2.Controls.Add(Me.lblStep2Warning)
|
||||
Me.tbPage2.Controls.Add(Me.chkCreateFolder)
|
||||
Me.tbPage2.Controls.Add(Me.lblStep2Title)
|
||||
Me.tbPage2.Controls.Add(Me.lblStep2Instructions)
|
||||
@@ -162,7 +164,7 @@ Partial Class frmStartUpWizard
|
||||
'
|
||||
Me.lblStep2Instructions.Location = New System.Drawing.Point(14, 103)
|
||||
Me.lblStep2Instructions.Name = "lblStep2Instructions"
|
||||
Me.lblStep2Instructions.Size = New System.Drawing.Size(335, 50)
|
||||
Me.lblStep2Instructions.Size = New System.Drawing.Size(335, 44)
|
||||
Me.lblStep2Instructions.TabIndex = 6
|
||||
Me.lblStep2Instructions.Text = "GBM will store all your backup files along with a manifest database (gbm.s3db) in" &
|
||||
" this location. Any existing GBM data in this folder will be automatically impo" &
|
||||
@@ -318,6 +320,15 @@ Partial Class frmStartUpWizard
|
||||
Me.btnBack.TabIndex = 1
|
||||
Me.btnBack.Text = "&Back"
|
||||
Me.btnBack.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblStep2Warning
|
||||
'
|
||||
Me.lblStep2Warning.Location = New System.Drawing.Point(14, 147)
|
||||
Me.lblStep2Warning.Name = "lblStep2Warning"
|
||||
Me.lblStep2Warning.Size = New System.Drawing.Size(335, 33)
|
||||
Me.lblStep2Warning.TabIndex = 7
|
||||
Me.lblStep2Warning.Text = "You cannot return to this step after clicking Next. The Backup Location can be c" &
|
||||
"hanged any time once Setup is complete."
|
||||
'
|
||||
'frmStartUpWizard
|
||||
'
|
||||
@@ -331,7 +342,6 @@ Partial Class frmStartUpWizard
|
||||
Me.MaximizeBox = False
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmStartUpWizard"
|
||||
Me.ShowIcon = False
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
|
||||
Me.Text = "GBM Setup"
|
||||
Me.tabWizard.ResumeLayout(False)
|
||||
@@ -372,4 +382,5 @@ Partial Class frmStartUpWizard
|
||||
Friend WithEvents lblStep4Instructions2 As System.Windows.Forms.Label
|
||||
Friend WithEvents lblStep1Instructions2 As System.Windows.Forms.Label
|
||||
Friend WithEvents llbManual As System.Windows.Forms.LinkLabel
|
||||
Friend WithEvents lblStep2Warning As Label
|
||||
End Class
|
||||
|
||||
@@ -30,6 +30,7 @@ Public Class frmStartUpWizard
|
||||
Private Sub SetForm()
|
||||
'Set Form Name
|
||||
Me.Text = frmStartUpWizard_FormName
|
||||
Me.Icon = GBM_Icon
|
||||
|
||||
'Set Form Text
|
||||
btnNext.Text = frmStartUpWizard_btnNext
|
||||
@@ -41,6 +42,7 @@ Public Class frmStartUpWizard
|
||||
chkCreateFolder.Text = frmStartUpWizard_chkCreateFolder
|
||||
lblStep2Title.Text = frmStartUpWizard_lblStep2Title
|
||||
lblStep2Instructions.Text = frmStartUpWizard_lblStep2Instructions
|
||||
lblStep2Warning.Text = frmStartUpWizard_lblStep2Warning
|
||||
btnFolderBrowse.Text = frmStartUpWizard_btnFolderBrowse
|
||||
lblStep2Intro.Text = frmStartUpWizard_lblStep2Intro
|
||||
btnOpenWizard.Text = frmStartUpWizard_btnOpenWizard
|
||||
@@ -54,7 +56,8 @@ Public Class frmStartUpWizard
|
||||
lblStep4Instructions.Text = frmStartUpWizard_lblStep4Instructions
|
||||
|
||||
llbManual.Links.Add(0, 26, App_URLManual)
|
||||
LoadGameSettings()
|
||||
txtBackupPath.Text = oSettings.BackupFolder
|
||||
|
||||
StepHandler()
|
||||
End Sub
|
||||
|
||||
@@ -77,8 +80,6 @@ Public Class frmStartUpWizard
|
||||
btnNext.Enabled = True
|
||||
tabWizard.SelectTab(0)
|
||||
Case eSteps.Step2
|
||||
txtBackupPath.Text = oSettings.BackupFolder
|
||||
chkCreateFolder.Checked = oSettings.CreateSubFolder
|
||||
btnBack.Enabled = True
|
||||
btnNext.Enabled = True
|
||||
tabWizard.SelectTab(1)
|
||||
@@ -105,7 +106,7 @@ Public Class frmStartUpWizard
|
||||
End If
|
||||
|
||||
If mgrCommon.ShowMessage(frmStartUpWizard_ConfirmOfficialImport, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
If mgrMonitorList.DoImport(sImportURL, True, Settings, True) Then
|
||||
If mgrMonitorList.DoImport(sImportURL, True) Then
|
||||
oGameData = mgrMonitorList.ReadList(mgrMonitorList.eListTypes.FullList)
|
||||
mgrMonitorList.SyncMonitorLists(oSettings)
|
||||
End If
|
||||
@@ -140,18 +141,22 @@ Public Class frmStartUpWizard
|
||||
Return False
|
||||
End If
|
||||
|
||||
If Not Directory.Exists(strPath) Then
|
||||
sErrorMessage = frmStartUpWizard_ErrorNoFolderExists
|
||||
txtBackupPath.Focus()
|
||||
Return False
|
||||
End If
|
||||
|
||||
If Not Path.IsPathRooted(strPath) Then
|
||||
sErrorMessage = frmStartUpWizard_ErrorBadFolder
|
||||
txtBackupPath.Focus()
|
||||
Return False
|
||||
End If
|
||||
|
||||
If Not Directory.Exists(strPath) Then
|
||||
Try
|
||||
Directory.CreateDirectory(strPath)
|
||||
Catch ex As Exception
|
||||
sErrorMessage = frmStartUpWizard_ErrorNoFolderExists
|
||||
txtBackupPath.Focus()
|
||||
Return False
|
||||
End Try
|
||||
End If
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -211,7 +216,7 @@ Public Class frmStartUpWizard
|
||||
End If
|
||||
End If
|
||||
|
||||
sNewPath = mgrCommon.OpenFolderBrowser("Wizard_Backup_Path", frmStartUpWizard_BrowseFolder, sDefaultFolder, True, False)
|
||||
sNewPath = mgrCommon.OpenClassicFolderBrowser("Wizard_Backup_Path", frmStartUpWizard_BrowseFolder, sDefaultFolder, True, False)
|
||||
|
||||
If sNewPath <> String.Empty Then txtBackupPath.Text = sNewPath
|
||||
End Sub
|
||||
|
||||
@@ -34,6 +34,7 @@ Public Class frmSyncFields
|
||||
Private Sub SetForm()
|
||||
'Set Form Name
|
||||
Me.Text = frmSyncFields_FormName
|
||||
Me.Icon = GBM_Icon
|
||||
|
||||
'Set Form Text
|
||||
btnCancel.Text = frmSyncFields_btnCancel
|
||||
|
||||
@@ -150,7 +150,6 @@ Partial Class frmTags
|
||||
Me.MaximizeBox = False
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmTags"
|
||||
Me.ShowIcon = False
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Tags"
|
||||
Me.grpTag.ResumeLayout(False)
|
||||
|
||||
@@ -267,6 +267,7 @@ Public Class frmTags
|
||||
Private Sub SetForm()
|
||||
'Set Form Name
|
||||
Me.Text = frmTags_FormName
|
||||
Me.Icon = GBM_Icon
|
||||
|
||||
'Set Form Text
|
||||
grpTag.Text = frmTags_grpTag
|
||||
|
||||
@@ -181,7 +181,6 @@ Partial Class frmVariableManager
|
||||
Me.MaximizeBox = False
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmVariableManager"
|
||||
Me.ShowIcon = False
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Custom Variable Manager"
|
||||
Me.grpVariable.ResumeLayout(False)
|
||||
|
||||
@@ -54,7 +54,7 @@ Public Class frmVariableManager
|
||||
End If
|
||||
End If
|
||||
|
||||
sNewPath = mgrCommon.OpenFolderBrowser("VM_Path", frmVariableManager_PathBrowse, sDefaultFolder, False, False)
|
||||
sNewPath = mgrCommon.OpenFolderBrowser("VM_Path", frmVariableManager_PathBrowse, sDefaultFolder, False)
|
||||
|
||||
If sNewPath <> String.Empty Then txtPath.Text = sNewPath
|
||||
End Sub
|
||||
@@ -289,12 +289,19 @@ Public Class frmVariableManager
|
||||
Return False
|
||||
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
|
||||
End Function
|
||||
|
||||
Private Sub SetForm()
|
||||
'Set Form Name
|
||||
Me.Text = frmVariableManager_FormName
|
||||
Me.Icon = GBM_Icon
|
||||
|
||||
'Set Form Text
|
||||
btnCancel.Text = frmVariableManager_btnCancel
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class frmWineConfiguration
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Form overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Required by the Windows Form Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Windows Form Designer
|
||||
'It can be modified using the Windows Form Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.grpWineConfig = New System.Windows.Forms.GroupBox()
|
||||
Me.txtWineSavePath = New System.Windows.Forms.TextBox()
|
||||
Me.txtWinePrefix = New System.Windows.Forms.TextBox()
|
||||
Me.txtWineBinaryPath = New System.Windows.Forms.TextBox()
|
||||
Me.lblWinePrefix = New System.Windows.Forms.Label()
|
||||
Me.lblWineSavePath = New System.Windows.Forms.Label()
|
||||
Me.lblWineBinaryPath = New System.Windows.Forms.Label()
|
||||
Me.btnSave = New System.Windows.Forms.Button()
|
||||
Me.btnCancel = New System.Windows.Forms.Button()
|
||||
Me.grpWineConfig.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'grpWineConfig
|
||||
'
|
||||
Me.grpWineConfig.Controls.Add(Me.txtWineSavePath)
|
||||
Me.grpWineConfig.Controls.Add(Me.txtWinePrefix)
|
||||
Me.grpWineConfig.Controls.Add(Me.txtWineBinaryPath)
|
||||
Me.grpWineConfig.Controls.Add(Me.lblWinePrefix)
|
||||
Me.grpWineConfig.Controls.Add(Me.lblWineSavePath)
|
||||
Me.grpWineConfig.Controls.Add(Me.lblWineBinaryPath)
|
||||
Me.grpWineConfig.Location = New System.Drawing.Point(12, 12)
|
||||
Me.grpWineConfig.Name = "grpWineConfig"
|
||||
Me.grpWineConfig.Size = New System.Drawing.Size(460, 107)
|
||||
Me.grpWineConfig.TabIndex = 0
|
||||
Me.grpWineConfig.TabStop = False
|
||||
Me.grpWineConfig.Text = "Configuration"
|
||||
'
|
||||
'txtWineSavePath
|
||||
'
|
||||
Me.txtWineSavePath.Location = New System.Drawing.Point(76, 75)
|
||||
Me.txtWineSavePath.Name = "txtWineSavePath"
|
||||
Me.txtWineSavePath.Size = New System.Drawing.Size(367, 20)
|
||||
Me.txtWineSavePath.TabIndex = 5
|
||||
'
|
||||
'txtWinePrefix
|
||||
'
|
||||
Me.txtWinePrefix.Location = New System.Drawing.Point(76, 49)
|
||||
Me.txtWinePrefix.Name = "txtWinePrefix"
|
||||
Me.txtWinePrefix.Size = New System.Drawing.Size(367, 20)
|
||||
Me.txtWinePrefix.TabIndex = 3
|
||||
'
|
||||
'txtWineBinaryPath
|
||||
'
|
||||
Me.txtWineBinaryPath.Location = New System.Drawing.Point(76, 23)
|
||||
Me.txtWineBinaryPath.Name = "txtWineBinaryPath"
|
||||
Me.txtWineBinaryPath.Size = New System.Drawing.Size(367, 20)
|
||||
Me.txtWineBinaryPath.TabIndex = 1
|
||||
'
|
||||
'lblWinePrefix
|
||||
'
|
||||
Me.lblWinePrefix.AutoSize = True
|
||||
Me.lblWinePrefix.Location = New System.Drawing.Point(6, 52)
|
||||
Me.lblWinePrefix.Name = "lblWinePrefix"
|
||||
Me.lblWinePrefix.Size = New System.Drawing.Size(36, 13)
|
||||
Me.lblWinePrefix.TabIndex = 2
|
||||
Me.lblWinePrefix.Text = "Prefix:"
|
||||
'
|
||||
'lblWineSavePath
|
||||
'
|
||||
Me.lblWineSavePath.AutoSize = True
|
||||
Me.lblWineSavePath.Location = New System.Drawing.Point(6, 78)
|
||||
Me.lblWineSavePath.Name = "lblWineSavePath"
|
||||
Me.lblWineSavePath.Size = New System.Drawing.Size(60, 13)
|
||||
Me.lblWineSavePath.TabIndex = 4
|
||||
Me.lblWineSavePath.Text = "Save Path:"
|
||||
'
|
||||
'lblWineBinaryPath
|
||||
'
|
||||
Me.lblWineBinaryPath.AutoSize = True
|
||||
Me.lblWineBinaryPath.Location = New System.Drawing.Point(6, 26)
|
||||
Me.lblWineBinaryPath.Name = "lblWineBinaryPath"
|
||||
Me.lblWineBinaryPath.Size = New System.Drawing.Size(64, 13)
|
||||
Me.lblWineBinaryPath.TabIndex = 0
|
||||
Me.lblWineBinaryPath.Text = "Binary Path:"
|
||||
'
|
||||
'btnSave
|
||||
'
|
||||
Me.btnSave.Location = New System.Drawing.Point(316, 125)
|
||||
Me.btnSave.Name = "btnSave"
|
||||
Me.btnSave.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnSave.TabIndex = 1
|
||||
Me.btnSave.Text = "&Save"
|
||||
Me.btnSave.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnCancel
|
||||
'
|
||||
Me.btnCancel.Location = New System.Drawing.Point(397, 125)
|
||||
Me.btnCancel.Name = "btnCancel"
|
||||
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnCancel.TabIndex = 2
|
||||
Me.btnCancel.Text = "&Cancel"
|
||||
Me.btnCancel.UseVisualStyleBackColor = True
|
||||
'
|
||||
'frmWineConfiguration
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(484, 161)
|
||||
Me.Controls.Add(Me.btnCancel)
|
||||
Me.Controls.Add(Me.btnSave)
|
||||
Me.Controls.Add(Me.grpWineConfig)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||
Me.MaximizeBox = False
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmWineConfiguration"
|
||||
Me.ShowIcon = False
|
||||
Me.ShowInTaskbar = False
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
|
||||
Me.Text = "Wine Configuration"
|
||||
Me.grpWineConfig.ResumeLayout(False)
|
||||
Me.grpWineConfig.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents grpWineConfig As GroupBox
|
||||
Friend WithEvents txtWineSavePath As TextBox
|
||||
Friend WithEvents txtWinePrefix As TextBox
|
||||
Friend WithEvents txtWineBinaryPath As TextBox
|
||||
Friend WithEvents lblWinePrefix As Label
|
||||
Friend WithEvents lblWineSavePath As Label
|
||||
Friend WithEvents lblWineBinaryPath As Label
|
||||
Friend WithEvents btnSave As Button
|
||||
Friend WithEvents btnCancel As Button
|
||||
End Class
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,101 @@
|
||||
Imports GBM.My.Resources
|
||||
|
||||
Public Class frmWineConfiguration
|
||||
Private oSettings As mgrSettings
|
||||
Private sMonitorID As String
|
||||
|
||||
Property Settings As mgrSettings
|
||||
Get
|
||||
Return oSettings
|
||||
End Get
|
||||
Set(value As mgrSettings)
|
||||
oSettings = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property MonitorID As String
|
||||
Get
|
||||
Return sMonitorID
|
||||
End Get
|
||||
Set(value As String)
|
||||
sMonitorID = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Sub SetForm()
|
||||
'Set Form Name
|
||||
Me.Text = frmWineConfiguration_FormName
|
||||
Me.Icon = GBM_Icon
|
||||
|
||||
'Set Form Text
|
||||
grpWineConfig.Text = frmWineConfiguration_grpWineConfig
|
||||
lblWineBinaryPath.Text = frmWineConfiguration_lblWineBinaryPath
|
||||
lblWinePrefix.Text = frmWineConfiguration_lblWinePrefix
|
||||
lblWineSavePath.Text = frmWineConfiguration_lblWineSavePath
|
||||
btnSave.Text = frmWineConfiguration_btnSave
|
||||
btnCancel.Text = frmWineConfiguration_btnCancel
|
||||
End Sub
|
||||
|
||||
Private Sub LoadData()
|
||||
Dim oWineData As New clsWineData
|
||||
oWineData = mgrWineData.DoWineDataGetbyID(sMonitorID)
|
||||
txtWineBinaryPath.Text = oWineData.BinaryPath
|
||||
txtWinePrefix.Text = oWineData.Prefix
|
||||
txtWineSavePath.Text = oWineData.SavePath
|
||||
End Sub
|
||||
|
||||
Private Sub HandleWarning()
|
||||
If Not (oSettings.SuppressMessages And mgrSettings.eSuppressMessages.WineConfig) = mgrSettings.eSuppressMessages.WineConfig Then
|
||||
mgrCommon.ShowMessage(frmWineConfiguration_WarningSingle, MsgBoxStyle.Information)
|
||||
oSettings.SuppressMessages = oSettings.SetMessageField(oSettings.SuppressMessages, mgrSettings.eSuppressMessages.WineConfig)
|
||||
oSettings.SaveSettings()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function ValidateData() As Boolean
|
||||
If txtWineBinaryPath.Text = String.Empty Then
|
||||
mgrCommon.ShowMessage(frmWineConfiguration_ErrorValidationBinaryPath, MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
End If
|
||||
|
||||
If txtWinePrefix.Text = String.Empty Then
|
||||
mgrCommon.ShowMessage(frmWineConfiguration_ErrorValidationPrefix, MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
End If
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub SaveData()
|
||||
Dim oWineData As clsWineData
|
||||
If txtWineBinaryPath.Text = String.Empty And txtWinePrefix.Text = String.Empty And txtWineSavePath.Text = String.Empty Then
|
||||
mgrWineData.DoWineDataDelete(sMonitorID)
|
||||
Me.DialogResult = DialogResult.OK
|
||||
Else
|
||||
If ValidateData() Then
|
||||
oWineData = New clsWineData
|
||||
oWineData.MonitorID = sMonitorID
|
||||
oWineData.BinaryPath = txtWineBinaryPath.Text
|
||||
oWineData.Prefix = txtWinePrefix.Text
|
||||
oWineData.SavePath = txtWineSavePath.Text
|
||||
mgrWineData.DoWineDataAddUpdate(oWineData)
|
||||
Me.DialogResult = DialogResult.OK
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub frmAdvancedConfiguration_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
SetForm()
|
||||
LoadData()
|
||||
HandleWarning()
|
||||
End Sub
|
||||
|
||||
Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click
|
||||
SaveData()
|
||||
End Sub
|
||||
|
||||
Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click
|
||||
Me.DialogResult = DialogResult.Cancel
|
||||
End Sub
|
||||
End Class
|
||||
@@ -123,6 +123,8 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Classes\clsGameProcess.vb" />
|
||||
<Compile Include="Managers\mgrThemeEngine.vb" />
|
||||
<Compile Include="Classes\clsWineData.vb" />
|
||||
<Compile Include="Classes\clsProcess.vb" />
|
||||
<Compile Include="Classes\clsGameFilter.vb" />
|
||||
<Compile Include="Classes\clsGameFilterField.vb" />
|
||||
@@ -137,6 +139,12 @@
|
||||
<Compile Include="Classes\clsBackup.vb" />
|
||||
<Compile Include="Classes\clsGame.vb" />
|
||||
<Compile Include="Classes\clsTag.vb" />
|
||||
<Compile Include="Forms\frmWineConfiguration.Designer.vb">
|
||||
<DependentUpon>frmWineConfiguration.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\frmWineConfiguration.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\frmAdvancedImport.Designer.vb">
|
||||
<DependentUpon>frmAdvancedImport.vb</DependentUpon>
|
||||
</Compile>
|
||||
@@ -247,6 +255,7 @@
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Managers\mgrGameProcesses.vb" />
|
||||
<Compile Include="Managers\mgrWineData.vb" />
|
||||
<Compile Include="Managers\mgrProcess.vb" />
|
||||
<Compile Include="Managers\mgrCommon.vb" />
|
||||
<Compile Include="Managers\mgrGameTags.vb" />
|
||||
@@ -281,6 +290,9 @@
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Forms\frmWineConfiguration.resx">
|
||||
<DependentUpon>frmWineConfiguration.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\frmAdvancedImport.resx">
|
||||
<DependentUpon>frmAdvancedImport.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
License for use and distribution
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Copyright (C) 1999-2018 Igor Pavlov.
|
||||
Copyright (C) 1999-2019 Igor Pavlov.
|
||||
|
||||
7-Zip Extra files are under the GNU LGPL license.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
GBM - Game Backup Monitor
|
||||
Copyright (C) 2016 Michael J. Seiferling
|
||||
Game Backup Monitor
|
||||
Copyright (C) 2014 - 2019 Michael J. Seiferling and Game Backup Monitor contributors
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -42,7 +42,7 @@ Public Class mgrBackup
|
||||
'Create manifest item
|
||||
oItem.MonitorID = oGameInfo.ID
|
||||
'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.UpdatedBy = My.Computer.Name
|
||||
oItem.CheckSum = sCheckSum
|
||||
@@ -66,7 +66,7 @@ Public Class mgrBackup
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub BuildFileList(ByVal sBackupPath As String, ByVal sList As String, ByVal sPath As String)
|
||||
Private Sub BuildFileList(ByVal sList As String, ByVal sPath As String)
|
||||
Dim oStream As StreamWriter
|
||||
|
||||
Try
|
||||
@@ -75,7 +75,7 @@ Public Class mgrBackup
|
||||
Using oStream
|
||||
If sList <> String.Empty Then
|
||||
For Each sTypeItem As String In sList.Split(":")
|
||||
oStream.WriteLine("""" & sBackupPath & Path.DirectorySeparatorChar & sTypeItem & """")
|
||||
oStream.WriteLine("""" & sTypeItem & """")
|
||||
Next
|
||||
End If
|
||||
oStream.Flush()
|
||||
@@ -118,35 +118,74 @@ Public Class mgrBackup
|
||||
Dim sSavePath As String
|
||||
Dim sOverwriteMessage As String
|
||||
Dim lAvailableSpace As Long
|
||||
Dim lFolderSize As Long
|
||||
Dim lFolderSize As Long = 0
|
||||
Dim sDeepFolder As String
|
||||
Dim bRegistry As Boolean
|
||||
Dim sExtension As String
|
||||
|
||||
If oSettings.CreateSubFolder Then sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame)
|
||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame) & ".7z"
|
||||
'Check if this is a registry backup
|
||||
bRegistry = mgrPath.IsSupportedRegistryPath(oGame.TruePath)
|
||||
|
||||
'Verify saved game path
|
||||
sSavePath = VerifySavePath(oGame)
|
||||
|
||||
'Calculate space
|
||||
lAvailableSpace = mgrCommon.GetAvailableDiskSpace(oSettings.BackupFolder)
|
||||
lFolderSize = mgrCommon.GetFolderSize(sSavePath, oGame.IncludeArray, oGame.ExcludeArray)
|
||||
|
||||
'Show Available Space
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrCommon_AvailableDiskSpace, mgrCommon.FormatDiskSpace(lAvailableSpace)), False, ToolTipIcon.Info, True)
|
||||
|
||||
'Show Save Folder Size
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrCommon_SavedGameFolderSize, New String() {oGame.Name, mgrCommon.FormatDiskSpace(lFolderSize)}), False, ToolTipIcon.Info, True)
|
||||
|
||||
If lFolderSize >= lAvailableSpace Then
|
||||
If mgrCommon.ShowMessage(mgrBackup_ConfirmDiskSpace, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
RaiseEvent UpdateLog(mgrBackup_ErrorDiskSpace, False, ToolTipIcon.Error, True)
|
||||
If bRegistry Then
|
||||
'If this is a registry backup, we need to have elevated permissions in Windows to use reg.exe
|
||||
If Not mgrCommon.IsUnix And Not mgrCommon.IsElevated Then
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorRegBackupElevation, oGame.Name), False, ToolTipIcon.Info, True)
|
||||
Return False
|
||||
End If
|
||||
sExtension = ".reg"
|
||||
Else
|
||||
'Verify saved game path
|
||||
sSavePath = VerifySavePath(oGame)
|
||||
|
||||
'Check if disk space check should be disabled (UNC path or Setting)
|
||||
If Not mgrPath.IsPathUNC(oSettings.BackupFolder) And Not Settings.DisableDiskSpaceCheck Then
|
||||
'Calculate space
|
||||
lAvailableSpace = mgrCommon.GetAvailableDiskSpace(oSettings.BackupFolder)
|
||||
|
||||
'If any includes are using a deep path and we aren't using recursion, we need to go directly to folders to do file size calculations or they will be missed.
|
||||
If Not oGame.RecurseSubFolders Then
|
||||
For Each s As String In oGame.IncludeArray
|
||||
If s.Contains(Path.DirectorySeparatorChar) Then
|
||||
sDeepFolder = Path.GetDirectoryName(sSavePath & Path.DirectorySeparatorChar & s)
|
||||
If Directory.Exists(sDeepFolder) Then
|
||||
lFolderSize += mgrCommon.GetFolderSize(sDeepFolder, oGame.IncludeArray, oGame.ExcludeArray, oGame.RecurseSubFolders)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
lFolderSize += mgrCommon.GetFolderSize(sSavePath, oGame.IncludeArray, oGame.ExcludeArray, oGame.RecurseSubFolders)
|
||||
|
||||
'Show Available Space
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrCommon_AvailableDiskSpace, mgrCommon.FormatDiskSpace(lAvailableSpace)), False, ToolTipIcon.Info, True)
|
||||
|
||||
'Show Save Folder Size
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrCommon_SavedGameFolderSize, New String() {oGame.Name, mgrCommon.FormatDiskSpace(lFolderSize)}), False, ToolTipIcon.Info, True)
|
||||
|
||||
If lFolderSize >= lAvailableSpace Then
|
||||
If mgrCommon.ShowMessage(mgrBackup_ConfirmDiskSpace, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
RaiseEvent UpdateLog(mgrBackup_ErrorDiskSpace, False, ToolTipIcon.Error, True)
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
'Show that disk space check was skipped due to UNC path
|
||||
If Not Settings.DisableDiskSpaceCheck Then RaiseEvent UpdateLog(mgrBackup_ErrorBackupPathIsUNC, False, ToolTipIcon.Info, True)
|
||||
End If
|
||||
|
||||
sExtension = ".7z"
|
||||
End If
|
||||
|
||||
If mgrRestore.CheckManifest(oGame.ID) Then
|
||||
If mgrCommon.ShowMessage(mgrBackup_ConfirmManifestConflict, oGame.Name, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
RaiseEvent UpdateLog(mgrBackup_ErrorManifestConflict, False, ToolTipIcon.Error, True)
|
||||
Return False
|
||||
If oSettings.CreateSubFolder Then sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame)
|
||||
|
||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame) & sExtension
|
||||
|
||||
'A manifest check is only required when "Save Multiple Backups" is disabled
|
||||
If Not oGame.AppendTimeStamp Then
|
||||
If mgrRestore.CheckManifest(oGame.ID) Then
|
||||
If mgrCommon.ShowMessage(mgrBackup_ConfirmManifestConflict, oGame.Name, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
RaiseEvent UpdateLog(mgrBackup_ErrorManifestConflict, False, ToolTipIcon.Error, True)
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -163,7 +202,7 @@ Public Class mgrBackup
|
||||
End If
|
||||
End If
|
||||
|
||||
Return True
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub CheckOldBackups(ByVal oGame As clsGame)
|
||||
@@ -193,24 +232,241 @@ Public Class mgrBackup
|
||||
End If
|
||||
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
|
||||
|
||||
Private Function RunRegistryBackup(ByVal oGame As clsGame, ByVal sBackupFile As String) As Boolean
|
||||
Dim prsReg As New Process
|
||||
Dim sBinaryPath As String
|
||||
Dim sArguments As String
|
||||
Dim oWineData As clsWineData
|
||||
Dim sWineReg As String
|
||||
Dim bPathVerified As Boolean = False
|
||||
Dim bBackupCompleted As Boolean = False
|
||||
|
||||
sArguments = "export """ & oGame.TruePath & """ """ & sBackupFile & """ /y"
|
||||
|
||||
If mgrCommon.IsUnix Then
|
||||
oWineData = mgrWineData.DoWineDataGetbyID(oGame.ID)
|
||||
prsReg.StartInfo.EnvironmentVariables.Add("WINEPREFIX", oWineData.Prefix)
|
||||
sBinaryPath = oWineData.BinaryPath & Path.DirectorySeparatorChar & "wine"
|
||||
sWineReg = oWineData.Prefix & Path.DirectorySeparatorChar & "drive_c/windows/system32/reg.exe"
|
||||
sArguments = """" & sWineReg & """ " & sArguments
|
||||
If File.Exists(sBinaryPath) Then
|
||||
If File.Exists(sWineReg) Then
|
||||
bPathVerified = True
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorRegNotFound, sWineReg), False, ToolTipIcon.Error, True)
|
||||
End If
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorWineNotFound, sBinaryPath), False, ToolTipIcon.Error, True)
|
||||
End If
|
||||
Else
|
||||
sBinaryPath = Environment.GetFolderPath(Environment.SpecialFolder.Windows) & Path.DirectorySeparatorChar & "system32\reg.exe"
|
||||
If File.Exists(sBinaryPath) Then
|
||||
bPathVerified = True
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorRegNotFound, sBinaryPath), False, ToolTipIcon.Error, True)
|
||||
End If
|
||||
End If
|
||||
|
||||
If bPathVerified Then
|
||||
Try
|
||||
prsReg.StartInfo.Arguments = sArguments
|
||||
prsReg.StartInfo.FileName = sBinaryPath
|
||||
prsReg.StartInfo.UseShellExecute = False
|
||||
prsReg.StartInfo.RedirectStandardOutput = True
|
||||
prsReg.StartInfo.CreateNoWindow = True
|
||||
prsReg.Start()
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_BackupInProgress, oGame.TruePath), False, ToolTipIcon.Info, True)
|
||||
While Not prsReg.StandardOutput.EndOfStream
|
||||
If CancelOperation Then
|
||||
prsReg.Kill()
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorFullAbort, oGame.Name), True, ToolTipIcon.Error, True)
|
||||
Exit While
|
||||
End If
|
||||
RaiseEvent UpdateLog(prsReg.StandardOutput.ReadLine, False, ToolTipIcon.Info, False)
|
||||
End While
|
||||
prsReg.WaitForExit()
|
||||
Select Case prsReg.ExitCode
|
||||
Case 0
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_BackupComplete, New String() {oGame.Name, mgrCommon.FormatDiskSpace(mgrCommon.GetFileSize(sBackupFile))}), False, ToolTipIcon.Info, True)
|
||||
bBackupCompleted = True
|
||||
Case Else
|
||||
RaiseEvent UpdateLog(mgrBackup_ErrorRegBackupFailed, False, ToolTipIcon.Info, True)
|
||||
End Select
|
||||
prsReg.Dispose()
|
||||
Catch ex As Exception
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorOtherFailure, New String() {oGame.Name, ex.Message}), False, ToolTipIcon.Error, True)
|
||||
End Try
|
||||
End If
|
||||
|
||||
Return bBackupCompleted
|
||||
End Function
|
||||
|
||||
Private Function Run7zBackup(ByVal oGame As clsGame, ByVal sBackupFile As String) As Boolean
|
||||
Dim prs7z As New Process
|
||||
Dim sSavePath As String
|
||||
Dim sArguments As String
|
||||
Dim bBackupCompleted As Boolean = False
|
||||
|
||||
sSavePath = VerifySavePath(oGame)
|
||||
|
||||
If oGame.FolderSave = True Then
|
||||
BuildFileList("*", mgrPath.IncludeFileLocation)
|
||||
Else
|
||||
BuildFileList(oGame.FileType, mgrPath.IncludeFileLocation)
|
||||
End If
|
||||
|
||||
BuildFileList(oGame.ExcludeList, mgrPath.ExcludeFileLocation)
|
||||
|
||||
sArguments = "a" & oSettings.Prepared7zArguments & "-t7z -mx" & oSettings.CompressionLevel & " -i@""" & mgrPath.IncludeFileLocation & """ -x@""" & mgrPath.ExcludeFileLocation & """ """ & sBackupFile & """"
|
||||
|
||||
If oGame.RecurseSubFolders Then sArguments &= " -r"
|
||||
|
||||
Try
|
||||
If Directory.Exists(sSavePath) Then
|
||||
If Settings.Is7zUtilityValid Then
|
||||
'Need to delete any prior archive if it exists, the 7za utility does not support overwriting or deleting existing archives.
|
||||
'If we let 7za update existing archives it will lead to excessive bloat with games that routinely add and remove files with many different file names.
|
||||
If File.Exists(sBackupFile) Then
|
||||
File.Delete(sBackupFile)
|
||||
End If
|
||||
|
||||
prs7z.StartInfo.Arguments = sArguments
|
||||
prs7z.StartInfo.FileName = oSettings.Utility7zLocation
|
||||
prs7z.StartInfo.WorkingDirectory = sSavePath
|
||||
prs7z.StartInfo.UseShellExecute = False
|
||||
prs7z.StartInfo.RedirectStandardOutput = True
|
||||
prs7z.StartInfo.CreateNoWindow = True
|
||||
prs7z.Start()
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_BackupInProgress, sSavePath), False, ToolTipIcon.Info, True)
|
||||
While Not prs7z.StandardOutput.EndOfStream
|
||||
If CancelOperation Then
|
||||
prs7z.Kill()
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorFullAbort, oGame.Name), True, ToolTipIcon.Error, True)
|
||||
Exit While
|
||||
End If
|
||||
RaiseEvent UpdateLog(prs7z.StandardOutput.ReadLine, False, ToolTipIcon.Info, False)
|
||||
End While
|
||||
prs7z.WaitForExit()
|
||||
If Not CancelOperation Then
|
||||
Select Case prs7z.ExitCode
|
||||
Case 0
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_BackupComplete, New String() {oGame.Name, mgrCommon.FormatDiskSpace(mgrCommon.GetFileSize(sBackupFile))}), False, ToolTipIcon.Info, True)
|
||||
bBackupCompleted = True
|
||||
Case 1
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_7zWarnings, oGame.Name), True, ToolTipIcon.Warning, True)
|
||||
bBackupCompleted = True
|
||||
Case 2
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_7zFatalError, oGame.Name), True, ToolTipIcon.Error, True)
|
||||
Case 7
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_7zCommandFailure, oGame.Name), True, ToolTipIcon.Error, True)
|
||||
End Select
|
||||
End If
|
||||
prs7z.Dispose()
|
||||
Else
|
||||
RaiseEvent UpdateLog(App_Invalid7zDetected, True, ToolTipIcon.Error, True)
|
||||
End If
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorNoSavePath, oGame.Name), True, ToolTipIcon.Error, True)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorOtherFailure, New String() {oGame.Name, ex.Message}), False, ToolTipIcon.Error, True)
|
||||
End Try
|
||||
|
||||
Return bBackupCompleted
|
||||
End Function
|
||||
|
||||
Public Sub DoBackup(ByVal oBackupList As List(Of clsGame))
|
||||
Dim oGame As clsGame
|
||||
Dim bDoBackup As Boolean
|
||||
Dim bBackupCompleted As Boolean
|
||||
Dim prs7z As Process
|
||||
Dim sBackupFile As String
|
||||
Dim sSavePath As String
|
||||
Dim sBackupExt As String
|
||||
Dim dTimeStamp As DateTime
|
||||
Dim sTimeStamp As String
|
||||
Dim sHash As String
|
||||
Dim bBackupCompleted As Boolean
|
||||
|
||||
For Each oGame In oBackupList
|
||||
'Init
|
||||
prs7z = New Process
|
||||
sBackupFile = oSettings.BackupFolder
|
||||
sSavePath = String.Empty
|
||||
dTimeStamp = Date.Now
|
||||
sTimeStamp = " " & dTimeStamp.Month & "-" & dTimeStamp.Day & "-" & dTimeStamp.Year & "-" & dTimeStamp.Hour & "-" & dTimeStamp.Minute & "-" & dTimeStamp.Second
|
||||
sTimeStamp = BuildFileTimeStamp(dTimeStamp)
|
||||
sHash = String.Empty
|
||||
bDoBackup = True
|
||||
bBackupCompleted = False
|
||||
@@ -219,105 +475,45 @@ Public Class mgrBackup
|
||||
|
||||
If oSettings.CreateSubFolder Then
|
||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame)
|
||||
Try
|
||||
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
|
||||
bDoBackup = HandleSubFolder(oGame, sBackupFile)
|
||||
End If
|
||||
|
||||
If mgrPath.IsSupportedRegistryPath(oGame.TruePath) Then
|
||||
sBackupExt = ".reg"
|
||||
Else
|
||||
sBackupExt = ".7z"
|
||||
End If
|
||||
|
||||
If oGame.AppendTimeStamp Then
|
||||
If oGame.BackupLimit > 0 Then CheckOldBackups(oGame)
|
||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame) & sTimeStamp & ".7z"
|
||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame) & sTimeStamp & sBackupExt
|
||||
Else
|
||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame) & ".7z"
|
||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame) & sBackupExt
|
||||
End If
|
||||
|
||||
If bDoBackup Then
|
||||
|
||||
sSavePath = VerifySavePath(oGame)
|
||||
|
||||
If oGame.FolderSave = True Then
|
||||
BuildFileList(sSavePath, "*", mgrPath.IncludeFileLocation)
|
||||
'Choose Backup Type
|
||||
If mgrPath.IsSupportedRegistryPath(oGame.TruePath) Then
|
||||
bBackupCompleted = RunRegistryBackup(oGame, sBackupFile)
|
||||
Else
|
||||
BuildFileList(sSavePath, oGame.FileType, mgrPath.IncludeFileLocation)
|
||||
bBackupCompleted = Run7zBackup(oGame, sBackupFile)
|
||||
End If
|
||||
|
||||
BuildFileList(sSavePath, oGame.ExcludeList, mgrPath.ExcludeFileLocation)
|
||||
'Write Main Manifest
|
||||
If bBackupCompleted Then
|
||||
'Generate checksum for new backup
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_GenerateHash, oGame.Name), False, ToolTipIcon.Info, True)
|
||||
sHash = mgrHash.Generate_SHA256_Hash(sBackupFile)
|
||||
|
||||
Try
|
||||
If Directory.Exists(sSavePath) Then
|
||||
If Settings.Is7zUtilityValid Then
|
||||
'Need to delete any prior archive if it exists, the 7za utility does not support overwriting or deleting existing archives.
|
||||
'If we let 7za update existing archives it will lead to excessive bloat with games that routinely add and remove files with many different file names.
|
||||
If File.Exists(sBackupFile) Then
|
||||
File.Delete(sBackupFile)
|
||||
End If
|
||||
|
||||
prs7z.StartInfo.Arguments = "a" & oSettings.Prepared7zArguments & "-t7z -mx" & oSettings.CompressionLevel & " -i@""" & mgrPath.IncludeFileLocation & """ -x@""" & mgrPath.ExcludeFileLocation & """ """ & sBackupFile & """ -r"
|
||||
prs7z.StartInfo.FileName = oSettings.Utility7zLocation
|
||||
prs7z.StartInfo.UseShellExecute = False
|
||||
prs7z.StartInfo.RedirectStandardOutput = True
|
||||
prs7z.StartInfo.CreateNoWindow = True
|
||||
prs7z.Start()
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_BackupInProgress, sSavePath), False, ToolTipIcon.Info, True)
|
||||
While Not prs7z.StandardOutput.EndOfStream
|
||||
If CancelOperation Then
|
||||
prs7z.Kill()
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorFullAbort, oGame.Name), True, ToolTipIcon.Error, True)
|
||||
Exit While
|
||||
End If
|
||||
RaiseEvent UpdateLog(prs7z.StandardOutput.ReadLine, False, ToolTipIcon.Info, False)
|
||||
End While
|
||||
prs7z.WaitForExit()
|
||||
If Not CancelOperation Then
|
||||
Select Case prs7z.ExitCode
|
||||
Case 0
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_BackupComplete, New String() {oGame.Name, mgrCommon.FormatDiskSpace(mgrCommon.GetFileSize(sBackupFile))}), False, ToolTipIcon.Info, True)
|
||||
bBackupCompleted = True
|
||||
Case 1
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_7zWarnings, oGame.Name), True, ToolTipIcon.Warning, True)
|
||||
bBackupCompleted = True
|
||||
Case 2
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_7zFatalError, oGame.Name), True, ToolTipIcon.Error, True)
|
||||
bBackupCompleted = False
|
||||
Case 7
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_7zCommandFailure, oGame.Name), True, ToolTipIcon.Error, True)
|
||||
bBackupCompleted = False
|
||||
End Select
|
||||
End If
|
||||
prs7z.Dispose()
|
||||
Else
|
||||
RaiseEvent UpdateLog(App_Invalid7zDetected, True, ToolTipIcon.Error, True)
|
||||
bBackupCompleted = False
|
||||
End If
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorNoSavePath, oGame.Name), True, ToolTipIcon.Error, True)
|
||||
bBackupCompleted = False
|
||||
If Not DoManifestUpdate(oGame, sBackupFile, dTimeStamp, sHash) Then
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorManifestFailure, oGame.Name), True, ToolTipIcon.Error, True)
|
||||
End If
|
||||
|
||||
'Write Main Manifest
|
||||
If bBackupCompleted Then
|
||||
|
||||
'Generate checksum for new backup
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_GenerateHash, oGame.Name), False, ToolTipIcon.Info, True)
|
||||
sHash = mgrHash.Generate_SHA256_Hash(sBackupFile)
|
||||
|
||||
If Not DoManifestUpdate(oGame, sBackupFile, dTimeStamp, sHash) Then
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorManifestFailure, oGame.Name), True, ToolTipIcon.Error, True)
|
||||
End If
|
||||
|
||||
'Write the process path if we have it
|
||||
If oGame.AbsolutePath = False Then
|
||||
mgrMonitorList.DoListUpdate(oGame)
|
||||
End If
|
||||
'Write the process path if we have it
|
||||
If oGame.AbsolutePath = False Then
|
||||
mgrMonitorList.DoListFieldUpdate("ProcessPath", oGame.ProcessPath, oGame.ID)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorOtherFailure, New String() {oGame.Name, ex.Message}), False, ToolTipIcon.Error, True)
|
||||
End Try
|
||||
End If
|
||||
End If
|
||||
|
||||
If bBackupCompleted Then
|
||||
|
||||
@@ -9,8 +9,8 @@ Imports System.Runtime.Serialization.Formatters.Binary
|
||||
Public Class mgrCommon
|
||||
|
||||
'These need to be updated when upgrading the packaged 7z utility
|
||||
Private Shared sUtility64Hash As String = "8BC2A3D6C37C4DB9BD487AD35039AE0DC8A1DDF2C3B1F0B76B3E678FEBB9F223" 'v18.05 7za.exe x64
|
||||
Private Shared sUtility32Hash As String = "77613CCA716EDF68B9D5BAB951463ED7FADE5BC0EC465B36190A76299C50F117" 'v18.05 7za.exe x86
|
||||
Private Shared sUtility64Hash As String = "8117E40EE7F824F63373A4F5625BB62749F69159D0C449B3CE2F35AAD3B83549" 'v19.00 7za.exe x64
|
||||
Private Shared sUtility32Hash As String = "EA308C76A2F927B160A143D94072B0DCE232E04B751F0C6432A94E05164E716D" 'v19.00 7za.exe x86
|
||||
|
||||
Public Shared ReadOnly Property UtilityHash As String
|
||||
Get
|
||||
@@ -43,26 +43,16 @@ Public Class mgrCommon
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'Source - https://stackoverflow.com/questions/18873152/deep-copy-of-ordereddictionary
|
||||
Public Shared Function GenericClone(ByVal oOriginal As Object) As Object
|
||||
'Construct a temporary memory stream
|
||||
Dim oStream As MemoryStream = New MemoryStream()
|
||||
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)
|
||||
|
||||
'Construct a serialization formatter that does all the hard work
|
||||
Dim oFormatter As BinaryFormatter = New BinaryFormatter()
|
||||
oImage = Image.FromFile(sPath)
|
||||
oReturnImage = New Bitmap(oImage, oImageSize)
|
||||
oImage.Dispose()
|
||||
|
||||
'This line Is explained in the "Streaming Contexts" section
|
||||
oFormatter.Context = New StreamingContext(StreamingContextStates.Clone)
|
||||
|
||||
'Serialize the object graph into the memory stream
|
||||
oFormatter.Serialize(oStream, oOriginal)
|
||||
|
||||
'Seek back to the start of the memory stream before deserializing
|
||||
oStream.Position = 0
|
||||
|
||||
'Deserialize the graph into a New set of objects
|
||||
'Return the root of the graph (deep copy) to the caller
|
||||
Return oFormatter.Deserialize(oStream)
|
||||
Return oReturnImage
|
||||
End Function
|
||||
|
||||
Public Shared Function IsAddress(ByVal sURL As String) As Boolean
|
||||
@@ -127,14 +117,14 @@ Public Class mgrCommon
|
||||
End If
|
||||
|
||||
Return fbBrowser.FileName
|
||||
End If
|
||||
End If
|
||||
|
||||
Return String.Empty
|
||||
Return String.Empty
|
||||
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,
|
||||
ByVal bMulti As Boolean, Optional ByVal bSavedPath As Boolean = True) As String
|
||||
Dim fbBrowser As New OpenFileDialog
|
||||
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, ByRef fbBrowser As OpenFileDialog, Optional ByVal bSavedPath As Boolean = True) As Boolean
|
||||
|
||||
Dim oSavedPath As New clsSavedPath
|
||||
|
||||
fbBrowser.Title = sTitle
|
||||
@@ -159,22 +149,87 @@ Public Class mgrCommon
|
||||
mgrSavedPath.AddUpdatePath(oSavedPath)
|
||||
End If
|
||||
|
||||
If bMulti Then
|
||||
Dim sFileNames As String = String.Empty
|
||||
For Each sFileName As String In fbBrowser.FileNames
|
||||
sFileNames &= sFileName & "|"
|
||||
Next
|
||||
sFileNames = sFileNames.TrimEnd("|")
|
||||
Return sFileNames
|
||||
Else
|
||||
Return fbBrowser.FileName
|
||||
Return True
|
||||
End If
|
||||
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Shared Function BuildFolderBrowser(ByVal sName As String, ByVal sTitle As String, ByVal sDefaultFolder As String, ByRef fbBrowser As OpenFileDialog, Optional ByVal bSavedPath As Boolean = True) As Boolean
|
||||
|
||||
Dim oSavedPath As New clsSavedPath
|
||||
|
||||
fbBrowser.Title = sTitle
|
||||
fbBrowser.InitialDirectory = sDefaultFolder
|
||||
fbBrowser.ValidateNames = False
|
||||
fbBrowser.CheckFileExists = False
|
||||
fbBrowser.CheckPathExists = True
|
||||
fbBrowser.FileName = mgrCommon_FolderSelection
|
||||
|
||||
If bSavedPath Then
|
||||
oSavedPath = mgrSavedPath.GetPathByName(sName)
|
||||
If oSavedPath.Path <> String.Empty Then
|
||||
If Directory.Exists(oSavedPath.Path) Then
|
||||
fbBrowser.InitialDirectory = oSavedPath.Path
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If fbBrowser.ShowDialog() = Windows.Forms.DialogResult.OK Then
|
||||
If bSavedPath Then
|
||||
oSavedPath.PathName = sName
|
||||
oSavedPath.Path = Path.GetDirectoryName(fbBrowser.FileName)
|
||||
mgrSavedPath.AddUpdatePath(oSavedPath)
|
||||
End If
|
||||
|
||||
Return True
|
||||
End If
|
||||
|
||||
Return False
|
||||
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,
|
||||
Optional ByVal bSavedPath As Boolean = True) As String
|
||||
Dim fbBrowser As New OpenFileDialog
|
||||
Dim bResult As Boolean
|
||||
|
||||
bResult = BuildFileBrowser(sName, sTitle, sExtension, sFileType, sDefaultFolder, False, fbBrowser, bSavedPath)
|
||||
|
||||
If bResult Then
|
||||
Return fbBrowser.FileName
|
||||
End If
|
||||
|
||||
Return String.Empty
|
||||
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 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, Optional ByVal bSavedPath As Boolean = True) As String
|
||||
Dim fbBrowser As New OpenFileDialog
|
||||
Dim bResult As Boolean
|
||||
|
||||
bResult = BuildFolderBrowser(sName, sTitle, sDefaultFolder, fbBrowser, bSavedPath)
|
||||
|
||||
If bResult Then
|
||||
Return Path.GetDirectoryName(fbBrowser.FileName)
|
||||
End If
|
||||
|
||||
Return String.Empty
|
||||
End Function
|
||||
|
||||
Public Shared Function OpenClassicFolderBrowser(ByVal sName As String, ByVal sTitle As String, ByVal sDefaultFolder As String, ByVal bEnableNewFolder As Boolean,
|
||||
Optional ByVal bSavedPath As Boolean = True) As String
|
||||
Dim fbBrowser As New FolderBrowserDialog
|
||||
Dim oSavedPath As New clsSavedPath
|
||||
@@ -213,7 +268,7 @@ Public Class mgrCommon
|
||||
If oGame.ProcessName.ToLower.Contains(s) Then bFound = True
|
||||
Next
|
||||
|
||||
If bFound Or oGame.Duplicate = True Then
|
||||
If bFound Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
@@ -228,6 +283,14 @@ Public Class mgrCommon
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Shared Function GetCurrentOS() As clsGame.eOS
|
||||
If IsUnix() Then
|
||||
Return clsGame.eOS.Linux
|
||||
Else
|
||||
Return clsGame.eOS.Windows
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function IsElevated() As Boolean
|
||||
Dim oID As WindowsIdentity = WindowsIdentity.GetCurrent
|
||||
Dim oPrincipal As New WindowsPrincipal(oID)
|
||||
@@ -262,8 +325,9 @@ Public Class mgrCommon
|
||||
|
||||
Public Shared Function WildcardToRegex(ByVal sPattern As String) As String
|
||||
Dim sRegEx As String
|
||||
sRegEx = sPattern.Replace("*", ".*")
|
||||
sRegEx = sRegEx.Replace("?", ".")
|
||||
sPattern = Regex.Escape(sPattern)
|
||||
sRegEx = sPattern.Replace("\*", ".*")
|
||||
sRegEx = sRegEx.Replace("\?", ".")
|
||||
Return sRegEx
|
||||
End Function
|
||||
|
||||
@@ -287,7 +351,7 @@ Public Class mgrCommon
|
||||
End Function
|
||||
|
||||
'Calculate the current size of a folder
|
||||
Public Shared Function GetFolderSize(ByVal sPath As String, ByVal sInclude As String(), ByVal sExclude As String()) As Long
|
||||
Public Shared Function GetFolderSize(ByVal sPath As String, ByVal sInclude As String(), ByVal sExclude As String(), Optional ByVal b7zStyleRecurse As Boolean = True) As Long
|
||||
Dim oFolder As DirectoryInfo
|
||||
Dim bInclude As Boolean
|
||||
Dim bExclude As Boolean
|
||||
@@ -300,14 +364,15 @@ Public Class mgrCommon
|
||||
|
||||
'Files
|
||||
For Each fi As FileInfo In oFolder.EnumerateFiles()
|
||||
|
||||
If sInclude.Length > 0 Then
|
||||
bInclude = CompareValueToArrayRegEx(fi.Name, sInclude) Or CompareValueToArrayRegEx(fi.DirectoryName, sInclude)
|
||||
bInclude = CompareValueToArrayRegEx(fi.FullName, sInclude)
|
||||
Else
|
||||
bInclude = True
|
||||
End If
|
||||
|
||||
If sExclude.Length > 0 Then
|
||||
bExclude = CompareValueToArrayRegEx(fi.Name, sExclude) Or CompareValueToArrayRegEx(fi.DirectoryName, sExclude)
|
||||
bExclude = CompareValueToArrayRegEx(fi.FullName, sExclude)
|
||||
Else
|
||||
bExclude = False
|
||||
End If
|
||||
@@ -320,16 +385,36 @@ Public Class mgrCommon
|
||||
'Sub Folders
|
||||
For Each di As DirectoryInfo In oFolder.EnumerateDirectories()
|
||||
If Not ((di.Attributes And FileAttributes.ReparsePoint) = FileAttributes.ReparsePoint) Then
|
||||
If sExclude.Length > 0 Then
|
||||
bExclude = CompareValueToArrayRegEx(di.Name, sExclude)
|
||||
If b7zStyleRecurse Then
|
||||
If sExclude.Length > 0 Then
|
||||
bExclude = CompareValueToArrayRegEx(di.FullName, sExclude)
|
||||
Else
|
||||
bExclude = False
|
||||
End If
|
||||
|
||||
If Not bExclude Then
|
||||
lSize += GetFolderSize(di.FullName, sInclude, sExclude)
|
||||
End If
|
||||
Else
|
||||
bExclude = False
|
||||
End If
|
||||
If Not bExclude Then
|
||||
lSize += GetFolderSize(di.FullName, sInclude, sExclude)
|
||||
If sInclude.Length > 0 Then
|
||||
bInclude = CompareValueToArrayRegEx(di.FullName, sInclude)
|
||||
Else
|
||||
bInclude = True
|
||||
End If
|
||||
|
||||
If sExclude.Length > 0 Then
|
||||
bExclude = CompareValueToArrayRegEx(di.FullName, sExclude)
|
||||
Else
|
||||
bExclude = False
|
||||
End If
|
||||
|
||||
If bInclude And Not bExclude Then
|
||||
lSize += GetFolderSize(di.FullName, sInclude, sExclude)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
Catch
|
||||
'Do Nothing
|
||||
End Try
|
||||
@@ -366,7 +451,7 @@ Public Class mgrCommon
|
||||
Try
|
||||
prsdf = New Process
|
||||
prsdf.StartInfo.FileName = "/bin/df"
|
||||
prsdf.StartInfo.Arguments = sPath
|
||||
prsdf.StartInfo.Arguments = """" & sPath & """"
|
||||
prsdf.StartInfo.UseShellExecute = False
|
||||
prsdf.StartInfo.RedirectStandardOutput = True
|
||||
prsdf.StartInfo.CreateNoWindow = True
|
||||
@@ -403,6 +488,21 @@ Public Class mgrCommon
|
||||
End If
|
||||
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
|
||||
Public Shared Sub DeleteFile(ByVal sPath As String, Optional ByVal bRecycle As Boolean = True)
|
||||
If File.Exists(sPath) Then
|
||||
@@ -429,6 +529,29 @@ Public Class mgrCommon
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Opens a file or folder in default application determined by the OS
|
||||
Public Shared Function OpenInOS(ByVal sFileName As String, ByVal sNotFoundError As String) As Boolean
|
||||
Dim oProcessStartInfo As ProcessStartInfo
|
||||
|
||||
If File.Exists(sFileName) Or Directory.Exists(sFileName) Then
|
||||
Try
|
||||
oProcessStartInfo = New ProcessStartInfo
|
||||
oProcessStartInfo.FileName = sFileName
|
||||
oProcessStartInfo.UseShellExecute = True
|
||||
oProcessStartInfo.Verb = "open"
|
||||
Process.Start(oProcessStartInfo)
|
||||
Catch ex As Exception
|
||||
mgrCommon.ShowMessage(App_ErrorLaunchExternal, ex.Message, MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
End Try
|
||||
Else
|
||||
mgrCommon.ShowMessage(sNotFoundError, MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
End If
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
'Delete a sub-folder based on the provided backup information
|
||||
Public Shared Sub DeleteDirectoryByBackup(ByVal sBackupFolder As String, ByVal oBackup As clsBackup)
|
||||
Dim oDir As DirectoryInfo
|
||||
@@ -469,6 +592,25 @@ Public Class mgrCommon
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Open a nice button sub-menu
|
||||
Public Shared Sub OpenButtonSubMenu(ByRef cms As ContextMenuStrip, ByRef btn As Button)
|
||||
cms.Show(btn, New Drawing.Point(btn.Size.Width - Math.Floor(btn.Size.Width * 0.1), btn.Size.Height - Math.Floor(btn.Size.Height * 0.5)), ToolStripDropDownDirection.AboveRight)
|
||||
End Sub
|
||||
|
||||
'Configure a fake form to trigger focus for priority messages
|
||||
Private Shared Sub ConfigureFakeForm(ByRef frm As Form)
|
||||
frm.FormBorderStyle = FormBorderStyle.None
|
||||
frm.ShowInTaskbar = False
|
||||
frm.Size = New Size(0, 0)
|
||||
'We need to display it off-screen to hide it, setting the visiblity to false doesn't work in Mono.
|
||||
frm.StartPosition = FormStartPosition.Manual
|
||||
frm.Location = New Point(-100, -100)
|
||||
frm.Show()
|
||||
frm.Focus()
|
||||
frm.BringToFront()
|
||||
frm.TopMost = True
|
||||
End Sub
|
||||
|
||||
'Handles no extra parameters
|
||||
Public Shared Function ShowMessage(ByVal sMsg As String, ByVal oType As MsgBoxStyle) As MsgBoxResult
|
||||
Dim oResult As MsgBoxResult
|
||||
@@ -476,6 +618,23 @@ Public Class mgrCommon
|
||||
Return oResult
|
||||
End Function
|
||||
|
||||
'Handles no extra parameters
|
||||
Public Shared Function ShowPriorityMessage(ByVal sMsg As String, ByVal oType As MsgBoxStyle) As MsgBoxResult
|
||||
Dim frmFake As Form
|
||||
|
||||
'Create a fake mostly invisible form to get top focus
|
||||
frmFake = New Form
|
||||
ConfigureFakeForm(frmFake)
|
||||
|
||||
Dim oResult As MsgBoxResult
|
||||
oResult = ShowMessage(sMsg, oType)
|
||||
|
||||
frmFake.TopMost = False
|
||||
frmFake.Dispose()
|
||||
|
||||
Return oResult
|
||||
End Function
|
||||
|
||||
'Handles single parameter stings
|
||||
Public Shared Function ShowMessage(ByVal sMsg As String, ByVal sParam As String, ByVal oType As MsgBoxStyle) As MsgBoxResult
|
||||
Dim oResult As MsgBoxResult
|
||||
@@ -483,6 +642,23 @@ Public Class mgrCommon
|
||||
Return oResult
|
||||
End Function
|
||||
|
||||
'Handles single parameter stings
|
||||
Public Shared Function ShowPriorityMessage(ByVal sMsg As String, ByVal sParam As String, ByVal oType As MsgBoxStyle) As MsgBoxResult
|
||||
Dim frmFake As Form
|
||||
|
||||
'Create a fake mostly invisible form to get top focus
|
||||
frmFake = New Form
|
||||
ConfigureFakeForm(frmFake)
|
||||
|
||||
Dim oResult As MsgBoxResult
|
||||
oResult = ShowMessage(sMsg, sParam, oType)
|
||||
|
||||
frmFake.TopMost = False
|
||||
frmFake.Dispose()
|
||||
|
||||
Return oResult
|
||||
End Function
|
||||
|
||||
'Handles multi-parameter strings
|
||||
Public Shared Function ShowMessage(ByVal sMsg As String, ByVal sParams As String(), ByVal oType As MsgBoxStyle) As MsgBoxResult
|
||||
Dim oResult As MsgBoxResult
|
||||
@@ -490,6 +666,23 @@ Public Class mgrCommon
|
||||
Return oResult
|
||||
End Function
|
||||
|
||||
'Handles multi-parameter strings
|
||||
Public Shared Function ShowPriorityMessage(ByVal sMsg As String, ByVal sParams As String(), ByVal oType As MsgBoxStyle) As MsgBoxResult
|
||||
Dim frmFake As Form
|
||||
|
||||
'Create a fake mostly invisible form to get top focus
|
||||
frmFake = New Form
|
||||
ConfigureFakeForm(frmFake)
|
||||
|
||||
Dim oResult As MsgBoxResult
|
||||
oResult = ShowMessage(sMsg, sParams, oType)
|
||||
|
||||
frmFake.TopMost = False
|
||||
frmFake.Dispose()
|
||||
|
||||
Return oResult
|
||||
End Function
|
||||
|
||||
'Handles no extra parameters
|
||||
Public Shared Function FormatString(ByVal sString As String) As String
|
||||
sString = sString.Replace("[BR]", vbCrLf)
|
||||
|
||||
@@ -281,4 +281,31 @@
|
||||
|
||||
End Function
|
||||
|
||||
Public Shared Function PrintTagsbyID(ByVal sID As String) As String
|
||||
Dim slTags As SortedList
|
||||
Dim oTag As clsTag
|
||||
Dim sTags As String = String.Empty
|
||||
Dim cTrim() As Char = {",", " "}
|
||||
|
||||
slTags = mgrGameTags.GetTagsByGame(sID)
|
||||
|
||||
For Each de As DictionaryEntry In slTags
|
||||
oTag = DirectCast(de.Value, clsTag)
|
||||
sTags &= "#" & oTag.Name & ", "
|
||||
Next
|
||||
|
||||
Return sTags.TrimEnd(cTrim)
|
||||
End Function
|
||||
|
||||
Public Shared Function PrintTagsbyList(ByVal oList As List(Of KeyValuePair(Of String, String))) As String
|
||||
Dim sTags As String = String.Empty
|
||||
Dim cTrim() As Char = {",", " "}
|
||||
|
||||
For Each kp As KeyValuePair(Of String, String) In oList
|
||||
sTags &= "#" & kp.Value & ", "
|
||||
Next
|
||||
|
||||
Return sTags.TrimEnd(cTrim)
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
@@ -36,6 +36,13 @@ Public Class mgrMonitorList
|
||||
If Not IsDBNull(dr("Parameter")) Then oGame.Parameter = CStr(dr("Parameter"))
|
||||
If Not IsDBNull(dr("Comments")) Then oGame.Comments = CStr(dr("Comments"))
|
||||
oGame.IsRegEx = CBool(dr("IsRegEx"))
|
||||
oGame.RecurseSubFolders = CBool(dr("RecurseSubFolders"))
|
||||
oGame.OS = CInt(dr("OS"))
|
||||
|
||||
'Compile RegEx
|
||||
If oGame.IsRegEx Then
|
||||
oGame.CompiledRegEx = New Regex(oGame.ProcessName, RegexOptions.Compiled)
|
||||
End If
|
||||
|
||||
Return oGame
|
||||
End Function
|
||||
@@ -45,7 +52,7 @@ Public Class mgrMonitorList
|
||||
|
||||
hshParams.Add("ID", oGame.ID)
|
||||
hshParams.Add("Name", oGame.Name)
|
||||
hshParams.Add("Process", oGame.TrueProcess)
|
||||
hshParams.Add("Process", oGame.ProcessName)
|
||||
hshParams.Add("Path", oGame.TruePath)
|
||||
hshParams.Add("AbsolutePath", oGame.AbsolutePath)
|
||||
hshParams.Add("FolderSave", oGame.FolderSave)
|
||||
@@ -64,6 +71,8 @@ Public Class mgrMonitorList
|
||||
hshParams.Add("Parameter", oGame.Parameter)
|
||||
hshParams.Add("Comments", oGame.Comments)
|
||||
hshParams.Add("IsRegEx", oGame.IsRegEx)
|
||||
hshParams.Add("RecurseSubFolders", oGame.RecurseSubFolders)
|
||||
hshParams.Add("OS", oGame.OS)
|
||||
|
||||
Return hshParams
|
||||
End Function
|
||||
@@ -75,10 +84,8 @@ Public Class mgrMonitorList
|
||||
Dim hshList As New Hashtable
|
||||
Dim hshDupeList As New Hashtable
|
||||
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)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
@@ -87,39 +94,7 @@ Public Class mgrMonitorList
|
||||
Case eListTypes.FullList
|
||||
hshList.Add(oGame.ID, oGame)
|
||||
Case eListTypes.ScanList
|
||||
For Each de As DictionaryEntry In hshList
|
||||
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)
|
||||
If oGame.Enabled Then hshList.Add(oGame.ID, oGame)
|
||||
End Select
|
||||
Next
|
||||
|
||||
@@ -133,7 +108,7 @@ Public Class mgrMonitorList
|
||||
|
||||
sSQL = "INSERT INTO monitorlist VALUES (@ID, @Name, @Process, @Path, @AbsolutePath, @FolderSave, @FileType, @TimeStamp, "
|
||||
sSQL &= "@ExcludeList, @ProcessPath, @Icon, @Hours, @Version, @Company, @Enabled, @MonitorOnly, @BackupLimit, @CleanFolder, "
|
||||
sSQL &= "@Parameter, @Comments, @IsRegEx)"
|
||||
sSQL &= "@Parameter, @Comments, @IsRegEx, @RecurseSubFolders, @OS)"
|
||||
|
||||
'Parameters
|
||||
hshParams = SetCoreParameters(oGame)
|
||||
@@ -150,12 +125,13 @@ Public Class mgrMonitorList
|
||||
sSQL = "UPDATE monitorlist SET MonitorID=@ID, Name=@Name, Process=@Process, Path=@Path, AbsolutePath=@AbsolutePath, FolderSave=@FolderSave, "
|
||||
sSQL &= "FileType=@FileType, TimeStamp=@TimeStamp, ExcludeList=@ExcludeList, ProcessPath=@ProcessPath, Icon=@Icon, "
|
||||
sSQL &= "Hours=@Hours, Version=@Version, Company=@Company, Enabled=@Enabled, MonitorOnly=@MonitorOnly, BackupLimit=@BackupLimit, "
|
||||
sSQL &= "CleanFolder=@CleanFolder, Parameter=@Parameter, Comments=@Comments, IsRegEx=@IsRegEx WHERE MonitorID=@QueryID;"
|
||||
sSQL &= "CleanFolder=@CleanFolder, Parameter=@Parameter, Comments=@Comments, IsRegEx=@IsRegEx, RecurseSubFolders=@RecurseSubFolders, OS=@OS WHERE MonitorID=@QueryID;"
|
||||
sSQL &= "UPDATE gametags SET MonitorID=@ID WHERE MonitorID=@QueryID;"
|
||||
|
||||
If iSelectDB = mgrSQLite.Database.Local Then
|
||||
sSQL &= "UPDATE gameprocesses SET MonitorID=@ID WHERE MonitorID=@QueryID;"
|
||||
sSQL &= "UPDATE sessions SET MonitorID=@ID WHERE MonitorID=@QueryID;"
|
||||
sSQL &= "UPDATE winedata SET MonitorID=@ID WHERE MonitorID=@QueryID"
|
||||
End If
|
||||
|
||||
'Parameters
|
||||
@@ -169,6 +145,20 @@ Public Class mgrMonitorList
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
End Sub
|
||||
|
||||
'Do NOT change MonitorID with this function
|
||||
Public Shared Sub DoListFieldUpdate(ByVal sFieldName As String, ByVal oValue As Object, ByVal sQueryID As String, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
sSQL = "UPDATE monitorlist SET " & sFieldName & "=@" & sFieldName & " WHERE MonitorID=@QueryID;"
|
||||
|
||||
'Parameters
|
||||
hshParams.Add(sFieldName, oValue)
|
||||
hshParams.Add("QueryID", sQueryID)
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
End Sub
|
||||
|
||||
Public Shared Sub DoListUpdateMulti(ByVal sMonitorIDs As List(Of String), ByVal oGame As clsGame, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
@@ -208,6 +198,8 @@ Public Class mgrMonitorList
|
||||
sSQL &= "WHERE MonitorID = @MonitorID;"
|
||||
sSQL &= "DELETE FROM sessions "
|
||||
sSQL &= "WHERE MonitorID = @MonitorID;"
|
||||
sSQL &= "DELETE FROM winedata "
|
||||
sSQL &= "WHERE MonitorID = @MonitorID;"
|
||||
End If
|
||||
sSQL &= "DELETE FROM monitorlist "
|
||||
sSQL &= "WHERE MonitorID = @MonitorID;"
|
||||
@@ -272,6 +264,18 @@ Public Class mgrMonitorList
|
||||
|
||||
sSQL = sSQL.TrimEnd(",")
|
||||
sSQL &= ");"
|
||||
|
||||
sSQL &= "DELETE FROM winedata "
|
||||
sSQL &= "WHERE MonitorID IN ("
|
||||
|
||||
For Each s As String In sMonitorIDs
|
||||
sSQL &= "@MonitorID" & iCounter & ","
|
||||
hshParams.Add("MonitorID" & iCounter, s)
|
||||
iCounter += 1
|
||||
Next
|
||||
|
||||
sSQL = sSQL.TrimEnd(",")
|
||||
sSQL &= ");"
|
||||
End If
|
||||
|
||||
sSQL &= "DELETE FROM monitorlist "
|
||||
@@ -401,11 +405,11 @@ Public Class mgrMonitorList
|
||||
sVersion = "(SELECT Version FROM monitorlist WHERE MonitorID=@ID)"
|
||||
End If
|
||||
|
||||
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, RecurseSubFolders, OS) "
|
||||
sSQL &= "VALUES (@ID, @Name, @Process, @Path, @AbsolutePath, @FolderSave, @FileType, "
|
||||
sSQL &= "@TimeStamp, @ExcludeList, " & sGamePath & ", "
|
||||
sSQL &= sIcon & ", @Hours, " & sVersion & ", "
|
||||
sSQL &= sCompany & ", " & sMonitorGame & ", @MonitorOnly, @BackupLimit, @CleanFolder, @Parameter, @Comments, @IsRegEx);"
|
||||
sSQL &= sCompany & ", " & sMonitorGame & ", @MonitorOnly, @BackupLimit, @CleanFolder, @Parameter, @Comments, @IsRegEx, @RecurseSubFolders, @OS);"
|
||||
|
||||
For Each oGame As clsGame In hshGames.Values
|
||||
hshParams = New Hashtable
|
||||
@@ -413,7 +417,7 @@ Public Class mgrMonitorList
|
||||
'Core Parameters
|
||||
hshParams.Add("ID", oGame.ID)
|
||||
hshParams.Add("Name", oGame.Name)
|
||||
hshParams.Add("Process", oGame.TrueProcess)
|
||||
hshParams.Add("Process", oGame.ProcessName)
|
||||
hshParams.Add("Path", oGame.TruePath)
|
||||
hshParams.Add("AbsolutePath", oGame.AbsolutePath)
|
||||
hshParams.Add("FolderSave", oGame.FolderSave)
|
||||
@@ -427,6 +431,8 @@ Public Class mgrMonitorList
|
||||
hshParams.Add("Parameter", oGame.Parameter)
|
||||
hshParams.Add("Comments", oGame.Comments)
|
||||
hshParams.Add("IsRegEx", oGame.IsRegEx)
|
||||
hshParams.Add("RecurseSubFolders", oGame.RecurseSubFolders)
|
||||
hshParams.Add("OS", oGame.OS)
|
||||
|
||||
'Optional Parameters
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.Company) = clsGame.eOptionalSyncFields.Company Then
|
||||
@@ -582,7 +588,7 @@ Public Class mgrMonitorList
|
||||
ByRef hshParams As Hashtable) As String
|
||||
Dim sSQL As String = String.Empty
|
||||
Dim iCounter As Integer = 0
|
||||
Dim sBaseSelect As String = "MonitorID, Name, Process, Path, AbsolutePath, FolderSave, FileType, TimeStamp, ExcludeList, ProcessPath, Icon, Hours, Version, Company, Enabled, MonitorOnly, BackupLimit, CleanFolder, Parameter, Comments, IsRegEx FROM monitorlist"
|
||||
Dim sBaseSelect As String = "MonitorID, Name, Process, Path, AbsolutePath, FolderSave, FileType, TimeStamp, ExcludeList, ProcessPath, Icon, Hours, Version, Company, Enabled, MonitorOnly, BackupLimit, CleanFolder, Parameter, Comments, IsRegEx, RecurseSubFolders, OS FROM monitorlist"
|
||||
Dim sSort As String = " ORDER BY " & sSortField
|
||||
|
||||
If bSortAsc Then
|
||||
@@ -701,7 +707,7 @@ Public Class mgrMonitorList
|
||||
Case clsGameFilterField.eDataType.fNumeric
|
||||
sSQL &= oFilter.Field.FieldName & " " & oFilter.NumericOperatorAsString & " @" & oFilter.ID
|
||||
hshParams.Add(oFilter.ID, oFilter.Data)
|
||||
Case clsGameFilterField.eDataType.fBool
|
||||
Case clsGameFilterField.eDataType.fBool, clsGameFilterField.eDataType.fEnum
|
||||
sSQL &= oFilter.Field.FieldName & " = @" & oFilter.ID
|
||||
hshParams.Add(oFilter.ID, oFilter.Data)
|
||||
End Select
|
||||
@@ -779,6 +785,8 @@ Public Class mgrMonitorList
|
||||
If Not IsDBNull(dr("Parameter")) Then oGame.Parameter = CStr(dr("Parameter"))
|
||||
If Not IsDBNull(dr("Comments")) Then oGame.Comments = CStr(dr("Comments"))
|
||||
oGame.IsRegEx = CBool(dr("IsRegEx"))
|
||||
oGame.RecurseSubFolders = CBool(dr("RecurseSubFolders"))
|
||||
oGame.OS = CInt(dr("OS"))
|
||||
oGame.Tags = mgrGameTags.GetTagsByGameForExport(oGame.ID)
|
||||
oList.Add(oGame)
|
||||
Next
|
||||
@@ -786,19 +794,13 @@ Public Class mgrMonitorList
|
||||
Return oList
|
||||
End Function
|
||||
|
||||
Public Shared Function SyncGameIDs(ByVal sPath As String, ByRef oSettings As mgrSettings, ByVal bOfficial As Boolean) As Boolean
|
||||
Public Shared Function SyncGameIDs(ByVal sPath As String, ByVal bOfficial As Boolean) As Boolean
|
||||
Dim sWarning As String
|
||||
|
||||
If bOfficial Then
|
||||
If (oSettings.SuppressMessages And mgrSettings.eSuppressMessages.GameIDSync) = mgrSettings.eSuppressMessages.GameIDSync Then
|
||||
sWarning = mgrMonitorList_ConfirmOfficialGameIDSync
|
||||
Else
|
||||
sWarning = mgrMonitorList_ConfirmInitialOfficialGameIDSync
|
||||
oSettings.SuppressMessages = oSettings.SetMessageField(oSettings.SuppressMessages, mgrSettings.eSuppressMessages.GameIDSync)
|
||||
oSettings.SaveSettings()
|
||||
End If
|
||||
sWarning = mgrMonitorList_ConfirmOfficialGameIDSync
|
||||
Else
|
||||
sWarning = mgrMonitorList_ConfirmFileGameIDSync
|
||||
sWarning = mgrMonitorList_ConfirmFileGameIDSync
|
||||
End If
|
||||
|
||||
If mgrCommon.ShowMessage(sWarning, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
@@ -822,12 +824,9 @@ Public Class mgrMonitorList
|
||||
Return True
|
||||
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) As Boolean
|
||||
If mgrCommon.IsAddress(sPath) Then
|
||||
If mgrCommon.CheckAddress(sPath) Then
|
||||
If bOfficial And Not bStartUpWizard And Not ((oSettings.SuppressMessages And mgrSettings.eSuppressMessages.GameIDSync) = mgrSettings.eSuppressMessages.GameIDSync) Then
|
||||
SyncGameIDs(sPath, oSettings, True)
|
||||
End If
|
||||
ImportMonitorList(sPath, True)
|
||||
Return True
|
||||
Else
|
||||
@@ -860,7 +859,7 @@ Public Class mgrMonitorList
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If oExportInfo.AppVer < 110 Then
|
||||
If oExportInfo.AppVer < 115 Then
|
||||
If mgrCommon.ShowMessage(mgrMonitorList_ImportVersionWarning, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
Exit Sub
|
||||
End If
|
||||
@@ -1020,7 +1019,7 @@ Public Class mgrMonitorList
|
||||
|
||||
'If the remote database actually contains a list, then ask what to do
|
||||
If iGameCount > 0 Then
|
||||
If mgrCommon.ShowMessage(mgrMonitorList_ConfirmExistingData, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowPriorityMessage(mgrMonitorList_ConfirmExistingData, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
mgrMonitorList.SyncMonitorLists(oSettings)
|
||||
Else
|
||||
mgrMonitorList.SyncMonitorLists(oSettings, False)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Imports System.IO
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports System.Reflection
|
||||
Imports System.Threading.Thread
|
||||
|
||||
Public Class mgrPath
|
||||
'Important Note: Any changes to sSettingsRoot & sDBLocation need to be mirrored in frmMain.vb -> VerifyGameDataPath
|
||||
@@ -15,7 +16,8 @@ Public Class mgrPath
|
||||
Private Shared oReleaseType As ProcessorArchitecture = AssemblyName.GetAssemblyName(Application.ExecutablePath()).ProcessorArchitecture
|
||||
|
||||
Shared Sub New()
|
||||
hshCustomVariables = mgrVariables.ReadVariables
|
||||
SetEnv()
|
||||
LoadCustomVariables()
|
||||
End Sub
|
||||
|
||||
Shared ReadOnly Property ReleaseType As Integer
|
||||
@@ -99,8 +101,10 @@ Public Class mgrPath
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Shared Function ValidatePathForOS(ByVal sCheckString As String) As String
|
||||
Dim cInvalidCharacters As Char() = Path.GetInvalidPathChars
|
||||
Public Shared Function ValidatePath(ByVal sCheckString As String) As String
|
||||
Dim cInvalidCharacters As Char() = {Chr(0), Chr(1), Chr(2), Chr(3), Chr(4), Chr(5), Chr(6), Chr(7), Chr(8), Chr(9), Chr(10), Chr(11), Chr(12), Chr(13), Chr(14), Chr(15),
|
||||
Chr(16), Chr(17), Chr(18), Chr(19), Chr(20), Chr(21), Chr(22), Chr(23), Chr(24), Chr(25), Chr(26), Chr(27), Chr(28), Chr(29), Chr(30),
|
||||
Chr(31), Chr(34), Chr(60), Chr(62), Chr(124)}
|
||||
|
||||
For Each c As Char In cInvalidCharacters
|
||||
sCheckString = sCheckString.Replace(c, "")
|
||||
@@ -109,15 +113,17 @@ Public Class mgrPath
|
||||
Return sCheckString.Trim
|
||||
End Function
|
||||
|
||||
Public Shared Function ValidateFileNameForOS(ByVal sCheckString As String) As String
|
||||
Dim cInvalidCharacters As Char() = Path.GetInvalidFileNameChars
|
||||
Public Shared Function ValidateFileName(ByVal sCheckString As String) As String
|
||||
Dim cInvalidCharacters As Char() = {Chr(0), Chr(1), Chr(2), Chr(3), Chr(4), Chr(5), Chr(6), Chr(7), Chr(8), Chr(9), Chr(10), Chr(11), Chr(12), Chr(13), Chr(14), Chr(15),
|
||||
Chr(16), Chr(17), Chr(18), Chr(19), Chr(20), Chr(21), Chr(22), Chr(23), Chr(24), Chr(25), Chr(26), Chr(27), Chr(28), Chr(29), Chr(30),
|
||||
Chr(31), Chr(34), Chr(42), Chr(47), Chr(58), Chr(60), Chr(62), Chr(63), Chr(92), Chr(124)}
|
||||
|
||||
For Each c As Char In cInvalidCharacters
|
||||
sCheckString = sCheckString.Replace(c, "")
|
||||
Next
|
||||
|
||||
If sCheckString.Length > 257 Then
|
||||
sCheckString = sCheckString.Substring(0, 257)
|
||||
If sCheckString.Length > 255 Then
|
||||
sCheckString = sCheckString.Substring(0, 255)
|
||||
End If
|
||||
|
||||
Return sCheckString.Trim
|
||||
@@ -202,14 +208,154 @@ Public Class mgrPath
|
||||
Return sResult
|
||||
End Function
|
||||
|
||||
Public Shared Function ReplaceSpecialPaths(sValue As String) As String
|
||||
Dim sMyDocs As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
|
||||
Dim sPublicDocs As String = Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments)
|
||||
Dim sAppDataRoaming As String = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
|
||||
Dim sAppDataLocal As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
|
||||
Dim sCurrentUser As String = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)
|
||||
Dim oCustomVariable As clsPathVariable
|
||||
Public Shared Sub ModWinePathData(ByRef oGame As clsGame)
|
||||
If Not oGame.AbsolutePath Then oGame.Path = oGame.Path.Replace("\", Path.DirectorySeparatorChar)
|
||||
oGame.FileType = oGame.FileType.Replace("\", Path.DirectorySeparatorChar)
|
||||
oGame.ExcludeList = oGame.ExcludeList.Replace("\", Path.DirectorySeparatorChar)
|
||||
End Sub
|
||||
|
||||
Private Shared Function BuildWinePath(ByVal sPath As String, ByVal sWinePrefix As String) As String
|
||||
Dim sRealPath As String
|
||||
Dim cDriveLetter As Char
|
||||
Dim sWineDrive As String
|
||||
|
||||
Try
|
||||
'Grab Path
|
||||
sRealPath = sPath.Split("=")(1)
|
||||
|
||||
'Remove Quotes
|
||||
sRealPath = sRealPath.TrimStart("""")
|
||||
sRealPath = sRealPath.TrimEnd("""")
|
||||
|
||||
'Flip Seperators
|
||||
sRealPath = sRealPath.Replace("\\", Path.DirectorySeparatorChar)
|
||||
|
||||
'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("%PROGRAMDATA%") Then
|
||||
sReplace = "%PROGRAMDATA%"
|
||||
sRegistry = File.ReadAllText(sPrefix & Path.DirectorySeparatorChar & "system.reg")
|
||||
oParse = New Regex("""Common AppData""="".+?(?=\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 sEnv As String
|
||||
Dim oParse As New Regex("WINEPREFIX=.+?(?=\x00)")
|
||||
Dim oMatch As Match
|
||||
|
||||
Try
|
||||
sEnv = File.ReadAllText("/proc/" & prs.Id.ToString() & "/environ")
|
||||
If oParse.IsMatch(sEnv) Then
|
||||
oMatch = oParse.Match(sEnv)
|
||||
Return oMatch.Value.Trim("/").Split("=")(1)
|
||||
Else
|
||||
'When WINEPREFIX is not part of the command, we will assume the default prefix.
|
||||
Return Environment.GetFolderPath(Environment.SpecialFolder.Personal) & "/.wine"
|
||||
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))
|
||||
hshEnvs.Add("ProgramData", Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData))
|
||||
|
||||
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
|
||||
If sValue.Contains(oCustomVariable.FormattedName) Then
|
||||
@@ -217,39 +363,71 @@ Public Class mgrPath
|
||||
End If
|
||||
Next
|
||||
|
||||
If sValue.Contains("*appdatalocal*") Then
|
||||
Return sValue.Replace("*appdatalocal*", sAppDataLocal)
|
||||
End If
|
||||
|
||||
If sValue.Contains("*appdataroaming*") Then
|
||||
Return sValue.Replace("*appdataroaming*", sAppDataRoaming)
|
||||
End If
|
||||
|
||||
'This needs to be tested last for Unix compatability
|
||||
If sValue.Contains("*mydocs*") Then
|
||||
Return sValue.Replace("*mydocs*", sMyDocs)
|
||||
End If
|
||||
|
||||
'Don't use these in Unix
|
||||
If Not mgrCommon.IsUnix Then
|
||||
If sValue.Contains("*publicdocs*") Then
|
||||
Return sValue.Replace("*publicdocs*", sPublicDocs)
|
||||
If mgrCommon.IsUnix Then
|
||||
'$VAR_iable
|
||||
Dim oParse As New Regex("\$([a-zA-Z0-9_]+)")
|
||||
'${VAR_iable} but not advanced syntax like ${VAR:-iable}
|
||||
Dim oParseBracketed As New Regex("\$\{([a-zA-Z0-9_]+?)\}")
|
||||
'~ not inside ${...}
|
||||
Dim oParseTilde As New Regex("~(?![^\$\{]*\})")
|
||||
If sEnvCurrentUser = String.Empty Then
|
||||
'Fall back
|
||||
sEnvCurrentUser = Environment.GetFolderPath(Environment.SpecialFolder.Personal)
|
||||
End If
|
||||
If sEnvCurrentUser = String.Empty Then
|
||||
'Fall back
|
||||
sEnvCurrentUser = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
|
||||
End If
|
||||
|
||||
If sValue.Contains("*currentuser*") Then
|
||||
Return sValue.Replace("*currentuser*", sCurrentUser)
|
||||
End If
|
||||
'$HOME to ${HOME}
|
||||
sValue = oParse.Replace(sValue, "${$1}")
|
||||
'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
|
||||
|
||||
Return sValue
|
||||
End Function
|
||||
|
||||
Public Shared Function ReverseSpecialPaths(sValue As String) As String
|
||||
Dim sMyDocs As String = "*mydocs*"
|
||||
Dim sPublicDocs As String = "*publicdocs*"
|
||||
Dim sAppDataRoaming As String = "*appdatalocal*"
|
||||
Dim sAppDataLocal As String = "*appdataroaming*"
|
||||
Dim sCurrentUser As String = "*currentuser*"
|
||||
Dim sMyDocs As String = "%USERDOCUMENTS%"
|
||||
Dim sEnvMyDocs As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
|
||||
Dim sPublicDocs As String = "%COMMONDOCUMENTS%"
|
||||
Dim sEnvPublicDocs As String = Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments)
|
||||
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 sProgramData As String = "%PROGRAMDATA%"
|
||||
Dim sEnvProgramData As String = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData)
|
||||
Dim oCustomVariable As clsPathVariable
|
||||
|
||||
For Each oCustomVariable In hshCustomVariables.Values
|
||||
@@ -258,33 +436,75 @@ Public Class mgrPath
|
||||
End If
|
||||
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 sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments)) Then
|
||||
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments), sPublicDocs)
|
||||
If sValue.Contains(sEnvAppDataRoaming) Then
|
||||
Return sValue.Replace(sEnvAppDataRoaming, sAppDataRoaming)
|
||||
End If
|
||||
|
||||
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)) Then
|
||||
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), sCurrentUser)
|
||||
If sValue.Contains(sEnvAppDataLocal) Then
|
||||
Return sValue.Replace(sEnvAppDataLocal, sAppDataLocal)
|
||||
End If
|
||||
|
||||
If sValue.Contains(sEnvProgramData) Then
|
||||
Return sValue.Replace(sEnvProgramData, sProgramData)
|
||||
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
|
||||
|
||||
Return sValue
|
||||
End Function
|
||||
|
||||
Public Shared Function IsSupportedRegistryPath(ByVal sPath As String) As Boolean
|
||||
If sPath.ToUpper.StartsWith("HKEY_CURRENT_USER\") Or sPath.ToUpper.StartsWith("HKCU\") Then
|
||||
Return True
|
||||
ElseIf sPath.ToUpper.StartsWith("HKEY_LOCAL_MACHINE\") Or sPath.ToUpper.StartsWith("HKLM\") Then
|
||||
Return True
|
||||
End If
|
||||
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Shared Function IsPathUNC(sPath As String) As Boolean
|
||||
Dim sPrefix As String = Path.DirectorySeparatorChar & Path.DirectorySeparatorChar
|
||||
If sPath.StartsWith(sPrefix) Then Return True
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Shared Function IsAbsolute(sValue As String) As Boolean
|
||||
Dim hshFolders As New Hashtable
|
||||
Dim hshCustomVariables As Hashtable = mgrVariables.ReadVariables
|
||||
@@ -298,6 +518,7 @@ Public Class mgrPath
|
||||
'Don't use these in Unix
|
||||
If Not mgrCommon.IsUnix Then
|
||||
hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments))
|
||||
hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData))
|
||||
hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.UserProfile))
|
||||
End If
|
||||
|
||||
@@ -317,8 +538,10 @@ Public Class mgrPath
|
||||
|
||||
Public Shared Function VerifyCustomVariables(ByVal hshScanlist As Hashtable, ByRef sGames As String) As Boolean
|
||||
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 sPattern As String = "\*(.*)\*"
|
||||
Dim sPattern As String = "\%(.*)\%"
|
||||
Dim oGame As clsGame
|
||||
Dim oMatch As Match
|
||||
Dim bClean As Boolean = True
|
||||
@@ -326,8 +549,8 @@ Public Class mgrPath
|
||||
For Each oGame In hshScanlist.Values
|
||||
oMatch = Regex.Match(oGame.Path, sPattern)
|
||||
If oMatch.Success Then
|
||||
sVariableCheck = oMatch.Value.Replace("*", String.Empty)
|
||||
If Not hshCustomVariables.ContainsKey(sVariableCheck) Then
|
||||
sVariableCheck = oMatch.Value.Replace("%", String.Empty)
|
||||
If Not hshCustomVariables.ContainsKey(sVariableCheck) And Not oReservedVariables.Contains(sVariableCheck) Then
|
||||
sGames &= vbCrLf & oGame.Name & " (" & sVariableCheck & ")"
|
||||
bClean = False
|
||||
End If
|
||||
@@ -337,8 +560,12 @@ Public Class mgrPath
|
||||
Return bClean
|
||||
End Function
|
||||
|
||||
Public Shared Sub CustomVariablesReload()
|
||||
Public Shared Sub LoadCustomVariables()
|
||||
hshCustomVariables = mgrVariables.ReadVariables
|
||||
|
||||
For Each oVariable As clsPathVariable In hshCustomVariables.Values
|
||||
Environment.SetEnvironmentVariable(oVariable.Name, oVariable.Path)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Shared Function SetManualGamePath() As String
|
||||
@@ -364,8 +591,8 @@ Public Class mgrPath
|
||||
If bNoAuto Then
|
||||
sMessage = mgrCommon.FormatString(mgrPath_ConfirmManualPath, sSearchReason)
|
||||
|
||||
If mgrCommon.ShowMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
sFolder = SetManualgamePath()
|
||||
If mgrCommon.ShowPriorityMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
sFolder = SetManualGamePath()
|
||||
End If
|
||||
|
||||
Return sFolder
|
||||
@@ -373,8 +600,9 @@ Public Class mgrPath
|
||||
|
||||
sMessage = mgrCommon.FormatString(mgrPath_ConfirmAutoPath, sSearchReason)
|
||||
|
||||
If mgrCommon.ShowMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
If mgrCommon.ShowPriorityMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
frmFind.ShowDialog()
|
||||
frmFind.BringToFront()
|
||||
|
||||
If frmFind.FoundItem <> String.Empty Then
|
||||
Return frmFind.FoundItem
|
||||
@@ -389,7 +617,7 @@ Public Class mgrPath
|
||||
End If
|
||||
|
||||
If mgrCommon.ShowMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
sFolder = SetManualgamePath()
|
||||
sFolder = SetManualGamePath()
|
||||
End If
|
||||
|
||||
frmFind.Dispose()
|
||||
@@ -400,22 +628,45 @@ Public Class mgrPath
|
||||
|
||||
Public Shared Function VerifyBackupPath(ByRef sBackupPath As String) As Boolean
|
||||
Dim dBrowser As FolderBrowserDialog
|
||||
Dim oDialogResult As DialogResult
|
||||
Dim iTotalWait As Integer
|
||||
Dim iTimeOut As Integer = 60000
|
||||
|
||||
If Not Directory.Exists(sBackupPath) Then
|
||||
If mgrCommon.ShowMessage(mgrPath_ConfirmBackupLocation, sBackupPath, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
dBrowser = New FolderBrowserDialog
|
||||
dBrowser.SelectedPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
|
||||
If dBrowser.ShowDialog = DialogResult.OK Then
|
||||
sBackupPath = dBrowser.SelectedPath
|
||||
Return True
|
||||
Else
|
||||
Do While Not (Directory.Exists(sBackupPath))
|
||||
Sleep(5000)
|
||||
iTotalWait += 5000
|
||||
If iTotalWait >= iTimeOut Then
|
||||
oDialogResult = mgrCommon.ShowPriorityMessage(mgrPath_ConfirmBackupLocation, sBackupPath, MsgBoxStyle.YesNoCancel)
|
||||
If oDialogResult = MsgBoxResult.Yes Then
|
||||
dBrowser = New FolderBrowserDialog
|
||||
dBrowser.SelectedPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
|
||||
If dBrowser.ShowDialog = DialogResult.OK Then
|
||||
sBackupPath = dBrowser.SelectedPath
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
ElseIf oDialogResult = DialogResult.No Then
|
||||
Return False
|
||||
Else
|
||||
iTotalWait = 0
|
||||
End If
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
Loop
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Shared Function VerifyLinuxDesktopFileLocation(Optional ByRef sFoundPath As String = "") As Boolean
|
||||
Dim sLocations As String() = New String() {"/usr/share/applications/gbm.desktop", "/usr/local/share/applications/gbm.desktop"}
|
||||
|
||||
For Each s As String In sLocations
|
||||
If File.Exists(s) Then
|
||||
sFoundPath = s
|
||||
Return True
|
||||
End If
|
||||
Next
|
||||
|
||||
Return False
|
||||
End Function
|
||||
End Class
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
Imports System.IO
|
||||
Imports System.Management
|
||||
Imports System.Text.RegularExpressions
|
||||
|
||||
Public Class mgrProcessDetection
|
||||
|
||||
Private prsFoundProcess As Process
|
||||
Private sProcessPath As String
|
||||
Private dStartTime As DateTime = Now, dEndTime As DateTime = Now
|
||||
Private lTimeSpent As Long = 0
|
||||
Private oGame As clsGame
|
||||
Private bWineProcess As Boolean = False
|
||||
Private oWineData As clsWineData
|
||||
Private oDuplicateGames As New ArrayList
|
||||
Private bDuplicates As Boolean
|
||||
Private bVerified As Boolean = False
|
||||
Private sFullCommand As String = String.Empty
|
||||
|
||||
Property FoundProcess As Process
|
||||
Get
|
||||
@@ -22,6 +23,15 @@ Public Class mgrProcessDetection
|
||||
End Set
|
||||
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
|
||||
Get
|
||||
Return dStartTime
|
||||
@@ -55,6 +65,24 @@ Public Class mgrProcessDetection
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property WineProcess As Boolean
|
||||
Get
|
||||
Return bWineProcess
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bWineProcess = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property WineData As clsWineData
|
||||
Get
|
||||
Return oWineData
|
||||
End Get
|
||||
Set(value As clsWineData)
|
||||
oWineData = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Duplicate As Boolean
|
||||
Get
|
||||
Return bDuplicates
|
||||
@@ -73,85 +101,32 @@ Public Class mgrProcessDetection
|
||||
End Set
|
||||
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
|
||||
Private Sub GetWindowsCommand(ByVal prs As Process)
|
||||
FullCommand = String.Empty
|
||||
Private Function GetWindowsCommand(ByVal prs As Process) As String
|
||||
Dim sFullCommand As String = String.Empty
|
||||
Try
|
||||
Using searcher As New ManagementObjectSearcher("SELECT CommandLine FROM Win32_Process WHERE ProcessId = " + prs.Id.ToString)
|
||||
For Each o As ManagementObject In searcher.Get()
|
||||
FullCommand &= o("CommandLine") & " "
|
||||
sFullCommand &= o("CommandLine") & " "
|
||||
Next
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
Catch
|
||||
'Do Nothing
|
||||
End Try
|
||||
End Sub
|
||||
Return sFullCommand
|
||||
End Function
|
||||
|
||||
'This function will only work correctly on Unix
|
||||
Private Sub GetUnixCommand(ByVal prs As Process)
|
||||
FullCommand = String.Empty
|
||||
Private Function GetUnixCommand(ByVal prs As Process) As String
|
||||
Dim sFullCommand As String = String.Empty
|
||||
Try
|
||||
FullCommand = File.ReadAllText("/proc/" & prs.Id.ToString() & "/cmdline").Replace(vbNullChar, " ")
|
||||
Catch ex As Exception
|
||||
sFullCommand = File.ReadAllText("/proc/" & prs.Id.ToString() & "/cmdline").Replace(vbNullChar, " ")
|
||||
Catch
|
||||
'Do Nothing
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Return sFullCommand
|
||||
End Function
|
||||
|
||||
'This function will only work correctly on Unix
|
||||
Private Function GetUnixProcessArguments(ByVal prs As Process) As String()
|
||||
@@ -187,7 +162,7 @@ Public Class mgrProcessDetection
|
||||
Private Function IsMatch(ByRef oGame As clsGame, ByRef sProcessCheck As String) As Boolean
|
||||
If oGame.IsRegEx Then
|
||||
Try
|
||||
If Regex.IsMatch(sProcessCheck, oGame.ProcessName) Then
|
||||
If oGame.CompiledRegEx.IsMatch(sProcessCheck) Then
|
||||
Return True
|
||||
End If
|
||||
Catch
|
||||
@@ -202,74 +177,147 @@ Public Class mgrProcessDetection
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function GetProcessPath() 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)
|
||||
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()
|
||||
|
||||
'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 iErrorCode As Integer, ByVal bDebugMode As Boolean) As Boolean
|
||||
Dim prsList() As Process = Process.GetProcesses
|
||||
Dim sProcessCheck As String = String.Empty
|
||||
Dim sProcessList As String = String.Empty
|
||||
Dim bWineProcess As Boolean = False
|
||||
Dim bPass As Boolean
|
||||
Dim oDetectedGames As New ArrayList
|
||||
|
||||
For Each prsCurrent As Process In prsList
|
||||
bPass = False
|
||||
|
||||
'This needs to be wrapped due to issues with Mono.
|
||||
Try
|
||||
sProcessCheck = prsCurrent.ProcessName
|
||||
'Some processes may return the ProcessName as a full path instead of the executable name.
|
||||
sProcessCheck = Path.GetFileName(prsCurrent.ProcessName)
|
||||
|
||||
'Unix Handler
|
||||
'We need some special handling for Wine processes
|
||||
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()
|
||||
'We can't use Path.GetFileName here, Wine uses the Windows seperator in arguments and Mono expects a different one in Unix.
|
||||
sWinePath = GetUnixProcessArguments(prsCurrent)(0).Split("\")
|
||||
sProcessCheck = sWinePath(sWinePath.Length - 1).Replace(".exe", "")
|
||||
'The wine-preloader parameters can refer to a path on the host system, windows based path within in the prefix, or mixed notation.
|
||||
sParameter = sArgs(0).Replace("\", Path.DirectorySeparatorChar)
|
||||
sWinePath = sParameter.Split(Path.DirectorySeparatorChar)
|
||||
sProcessCheck = Path.GetFileNameWithoutExtension(sWinePath(sWinePath.Length - 1))
|
||||
bWineProcess = True
|
||||
Else
|
||||
bWineProcess = False
|
||||
End If
|
||||
|
||||
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
|
||||
sProcessList &= prsCurrent.Id & " " & prsCurrent.ProcessName & vbCrLf
|
||||
sProcessList &= prsCurrent.Id & " " & prsCurrent.ProcessName & " " & GetWindowsCommand(prsCurrent) & vbCrLf
|
||||
End If
|
||||
Catch ex As Exception
|
||||
'Do Nothing
|
||||
End Try
|
||||
|
||||
'Detection Pass 1
|
||||
For Each oCurrentGame As clsGame In hshScanList.Values
|
||||
If IsMatch(oCurrentGame, sProcessCheck) Then
|
||||
prsFoundProcess = prsCurrent
|
||||
oGame = oCurrentGame.ShallowCopy
|
||||
bPass = True
|
||||
|
||||
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
|
||||
oDetectedGames.Add(oGame.ShallowCopy)
|
||||
End If
|
||||
Next
|
||||
|
||||
'Detection Pass 2
|
||||
If bPass Then
|
||||
'Determine the process path if we need it
|
||||
If Not oGame.AbsolutePath Or oGame.Duplicate Then
|
||||
If oDetectedGames.Count > 0 Then
|
||||
FilterDetected(oDetectedGames)
|
||||
End If
|
||||
|
||||
If oDetectedGames.Count > 0 Then
|
||||
If Not oGame.AbsolutePath And Not oGame.MonitorOnly Then
|
||||
Try
|
||||
If Not bWineProcess Then
|
||||
oGame.ProcessPath = Path.GetDirectoryName(prsCurrent.MainModule.FileName)
|
||||
@@ -277,9 +325,6 @@ Public Class mgrProcessDetection
|
||||
oGame.ProcessPath = GetUnixSymLinkDirectory(prsCurrent)
|
||||
End If
|
||||
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
|
||||
bNeedsPath = True
|
||||
iErrorCode = 5
|
||||
@@ -288,13 +333,11 @@ Public Class mgrProcessDetection
|
||||
iErrorCode = 299
|
||||
Else
|
||||
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.
|
||||
bPass = False
|
||||
Return False
|
||||
End If
|
||||
Catch exAll As Exception
|
||||
If bDebugMode Then mgrCommon.ShowMessage(exAll.Message & vbCrLf & vbCrLf & exAll.StackTrace, MsgBoxStyle.Critical)
|
||||
'A different failure occured, drop out and continue to scan.
|
||||
bPass = False
|
||||
Return False
|
||||
End Try
|
||||
End If
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ Public Class mgrRestore
|
||||
If oGame.ProcessPath <> String.Empty Then
|
||||
oRestoreInfo.RelativeRestorePath = oGame.ProcessPath & Path.DirectorySeparatorChar & oRestoreInfo.RestorePath
|
||||
Else
|
||||
sProcess = oGame.TrueProcess
|
||||
sProcess = oGame.ProcessName
|
||||
If mgrCommon.IsProcessNotSearchable(oGame) Then bNoAuto = True
|
||||
sRestorePath = mgrPath.ProcessPathSearch(oRestoreInfo.Name, sProcess, mgrCommon.FormatString(mgrRestore_RelativeNeedPath, oRestoreInfo.Name), bNoAuto)
|
||||
|
||||
@@ -122,31 +122,43 @@ Public Class mgrRestore
|
||||
Public Function CheckRestorePrereq(ByVal oBackupInfo As clsBackup, ByVal bCleanFolder As Boolean) As Boolean
|
||||
Dim sHash As String
|
||||
Dim sExtractPath As String
|
||||
Dim bRegistry As Boolean
|
||||
Dim sBackupFile As String = oSettings.BackupFolder & Path.DirectorySeparatorChar & oBackupInfo.FileName
|
||||
|
||||
If oBackupInfo.AbsolutePath Then
|
||||
sExtractPath = oBackupInfo.RestorePath
|
||||
Else
|
||||
sExtractPath = oBackupInfo.RelativeRestorePath
|
||||
End If
|
||||
'Check if this is a registry backup
|
||||
bRegistry = mgrPath.IsSupportedRegistryPath(oBackupInfo.TruePath)
|
||||
|
||||
'Check if restore location exists, prompt to create if it doesn't.
|
||||
If Not Directory.Exists(sExtractPath) Then
|
||||
If mgrCommon.ShowMessage(mgrRestore_ConfirmCreatePath, sExtractPath, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
Try
|
||||
Directory.CreateDirectory(sExtractPath)
|
||||
Catch ex As Exception
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorCreatePath, ex.Message), False, ToolTipIcon.Error, True)
|
||||
Return False
|
||||
End Try
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorNoPath, sExtractPath), False, ToolTipIcon.Error, True)
|
||||
If bRegistry Then
|
||||
'If this is a registry backup, we need to have elevated permissions in Windows to use reg.exe
|
||||
If Not mgrCommon.IsUnix And Not mgrCommon.IsElevated Then
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorRegBackupElevation, oBackupInfo.Name), False, ToolTipIcon.Info, True)
|
||||
Return False
|
||||
End If
|
||||
Else
|
||||
If bCleanFolder Then
|
||||
mgrCommon.DeleteDirectory(sExtractPath, True)
|
||||
Directory.CreateDirectory(sExtractPath)
|
||||
If oBackupInfo.AbsolutePath Then
|
||||
sExtractPath = oBackupInfo.RestorePath
|
||||
Else
|
||||
sExtractPath = oBackupInfo.RelativeRestorePath
|
||||
End If
|
||||
|
||||
'Check if restore location exists, prompt to create if it doesn't.
|
||||
If Not Directory.Exists(sExtractPath) Then
|
||||
If mgrCommon.ShowMessage(mgrRestore_ConfirmCreatePath, sExtractPath, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
Try
|
||||
Directory.CreateDirectory(sExtractPath)
|
||||
Catch ex As Exception
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorCreatePath, ex.Message), False, ToolTipIcon.Error, True)
|
||||
Return False
|
||||
End Try
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorNoPath, sExtractPath), False, ToolTipIcon.Error, True)
|
||||
Return False
|
||||
End If
|
||||
Else
|
||||
If bCleanFolder Then
|
||||
mgrCommon.DeleteDirectory(sExtractPath, True)
|
||||
Directory.CreateDirectory(sExtractPath)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -170,77 +182,145 @@ Public Class mgrRestore
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function RunRegistryRestore(ByVal oBackupInfo As clsBackup, ByVal sBackupFile As String) As Boolean
|
||||
Dim prsReg As New Process
|
||||
Dim sBinaryPath As String
|
||||
Dim sArguments As String
|
||||
Dim oWineData As clsWineData
|
||||
Dim sWineReg As String
|
||||
Dim bPathVerified As Boolean
|
||||
Dim bRestoreCompleted As Boolean = False
|
||||
|
||||
sArguments = "import """ & sBackupFile & """"
|
||||
|
||||
If mgrCommon.IsUnix Then
|
||||
oWineData = mgrWineData.DoWineDataGetbyID(oBackupInfo.MonitorID)
|
||||
prsReg.StartInfo.EnvironmentVariables.Add("WINEPREFIX", oWineData.Prefix)
|
||||
sBinaryPath = oWineData.BinaryPath & Path.DirectorySeparatorChar & "wine"
|
||||
sWineReg = oWineData.Prefix & Path.DirectorySeparatorChar & "drive_c/windows/system32/reg.exe"
|
||||
sArguments = """" & sWineReg & """ " & sArguments
|
||||
If File.Exists(sBinaryPath) Then
|
||||
If File.Exists(sWineReg) Then
|
||||
bPathVerified = True
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorRegNotFound, sWineReg), False, ToolTipIcon.Error, True)
|
||||
End If
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorWineNotFound, sBinaryPath), False, ToolTipIcon.Error, True)
|
||||
End If
|
||||
Else
|
||||
sBinaryPath = Environment.GetFolderPath(Environment.SpecialFolder.Windows) & Path.DirectorySeparatorChar & "system32\reg.exe"
|
||||
If File.Exists(sBinaryPath) Then
|
||||
bPathVerified = True
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorRegNotFound, sBinaryPath), False, ToolTipIcon.Error, True)
|
||||
End If
|
||||
End If
|
||||
|
||||
If bPathVerified Then
|
||||
Try
|
||||
prsReg.StartInfo.Arguments = sArguments
|
||||
prsReg.StartInfo.FileName = sBinaryPath
|
||||
prsReg.StartInfo.UseShellExecute = False
|
||||
prsReg.StartInfo.RedirectStandardOutput = True
|
||||
prsReg.StartInfo.CreateNoWindow = True
|
||||
prsReg.Start()
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_RestoreInProgress, oBackupInfo.TruePath), False, ToolTipIcon.Info, True)
|
||||
prsReg.WaitForExit()
|
||||
Select Case prsReg.ExitCode
|
||||
Case 0
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_RestoreComplete, oBackupInfo.Name), False, ToolTipIcon.Info, True)
|
||||
bRestoreCompleted = True
|
||||
Case Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_RestoreWarnings, oBackupInfo.Name), True, ToolTipIcon.Warning, True)
|
||||
End Select
|
||||
prsReg.Dispose()
|
||||
Catch ex As Exception
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorOtherFailure, ex.Message), False, ToolTipIcon.Error, True)
|
||||
End Try
|
||||
End If
|
||||
|
||||
Return bRestoreCompleted
|
||||
End Function
|
||||
|
||||
Private Function Run7zRestore(ByVal oBackupInfo As clsBackup, ByVal sBackupFile As String) As Boolean
|
||||
Dim prs7z As New Process
|
||||
Dim sExtractPath As String
|
||||
Dim bRestoreCompleted As Boolean = False
|
||||
|
||||
If oBackupInfo.AbsolutePath Then
|
||||
sExtractPath = oBackupInfo.RestorePath
|
||||
Else
|
||||
sExtractPath = oBackupInfo.RelativeRestorePath
|
||||
End If
|
||||
|
||||
Try
|
||||
If File.Exists(sBackupFile) Then
|
||||
If Settings.Is7zUtilityValid Then
|
||||
prs7z.StartInfo.Arguments = "x" & oSettings.Prepared7zArguments & """" & sBackupFile & """ -o""" & sExtractPath & Path.DirectorySeparatorChar & """ -aoa -r"
|
||||
prs7z.StartInfo.FileName = oSettings.Utility7zLocation
|
||||
prs7z.StartInfo.UseShellExecute = False
|
||||
prs7z.StartInfo.RedirectStandardOutput = True
|
||||
prs7z.StartInfo.CreateNoWindow = True
|
||||
prs7z.Start()
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_RestoreInProgress, sExtractPath), False, ToolTipIcon.Info, True)
|
||||
While Not prs7z.StandardOutput.EndOfStream
|
||||
If CancelOperation Then
|
||||
prs7z.Kill()
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorFullAbort, oBackupInfo.Name), True, ToolTipIcon.Error, True)
|
||||
Exit While
|
||||
End If
|
||||
RaiseEvent UpdateLog(prs7z.StandardOutput.ReadLine, False, ToolTipIcon.Info, False)
|
||||
End While
|
||||
prs7z.WaitForExit()
|
||||
If Not CancelOperation Then
|
||||
If prs7z.ExitCode = 0 Then
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_RestoreComplete, oBackupInfo.Name), False, ToolTipIcon.Info, True)
|
||||
bRestoreCompleted = True
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_RestoreWarnings, oBackupInfo.Name), True, ToolTipIcon.Warning, True)
|
||||
End If
|
||||
End If
|
||||
prs7z.Dispose()
|
||||
Else
|
||||
RaiseEvent UpdateLog(App_Invalid7zDetected, True, ToolTipIcon.Error, True)
|
||||
End If
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrRestore_ErrorNoBackup, True, ToolTipIcon.Error, True)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorOtherFailure, ex.Message), False, ToolTipIcon.Error, True)
|
||||
End Try
|
||||
|
||||
Return bRestoreCompleted
|
||||
End Function
|
||||
|
||||
Public Sub DoRestore(ByVal oRestoreList As List(Of clsBackup))
|
||||
Dim prs7z As Process
|
||||
Dim sBackupFile As String
|
||||
Dim sExtractPath As String
|
||||
Dim bRestoreCompleted As Boolean
|
||||
|
||||
For Each oBackupInfo In oRestoreList
|
||||
'Init
|
||||
prs7z = New Process
|
||||
sBackupFile = oSettings.BackupFolder & Path.DirectorySeparatorChar & oBackupInfo.FileName
|
||||
sExtractPath = String.Empty
|
||||
bRestoreCompleted = False
|
||||
CancelOperation = False
|
||||
RaiseEvent UpdateRestoreInfo(oBackupInfo)
|
||||
|
||||
If oBackupInfo.AbsolutePath Then
|
||||
sExtractPath = oBackupInfo.RestorePath
|
||||
If mgrPath.IsSupportedRegistryPath(oBackupInfo.TruePath) Then
|
||||
bRestoreCompleted = RunRegistryRestore(oBackupInfo, sBackupFile)
|
||||
Else
|
||||
sExtractPath = oBackupInfo.RelativeRestorePath
|
||||
bRestoreCompleted = Run7zRestore(oBackupInfo, sBackupFile)
|
||||
End If
|
||||
|
||||
Try
|
||||
If File.Exists(sBackupFile) Then
|
||||
If Settings.Is7zUtilityValid Then
|
||||
prs7z.StartInfo.Arguments = "x" & oSettings.Prepared7zArguments & """" & sBackupFile & """ -o""" & sExtractPath & Path.DirectorySeparatorChar & """ -aoa -r"
|
||||
prs7z.StartInfo.FileName = oSettings.Utility7zLocation
|
||||
prs7z.StartInfo.UseShellExecute = False
|
||||
prs7z.StartInfo.RedirectStandardOutput = True
|
||||
prs7z.StartInfo.CreateNoWindow = True
|
||||
prs7z.Start()
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_RestoreInProgress, sExtractPath), False, ToolTipIcon.Info, True)
|
||||
While Not prs7z.StandardOutput.EndOfStream
|
||||
If CancelOperation Then
|
||||
prs7z.Kill()
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorFullAbort, oBackupInfo.Name), True, ToolTipIcon.Error, True)
|
||||
Exit While
|
||||
End If
|
||||
RaiseEvent UpdateLog(prs7z.StandardOutput.ReadLine, False, ToolTipIcon.Info, False)
|
||||
End While
|
||||
prs7z.WaitForExit()
|
||||
If Not CancelOperation Then
|
||||
If prs7z.ExitCode = 0 Then
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_RestoreComplete, oBackupInfo.Name), False, ToolTipIcon.Info, True)
|
||||
bRestoreCompleted = True
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_RestoreWarnings, oBackupInfo.Name), True, ToolTipIcon.Warning, True)
|
||||
bRestoreCompleted = False
|
||||
End If
|
||||
End If
|
||||
prs7z.Dispose()
|
||||
Else
|
||||
RaiseEvent UpdateLog(App_Invalid7zDetected, True, ToolTipIcon.Error, True)
|
||||
bRestoreCompleted = False
|
||||
End If
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrRestore_ErrorNoBackup, True, ToolTipIcon.Error, True)
|
||||
End If
|
||||
|
||||
If bRestoreCompleted Then
|
||||
'Save Local Manifest
|
||||
If mgrManifest.DoManifestCheck(oBackupInfo.MonitorID, mgrSQLite.Database.Local) Then
|
||||
mgrManifest.DoManifestUpdateByMonitorID(oBackupInfo, mgrSQLite.Database.Local)
|
||||
Else
|
||||
mgrManifest.DoManifestAdd(oBackupInfo, mgrSQLite.Database.Local)
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorOtherFailure, ex.Message), False, ToolTipIcon.Error, True)
|
||||
End Try
|
||||
|
||||
If bRestoreCompleted Then
|
||||
'Save Local Manifest
|
||||
If mgrManifest.DoManifestCheck(oBackupInfo.MonitorID, mgrSQLite.Database.Local) Then
|
||||
mgrManifest.DoManifestUpdateByMonitorID(oBackupInfo, mgrSQLite.Database.Local)
|
||||
Else
|
||||
mgrManifest.DoManifestAdd(oBackupInfo, mgrSQLite.Database.Local)
|
||||
End If
|
||||
RaiseEvent SetLastAction(mgrCommon.FormatString(mgrRestore_ActionComplete, oBackupInfo.CroppedName))
|
||||
Else
|
||||
RaiseEvent SetLastAction(mgrCommon.FormatString(mgrRestore_ActionFailed, oBackupInfo.CroppedName))
|
||||
|
||||
@@ -75,8 +75,8 @@ Public Class mgrSQLite
|
||||
"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, " &
|
||||
"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, " &
|
||||
"DisableDiskSpaceCheck BOOLEAN NOT NULL, ThemeSelection INTEGER NOT NULL, AutoHideLog BOOLEAN NOT NULL);"
|
||||
'Add Tables (SavedPath)
|
||||
sSql &= "CREATE TABLE savedpath (PathName TEXT NOT NULL PRIMARY KEY, Path TEXT NOT NULL);"
|
||||
|
||||
@@ -84,7 +84,8 @@ Public Class mgrSQLite
|
||||
sSql &= "CREATE TABLE monitorlist (MonitorID TEXT NOT NULL PRIMARY KEY, Name TEXT NOT NULL, Process TEXT NOT NULL, Path TEXT, " &
|
||||
"AbsolutePath BOOLEAN NOT NULL, FolderSave BOOLEAN NOT NULL, FileType TEXT, TimeStamp BOOLEAN NOT NULL, ExcludeList TEXT NOT NULL, " &
|
||||
"ProcessPath TEXT, Icon TEXT, Hours REAL, Version TEXT, Company TEXT, Enabled BOOLEAN NOT NULL, MonitorOnly BOOLEAN NOT NULL, " &
|
||||
"BackupLimit INTEGER NOT NULL, CleanFolder BOOLEAN NOT NULL, Parameter TEXT, Comments TEXT, IsRegEx BOOLEAN NOT NULL);"
|
||||
"BackupLimit INTEGER NOT NULL, CleanFolder BOOLEAN NOT NULL, Parameter TEXT, Comments TEXT, IsRegEx BOOLEAN NOT NULL, RecurseSubFolders NOT NULL, " &
|
||||
"OS INTEGER NOT NULL);"
|
||||
|
||||
'Add Tables (Tags)
|
||||
sSql &= "CREATE TABLE tags (TagID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL PRIMARY KEY); "
|
||||
@@ -108,6 +109,9 @@ Public Class mgrSQLite
|
||||
'Add Tables (Game Processes)
|
||||
sSql &= "CREATE TABLE gameprocesses (ProcessID TEXT NOT NULL, MonitorID TEXT NOT NULL, PRIMARY KEY(ProcessID, MonitorID));"
|
||||
|
||||
'Add Tables (Wine Data)
|
||||
sSql &= "CREATE TABLE winedata (MonitorID TEXT NOT NULL PRIMARY KEY, Prefix TEXT NOT NULL, SavePath TEXT NOT NULL, BinaryPath TEXT NOT NULL);"
|
||||
|
||||
'Set Version
|
||||
sSql &= "PRAGMA user_version=" & mgrCommon.AppVersion
|
||||
|
||||
@@ -130,17 +134,18 @@ Public Class mgrSQLite
|
||||
sSql = "CREATE TABLE monitorlist (MonitorID TEXT NOT NULL PRIMARY KEY, Name TEXT NOT NULL, Process TEXT NOT NULL, Path TEXT, " &
|
||||
"AbsolutePath BOOLEAN NOT NULL, FolderSave BOOLEAN NOT NULL, FileType TEXT, TimeStamp BOOLEAN NOT NULL, ExcludeList TEXT NOT NULL, " &
|
||||
"ProcessPath TEXT, Icon TEXT, Hours REAL, Version TEXT, Company TEXT, Enabled BOOLEAN NOT NULL, MonitorOnly BOOLEAN NOT NULL, " &
|
||||
"BackupLimit INTEGER NOT NULL, CleanFolder BOOLEAN NOT NULL, Parameter TEXT, Comments TEXT, IsRegEx BOOLEAN NOT NULL);"
|
||||
"BackupLimit INTEGER NOT NULL, CleanFolder BOOLEAN NOT NULL, Parameter TEXT, Comments TEXT, IsRegEx BOOLEAN NOT NULL, RecurseSubFolders NOT NULL, " &
|
||||
"OS INTEGER NOT NULL);"
|
||||
|
||||
'Add Tables (Remote Manifest)
|
||||
sSql &= "CREATE TABLE manifest (ManifestID TEXT NOT NULL PRIMARY KEY, MonitorID TEXT NOT NULL, FileName TEXT NOT NULL, " &
|
||||
"DateUpdated TEXT NOT NULL, UpdatedBy TEXT NOT NULL, CheckSum TEXT);"
|
||||
sSql &= "CREATE TABLE manifest (ManifestID TEXT Not NULL PRIMARY KEY, MonitorID TEXT Not NULL, FileName TEXT Not NULL, " &
|
||||
"DateUpdated TEXT Not NULL, UpdatedBy TEXT Not NULL, CheckSum TEXT);"
|
||||
|
||||
'Add Tables (Remote Tags)
|
||||
sSql &= "CREATE TABLE tags (TagID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL PRIMARY KEY); "
|
||||
sSql &= "CREATE TABLE tags (TagID TEXT Not NULL UNIQUE, Name TEXT Not NULL PRIMARY KEY); "
|
||||
|
||||
'Add Tables (Remote Game Tags)
|
||||
sSql &= "CREATE TABLE gametags (TagID TEXT NOT NULL, MonitorID TEXT NOT NULL, PRIMARY KEY(TagID, MonitorID)); "
|
||||
sSql &= "CREATE TABLE gametags (TagID TEXT Not NULL, MonitorID TEXT Not NULL, PRIMARY KEY(TagID, MonitorID)); "
|
||||
|
||||
'Set Version
|
||||
sSql &= "PRAGMA user_version=" & mgrCommon.AppVersion
|
||||
@@ -379,7 +384,7 @@ Public Class mgrSQLite
|
||||
'0.9 Upgrade
|
||||
If GetDatabaseVersion() < 90 Then
|
||||
BackupDB("v8")
|
||||
sSQL = "ALTER TABLE monitorlist ADD COLUMN MonitorOnly BOOLEAN NOT NULL DEFAULT 0;"
|
||||
sSQL = "ALTER TABLE monitorlist ADD COLUMN MonitorOnly BOOLEAN Not NULL DEFAULT 0;"
|
||||
sSQL &= "PRAGMA user_version=90"
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
End If
|
||||
@@ -391,25 +396,25 @@ Public Class mgrSQLite
|
||||
BackupDB("v84")
|
||||
|
||||
'Overhaul Monitor List Table
|
||||
sSQL = "CREATE TABLE monitorlist_new (MonitorID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL, Process TEXT NOT NULL, Path TEXT, AbsolutePath BOOLEAN NOT NULL, FolderSave BOOLEAN NOT NULL, FileType TEXT, TimeStamp BOOLEAN NOT NULL, ExcludeList TEXT NOT NULL, ProcessPath TEXT, Icon TEXT, Hours REAL, Version TEXT, Company TEXT, Enabled BOOLEAN NOT NULL, MonitorOnly BOOLEAN NOT NULL, PRIMARY KEY(Name, Process));"
|
||||
sSQL = "CREATE TABLE monitorlist_new (MonitorID TEXT Not NULL UNIQUE, Name TEXT Not NULL, Process TEXT Not NULL, Path TEXT, AbsolutePath BOOLEAN Not NULL, FolderSave BOOLEAN Not NULL, FileType TEXT, TimeStamp BOOLEAN Not NULL, ExcludeList TEXT Not NULL, ProcessPath TEXT, Icon TEXT, Hours REAL, Version TEXT, Company TEXT, Enabled BOOLEAN Not NULL, MonitorOnly BOOLEAN Not NULL, PRIMARY KEY(Name, Process));"
|
||||
sSQL &= "INSERT INTO monitorlist_new (MonitorID, Name, Process, Path, AbsolutePath, FolderSave, FileType, TimeStamp, ExcludeList, ProcessPath, Icon, Hours, Version, Company, Enabled, MonitorOnly) "
|
||||
sSQL &= "SELECT MonitorID, Name, Process, Path, AbsolutePath, FolderSave, FileType, TimeStamp, ExcludeList, ProcessPath, Icon, Hours, Version, Company, Enabled, MonitorOnly FROM monitorlist;"
|
||||
sSQL &= "DROP TABLE monitorlist; ALTER TABLE monitorlist_new RENAME TO monitorlist;"
|
||||
|
||||
'Overhaul Variables Table
|
||||
sSQL &= "CREATE TABLE variables_new (VariableID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL PRIMARY KEY, Path TEXT NOT NULL);"
|
||||
sSQL &= "CREATE TABLE variables_new (VariableID TEXT Not NULL UNIQUE, Name TEXT Not NULL PRIMARY KEY, Path TEXT Not NULL);"
|
||||
sSQL &= "INSERT INTO variables_new (VariableID, Name, Path) SELECT VariableID, Name, Path FROM variables;"
|
||||
sSQL &= "DROP TABLE variables; ALTER TABLE variables_new RENAME TO variables;"
|
||||
|
||||
'Overhaul Manifest Table
|
||||
sSQL &= "CREATE TABLE manifest_new (ManifestID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL PRIMARY KEY, FileName TEXT NOT NULL, RestorePath TEXT NOT NULL, AbsolutePath BOOLEAN NOT NULL, DateUpdated TEXT NOT NULL, UpdatedBy TEXT NOT NULL, CheckSum TEXT);"
|
||||
sSQL &= "CREATE TABLE manifest_new (ManifestID TEXT Not NULL UNIQUE, Name TEXT Not NULL PRIMARY KEY, FileName TEXT Not NULL, RestorePath TEXT Not NULL, AbsolutePath BOOLEAN Not NULL, DateUpdated TEXT Not NULL, UpdatedBy TEXT Not NULL, CheckSum TEXT);"
|
||||
sSQL &= "INSERT INTO manifest_new (ManifestID, Name, FileName, RestorePath, AbsolutePath, DateUpdated, UpdatedBy) "
|
||||
sSQL &= "SELECT ManifestID, Name, FileName, RestorePath, AbsolutePath, DateUpdated, UpdatedBy FROM manifest;"
|
||||
sSQL &= "DROP TABLE manifest; ALTER TABLE manifest_new RENAME TO manifest;"
|
||||
|
||||
'Add new settings
|
||||
sSQL &= "ALTER TABLE settings ADD COLUMN Sync BOOLEAN NOT NULL DEFAULT 1;"
|
||||
sSQL &= "ALTER TABLE settings ADD COLUMN CheckSum BOOLEAN NOT NULL DEFAULT 1;"
|
||||
sSQL &= "ALTER TABLE settings ADD COLUMN Sync BOOLEAN Not NULL DEFAULT 1;"
|
||||
sSQL &= "ALTER TABLE settings ADD COLUMN CheckSum BOOLEAN Not NULL DEFAULT 1;"
|
||||
sSQL &= "PRAGMA user_version=91"
|
||||
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
@@ -427,13 +432,13 @@ Public Class mgrSQLite
|
||||
BackupDB("v84")
|
||||
|
||||
'Overhaul Monitor List Table
|
||||
sSQL = "CREATE TABLE monitorlist_new (MonitorID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL, Process TEXT NOT NULL, Path TEXT, AbsolutePath BOOLEAN NOT NULL, FolderSave BOOLEAN NOT NULL, FileType TEXT, TimeStamp BOOLEAN NOT NULL, ExcludeList TEXT NOT NULL, ProcessPath TEXT, Icon TEXT, Hours REAL, Version TEXT, Company TEXT, Enabled BOOLEAN NOT NULL, MonitorOnly BOOLEAN NOT NULL, PRIMARY KEY(Name, Process));"
|
||||
sSQL = "CREATE TABLE monitorlist_new (MonitorID TEXT Not NULL UNIQUE, Name TEXT Not NULL, Process TEXT Not NULL, Path TEXT, AbsolutePath BOOLEAN Not NULL, FolderSave BOOLEAN Not NULL, FileType TEXT, TimeStamp BOOLEAN Not NULL, ExcludeList TEXT Not NULL, ProcessPath TEXT, Icon TEXT, Hours REAL, Version TEXT, Company TEXT, Enabled BOOLEAN Not NULL, MonitorOnly BOOLEAN Not NULL, PRIMARY KEY(Name, Process));"
|
||||
sSQL &= "INSERT INTO monitorlist_new (MonitorID, Name, Process, Path, AbsolutePath, FolderSave, FileType, TimeStamp, ExcludeList, ProcessPath, Icon, Hours, Version, Company, Enabled, MonitorOnly) "
|
||||
sSQL &= "SELECT MonitorID, Name, Process, Path, AbsolutePath, FolderSave, FileType, TimeStamp, ExcludeList, ProcessPath, Icon, Hours, Version, Company, Enabled, MonitorOnly FROM monitorlist;"
|
||||
sSQL &= "DROP TABLE monitorlist; ALTER TABLE monitorlist_new RENAME TO monitorlist;"
|
||||
|
||||
'Overhaul Manifest Table
|
||||
sSQL &= "CREATE TABLE manifest_new (ManifestID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL PRIMARY KEY, FileName TEXT NOT NULL, RestorePath TEXT NOT NULL, AbsolutePath BOOLEAN NOT NULL, DateUpdated TEXT NOT NULL, UpdatedBy TEXT NOT NULL, CheckSum TEXT);"
|
||||
sSQL &= "CREATE TABLE manifest_new (ManifestID TEXT Not NULL UNIQUE, Name TEXT Not NULL PRIMARY KEY, FileName TEXT Not NULL, RestorePath TEXT Not NULL, AbsolutePath BOOLEAN Not NULL, DateUpdated TEXT Not NULL, UpdatedBy TEXT Not NULL, CheckSum TEXT);"
|
||||
sSQL &= "INSERT INTO manifest_new (ManifestID, Name, FileName, RestorePath, AbsolutePath, DateUpdated, UpdatedBy) "
|
||||
sSQL &= "SELECT ManifestID, Name, FileName, RestorePath, AbsolutePath, DateUpdated, UpdatedBy FROM manifest;"
|
||||
sSQL &= "DROP TABLE manifest; ALTER TABLE manifest_new RENAME TO manifest;"
|
||||
@@ -457,7 +462,7 @@ Public Class mgrSQLite
|
||||
BackupDB("v91")
|
||||
|
||||
'Add new setting
|
||||
sSQL = "ALTER TABLE settings ADD COLUMN StartWithWindows BOOLEAN NOT NULL DEFAULT 0;"
|
||||
sSQL = "ALTER TABLE settings ADD COLUMN StartWithWindows BOOLEAN Not NULL DEFAULT 0;"
|
||||
sSQL &= "PRAGMA user_version=92"
|
||||
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
@@ -503,11 +508,11 @@ Public Class mgrSQLite
|
||||
BackupDB("v93")
|
||||
|
||||
'Add Tags Tables
|
||||
sSQL = "CREATE TABLE tags (TagID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL PRIMARY KEY); "
|
||||
sSQL &= "CREATE TABLE gametags (TagID TEXT NOT NULL, MonitorID TEXT NOT NULL, PRIMARY KEY(TagID, MonitorID)); "
|
||||
sSQL = "CREATE TABLE tags (TagID TEXT Not NULL UNIQUE, Name TEXT Not NULL PRIMARY KEY); "
|
||||
sSQL &= "CREATE TABLE gametags (TagID TEXT Not NULL, MonitorID TEXT Not NULL, PRIMARY KEY(TagID, MonitorID)); "
|
||||
|
||||
'Add new setting
|
||||
sSQL &= "ALTER TABLE settings ADD COLUMN TimeTracking BOOLEAN NOT NULL DEFAULT 1;"
|
||||
sSQL &= "ALTER TABLE settings ADD COLUMN TimeTracking BOOLEAN Not NULL DEFAULT 1;"
|
||||
|
||||
sSQL &= "PRAGMA user_version=94"
|
||||
|
||||
@@ -518,8 +523,8 @@ Public Class mgrSQLite
|
||||
BackupDB("v93")
|
||||
|
||||
'Add Tags Tables
|
||||
sSQL = "CREATE TABLE tags (TagID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL PRIMARY KEY); "
|
||||
sSQL &= "CREATE TABLE gametags (TagID TEXT NOT NULL, MonitorID TEXT NOT NULL, PRIMARY KEY(TagID, MonitorID)); "
|
||||
sSQL = "CREATE TABLE tags (TagID TEXT Not NULL UNIQUE, Name TEXT Not NULL PRIMARY KEY); "
|
||||
sSQL &= "CREATE TABLE gametags (TagID TEXT Not NULL, MonitorID TEXT Not NULL, PRIMARY KEY(TagID, MonitorID)); "
|
||||
|
||||
sSQL &= "PRAGMA user_version=94"
|
||||
|
||||
@@ -534,8 +539,8 @@ Public Class mgrSQLite
|
||||
BackupDB("v94")
|
||||
|
||||
'Add new setting
|
||||
sSQL = "ALTER TABLE settings ADD COLUMN SupressBackup BOOLEAN NOT NULL DEFAULT 0;"
|
||||
sSQL &= "ALTER TABLE settings ADD COLUMN SupressBackupThreshold INTEGER NOT NULL DEFAULT 10;"
|
||||
sSQL = "ALTER TABLE settings ADD COLUMN SupressBackup BOOLEAN Not NULL DEFAULT 0;"
|
||||
sSQL &= "ALTER TABLE settings ADD COLUMN SupressBackupThreshold INTEGER Not NULL DEFAULT 10;"
|
||||
|
||||
sSQL &= "PRAGMA user_version=95"
|
||||
|
||||
@@ -558,7 +563,7 @@ Public Class mgrSQLite
|
||||
BackupDB("v95")
|
||||
|
||||
'Add new setting
|
||||
sSQL = "ALTER TABLE settings ADD COLUMN CompressionLevel INTEGER NOT NULL DEFAULT 5;"
|
||||
sSQL = "ALTER TABLE settings ADD COLUMN CompressionLevel INTEGER Not NULL DEFAULT 5;"
|
||||
|
||||
sSQL &= "PRAGMA user_version=96"
|
||||
|
||||
@@ -583,8 +588,8 @@ Public Class mgrSQLite
|
||||
'Add new settings
|
||||
sSQL = "ALTER TABLE settings ADD COLUMN Custom7zArguments TEXT;"
|
||||
sSQL &= "ALTER TABLE settings ADD COLUMN Custom7zLocation TEXT;"
|
||||
sSQL &= "ALTER TABLE settings ADD COLUMN SyncFields INTEGER NOT NULL DEFAULT 32;"
|
||||
sSQL &= "ALTER TABLE settings ADD COLUMN AutoSaveLog BOOLEAN NOT NULL DEFAULT 0;"
|
||||
sSQL &= "ALTER TABLE settings ADD COLUMN SyncFields INTEGER Not NULL DEFAULT 32;"
|
||||
sSQL &= "ALTER TABLE settings ADD COLUMN AutoSaveLog BOOLEAN Not NULL DEFAULT 0;"
|
||||
sSQL &= "PRAGMA user_version=97"
|
||||
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
@@ -606,13 +611,13 @@ Public Class mgrSQLite
|
||||
BackupDB("v97")
|
||||
|
||||
'Overhaul Manifest Table
|
||||
sSQL = "CREATE TABLE manifest_new (ManifestID TEXT NOT NULL PRIMARY KEY, Name TEXT NOT NULL, FileName TEXT NOT NULL, RestorePath TEXT NOT NULL, AbsolutePath BOOLEAN NOT NULL, DateUpdated TEXT NOT NULL, UpdatedBy TEXT NOT NULL, CheckSum TEXT);"
|
||||
sSQL = "CREATE TABLE manifest_new (ManifestID TEXT Not NULL PRIMARY KEY, Name TEXT Not NULL, FileName TEXT Not NULL, RestorePath TEXT Not NULL, AbsolutePath BOOLEAN Not NULL, DateUpdated TEXT Not NULL, UpdatedBy TEXT Not NULL, CheckSum TEXT);"
|
||||
sSQL &= "INSERT INTO manifest_new (ManifestID, Name, FileName, RestorePath, AbsolutePath, DateUpdated, UpdatedBy) "
|
||||
sSQL &= "SELECT ManifestID, Name, FileName, RestorePath, AbsolutePath, DateUpdated, UpdatedBy FROM manifest;"
|
||||
sSQL &= "DROP TABLE manifest; ALTER TABLE manifest_new RENAME TO manifest;"
|
||||
|
||||
'Add backup limit field
|
||||
sSQL &= "ALTER TABLE monitorlist ADD COLUMN BackupLimit INTEGER NOT NULL DEFAULT 5;"
|
||||
sSQL &= "ALTER TABLE monitorlist ADD COLUMN BackupLimit INTEGER Not NULL DEFAULT 5;"
|
||||
|
||||
sSQL &= "PRAGMA user_version=98"
|
||||
|
||||
@@ -626,13 +631,13 @@ Public Class mgrSQLite
|
||||
BackupDB("v97")
|
||||
|
||||
'Overhaul Manifest Table
|
||||
sSQL = "CREATE TABLE manifest_new (ManifestID TEXT NOT NULL PRIMARY KEY, Name TEXT NOT NULL, FileName TEXT NOT NULL, RestorePath TEXT NOT NULL, AbsolutePath BOOLEAN NOT NULL, DateUpdated TEXT NOT NULL, UpdatedBy TEXT NOT NULL, CheckSum TEXT);"
|
||||
sSQL = "CREATE TABLE manifest_new (ManifestID TEXT Not NULL PRIMARY KEY, Name TEXT Not NULL, FileName TEXT Not NULL, RestorePath TEXT Not NULL, AbsolutePath BOOLEAN Not NULL, DateUpdated TEXT Not NULL, UpdatedBy TEXT Not NULL, CheckSum TEXT);"
|
||||
sSQL &= "INSERT INTO manifest_new (ManifestID, Name, FileName, RestorePath, AbsolutePath, DateUpdated, UpdatedBy) "
|
||||
sSQL &= "SELECT ManifestID, Name, FileName, RestorePath, AbsolutePath, DateUpdated, UpdatedBy FROM manifest;"
|
||||
sSQL &= "DROP TABLE manifest; ALTER TABLE manifest_new RENAME TO manifest;"
|
||||
|
||||
'Add backup limit field
|
||||
sSQL &= "ALTER TABLE monitorlist ADD COLUMN BackupLimit INTEGER NOT NULL DEFAULT 5;"
|
||||
sSQL &= "ALTER TABLE monitorlist ADD COLUMN BackupLimit INTEGER Not NULL DEFAULT 5;"
|
||||
|
||||
sSQL &= "PRAGMA user_version=98"
|
||||
|
||||
@@ -650,11 +655,11 @@ Public Class mgrSQLite
|
||||
BackupDB("v98")
|
||||
|
||||
'Remove checksum field
|
||||
sSQL = "CREATE TABLE settings_new (SettingsID INTEGER NOT NULL PRIMARY KEY, MonitorOnStartup BOOLEAN NOT NULL, StartToTray BOOLEAN NOT NULL, ShowDetectionToolTips BOOLEAN NOT NULL, " &
|
||||
"DisableConfirmation BOOLEAN NOT NULL, CreateSubFolder BOOLEAN NOT NULL, ShowOverwriteWarning BOOLEAN NOT NULL, RestoreOnLaunch BOOLEAN NOT NULL, " &
|
||||
"BackupFolder TEXT NOT NULL, Sync BOOLEAN NOT NULL, StartWithWindows BOOLEAN NOT NULL, TimeTracking BOOLEAN NOT NULL, " &
|
||||
"SupressBackup BOOLEAN NOT NULL, SupressBackupThreshold INTEGER NOT NULL, CompressionLevel INTEGER NOT NULL, Custom7zArguments TEXT, " &
|
||||
"Custom7zLocation TEXT, SyncFields INTEGER NOT NULL, AutoSaveLog BOOLEAN NOT NULL);"
|
||||
sSQL = "CREATE TABLE settings_new (SettingsID INTEGER Not NULL PRIMARY KEY, MonitorOnStartup BOOLEAN Not NULL, StartToTray BOOLEAN Not NULL, ShowDetectionToolTips BOOLEAN Not NULL, " &
|
||||
"DisableConfirmation BOOLEAN Not NULL, CreateSubFolder BOOLEAN Not NULL, ShowOverwriteWarning BOOLEAN Not NULL, RestoreOnLaunch BOOLEAN Not NULL, " &
|
||||
"BackupFolder TEXT Not NULL, Sync BOOLEAN Not NULL, StartWithWindows BOOLEAN Not NULL, TimeTracking BOOLEAN Not NULL, " &
|
||||
"SupressBackup BOOLEAN Not NULL, SupressBackupThreshold INTEGER Not NULL, CompressionLevel INTEGER Not NULL, Custom7zArguments TEXT, " &
|
||||
"Custom7zLocation TEXT, SyncFields INTEGER Not NULL, AutoSaveLog BOOLEAN Not NULL);"
|
||||
sSQL &= "INSERT INTO settings_new (SettingsID, MonitorOnStartup, StartToTray, ShowDetectionToolTips, DisableConfirmation, CreateSubFolder, " &
|
||||
"ShowOverwriteWarning, RestoreOnLaunch, BackupFolder, Sync, StartWithWindows, TimeTracking, SupressBackup, SupressBackupThreshold, " &
|
||||
"CompressionLevel, Custom7zArguments, Custom7zLocation, SyncFields, AutoSaveLog) " &
|
||||
@@ -663,9 +668,9 @@ Public Class mgrSQLite
|
||||
"CompressionLevel, Custom7zArguments, Custom7zLocation, SyncFields, AutoSaveLog FROM settings;" &
|
||||
"DROP TABLE settings; ALTER TABLE settings_new RENAME TO settings;"
|
||||
'Add new field(s)
|
||||
sSQL &= "ALTER TABLE monitorlist ADD COLUMN CleanFolder BOOLEAN NOT NULL DEFAULT 0;"
|
||||
sSQL &= "ALTER TABLE settings ADD COLUMN AutoRestore BOOLEAN NOT NULL DEFAULT 0;"
|
||||
sSQL &= "ALTER TABLE settings ADD COLUMN AutoMark BOOLEAN NOT NULL DEFAULT 0;"
|
||||
sSQL &= "ALTER TABLE monitorlist ADD COLUMN CleanFolder BOOLEAN Not NULL DEFAULT 0;"
|
||||
sSQL &= "ALTER TABLE settings ADD COLUMN AutoRestore BOOLEAN Not NULL DEFAULT 0;"
|
||||
sSQL &= "ALTER TABLE settings ADD COLUMN AutoMark BOOLEAN Not NULL DEFAULT 0;"
|
||||
sSQL &= "PRAGMA user_version=101"
|
||||
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
@@ -675,7 +680,7 @@ Public Class mgrSQLite
|
||||
BackupDB("v98")
|
||||
|
||||
'Add new field(s)
|
||||
sSQL = "ALTER TABLE monitorlist ADD COLUMN CleanFolder BOOLEAN NOT NULL DEFAULT 0;"
|
||||
sSQL = "ALTER TABLE monitorlist ADD COLUMN CleanFolder BOOLEAN Not NULL DEFAULT 0;"
|
||||
sSQL &= "PRAGMA user_version=101"
|
||||
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
@@ -689,7 +694,7 @@ Public Class mgrSQLite
|
||||
BackupDB("v101")
|
||||
|
||||
'Add Table (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);"
|
||||
|
||||
'Add new field(s)
|
||||
sSQL &= "ALTER TABLE monitorlist ADD COLUMN Parameter TEXT;"
|
||||
@@ -718,7 +723,7 @@ Public Class mgrSQLite
|
||||
BackupDB("v102")
|
||||
|
||||
'Add Tables (Sessions)
|
||||
sSQL = "CREATE TABLE sessions (MonitorID TEXT NOT NULL, Start INTEGER NOT NULL, End INTEGER NOT NULL, PRIMARY KEY(MonitorID, Start));"
|
||||
sSQL = "CREATE TABLE sessions (MonitorID TEXT Not NULL, Start INTEGER Not NULL, End INTEGER Not NULL, PRIMARY KEY(MonitorID, Start));"
|
||||
|
||||
'Add new field(s)
|
||||
sSQL &= "ALTER TABLE monitorlist ADD COLUMN Comments TEXT;"
|
||||
@@ -748,7 +753,7 @@ Public Class mgrSQLite
|
||||
BackupDB("v105")
|
||||
|
||||
'Add new field(s)
|
||||
sSQL = "ALTER TABLE monitorlist ADD COLUMN IsRegEx BOOLEAN NOT NULL DEFAULT 0;"
|
||||
sSQL = "ALTER TABLE monitorlist ADD COLUMN IsRegEx BOOLEAN Not NULL DEFAULT 0;"
|
||||
|
||||
sSQL &= "PRAGMA user_version=108"
|
||||
|
||||
@@ -759,7 +764,7 @@ Public Class mgrSQLite
|
||||
BackupDB("v105")
|
||||
|
||||
'Add new field(s)
|
||||
sSQL = "ALTER TABLE monitorlist ADD COLUMN IsRegEx BOOLEAN NOT NULL DEFAULT 0;"
|
||||
sSQL = "ALTER TABLE monitorlist ADD COLUMN IsRegEx BOOLEAN Not NULL DEFAULT 0;"
|
||||
|
||||
sSQL &= "PRAGMA user_version=108"
|
||||
|
||||
@@ -774,33 +779,33 @@ Public Class mgrSQLite
|
||||
BackupDB("v108")
|
||||
|
||||
'Add Tables
|
||||
sSQL = "CREATE TABLE processes (ProcessID TEXT NOT NULL PRIMARY KEY, Name Text NOT NULL, Path TEXT NOT NULL, Args TEXT, Kill BOOLEAN NOT NULL);"
|
||||
sSQL &= "CREATE TABLE gameprocesses (ProcessID TEXT NOT NULL, MonitorID TEXT NOT NULL, PRIMARY KEY(ProcessID, MonitorID));"
|
||||
sSQL = "CREATE TABLE processes (ProcessID TEXT Not NULL PRIMARY KEY, Name Text Not NULL, Path TEXT Not NULL, Args TEXT, Kill BOOLEAN Not NULL);"
|
||||
sSQL &= "CREATE TABLE gameprocesses (ProcessID TEXT Not NULL, MonitorID TEXT Not NULL, PRIMARY KEY(ProcessID, MonitorID));"
|
||||
|
||||
'Overhaul Tables
|
||||
sSQL &= "CREATE TABLE settings_new (SettingsID INTEGER NOT NULL PRIMARY KEY, MonitorOnStartup BOOLEAN NOT NULL, StartToTray BOOLEAN NOT NULL, ShowDetectionToolTips BOOLEAN NOT NULL, " &
|
||||
"DisableConfirmation BOOLEAN NOT NULL, CreateSubFolder BOOLEAN NOT NULL, ShowOverwriteWarning BOOLEAN NOT NULL, RestoreOnLaunch 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, " &
|
||||
"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);"
|
||||
sSQL &= "CREATE TABLE settings_new (SettingsID INTEGER Not NULL PRIMARY KEY, MonitorOnStartup BOOLEAN Not NULL, StartToTray BOOLEAN Not NULL, ShowDetectionToolTips BOOLEAN Not NULL, " &
|
||||
"DisableConfirmation BOOLEAN Not NULL, CreateSubFolder BOOLEAN Not NULL, ShowOverwriteWarning BOOLEAN Not NULL, RestoreOnLaunch 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, " &
|
||||
"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);"
|
||||
sSQL &= "INSERT INTO settings_new(SettingsID, MonitorOnStartup, StartToTray, ShowDetectionToolTips, DisableConfirmation, CreateSubFolder, ShowOverwriteWarning, RestoreOnLaunch, " &
|
||||
"BackupFolder, StartWithWindows, TimeTracking, SuppressBackup, SuppressBackupThreshold, CompressionLevel, Custom7zArguments, Custom7zLocation, SyncFields, AutoSaveLog, " &
|
||||
"AutoRestore, AutoMark, SessionTracking, SuppressMessages, BackupOnLaunch, UseGameID, DisableSyncMessages) SELECT SettingsID, MonitorOnStartup, StartToTray, ShowDetectionToolTips, DisableConfirmation, CreateSubFolder, ShowOverwriteWarning, RestoreOnLaunch, " &
|
||||
"BackupFolder, StartWithWindows, TimeTracking, SupressBackup, SupressBackupThreshold, CompressionLevel, Custom7zArguments, Custom7zLocation, SyncFields, AutoSaveLog, " &
|
||||
"AutoRestore, AutoMark, SessionTracking, 0, 1, 0, 1 FROM settings;" &
|
||||
"DROP TABLE settings; ALTER TABLE settings_new RENAME TO settings;"
|
||||
sSQL &= "CREATE TABLE monitorlist_new (MonitorID TEXT NOT NULL PRIMARY KEY, Name TEXT NOT NULL, Process TEXT NOT NULL, Path TEXT, " &
|
||||
"AbsolutePath BOOLEAN NOT NULL, FolderSave BOOLEAN NOT NULL, FileType TEXT, TimeStamp BOOLEAN NOT NULL, ExcludeList TEXT NOT NULL, " &
|
||||
"ProcessPath TEXT, Icon TEXT, Hours REAL, Version TEXT, Company TEXT, Enabled BOOLEAN NOT NULL, MonitorOnly BOOLEAN NOT NULL, " &
|
||||
"BackupLimit INTEGER NOT NULL, CleanFolder BOOLEAN NOT NULL, Parameter TEXT, Comments TEXT, IsRegEx BOOLEAN NOT NULL);"
|
||||
sSQL &= "CREATE TABLE monitorlist_new (MonitorID TEXT Not NULL PRIMARY KEY, Name TEXT Not NULL, Process TEXT Not NULL, Path TEXT, " &
|
||||
"AbsolutePath BOOLEAN Not NULL, FolderSave BOOLEAN Not NULL, FileType TEXT, TimeStamp BOOLEAN Not NULL, ExcludeList TEXT Not NULL, " &
|
||||
"ProcessPath TEXT, Icon TEXT, Hours REAL, Version TEXT, Company TEXT, Enabled BOOLEAN Not NULL, MonitorOnly BOOLEAN Not NULL, " &
|
||||
"BackupLimit INTEGER Not NULL, CleanFolder BOOLEAN Not NULL, Parameter TEXT, Comments TEXT, IsRegEx BOOLEAN Not NULL);"
|
||||
sSQL &= "INSERT INTO monitorlist_new (MonitorID, Name, Process, Path, AbsolutePath, FolderSave, FileType, TimeStamp, ExcludeList, " &
|
||||
"ProcessPath, Icon, Hours, Version, Company, Enabled, MonitorOnly, BackupLimit, CleanFolder, Parameter, Comments, IsRegEx)" &
|
||||
"SELECT MonitorID, Name, Process, Path, AbsolutePath, FolderSave, FileType, TimeStamp, ExcludeList, " &
|
||||
"ProcessPath, Icon, Hours, Version, Company, Enabled, MonitorOnly, BackupLimit, CleanFolder, Parameter, Comments, IsRegEx FROM monitorlist;" &
|
||||
"DROP TABLE monitorlist; ALTER TABLE monitorlist_new RENAME TO monitorlist;"
|
||||
sSQL &= "CREATE TABLE manifest_new (ManifestID TEXT NOT NULL PRIMARY KEY, MonitorID TEXT NOT NULL, FileName TEXT NOT NULL, " &
|
||||
"DateUpdated TEXT NOT NULL, UpdatedBy TEXT NOT NULL, CheckSum TEXT);"
|
||||
sSQL &= "CREATE TABLE manifest_new (ManifestID TEXT Not NULL PRIMARY KEY, MonitorID TEXT Not NULL, FileName TEXT Not NULL, " &
|
||||
"DateUpdated TEXT Not NULL, UpdatedBy TEXT Not NULL, CheckSum TEXT);"
|
||||
sSQL &= "INSERT INTO manifest_new (ManifestID, MonitorID, FileName, DateUpdated, UpdatedBy, CheckSum) " &
|
||||
"SELECT ManifestID, MonitorID, FileName, DateUpdated, UpdatedBy, CheckSum FROM manifest NATURAL JOIN monitorlist GROUP BY ManifestID;" &
|
||||
"DROP TABLE manifest; ALTER TABLE manifest_new RENAME TO manifest;"
|
||||
@@ -817,10 +822,10 @@ Public Class mgrSQLite
|
||||
BackupDB("v108")
|
||||
|
||||
'Overhaul Tables
|
||||
sSQL = "CREATE TABLE monitorlist_new (MonitorID TEXT NOT NULL PRIMARY KEY, Name TEXT NOT NULL, Process TEXT NOT NULL, Path TEXT, " &
|
||||
"AbsolutePath BOOLEAN NOT NULL, FolderSave BOOLEAN NOT NULL, FileType TEXT, TimeStamp BOOLEAN NOT NULL, ExcludeList TEXT NOT NULL, " &
|
||||
"ProcessPath TEXT, Icon TEXT, Hours REAL, Version TEXT, Company TEXT, Enabled BOOLEAN NOT NULL, MonitorOnly BOOLEAN NOT NULL, " &
|
||||
"BackupLimit INTEGER NOT NULL, CleanFolder BOOLEAN NOT NULL, Parameter TEXT, Comments TEXT, IsRegEx BOOLEAN NOT NULL);"
|
||||
sSQL = "CREATE TABLE monitorlist_new (MonitorID TEXT Not NULL PRIMARY KEY, Name TEXT Not NULL, Process TEXT Not NULL, Path TEXT, " &
|
||||
"AbsolutePath BOOLEAN Not NULL, FolderSave BOOLEAN Not NULL, FileType TEXT, TimeStamp BOOLEAN Not NULL, ExcludeList TEXT Not NULL, " &
|
||||
"ProcessPath TEXT, Icon TEXT, Hours REAL, Version TEXT, Company TEXT, Enabled BOOLEAN Not NULL, MonitorOnly BOOLEAN Not NULL, " &
|
||||
"BackupLimit INTEGER Not NULL, CleanFolder BOOLEAN Not NULL, Parameter TEXT, Comments TEXT, IsRegEx BOOLEAN Not NULL);"
|
||||
sSQL &= "INSERT INTO monitorlist_new (MonitorID, Name, Process, Path, AbsolutePath, FolderSave, FileType, TimeStamp, ExcludeList, " &
|
||||
"ProcessPath, Icon, Hours, Version, Company, Enabled, MonitorOnly, BackupLimit, CleanFolder, Parameter, Comments, IsRegEx)" &
|
||||
"SELECT MonitorID, Name, Process, Path, AbsolutePath, FolderSave, FileType, TimeStamp, ExcludeList, " &
|
||||
@@ -835,8 +840,8 @@ Public Class mgrSQLite
|
||||
mgrTags.SyncTags(True)
|
||||
mgrGameTags.SyncGameTags(True)
|
||||
|
||||
sSQL &= "CREATE TABLE manifest_new (ManifestID TEXT NOT NULL PRIMARY KEY, MonitorID TEXT NOT NULL, FileName TEXT NOT NULL, " &
|
||||
"DateUpdated TEXT NOT NULL, UpdatedBy TEXT NOT NULL, CheckSum TEXT);"
|
||||
sSQL &= "CREATE TABLE manifest_new (ManifestID TEXT Not NULL PRIMARY KEY, MonitorID TEXT Not NULL, FileName TEXT Not NULL, " &
|
||||
"DateUpdated TEXT Not NULL, UpdatedBy TEXT Not NULL, CheckSum TEXT);"
|
||||
sSQL &= "INSERT INTO manifest_new (ManifestID, MonitorID, FileName, DateUpdated, UpdatedBy, CheckSum) " &
|
||||
"SELECT ManifestID, MonitorID, FileName, DateUpdated, UpdatedBy, CheckSum FROM manifest NATURAL JOIN monitorlist GROUP BY ManifestID;" &
|
||||
"DROP TABLE manifest; ALTER TABLE manifest_new RENAME TO manifest;"
|
||||
@@ -848,6 +853,105 @@ Public Class mgrSQLite
|
||||
CompactDatabase()
|
||||
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
|
||||
|
||||
'1.16 Upgrade
|
||||
If GetDatabaseVersion() < 116 Then
|
||||
If eDatabase = Database.Local Then
|
||||
'Backup DB before starting
|
||||
BackupDB("v115")
|
||||
|
||||
'Add new field(s)
|
||||
sSQL = "ALTER TABLE monitorlist ADD COLUMN RecurseSubFolders BOOLEAN NOT NULL DEFAULT 1;"
|
||||
sSQL &= "PRAGMA user_version=116"
|
||||
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
End If
|
||||
If eDatabase = Database.Remote Then
|
||||
'Backup DB before starting
|
||||
BackupDB("v115")
|
||||
|
||||
'Add new field(s)
|
||||
sSQL = "ALTER TABLE monitorlist ADD COLUMN RecurseSubFolders BOOLEAN NOT NULL DEFAULT 1;"
|
||||
sSQL &= "PRAGMA user_version=116"
|
||||
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
End If
|
||||
End If
|
||||
|
||||
'1.18 Upgrade
|
||||
If GetDatabaseVersion() < 118 Then
|
||||
If eDatabase = Database.Local Then
|
||||
'Backup DB before starting
|
||||
BackupDB("v116")
|
||||
|
||||
'Add new field(s)
|
||||
sSQL = "ALTER TABLE monitorlist ADD COLUMN OS INTEGER NOT NULL DEFAULT " & mgrCommon.GetCurrentOS & ";"
|
||||
sSQL &= "ALTER TABLE settings ADD COLUMN DisableDiskSpaceCheck BOOLEAN NOT NULL DEFAULT 0;"
|
||||
sSQL &= "ALTER TABLE settings ADD COLUMN ThemeSelection INTEGER NOT NULL DEFAULT 0;"
|
||||
sSQL &= "ALTER TABLE settings ADD COLUMN AutoHideLog BOOLEAN NOT NULL DEFAULT 0;"
|
||||
|
||||
'Add Tables (Wine Data)
|
||||
sSQL &= "CREATE TABLE winedata (MonitorID TEXT NOT NULL PRIMARY KEY, Prefix TEXT NOT NULL, SavePath TEXT NOT NULL, BinaryPath TEXT NOT NULL);"
|
||||
|
||||
sSQL &= "PRAGMA user_version=118"
|
||||
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
End If
|
||||
If eDatabase = Database.Remote Then
|
||||
'Backup DB before starting
|
||||
BackupDB("v116")
|
||||
|
||||
'Add new field(s)
|
||||
sSQL = "ALTER TABLE monitorlist ADD COLUMN OS INTEGER NOT NULL DEFAULT " & mgrCommon.GetCurrentOS & ";"
|
||||
sSQL &= "PRAGMA user_version=118"
|
||||
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Function GetDBSize() As Long
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports System.IO
|
||||
Imports GBM.My.Resources
|
||||
|
||||
Public Class mgrSettings
|
||||
Private bStartWithWindows As Boolean = False
|
||||
@@ -18,17 +19,24 @@ Public Class mgrSettings
|
||||
Private iCompressionLevel As Integer = 5
|
||||
Private s7zArguments As String = String.Empty
|
||||
Private s7zLocation As String = String.Empty
|
||||
Private sBackupFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments).TrimEnd(New Char() {"\", "/"})
|
||||
Private sBackupFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) & Path.DirectorySeparatorChar & App_NameLong
|
||||
Private eSyncFields As clsGame.eOptionalSyncFields = clsGame.eOptionalSyncFields.None
|
||||
Private eMessages As eSuppressMessages = eSuppressMessages.None
|
||||
Private bAutoSaveLog As Boolean = False
|
||||
Private bBackupOnLaunch As Boolean = True
|
||||
Private bUseGameID As Boolean = False
|
||||
Private bDisableSyncMessages As Boolean = True
|
||||
Private bShowResolvedPaths As Boolean = True
|
||||
Private bDisableDiskSpaceCheck As Boolean = False
|
||||
Private eThemeSelection As mgrThemeEngine.eBaseTheme = mgrThemeEngine.eBaseTheme.Light
|
||||
Private bAutoHideLog As Boolean = False
|
||||
|
||||
<Flags()> Public Enum eSuppressMessages
|
||||
None = 0
|
||||
GameIDSync = 1
|
||||
BackupImport = 2
|
||||
WinConfigsInLinux = 4
|
||||
WineConfig = 16
|
||||
End Enum
|
||||
|
||||
Property StartWithWindows As Boolean
|
||||
@@ -175,6 +183,15 @@ Public Class mgrSettings
|
||||
End Set
|
||||
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
|
||||
Get
|
||||
'Prepare custom 7z arguments
|
||||
@@ -295,6 +312,33 @@ Public Class mgrSettings
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property DisableDiskSpaceCheck As Boolean
|
||||
Get
|
||||
Return bDisableDiskSpaceCheck
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bDisableDiskSpaceCheck = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property ThemeSelection As mgrThemeEngine.eBaseTheme
|
||||
Get
|
||||
Return eThemeSelection
|
||||
End Get
|
||||
Set(value As mgrThemeEngine.eBaseTheme)
|
||||
eThemeSelection = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property AutoHideLog As Boolean
|
||||
Get
|
||||
Return bAutoHideLog
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bAutoHideLog = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New()
|
||||
'The GameIDsync message should be suppressed on all new databases
|
||||
SuppressMessages = SetMessageField(SuppressMessages, eSuppressMessages.GameIDSync)
|
||||
@@ -309,7 +353,7 @@ Public Class mgrSettings
|
||||
sSQL &= "@CreateSubFolder, @ShowOverwriteWarning, @RestoreOnLaunch, @BackupFolder, @StartWithWindows, "
|
||||
sSQL &= "@TimeTracking, @SuppressBackup, @SuppressBackupThreshold, @CompressionLevel, @Custom7zArguments, @Custom7zLocation, "
|
||||
sSQL &= "@SyncFields, @AutoSaveLog, @AutoRestore, @AutoMark, @SessionTracking, @SuppressMessages, @BackupOnLaunch, @UseGameID, "
|
||||
sSQL &= "@DisableSyncMessages)"
|
||||
sSQL &= "@DisableSyncMessages, @ShowResolvedPaths, @DisableDiskSpaceCheck, @ThemeSelection, @AutoHideLog)"
|
||||
|
||||
hshParams.Add("MonitorOnStartup", MonitorOnStartup)
|
||||
hshParams.Add("StartToTray", StartToTray)
|
||||
@@ -335,7 +379,10 @@ Public Class mgrSettings
|
||||
hshParams.Add("BackupOnLaunch", BackupOnLaunch)
|
||||
hshParams.Add("UseGameID", UseGameID)
|
||||
hshParams.Add("DisableSyncMessages", DisableSyncMessages)
|
||||
|
||||
hshParams.Add("ShowResolvedPaths", ShowResolvedPaths)
|
||||
hshParams.Add("DisableDiskSpaceCheck", DisableDiskSpaceCheck)
|
||||
hshParams.Add("ThemeSelection", ThemeSelection)
|
||||
hshParams.Add("AutoHideLog", AutoHideLog)
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
End Sub
|
||||
|
||||
@@ -374,6 +421,10 @@ Public Class mgrSettings
|
||||
BackupOnLaunch = CBool(dr("BackupOnLaunch"))
|
||||
UseGameID = CBool(dr("UseGameID"))
|
||||
DisableSyncMessages = CBool(dr("DisableSyncMessages"))
|
||||
ShowResolvedPaths = CBool(dr("ShowResolvedPaths"))
|
||||
DisableDiskSpaceCheck = CBool(dr("DisableDiskSpaceCheck"))
|
||||
ThemeSelection = CInt(dr("ThemeSelection"))
|
||||
AutoHideLog = CBool(dr("AutoHideLog"))
|
||||
Next
|
||||
|
||||
oDatabase.Disconnect()
|
||||
|
||||
@@ -0,0 +1,161 @@
|
||||
Imports GBM.My.Resources
|
||||
|
||||
Public Class mgrThemeEngine
|
||||
|
||||
Private _ColorBase As Color
|
||||
Public Property ColorBase() As Color
|
||||
Get
|
||||
If _ColorBase = Nothing Then
|
||||
Throw New NullReferenceException
|
||||
End If
|
||||
Return _ColorBase
|
||||
End Get
|
||||
Private Set(ByVal value As Color)
|
||||
_ColorBase = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private _ColorBaseSecondary As Color
|
||||
Public Property ColorBaseSecondary() As Color
|
||||
Get
|
||||
If _ColorBaseSecondary = Nothing Then
|
||||
Throw New NullReferenceException
|
||||
End If
|
||||
Return _ColorBaseSecondary
|
||||
End Get
|
||||
Private Set(ByVal value As Color)
|
||||
_ColorBaseSecondary = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private _ColorHighlight As Color
|
||||
Public Property ColorHighlight() As Color
|
||||
Get
|
||||
If _ColorHighlight = Nothing Then
|
||||
Throw New NullReferenceException
|
||||
End If
|
||||
Return _ColorHighlight
|
||||
End Get
|
||||
Private Set(ByVal value As Color)
|
||||
_ColorHighlight = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private _ColorHighlightSecondary As Color
|
||||
Public Property ColorHighlightSecondary() As Color
|
||||
Get
|
||||
If _ColorHighlightSecondary = Nothing Then
|
||||
Throw New NullReferenceException
|
||||
End If
|
||||
Return _ColorHighlightSecondary
|
||||
End Get
|
||||
Private Set(ByVal value As Color)
|
||||
_ColorHighlightSecondary = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private _bThemeHasBeenDefined As Boolean
|
||||
Public Property bThemeHasBeenDefined() As Boolean
|
||||
Get
|
||||
Return _bThemeHasBeenDefined
|
||||
End Get
|
||||
Private Set(ByVal value As Boolean)
|
||||
_bThemeHasBeenDefined = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Supported themes.
|
||||
''' </summary>
|
||||
Public Enum eBaseTheme
|
||||
Light = 0
|
||||
Dark = 1
|
||||
Crimson = 2
|
||||
Emerald = 3
|
||||
GBM = 4
|
||||
End Enum
|
||||
|
||||
''' <summary>
|
||||
''' Configures the base colors for the overall theme based on input.
|
||||
''' </summary>
|
||||
''' <param name="_eBaseTheme"></param>
|
||||
Public Sub SetTheme(_eBaseTheme As eBaseTheme)
|
||||
Select Case _eBaseTheme
|
||||
Case eBaseTheme.Dark
|
||||
_ColorBase = New ColorConverter().ConvertFromString(
|
||||
mgrThemeEngine_RGB_Dark_Base)
|
||||
|
||||
_ColorBaseSecondary = New ColorConverter().ConvertFromString(
|
||||
mgrThemeEngine_RGB_Dark_BaseSecondary)
|
||||
|
||||
_ColorHighlight = New ColorConverter().ConvertFromString(
|
||||
mgrThemeEngine_RGB_Dark_Highlight)
|
||||
|
||||
_ColorHighlightSecondary = New ColorConverter().ConvertFromString(
|
||||
mgrThemeEngine_RGB_Dark_HighlightSecondary)
|
||||
|
||||
_bThemeHasBeenDefined = True
|
||||
|
||||
Case eBaseTheme.Light
|
||||
_ColorBase = New ColorConverter().ConvertFromString(
|
||||
mgrThemeEngine_RGB_Light_Base)
|
||||
|
||||
_ColorBaseSecondary = New ColorConverter().ConvertFromString(
|
||||
mgrThemeEngine_RGB_Light_BaseSecondary)
|
||||
|
||||
_ColorHighlight = New ColorConverter().ConvertFromString(
|
||||
mgrThemeEngine_RGB_Light_Highlight)
|
||||
|
||||
_ColorHighlightSecondary = New ColorConverter().ConvertFromString(
|
||||
mgrThemeEngine_RGB_Light_HighlightSecondary)
|
||||
|
||||
_bThemeHasBeenDefined = True
|
||||
|
||||
Case eBaseTheme.Crimson
|
||||
_ColorBase = New ColorConverter().ConvertFromString(
|
||||
mgrThemeEngine_RGB_Crimson_Base)
|
||||
|
||||
_ColorBaseSecondary = New ColorConverter().ConvertFromString(
|
||||
mgrThemeEngine_RGB_Crimson_BaseSecondary)
|
||||
|
||||
_ColorHighlight = New ColorConverter().ConvertFromString(
|
||||
mgrThemeEngine_RGB_Crimson_Highlight)
|
||||
|
||||
_ColorHighlightSecondary = New ColorConverter().ConvertFromString(
|
||||
mgrThemeEngine_RGB_Crimson_HighlightSecondary)
|
||||
|
||||
_bThemeHasBeenDefined = True
|
||||
|
||||
Case eBaseTheme.Emerald
|
||||
_ColorBase = New ColorConverter().ConvertFromString(
|
||||
mgrThemeEngine_RGB_Emerald_Base)
|
||||
|
||||
_ColorBaseSecondary = New ColorConverter().ConvertFromString(
|
||||
mgrThemeEngine_RGB_Emerald_BaseSecondary)
|
||||
|
||||
_ColorHighlight = New ColorConverter().ConvertFromString(
|
||||
mgrThemeEngine_RGB_Emerald_Highlight)
|
||||
|
||||
_ColorHighlightSecondary = New ColorConverter().ConvertFromString(
|
||||
mgrThemeEngine_RGB_Emerald_HighlightSecondary)
|
||||
|
||||
_bThemeHasBeenDefined = True
|
||||
|
||||
Case eBaseTheme.GBM
|
||||
_ColorBase = New ColorConverter().ConvertFromString(
|
||||
mgrThemeEngine_RGB_GBM_Base)
|
||||
|
||||
_ColorBaseSecondary = New ColorConverter().ConvertFromString(
|
||||
mgrThemeEngine_RGB_GBM_BaseSecondary)
|
||||
|
||||
_ColorHighlight = New ColorConverter().ConvertFromString(
|
||||
mgrThemeEngine_RGB_GBM_Highlight)
|
||||
|
||||
_ColorHighlightSecondary = New ColorConverter().ConvertFromString(
|
||||
mgrThemeEngine_RGB_GBM_HighlightSecondary)
|
||||
|
||||
_bThemeHasBeenDefined = True
|
||||
|
||||
End Select
|
||||
End Sub
|
||||
End Class
|
||||
@@ -154,4 +154,30 @@
|
||||
|
||||
Return hshList
|
||||
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")
|
||||
oList.Add("PROGRAMDATA")
|
||||
|
||||
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
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
Public Class mgrWineData
|
||||
|
||||
Private Shared Function MapToObject(ByVal dr As DataRow) As clsWineData
|
||||
Dim oWineGame As New clsWineData
|
||||
|
||||
oWineGame.MonitorID = CStr(dr("MonitorID"))
|
||||
If Not IsDBNull(dr("Prefix")) Then oWineGame.Prefix = CStr(dr("Prefix"))
|
||||
If Not IsDBNull(dr("SavePath")) Then oWineGame.SavePath = CStr(dr("SavePath"))
|
||||
If Not IsDBNull(dr("BinaryPath")) Then oWineGame.BinaryPath = CStr(dr("BinaryPath"))
|
||||
|
||||
Return oWineGame
|
||||
End Function
|
||||
|
||||
Private Shared Function SetCoreParameters(ByVal oWineGame As clsWineData) As Hashtable
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
hshParams.Add("MonitorID", oWineGame.MonitorID)
|
||||
hshParams.Add("Prefix", oWineGame.Prefix)
|
||||
hshParams.Add("SavePath", oWineGame.SavePath)
|
||||
hshParams.Add("BinaryPath", oWineGame.BinaryPath)
|
||||
|
||||
Return hshParams
|
||||
End Function
|
||||
|
||||
Public Shared Sub DoWineDataAddUpdate(ByVal oWineGame As clsWineData)
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As Hashtable
|
||||
|
||||
sSQL = "INSERT OR REPLACE INTO winedata VALUES (@MonitorID, @Prefix, @SavePath, @BinaryPath)"
|
||||
|
||||
'Parameters
|
||||
hshParams = SetCoreParameters(oWineGame)
|
||||
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
|
||||
End Sub
|
||||
|
||||
Public Shared Sub DoWineDataDelete(ByVal sMonitorID As String)
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
sSQL = "DELETE FROM winedata "
|
||||
sSQL &= "WHERE MonitorID = @MonitorID;"
|
||||
|
||||
hshParams.Add("MonitorID", sMonitorID)
|
||||
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
|
||||
End Sub
|
||||
|
||||
Public Shared Function DoWineDataGetbyID(ByVal sMonitorID As String) As clsWineData
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim sSQL As String
|
||||
Dim oData As DataSet
|
||||
Dim oWineData As New clsWineData
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
sSQL = "SELECT * FROM winedata "
|
||||
sSQL &= "WHERE MonitorID = @MonitorID"
|
||||
|
||||
hshParams.Add("MonitorID", sMonitorID)
|
||||
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oWineData = MapToObject(dr)
|
||||
Next
|
||||
|
||||
Return oWineData
|
||||
End Function
|
||||
End Class
|
||||
@@ -41,6 +41,13 @@ Public Class mgrXML
|
||||
oGame.Parameter = g.Parameter
|
||||
oGame.Comments = g.Comments
|
||||
oGame.IsRegEx = g.IsRegEx
|
||||
oGame.RecurseSubFolders = g.RecurseSubFolders
|
||||
oGame.OS = g.OS
|
||||
'Retain compatability when the OS value is not set
|
||||
If oGame.OS = 0 Then
|
||||
oGame.OS = mgrCommon.GetCurrentOS
|
||||
End If
|
||||
|
||||
For Each t As Tag In g.Tags
|
||||
oGame.ImportTags.Add(t)
|
||||
Next
|
||||
|
||||
@@ -14,7 +14,7 @@ Imports System.Runtime.InteropServices
|
||||
<Assembly: AssemblyDescription("Game Backup Monitor")>
|
||||
<Assembly: AssemblyCompany("Michael J. Seiferling")>
|
||||
<Assembly: AssemblyProduct("Game Backup Monitor")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2018 Michael J. Seiferling")>
|
||||
<Assembly: AssemblyCopyright("© 2014 - 2019 Michael J. Seiferling and Game Backup Monitor contributors")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
@@ -33,7 +33,7 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.1.3.*")>
|
||||
<Assembly: AssemblyFileVersion("1.1.3.0")>
|
||||
<Assembly: AssemblyVersion("1.1.9.*")>
|
||||
<Assembly: AssemblyFileVersion("1.1.9.0")>
|
||||
|
||||
<Assembly: NeutralResourcesLanguageAttribute("en")>
|
||||
@@ -133,14 +133,11 @@
|
||||
<data name="frmMain_ManifestTotalRemoved" xml:space="preserve">
|
||||
<value>[PARAM] entries were removed from the local manifest.</value>
|
||||
</data>
|
||||
<data name="frmMain_ConfirmManifestClean" xml:space="preserve">
|
||||
<value>This tool removes orphaned backup information from the local manifest based on the current backup folder. Data can become orphaned when backups are deleted by various computers that share the same backup folder on a cloud or network.[BR][BR]When alternating between different backup folders you should NOT use this tool.[BR][BR]Do you wish to proceed?</value>
|
||||
</data>
|
||||
<data name="frmMain_ConfirmRebuild" xml:space="preserve">
|
||||
<value>This will rebuild all databases and shrink them to an optimal size.[BR]This should only be used if your gbm.s3db files are becoming very large.[BR][BR]Do you wish to continue?</value>
|
||||
</data>
|
||||
<data name="App_Copyright" xml:space="preserve">
|
||||
<value>[PARAM] Michael J. Seiferling</value>
|
||||
<value> 2014 - [PARAM] Michael J. Seiferling and Game Backup Monitor contributors</value>
|
||||
</data>
|
||||
<data name="frmMain_Exit" xml:space="preserve">
|
||||
<value>Are you sure you want to exit? Your games will no longer be monitored.</value>
|
||||
@@ -434,7 +431,7 @@
|
||||
<value>&Backup</value>
|
||||
</data>
|
||||
<data name="frmGameManager_btnCancel" xml:space="preserve">
|
||||
<value>&Cancel</value>
|
||||
<value>Ca&ncel</value>
|
||||
</data>
|
||||
<data name="frmGameManager_btnClose" xml:space="preserve">
|
||||
<value>C&lose</value>
|
||||
@@ -458,13 +455,13 @@
|
||||
<value>&Import</value>
|
||||
</data>
|
||||
<data name="frmGameManager_btnInclude" xml:space="preserve">
|
||||
<value>In&clude Items...</value>
|
||||
<value>Incl&ude Items...</value>
|
||||
</data>
|
||||
<data name="frmGameManager_btnMarkAsRestored" xml:space="preserve">
|
||||
<value>&Mark as Restored</value>
|
||||
</data>
|
||||
<data name="frmGameManager_btnOpenBackupFile" xml:space="preserve">
|
||||
<value>&Open Backup File</value>
|
||||
<data name="frmGameManager_btnOpenBackup" xml:space="preserve">
|
||||
<value>&Open Backup</value>
|
||||
</data>
|
||||
<data name="frmGameManager_btnOpenRestorePath" xml:space="preserve">
|
||||
<value>O&pen Restore Path</value>
|
||||
@@ -482,7 +479,7 @@
|
||||
<value>...</value>
|
||||
</data>
|
||||
<data name="frmGameManager_btnTags" xml:space="preserve">
|
||||
<value>Tags...</value>
|
||||
<value>&Tags...</value>
|
||||
</data>
|
||||
<data name="frmGameManager_chkEnabled" xml:space="preserve">
|
||||
<value>Monitor this game</value>
|
||||
@@ -556,7 +553,7 @@
|
||||
<data name="frmGameManager_ErrorNoBackupData" xml:space="preserve">
|
||||
<value>The selected game(s) have no backup data or can't be restored with their current configuration.</value>
|
||||
</data>
|
||||
<data name="frmGameManager_ErrorNoBackupExists" xml:space="preserve">
|
||||
<data name="frmGameManager_ErrorNoBackupFileExists" xml:space="preserve">
|
||||
<value>The backup file does not exist.</value>
|
||||
</data>
|
||||
<data name="frmGameManager_ErrorNoItems" xml:space="preserve">
|
||||
@@ -593,7 +590,7 @@
|
||||
<value>Include</value>
|
||||
</data>
|
||||
<data name="frmGameManager_IncludeShortcut" xml:space="preserve">
|
||||
<value>In&clude</value>
|
||||
<value>Incl&ude</value>
|
||||
</data>
|
||||
<data name="frmGameManager_Items" xml:space="preserve">
|
||||
<value>Items...</value>
|
||||
@@ -970,7 +967,7 @@
|
||||
<data name="frmIncludeExclude_FormName" xml:space="preserve">
|
||||
<value>[PARAM] Builder</value>
|
||||
</data>
|
||||
<data name="frmIncludeExclude_grpFileOptions" xml:space="preserve">
|
||||
<data name="frmIncludeExclude_grpOptions" xml:space="preserve">
|
||||
<value>[PARAM] Options</value>
|
||||
</data>
|
||||
<data name="frmIncludeExclude_lblItems" xml:space="preserve">
|
||||
@@ -1072,11 +1069,11 @@
|
||||
<data name="frmSettings_chkShowDetectionTips" xml:space="preserve">
|
||||
<value>Show detection notifications</value>
|
||||
</data>
|
||||
<data name="frmSettings_chkStartToTray" xml:space="preserve">
|
||||
<value>Start to system tray</value>
|
||||
<data name="frmSettings_chkStartMinimized" xml:space="preserve">
|
||||
<value>Start minimized</value>
|
||||
</data>
|
||||
<data name="frmSettings_chkStartWindows" xml:space="preserve">
|
||||
<value>Start with Windows</value>
|
||||
<data name="frmSettings_chkAutoStart" xml:space="preserve">
|
||||
<value>Start automatically on log-in</value>
|
||||
</data>
|
||||
<data name="frmSettings_chkSuppressBackup" xml:space="preserve">
|
||||
<value>Ignore sessions shorter than</value>
|
||||
@@ -1139,7 +1136,7 @@
|
||||
<value>You must select a backup path to continue.</value>
|
||||
</data>
|
||||
<data name="frmStartUpWizard_ErrorNoFolderExists" xml:space="preserve">
|
||||
<value>The folder you selected does not exist or is not a valid folder.</value>
|
||||
<value>The selected backup location does not exist and could not be created.[BR][BR][PARAM]</value>
|
||||
</data>
|
||||
<data name="frmStartUpWizard_ExistingData" xml:space="preserve">
|
||||
<value>Existing data was detected in the backup folder and has been imported.</value>
|
||||
@@ -1310,7 +1307,7 @@
|
||||
<value>[PARAM] backup aborted by user due to overwrite.</value>
|
||||
</data>
|
||||
<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 name="mgrBackup_GenerateHash" xml:space="preserve">
|
||||
<value>Generating SHA-256 hash for [PARAM] backup file.</value>
|
||||
@@ -1364,7 +1361,7 @@
|
||||
<value>[PARAM][BR][BR]Do you wish to automatically search for the game path? (Path will be saved)</value>
|
||||
</data>
|
||||
<data name="mgrPath_ConfirmBackupLocation" xml:space="preserve">
|
||||
<value>The backup location [PARAM] is not available.[BR]It may be on an external or network drive that isn't connected.[BR][BR]Do you want to select another backup location and continue?</value>
|
||||
<value>The backup location [PARAM] is not available.[BR]It may be on an external or network drive that isn't connected.[BR][BR]Do you want to select another backup location?[BR][BR]Select "No" to quit or "Cancel" to continue waiting for the location to become available.</value>
|
||||
</data>
|
||||
<data name="mgrPath_ConfirmManualPath" xml:space="preserve">
|
||||
<value>[PARAM][BR][BR]Do you wish to manually set the game path? (Path will be saved)</value>
|
||||
@@ -1685,7 +1682,7 @@
|
||||
<value>You cannot choose a file located outside the current [PARAM] backup folder.</value>
|
||||
</data>
|
||||
<data name="frmGameManager_lblLimit" xml:space="preserve">
|
||||
<value>Backup Limit</value>
|
||||
<value>Backup Limit (0 = Unlimited)</value>
|
||||
</data>
|
||||
<data name="mgrBackup_BackupLimitExceeded" xml:space="preserve">
|
||||
<value>[PARAM] was automatically removed.</value>
|
||||
@@ -1700,7 +1697,7 @@
|
||||
<value>This will delete all backup files for [PARAM]. This cannot be undone. [BR][BR]Do you want to continue?</value>
|
||||
</data>
|
||||
<data name="frmAddWizard_lblLimit" xml:space="preserve">
|
||||
<value>Backup Limit</value>
|
||||
<value>Backup Limit (0 = Unlimited)</value>
|
||||
</data>
|
||||
<data name="frmGameManager_Unknown" xml:space="preserve">
|
||||
<value>Unknown</value>
|
||||
@@ -2023,17 +2020,14 @@
|
||||
<data name="frmFilter_FieldGameID" xml:space="preserve">
|
||||
<value>Game ID</value>
|
||||
</data>
|
||||
<data name="mgrMonitorList_ConfirmInitialOfficialGameIDSync" xml:space="preserve">
|
||||
<value>GBM now uses a unique identifier for each game. For the import feature to recognize game configurations from a prior version, they need to use the same identifiers.[BR][BR]Do you want to sync your game identifiers with the official list?[BR][BR]This feature is available anytime from the "Tools" menu. If you use GBM on multiple PCs, please see "Tools" section of the online manual before using this feature.</value>
|
||||
</data>
|
||||
<data name="mgrMonitorList_ErrorGameIDVerFailure" xml:space="preserve">
|
||||
<value>This file cannot be used to sync game indentifiers. It was created with an older version of GBM.</value>
|
||||
</data>
|
||||
<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 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]This tool is provided for very specific situations, please read the "Tools" section of the online manual before using this feature.</value>
|
||||
</data>
|
||||
<data name="frmMain_gMonToolsSyncGameID" xml:space="preserve">
|
||||
<value>S&ync Game IDs</value>
|
||||
@@ -2045,7 +2039,7 @@
|
||||
<value>&Official List...</value>
|
||||
</data>
|
||||
<data name="mgrMonitorList_ConfirmOfficialGameIDSync" xml:space="preserve">
|
||||
<value>Do you want to sync your game identifiers with the official game list?[BR][BR]This allows the import feature to recognize game configurations from a prior version. 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 the official game list?[BR][BR]This tool is provided for very specific situations, please read the "Tools" section of the online manual before using this feature.</value>
|
||||
</data>
|
||||
<data name="frmSettings_btnResetMessages" xml:space="preserve">
|
||||
<value>&Reset Warnings</value>
|
||||
@@ -2191,4 +2185,292 @@
|
||||
<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>Wine Prefix: [PARAM]</value>
|
||||
</data>
|
||||
<data name="frmMain_WineSavePath" xml:space="preserve">
|
||||
<value>Wine 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 when 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>
|
||||
<data name="frmFilter_FieldRecurseSubFolders" xml:space="preserve">
|
||||
<value>Recurse Sub-Folders</value>
|
||||
</data>
|
||||
<data name="frmIncludeExclude_chkRecurseSubFolders" xml:space="preserve">
|
||||
<value>Recurse sub-folders</value>
|
||||
</data>
|
||||
<data name="frmMain_DebugMemoryAllocation" xml:space="preserve">
|
||||
<value>Memory Allocation: [PARAM] MB</value>
|
||||
</data>
|
||||
<data name="frmMain_ErrorInvalidMode" xml:space="preserve">
|
||||
<value>Invalid mode([PARAM]) for command [PARAM].</value>
|
||||
</data>
|
||||
<data name="App_LinuxOS" xml:space="preserve">
|
||||
<value>Linux</value>
|
||||
</data>
|
||||
<data name="App_WindowsOS" xml:space="preserve">
|
||||
<value>Windows</value>
|
||||
</data>
|
||||
<data name="frmGameManager_lblOS" xml:space="preserve">
|
||||
<value>OS:</value>
|
||||
</data>
|
||||
<data name="frmGameManager_btnWineConfig" xml:space="preserve">
|
||||
<value>&Wine Configuration...</value>
|
||||
</data>
|
||||
<data name="frmFilter_FieldOS" xml:space="preserve">
|
||||
<value>OS</value>
|
||||
</data>
|
||||
<data name="frmMain_WineBinaryPath" xml:space="preserve">
|
||||
<value>Wine Binary Path: [PARAM]</value>
|
||||
</data>
|
||||
<data name="frmMain_ErrorNoWineSavePath" xml:space="preserve">
|
||||
<value>[PARAM] uses a Windows configuration and requires a Wine save path to perform this operation.</value>
|
||||
</data>
|
||||
<data name="frmWineConfiguration_btnCancel" xml:space="preserve">
|
||||
<value>&Cancel</value>
|
||||
</data>
|
||||
<data name="frmWineConfiguration_btnSave" xml:space="preserve">
|
||||
<value>&Save</value>
|
||||
</data>
|
||||
<data name="frmWineConfiguration_ErrorValidationBinaryPath" xml:space="preserve">
|
||||
<value>The Wine binary path is required.[BR][BR]Clear all fields and save to remove all Wine data for this game.</value>
|
||||
</data>
|
||||
<data name="frmWineConfiguration_ErrorValidationPrefix" xml:space="preserve">
|
||||
<value>The Wine Prefix is required.[BR][BR]Clear all fields and save to remove all Wine data for this game.</value>
|
||||
</data>
|
||||
<data name="frmWineConfiguration_FormName" xml:space="preserve">
|
||||
<value>Wine Configuration</value>
|
||||
</data>
|
||||
<data name="frmWineConfiguration_grpWineConfig" xml:space="preserve">
|
||||
<value>Configuration</value>
|
||||
</data>
|
||||
<data name="frmWineConfiguration_lblWineBinaryPath" xml:space="preserve">
|
||||
<value>Binary Path:</value>
|
||||
</data>
|
||||
<data name="frmWineConfiguration_lblWinePrefix" xml:space="preserve">
|
||||
<value>Prefix:</value>
|
||||
</data>
|
||||
<data name="frmWineConfiguration_lblWineSavePath" xml:space="preserve">
|
||||
<value>Save Path:</value>
|
||||
</data>
|
||||
<data name="frmWineConfiguration_WarningSingle" xml:space="preserve">
|
||||
<value>Game Backup Monitor automatically updates the Wine configuration for a game each time it is detected. Modifying any of these fields manually is not recommended in most cases.[BR][BR]This warning will only be displayed once.</value>
|
||||
</data>
|
||||
<data name="App_ErrorLaunchExternal" xml:space="preserve">
|
||||
<value>An error occured attempting to launch the application:[BR][BR][PARAM]</value>
|
||||
</data>
|
||||
<data name="mgrBackup_ErrorBackupPathIsUNC" xml:space="preserve">
|
||||
<value>The backup folder is a UNC path. The disk space check has been skipped.</value>
|
||||
</data>
|
||||
<data name="frmSettings_chkDisableDiskSpaceCheck" xml:space="preserve">
|
||||
<value>Disable disk space check prior to backup</value>
|
||||
</data>
|
||||
<data name="frmMain_ErrorLinuxAutoStartMissing" xml:space="preserve">
|
||||
<value>GBM is set to start automatically, but the autostart link is missing. The autostart link has been re-created.</value>
|
||||
</data>
|
||||
<data name="frmSettings_ErrorLinuxAutoStart" xml:space="preserve">
|
||||
<value>An error occured while configuring autostart:[BR][BR][PARAM]</value>
|
||||
</data>
|
||||
<data name="mgrBackup_ErrorRegBackupElevation" xml:space="preserve">
|
||||
<value>[PARAM] stores saved games in the Windows registry, accessing the registry requires elevated permissions. Please restart GBM as Administrator to perform this backup.</value>
|
||||
</data>
|
||||
<data name="mgrBackup_ErrorRegBackupFailed" xml:space="preserve">
|
||||
<value>The backup has failed, please ensure the registry path is correct.</value>
|
||||
</data>
|
||||
<data name="mgrBackup_ErrorRegNotFound" xml:space="preserve">
|
||||
<value>The utility reg.exe could not be located at [PARAM]. The backup cannot continue.</value>
|
||||
</data>
|
||||
<data name="mgrBackup_ErrorWineNotFound" xml:space="preserve">
|
||||
<value>The wine binary could not be located at [PARAM]. The backup cannot continue.</value>
|
||||
</data>
|
||||
<data name="mgrRestore_ErrorRegNotFound" xml:space="preserve">
|
||||
<value>The utility reg.exe could not be located at [PARAM]. The restore cannot continue.</value>
|
||||
</data>
|
||||
<data name="mgrRestore_ErrorWineNotFound" xml:space="preserve">
|
||||
<value>The wine binary could not be located at [PARAM]. The restore cannot continue.</value>
|
||||
</data>
|
||||
<data name="mgrRestore_ErrorRegBackupElevation" xml:space="preserve">
|
||||
<value>[PARAM] stores saved games in the Windows registry, accessing the registry requires elevated permissions. Please restart GBM as Administrator to restore this backup.</value>
|
||||
</data>
|
||||
<data name="frmMain_ErrorLinuxAutoStartLinkMissing" xml:space="preserve">
|
||||
<value>GBM is set to start automatically, but the desktop link is missing. Automatic start has been disabled, please re-install GBM using a package manager or the makefile.</value>
|
||||
</data>
|
||||
<data name="mgrCommon_FolderSelection" xml:space="preserve">
|
||||
<value>Current Folder</value>
|
||||
</data>
|
||||
<data name="frmChooseGame_ColumnName" xml:space="preserve">
|
||||
<value>Name</value>
|
||||
</data>
|
||||
<data name="mgrThemeEngine_RGB_Dark_BaseSecondary" xml:space="preserve">
|
||||
<value>0,0,0</value>
|
||||
</data>
|
||||
<data name="frmChooseGame_ColumnTags" xml:space="preserve">
|
||||
<value>Tags</value>
|
||||
</data>
|
||||
<data name="mgrThemeEngine_RGB_Dark_HighlightSecondary" xml:space="preserve">
|
||||
<value>0,131,255</value>
|
||||
</data>
|
||||
<data name="mgrThemeEngine_RGB_Dark_Base" xml:space="preserve">
|
||||
<value>25,25,25</value>
|
||||
</data>
|
||||
<data name="mgrThemeEngine_RGB_Dark_Highlight" xml:space="preserve">
|
||||
<value>255,255,255</value>
|
||||
</data>
|
||||
<data name="mgrThemeEngine_RGB_Light_Base" xml:space="preserve">
|
||||
<value>240,240,240</value>
|
||||
</data>
|
||||
<data name="mgrThemeEngine_RGB_Light_BaseSecondary" xml:space="preserve">
|
||||
<value>255,255,255</value>
|
||||
</data>
|
||||
<data name="mgrThemeEngine_RGB_Light_Highlight" xml:space="preserve">
|
||||
<value>0,0,0</value>
|
||||
</data>
|
||||
<data name="mgrThemeEngine_RGB_Light_HighlightSecondary" xml:space="preserve">
|
||||
<value>0,0,0</value>
|
||||
</data>
|
||||
<data name="frmSettings_lstSettings_Interface" xml:space="preserve">
|
||||
<value>Interface</value>
|
||||
</data>
|
||||
<data name="frmSettings_cboThemeSelection_Dark" xml:space="preserve">
|
||||
<value>Dark</value>
|
||||
</data>
|
||||
<data name="frmSettings_cboThemeSelection_Light" xml:space="preserve">
|
||||
<value>Light</value>
|
||||
</data>
|
||||
<data name="GBM_Icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\gbm.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="frmGameManager_cmsOpenBackupFile" xml:space="preserve">
|
||||
<value>&File</value>
|
||||
</data>
|
||||
<data name="frmGameManager_cmsOpenBackupFolder" xml:space="preserve">
|
||||
<value>F&older</value>
|
||||
</data>
|
||||
<data name="frmGameManager_ErrorNoBackupFolderExists" xml:space="preserve">
|
||||
<value>The backup folder does not exist.</value>
|
||||
</data>
|
||||
<data name="frmAddWizard_Summary_NoLimit" xml:space="preserve">
|
||||
<value>Unlimited</value>
|
||||
</data>
|
||||
<data name="frmStartUpWizard_lblStep2Warning" xml:space="preserve">
|
||||
<value>You cannot return to this step after clicking Next. The Backup Location can be changed any time once Setup is complete.</value>
|
||||
</data>
|
||||
<data name="frmSettings_cboThemeSelection_Crimson" xml:space="preserve">
|
||||
<value>Crimson</value>
|
||||
</data>
|
||||
<data name="frmSettings_cboThemeSelection_Emerald" xml:space="preserve">
|
||||
<value>Emerald</value>
|
||||
</data>
|
||||
<data name="frmSettings_cboThemeSelection_GBM" xml:space="preserve">
|
||||
<value>GBM</value>
|
||||
</data>
|
||||
<data name="mgrThemeEngine_RGB_Crimson_Base" xml:space="preserve">
|
||||
<value>209,10,10</value>
|
||||
</data>
|
||||
<data name="mgrThemeEngine_RGB_Crimson_BaseSecondary" xml:space="preserve">
|
||||
<value>119,0,0</value>
|
||||
</data>
|
||||
<data name="mgrThemeEngine_RGB_Crimson_Highlight" xml:space="preserve">
|
||||
<value>255,255,255</value>
|
||||
</data>
|
||||
<data name="mgrThemeEngine_RGB_Crimson_HighlightSecondary" xml:space="preserve">
|
||||
<value>255,255,255</value>
|
||||
</data>
|
||||
<data name="mgrThemeEngine_RGB_Emerald_Base" xml:space="preserve">
|
||||
<value>22,193,114</value>
|
||||
</data>
|
||||
<data name="mgrThemeEngine_RGB_Emerald_BaseSecondary" xml:space="preserve">
|
||||
<value>33,79,75</value>
|
||||
</data>
|
||||
<data name="mgrThemeEngine_RGB_Emerald_Highlight" xml:space="preserve">
|
||||
<value>255,255,255</value>
|
||||
</data>
|
||||
<data name="mgrThemeEngine_RGB_Emerald_HighlightSecondary" xml:space="preserve">
|
||||
<value>33,79,75</value>
|
||||
</data>
|
||||
<data name="mgrThemeEngine_RGB_GBM_Base" xml:space="preserve">
|
||||
<value>23,190,187</value>
|
||||
</data>
|
||||
<data name="mgrThemeEngine_RGB_GBM_BaseSecondary" xml:space="preserve">
|
||||
<value>14,124,123</value>
|
||||
</data>
|
||||
<data name="mgrThemeEngine_RGB_GBM_Highlight" xml:space="preserve">
|
||||
<value>255,255,255</value>
|
||||
</data>
|
||||
<data name="mgrThemeEngine_RGB_GBM_HighlightSecondary" xml:space="preserve">
|
||||
<value>7,66,65</value>
|
||||
</data>
|
||||
</root>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 184 KiB After Width: | Height: | Size: 91 KiB |
|
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 91 KiB |
|
Before Width: | Height: | Size: 183 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 926 B After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 891 B After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 545 B After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 170 KiB After Width: | Height: | Size: 91 KiB |
|
Before Width: | Height: | Size: 170 KiB After Width: | Height: | Size: 91 KiB |
@@ -1,24 +1,28 @@
|
||||
Game Backup Monitor v1.1.3 Readme
|
||||
Game Backup Monitor v1.1.9 Readme
|
||||
http://mikemaximus.github.io/gbm-web/
|
||||
gamebackupmonitor@gmail.com
|
||||
|
||||
July 5th, 2018
|
||||
June 7, 2019
|
||||
|
||||
New in 1.1.3
|
||||
New in 1.1.9
|
||||
|
||||
All Platforms:
|
||||
|
||||
- Game tags are now sorted alphanumerically on the Game Manager and in XML exports.
|
||||
- GBM now displays a unique backup overwrite warning for games that use a relative saved game path.
|
||||
- The "Save Multiple Backups" setting now allows infinite backups when "Backup Limit" is set to 0. This is now the default for new configurations.
|
||||
- "Save Multiple Backups" and "Backup Limit" are now core fields, they are synced by default and included in the Import/Export.
|
||||
- The Game Manager will now clean up it's own manifest when backup files are deleted outside of GBM. As to not affect performance, this only occurs when the "Backup Data" field is accessed.
|
||||
- When a single game is selected, the Game Manager now restores the currently selected backup, instead of always restoring the latest backup.
|
||||
- If possible, GBM now displays the full path of the detected process when multiple configurations are triggered.
|
||||
- Fixed an issue that could cause the certain controls to become enabled incorrectly on the Game Manager.
|
||||
- Fixed an issue that caused GBM not to remove empty sub-folders unless the "Use Game ID for files and folders" setting was enabled when the folder was created.
|
||||
- Fixed an issue that caused GBM not to rename backup files or sub-folders unless the "Use Game ID for files and folders" setting was enabled.
|
||||
- Fixed an issue that caused GBM to only rename the most current backup file when modifying a Name or Game ID.
|
||||
- GBM no longer displays a sync warning when the user deletes all game configurations from the Game Manager.
|
||||
- Fixed a bug on the Game Manager that caused the "Save Entire Folder" checkbox to be unchecked anytime the "Save Path" field was changed.
|
||||
- The "Add Game Wizard" now allows you to set an unlimited number of backups.
|
||||
- The "Backup Limit" label has been updated to indicate that 0 means unlimited.
|
||||
- The "Open Backup File" button on the Game Manager is now called "Open Backup". It now gives a choice between opening the backup file or the folder containing the file.
|
||||
- Set rules are now used for backup folder and file names, regardless of the operating system GBM is running on.
|
||||
- GBM now always filters out NTFS reserved characters and allows a maximum file name length of 255.
|
||||
- This will prevent various problems when using a backup drive with a non-standard file system in Linux or Windows.
|
||||
- These rules will be applied to new backup files or folders, existing backups not be modified.
|
||||
- Made improvements to the Start-Up Wizard.
|
||||
- The default backup location now includes a "Game Backup Monitor" sub-folder.
|
||||
- The wizard will now automatically create the backup location if it doesn't exist.
|
||||
- You can no longer attempt to Import Backup Files during the Start-Up Wizard.
|
||||
|
||||
Linux:
|
||||
|
||||
- Fixed a bug that caused the "Available Disk Space" check to fail if the backup folder contained one or more spaces.
|
||||
|
||||
The entire version history of GBM releases is available at http://mikemaximus.github.io/gbm-web/versionhistory.html
|
||||
@@ -1,6 +1,16 @@
|
||||
 ***dunestorm333:*** Due to reliability issues in syncing the database with cloud storage providers, I will no longer be supporting GBM. For optimal reliability, architecturally the database should be hosted on a dedicated instance rather than trusting your sync software of choice to make that decision.
|
||||
|
||||
***dunestorm333:*** My branch simply contains an updated icon set, I plan to make a couple other UI changes in the future.
|
||||
|
||||
# [Game Backup Monitor](http://mikemaximus.github.io/gbm-web/)
|
||||
|
||||

|
||||
Light Theme:
|
||||
|
||||

|
||||
|
||||
Dark Theme:
|
||||
|
||||

|
||||
|
||||
Game Backup Monitor is a simple, but flexible application that detects games as you play them. Once you finish playing a game, a backup of the saved games will be made automatically using 7-Zip compression. GBM can be used on a single computer, or on multiple computers to effectively add cloud support to any game or application.
|
||||
|
||||
@@ -9,7 +19,9 @@ Game Backup Monitor is a simple, but flexible application that detects games as
|
||||
**Platform**: Windows (.NET 4) & Linux (Mono)
|
||||
|
||||
[About Game Backup Monitor](http://mikemaximus.github.io/gbm-web/about.html) <br />
|
||||
[Contribute to Game Backup Monitor](http://mikemaximus.github.io/gbm-web/contribute.html) <br />
|
||||
[Game Backup Monitor FAQ](http://mikemaximus.github.io/gbm-web/faq.html) <br />
|
||||
[Game Backup Monitor Manual](http://mikemaximus.github.io/gbm-web/manual.html) <br />
|
||||
[List of Preconfigured Games](http://mikemaximus.github.io/gbm-web/GBM_Official.xml) <br /> <br />
|
||||
[Preconfigured Windows Games](http://mikemaximus.github.io/gbm-web/GBM_Official.xml) <br />
|
||||
[Preconfigured Linux Games](http://mikemaximus.github.io/gbm-web/GBM_Official_Linux.xml) <br /> <br />
|
||||
Updates regarding this project are available via the [Game Backup Monitor web site](http://mikemaximus.github.io/gbm-web/).
|
||||
|
||||