Compare commits
454 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 | ||
|
|
1e2f4de816 | ||
|
|
b9b959f96c | ||
|
|
2ae705be18 | ||
|
|
ccade84b65 | ||
|
|
017c5def56 | ||
|
|
1f9dc18c49 | ||
|
|
bc1630a122 | ||
|
|
478721dbd1 | ||
|
|
8ad4810011 | ||
|
|
93bc974cc3 | ||
|
|
c9463c3a36 | ||
|
|
8b2c5f376b | ||
|
|
9e329476a2 | ||
|
|
626fca3e1e | ||
|
|
039f91cd6f | ||
|
|
f98a98af99 | ||
|
|
d9bd7f38f5 | ||
|
|
4e2ab9a0fb | ||
|
|
218ce3f367 | ||
|
|
b3cfab7ee6 | ||
|
|
39440e1f98 | ||
|
|
9b9d3f9125 | ||
|
|
7eab3b8841 | ||
|
|
539009c5de | ||
|
|
01b46107ad | ||
|
|
a5d2ce2255 | ||
|
|
c0764d0c08 | ||
|
|
35ea6fb74b | ||
|
|
a51a7bea89 | ||
|
|
b5f3408261 | ||
|
|
f859449a99 | ||
|
|
796f68d1a8 | ||
|
|
155759f7bd | ||
|
|
405237f1d5 | ||
|
|
a0ba4637f2 | ||
|
|
76a11d8f2e | ||
|
|
48b4dbea43 | ||
|
|
e8b0650a9a | ||
|
|
de157d516c | ||
|
|
8ced2d157f | ||
|
|
4d83be9ef3 | ||
|
|
52f7088ed7 | ||
|
|
e07b2d226f | ||
|
|
a5fe556108 | ||
|
|
1d57bc0cc4 | ||
|
|
907e3e309a | ||
|
|
5cf6d1c270 | ||
|
|
189976e892 | ||
|
|
251ea3b060 | ||
|
|
a2c96ee5e4 | ||
|
|
79fd874f60 | ||
|
|
2f66855166 | ||
|
|
8e26e97fd4 | ||
|
|
9eb095523e | ||
|
|
5ae238360d | ||
|
|
bba4d3a0a8 | ||
|
|
f4a54f8781 | ||
|
|
108ab4931f | ||
|
|
28a260bdfc | ||
|
|
6461c80ae0 | ||
|
|
9807094af6 | ||
|
|
259cc2c5dd | ||
|
|
c6ded1a349 | ||
|
|
7430551145 | ||
|
|
b9244eeeae | ||
|
|
ebc185d7b8 | ||
|
|
ad538da1d1 | ||
|
|
95acce428a | ||
|
|
afb479044c | ||
|
|
5245cc3ab3 | ||
|
|
4caa2df312 | ||
|
|
7d874f0079 | ||
|
|
b23ace4b54 | ||
|
|
fe6b90311a | ||
|
|
ddee737222 | ||
|
|
2e5fa70f58 | ||
|
|
b76a7dd6ab | ||
|
|
9907565145 | ||
|
|
9a024349f5 | ||
|
|
7c73b27af0 | ||
|
|
07b46f10f5 | ||
|
|
c94b8b83da | ||
|
|
1b6b2fa3a0 | ||
|
|
609ee09cfa | ||
|
|
c2a752573a | ||
|
|
b7b23cba4a | ||
|
|
848679c1b1 | ||
|
|
d07fc57dad | ||
|
|
dff3432c27 | ||
|
|
b54f98d82b | ||
|
|
a745624e83 | ||
|
|
2d0e4a136d | ||
|
|
9f99b32200 | ||
|
|
866f6005dc | ||
|
|
dca86beebe | ||
|
|
bb6e292c6f | ||
|
|
0dbda50291 | ||
|
|
1c54085d6c | ||
|
|
e897fda8e8 | ||
|
|
978242d0dd | ||
|
|
1ab0e77918 | ||
|
|
b3d9510edd | ||
|
|
31b50afc84 | ||
|
|
7b17093cd8 | ||
|
|
c63a188738 | ||
|
|
e7b3f809f1 | ||
|
|
66d280df49 | ||
|
|
7d4514c677 | ||
|
|
2581883827 | ||
|
|
248efa8878 | ||
|
|
93517f5236 | ||
|
|
5be80b2f02 | ||
|
|
2f2177fb84 | ||
|
|
636c1495a4 | ||
|
|
f69d10065a | ||
|
|
99d70b96fb | ||
|
|
f88cf1bd18 | ||
|
|
b4d9c84c36 | ||
|
|
5996e28edf | ||
|
|
6b9ebaab36 | ||
|
|
85588686cd | ||
|
|
2cab8b7ec4 | ||
|
|
93361bcd87 | ||
|
|
a89fdceb1a | ||
|
|
fa2910e184 | ||
|
|
ef6df6e89e | ||
|
|
36af55cacc | ||
|
|
f6a5d7bba1 | ||
|
|
27917f5859 | ||
|
|
2c8e0a1275 | ||
|
|
04f7b76456 | ||
|
|
477c1fa623 | ||
|
|
a5d7d6697a | ||
|
|
b1e6e7a9e6 | ||
|
|
c8db7ae4e4 | ||
|
|
f9a9074e56 | ||
|
|
77df7cf3dc | ||
|
|
1122499609 | ||
|
|
ecedda0779 | ||
|
|
40e36aaafd | ||
|
|
3c72799ceb | ||
|
|
0779132be9 | ||
|
|
35cb711ca1 | ||
|
|
aacda9eeb9 | ||
|
|
1ec5439c5d | ||
|
|
ebd7081b29 | ||
|
|
8907933285 | ||
|
|
7330c5bcba | ||
|
|
476ec70fe5 | ||
|
|
b7b3d053c7 | ||
|
|
8a41566b5f | ||
|
|
ff0f3b9dd4 | ||
|
|
5165ae27e7 | ||
|
|
c55875e31a | ||
|
|
08e8ed58d9 | ||
|
|
e6a73019ef | ||
|
|
11101f7f22 | ||
|
|
c8453c9cbd | ||
|
|
9a8350c2ed | ||
|
|
ab06db102c | ||
|
|
82f287f322 | ||
|
|
2c0fdb776e | ||
|
|
e106d7c09c | ||
|
|
bc1c9ecbd5 | ||
|
|
d610b2507e | ||
|
|
ad4c666051 | ||
|
|
644d073af0 | ||
|
|
03becc209c | ||
|
|
bd2b828bd3 | ||
|
|
4f3ed5c70e | ||
|
|
438fe193b6 | ||
|
|
c4a7f9bb2c | ||
|
|
3e913cc091 | ||
|
|
5d3fa68fc3 | ||
|
|
7c0a342f1d | ||
|
|
65c613ffcb | ||
|
|
1e278497b8 | ||
|
|
aab9b5718d | ||
|
|
96eac6a100 | ||
|
|
af13d51557 | ||
|
|
59748309ad | ||
|
|
0f874ae74a | ||
|
|
19de263050 | ||
|
|
34a9159719 | ||
|
|
f0bd3db4ad | ||
|
|
0003ee1f11 | ||
|
|
a4fff6b900 | ||
|
|
e3bfc6adb1 | ||
|
|
2ef141ee9b | ||
|
|
94086d0c05 | ||
|
|
6e2298df49 | ||
|
|
c0d6a79aa7 | ||
|
|
19812d1cd2 | ||
|
|
11cc244b18 | ||
|
|
8e82024c29 | ||
|
|
89aa57e6d6 | ||
|
|
44fdc4160e | ||
|
|
b5859d6541 | ||
|
|
d3d6482bfd | ||
|
|
9c8cbad7d5 | ||
|
|
e09e38a5c4 | ||
|
|
f245dee781 | ||
|
|
fd815f0c46 | ||
|
|
708e9ce1fe | ||
|
|
a68d2b718f | ||
|
|
d11f468add | ||
|
|
ef6997a2ab | ||
|
|
9386da4a2a | ||
|
|
d4210053ad | ||
|
|
41d11cca8e | ||
|
|
22df153513 | ||
|
|
2548d0dceb | ||
|
|
4b0d4a62c8 | ||
|
|
11d8e4594c | ||
|
|
7259f92ec1 | ||
|
|
024f17abe9 | ||
|
|
97cf2618e3 | ||
|
|
5fa746da8e | ||
|
|
91b9554f40 | ||
|
|
b5c977e66c | ||
|
|
15c33ca039 | ||
|
|
aa3237d0fa | ||
|
|
1f291bbcd8 | ||
|
|
9cd786c303 | ||
|
|
e701d67d79 | ||
|
|
be8cb66136 | ||
|
|
50563e3be0 | ||
|
|
2623bf7f7a | ||
|
|
6230d2f888 | ||
|
|
adc857fe5e | ||
|
|
bddf07ee44 | ||
|
|
63ed3dac67 | ||
|
|
922103e5aa | ||
|
|
d0fe33e953 | ||
|
|
934d17de47 | ||
|
|
2ccc10bb9c | ||
|
|
cc1db7e524 | ||
|
|
c2a9d3ee77 | ||
|
|
65fe7214eb | ||
|
|
71d09126c2 | ||
|
|
2eb0c30702 | ||
|
|
24e1c4b92f | ||
|
|
4e7eb58463 | ||
|
|
3ae0d1ba82 | ||
|
|
6f3ed9ab81 | ||
|
|
a490e6d1f2 | ||
|
|
a5dd1d547b | ||
|
|
974aaa3638 | ||
|
|
c3b73a9953 | ||
|
|
3bd4cbd0bd | ||
|
|
5a9b3c99b3 | ||
|
|
8ce1b00a8c | ||
|
|
e4237a74bb | ||
|
|
72f520f333 | ||
|
|
dc9ec7f190 | ||
|
|
c0dbd95504 | ||
|
|
6c5c54ea1b | ||
|
|
d0c40fd341 | ||
|
|
68855077cf | ||
|
|
3184cb61ec | ||
|
|
8ebfed7ab7 | ||
|
|
229afa92fd | ||
|
|
db6c96a80b | ||
|
|
6d0db7c075 | ||
|
|
e3f5c7e3c0 | ||
|
|
ba1fc76ebe | ||
|
|
6de58dc977 | ||
|
|
5e0e1a543f | ||
|
|
7254b6b501 | ||
|
|
f117e7fbaa | ||
|
|
d46bc38bdc | ||
|
|
a092c1b44f | ||
|
|
77b5efbe02 | ||
|
|
7a93fd799b | ||
|
|
4108ec36d7 | ||
|
|
87f93ed4f5 | ||
|
|
18befc19b3 | ||
|
|
bfe2346e8a | ||
|
|
9cbc2b3240 | ||
|
|
1fab0e0cf4 | ||
|
|
588f51d496 | ||
|
|
77eb164a62 | ||
|
|
58ec4564ae | ||
|
|
8c1f3144f8 | ||
|
|
507984bdf8 |
@@ -1,6 +1,10 @@
|
||||
###############################################################################
|
||||
# Set default behavior to automatically normalize line endings.
|
||||
###############################################################################
|
||||
*.sh -text eol=lf
|
||||
makefile -text eol=lf
|
||||
control -text eol=lf
|
||||
postinst -text eol=lf
|
||||
* text=auto
|
||||
|
||||
###############################################################################
|
||||
|
||||
@@ -185,4 +185,5 @@ FakesAssemblies/
|
||||
# LightSwitch generated files
|
||||
GeneratedArtifacts/
|
||||
_Pvt_Extensions/
|
||||
ModelManifest.xml
|
||||
ModelManifest.xml
|
||||
/.vs
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
Imports System.Xml.Serialization
|
||||
|
||||
<XmlRoot("gbm")>
|
||||
Public Class ExportData
|
||||
Dim oConfigs As List(Of Game)
|
||||
Private dExported As Int64
|
||||
Private iTotalConfigs As Integer
|
||||
Private iAppVer As Integer
|
||||
|
||||
<XmlAttribute("Exported")>
|
||||
Property Exported As Int64
|
||||
Set(value As Int64)
|
||||
dExported = value
|
||||
End Set
|
||||
Get
|
||||
Return dExported
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<XmlAttribute("TotalConfigurations")>
|
||||
Property TotalConfigurations As Integer
|
||||
Set(value As Integer)
|
||||
iTotalConfigs = value
|
||||
End Set
|
||||
Get
|
||||
Return iTotalConfigs
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<XmlAttribute("AppVer")>
|
||||
Property AppVer As Integer
|
||||
Set(value As Integer)
|
||||
iAppVer = value
|
||||
End Set
|
||||
Get
|
||||
Return iAppVer
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<XmlElement("Game")>
|
||||
Property Configurations As List(Of Game)
|
||||
Set(value As List(Of Game))
|
||||
oConfigs = value
|
||||
End Set
|
||||
Get
|
||||
Return oConfigs
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub New()
|
||||
dExported = 0
|
||||
iTotalConfigs = 0
|
||||
iAppVer = 0
|
||||
oConfigs = New List(Of Game)
|
||||
End Sub
|
||||
|
||||
Public Sub New(ByVal dInitExported As Int64, ByVal iInitTotalConfigs As Integer, ByVal iInitAppVer As Integer, ByVal oInitConfigs As List(Of Game))
|
||||
dExported = dInitExported
|
||||
iTotalConfigs = iInitTotalConfigs
|
||||
iAppVer = iInitAppVer
|
||||
oConfigs = oInitConfigs
|
||||
End Sub
|
||||
End Class
|
||||
@@ -1,13 +1,31 @@
|
||||
Public Class Game
|
||||
Private sGameID As String
|
||||
Private sGameName As String
|
||||
Private sProcessName As String
|
||||
Private sParameter As String
|
||||
Private sPath As String
|
||||
Private bAbsolutePath As Boolean
|
||||
Private bFolderSave As Boolean
|
||||
Private bAppendTimeStamp As Boolean
|
||||
Private iBackupLimit As Integer
|
||||
Private sFileType As String
|
||||
Private sExcludeList As String
|
||||
Private bMonitorOnly As Boolean
|
||||
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
|
||||
Set(value As String)
|
||||
sGameID = value
|
||||
End Set
|
||||
Get
|
||||
Return sGameID
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property Name As String
|
||||
Set(value As String)
|
||||
sGameName = value
|
||||
@@ -26,6 +44,15 @@
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property Parameter As String
|
||||
Set(value As String)
|
||||
sParameter = value
|
||||
End Set
|
||||
Get
|
||||
Return sParameter
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property Path As String
|
||||
Set(value As String)
|
||||
sPath = value
|
||||
@@ -53,6 +80,24 @@
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property AppendTimeStamp As Boolean
|
||||
Set(value As Boolean)
|
||||
bAppendTimeStamp = value
|
||||
End Set
|
||||
Get
|
||||
Return bAppendTimeStamp
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property BackupLimit As Integer
|
||||
Set(value As Integer)
|
||||
iBackupLimit = value
|
||||
End Set
|
||||
Get
|
||||
Return iBackupLimit
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property FileType As String
|
||||
Set(value As String)
|
||||
sFileType = value
|
||||
@@ -71,6 +116,51 @@
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property MonitorOnly As Boolean
|
||||
Set(value As Boolean)
|
||||
bMonitorOnly = value
|
||||
End Set
|
||||
Get
|
||||
Return bMonitorOnly
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property Comments As String
|
||||
Set(value As String)
|
||||
sComments = value
|
||||
End Set
|
||||
Get
|
||||
Return sComments
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property IsRegEx As Boolean
|
||||
Set(value As Boolean)
|
||||
bIsRegEx = value
|
||||
End Set
|
||||
Get
|
||||
Return bIsRegEx
|
||||
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
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
Imports System.Xml.Serialization
|
||||
|
||||
<XmlRoot("Session")>
|
||||
Public Class Session
|
||||
Private sGame As String
|
||||
Private sStart As String
|
||||
Private sEnd As String
|
||||
Private sHours As String
|
||||
|
||||
<XmlElement("Game")>
|
||||
Public Property GameName As String
|
||||
Set(value As String)
|
||||
sGame = value
|
||||
End Set
|
||||
Get
|
||||
Return sGame
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<XmlElement("Start")>
|
||||
Public Property StartDate As String
|
||||
Set(value As String)
|
||||
sStart = value
|
||||
End Set
|
||||
Get
|
||||
Return sStart
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<XmlElement("End")>
|
||||
Public Property EndDate As String
|
||||
Set(value As String)
|
||||
sEnd = value
|
||||
End Set
|
||||
Get
|
||||
Return sEnd
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<XmlElement("Hours")>
|
||||
Public Property Hours As String
|
||||
Set(value As String)
|
||||
sHours = value
|
||||
End Set
|
||||
Get
|
||||
Return sHours
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
@@ -1,4 +1,5 @@
|
||||
Public Class Tag
|
||||
<Serializable()>
|
||||
Public Class Tag
|
||||
Private sTagName As String
|
||||
|
||||
Property Name As String
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Public Class clsBackup
|
||||
Private sBackupID As String = Guid.NewGuid.ToString
|
||||
Private sMonitorID As String = String.Empty
|
||||
Private sName As String = String.Empty
|
||||
Private sFileName As String = String.Empty
|
||||
Private sRestorePath As String = String.Empty
|
||||
@@ -7,11 +8,9 @@
|
||||
Private sRelativeRestorePath As String = String.Empty
|
||||
Private dDateUpdated As DateTime = Date.Now
|
||||
Private sUpdatedBy As String = String.Empty
|
||||
Private dLastDateUpdated As DateTime = Date.Now
|
||||
Private sLastUpdatedBy As String = String.Empty
|
||||
Private sCheckSum As String = String.Empty
|
||||
|
||||
Property ID As String
|
||||
Property ManifestID As String
|
||||
Get
|
||||
Return sBackupID
|
||||
End Get
|
||||
@@ -20,6 +19,15 @@
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property MonitorID As String
|
||||
Get
|
||||
Return sMonitorID
|
||||
End Get
|
||||
Set(value As String)
|
||||
sMonitorID = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Name As String
|
||||
Get
|
||||
Return sName
|
||||
@@ -39,6 +47,12 @@
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property FileSafeName As String
|
||||
Get
|
||||
Return mgrPath.ValidateFileName(sName)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property FileName As String
|
||||
Get
|
||||
If mgrCommon.IsUnix Then
|
||||
@@ -109,24 +123,6 @@
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property LastDateUpdated As DateTime
|
||||
Get
|
||||
Return dLastDateUpdated
|
||||
End Get
|
||||
Set(value As DateTime)
|
||||
dLastDateUpdated = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property LastUpdatedBy As String
|
||||
Get
|
||||
Return sLastUpdatedBy
|
||||
End Get
|
||||
Set(value As String)
|
||||
sLastUpdatedBy = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property CheckSum As String
|
||||
Get
|
||||
Return sCheckSum
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
Public Class clsGame
|
||||
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
|
||||
Private sProcessName As String = String.Empty
|
||||
Private sParameter As String = String.Empty
|
||||
Private sPath As String = String.Empty
|
||||
Private bAbsolutePath As Boolean = False
|
||||
Private bFolderSave As Boolean = False
|
||||
Private sFileType As String = String.Empty
|
||||
Private bAppendTimeStamp As Boolean = False
|
||||
Private iBackupLimit As Integer = 0
|
||||
Private bCleanFolder As Boolean = False
|
||||
Private sExcludeList As String = String.Empty
|
||||
Private sProcessPath As String = String.Empty
|
||||
Private sIcon As String = String.Empty
|
||||
@@ -15,9 +22,13 @@
|
||||
Private sCompany As String = String.Empty
|
||||
Private bEnabled As Boolean = True
|
||||
Private bMonitorOnly As Boolean = False
|
||||
Private bDuplicate As Boolean = False
|
||||
Private bTempGame As Boolean = False
|
||||
Private sComments As String = String.Empty
|
||||
Private bIsRegEx 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
|
||||
@@ -25,25 +36,28 @@
|
||||
Company = 2
|
||||
Version = 4
|
||||
Icon = 16
|
||||
TimeStamp = 32
|
||||
Unused = 32 'Do not remove to maintain compatability, re-use for a future field.
|
||||
MonitorGame = 64
|
||||
End Enum
|
||||
|
||||
Public Enum eOS
|
||||
<XmlEnum("1")>
|
||||
Windows = 1
|
||||
<XmlEnum("2")>
|
||||
Linux = 2
|
||||
End Enum
|
||||
|
||||
Property ID As String
|
||||
Set(value As String)
|
||||
sGameID = value
|
||||
If Not value Is Nothing Then
|
||||
sGameID = mgrPath.ValidateFileName(value)
|
||||
End If
|
||||
End Set
|
||||
Get
|
||||
Return sGameID
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property CompoundKey As String
|
||||
Get
|
||||
Return ProcessName & ":" & Name
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property CroppedName As String
|
||||
Get
|
||||
If Name.Length > 40 Then
|
||||
@@ -54,6 +68,12 @@
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property FileSafeName As String
|
||||
Get
|
||||
Return mgrPath.ValidateFileName(sGameName)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property Name As String
|
||||
Set(value As String)
|
||||
sGameName = value
|
||||
@@ -72,6 +92,15 @@
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property Parameter As String
|
||||
Set(value As String)
|
||||
sParameter = value
|
||||
End Set
|
||||
Get
|
||||
Return sParameter
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property Path As String
|
||||
Set(value As String)
|
||||
sPath = mgrPath.ReverseSpecialPaths(value)
|
||||
@@ -86,7 +115,12 @@
|
||||
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
|
||||
|
||||
@@ -117,6 +151,24 @@
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property BackupLimit As Integer
|
||||
Get
|
||||
Return iBackupLimit
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
iBackupLimit = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property CleanFolder As Boolean
|
||||
Get
|
||||
Return bCleanFolder
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bCleanFolder = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property ExcludeList As String
|
||||
Set(value As String)
|
||||
sExcludeList = value
|
||||
@@ -171,7 +223,7 @@
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Enabled As Boolean
|
||||
Property Enabled As Boolean
|
||||
Get
|
||||
Return bEnabled
|
||||
End Get
|
||||
@@ -180,7 +232,7 @@
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property MonitorOnly As Boolean
|
||||
Property MonitorOnly As Boolean
|
||||
Get
|
||||
Return bMonitorOnly
|
||||
End Get
|
||||
@@ -189,36 +241,51 @@
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Duplicate As Boolean
|
||||
Property Comments As String
|
||||
Get
|
||||
Return bDuplicate
|
||||
Return sComments
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bDuplicate = value
|
||||
Set(value As String)
|
||||
sComments = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
ReadOnly Property TruePath As String
|
||||
Property IsRegEx As Boolean
|
||||
Get
|
||||
Return bIsRegEx
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bIsRegEx = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property RecurseSubFolders As Boolean
|
||||
Get
|
||||
Return bRecurseSubFolders
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bRecurseSubFolders = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property OS As eOS
|
||||
Get
|
||||
Return iOS
|
||||
End Get
|
||||
Set(value As eOS)
|
||||
iOS = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property TruePath As String
|
||||
Set(value As String)
|
||||
sPath = value
|
||||
End Set
|
||||
Get
|
||||
Return sPath
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property TrueProcess As String
|
||||
Get
|
||||
Return HandleProcessDuplicates()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property Temporary As Boolean
|
||||
Get
|
||||
Return bTempGame
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bTempGame = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property ImportTags As List(Of Tag)
|
||||
Get
|
||||
Return oImportTags
|
||||
@@ -228,6 +295,44 @@
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property ImportUpdate As Boolean
|
||||
Get
|
||||
Return bImportUpdate
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bImportUpdate = value
|
||||
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
|
||||
Return New String() {}
|
||||
Else
|
||||
Return FileType.Split(":")
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
ReadOnly Property ExcludeArray As String()
|
||||
Get
|
||||
If ExcludeList = String.Empty Then
|
||||
Return New String() {}
|
||||
Else
|
||||
Return ExcludeList.Split(":")
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Function SyncEquals(obj As Object, eSyncFields As eOptionalSyncFields) As Boolean
|
||||
Dim oGame As clsGame = TryCast(obj, clsGame)
|
||||
If oGame Is Nothing Then
|
||||
@@ -243,6 +348,9 @@
|
||||
If ProcessName <> oGame.ProcessName Then
|
||||
Return False
|
||||
End If
|
||||
If Parameter <> oGame.Parameter Then
|
||||
Return False
|
||||
End If
|
||||
If Path <> oGame.Path Then
|
||||
Return False
|
||||
End If
|
||||
@@ -261,12 +369,30 @@
|
||||
If AppendTimeStamp <> oGame.AppendTimeStamp Then
|
||||
Return False
|
||||
End If
|
||||
If BackupLimit <> oGame.BackupLimit Then
|
||||
Return False
|
||||
End If
|
||||
If CleanFolder <> oGame.CleanFolder Then
|
||||
Return False
|
||||
End If
|
||||
If Hours <> oGame.Hours Then
|
||||
Return False
|
||||
End If
|
||||
If MonitorOnly <> oGame.MonitorOnly Then
|
||||
Return False
|
||||
End If
|
||||
If Comments <> oGame.Comments Then
|
||||
Return False
|
||||
End If
|
||||
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
|
||||
@@ -289,11 +415,6 @@
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
If (eSyncFields And eOptionalSyncFields.TimeStamp) = eOptionalSyncFields.TimeStamp Then
|
||||
If AppendTimeStamp <> oGame.AppendTimeStamp Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
If (eSyncFields And eOptionalSyncFields.Version) = eOptionalSyncFields.Version Then
|
||||
If Version <> oGame.Version Then
|
||||
Return False
|
||||
@@ -308,12 +429,52 @@
|
||||
If oGame Is Nothing Then
|
||||
Return False
|
||||
Else
|
||||
'Core Fields
|
||||
If ID <> oGame.ID Then
|
||||
Return False
|
||||
End If
|
||||
If Name <> oGame.Name Then
|
||||
Return False
|
||||
End If
|
||||
If ProcessName <> oGame.ProcessName Then
|
||||
Return False
|
||||
End If
|
||||
If Parameter <> oGame.Parameter Then
|
||||
Return False
|
||||
End If
|
||||
If Path <> oGame.Path Then
|
||||
Return False
|
||||
End If
|
||||
If FileType <> oGame.FileType Then
|
||||
Return False
|
||||
End If
|
||||
If ExcludeList <> oGame.ExcludeList Then
|
||||
Return False
|
||||
End If
|
||||
If AbsolutePath <> oGame.AbsolutePath Then
|
||||
Return False
|
||||
End If
|
||||
If FolderSave <> oGame.FolderSave Then
|
||||
Return False
|
||||
End If
|
||||
If AppendTimeStamp <> oGame.AppendTimeStamp Then
|
||||
Return False
|
||||
End If
|
||||
If MonitorOnly <> oGame.MonitorOnly Then
|
||||
Return False
|
||||
End If
|
||||
If Comments <> oGame.Comments Then
|
||||
Return False
|
||||
End If
|
||||
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
|
||||
@@ -334,16 +495,12 @@
|
||||
Return DirectCast(Me.MemberwiseClone(), clsGame)
|
||||
End Function
|
||||
|
||||
Private Function HandleProcessDuplicates() As String
|
||||
Dim sProcessName As String
|
||||
Public Shared Function SetSyncField(ByVal eSyncFields As eOptionalSyncFields, ByVal eSyncField As eOptionalSyncFields) As eOptionalSyncFields
|
||||
Return eSyncFields Or eSyncField
|
||||
End Function
|
||||
|
||||
'Handle Duplicates
|
||||
sProcessName = Me.ProcessName
|
||||
If Me.Duplicate Then
|
||||
sProcessName = Me.ProcessName.Split(":")(0)
|
||||
End If
|
||||
|
||||
Return sProcessName
|
||||
Public Shared Function RemoveSyncField(ByVal eSyncFields As eOptionalSyncFields, ByVal eSyncField As eOptionalSyncFields) As eOptionalSyncFields
|
||||
Return eSyncFields And (Not eSyncField)
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
Public Class clsGameFilter
|
||||
|
||||
Private sID As String
|
||||
Private oField As clsGameFilterField
|
||||
Private bNot As Boolean
|
||||
Private oData As Object
|
||||
Private eNumericOperator As eNumericOperators = eNumericOperators.Equals
|
||||
|
||||
Public Enum eNumericOperators
|
||||
Equals = 1
|
||||
Greater = 2
|
||||
Lesser = 3
|
||||
GreaterEquals = 4
|
||||
LesserEquals = 5
|
||||
End Enum
|
||||
|
||||
Public Property ID As String
|
||||
Get
|
||||
Return sID
|
||||
End Get
|
||||
Set(value As String)
|
||||
sID = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Field As clsGameFilterField
|
||||
Get
|
||||
Return oField
|
||||
End Get
|
||||
Set(value As clsGameFilterField)
|
||||
oField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property NotCondition As Boolean
|
||||
Get
|
||||
Return bNot
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bNot = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Data As Object
|
||||
Get
|
||||
Return oData
|
||||
End Get
|
||||
Set(value As Object)
|
||||
oData = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property NumericOperator As eNumericOperators
|
||||
Get
|
||||
Return eNumericOperator
|
||||
End Get
|
||||
Set(value As eNumericOperators)
|
||||
eNumericOperator = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property NumericOperatorAsString As String
|
||||
Get
|
||||
Select Case eNumericOperator
|
||||
Case eNumericOperators.Equals
|
||||
Return "="
|
||||
Case eNumericOperators.Greater
|
||||
Return ">"
|
||||
Case eNumericOperators.GreaterEquals
|
||||
Return ">="
|
||||
Case eNumericOperators.Lesser
|
||||
Return "<"
|
||||
Case eNumericOperators.LesserEquals
|
||||
Return "<="
|
||||
Case Else
|
||||
Return String.Empty
|
||||
End Select
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,92 @@
|
||||
Public Class clsGameFilterField
|
||||
|
||||
Public Enum eDataType As Integer
|
||||
fString = 1
|
||||
fNumeric = 2
|
||||
fBool = 3
|
||||
fEnum = 4
|
||||
End Enum
|
||||
|
||||
Public Enum eEnumFilterField As Integer
|
||||
OS = 1
|
||||
End Enum
|
||||
|
||||
<Flags()> Public Enum eFieldStatus
|
||||
None = 0
|
||||
ValidFilter = 1
|
||||
ValidSort = 2
|
||||
End Enum
|
||||
|
||||
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
|
||||
Get
|
||||
Return sFieldName
|
||||
End Get
|
||||
Set(value As String)
|
||||
sFieldName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property FriendlyFieldName As String
|
||||
Get
|
||||
Return sFriendlyFieldName
|
||||
End Get
|
||||
Set(value As String)
|
||||
sFriendlyFieldName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Type As eDataType
|
||||
Get
|
||||
Return eType
|
||||
End Get
|
||||
Set(value As eDataType)
|
||||
eType = value
|
||||
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
|
||||
Return eStatus
|
||||
End Get
|
||||
Set(value As eFieldStatus)
|
||||
If (eStatus And value) = value Then
|
||||
eStatus = RemoveFieldStatus(value)
|
||||
Else
|
||||
eStatus = SetFieldStatus(value)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Function SetFieldStatus(ByVal eFlag As eFieldStatus) As eFieldStatus
|
||||
Return eStatus Or eFlag
|
||||
End Function
|
||||
|
||||
Private Function RemoveFieldStatus(ByVal eFlag As eFieldStatus) As eFieldStatus
|
||||
Return eStatus And (Not eFlag)
|
||||
End Function
|
||||
|
||||
Public Function CheckStatus(ByVal eFlag As eFieldStatus) As Boolean
|
||||
If (eStatus And eFlag) = eFlag Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,22 @@
|
||||
Public Class clsGameProcess
|
||||
Private sProcessID As String
|
||||
Private sMonitorID As String
|
||||
|
||||
Public Property ProcessID As String
|
||||
Get
|
||||
Return sProcessID
|
||||
End Get
|
||||
Set(value As String)
|
||||
sProcessID = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property MonitorID As String
|
||||
Get
|
||||
Return sMonitorID
|
||||
End Get
|
||||
Set(value As String)
|
||||
sMonitorID = value
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
ReadOnly Property FormattedName As String
|
||||
Get
|
||||
Return "*" & sVariableName & "*"
|
||||
Return "%" & sVariableName & "%"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
<Serializable()>
|
||||
Public Class clsProcess
|
||||
Private sProcessID As String = Guid.NewGuid.ToString
|
||||
Private sName As String = String.Empty
|
||||
Private sPath As String = String.Empty
|
||||
Private sArgs As String = String.Empty
|
||||
Private bKill As Boolean = True
|
||||
|
||||
Public Property ID As String
|
||||
Get
|
||||
Return sProcessID
|
||||
End Get
|
||||
Set(value As String)
|
||||
sProcessID = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Name As String
|
||||
Get
|
||||
Return sName
|
||||
End Get
|
||||
Set(value As String)
|
||||
sName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Path As String
|
||||
Get
|
||||
Return sPath
|
||||
End Get
|
||||
Set(value As String)
|
||||
sPath = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Args As String
|
||||
Get
|
||||
Return sArgs
|
||||
End Get
|
||||
Set(value As String)
|
||||
sArgs = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Kill As Boolean
|
||||
Get
|
||||
Return bKill
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bKill = value
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
@@ -1,13 +1,13 @@
|
||||
Public Class clsRestoreCache
|
||||
Private sName As String
|
||||
Private sPath As String
|
||||
Public Class clsSavedPath
|
||||
Private sPathName As String = String.Empty
|
||||
Private sPath As String = String.Empty
|
||||
|
||||
Property Name As String
|
||||
Property PathName As String
|
||||
Get
|
||||
Return sName
|
||||
Return sPathName
|
||||
End Get
|
||||
Set(value As String)
|
||||
sName = value
|
||||
sPathName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -19,5 +19,4 @@
|
||||
sPath = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,57 @@
|
||||
Public Class clsSession
|
||||
|
||||
Private sMonitorID As String
|
||||
Private iStart As Int64
|
||||
Private iEnd As Int64
|
||||
|
||||
Public Property MonitorID As String
|
||||
Set(value As String)
|
||||
sMonitorID = value
|
||||
End Set
|
||||
Get
|
||||
Return sMonitorID
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property SessionStart As Int64
|
||||
Set(value As Int64)
|
||||
iStart = value
|
||||
End Set
|
||||
Get
|
||||
Return iStart
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public WriteOnly Property SessionStartFromDate As DateTime
|
||||
Set(value As DateTime)
|
||||
iStart = mgrCommon.DateToUnix(value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property SessionStartFormatted As DateTime
|
||||
Get
|
||||
Return mgrCommon.UnixToDate(iStart)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property SessionEnd As Int64
|
||||
Set(value As Int64)
|
||||
iEnd = value
|
||||
End Set
|
||||
Get
|
||||
Return iEnd
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public WriteOnly Property SessionEndFromDate As DateTime
|
||||
Set(value As DateTime)
|
||||
iEnd = mgrCommon.DateToUnix(value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property SessionEndFormatted As DateTime
|
||||
Get
|
||||
Return mgrCommon.UnixToDate(iEnd)
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
@@ -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
|
||||
@@ -36,6 +36,8 @@ Partial Class frmAddWizard
|
||||
Me.txtProcessPath = New System.Windows.Forms.TextBox()
|
||||
Me.lblStep2Intro = New System.Windows.Forms.Label()
|
||||
Me.tbPage3 = New System.Windows.Forms.TabPage()
|
||||
Me.lblLimit = New System.Windows.Forms.Label()
|
||||
Me.nudLimit = New System.Windows.Forms.NumericUpDown()
|
||||
Me.lblStep3Title = New System.Windows.Forms.Label()
|
||||
Me.lblStep3Instructions = New System.Windows.Forms.Label()
|
||||
Me.chkTimeStamp = New System.Windows.Forms.CheckBox()
|
||||
@@ -44,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()
|
||||
@@ -70,6 +73,7 @@ Partial Class frmAddWizard
|
||||
Me.tbPage1.SuspendLayout()
|
||||
Me.tbPage2.SuspendLayout()
|
||||
Me.tbPage3.SuspendLayout()
|
||||
CType(Me.nudLimit, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.tbPage3a.SuspendLayout()
|
||||
Me.tbPage4.SuspendLayout()
|
||||
Me.tbPage5.SuspendLayout()
|
||||
@@ -121,9 +125,8 @@ Partial Class frmAddWizard
|
||||
Me.lblStep1Instructions.Name = "lblStep1Instructions"
|
||||
Me.lblStep1Instructions.Size = New System.Drawing.Size(303, 85)
|
||||
Me.lblStep1Instructions.TabIndex = 6
|
||||
Me.lblStep1Instructions.Text = "The name will be automatically filtered for length and invalid characters. You m" & _
|
||||
"ay drag and drop a shortcut here to complete this step, only Windows shortcuts a" & _
|
||||
"re currently supported."
|
||||
Me.lblStep1Instructions.Text = "You may drag and drop a shortcut here to complete this step, only Windows shortcu" &
|
||||
"ts are currently supported."
|
||||
'
|
||||
'txtName
|
||||
'
|
||||
@@ -205,6 +208,8 @@ Partial Class frmAddWizard
|
||||
'tbPage3
|
||||
'
|
||||
Me.tbPage3.BackColor = System.Drawing.SystemColors.Control
|
||||
Me.tbPage3.Controls.Add(Me.lblLimit)
|
||||
Me.tbPage3.Controls.Add(Me.nudLimit)
|
||||
Me.tbPage3.Controls.Add(Me.lblStep3Title)
|
||||
Me.tbPage3.Controls.Add(Me.lblStep3Instructions)
|
||||
Me.tbPage3.Controls.Add(Me.chkTimeStamp)
|
||||
@@ -218,6 +223,24 @@ Partial Class frmAddWizard
|
||||
Me.tbPage3.TabIndex = 2
|
||||
Me.tbPage3.Text = "TabPage3"
|
||||
'
|
||||
'lblLimit
|
||||
'
|
||||
Me.lblLimit.AutoSize = True
|
||||
Me.lblLimit.Location = New System.Drawing.Point(203, 109)
|
||||
Me.lblLimit.Name = "lblLimit"
|
||||
Me.lblLimit.Size = New System.Drawing.Size(138, 13)
|
||||
Me.lblLimit.TabIndex = 15
|
||||
Me.lblLimit.Text = "Backup Limit (0 = Unlimited)"
|
||||
Me.lblLimit.Visible = False
|
||||
'
|
||||
'nudLimit
|
||||
'
|
||||
Me.nudLimit.Location = New System.Drawing.Point(157, 107)
|
||||
Me.nudLimit.Name = "nudLimit"
|
||||
Me.nudLimit.Size = New System.Drawing.Size(40, 20)
|
||||
Me.nudLimit.TabIndex = 14
|
||||
Me.nudLimit.Visible = False
|
||||
'
|
||||
'lblStep3Title
|
||||
'
|
||||
Me.lblStep3Title.AutoSize = True
|
||||
@@ -230,32 +253,32 @@ Partial Class frmAddWizard
|
||||
'
|
||||
'lblStep3Instructions
|
||||
'
|
||||
Me.lblStep3Instructions.Location = New System.Drawing.Point(14, 116)
|
||||
Me.lblStep3Instructions.Location = New System.Drawing.Point(14, 139)
|
||||
Me.lblStep3Instructions.Name = "lblStep3Instructions"
|
||||
Me.lblStep3Instructions.Size = New System.Drawing.Size(303, 42)
|
||||
Me.lblStep3Instructions.TabIndex = 9
|
||||
Me.lblStep3Instructions.Text = "If you're unsure of exactly which files to backup, make sure Save Entire Folder " & _
|
||||
"is checked. You can also time stamp your backup files to make incremental backu" & _
|
||||
"ps."
|
||||
Me.lblStep3Instructions.Text = "If you're unsure of exactly which files to backup, make sure Save entire folder " &
|
||||
"is checked. You can also choose to save multiple backups and set a limit on how" &
|
||||
" many to keep."
|
||||
'
|
||||
'chkTimeStamp
|
||||
'
|
||||
Me.chkTimeStamp.AutoSize = True
|
||||
Me.chkTimeStamp.Location = New System.Drawing.Point(139, 87)
|
||||
Me.chkTimeStamp.Location = New System.Drawing.Point(18, 108)
|
||||
Me.chkTimeStamp.Name = "chkTimeStamp"
|
||||
Me.chkTimeStamp.Size = New System.Drawing.Size(122, 17)
|
||||
Me.chkTimeStamp.Size = New System.Drawing.Size(133, 17)
|
||||
Me.chkTimeStamp.TabIndex = 8
|
||||
Me.chkTimeStamp.Text = "Time Stamp Backup"
|
||||
Me.chkTimeStamp.Text = "Save multiple backups"
|
||||
Me.chkTimeStamp.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkFolderSave
|
||||
'
|
||||
Me.chkFolderSave.AutoSize = True
|
||||
Me.chkFolderSave.Location = New System.Drawing.Point(17, 87)
|
||||
Me.chkFolderSave.Location = New System.Drawing.Point(18, 87)
|
||||
Me.chkFolderSave.Name = "chkFolderSave"
|
||||
Me.chkFolderSave.Size = New System.Drawing.Size(113, 17)
|
||||
Me.chkFolderSave.Size = New System.Drawing.Size(109, 17)
|
||||
Me.chkFolderSave.TabIndex = 7
|
||||
Me.chkFolderSave.Text = "Save Entire Folder"
|
||||
Me.chkFolderSave.Text = "Save entire folder"
|
||||
Me.chkFolderSave.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnSaveBrowse
|
||||
@@ -286,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)
|
||||
@@ -299,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
|
||||
@@ -352,7 +387,7 @@ Partial Class frmAddWizard
|
||||
Me.lblStep3aInstructions.Name = "lblStep3aInstructions"
|
||||
Me.lblStep3aInstructions.Size = New System.Drawing.Size(303, 56)
|
||||
Me.lblStep3aInstructions.TabIndex = 5
|
||||
Me.lblStep3aInstructions.Text = "Choose any file types, specific files or folders you wish to include in the back" & _
|
||||
Me.lblStep3aInstructions.Text = "Choose any file types, specific files or folders you wish to include in the back" &
|
||||
"up. If you're unsure, go back a step and choose to save the entire folder. "
|
||||
'
|
||||
'txtFileTypes
|
||||
@@ -434,7 +469,7 @@ Partial Class frmAddWizard
|
||||
Me.lblStep4Instructions.Name = "lblStep4Instructions"
|
||||
Me.lblStep4Instructions.Size = New System.Drawing.Size(303, 59)
|
||||
Me.lblStep4Instructions.TabIndex = 5
|
||||
Me.lblStep4Instructions.Text = "Choose any file types, specific files or folders you wish to exclude from the ba" & _
|
||||
Me.lblStep4Instructions.Text = "Choose any file types, specific files or folders you wish to exclude from the ba" &
|
||||
"ckup. You may choose multiple items to exclude. This step can be skipped."
|
||||
'
|
||||
'txtExcludeList
|
||||
@@ -529,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)
|
||||
@@ -539,6 +573,7 @@ Partial Class frmAddWizard
|
||||
Me.tbPage2.PerformLayout()
|
||||
Me.tbPage3.ResumeLayout(False)
|
||||
Me.tbPage3.PerformLayout()
|
||||
CType(Me.nudLimit, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.tbPage3a.ResumeLayout(False)
|
||||
Me.tbPage3a.PerformLayout()
|
||||
Me.tbPage4.ResumeLayout(False)
|
||||
@@ -591,4 +626,7 @@ Partial Class frmAddWizard
|
||||
Friend WithEvents lblExcludePath As Label
|
||||
Friend WithEvents lblIncludePathTitle As Label
|
||||
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
|
||||
@@ -46,6 +47,7 @@ Public Class frmAddWizard
|
||||
lblStep3Instructions.Text = frmAddWizard_lblStep3Instructions
|
||||
chkTimeStamp.Text = frmAddWizard_chkTimeStamp
|
||||
chkFolderSave.Text = frmAddWizard_chkFolderSave
|
||||
lblLimit.Text = frmAddWizard_lblLimit
|
||||
btnSaveBrowse.Text = frmAddWizard_btnSaveBrowse
|
||||
lblStep3Intro.Text = frmAddWizard_lblStep3Intro
|
||||
lblIncludePathTitle.Text = frmAddWizard_lblIncludePathTitle
|
||||
@@ -65,9 +67,34 @@ Public Class frmAddWizard
|
||||
|
||||
chkFolderSave.Checked = True
|
||||
chkTimeStamp.Checked = False
|
||||
chkRecurseSubFolders.Checked = True
|
||||
StepHandler()
|
||||
End Sub
|
||||
|
||||
Private Sub ShowHideLimit()
|
||||
If chkTimeStamp.Checked Then
|
||||
nudLimit.Visible = True
|
||||
lblLimit.Visible = True
|
||||
Else
|
||||
nudLimit.Visible = False
|
||||
lblLimit.Visible = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function ShowSummaryLimit(ByVal bTimeStamp As Boolean, ByVal iLimit As Integer) As String
|
||||
Dim sLimit As String = String.Empty
|
||||
|
||||
If bTimeStamp Then
|
||||
If iLimit <> 0 Then
|
||||
Return mgrCommon.BooleanYesNo(bTimeStamp) & " (" & iLimit & ")"
|
||||
Else
|
||||
Return mgrCommon.BooleanYesNo(bTimeStamp) & " (" & frmAddWizard_Summary_NoLimit & ")"
|
||||
End If
|
||||
Else
|
||||
Return mgrCommon.BooleanYesNo(bTimeStamp)
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Function StringEmptyText(ByVal sString As String) As String
|
||||
If sString = String.Empty Then
|
||||
Return frmAddWizard_None
|
||||
@@ -81,19 +108,32 @@ Public Class frmAddWizard
|
||||
Dim sName As String = txtName.Text
|
||||
Dim sProcessFullPath As String = txtProcessPath.Text
|
||||
Dim sProcessPath As String = Path.GetDirectoryName(sProcessFullPath)
|
||||
Dim sProcess As String = Path.GetFileNameWithoutExtension(sProcessFullPath)
|
||||
Dim sProcessSummaryText As String = Path.GetFileName(sProcessFullPath) & " (" & sProcessPath & ")"
|
||||
Dim sSavePath As String = txtSavePath.Text
|
||||
Dim bIsAbsolute As Boolean = mgrPath.IsAbsolute(sSavePath)
|
||||
Dim bFolderBackup As Boolean = chkFolderSave.Checked
|
||||
Dim bTimeStamp As Boolean = chkTimeStamp.Checked
|
||||
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()
|
||||
Dim sValues As String()
|
||||
Dim lstItem As ListViewItem
|
||||
|
||||
'Handle Process
|
||||
If Path.HasExtension(sProcessFullPath) Then
|
||||
If sProcessFullPath.ToLower.EndsWith(".exe") Then
|
||||
sProcess = Path.GetFileNameWithoutExtension(sProcessFullPath)
|
||||
Else
|
||||
sProcess = Path.GetFileName(sProcessFullPath)
|
||||
End If
|
||||
Else
|
||||
sProcess = Path.GetFileName(sProcessFullPath)
|
||||
End If
|
||||
|
||||
If Not bIsAbsolute Then
|
||||
sSavePath = mgrPath.DetermineRelativePath(sProcessPath, sSavePath)
|
||||
End If
|
||||
@@ -106,7 +146,7 @@ Public Class frmAddWizard
|
||||
lstSummary.Columns(1).Width = 210
|
||||
|
||||
sItems = {frmAddWizard_Summary_Name, frmAddWizard_Summary_Process, frmAddWizard_Summary_AbsolutePath, frmAddWizard_Summary_SavePath, frmAddWizard_Summary_FolderSave, frmAddWizard_Summary_Timestamp, frmAddWizard_Summary_Include, frmAddWizard_Summary_Exclude}
|
||||
sValues = {sName, sProcessSummaryText, mgrCommon.BooleanYesNo(bIsAbsolute), sSavePath, mgrCommon.BooleanYesNo(bFolderBackup), mgrCommon.BooleanYesNo(bTimeStamp), StringEmptyText(sFileType), StringEmptyText(sExcludeList)}
|
||||
sValues = {sName, sProcessSummaryText, mgrCommon.BooleanYesNo(bIsAbsolute), sSavePath, mgrCommon.BooleanYesNo(bFolderBackup), ShowSummaryLimit(bTimeStamp, iLimit), StringEmptyText(sFileType), StringEmptyText(sExcludeList)}
|
||||
|
||||
For i = 0 To sItems.Length - 1
|
||||
sItem = {sItems(i), sValues(i)}
|
||||
@@ -122,7 +162,10 @@ Public Class frmAddWizard
|
||||
oGame.FolderSave = bFolderBackup
|
||||
oGame.FileType = sFileType
|
||||
oGame.AppendTimeStamp = bTimeStamp
|
||||
oGame.BackupLimit = iLimit
|
||||
oGame.ExcludeList = sExcludeList
|
||||
oGame.ProcessPath = sProcessPath
|
||||
oGame.RecurseSubFolders = bRecurseSubFolders
|
||||
|
||||
Return oGame
|
||||
End Function
|
||||
@@ -158,10 +201,7 @@ Public Class frmAddWizard
|
||||
End Sub
|
||||
|
||||
Private Function ValidateName(ByVal strName As String, ByRef sErrorMessage As String) As Boolean
|
||||
If txtName.Text <> String.Empty Then
|
||||
txtName.Text = mgrPath.ValidateForFileSystem(txtName.Text)
|
||||
Return True
|
||||
Else
|
||||
If txtName.Text.Trim = String.Empty Then
|
||||
sErrorMessage = frmAddWizard_ErrorValidName
|
||||
txtName.Focus()
|
||||
Return False
|
||||
@@ -170,7 +210,9 @@ Public Class frmAddWizard
|
||||
End Function
|
||||
|
||||
Private Function ValidateProcessPath(ByVal strPath As String, ByRef sErrorMessage As String) As Boolean
|
||||
If strPath = String.Empty Then
|
||||
strPath = mgrPath.ValidatePath(strPath)
|
||||
|
||||
If strPath.Trim = String.Empty Then
|
||||
sErrorMessage = frmAddWizard_ErrorValidProcess
|
||||
txtProcessPath.Focus()
|
||||
Return False
|
||||
@@ -198,7 +240,7 @@ Public Class frmAddWizard
|
||||
End Function
|
||||
|
||||
Private Function ValidateSavePath(ByVal strPath As String, ByRef sErrorMessage As String) As Boolean
|
||||
If strPath = String.Empty Then
|
||||
If strPath.Trim = String.Empty Then
|
||||
sErrorMessage = frmAddWizard_ErrorValidSavePath
|
||||
txtSavePath.Focus()
|
||||
Return False
|
||||
@@ -220,7 +262,7 @@ Public Class frmAddWizard
|
||||
End Function
|
||||
|
||||
Private Function ValidateSaveType(ByVal strSaveType As String, ByRef sErrorMessage As String)
|
||||
If strSaveType = String.Empty Then
|
||||
If strSaveType.Trim = String.Empty Then
|
||||
sErrorMessage = frmAddWizard_ErrorValidSaveType
|
||||
txtFileTypes.Focus()
|
||||
Return False
|
||||
@@ -230,22 +272,11 @@ Public Class frmAddWizard
|
||||
End Function
|
||||
|
||||
Private Sub DoSave()
|
||||
Dim hshDupeCheck As New Hashtable
|
||||
Dim sNewGame As String = oGameToSave.ProcessName & ":" & oGameToSave.Name
|
||||
|
||||
For Each o As clsGame In GameData.Values
|
||||
hshDupeCheck.Add(o.CompoundKey, String.Empty)
|
||||
Next
|
||||
|
||||
If hshDupeCheck.Contains(sNewGame) Then
|
||||
mgrCommon.ShowMessage(frmAddWizard_ErrorGameDupe, MsgBoxStyle.Exclamation)
|
||||
Else
|
||||
mgrMonitorList.DoListAdd(oGameToSave)
|
||||
If mgrCommon.ShowMessage(frmAddWizard_ConfirmSaveTags, New String() {oGameToSave.Name, oGameToSave.Name}, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
OpenTags(oGameToSave)
|
||||
End If
|
||||
Me.Close()
|
||||
mgrMonitorList.DoListAdd(oGameToSave)
|
||||
If mgrCommon.ShowMessage(frmAddWizard_ConfirmSaveTags, New String() {oGameToSave.Name, oGameToSave.Name}, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
OpenTags(oGameToSave)
|
||||
End If
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub ValidateBack()
|
||||
@@ -296,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
|
||||
@@ -388,7 +420,7 @@ Public Class frmAddWizard
|
||||
End If
|
||||
End If
|
||||
|
||||
sNewPath = mgrCommon.OpenFileBrowser(frmAddWizard_ChooseProcess, "exe",
|
||||
sNewPath = mgrCommon.OpenFileBrowser("Wizard_Process_Path", frmAddWizard_ChooseProcess, "exe",
|
||||
frmAddWizard_Executable, sDefaultFolder, False)
|
||||
|
||||
If sNewPath <> String.Empty Then txtProcessPath.Text = sNewPath
|
||||
@@ -405,7 +437,7 @@ Public Class frmAddWizard
|
||||
End If
|
||||
End If
|
||||
|
||||
sNewPath = mgrCommon.OpenFolderBrowser(frmAddWizard_ChooseSavePath, sDefaultFolder, False)
|
||||
sNewPath = mgrCommon.OpenClassicFolderBrowser("Wizard_Save_Path", frmAddWizard_ChooseSavePath, sDefaultFolder, False, False)
|
||||
|
||||
If sNewPath <> String.Empty Then txtSavePath.Text = sNewPath
|
||||
End Sub
|
||||
@@ -425,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
|
||||
|
||||
@@ -490,6 +522,10 @@ Public Class frmAddWizard
|
||||
txtFileTypes.Clear()
|
||||
End Sub
|
||||
|
||||
Private Sub chkTimeStamp_CheckedChanged(sender As Object, e As EventArgs) Handles chkTimeStamp.CheckedChanged
|
||||
ShowHideLimit()
|
||||
End Sub
|
||||
|
||||
Private Sub btnInclude_Click(sender As Object, e As EventArgs) Handles btnInclude.Click
|
||||
OpenBuilder(frmAddWizard_Include, txtFileTypes)
|
||||
UpdateBuilderLabel(txtFileTypes.Text, lblFileTypes)
|
||||
@@ -499,4 +535,6 @@ Public Class frmAddWizard
|
||||
OpenBuilder(frmAddWizard_Exclude, txtExcludeList)
|
||||
UpdateBuilderLabel(txtExcludeList.Text, lblExclude)
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
@@ -1,9 +1,9 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class frmAdvancedImport
|
||||
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 frmAdvancedImport
|
||||
'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.btnImport = New System.Windows.Forms.Button()
|
||||
Me.chkSelectAll = New System.Windows.Forms.CheckBox()
|
||||
@@ -44,7 +44,7 @@ Partial Class frmAdvancedImport
|
||||
'chkSelectAll
|
||||
'
|
||||
Me.chkSelectAll.AutoSize = True
|
||||
Me.chkSelectAll.Location = New System.Drawing.Point(12, 12)
|
||||
Me.chkSelectAll.Location = New System.Drawing.Point(12, 11)
|
||||
Me.chkSelectAll.Name = "chkSelectAll"
|
||||
Me.chkSelectAll.Size = New System.Drawing.Size(70, 17)
|
||||
Me.chkSelectAll.TabIndex = 0
|
||||
@@ -98,9 +98,9 @@ Partial Class frmAdvancedImport
|
||||
'
|
||||
'lblFilter
|
||||
'
|
||||
Me.lblFilter.Location = New System.Drawing.Point(307, 12)
|
||||
Me.lblFilter.Location = New System.Drawing.Point(371, 12)
|
||||
Me.lblFilter.Name = "lblFilter"
|
||||
Me.lblFilter.Size = New System.Drawing.Size(103, 14)
|
||||
Me.lblFilter.Size = New System.Drawing.Size(39, 14)
|
||||
Me.lblFilter.TabIndex = 0
|
||||
Me.lblFilter.Text = "Filter:"
|
||||
Me.lblFilter.TextAlign = System.Drawing.ContentAlignment.TopRight
|
||||
@@ -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)
|
||||
|
||||
@@ -1,14 +1,26 @@
|
||||
Imports GBM.My.Resources
|
||||
Imports System.IO
|
||||
|
||||
Public Class frmAdvancedImport
|
||||
|
||||
Private oImportData As ExportData
|
||||
Private hshImportData As Hashtable
|
||||
Private hshFinalData As New Hashtable
|
||||
Private bSelectAll As Boolean = False
|
||||
Private bSelectAll As Boolean = True
|
||||
Private bIsLoading As Boolean = False
|
||||
Private iCurrentSort As Integer = 0
|
||||
Private oImageList As ImageList
|
||||
Private WithEvents tmFilterTimer As Timer
|
||||
|
||||
Public Property ImportInfo As ExportData
|
||||
Set(value As ExportData)
|
||||
oImportData = value
|
||||
End Set
|
||||
Get
|
||||
Return oImportData
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property ImportData As Hashtable
|
||||
Set(value As Hashtable)
|
||||
hshImportData = value
|
||||
@@ -29,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
|
||||
@@ -44,7 +56,23 @@ Public Class frmAdvancedImport
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub LoadData(Optional ByVal sFilter As String = "")
|
||||
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
|
||||
Dim sTags As String
|
||||
@@ -63,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
|
||||
@@ -70,23 +99,48 @@ Public Class frmAdvancedImport
|
||||
Next
|
||||
sTags = sTags.TrimEnd(New Char() {",", " "})
|
||||
|
||||
oListViewItem = New ListViewItem(New String() {oApp.Name, oApp.TrueProcess, sTags})
|
||||
oListViewItem.Tag = oApp.CompoundKey
|
||||
oListViewItem = New ListViewItem(New String() {oApp.Name, oApp.ProcessName, sTags})
|
||||
oListViewItem.Tag = oApp.ID
|
||||
|
||||
If FinalData.ContainsKey(oApp.CompoundKey) Then
|
||||
If FinalData.ContainsKey(oApp.ID) Then
|
||||
oListViewItem.Checked = True
|
||||
Else
|
||||
oListViewItem.Checked = False
|
||||
End If
|
||||
|
||||
If bAutoDetect Then
|
||||
If oApp.AbsolutePath Then
|
||||
If Directory.Exists(oApp.Path) Then
|
||||
oListViewItem.Checked = True
|
||||
SaveChecked(oListViewItem)
|
||||
Else
|
||||
oListViewItem.Checked = False
|
||||
End If
|
||||
Else
|
||||
oListViewItem.Checked = False
|
||||
End If
|
||||
End If
|
||||
|
||||
If oApp.ImportUpdate Then
|
||||
oListViewItem.ImageIndex = 1
|
||||
oListViewItem.Checked = True
|
||||
Else
|
||||
oListViewItem.ImageIndex = 0
|
||||
End If
|
||||
|
||||
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)
|
||||
@@ -120,6 +174,12 @@ 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
|
||||
Me.Text &= " [" & mgrCommon.UnixToDate(ImportInfo.Exported).Date & "]"
|
||||
End If
|
||||
|
||||
'Set Form Text
|
||||
lblFilter.Text = frmAdvancedImport_lblFilter
|
||||
@@ -127,6 +187,13 @@ Public Class frmAdvancedImport
|
||||
btnImport.Text = frmAdvancedImport_btnImport
|
||||
chkSelectAll.Text = frmAdvancedImport_chkSelectAll
|
||||
|
||||
|
||||
'Set Icons
|
||||
oImageList = New ImageList()
|
||||
oImageList.Images.Add(Icon_New)
|
||||
oImageList.Images.Add(Icon_Update)
|
||||
lstGames.SmallImageList = oImageList
|
||||
|
||||
chkSelectAll.Checked = True
|
||||
|
||||
'Init Filter Timer
|
||||
@@ -142,8 +209,7 @@ Public Class frmAdvancedImport
|
||||
Private Sub frmAdvancedImport_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
bIsLoading = True
|
||||
SetForm()
|
||||
LoadData()
|
||||
SelectToggle()
|
||||
LoadData(String.Empty, True)
|
||||
bIsLoading = False
|
||||
End Sub
|
||||
|
||||
@@ -184,6 +250,7 @@ Public Class frmAdvancedImport
|
||||
tmFilterTimer.Stop()
|
||||
tmFilterTimer.Enabled = False
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
' Column Sorter
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
|
||||
Public Class frmChooseGame
|
||||
|
||||
Private oProcess As mgrProcesses
|
||||
Private oProcess As mgrProcessDetection
|
||||
Private oGame As clsGame
|
||||
Private oGamesHash As New Hashtable
|
||||
Private bGameSelected As Boolean = False
|
||||
|
||||
Property Process As mgrProcesses
|
||||
Property Process As mgrProcessDetection
|
||||
Get
|
||||
Return oProcess
|
||||
End Get
|
||||
Set(value As mgrProcesses)
|
||||
Set(value As mgrProcessDetection)
|
||||
oProcess = value
|
||||
End Set
|
||||
End Property
|
||||
@@ -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
|
||||
|
||||
@@ -22,75 +22,117 @@ Partial Class frmFilter
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.optGameInfo = New System.Windows.Forms.RadioButton()
|
||||
Me.optTag = New System.Windows.Forms.RadioButton()
|
||||
Me.grpTagFilter = New System.Windows.Forms.GroupBox()
|
||||
Me.lblExcludeTags = New System.Windows.Forms.Label()
|
||||
Me.btnExcludeRemove = New System.Windows.Forms.Button()
|
||||
Me.btnExcludeAdd = New System.Windows.Forms.Button()
|
||||
Me.lstExcludeTags = New System.Windows.Forms.ListBox()
|
||||
Me.grpTagOptions = New System.Windows.Forms.GroupBox()
|
||||
Me.optAll = New System.Windows.Forms.RadioButton()
|
||||
Me.optAny = New System.Windows.Forms.RadioButton()
|
||||
Me.lblGameTags = New System.Windows.Forms.Label()
|
||||
Me.lblIncludeTags = New System.Windows.Forms.Label()
|
||||
Me.lblTags = New System.Windows.Forms.Label()
|
||||
Me.btnRemove = New System.Windows.Forms.Button()
|
||||
Me.btnAdd = New System.Windows.Forms.Button()
|
||||
Me.lstFilter = New System.Windows.Forms.ListBox()
|
||||
Me.btnIncludeRemove = New System.Windows.Forms.Button()
|
||||
Me.btnIncludeAdd = New System.Windows.Forms.Button()
|
||||
Me.lstIncludeTags = New System.Windows.Forms.ListBox()
|
||||
Me.lstTags = New System.Windows.Forms.ListBox()
|
||||
Me.btnOK = New System.Windows.Forms.Button()
|
||||
Me.grpGameFilter = New System.Windows.Forms.GroupBox()
|
||||
Me.grpGameInfoOptions = New System.Windows.Forms.GroupBox()
|
||||
Me.lblNot = New System.Windows.Forms.Label()
|
||||
Me.chkNot = New System.Windows.Forms.CheckBox()
|
||||
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()
|
||||
Me.lblFilterData = New System.Windows.Forms.Label()
|
||||
Me.lblFields = New System.Windows.Forms.Label()
|
||||
Me.btnRemoveFilter = New System.Windows.Forms.Button()
|
||||
Me.lstFilter = New System.Windows.Forms.ListBox()
|
||||
Me.btnAddFilter = New System.Windows.Forms.Button()
|
||||
Me.cboFilterField = New System.Windows.Forms.ComboBox()
|
||||
Me.grpFilterType = New System.Windows.Forms.GroupBox()
|
||||
Me.optOr = New System.Windows.Forms.RadioButton()
|
||||
Me.optAnd = New System.Windows.Forms.RadioButton()
|
||||
Me.txtCompany = New System.Windows.Forms.TextBox()
|
||||
Me.lblCompany = New System.Windows.Forms.Label()
|
||||
Me.txtProcess = New System.Windows.Forms.TextBox()
|
||||
Me.lblProcess = New System.Windows.Forms.Label()
|
||||
Me.lblName = New System.Windows.Forms.Label()
|
||||
Me.txtName = New System.Windows.Forms.TextBox()
|
||||
Me.txtStringFilter = New System.Windows.Forms.TextBox()
|
||||
Me.grpSorting = New System.Windows.Forms.GroupBox()
|
||||
Me.grpSortOptions = New System.Windows.Forms.GroupBox()
|
||||
Me.optSortAsc = New System.Windows.Forms.RadioButton()
|
||||
Me.optSortDesc = New System.Windows.Forms.RadioButton()
|
||||
Me.lblSortFields = New System.Windows.Forms.Label()
|
||||
Me.cboSortField = New System.Windows.Forms.ComboBox()
|
||||
Me.chkTag = New System.Windows.Forms.CheckBox()
|
||||
Me.chkGameInfo = New System.Windows.Forms.CheckBox()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.grpTagFilter.SuspendLayout()
|
||||
Me.grpTagOptions.SuspendLayout()
|
||||
Me.grpGameFilter.SuspendLayout()
|
||||
Me.grpGameInfoOptions.SuspendLayout()
|
||||
CType(Me.numFilter, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.grpFilterType.SuspendLayout()
|
||||
Me.grpSorting.SuspendLayout()
|
||||
Me.grpSortOptions.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'optGameInfo
|
||||
'
|
||||
Me.optGameInfo.AutoSize = True
|
||||
Me.optGameInfo.Location = New System.Drawing.Point(12, 12)
|
||||
Me.optGameInfo.Name = "optGameInfo"
|
||||
Me.optGameInfo.Size = New System.Drawing.Size(108, 17)
|
||||
Me.optGameInfo.TabIndex = 0
|
||||
Me.optGameInfo.Text = "Game Information"
|
||||
Me.optGameInfo.UseVisualStyleBackColor = True
|
||||
'
|
||||
'optTag
|
||||
'
|
||||
Me.optTag.AutoSize = True
|
||||
Me.optTag.Location = New System.Drawing.Point(12, 190)
|
||||
Me.optTag.Name = "optTag"
|
||||
Me.optTag.Size = New System.Drawing.Size(44, 17)
|
||||
Me.optTag.TabIndex = 2
|
||||
Me.optTag.Text = "Tag"
|
||||
Me.optTag.UseVisualStyleBackColor = True
|
||||
'
|
||||
'grpTagFilter
|
||||
'
|
||||
Me.grpTagFilter.Controls.Add(Me.lblExcludeTags)
|
||||
Me.grpTagFilter.Controls.Add(Me.btnExcludeRemove)
|
||||
Me.grpTagFilter.Controls.Add(Me.btnExcludeAdd)
|
||||
Me.grpTagFilter.Controls.Add(Me.lstExcludeTags)
|
||||
Me.grpTagFilter.Controls.Add(Me.grpTagOptions)
|
||||
Me.grpTagFilter.Controls.Add(Me.lblGameTags)
|
||||
Me.grpTagFilter.Controls.Add(Me.lblIncludeTags)
|
||||
Me.grpTagFilter.Controls.Add(Me.lblTags)
|
||||
Me.grpTagFilter.Controls.Add(Me.btnRemove)
|
||||
Me.grpTagFilter.Controls.Add(Me.btnAdd)
|
||||
Me.grpTagFilter.Controls.Add(Me.lstFilter)
|
||||
Me.grpTagFilter.Controls.Add(Me.btnIncludeRemove)
|
||||
Me.grpTagFilter.Controls.Add(Me.btnIncludeAdd)
|
||||
Me.grpTagFilter.Controls.Add(Me.lstIncludeTags)
|
||||
Me.grpTagFilter.Controls.Add(Me.lstTags)
|
||||
Me.grpTagFilter.Location = New System.Drawing.Point(12, 213)
|
||||
Me.grpTagFilter.Location = New System.Drawing.Point(12, 236)
|
||||
Me.grpTagFilter.Name = "grpTagFilter"
|
||||
Me.grpTagFilter.Size = New System.Drawing.Size(385, 265)
|
||||
Me.grpTagFilter.Size = New System.Drawing.Size(410, 198)
|
||||
Me.grpTagFilter.TabIndex = 3
|
||||
Me.grpTagFilter.TabStop = False
|
||||
'
|
||||
'lblExcludeTags
|
||||
'
|
||||
Me.lblExcludeTags.AutoSize = True
|
||||
Me.lblExcludeTags.Location = New System.Drawing.Point(313, 16)
|
||||
Me.lblExcludeTags.Name = "lblExcludeTags"
|
||||
Me.lblExcludeTags.Size = New System.Drawing.Size(72, 13)
|
||||
Me.lblExcludeTags.TabIndex = 10
|
||||
Me.lblExcludeTags.Text = "Exclude Tags"
|
||||
'
|
||||
'btnExcludeRemove
|
||||
'
|
||||
Me.btnExcludeRemove.Location = New System.Drawing.Point(261, 91)
|
||||
Me.btnExcludeRemove.Name = "btnExcludeRemove"
|
||||
Me.btnExcludeRemove.Size = New System.Drawing.Size(31, 23)
|
||||
Me.btnExcludeRemove.TabIndex = 9
|
||||
Me.btnExcludeRemove.Text = "<"
|
||||
Me.btnExcludeRemove.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnExcludeAdd
|
||||
'
|
||||
Me.btnExcludeAdd.Location = New System.Drawing.Point(261, 62)
|
||||
Me.btnExcludeAdd.Name = "btnExcludeAdd"
|
||||
Me.btnExcludeAdd.Size = New System.Drawing.Size(31, 23)
|
||||
Me.btnExcludeAdd.TabIndex = 8
|
||||
Me.btnExcludeAdd.Text = ">"
|
||||
Me.btnExcludeAdd.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lstExcludeTags
|
||||
'
|
||||
Me.lstExcludeTags.FormattingEnabled = True
|
||||
Me.lstExcludeTags.Location = New System.Drawing.Point(298, 32)
|
||||
Me.lstExcludeTags.Name = "lstExcludeTags"
|
||||
Me.lstExcludeTags.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
|
||||
Me.lstExcludeTags.Size = New System.Drawing.Size(103, 108)
|
||||
Me.lstExcludeTags.Sorted = True
|
||||
Me.lstExcludeTags.TabIndex = 7
|
||||
'
|
||||
'grpTagOptions
|
||||
'
|
||||
Me.grpTagOptions.Controls.Add(Me.optAll)
|
||||
Me.grpTagOptions.Controls.Add(Me.optAny)
|
||||
Me.grpTagOptions.Location = New System.Drawing.Point(6, 211)
|
||||
Me.grpTagOptions.Location = New System.Drawing.Point(6, 146)
|
||||
Me.grpTagOptions.Name = "grpTagOptions"
|
||||
Me.grpTagOptions.Size = New System.Drawing.Size(150, 46)
|
||||
Me.grpTagOptions.TabIndex = 6
|
||||
@@ -118,181 +160,348 @@ Partial Class frmFilter
|
||||
Me.optAny.Text = "Any Tag"
|
||||
Me.optAny.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblGameTags
|
||||
'lblIncludeTags
|
||||
'
|
||||
Me.lblGameTags.AutoSize = True
|
||||
Me.lblGameTags.Location = New System.Drawing.Point(271, 16)
|
||||
Me.lblGameTags.Name = "lblGameTags"
|
||||
Me.lblGameTags.Size = New System.Drawing.Size(66, 13)
|
||||
Me.lblGameTags.TabIndex = 4
|
||||
Me.lblGameTags.Text = "Current Filter"
|
||||
Me.lblIncludeTags.AutoSize = True
|
||||
Me.lblIncludeTags.Location = New System.Drawing.Point(23, 16)
|
||||
Me.lblIncludeTags.Name = "lblIncludeTags"
|
||||
Me.lblIncludeTags.Size = New System.Drawing.Size(69, 13)
|
||||
Me.lblIncludeTags.TabIndex = 4
|
||||
Me.lblIncludeTags.Text = "Include Tags"
|
||||
'
|
||||
'lblTags
|
||||
'
|
||||
Me.lblTags.AutoSize = True
|
||||
Me.lblTags.Location = New System.Drawing.Point(43, 16)
|
||||
Me.lblTags.Location = New System.Drawing.Point(165, 16)
|
||||
Me.lblTags.Name = "lblTags"
|
||||
Me.lblTags.Size = New System.Drawing.Size(77, 13)
|
||||
Me.lblTags.TabIndex = 0
|
||||
Me.lblTags.Text = "Available Tags"
|
||||
'
|
||||
'btnRemove
|
||||
'btnIncludeRemove
|
||||
'
|
||||
Me.btnRemove.Location = New System.Drawing.Point(162, 122)
|
||||
Me.btnRemove.Name = "btnRemove"
|
||||
Me.btnRemove.Size = New System.Drawing.Size(61, 23)
|
||||
Me.btnRemove.TabIndex = 3
|
||||
Me.btnRemove.Text = "<"
|
||||
Me.btnRemove.UseVisualStyleBackColor = True
|
||||
Me.btnIncludeRemove.Location = New System.Drawing.Point(115, 91)
|
||||
Me.btnIncludeRemove.Name = "btnIncludeRemove"
|
||||
Me.btnIncludeRemove.Size = New System.Drawing.Size(31, 23)
|
||||
Me.btnIncludeRemove.TabIndex = 3
|
||||
Me.btnIncludeRemove.Text = ">"
|
||||
Me.btnIncludeRemove.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnAdd
|
||||
'btnIncludeAdd
|
||||
'
|
||||
Me.btnAdd.Location = New System.Drawing.Point(162, 93)
|
||||
Me.btnAdd.Name = "btnAdd"
|
||||
Me.btnAdd.Size = New System.Drawing.Size(61, 23)
|
||||
Me.btnAdd.TabIndex = 2
|
||||
Me.btnAdd.Text = ">"
|
||||
Me.btnAdd.UseVisualStyleBackColor = True
|
||||
Me.btnIncludeAdd.Location = New System.Drawing.Point(115, 62)
|
||||
Me.btnIncludeAdd.Name = "btnIncludeAdd"
|
||||
Me.btnIncludeAdd.Size = New System.Drawing.Size(31, 23)
|
||||
Me.btnIncludeAdd.TabIndex = 2
|
||||
Me.btnIncludeAdd.Text = "<"
|
||||
Me.btnIncludeAdd.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lstFilter
|
||||
'lstIncludeTags
|
||||
'
|
||||
Me.lstFilter.FormattingEnabled = True
|
||||
Me.lstFilter.Location = New System.Drawing.Point(229, 32)
|
||||
Me.lstFilter.Name = "lstFilter"
|
||||
Me.lstFilter.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
|
||||
Me.lstFilter.Size = New System.Drawing.Size(150, 173)
|
||||
Me.lstFilter.Sorted = True
|
||||
Me.lstFilter.TabIndex = 5
|
||||
Me.lstIncludeTags.FormattingEnabled = True
|
||||
Me.lstIncludeTags.Location = New System.Drawing.Point(6, 32)
|
||||
Me.lstIncludeTags.Name = "lstIncludeTags"
|
||||
Me.lstIncludeTags.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
|
||||
Me.lstIncludeTags.Size = New System.Drawing.Size(103, 108)
|
||||
Me.lstIncludeTags.Sorted = True
|
||||
Me.lstIncludeTags.TabIndex = 5
|
||||
'
|
||||
'lstTags
|
||||
'
|
||||
Me.lstTags.FormattingEnabled = True
|
||||
Me.lstTags.Location = New System.Drawing.Point(6, 32)
|
||||
Me.lstTags.Location = New System.Drawing.Point(152, 32)
|
||||
Me.lstTags.Name = "lstTags"
|
||||
Me.lstTags.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
|
||||
Me.lstTags.Size = New System.Drawing.Size(150, 173)
|
||||
Me.lstTags.Size = New System.Drawing.Size(103, 108)
|
||||
Me.lstTags.Sorted = True
|
||||
Me.lstTags.TabIndex = 1
|
||||
'
|
||||
'btnOK
|
||||
'
|
||||
Me.btnOK.Location = New System.Drawing.Point(322, 484)
|
||||
Me.btnOK.Location = New System.Drawing.Point(347, 526)
|
||||
Me.btnOK.Name = "btnOK"
|
||||
Me.btnOK.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnOK.TabIndex = 4
|
||||
Me.btnOK.TabIndex = 6
|
||||
Me.btnOK.Text = "&OK"
|
||||
Me.btnOK.UseVisualStyleBackColor = True
|
||||
'
|
||||
'grpGameFilter
|
||||
'
|
||||
Me.grpGameFilter.Controls.Add(Me.grpGameInfoOptions)
|
||||
Me.grpGameFilter.Controls.Add(Me.txtCompany)
|
||||
Me.grpGameFilter.Controls.Add(Me.lblCompany)
|
||||
Me.grpGameFilter.Controls.Add(Me.txtProcess)
|
||||
Me.grpGameFilter.Controls.Add(Me.lblProcess)
|
||||
Me.grpGameFilter.Controls.Add(Me.lblName)
|
||||
Me.grpGameFilter.Controls.Add(Me.txtName)
|
||||
Me.grpGameFilter.Controls.Add(Me.lblNot)
|
||||
Me.grpGameFilter.Controls.Add(Me.chkNot)
|
||||
Me.grpGameFilter.Controls.Add(Me.cboListFilter)
|
||||
Me.grpGameFilter.Controls.Add(Me.numFilter)
|
||||
Me.grpGameFilter.Controls.Add(Me.cboNumericOps)
|
||||
Me.grpGameFilter.Controls.Add(Me.lblCurrentFilters)
|
||||
Me.grpGameFilter.Controls.Add(Me.lblFilterData)
|
||||
Me.grpGameFilter.Controls.Add(Me.lblFields)
|
||||
Me.grpGameFilter.Controls.Add(Me.btnRemoveFilter)
|
||||
Me.grpGameFilter.Controls.Add(Me.lstFilter)
|
||||
Me.grpGameFilter.Controls.Add(Me.btnAddFilter)
|
||||
Me.grpGameFilter.Controls.Add(Me.cboFilterField)
|
||||
Me.grpGameFilter.Controls.Add(Me.grpFilterType)
|
||||
Me.grpGameFilter.Controls.Add(Me.txtStringFilter)
|
||||
Me.grpGameFilter.Location = New System.Drawing.Point(12, 35)
|
||||
Me.grpGameFilter.Name = "grpGameFilter"
|
||||
Me.grpGameFilter.Size = New System.Drawing.Size(385, 150)
|
||||
Me.grpGameFilter.Size = New System.Drawing.Size(410, 172)
|
||||
Me.grpGameFilter.TabIndex = 1
|
||||
Me.grpGameFilter.TabStop = False
|
||||
'
|
||||
'grpGameInfoOptions
|
||||
'lblNot
|
||||
'
|
||||
Me.grpGameInfoOptions.Controls.Add(Me.optOr)
|
||||
Me.grpGameInfoOptions.Controls.Add(Me.optAnd)
|
||||
Me.grpGameInfoOptions.Location = New System.Drawing.Point(14, 97)
|
||||
Me.grpGameInfoOptions.Name = "grpGameInfoOptions"
|
||||
Me.grpGameInfoOptions.Size = New System.Drawing.Size(106, 46)
|
||||
Me.grpGameInfoOptions.TabIndex = 6
|
||||
Me.grpGameInfoOptions.TabStop = False
|
||||
Me.grpGameInfoOptions.Text = "Options"
|
||||
Me.lblNot.AutoSize = True
|
||||
Me.lblNot.Location = New System.Drawing.Point(161, 20)
|
||||
Me.lblNot.Name = "lblNot"
|
||||
Me.lblNot.Size = New System.Drawing.Size(24, 13)
|
||||
Me.lblNot.TabIndex = 11
|
||||
Me.lblNot.Text = "Not"
|
||||
'
|
||||
'chkNot
|
||||
'
|
||||
Me.chkNot.AutoSize = True
|
||||
Me.chkNot.Location = New System.Drawing.Point(166, 39)
|
||||
Me.chkNot.Name = "chkNot"
|
||||
Me.chkNot.Size = New System.Drawing.Size(15, 14)
|
||||
Me.chkNot.TabIndex = 10
|
||||
Me.chkNot.UseVisualStyleBackColor = True
|
||||
'
|
||||
'cboListFilter
|
||||
'
|
||||
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
|
||||
'
|
||||
Me.numFilter.DecimalPlaces = 1
|
||||
Me.numFilter.Location = New System.Drawing.Point(258, 37)
|
||||
Me.numFilter.Maximum = New Decimal(New Integer() {1000000, 0, 0, 0})
|
||||
Me.numFilter.Name = "numFilter"
|
||||
Me.numFilter.Size = New System.Drawing.Size(65, 20)
|
||||
Me.numFilter.TabIndex = 4
|
||||
'
|
||||
'cboNumericOps
|
||||
'
|
||||
Me.cboNumericOps.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.cboNumericOps.FormattingEnabled = True
|
||||
Me.cboNumericOps.Location = New System.Drawing.Point(188, 36)
|
||||
Me.cboNumericOps.Name = "cboNumericOps"
|
||||
Me.cboNumericOps.Size = New System.Drawing.Size(65, 21)
|
||||
Me.cboNumericOps.TabIndex = 3
|
||||
'
|
||||
'lblCurrentFilters
|
||||
'
|
||||
Me.lblCurrentFilters.AutoSize = True
|
||||
Me.lblCurrentFilters.Location = New System.Drawing.Point(94, 65)
|
||||
Me.lblCurrentFilters.Name = "lblCurrentFilters"
|
||||
Me.lblCurrentFilters.Size = New System.Drawing.Size(71, 13)
|
||||
Me.lblCurrentFilters.TabIndex = 6
|
||||
Me.lblCurrentFilters.Text = "Current Filters"
|
||||
'
|
||||
'lblFilterData
|
||||
'
|
||||
Me.lblFilterData.AutoSize = True
|
||||
Me.lblFilterData.Location = New System.Drawing.Point(239, 20)
|
||||
Me.lblFilterData.Name = "lblFilterData"
|
||||
Me.lblFilterData.Size = New System.Drawing.Size(32, 13)
|
||||
Me.lblFilterData.TabIndex = 2
|
||||
Me.lblFilterData.Text = "Filter "
|
||||
'
|
||||
'lblFields
|
||||
'
|
||||
Me.lblFields.AutoSize = True
|
||||
Me.lblFields.Location = New System.Drawing.Point(41, 20)
|
||||
Me.lblFields.Name = "lblFields"
|
||||
Me.lblFields.Size = New System.Drawing.Size(80, 13)
|
||||
Me.lblFields.TabIndex = 0
|
||||
Me.lblFields.Text = "Available Fields"
|
||||
'
|
||||
'btnRemoveFilter
|
||||
'
|
||||
Me.btnRemoveFilter.Location = New System.Drawing.Point(259, 140)
|
||||
Me.btnRemoveFilter.Name = "btnRemoveFilter"
|
||||
Me.btnRemoveFilter.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnRemoveFilter.TabIndex = 9
|
||||
Me.btnRemoveFilter.Text = "Remove"
|
||||
Me.btnRemoveFilter.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lstFilter
|
||||
'
|
||||
Me.lstFilter.FormattingEnabled = True
|
||||
Me.lstFilter.Location = New System.Drawing.Point(6, 81)
|
||||
Me.lstFilter.Name = "lstFilter"
|
||||
Me.lstFilter.Size = New System.Drawing.Size(247, 82)
|
||||
Me.lstFilter.TabIndex = 7
|
||||
'
|
||||
'btnAddFilter
|
||||
'
|
||||
Me.btnAddFilter.Location = New System.Drawing.Point(329, 34)
|
||||
Me.btnAddFilter.Name = "btnAddFilter"
|
||||
Me.btnAddFilter.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnAddFilter.TabIndex = 5
|
||||
Me.btnAddFilter.Text = "Add"
|
||||
Me.btnAddFilter.UseVisualStyleBackColor = True
|
||||
'
|
||||
'cboFilterField
|
||||
'
|
||||
Me.cboFilterField.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.cboFilterField.FormattingEnabled = True
|
||||
Me.cboFilterField.Location = New System.Drawing.Point(6, 36)
|
||||
Me.cboFilterField.Name = "cboFilterField"
|
||||
Me.cboFilterField.Size = New System.Drawing.Size(150, 21)
|
||||
Me.cboFilterField.TabIndex = 1
|
||||
'
|
||||
'grpFilterType
|
||||
'
|
||||
Me.grpFilterType.Controls.Add(Me.optOr)
|
||||
Me.grpFilterType.Controls.Add(Me.optAnd)
|
||||
Me.grpFilterType.Location = New System.Drawing.Point(259, 81)
|
||||
Me.grpFilterType.Name = "grpFilterType"
|
||||
Me.grpFilterType.Size = New System.Drawing.Size(105, 46)
|
||||
Me.grpFilterType.TabIndex = 8
|
||||
Me.grpFilterType.TabStop = False
|
||||
Me.grpFilterType.Text = "Filter Type"
|
||||
'
|
||||
'optOr
|
||||
'
|
||||
Me.optOr.Location = New System.Drawing.Point(56, 19)
|
||||
Me.optOr.Checked = True
|
||||
Me.optOr.Location = New System.Drawing.Point(6, 19)
|
||||
Me.optOr.Name = "optOr"
|
||||
Me.optOr.Size = New System.Drawing.Size(36, 17)
|
||||
Me.optOr.TabIndex = 1
|
||||
Me.optOr.Size = New System.Drawing.Size(44, 17)
|
||||
Me.optOr.TabIndex = 0
|
||||
Me.optOr.TabStop = True
|
||||
Me.optOr.Text = "Or"
|
||||
Me.optOr.Text = "Any"
|
||||
Me.optOr.UseVisualStyleBackColor = True
|
||||
'
|
||||
'optAnd
|
||||
'
|
||||
Me.optAnd.Checked = True
|
||||
Me.optAnd.Location = New System.Drawing.Point(6, 19)
|
||||
Me.optAnd.Location = New System.Drawing.Point(56, 19)
|
||||
Me.optAnd.Name = "optAnd"
|
||||
Me.optAnd.Size = New System.Drawing.Size(44, 17)
|
||||
Me.optAnd.TabIndex = 0
|
||||
Me.optAnd.TabStop = True
|
||||
Me.optAnd.Text = "And"
|
||||
Me.optAnd.TabIndex = 1
|
||||
Me.optAnd.Text = "All"
|
||||
Me.optAnd.UseVisualStyleBackColor = True
|
||||
'
|
||||
'txtCompany
|
||||
'txtStringFilter
|
||||
'
|
||||
Me.txtCompany.Location = New System.Drawing.Point(70, 71)
|
||||
Me.txtCompany.Name = "txtCompany"
|
||||
Me.txtCompany.Size = New System.Drawing.Size(309, 20)
|
||||
Me.txtCompany.TabIndex = 5
|
||||
Me.txtStringFilter.Location = New System.Drawing.Point(187, 36)
|
||||
Me.txtStringFilter.Name = "txtStringFilter"
|
||||
Me.txtStringFilter.Size = New System.Drawing.Size(136, 20)
|
||||
Me.txtStringFilter.TabIndex = 3
|
||||
'
|
||||
'lblCompany
|
||||
'grpSorting
|
||||
'
|
||||
Me.lblCompany.AutoSize = True
|
||||
Me.lblCompany.Location = New System.Drawing.Point(11, 74)
|
||||
Me.lblCompany.Name = "lblCompany"
|
||||
Me.lblCompany.Size = New System.Drawing.Size(54, 13)
|
||||
Me.lblCompany.TabIndex = 4
|
||||
Me.lblCompany.Text = "Company:"
|
||||
Me.grpSorting.Controls.Add(Me.grpSortOptions)
|
||||
Me.grpSorting.Controls.Add(Me.lblSortFields)
|
||||
Me.grpSorting.Controls.Add(Me.cboSortField)
|
||||
Me.grpSorting.Location = New System.Drawing.Point(12, 440)
|
||||
Me.grpSorting.Name = "grpSorting"
|
||||
Me.grpSorting.Size = New System.Drawing.Size(410, 80)
|
||||
Me.grpSorting.TabIndex = 4
|
||||
Me.grpSorting.TabStop = False
|
||||
Me.grpSorting.Text = "Sorting"
|
||||
'
|
||||
'txtProcess
|
||||
'grpSortOptions
|
||||
'
|
||||
Me.txtProcess.Location = New System.Drawing.Point(70, 45)
|
||||
Me.txtProcess.Name = "txtProcess"
|
||||
Me.txtProcess.Size = New System.Drawing.Size(309, 20)
|
||||
Me.txtProcess.TabIndex = 3
|
||||
Me.grpSortOptions.Controls.Add(Me.optSortAsc)
|
||||
Me.grpSortOptions.Controls.Add(Me.optSortDesc)
|
||||
Me.grpSortOptions.Location = New System.Drawing.Point(162, 19)
|
||||
Me.grpSortOptions.Name = "grpSortOptions"
|
||||
Me.grpSortOptions.Size = New System.Drawing.Size(189, 43)
|
||||
Me.grpSortOptions.TabIndex = 3
|
||||
Me.grpSortOptions.TabStop = False
|
||||
Me.grpSortOptions.Text = "Sort Options"
|
||||
'
|
||||
'lblProcess
|
||||
'optSortAsc
|
||||
'
|
||||
Me.lblProcess.AutoSize = True
|
||||
Me.lblProcess.Location = New System.Drawing.Point(11, 48)
|
||||
Me.lblProcess.Name = "lblProcess"
|
||||
Me.lblProcess.Size = New System.Drawing.Size(48, 13)
|
||||
Me.lblProcess.TabIndex = 2
|
||||
Me.lblProcess.Text = "Process:"
|
||||
Me.optSortAsc.AutoSize = True
|
||||
Me.optSortAsc.Location = New System.Drawing.Point(6, 17)
|
||||
Me.optSortAsc.Name = "optSortAsc"
|
||||
Me.optSortAsc.Size = New System.Drawing.Size(75, 17)
|
||||
Me.optSortAsc.TabIndex = 0
|
||||
Me.optSortAsc.TabStop = True
|
||||
Me.optSortAsc.Text = "Ascending"
|
||||
Me.optSortAsc.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblName
|
||||
'optSortDesc
|
||||
'
|
||||
Me.lblName.AutoSize = True
|
||||
Me.lblName.Location = New System.Drawing.Point(11, 22)
|
||||
Me.lblName.Name = "lblName"
|
||||
Me.lblName.Size = New System.Drawing.Size(38, 13)
|
||||
Me.lblName.TabIndex = 0
|
||||
Me.lblName.Text = "Name:"
|
||||
Me.optSortDesc.AutoSize = True
|
||||
Me.optSortDesc.Location = New System.Drawing.Point(90, 17)
|
||||
Me.optSortDesc.Name = "optSortDesc"
|
||||
Me.optSortDesc.Size = New System.Drawing.Size(82, 17)
|
||||
Me.optSortDesc.TabIndex = 1
|
||||
Me.optSortDesc.TabStop = True
|
||||
Me.optSortDesc.Text = "Descending"
|
||||
Me.optSortDesc.UseVisualStyleBackColor = True
|
||||
'
|
||||
'txtName
|
||||
'lblSortFields
|
||||
'
|
||||
Me.txtName.Location = New System.Drawing.Point(70, 19)
|
||||
Me.txtName.Name = "txtName"
|
||||
Me.txtName.Size = New System.Drawing.Size(309, 20)
|
||||
Me.txtName.TabIndex = 1
|
||||
Me.lblSortFields.AutoSize = True
|
||||
Me.lblSortFields.Location = New System.Drawing.Point(41, 19)
|
||||
Me.lblSortFields.Name = "lblSortFields"
|
||||
Me.lblSortFields.Size = New System.Drawing.Size(80, 13)
|
||||
Me.lblSortFields.TabIndex = 1
|
||||
Me.lblSortFields.Text = "Available Fields"
|
||||
'
|
||||
'cboSortField
|
||||
'
|
||||
Me.cboSortField.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.cboSortField.FormattingEnabled = True
|
||||
Me.cboSortField.Location = New System.Drawing.Point(6, 35)
|
||||
Me.cboSortField.Name = "cboSortField"
|
||||
Me.cboSortField.Size = New System.Drawing.Size(150, 21)
|
||||
Me.cboSortField.TabIndex = 2
|
||||
'
|
||||
'chkTag
|
||||
'
|
||||
Me.chkTag.AutoSize = True
|
||||
Me.chkTag.Location = New System.Drawing.Point(12, 213)
|
||||
Me.chkTag.Name = "chkTag"
|
||||
Me.chkTag.Size = New System.Drawing.Size(45, 17)
|
||||
Me.chkTag.TabIndex = 2
|
||||
Me.chkTag.Text = "Tag"
|
||||
Me.chkTag.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkGameInfo
|
||||
'
|
||||
Me.chkGameInfo.AutoSize = True
|
||||
Me.chkGameInfo.Location = New System.Drawing.Point(12, 12)
|
||||
Me.chkGameInfo.Name = "chkGameInfo"
|
||||
Me.chkGameInfo.Size = New System.Drawing.Size(109, 17)
|
||||
Me.chkGameInfo.TabIndex = 0
|
||||
Me.chkGameInfo.Text = "Game Information"
|
||||
Me.chkGameInfo.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = True
|
||||
Me.Label1.Location = New System.Drawing.Point(12, 531)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(249, 13)
|
||||
Me.Label1.TabIndex = 5
|
||||
Me.Label1.Text = "* Indicates a field that may give unexpected results."
|
||||
'
|
||||
'frmFilter
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(409, 516)
|
||||
Me.ClientSize = New System.Drawing.Size(434, 561)
|
||||
Me.Controls.Add(Me.Label1)
|
||||
Me.Controls.Add(Me.grpSorting)
|
||||
Me.Controls.Add(Me.chkTag)
|
||||
Me.Controls.Add(Me.grpGameFilter)
|
||||
Me.Controls.Add(Me.chkGameInfo)
|
||||
Me.Controls.Add(Me.grpTagFilter)
|
||||
Me.Controls.Add(Me.btnOK)
|
||||
Me.Controls.Add(Me.optTag)
|
||||
Me.Controls.Add(Me.optGameInfo)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||
Me.MaximizeBox = False
|
||||
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)
|
||||
@@ -300,32 +509,55 @@ Partial Class frmFilter
|
||||
Me.grpTagOptions.ResumeLayout(False)
|
||||
Me.grpGameFilter.ResumeLayout(False)
|
||||
Me.grpGameFilter.PerformLayout()
|
||||
Me.grpGameInfoOptions.ResumeLayout(False)
|
||||
CType(Me.numFilter, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.grpFilterType.ResumeLayout(False)
|
||||
Me.grpSorting.ResumeLayout(False)
|
||||
Me.grpSorting.PerformLayout()
|
||||
Me.grpSortOptions.ResumeLayout(False)
|
||||
Me.grpSortOptions.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents optGameInfo As System.Windows.Forms.RadioButton
|
||||
Friend WithEvents optTag As System.Windows.Forms.RadioButton
|
||||
Friend WithEvents grpTagFilter As System.Windows.Forms.GroupBox
|
||||
Friend WithEvents grpTagOptions As System.Windows.Forms.GroupBox
|
||||
Friend WithEvents optAll As System.Windows.Forms.RadioButton
|
||||
Friend WithEvents optAny As System.Windows.Forms.RadioButton
|
||||
Friend WithEvents lblGameTags As System.Windows.Forms.Label
|
||||
Friend WithEvents lblIncludeTags As System.Windows.Forms.Label
|
||||
Friend WithEvents lblTags As System.Windows.Forms.Label
|
||||
Friend WithEvents btnRemove As System.Windows.Forms.Button
|
||||
Friend WithEvents btnAdd As System.Windows.Forms.Button
|
||||
Friend WithEvents lstFilter As System.Windows.Forms.ListBox
|
||||
Friend WithEvents btnIncludeRemove As System.Windows.Forms.Button
|
||||
Friend WithEvents btnIncludeAdd As System.Windows.Forms.Button
|
||||
Friend WithEvents lstIncludeTags As System.Windows.Forms.ListBox
|
||||
Friend WithEvents lstTags As System.Windows.Forms.ListBox
|
||||
Friend WithEvents btnOK As System.Windows.Forms.Button
|
||||
Friend WithEvents grpGameFilter As System.Windows.Forms.GroupBox
|
||||
Friend WithEvents txtProcess As System.Windows.Forms.TextBox
|
||||
Friend WithEvents lblProcess As System.Windows.Forms.Label
|
||||
Friend WithEvents lblName As System.Windows.Forms.Label
|
||||
Friend WithEvents txtName As System.Windows.Forms.TextBox
|
||||
Friend WithEvents txtCompany As System.Windows.Forms.TextBox
|
||||
Friend WithEvents lblCompany As System.Windows.Forms.Label
|
||||
Friend WithEvents grpGameInfoOptions As System.Windows.Forms.GroupBox
|
||||
Friend WithEvents txtStringFilter As System.Windows.Forms.TextBox
|
||||
Friend WithEvents grpFilterType As System.Windows.Forms.GroupBox
|
||||
Friend WithEvents optOr As System.Windows.Forms.RadioButton
|
||||
Friend WithEvents optAnd As System.Windows.Forms.RadioButton
|
||||
Friend WithEvents grpSorting As GroupBox
|
||||
Friend WithEvents optSortDesc As RadioButton
|
||||
Friend WithEvents optSortAsc As RadioButton
|
||||
Friend WithEvents cboSortField As ComboBox
|
||||
Friend WithEvents chkTag As CheckBox
|
||||
Friend WithEvents chkGameInfo As CheckBox
|
||||
Friend WithEvents cboFilterField As ComboBox
|
||||
Friend WithEvents lstFilter As ListBox
|
||||
Friend WithEvents btnAddFilter As Button
|
||||
Friend WithEvents btnRemoveFilter As Button
|
||||
Friend WithEvents lblCurrentFilters As Label
|
||||
Friend WithEvents lblFilterData As Label
|
||||
Friend WithEvents lblFields As Label
|
||||
Friend WithEvents cboNumericOps As ComboBox
|
||||
Friend WithEvents numFilter As NumericUpDown
|
||||
Friend WithEvents cboListFilter As ComboBox
|
||||
Friend WithEvents lblSortFields As Label
|
||||
Friend WithEvents Label1 As Label
|
||||
Friend WithEvents grpSortOptions As GroupBox
|
||||
Friend WithEvents lblExcludeTags As Label
|
||||
Friend WithEvents btnExcludeRemove As Button
|
||||
Friend WithEvents btnExcludeAdd As Button
|
||||
Friend WithEvents lstExcludeTags As ListBox
|
||||
Friend WithEvents lblNot As Label
|
||||
Friend WithEvents chkNot As CheckBox
|
||||
End Class
|
||||
|
||||
@@ -3,45 +3,93 @@
|
||||
Public Class frmFilter
|
||||
|
||||
Public Enum eFilterType As Integer
|
||||
NoFilter = 1
|
||||
BaseFilter = 1
|
||||
AnyTag = 2
|
||||
AllTags = 3
|
||||
NoTags = 4
|
||||
FieldAnd = 5
|
||||
FieldOr = 6
|
||||
End Enum
|
||||
|
||||
Dim oTagFilters As New List(Of clsTag)
|
||||
Dim hshStringFilters As New Hashtable
|
||||
Dim eCurrentFilterType As eFilterType = eFilterType.AnyTag
|
||||
Dim oIncludeTagFilters As New List(Of clsTag)
|
||||
Dim oExcludeTagFilters As New List(Of clsTag)
|
||||
Dim oGameFilters As New List(Of clsGameFilter)
|
||||
Dim oValidFields As New List(Of clsGameFilterField)
|
||||
Dim eCurrentFilterType As eFilterType = eFilterType.BaseFilter
|
||||
Dim bAndOperator As Boolean = False
|
||||
Dim bSortAsc As Boolean = True
|
||||
Dim sSortField As String = "Name"
|
||||
Dim hshTags As New Hashtable
|
||||
Dim bShutdown As Boolean = False
|
||||
|
||||
Public ReadOnly Property StringFilters As Hashtable
|
||||
Public Property GameFilters As List(Of clsGameFilter)
|
||||
Get
|
||||
Return hshStringFilters
|
||||
Return oGameFilters
|
||||
End Get
|
||||
Set(value As List(Of clsGameFilter))
|
||||
oGameFilters = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property TagFilters As List(Of clsTag)
|
||||
Public Property IncludeTagFilters As List(Of clsTag)
|
||||
Get
|
||||
Return oTagFilters
|
||||
Return oIncludeTagFilters
|
||||
End Get
|
||||
Set(value As List(Of clsTag))
|
||||
oIncludeTagFilters = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property FilterType As eFilterType
|
||||
Public Property ExcludeTagFilters As List(Of clsTag)
|
||||
Get
|
||||
Return oExcludeTagFilters
|
||||
End Get
|
||||
Set(value As List(Of clsTag))
|
||||
oExcludeTagFilters = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property FilterType As eFilterType
|
||||
Get
|
||||
Return eCurrentFilterType
|
||||
End Get
|
||||
Set(value As eFilterType)
|
||||
eCurrentFilterType = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Sub AddTag()
|
||||
Public Property AndOperator As Boolean
|
||||
Get
|
||||
Return bAndOperator
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bAndOperator = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property SortAsc As Boolean
|
||||
Get
|
||||
Return bSortAsc
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bSortAsc = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property SortField As String
|
||||
Get
|
||||
Return sSortField
|
||||
End Get
|
||||
Set(value As String)
|
||||
sSortField = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Sub AddTag(ByRef lst As ListBox)
|
||||
Dim oData As KeyValuePair(Of String, String)
|
||||
Dim oTags As List(Of KeyValuePair(Of String, String))
|
||||
|
||||
If lstTags.SelectedItems.Count = 1 Then
|
||||
oData = lstTags.SelectedItems(0)
|
||||
lstFilter.Items.Add(oData)
|
||||
lst.Items.Add(oData)
|
||||
lstTags.Items.Remove(oData)
|
||||
ElseIf lstTags.SelectedItems.Count > 1 Then
|
||||
oTags = New List(Of KeyValuePair(Of String, String))
|
||||
@@ -51,37 +99,228 @@ Public Class frmFilter
|
||||
Next
|
||||
|
||||
For Each kp As KeyValuePair(Of String, String) In oTags
|
||||
lstFilter.Items.Add(kp)
|
||||
lst.Items.Add(kp)
|
||||
lstTags.Items.Remove(kp)
|
||||
Next
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub RemoveTag()
|
||||
Private Sub RemoveTag(ByRef lst As ListBox)
|
||||
Dim oData As KeyValuePair(Of String, String)
|
||||
Dim oTags As List(Of KeyValuePair(Of String, String))
|
||||
|
||||
If lstFilter.SelectedItems.Count = 1 Then
|
||||
oData = lstFilter.SelectedItems(0)
|
||||
lstFilter.Items.Remove(oData)
|
||||
If lst.SelectedItems.Count = 1 Then
|
||||
oData = lst.SelectedItems(0)
|
||||
lst.Items.Remove(oData)
|
||||
lstTags.Items.Add(oData)
|
||||
ElseIf lstFilter.SelectedItems.Count > 1 Then
|
||||
ElseIf lst.SelectedItems.Count > 1 Then
|
||||
oTags = New List(Of KeyValuePair(Of String, String))
|
||||
|
||||
For Each oData In lstFilter.SelectedItems
|
||||
For Each oData In lst.SelectedItems
|
||||
oTags.Add(oData)
|
||||
Next
|
||||
|
||||
For Each kp As KeyValuePair(Of String, String) In oTags
|
||||
lstFilter.Items.Remove(kp)
|
||||
lst.Items.Remove(kp)
|
||||
lstTags.Items.Add(kp)
|
||||
Next
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub LoadData()
|
||||
Private Sub LoadFilterFields()
|
||||
Dim oField As clsGameFilterField
|
||||
|
||||
|
||||
'Game ID
|
||||
oField = New clsGameFilterField
|
||||
oField.FieldName = "MonitorID"
|
||||
oField.FriendlyFieldName = frmFilter_FieldGameID
|
||||
oField.Type = clsGameFilterField.eDataType.fString
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidSort
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidFilter
|
||||
oValidFields.Add(oField)
|
||||
|
||||
|
||||
'Name
|
||||
oField = New clsGameFilterField
|
||||
oField.FieldName = "Name"
|
||||
oField.FriendlyFieldName = frmFilter_FieldName
|
||||
oField.Type = clsGameFilterField.eDataType.fString
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidSort
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidFilter
|
||||
oValidFields.Add(oField)
|
||||
|
||||
'Process
|
||||
oField = New clsGameFilterField
|
||||
oField.FieldName = "Process"
|
||||
oField.FriendlyFieldName = frmFilter_FieldProcess
|
||||
oField.Type = clsGameFilterField.eDataType.fString
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidSort
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidFilter
|
||||
oValidFields.Add(oField)
|
||||
|
||||
'Parameter
|
||||
oField = New clsGameFilterField
|
||||
oField.FieldName = "Parameter"
|
||||
oField.FriendlyFieldName = frmFilter_FieldParameter
|
||||
oField.Type = clsGameFilterField.eDataType.fString
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidSort
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidFilter
|
||||
oValidFields.Add(oField)
|
||||
|
||||
'Save Path
|
||||
oField = New clsGameFilterField
|
||||
oField.FieldName = "Path"
|
||||
oField.FriendlyFieldName = frmFilter_FieldPath
|
||||
oField.Type = clsGameFilterField.eDataType.fString
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidFilter
|
||||
oValidFields.Add(oField)
|
||||
|
||||
'Include Items
|
||||
oField = New clsGameFilterField
|
||||
oField.FieldName = "FileType"
|
||||
oField.FriendlyFieldName = frmFilter_FieldFileType
|
||||
oField.Type = clsGameFilterField.eDataType.fString
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidFilter
|
||||
oValidFields.Add(oField)
|
||||
|
||||
'Exclude Items
|
||||
oField = New clsGameFilterField
|
||||
oField.FieldName = "ExcludeList"
|
||||
oField.FriendlyFieldName = frmFilter_FieldExcludeList
|
||||
oField.Type = clsGameFilterField.eDataType.fString
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidFilter
|
||||
oValidFields.Add(oField)
|
||||
|
||||
'Save Entire Folder
|
||||
oField = New clsGameFilterField
|
||||
oField.FieldName = "FolderSave"
|
||||
oField.FriendlyFieldName = frmFilter_FieldFolderSave
|
||||
oField.Type = clsGameFilterField.eDataType.fBool
|
||||
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"
|
||||
oField.FriendlyFieldName = frmFilter_FieldCleanFolder
|
||||
oField.Type = clsGameFilterField.eDataType.fBool
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidFilter
|
||||
oValidFields.Add(oField)
|
||||
|
||||
'Save Multiple Backups
|
||||
oField = New clsGameFilterField
|
||||
oField.FieldName = "TimeStamp"
|
||||
oField.FriendlyFieldName = frmFilter_FieldTimeStamp
|
||||
oField.Type = clsGameFilterField.eDataType.fBool
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidFilter
|
||||
oValidFields.Add(oField)
|
||||
|
||||
'Backup Limit
|
||||
oField = New clsGameFilterField
|
||||
oField.FieldName = "BackupLimit"
|
||||
oField.FriendlyFieldName = frmFilter_FieldBackupLimit
|
||||
oField.Type = clsGameFilterField.eDataType.fNumeric
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidFilter
|
||||
oValidFields.Add(oField)
|
||||
|
||||
'Comments
|
||||
oField = New clsGameFilterField
|
||||
oField.FieldName = "Comments"
|
||||
oField.FriendlyFieldName = frmFilter_FieldComments
|
||||
oField.Type = clsGameFilterField.eDataType.fString
|
||||
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"
|
||||
oField.FriendlyFieldName = frmFilter_FieldIsRegEx
|
||||
oField.Type = clsGameFilterField.eDataType.fBool
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidFilter
|
||||
oValidFields.Add(oField)
|
||||
|
||||
'Game Path
|
||||
oField = New clsGameFilterField
|
||||
oField.FieldName = "ProcessPath"
|
||||
oField.FriendlyFieldName = frmFilter_FieldProcessPath
|
||||
oField.Type = clsGameFilterField.eDataType.fString
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidFilter
|
||||
oValidFields.Add(oField)
|
||||
|
||||
'Company
|
||||
oField = New clsGameFilterField
|
||||
oField.FieldName = "Company"
|
||||
oField.FriendlyFieldName = frmFilter_FieldCompany
|
||||
oField.Type = clsGameFilterField.eDataType.fString
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidSort
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidFilter
|
||||
oValidFields.Add(oField)
|
||||
|
||||
'Version
|
||||
oField = New clsGameFilterField
|
||||
oField.FieldName = "Version"
|
||||
oField.FriendlyFieldName = frmFilter_FieldVersion
|
||||
oField.Type = clsGameFilterField.eDataType.fString
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidSort
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidFilter
|
||||
oValidFields.Add(oField)
|
||||
|
||||
'Icon
|
||||
oField = New clsGameFilterField
|
||||
oField.FieldName = "Icon"
|
||||
oField.FriendlyFieldName = frmFilter_FieldIcon
|
||||
oField.Type = clsGameFilterField.eDataType.fString
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidFilter
|
||||
oValidFields.Add(oField)
|
||||
|
||||
'Hours
|
||||
oField = New clsGameFilterField
|
||||
oField.FieldName = "Hours"
|
||||
oField.FriendlyFieldName = frmFilter_FieldHours
|
||||
oField.Type = clsGameFilterField.eDataType.fNumeric
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidSort
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidFilter
|
||||
oValidFields.Add(oField)
|
||||
|
||||
'Enabled
|
||||
oField = New clsGameFilterField
|
||||
oField.FieldName = "Enabled"
|
||||
oField.FriendlyFieldName = frmFilter_FieldEnabled
|
||||
oField.Type = clsGameFilterField.eDataType.fBool
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidFilter
|
||||
oValidFields.Add(oField)
|
||||
|
||||
'Monitor Only
|
||||
oField = New clsGameFilterField
|
||||
oField.FieldName = "MonitorOnly"
|
||||
oField.FriendlyFieldName = frmFilter_FieldMonitorOnly
|
||||
oField.Type = clsGameFilterField.eDataType.fBool
|
||||
oField.Status = clsGameFilterField.eFieldStatus.ValidFilter
|
||||
oValidFields.Add(oField)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub LoadTagData()
|
||||
Dim oTag As clsTag
|
||||
Dim oData As KeyValuePair(Of String, String)
|
||||
|
||||
@@ -90,12 +329,17 @@ Public Class frmFilter
|
||||
|
||||
'Handle Lists
|
||||
lstTags.Items.Clear()
|
||||
lstFilter.Items.Clear()
|
||||
lstIncludeTags.Items.Clear()
|
||||
lstExcludeTags.Items.Clear()
|
||||
|
||||
lstTags.ValueMember = "Key"
|
||||
lstTags.DisplayMember = "Value"
|
||||
lstFilter.ValueMember = "Key"
|
||||
lstFilter.DisplayMember = "Value"
|
||||
|
||||
lstIncludeTags.ValueMember = "Key"
|
||||
lstIncludeTags.DisplayMember = "Value"
|
||||
|
||||
lstExcludeTags.ValueMember = "Key"
|
||||
lstExcludeTags.DisplayMember = "Value"
|
||||
|
||||
For Each de As DictionaryEntry In hshTags
|
||||
oTag = DirectCast(de.Value, clsTag)
|
||||
@@ -105,38 +349,183 @@ Public Class frmFilter
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub LoadExistingFilters()
|
||||
Dim sFilter As String = String.Empty
|
||||
Dim oListTag As KeyValuePair(Of String, String)
|
||||
|
||||
'Game Filters
|
||||
If bAndOperator Then
|
||||
optAnd.Checked = True
|
||||
Else
|
||||
optOr.Checked = True
|
||||
End If
|
||||
|
||||
If oGameFilters.Count > 0 Then
|
||||
chkGameInfo.Checked = True
|
||||
For Each oFilter As clsGameFilter In oGameFilters
|
||||
Select Case oFilter.Field.Type
|
||||
Case clsGameFilterField.eDataType.fString
|
||||
sFilter = oFilter.Field.FriendlyFieldName & " " & frmFilter_lstFilterContains & " """ & oFilter.Data & """"
|
||||
Case clsGameFilterField.eDataType.fNumeric
|
||||
sFilter = oFilter.Field.FriendlyFieldName & " " & oFilter.NumericOperatorAsString & " " & oFilter.Data
|
||||
Case clsGameFilterField.eDataType.fBool, clsGameFilterField.eDataType.fEnum
|
||||
sFilter = oFilter.Field.FriendlyFieldName & " = " & oFilter.Data
|
||||
End Select
|
||||
|
||||
If oFilter.NotCondition Then
|
||||
sFilter &= " (" & frmFilter_lblNot & ")"
|
||||
End If
|
||||
|
||||
lstFilter.Items.Add(New KeyValuePair(Of clsGameFilter, String)(oFilter, sFilter))
|
||||
Next
|
||||
End If
|
||||
|
||||
'Tag Filters
|
||||
If oIncludeTagFilters.Count > 0 Then
|
||||
chkTag.Checked = True
|
||||
For Each oTag As clsTag In oIncludeTagFilters
|
||||
oListTag = New KeyValuePair(Of String, String)(oTag.ID, oTag.Name)
|
||||
lstIncludeTags.Items.Add(oListTag)
|
||||
lstTags.Items.Remove(oListTag)
|
||||
Next
|
||||
|
||||
If eCurrentFilterType = eFilterType.AllTags Then
|
||||
optAll.Checked = True
|
||||
Else
|
||||
optAny.Checked = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If oExcludeTagFilters.Count > 0 Then
|
||||
chkTag.Checked = True
|
||||
For Each oTag As clsTag In oExcludeTagFilters
|
||||
oListTag = New KeyValuePair(Of String, String)(oTag.ID, oTag.Name)
|
||||
lstExcludeTags.Items.Add(oListTag)
|
||||
lstTags.Items.Remove(oListTag)
|
||||
Next
|
||||
|
||||
If eCurrentFilterType = eFilterType.AllTags Then
|
||||
optAll.Checked = True
|
||||
Else
|
||||
optAny.Checked = True
|
||||
End If
|
||||
End If
|
||||
|
||||
'Sorting
|
||||
cboSortField.SelectedValue = sSortField
|
||||
If bSortAsc Then
|
||||
optSortAsc.Checked = True
|
||||
Else
|
||||
optSortDesc.Checked = True
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ChangeFilterMode()
|
||||
Dim oFilter As clsGameFilterField = DirectCast(cboFilterField.SelectedValue, clsGameFilterField)
|
||||
|
||||
'Reset
|
||||
cboNumericOps.SelectedIndex = 0
|
||||
numFilter.Value = 0
|
||||
txtStringFilter.Text = String.Empty
|
||||
chkNot.Checked = False
|
||||
|
||||
'Reset Visibilty
|
||||
cboListFilter.Visible = False
|
||||
cboNumericOps.Visible = False
|
||||
numFilter.Visible = False
|
||||
txtStringFilter.Visible = False
|
||||
|
||||
'Set Visiblity
|
||||
Select Case oFilter.Type
|
||||
Case clsGameFilterField.eDataType.fString
|
||||
txtStringFilter.Visible = True
|
||||
Case clsGameFilterField.eDataType.fNumeric
|
||||
cboNumericOps.Visible = True
|
||||
numFilter.Visible = True
|
||||
txtStringFilter.Visible = False
|
||||
Case clsGameFilterField.eDataType.fBool
|
||||
LoadComboAsBool()
|
||||
cboListFilter.SelectedIndex = 0
|
||||
cboListFilter.Visible = True
|
||||
Case clsGameFilterField.eDataType.fEnum
|
||||
LoadComboAsEnum(oFilter.EnumField)
|
||||
cboListFilter.SelectedIndex = 0
|
||||
cboListFilter.Visible = True
|
||||
End Select
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub AddFilter()
|
||||
Dim oFilter As New clsGameFilter
|
||||
Dim sFilter As String = String.Empty
|
||||
|
||||
'Build Filter
|
||||
oFilter.ID = Guid.NewGuid.ToString.Split("-")(0)
|
||||
oFilter.Field = cboFilterField.SelectedValue
|
||||
|
||||
Select Case oFilter.Field.Type
|
||||
Case clsGameFilterField.eDataType.fString
|
||||
oFilter.Data = txtStringFilter.Text
|
||||
sFilter = oFilter.Field.FriendlyFieldName & " " & frmFilter_lstFilterContains & " """ & oFilter.Data & """"
|
||||
Case clsGameFilterField.eDataType.fNumeric
|
||||
oFilter.Data = numFilter.Value
|
||||
oFilter.NumericOperator = DirectCast(cboNumericOps.SelectedValue, clsGameFilter.eNumericOperators)
|
||||
sFilter = oFilter.Field.FriendlyFieldName & " " & oFilter.NumericOperatorAsString & " " & oFilter.Data
|
||||
Case clsGameFilterField.eDataType.fBool, clsGameFilterField.eDataType.fEnum
|
||||
oFilter.Data = cboListFilter.SelectedValue
|
||||
sFilter = oFilter.Field.FriendlyFieldName & " = " & oFilter.Data
|
||||
End Select
|
||||
|
||||
If chkNot.Checked Then
|
||||
oFilter.NotCondition = True
|
||||
sFilter &= " (" & frmFilter_lblNot & ")"
|
||||
Else
|
||||
oFilter.NotCondition = False
|
||||
End If
|
||||
|
||||
oGameFilters.Add(oFilter)
|
||||
lstFilter.Items.Add(New KeyValuePair(Of clsGameFilter, String)(oFilter, sFilter))
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub RemoveFilter()
|
||||
Dim oFilter As Object
|
||||
|
||||
If lstFilter.SelectedIndex <> -1 Then
|
||||
oFilter = lstFilter.SelectedItem
|
||||
oGameFilters.Remove(DirectCast(oFilter, KeyValuePair(Of clsGameFilter, String)).Key)
|
||||
lstFilter.Items.Remove(oFilter)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GetFilters()
|
||||
Dim oData As KeyValuePair(Of String, String)
|
||||
Dim oTag As clsTag
|
||||
|
||||
|
||||
If optGameInfo.Checked Then
|
||||
'Set Filter Type
|
||||
If optAnd.Checked Then
|
||||
eCurrentFilterType = eFilterType.FieldAnd
|
||||
Else
|
||||
eCurrentFilterType = eFilterType.FieldOr
|
||||
End If
|
||||
If chkGameInfo.Checked Then
|
||||
'Set Filter Type(s)
|
||||
eCurrentFilterType = eFilterType.BaseFilter
|
||||
bAndOperator = optAnd.Checked
|
||||
End If
|
||||
|
||||
'Set String Filter
|
||||
If txtName.Text <> String.Empty Then
|
||||
hshStringFilters.Add("Name", txtName.Text)
|
||||
End If
|
||||
If txtProcess.Text <> String.Empty Then
|
||||
hshStringFilters.Add("Process", txtProcess.Text)
|
||||
End If
|
||||
If txtCompany.Text <> String.Empty Then
|
||||
hshStringFilters.Add("Company", txtCompany.Text)
|
||||
End If
|
||||
Else
|
||||
If chkTag.Checked Then
|
||||
'Set Tags
|
||||
For Each oData In lstFilter.Items
|
||||
IncludeTagFilters.Clear()
|
||||
For Each oData In lstIncludeTags.Items
|
||||
oTag = DirectCast(hshTags(oData.Value), clsTag)
|
||||
TagFilters.Add(oTag)
|
||||
IncludeTagFilters.Add(oTag)
|
||||
Next
|
||||
ExcludeTagFilters.Clear()
|
||||
For Each oData In lstExcludeTags.Items
|
||||
oTag = DirectCast(hshTags(oData.Value), clsTag)
|
||||
ExcludeTagFilters.Add(oTag)
|
||||
Next
|
||||
|
||||
'Set Filter Type
|
||||
If TagFilters.Count = 0 Then
|
||||
If IncludeTagFilters.Count = 0 And ExcludeTagFilters.Count = 0 Then
|
||||
eCurrentFilterType = eFilterType.NoTags
|
||||
ElseIf optAll.Checked Then
|
||||
eCurrentFilterType = eFilterType.AllTags
|
||||
@@ -145,35 +534,144 @@ Public Class frmFilter
|
||||
End If
|
||||
End If
|
||||
|
||||
'Sorting
|
||||
If optSortAsc.Checked Then
|
||||
bSortAsc = True
|
||||
Else
|
||||
bSortAsc = False
|
||||
End If
|
||||
|
||||
sSortField = cboSortField.SelectedValue
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub LoadComboAsBool()
|
||||
Dim oBoolOperators As New List(Of KeyValuePair(Of Boolean, String))
|
||||
|
||||
'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))
|
||||
|
||||
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"
|
||||
cboNumericOps.DisplayMember = "Value"
|
||||
|
||||
oNumericOperators.Add(New KeyValuePair(Of clsGameFilter.eNumericOperators, String)(clsGameFilter.eNumericOperators.Equals, "="))
|
||||
oNumericOperators.Add(New KeyValuePair(Of clsGameFilter.eNumericOperators, String)(clsGameFilter.eNumericOperators.Greater, ">"))
|
||||
oNumericOperators.Add(New KeyValuePair(Of clsGameFilter.eNumericOperators, String)(clsGameFilter.eNumericOperators.Lesser, "<"))
|
||||
oNumericOperators.Add(New KeyValuePair(Of clsGameFilter.eNumericOperators, String)(clsGameFilter.eNumericOperators.GreaterEquals, ">="))
|
||||
oNumericOperators.Add(New KeyValuePair(Of clsGameFilter.eNumericOperators, String)(clsGameFilter.eNumericOperators.LesserEquals, "<="))
|
||||
|
||||
cboNumericOps.DataSource = oNumericOperators
|
||||
|
||||
'cboFilterField
|
||||
cboFilterField.ValueMember = "Key"
|
||||
cboFilterField.DisplayMember = "Value"
|
||||
|
||||
For Each oField As clsGameFilterField In oValidFields
|
||||
If oField.CheckStatus(clsGameFilterField.eFieldStatus.ValidFilter) Then
|
||||
oFilterFields.Add(New KeyValuePair(Of clsGameFilterField, String)(oField, oField.FriendlyFieldName))
|
||||
End If
|
||||
Next
|
||||
|
||||
cboFilterField.DataSource = oFilterFields
|
||||
|
||||
'cboSortField
|
||||
cboSortField.ValueMember = "Key"
|
||||
cboSortField.DisplayMember = "Value"
|
||||
|
||||
For Each oField As clsGameFilterField In oValidFields
|
||||
If oField.CheckStatus(clsGameFilterField.eFieldStatus.ValidSort) Then
|
||||
oSortFields.Add(New KeyValuePair(Of String, String)(oField.FieldName, oField.FriendlyFieldName))
|
||||
End If
|
||||
Next
|
||||
|
||||
cboSortField.DataSource = oSortFields
|
||||
|
||||
'Select Defaults
|
||||
cboNumericOps.SelectedIndex = 0
|
||||
cboFilterField.SelectedIndex = 0
|
||||
cboSortField.SelectedIndex = 0
|
||||
End Sub
|
||||
|
||||
Private Sub SetForm()
|
||||
'Set Form Name
|
||||
Me.Text = frmFilter_FormName
|
||||
Me.Icon = GBM_Icon
|
||||
|
||||
'Set Form Text
|
||||
optOr.Text = frmFilter_optOr
|
||||
optAnd.Text = frmFilter_optAnd
|
||||
lblCompany.Text = frmFilter_lblCompany
|
||||
lblProcess.Text = frmFilter_lblProcess
|
||||
lblName.Text = frmFilter_lblName
|
||||
grpGameInfoOptions.Text = frmFilter_grpGameInfoOptions
|
||||
grpFilterType.Text = frmFilter_grpFilterType
|
||||
optAll.Text = frmFilter_optAll
|
||||
optAny.Text = frmFilter_optAny
|
||||
lblGameTags.Text = frmFilter_lblGameTags
|
||||
lblIncludeTags.Text = frmFilter_lblIncludeTags
|
||||
lblExcludeTags.Text = frmFilter_lblExcludeTags
|
||||
lblTags.Text = frmFilter_lblTags
|
||||
btnRemove.Text = frmFilter_btnRemove
|
||||
btnAdd.Text = frmFilter_btnAdd
|
||||
btnIncludeRemove.Text = frmFilter_btnIncludeRemove
|
||||
btnIncludeAdd.Text = frmFilter_btnIncludeAdd
|
||||
btnExcludeRemove.Text = frmFilter_btnExcludeRemove
|
||||
btnExcludeAdd.Text = frmFilter_btnExcludeAdd
|
||||
btnOK.Text = frmFilter_btnOK
|
||||
grpTagOptions.Text = frmFilter_grpTagOptions
|
||||
optTag.Text = frmFilter_optTag
|
||||
optGameInfo.Text = frmFilter_optGameInfo
|
||||
chkTag.Text = frmFilter_chkTag
|
||||
chkGameInfo.Text = frmFilter_chkGameInfo
|
||||
grpSorting.Text = frmFilter_grpSorting
|
||||
lblSortFields.Text = frmFilter_lblSortsFields
|
||||
optSortAsc.Text = frmFilter_optSortAsc
|
||||
optSortDesc.Text = frmFilter_optSortDesc
|
||||
btnAddFilter.Text = frmFilter_btnAddFilter
|
||||
btnRemoveFilter.Text = frmFilter_btnRemoveFilter
|
||||
lblCurrentFilters.Text = frmFilter_lblCurrentFilters
|
||||
lblFields.Text = frmFilter_lblFields
|
||||
lblFilterData.Text = frmFilter_lblFilterData
|
||||
grpSortOptions.Text = frmFilter_grpSortOptions
|
||||
|
||||
'Defaults
|
||||
optOr.Checked = True
|
||||
optSortAsc.Checked = True
|
||||
grpGameFilter.Enabled = False
|
||||
grpTagFilter.Enabled = False
|
||||
|
||||
'Init Game Filter
|
||||
lstFilter.ValueMember = "Key"
|
||||
lstFilter.DisplayMember = "Value"
|
||||
End Sub
|
||||
|
||||
Private Sub frmGameTags_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
SetForm()
|
||||
optGameInfo.Checked = True
|
||||
LoadData()
|
||||
LoadFilterFields()
|
||||
LoadCombos()
|
||||
LoadTagData()
|
||||
LoadExistingFilters()
|
||||
End Sub
|
||||
|
||||
Private Sub btnOK_Click(sender As Object, e As EventArgs) Handles btnOK.Click
|
||||
@@ -182,12 +680,20 @@ Public Class frmFilter
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub btnAdd_Click(sender As Object, e As EventArgs) Handles btnAdd.Click
|
||||
AddTag()
|
||||
Private Sub btnIncludeAdd_Click(sender As Object, e As EventArgs) Handles btnIncludeAdd.Click
|
||||
AddTag(lstIncludeTags)
|
||||
End Sub
|
||||
|
||||
Private Sub btnRemove_Click(sender As Object, e As EventArgs) Handles btnRemove.Click
|
||||
RemoveTag()
|
||||
Private Sub btnExcludeAdd_Click(sender As Object, e As EventArgs) Handles btnExcludeAdd.Click
|
||||
AddTag(lstExcludeTags)
|
||||
End Sub
|
||||
|
||||
Private Sub btnExcludeRemove_Click(sender As Object, e As EventArgs) Handles btnExcludeRemove.Click
|
||||
RemoveTag(lstExcludeTags)
|
||||
End Sub
|
||||
|
||||
Private Sub btnIncludeRemove_Click(sender As Object, e As EventArgs) Handles btnIncludeRemove.Click
|
||||
RemoveTag(lstIncludeTags)
|
||||
End Sub
|
||||
|
||||
Private Sub frmFilter_FormClosing(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosing
|
||||
@@ -196,13 +702,37 @@ Public Class frmFilter
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub optGameInfo_Click(sender As Object, e As EventArgs) Handles optGameInfo.Click, optTag.Click
|
||||
If optGameInfo.Checked = True Then
|
||||
Private Sub chkGameInfo_CheckedChanged(sender As Object, e As EventArgs) Handles chkGameInfo.CheckedChanged
|
||||
If chkGameInfo.Checked Then
|
||||
grpGameFilter.Enabled = True
|
||||
grpTagFilter.Enabled = False
|
||||
Else
|
||||
optOr.Checked = True
|
||||
grpGameFilter.Enabled = False
|
||||
grpTagFilter.Enabled = True
|
||||
oGameFilters.Clear()
|
||||
lstFilter.Items.Clear()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub chkTag_CheckedChanged(sender As Object, e As EventArgs) Handles chkTag.CheckedChanged
|
||||
If chkTag.Checked Then
|
||||
grpTagFilter.Enabled = True
|
||||
Else
|
||||
grpTagFilter.Enabled = False
|
||||
oIncludeTagFilters.Clear()
|
||||
LoadTagData()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub btnAddFilter_Click(sender As Object, e As EventArgs) Handles btnAddFilter.Click
|
||||
AddFilter()
|
||||
End Sub
|
||||
|
||||
Private Sub btnRemoveFilter_Click(sender As Object, e As EventArgs) Handles btnRemoveFilter.Click
|
||||
RemoveFilter()
|
||||
End Sub
|
||||
|
||||
Private Sub cboFilterField_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboFilterField.SelectedIndexChanged
|
||||
ChangeFilterMode()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1,9 +1,9 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class frmGameManager
|
||||
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 frmGameManager
|
||||
'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.components = New System.ComponentModel.Container()
|
||||
Me.btnAdd = New System.Windows.Forms.Button()
|
||||
@@ -28,6 +28,19 @@ 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.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()
|
||||
Me.btnExclude = New System.Windows.Forms.Button()
|
||||
Me.btnInclude = New System.Windows.Forms.Button()
|
||||
Me.txtID = New System.Windows.Forms.TextBox()
|
||||
@@ -61,18 +74,18 @@ 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.txtRestorePath = New System.Windows.Forms.TextBox()
|
||||
Me.btnOpenRestorePath = New System.Windows.Forms.Button()
|
||||
Me.btnOpenBackupFile = New System.Windows.Forms.Button()
|
||||
Me.txtFileSize = New System.Windows.Forms.TextBox()
|
||||
Me.btnOpenBackup = New System.Windows.Forms.Button()
|
||||
Me.btnDeleteBackup = New System.Windows.Forms.Button()
|
||||
Me.lblFileSize = New System.Windows.Forms.Label()
|
||||
Me.lblSync = New System.Windows.Forms.Label()
|
||||
Me.txtCurrentBackup = New System.Windows.Forms.TextBox()
|
||||
Me.lblCurrentBackup = New System.Windows.Forms.Label()
|
||||
Me.txtLocalBackup = New System.Windows.Forms.TextBox()
|
||||
Me.lblLastBackup = New System.Windows.Forms.Label()
|
||||
Me.lblBackupFile = New System.Windows.Forms.Label()
|
||||
Me.lblRemote = New System.Windows.Forms.Label()
|
||||
Me.lblLocalData = New System.Windows.Forms.Label()
|
||||
Me.btnMarkAsRestored = New System.Windows.Forms.Button()
|
||||
Me.btnRestore = New System.Windows.Forms.Button()
|
||||
Me.btnSave = New System.Windows.Forms.Button()
|
||||
@@ -88,23 +101,36 @@ 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()
|
||||
Me.cmsDeleteBackup = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
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()
|
||||
CType(Me.pbIcon, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.nudHours, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.grpStats.SuspendLayout()
|
||||
Me.grpFilter.SuspendLayout()
|
||||
Me.cmsImport.SuspendLayout()
|
||||
Me.cmsDeleteBackup.SuspendLayout()
|
||||
Me.cmsOpenBackup.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'btnAdd
|
||||
'
|
||||
Me.btnAdd.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnAdd.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.btnAdd.Location = New System.Drawing.Point(12, 526)
|
||||
Me.btnAdd.Location = New System.Drawing.Point(12, 626)
|
||||
Me.btnAdd.Name = "btnAdd"
|
||||
Me.btnAdd.Size = New System.Drawing.Size(30, 23)
|
||||
Me.btnAdd.TabIndex = 4
|
||||
@@ -115,7 +141,7 @@ Partial Class frmGameManager
|
||||
'
|
||||
Me.btnDelete.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnDelete.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.btnDelete.Location = New System.Drawing.Point(48, 526)
|
||||
Me.btnDelete.Location = New System.Drawing.Point(48, 626)
|
||||
Me.btnDelete.Name = "btnDelete"
|
||||
Me.btnDelete.Size = New System.Drawing.Size(30, 23)
|
||||
Me.btnDelete.TabIndex = 5
|
||||
@@ -125,26 +151,39 @@ Partial Class frmGameManager
|
||||
'btnBackup
|
||||
'
|
||||
Me.btnBackup.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnBackup.Location = New System.Drawing.Point(616, 525)
|
||||
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
|
||||
'
|
||||
'btnClose
|
||||
'
|
||||
Me.btnClose.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnClose.Location = New System.Drawing.Point(697, 525)
|
||||
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.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)
|
||||
Me.grpConfig.Controls.Add(Me.btnExclude)
|
||||
Me.grpConfig.Controls.Add(Me.btnInclude)
|
||||
Me.grpConfig.Controls.Add(Me.txtID)
|
||||
@@ -163,79 +202,198 @@ Partial Class frmGameManager
|
||||
Me.grpConfig.Enabled = False
|
||||
Me.grpConfig.Location = New System.Drawing.Point(247, 12)
|
||||
Me.grpConfig.Name = "grpConfig"
|
||||
Me.grpConfig.Size = New System.Drawing.Size(525, 157)
|
||||
Me.grpConfig.Size = New System.Drawing.Size(525, 258)
|
||||
Me.grpConfig.TabIndex = 8
|
||||
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)
|
||||
Me.btnGameID.Name = "btnGameID"
|
||||
Me.btnGameID.Size = New System.Drawing.Size(117, 23)
|
||||
Me.btnGameID.TabIndex = 2
|
||||
Me.btnGameID.Text = "&Game ID..."
|
||||
Me.btnGameID.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkRegEx
|
||||
'
|
||||
Me.chkRegEx.AutoSize = True
|
||||
Me.chkRegEx.Location = New System.Drawing.Point(402, 46)
|
||||
Me.chkRegEx.Name = "chkRegEx"
|
||||
Me.chkRegEx.Size = New System.Drawing.Size(117, 17)
|
||||
Me.chkRegEx.TabIndex = 6
|
||||
Me.chkRegEx.Text = "Regular Expression"
|
||||
Me.chkRegEx.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblComments
|
||||
'
|
||||
Me.lblComments.AutoSize = True
|
||||
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 = 12
|
||||
Me.lblComments.Text = "Comments:"
|
||||
'
|
||||
'txtParameter
|
||||
'
|
||||
Me.txtParameter.Location = New System.Drawing.Point(70, 71)
|
||||
Me.txtParameter.Name = "txtParameter"
|
||||
Me.txtParameter.Size = New System.Drawing.Size(414, 20)
|
||||
Me.txtParameter.TabIndex = 8
|
||||
'
|
||||
'lblParameter
|
||||
'
|
||||
Me.lblParameter.AutoSize = True
|
||||
Me.lblParameter.Location = New System.Drawing.Point(7, 74)
|
||||
Me.lblParameter.Name = "lblParameter"
|
||||
Me.lblParameter.Size = New System.Drawing.Size(58, 13)
|
||||
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, 200)
|
||||
Me.chkCleanFolder.Name = "chkCleanFolder"
|
||||
Me.chkCleanFolder.Size = New System.Drawing.Size(136, 17)
|
||||
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, 229)
|
||||
Me.lblLimit.Name = "lblLimit"
|
||||
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, 227)
|
||||
Me.nudLimit.Name = "nudLimit"
|
||||
Me.nudLimit.Size = New System.Drawing.Size(40, 20)
|
||||
Me.nudLimit.TabIndex = 22
|
||||
Me.nudLimit.Visible = False
|
||||
'
|
||||
'btnExclude
|
||||
'
|
||||
Me.btnExclude.Location = New System.Drawing.Point(9, 125)
|
||||
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 = 13
|
||||
Me.btnExclude.TabIndex = 20
|
||||
Me.btnExclude.Text = "E&xclude Items..."
|
||||
Me.btnExclude.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnInclude
|
||||
'
|
||||
Me.btnInclude.Location = New System.Drawing.Point(9, 97)
|
||||
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 = 10
|
||||
Me.btnInclude.Text = "In&clude Items..."
|
||||
Me.btnInclude.TabIndex = 17
|
||||
Me.btnInclude.Text = "Incl&ude Items..."
|
||||
Me.btnInclude.UseVisualStyleBackColor = True
|
||||
'
|
||||
'txtID
|
||||
'
|
||||
Me.txtID.Enabled = False
|
||||
Me.txtID.Location = New System.Drawing.Point(489, 19)
|
||||
Me.txtID.Location = New System.Drawing.Point(489, 180)
|
||||
Me.txtID.Name = "txtID"
|
||||
Me.txtID.Size = New System.Drawing.Size(30, 20)
|
||||
Me.txtID.TabIndex = 16
|
||||
Me.txtID.TabIndex = 0
|
||||
Me.txtID.TabStop = False
|
||||
Me.txtID.Visible = False
|
||||
'
|
||||
'btnSavePathBrowse
|
||||
'
|
||||
Me.btnSavePathBrowse.Location = New System.Drawing.Point(489, 71)
|
||||
Me.btnSavePathBrowse.Location = New System.Drawing.Point(490, 97)
|
||||
Me.btnSavePathBrowse.Name = "btnSavePathBrowse"
|
||||
Me.btnSavePathBrowse.Size = New System.Drawing.Size(30, 20)
|
||||
Me.btnSavePathBrowse.TabIndex = 9
|
||||
Me.btnSavePathBrowse.TabIndex = 11
|
||||
Me.btnSavePathBrowse.Text = "..."
|
||||
Me.btnSavePathBrowse.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnProcessBrowse
|
||||
'
|
||||
Me.btnProcessBrowse.Location = New System.Drawing.Point(489, 45)
|
||||
Me.btnProcessBrowse.Location = New System.Drawing.Point(366, 44)
|
||||
Me.btnProcessBrowse.Name = "btnProcessBrowse"
|
||||
Me.btnProcessBrowse.Size = New System.Drawing.Size(30, 20)
|
||||
Me.btnProcessBrowse.TabIndex = 7
|
||||
Me.btnProcessBrowse.TabIndex = 5
|
||||
Me.btnProcessBrowse.Text = "..."
|
||||
Me.btnProcessBrowse.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblSavePath
|
||||
'
|
||||
Me.lblSavePath.AutoSize = True
|
||||
Me.lblSavePath.Location = New System.Drawing.Point(6, 74)
|
||||
Me.lblSavePath.Location = New System.Drawing.Point(7, 101)
|
||||
Me.lblSavePath.Name = "lblSavePath"
|
||||
Me.lblSavePath.Size = New System.Drawing.Size(60, 13)
|
||||
Me.lblSavePath.TabIndex = 2
|
||||
Me.lblSavePath.TabIndex = 9
|
||||
Me.lblSavePath.Text = "Save Path:"
|
||||
'
|
||||
'lblProcess
|
||||
'
|
||||
Me.lblProcess.AutoSize = True
|
||||
Me.lblProcess.Location = New System.Drawing.Point(6, 48)
|
||||
Me.lblProcess.Location = New System.Drawing.Point(7, 47)
|
||||
Me.lblProcess.Name = "lblProcess"
|
||||
Me.lblProcess.Size = New System.Drawing.Size(48, 13)
|
||||
Me.lblProcess.TabIndex = 1
|
||||
Me.lblProcess.TabIndex = 3
|
||||
Me.lblProcess.Text = "Process:"
|
||||
'
|
||||
'lblName
|
||||
'
|
||||
Me.lblName.AutoSize = True
|
||||
Me.lblName.Location = New System.Drawing.Point(6, 22)
|
||||
Me.lblName.Location = New System.Drawing.Point(7, 22)
|
||||
Me.lblName.Name = "lblName"
|
||||
Me.lblName.Size = New System.Drawing.Size(38, 13)
|
||||
Me.lblName.TabIndex = 0
|
||||
@@ -243,18 +401,18 @@ Partial Class frmGameManager
|
||||
'
|
||||
'txtExclude
|
||||
'
|
||||
Me.txtExclude.Location = New System.Drawing.Point(363, 128)
|
||||
Me.txtExclude.Location = New System.Drawing.Point(489, 154)
|
||||
Me.txtExclude.Name = "txtExclude"
|
||||
Me.txtExclude.Size = New System.Drawing.Size(156, 20)
|
||||
Me.txtExclude.Size = New System.Drawing.Size(30, 20)
|
||||
Me.txtExclude.TabIndex = 0
|
||||
Me.txtExclude.TabStop = False
|
||||
Me.txtExclude.Visible = False
|
||||
'
|
||||
'txtFileType
|
||||
'
|
||||
Me.txtFileType.Location = New System.Drawing.Point(363, 99)
|
||||
Me.txtFileType.Location = New System.Drawing.Point(489, 125)
|
||||
Me.txtFileType.Name = "txtFileType"
|
||||
Me.txtFileType.Size = New System.Drawing.Size(156, 20)
|
||||
Me.txtFileType.Size = New System.Drawing.Size(30, 20)
|
||||
Me.txtFileType.TabIndex = 0
|
||||
Me.txtFileType.TabStop = False
|
||||
Me.txtFileType.Visible = False
|
||||
@@ -262,52 +420,52 @@ Partial Class frmGameManager
|
||||
'chkTimeStamp
|
||||
'
|
||||
Me.chkTimeStamp.AutoSize = True
|
||||
Me.chkTimeStamp.Location = New System.Drawing.Point(190, 129)
|
||||
Me.chkTimeStamp.Location = New System.Drawing.Point(191, 228)
|
||||
Me.chkTimeStamp.Name = "chkTimeStamp"
|
||||
Me.chkTimeStamp.Size = New System.Drawing.Size(146, 17)
|
||||
Me.chkTimeStamp.TabIndex = 14
|
||||
Me.chkTimeStamp.Text = "Time stamp each backup"
|
||||
Me.chkTimeStamp.Size = New System.Drawing.Size(133, 17)
|
||||
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(190, 101)
|
||||
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 = 11
|
||||
Me.chkFolderSave.TabIndex = 18
|
||||
Me.chkFolderSave.Text = "Save entire folder"
|
||||
Me.chkFolderSave.UseVisualStyleBackColor = True
|
||||
'
|
||||
'txtSavePath
|
||||
'
|
||||
Me.txtSavePath.Location = New System.Drawing.Point(69, 71)
|
||||
Me.txtSavePath.Location = New System.Drawing.Point(70, 97)
|
||||
Me.txtSavePath.Name = "txtSavePath"
|
||||
Me.txtSavePath.Size = New System.Drawing.Size(414, 20)
|
||||
Me.txtSavePath.TabIndex = 8
|
||||
Me.txtSavePath.TabIndex = 10
|
||||
'
|
||||
'txtProcess
|
||||
'
|
||||
Me.txtProcess.Location = New System.Drawing.Point(69, 45)
|
||||
Me.txtProcess.Location = New System.Drawing.Point(70, 44)
|
||||
Me.txtProcess.Name = "txtProcess"
|
||||
Me.txtProcess.Size = New System.Drawing.Size(414, 20)
|
||||
Me.txtProcess.TabIndex = 6
|
||||
Me.txtProcess.Size = New System.Drawing.Size(290, 20)
|
||||
Me.txtProcess.TabIndex = 4
|
||||
'
|
||||
'txtName
|
||||
'
|
||||
Me.txtName.Location = New System.Drawing.Point(69, 19)
|
||||
Me.txtName.Location = New System.Drawing.Point(70, 19)
|
||||
Me.txtName.Name = "txtName"
|
||||
Me.txtName.Size = New System.Drawing.Size(414, 20)
|
||||
Me.txtName.TabIndex = 5
|
||||
Me.txtName.Size = New System.Drawing.Size(326, 20)
|
||||
Me.txtName.TabIndex = 1
|
||||
'
|
||||
'chkMonitorOnly
|
||||
'
|
||||
Me.chkMonitorOnly.AutoSize = True
|
||||
Me.chkMonitorOnly.Location = New System.Drawing.Point(362, 340)
|
||||
Me.chkMonitorOnly.Location = New System.Drawing.Point(363, 441)
|
||||
Me.chkMonitorOnly.Name = "chkMonitorOnly"
|
||||
Me.chkMonitorOnly.Size = New System.Drawing.Size(145, 17)
|
||||
Me.chkMonitorOnly.Size = New System.Drawing.Size(83, 17)
|
||||
Me.chkMonitorOnly.TabIndex = 11
|
||||
Me.chkMonitorOnly.Text = "Monitor only (No backup)"
|
||||
Me.chkMonitorOnly.Text = "Monitor only"
|
||||
Me.chkMonitorOnly.UseVisualStyleBackColor = True
|
||||
'
|
||||
'grpExtra
|
||||
@@ -327,7 +485,7 @@ Partial Class frmGameManager
|
||||
Me.grpExtra.Controls.Add(Me.txtAppPath)
|
||||
Me.grpExtra.Controls.Add(Me.nudHours)
|
||||
Me.grpExtra.Controls.Add(Me.lblHours)
|
||||
Me.grpExtra.Location = New System.Drawing.Point(247, 175)
|
||||
Me.grpExtra.Location = New System.Drawing.Point(248, 276)
|
||||
Me.grpExtra.Name = "grpExtra"
|
||||
Me.grpExtra.Size = New System.Drawing.Size(525, 155)
|
||||
Me.grpExtra.TabIndex = 9
|
||||
@@ -458,35 +616,87 @@ Partial Class frmGameManager
|
||||
'
|
||||
'btnTags
|
||||
'
|
||||
Me.btnTags.Location = New System.Drawing.Point(535, 336)
|
||||
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.txtRestorePath)
|
||||
Me.grpStats.Controls.Add(Me.btnOpenRestorePath)
|
||||
Me.grpStats.Controls.Add(Me.btnOpenBackupFile)
|
||||
Me.grpStats.Controls.Add(Me.txtFileSize)
|
||||
Me.grpStats.Controls.Add(Me.btnOpenBackup)
|
||||
Me.grpStats.Controls.Add(Me.btnDeleteBackup)
|
||||
Me.grpStats.Controls.Add(Me.lblFileSize)
|
||||
Me.grpStats.Controls.Add(Me.lblSync)
|
||||
Me.grpStats.Controls.Add(Me.txtCurrentBackup)
|
||||
Me.grpStats.Controls.Add(Me.lblCurrentBackup)
|
||||
Me.grpStats.Controls.Add(Me.txtLocalBackup)
|
||||
Me.grpStats.Controls.Add(Me.lblLastBackup)
|
||||
Me.grpStats.Location = New System.Drawing.Point(247, 365)
|
||||
Me.grpStats.Controls.Add(Me.lblBackupFile)
|
||||
Me.grpStats.Controls.Add(Me.lblRemote)
|
||||
Me.grpStats.Controls.Add(Me.lblLocalData)
|
||||
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
|
||||
Me.cboRemoteBackup.FormattingEnabled = True
|
||||
Me.cboRemoteBackup.Location = New System.Drawing.Point(96, 24)
|
||||
Me.cboRemoteBackup.Name = "cboRemoteBackup"
|
||||
Me.cboRemoteBackup.Size = New System.Drawing.Size(387, 21)
|
||||
Me.cboRemoteBackup.TabIndex = 12
|
||||
Me.cboRemoteBackup.Tag = "wipe"
|
||||
'
|
||||
'lblRestorePathData
|
||||
'
|
||||
Me.lblRestorePathData.AutoEllipsis = True
|
||||
Me.lblRestorePathData.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.lblRestorePathData.Location = New System.Drawing.Point(96, 98)
|
||||
Me.lblRestorePathData.Name = "lblRestorePathData"
|
||||
Me.lblRestorePathData.Size = New System.Drawing.Size(387, 20)
|
||||
Me.lblRestorePathData.TabIndex = 7
|
||||
Me.lblRestorePathData.Tag = "wipe"
|
||||
Me.lblRestorePathData.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
'
|
||||
'lblBackupFileData
|
||||
'
|
||||
Me.lblBackupFileData.AutoEllipsis = True
|
||||
Me.lblBackupFileData.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.lblBackupFileData.Location = New System.Drawing.Point(96, 73)
|
||||
Me.lblBackupFileData.Name = "lblBackupFileData"
|
||||
Me.lblBackupFileData.Size = New System.Drawing.Size(387, 20)
|
||||
Me.lblBackupFileData.TabIndex = 6
|
||||
Me.lblBackupFileData.Tag = "wipe"
|
||||
Me.lblBackupFileData.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
'
|
||||
'lblLocalBackupData
|
||||
'
|
||||
Me.lblLocalBackupData.AutoEllipsis = True
|
||||
Me.lblLocalBackupData.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.lblLocalBackupData.Location = New System.Drawing.Point(96, 49)
|
||||
Me.lblLocalBackupData.Name = "lblLocalBackupData"
|
||||
Me.lblLocalBackupData.Size = New System.Drawing.Size(387, 20)
|
||||
Me.lblLocalBackupData.TabIndex = 5
|
||||
Me.lblLocalBackupData.Tag = "wipe"
|
||||
Me.lblLocalBackupData.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
'
|
||||
'lblRestorePath
|
||||
'
|
||||
Me.lblRestorePath.AutoSize = True
|
||||
@@ -496,132 +706,87 @@ Partial Class frmGameManager
|
||||
Me.lblRestorePath.TabIndex = 3
|
||||
Me.lblRestorePath.Text = "Restore Path:"
|
||||
'
|
||||
'txtRestorePath
|
||||
'
|
||||
Me.txtRestorePath.Location = New System.Drawing.Point(96, 99)
|
||||
Me.txtRestorePath.Name = "txtRestorePath"
|
||||
Me.txtRestorePath.ReadOnly = True
|
||||
Me.txtRestorePath.Size = New System.Drawing.Size(387, 20)
|
||||
Me.txtRestorePath.TabIndex = 8
|
||||
'
|
||||
'btnOpenRestorePath
|
||||
'
|
||||
Me.btnOpenRestorePath.Location = New System.Drawing.Point(339, 125)
|
||||
Me.btnOpenRestorePath.Location = New System.Drawing.Point(369, 125)
|
||||
Me.btnOpenRestorePath.Name = "btnOpenRestorePath"
|
||||
Me.btnOpenRestorePath.Size = New System.Drawing.Size(114, 23)
|
||||
Me.btnOpenRestorePath.TabIndex = 12
|
||||
Me.btnOpenRestorePath.TabIndex = 11
|
||||
Me.btnOpenRestorePath.Text = "O&pen Restore Path"
|
||||
Me.btnOpenRestorePath.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnOpenBackupFile
|
||||
'btnOpenBackup
|
||||
'
|
||||
Me.btnOpenBackupFile.Location = New System.Drawing.Point(216, 125)
|
||||
Me.btnOpenBackupFile.Name = "btnOpenBackupFile"
|
||||
Me.btnOpenBackupFile.Size = New System.Drawing.Size(114, 23)
|
||||
Me.btnOpenBackupFile.TabIndex = 11
|
||||
Me.btnOpenBackupFile.Text = "&Open Backup File"
|
||||
Me.btnOpenBackupFile.UseVisualStyleBackColor = True
|
||||
'
|
||||
'txtFileSize
|
||||
'
|
||||
Me.txtFileSize.Location = New System.Drawing.Point(96, 74)
|
||||
Me.txtFileSize.Name = "txtFileSize"
|
||||
Me.txtFileSize.ReadOnly = True
|
||||
Me.txtFileSize.Size = New System.Drawing.Size(387, 20)
|
||||
Me.txtFileSize.TabIndex = 7
|
||||
Me.txtFileSize.TabStop = False
|
||||
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(96, 125)
|
||||
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 = 10
|
||||
Me.btnDeleteBackup.TabIndex = 9
|
||||
Me.btnDeleteBackup.Text = "&Delete Backup"
|
||||
Me.btnDeleteBackup.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblFileSize
|
||||
'lblBackupFile
|
||||
'
|
||||
Me.lblFileSize.AutoSize = True
|
||||
Me.lblFileSize.Location = New System.Drawing.Point(6, 77)
|
||||
Me.lblFileSize.Name = "lblFileSize"
|
||||
Me.lblFileSize.Size = New System.Drawing.Size(70, 13)
|
||||
Me.lblFileSize.TabIndex = 2
|
||||
Me.lblFileSize.Text = "Backup Size:"
|
||||
Me.lblBackupFile.AutoSize = True
|
||||
Me.lblBackupFile.Location = New System.Drawing.Point(6, 77)
|
||||
Me.lblBackupFile.Name = "lblBackupFile"
|
||||
Me.lblBackupFile.Size = New System.Drawing.Size(66, 13)
|
||||
Me.lblBackupFile.TabIndex = 2
|
||||
Me.lblBackupFile.Text = "Backup File:"
|
||||
'
|
||||
'lblSync
|
||||
'lblRemote
|
||||
'
|
||||
Me.lblSync.AutoSize = True
|
||||
Me.lblSync.Location = New System.Drawing.Point(6, 130)
|
||||
Me.lblSync.Name = "lblSync"
|
||||
Me.lblSync.Size = New System.Drawing.Size(62, 13)
|
||||
Me.lblSync.TabIndex = 4
|
||||
Me.lblSync.Text = "Up to Date!"
|
||||
Me.lblSync.Visible = False
|
||||
Me.lblRemote.AutoSize = True
|
||||
Me.lblRemote.Location = New System.Drawing.Point(6, 27)
|
||||
Me.lblRemote.Name = "lblRemote"
|
||||
Me.lblRemote.Size = New System.Drawing.Size(73, 13)
|
||||
Me.lblRemote.TabIndex = 0
|
||||
Me.lblRemote.Text = "Backup Data:"
|
||||
'
|
||||
'txtCurrentBackup
|
||||
'lblLocalData
|
||||
'
|
||||
Me.txtCurrentBackup.Location = New System.Drawing.Point(96, 24)
|
||||
Me.txtCurrentBackup.Name = "txtCurrentBackup"
|
||||
Me.txtCurrentBackup.ReadOnly = True
|
||||
Me.txtCurrentBackup.Size = New System.Drawing.Size(387, 20)
|
||||
Me.txtCurrentBackup.TabIndex = 5
|
||||
Me.txtCurrentBackup.TabStop = False
|
||||
'
|
||||
'lblCurrentBackup
|
||||
'
|
||||
Me.lblCurrentBackup.AutoSize = True
|
||||
Me.lblCurrentBackup.Location = New System.Drawing.Point(6, 27)
|
||||
Me.lblCurrentBackup.Name = "lblCurrentBackup"
|
||||
Me.lblCurrentBackup.Size = New System.Drawing.Size(84, 13)
|
||||
Me.lblCurrentBackup.TabIndex = 0
|
||||
Me.lblCurrentBackup.Text = "Current Backup:"
|
||||
'
|
||||
'txtLocalBackup
|
||||
'
|
||||
Me.txtLocalBackup.Location = New System.Drawing.Point(96, 50)
|
||||
Me.txtLocalBackup.Name = "txtLocalBackup"
|
||||
Me.txtLocalBackup.ReadOnly = True
|
||||
Me.txtLocalBackup.Size = New System.Drawing.Size(387, 20)
|
||||
Me.txtLocalBackup.TabIndex = 6
|
||||
Me.txtLocalBackup.TabStop = False
|
||||
'
|
||||
'lblLastBackup
|
||||
'
|
||||
Me.lblLastBackup.AutoSize = True
|
||||
Me.lblLastBackup.Location = New System.Drawing.Point(6, 53)
|
||||
Me.lblLastBackup.Name = "lblLastBackup"
|
||||
Me.lblLastBackup.Size = New System.Drawing.Size(76, 13)
|
||||
Me.lblLastBackup.TabIndex = 1
|
||||
Me.lblLastBackup.Text = "Local Backup:"
|
||||
Me.lblLocalData.AutoSize = True
|
||||
Me.lblLocalData.Location = New System.Drawing.Point(6, 53)
|
||||
Me.lblLocalData.Name = "lblLocalData"
|
||||
Me.lblLocalData.Size = New System.Drawing.Size(62, 13)
|
||||
Me.lblLocalData.TabIndex = 1
|
||||
Me.lblLocalData.Text = "Local Data:"
|
||||
'
|
||||
'btnMarkAsRestored
|
||||
'
|
||||
Me.btnMarkAsRestored.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnMarkAsRestored.Location = New System.Drawing.Point(429, 525)
|
||||
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
|
||||
'
|
||||
'btnRestore
|
||||
'
|
||||
Me.btnRestore.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnRestore.Location = New System.Drawing.Point(535, 525)
|
||||
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
|
||||
'
|
||||
'btnSave
|
||||
'
|
||||
Me.btnSave.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnSave.Location = New System.Drawing.Point(616, 336)
|
||||
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
|
||||
'
|
||||
@@ -631,23 +796,23 @@ Partial Class frmGameManager
|
||||
Me.lstGames.Location = New System.Drawing.Point(12, 160)
|
||||
Me.lstGames.Name = "lstGames"
|
||||
Me.lstGames.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
|
||||
Me.lstGames.Size = New System.Drawing.Size(228, 355)
|
||||
Me.lstGames.Size = New System.Drawing.Size(228, 459)
|
||||
Me.lstGames.TabIndex = 3
|
||||
'
|
||||
'btnCancel
|
||||
'
|
||||
Me.btnCancel.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnCancel.Location = New System.Drawing.Point(697, 336)
|
||||
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
|
||||
'
|
||||
Me.chkEnabled.AutoSize = True
|
||||
Me.chkEnabled.Location = New System.Drawing.Point(247, 340)
|
||||
Me.chkEnabled.Location = New System.Drawing.Point(248, 441)
|
||||
Me.chkEnabled.Name = "chkEnabled"
|
||||
Me.chkEnabled.Size = New System.Drawing.Size(109, 17)
|
||||
Me.chkEnabled.TabIndex = 10
|
||||
@@ -694,10 +859,10 @@ Partial Class frmGameManager
|
||||
Me.optPendingRestores.AutoSize = True
|
||||
Me.optPendingRestores.Location = New System.Drawing.Point(6, 64)
|
||||
Me.optPendingRestores.Name = "optPendingRestores"
|
||||
Me.optPendingRestores.Size = New System.Drawing.Size(122, 17)
|
||||
Me.optPendingRestores.Size = New System.Drawing.Size(134, 17)
|
||||
Me.optPendingRestores.TabIndex = 2
|
||||
Me.optPendingRestores.TabStop = True
|
||||
Me.optPendingRestores.Text = "New Saves Pending"
|
||||
Me.optPendingRestores.Text = "New Backups Pending"
|
||||
Me.optPendingRestores.UseVisualStyleBackColor = True
|
||||
'
|
||||
'optAllGames
|
||||
@@ -713,7 +878,7 @@ Partial Class frmGameManager
|
||||
'
|
||||
'btnImport
|
||||
'
|
||||
Me.btnImport.Location = New System.Drawing.Point(84, 526)
|
||||
Me.btnImport.Location = New System.Drawing.Point(84, 626)
|
||||
Me.btnImport.Name = "btnImport"
|
||||
Me.btnImport.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnImport.TabIndex = 6
|
||||
@@ -722,7 +887,7 @@ Partial Class frmGameManager
|
||||
'
|
||||
'btnExport
|
||||
'
|
||||
Me.btnExport.Location = New System.Drawing.Point(165, 526)
|
||||
Me.btnExport.Location = New System.Drawing.Point(165, 626)
|
||||
Me.btnExport.Name = "btnExport"
|
||||
Me.btnExport.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnExport.TabIndex = 7
|
||||
@@ -738,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"
|
||||
@@ -764,11 +942,65 @@ Partial Class frmGameManager
|
||||
Me.lblQuickFilter.TabIndex = 1
|
||||
Me.lblQuickFilter.Text = "Quick Filter:"
|
||||
'
|
||||
'cmsDeleteBackup
|
||||
'
|
||||
Me.cmsDeleteBackup.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.cmsDeleteOne, Me.cmsDeleteAll})
|
||||
Me.cmsDeleteBackup.Name = "cmsDeleteBackup"
|
||||
Me.cmsDeleteBackup.ShowImageMargin = False
|
||||
Me.cmsDeleteBackup.Size = New System.Drawing.Size(115, 48)
|
||||
'
|
||||
'cmsDeleteOne
|
||||
'
|
||||
Me.cmsDeleteOne.Name = "cmsDeleteOne"
|
||||
Me.cmsDeleteOne.Size = New System.Drawing.Size(114, 22)
|
||||
Me.cmsDeleteOne.Text = "&Selected File"
|
||||
'
|
||||
'cmsDeleteAll
|
||||
'
|
||||
Me.cmsDeleteAll.Name = "cmsDeleteAll"
|
||||
Me.cmsDeleteAll.Size = New System.Drawing.Size(114, 22)
|
||||
Me.cmsDeleteAll.Text = "&All Files"
|
||||
'
|
||||
'btnProcesses
|
||||
'
|
||||
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 = 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!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(784, 561)
|
||||
Me.ClientSize = New System.Drawing.Size(784, 661)
|
||||
Me.Controls.Add(Me.btnProcesses)
|
||||
Me.Controls.Add(Me.lblQuickFilter)
|
||||
Me.Controls.Add(Me.txtQuickFilter)
|
||||
Me.Controls.Add(Me.btnExport)
|
||||
@@ -793,11 +1025,11 @@ 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)
|
||||
Me.grpConfig.PerformLayout()
|
||||
CType(Me.nudLimit, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.grpExtra.ResumeLayout(False)
|
||||
Me.grpExtra.PerformLayout()
|
||||
CType(Me.pbIcon, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
@@ -807,6 +1039,8 @@ Partial Class frmGameManager
|
||||
Me.grpFilter.ResumeLayout(False)
|
||||
Me.grpFilter.PerformLayout()
|
||||
Me.cmsImport.ResumeLayout(False)
|
||||
Me.cmsDeleteBackup.ResumeLayout(False)
|
||||
Me.cmsOpenBackup.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
@@ -848,18 +1082,14 @@ Partial Class frmGameManager
|
||||
Friend WithEvents btnIconBrowse As System.Windows.Forms.Button
|
||||
Friend WithEvents txtIcon As System.Windows.Forms.TextBox
|
||||
Friend WithEvents txtID As System.Windows.Forms.TextBox
|
||||
Friend WithEvents txtCurrentBackup As System.Windows.Forms.TextBox
|
||||
Friend WithEvents lblCurrentBackup As System.Windows.Forms.Label
|
||||
Friend WithEvents txtLocalBackup As System.Windows.Forms.TextBox
|
||||
Friend WithEvents lblLastBackup As System.Windows.Forms.Label
|
||||
Friend WithEvents lblSync As System.Windows.Forms.Label
|
||||
Friend WithEvents lblRemote As System.Windows.Forms.Label
|
||||
Friend WithEvents lblLocalData As System.Windows.Forms.Label
|
||||
Friend WithEvents chkEnabled As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents txtFileSize As System.Windows.Forms.TextBox
|
||||
Friend WithEvents lblFileSize As System.Windows.Forms.Label
|
||||
Friend WithEvents lblBackupFile As System.Windows.Forms.Label
|
||||
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
|
||||
@@ -871,7 +1101,6 @@ Partial Class frmGameManager
|
||||
Friend WithEvents btnInclude As System.Windows.Forms.Button
|
||||
Friend WithEvents btnExclude As System.Windows.Forms.Button
|
||||
Friend WithEvents lblRestorePath As Label
|
||||
Friend WithEvents txtRestorePath As TextBox
|
||||
Friend WithEvents btnImport As System.Windows.Forms.Button
|
||||
Friend WithEvents btnExport As System.Windows.Forms.Button
|
||||
Friend WithEvents cmsImport As System.Windows.Forms.ContextMenuStrip
|
||||
@@ -879,4 +1108,32 @@ Partial Class frmGameManager
|
||||
Friend WithEvents cmsFile As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents txtQuickFilter As TextBox
|
||||
Friend WithEvents lblQuickFilter As Label
|
||||
Friend WithEvents lblLocalBackupData As Label
|
||||
Friend WithEvents lblRestorePathData As Label
|
||||
Friend WithEvents lblBackupFileData As Label
|
||||
Friend WithEvents lblLimit As Label
|
||||
Friend WithEvents nudLimit As NumericUpDown
|
||||
Friend WithEvents cboRemoteBackup As ComboBox
|
||||
Friend WithEvents cmsDeleteBackup As ContextMenuStrip
|
||||
Friend WithEvents cmsDeleteOne As ToolStripMenuItem
|
||||
Friend WithEvents cmsDeleteAll As ToolStripMenuItem
|
||||
Friend WithEvents chkCleanFolder As CheckBox
|
||||
Friend WithEvents txtParameter As TextBox
|
||||
Friend WithEvents lblParameter As Label
|
||||
Friend WithEvents lblComments As Label
|
||||
Friend WithEvents txtComments As TextBox
|
||||
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
|
||||
|
||||
@@ -120,4 +120,13 @@
|
||||
<metadata name="cmsImport.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<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>
|
||||
@@ -0,0 +1,143 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class frmGameProcesses
|
||||
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.btnOpenProcesses = New System.Windows.Forms.Button()
|
||||
Me.btnClose = New System.Windows.Forms.Button()
|
||||
Me.lblGameProcesses = New System.Windows.Forms.Label()
|
||||
Me.lblProcesses = New System.Windows.Forms.Label()
|
||||
Me.btnRemove = New System.Windows.Forms.Button()
|
||||
Me.btnAdd = New System.Windows.Forms.Button()
|
||||
Me.lstGameProcesses = New System.Windows.Forms.ListBox()
|
||||
Me.lstProcesses = New System.Windows.Forms.ListBox()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'btnOpenProcesses
|
||||
'
|
||||
Me.btnOpenProcesses.Location = New System.Drawing.Point(12, 229)
|
||||
Me.btnOpenProcesses.Name = "btnOpenProcesses"
|
||||
Me.btnOpenProcesses.Size = New System.Drawing.Size(110, 23)
|
||||
Me.btnOpenProcesses.TabIndex = 4
|
||||
Me.btnOpenProcesses.Text = "&Process Manager..."
|
||||
Me.btnOpenProcesses.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnClose
|
||||
'
|
||||
Me.btnClose.Location = New System.Drawing.Point(297, 229)
|
||||
Me.btnClose.Name = "btnClose"
|
||||
Me.btnClose.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnClose.TabIndex = 5
|
||||
Me.btnClose.Text = "&Close"
|
||||
Me.btnClose.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblGameProcesses
|
||||
'
|
||||
Me.lblGameProcesses.AutoSize = True
|
||||
Me.lblGameProcesses.Location = New System.Drawing.Point(251, 8)
|
||||
Me.lblGameProcesses.Name = "lblGameProcesses"
|
||||
Me.lblGameProcesses.Size = New System.Drawing.Size(93, 13)
|
||||
Me.lblGameProcesses.TabIndex = 0
|
||||
Me.lblGameProcesses.Text = "Current Processes"
|
||||
'
|
||||
'lblProcesses
|
||||
'
|
||||
Me.lblProcesses.AutoSize = True
|
||||
Me.lblProcesses.Location = New System.Drawing.Point(36, 8)
|
||||
Me.lblProcesses.Name = "lblProcesses"
|
||||
Me.lblProcesses.Size = New System.Drawing.Size(102, 13)
|
||||
Me.lblProcesses.TabIndex = 0
|
||||
Me.lblProcesses.Text = "Available Processes"
|
||||
'
|
||||
'btnRemove
|
||||
'
|
||||
Me.btnRemove.Location = New System.Drawing.Point(168, 114)
|
||||
Me.btnRemove.Name = "btnRemove"
|
||||
Me.btnRemove.Size = New System.Drawing.Size(48, 23)
|
||||
Me.btnRemove.TabIndex = 2
|
||||
Me.btnRemove.Text = "<"
|
||||
Me.btnRemove.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnAdd
|
||||
'
|
||||
Me.btnAdd.Location = New System.Drawing.Point(168, 85)
|
||||
Me.btnAdd.Name = "btnAdd"
|
||||
Me.btnAdd.Size = New System.Drawing.Size(48, 23)
|
||||
Me.btnAdd.TabIndex = 1
|
||||
Me.btnAdd.Text = ">"
|
||||
Me.btnAdd.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lstGameProcesses
|
||||
'
|
||||
Me.lstGameProcesses.FormattingEnabled = True
|
||||
Me.lstGameProcesses.Location = New System.Drawing.Point(222, 24)
|
||||
Me.lstGameProcesses.Name = "lstGameProcesses"
|
||||
Me.lstGameProcesses.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
|
||||
Me.lstGameProcesses.Size = New System.Drawing.Size(150, 199)
|
||||
Me.lstGameProcesses.Sorted = True
|
||||
Me.lstGameProcesses.TabIndex = 3
|
||||
'
|
||||
'lstProcesses
|
||||
'
|
||||
Me.lstProcesses.FormattingEnabled = True
|
||||
Me.lstProcesses.Location = New System.Drawing.Point(12, 24)
|
||||
Me.lstProcesses.Name = "lstProcesses"
|
||||
Me.lstProcesses.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
|
||||
Me.lstProcesses.Size = New System.Drawing.Size(150, 199)
|
||||
Me.lstProcesses.Sorted = True
|
||||
Me.lstProcesses.TabIndex = 0
|
||||
'
|
||||
'frmGameProcesses
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(384, 261)
|
||||
Me.Controls.Add(Me.btnOpenProcesses)
|
||||
Me.Controls.Add(Me.btnClose)
|
||||
Me.Controls.Add(Me.lblGameProcesses)
|
||||
Me.Controls.Add(Me.lblProcesses)
|
||||
Me.Controls.Add(Me.btnRemove)
|
||||
Me.Controls.Add(Me.btnAdd)
|
||||
Me.Controls.Add(Me.lstGameProcesses)
|
||||
Me.Controls.Add(Me.lstProcesses)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||
Me.MaximizeBox = False
|
||||
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)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents btnOpenProcesses As Button
|
||||
Friend WithEvents btnClose As Button
|
||||
Friend WithEvents lblGameProcesses As Label
|
||||
Friend WithEvents lblProcesses As Label
|
||||
Friend WithEvents btnRemove As Button
|
||||
Friend WithEvents btnAdd As Button
|
||||
Friend WithEvents lstGameProcesses As ListBox
|
||||
Friend WithEvents lstProcesses As ListBox
|
||||
End Class
|
||||
@@ -117,7 +117,4 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="fbBrowser.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,248 @@
|
||||
Imports GBM.My.Resources
|
||||
|
||||
Public Class frmGameProcesses
|
||||
Private sMonitorIDs As List(Of String)
|
||||
Private sGameName As String = String.Empty
|
||||
Private bNewMode As Boolean = False
|
||||
Private oProcessList As List(Of KeyValuePair(Of String, String))
|
||||
|
||||
Public Property IDList As List(Of String)
|
||||
Get
|
||||
Return sMonitorIDs
|
||||
End Get
|
||||
Set(value As List(Of String))
|
||||
sMonitorIDs = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property GameName As String
|
||||
Get
|
||||
Return sGameName
|
||||
End Get
|
||||
Set(value As String)
|
||||
sGameName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property NewMode As Boolean
|
||||
Get
|
||||
Return bNewMode
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bNewMode = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property ProcessList As List(Of KeyValuePair(Of String, String))
|
||||
Get
|
||||
Return oProcessList
|
||||
End Get
|
||||
Set(value As List(Of KeyValuePair(Of String, String)))
|
||||
oProcessList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Sub AddProcess()
|
||||
Dim oData As KeyValuePair(Of String, String)
|
||||
Dim oProcesss As List(Of KeyValuePair(Of String, String))
|
||||
Dim oGameProcess As clsGameProcess
|
||||
Dim oGameProcesses As List(Of clsGameProcess)
|
||||
|
||||
If lstProcesses.SelectedItems.Count = 1 Then
|
||||
oData = lstProcesses.SelectedItems(0)
|
||||
|
||||
oGameProcesses = New List(Of clsGameProcess)
|
||||
For Each sID As String In IDList
|
||||
oGameProcess = New clsGameProcess
|
||||
oGameProcess.MonitorID = sID
|
||||
oGameProcess.ProcessID = oData.Key
|
||||
oGameProcesses.Add(oGameProcess)
|
||||
Next
|
||||
|
||||
If Not bNewMode Then mgrGameProcesses.DoGameProcessAddBatch(oGameProcesses)
|
||||
|
||||
lstGameProcesses.Items.Add(oData)
|
||||
lstProcesses.Items.Remove(oData)
|
||||
ElseIf lstProcesses.SelectedItems.Count > 1 Then
|
||||
oProcesss = New List(Of KeyValuePair(Of String, String))
|
||||
|
||||
For Each oData In lstProcesses.SelectedItems
|
||||
oProcesss.Add(oData)
|
||||
Next
|
||||
|
||||
For Each kp As KeyValuePair(Of String, String) In oProcesss
|
||||
oGameProcesses = New List(Of clsGameProcess)
|
||||
For Each sID As String In IDList
|
||||
oGameProcess = New clsGameProcess
|
||||
oGameProcess.MonitorID = sID
|
||||
oGameProcess.ProcessID = kp.Key
|
||||
oGameProcesses.Add(oGameProcess)
|
||||
Next
|
||||
|
||||
If Not bNewMode Then mgrGameProcesses.DoGameProcessAddBatch(oGameProcesses)
|
||||
|
||||
lstGameProcesses.Items.Add(kp)
|
||||
lstProcesses.Items.Remove(kp)
|
||||
Next
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub RemoveProcess()
|
||||
Dim oData As KeyValuePair(Of String, String)
|
||||
Dim oProcesses As List(Of KeyValuePair(Of String, String))
|
||||
Dim oGameProcess As clsGameProcess
|
||||
Dim oGameProcesses As List(Of clsGameProcess)
|
||||
|
||||
If lstGameProcesses.SelectedItems.Count = 1 Then
|
||||
oData = lstGameProcesses.SelectedItems(0)
|
||||
|
||||
oGameProcesses = New List(Of clsGameProcess)
|
||||
For Each sID As String In IDList
|
||||
oGameProcess = New clsGameProcess
|
||||
oGameProcess.MonitorID = sID
|
||||
oGameProcess.ProcessID = oData.Key
|
||||
oGameProcesses.Add(oGameProcess)
|
||||
Next
|
||||
|
||||
If Not bNewMode Then mgrGameProcesses.DoGameProcessDelete(oGameProcesses)
|
||||
|
||||
lstGameProcesses.Items.Remove(oData)
|
||||
lstProcesses.Items.Add(oData)
|
||||
ElseIf lstGameProcesses.SelectedItems.Count > 1 Then
|
||||
oProcesses = New List(Of KeyValuePair(Of String, String))
|
||||
|
||||
For Each oData In lstGameProcesses.SelectedItems
|
||||
oProcesses.Add(oData)
|
||||
Next
|
||||
|
||||
For Each kp As KeyValuePair(Of String, String) In oProcesses
|
||||
oGameProcesses = New List(Of clsGameProcess)
|
||||
For Each sID As String In IDList
|
||||
oGameProcess = New clsGameProcess
|
||||
oGameProcess.MonitorID = sID
|
||||
oGameProcess.ProcessID = kp.Key
|
||||
oGameProcesses.Add(oGameProcess)
|
||||
Next
|
||||
|
||||
If Not bNewMode Then mgrGameProcesses.DoGameProcessDelete(oGameProcesses)
|
||||
|
||||
lstGameProcesses.Items.Remove(kp)
|
||||
lstProcesses.Items.Add(kp)
|
||||
Next
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub LoadData()
|
||||
Dim hshProcesses As Hashtable
|
||||
Dim hshGameProcesses As Hashtable
|
||||
Dim oProcess As clsProcess
|
||||
Dim oData As KeyValuePair(Of String, String)
|
||||
|
||||
'Load Processes
|
||||
hshProcesses = mgrProcess.ReadProcesses()
|
||||
|
||||
'Handle Lists
|
||||
lstProcesses.Items.Clear()
|
||||
lstGameProcesses.Items.Clear()
|
||||
|
||||
lstProcesses.ValueMember = "Key"
|
||||
lstProcesses.DisplayMember = "Value"
|
||||
lstGameProcesses.ValueMember = "Key"
|
||||
lstGameProcesses.DisplayMember = "Value"
|
||||
|
||||
If bNewMode Then
|
||||
For Each kp As KeyValuePair(Of String, String) In oProcessList
|
||||
'We need to be sure the tags still exist if the "Process Manager" form was used
|
||||
If hshProcesses.ContainsKey(kp.Value) Then
|
||||
lstGameProcesses.Items.Add(kp)
|
||||
End If
|
||||
Next
|
||||
|
||||
For Each kp As KeyValuePair(Of String, String) In oProcessList
|
||||
If hshProcesses.ContainsKey(kp.Value) Then
|
||||
hshProcesses.Remove(kp.Value)
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
hshGameProcesses = mgrGameProcesses.GetProcessesByGameMulti(IDList)
|
||||
|
||||
For Each de As DictionaryEntry In hshGameProcesses
|
||||
oProcess = DirectCast(de.Value, clsProcess)
|
||||
If hshProcesses.ContainsKey(oProcess.Name) Then
|
||||
hshProcesses.Remove(oProcess.Name)
|
||||
End If
|
||||
Next
|
||||
|
||||
For Each de As DictionaryEntry In hshGameProcesses
|
||||
oProcess = DirectCast(de.Value, clsProcess)
|
||||
oData = New KeyValuePair(Of String, String)(oProcess.ID, oProcess.Name)
|
||||
lstGameProcesses.Items.Add(oData)
|
||||
Next
|
||||
End If
|
||||
|
||||
For Each de As DictionaryEntry In hshProcesses
|
||||
oProcess = DirectCast(de.Value, clsProcess)
|
||||
oData = New KeyValuePair(Of String, String)(oProcess.ID, oProcess.Name)
|
||||
lstProcesses.Items.Add(oData)
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BuildProcessList()
|
||||
Dim oData As KeyValuePair(Of String, String)
|
||||
oProcessList.Clear()
|
||||
For Each oData In lstGameProcesses.Items
|
||||
oProcessList.Add(oData)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub OpenProcessManager()
|
||||
Dim frm As New frmProcessManager
|
||||
frm.ShowDialog()
|
||||
LoadData()
|
||||
End Sub
|
||||
|
||||
Private Sub SetForm()
|
||||
'Set Form Name
|
||||
If IDList.Count > 1 Then
|
||||
Me.Text = frmGameProcesses_FormNameMulti
|
||||
Else
|
||||
Me.Text = mgrCommon.FormatString(frmGameProcesses_FormNameSingle, GameName)
|
||||
End If
|
||||
Me.Icon = GBM_Icon
|
||||
|
||||
'Set Form Text
|
||||
btnOpenProcesses.Text = frmGameProcesses_btnOpenProcesses
|
||||
btnClose.Text = frmGameProcesses_btnClose
|
||||
lblGameProcesses.Text = frmGameProcesses_lblGameProccesses
|
||||
lblProcesses.Text = frmGameProcesses_lblProcesses
|
||||
btnRemove.Text = frmGameProcesses_btnRemove
|
||||
btnAdd.Text = frmGameProcesses_btnAdd
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub frmGameProcesses_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
LoadData()
|
||||
SetForm()
|
||||
End Sub
|
||||
|
||||
Private Sub btnClose_Click(sender As Object, e As EventArgs) Handles btnClose.Click
|
||||
If bNewMode Then BuildProcessList()
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub btnAdd_Click(sender As Object, e As EventArgs) Handles btnAdd.Click
|
||||
AddProcess()
|
||||
End Sub
|
||||
|
||||
Private Sub btnRemove_Click(sender As Object, e As EventArgs) Handles btnRemove.Click
|
||||
RemoveProcess()
|
||||
End Sub
|
||||
|
||||
Private Sub btnOpenProcesses_Click(sender As Object, e As EventArgs) Handles btnOpenProcesses.Click
|
||||
If bNewMode Then BuildProcessList()
|
||||
OpenProcessManager()
|
||||
End Sub
|
||||
End Class
|
||||
@@ -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)
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
|
||||
Public Class frmGameTags
|
||||
|
||||
Dim sMonitorIDs As List(Of String)
|
||||
Dim sGameName As String = String.Empty
|
||||
Private sMonitorIDs As List(Of String)
|
||||
Private sGameName As String = String.Empty
|
||||
Private bNewMode As Boolean = False
|
||||
Private oTagList As List(Of KeyValuePair(Of String, String))
|
||||
|
||||
Public Property IDList As List(Of String)
|
||||
Get
|
||||
@@ -23,6 +25,25 @@ Public Class frmGameTags
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property NewMode As Boolean
|
||||
Get
|
||||
Return bNewMode
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bNewMode = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property TagList As List(Of KeyValuePair(Of String, String))
|
||||
Get
|
||||
Return oTagList
|
||||
End Get
|
||||
Set(value As List(Of KeyValuePair(Of String, String)))
|
||||
oTagList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Sub AddTag()
|
||||
Dim oData As KeyValuePair(Of String, String)
|
||||
Dim oTags As List(Of KeyValuePair(Of String, String))
|
||||
@@ -40,7 +61,7 @@ Public Class frmGameTags
|
||||
oGameTags.Add(oGameTag)
|
||||
Next
|
||||
|
||||
mgrGameTags.DoGameTagAddBatch(oGameTags)
|
||||
If Not bNewMode Then mgrGameTags.DoGameTagAddBatch(oGameTags)
|
||||
|
||||
lstGameTags.Items.Add(oData)
|
||||
lstTags.Items.Remove(oData)
|
||||
@@ -60,7 +81,7 @@ Public Class frmGameTags
|
||||
oGameTags.Add(oGameTag)
|
||||
Next
|
||||
|
||||
mgrGameTags.DoGameTagAddBatch(oGameTags)
|
||||
If Not bNewMode Then mgrGameTags.DoGameTagAddBatch(oGameTags)
|
||||
|
||||
lstGameTags.Items.Add(kp)
|
||||
lstTags.Items.Remove(kp)
|
||||
@@ -86,12 +107,12 @@ Public Class frmGameTags
|
||||
oGameTags.Add(oGameTag)
|
||||
Next
|
||||
|
||||
mgrGameTags.DoGameTagDelete(oGameTags)
|
||||
If Not bNewMode Then mgrGameTags.DoGameTagDelete(oGameTags)
|
||||
|
||||
lstGameTags.Items.Remove(oData)
|
||||
lstTags.Items.Add(oData)
|
||||
ElseIf lstGameTags.SelectedItems.Count > 1 Then
|
||||
oTags = New List(Of KeyValuePair(Of String, String))
|
||||
lstTags.Items.Add(oData)
|
||||
ElseIf lstGameTags.SelectedItems.Count > 1 Then
|
||||
oTags = New List(Of KeyValuePair(Of String, String))
|
||||
|
||||
For Each oData In lstGameTags.SelectedItems
|
||||
oTags.Add(oData)
|
||||
@@ -106,7 +127,7 @@ Public Class frmGameTags
|
||||
oGameTags.Add(oGameTag)
|
||||
Next
|
||||
|
||||
mgrGameTags.DoGameTagDelete(oGameTags)
|
||||
If Not bNewMode Then mgrGameTags.DoGameTagDelete(oGameTags)
|
||||
|
||||
lstGameTags.Items.Remove(kp)
|
||||
lstTags.Items.Add(kp)
|
||||
@@ -121,16 +142,8 @@ Public Class frmGameTags
|
||||
Dim oTag As clsTag
|
||||
Dim oData As KeyValuePair(Of String, String)
|
||||
|
||||
'Handle Data
|
||||
'Load Tags
|
||||
hshTags = mgrTags.ReadTags()
|
||||
hshGameTags = mgrGameTags.GetTagsByGameMulti(IDList)
|
||||
|
||||
For Each de As DictionaryEntry In hshGameTags
|
||||
oTag = DirectCast(de.Value, clsTag)
|
||||
If hshTags.ContainsKey(oTag.Name) Then
|
||||
hshTags.Remove(oTag.Name)
|
||||
End If
|
||||
Next
|
||||
|
||||
'Handle Lists
|
||||
lstTags.Items.Clear()
|
||||
@@ -141,11 +154,35 @@ Public Class frmGameTags
|
||||
lstGameTags.ValueMember = "Key"
|
||||
lstGameTags.DisplayMember = "Value"
|
||||
|
||||
For Each de As DictionaryEntry In hshGameTags
|
||||
oTag = DirectCast(de.Value, clsTag)
|
||||
oData = New KeyValuePair(Of String, String)(oTag.ID, oTag.Name)
|
||||
lstGameTags.Items.Add(oData)
|
||||
Next
|
||||
If bNewMode Then
|
||||
For Each kp As KeyValuePair(Of String, String) In oTagList
|
||||
'We need to be sure the tags still exist if the "Setup Tags" form was used
|
||||
If hshTags.ContainsKey(kp.Value) Then
|
||||
lstGameTags.Items.Add(kp)
|
||||
End If
|
||||
Next
|
||||
|
||||
For Each kp As KeyValuePair(Of String, String) In oTagList
|
||||
If hshTags.ContainsKey(kp.Value) Then
|
||||
hshTags.Remove(kp.Value)
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
hshGameTags = mgrGameTags.GetTagsByGameMulti(IDList)
|
||||
|
||||
For Each de As DictionaryEntry In hshGameTags
|
||||
oTag = DirectCast(de.Value, clsTag)
|
||||
If hshTags.ContainsKey(oTag.Name) Then
|
||||
hshTags.Remove(oTag.Name)
|
||||
End If
|
||||
Next
|
||||
|
||||
For Each de As DictionaryEntry In hshGameTags
|
||||
oTag = DirectCast(de.Value, clsTag)
|
||||
oData = New KeyValuePair(Of String, String)(oTag.ID, oTag.Name)
|
||||
lstGameTags.Items.Add(oData)
|
||||
Next
|
||||
End If
|
||||
|
||||
For Each de As DictionaryEntry In hshTags
|
||||
oTag = DirectCast(de.Value, clsTag)
|
||||
@@ -155,6 +192,14 @@ Public Class frmGameTags
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BuildTagList()
|
||||
Dim oData As KeyValuePair(Of String, String)
|
||||
oTagList.Clear()
|
||||
For Each oData In lstGameTags.Items
|
||||
oTagList.Add(oData)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub OpenTags()
|
||||
Dim frm As New frmTags
|
||||
frm.ShowDialog()
|
||||
@@ -168,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
|
||||
@@ -185,6 +231,7 @@ Public Class frmGameTags
|
||||
End Sub
|
||||
|
||||
Private Sub btnClose_Click(sender As Object, e As EventArgs) Handles btnClose.Click
|
||||
If bNewMode Then BuildTagList()
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
@@ -197,6 +244,7 @@ Public Class frmGameTags
|
||||
End Sub
|
||||
|
||||
Private Sub btnOpenTags_Click(sender As Object, e As EventArgs) Handles btnOpenTags.Click
|
||||
If bNewMode Then BuildTagList()
|
||||
OpenTags()
|
||||
End Sub
|
||||
End Class
|
||||
@@ -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(frmIncludeExclude_BrowseSaveFolder, sDefaultFolder, False)
|
||||
sNewPath = mgrCommon.OpenFolderBrowser("IE_Save_Path", frmIncludeExclude_BrowseSaveFolder, sDefaultFolder, False)
|
||||
|
||||
If sNewPath <> String.Empty Then txtRootFolder.Text = sNewPath
|
||||
End Sub
|
||||
@@ -226,20 +236,24 @@ Public Class frmIncludeExclude
|
||||
sNewString = InputBox(frmIncludeExclude_RawEditInfo, mgrCommon.FormatString(frmIncludeExclude_RawEditTitle, FormName), sCurrentString)
|
||||
If sNewString <> String.Empty Then
|
||||
ParseBuilderString(sNewString)
|
||||
Else
|
||||
lstBuilder.Clear()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
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
|
||||
@@ -252,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
|
||||
@@ -283,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,14 +34,18 @@ 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.gMonTrayToolsCleanMan = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTrayToolsCompact = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTrayToolsLog = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTrayLogClear = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTrayLogSave = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTrayToolsSessions = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTrayToolsSyncGameID = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTrayToolsSyncGameIDOfficial = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTrayToolsSyncGameIDFile = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonTraySep1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.gMonTrayExit = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.bwMonitor = New System.ComponentModel.BackgroundWorker()
|
||||
@@ -60,14 +64,18 @@ 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.gMonToolsCleanMan = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonToolsCompact = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonToolsLog = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonLogClear = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonLogSave = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonToolsSessions = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonToolsSyncGameID = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonToolsSyncGameIDOfficial = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonToolsSyncGameIDFile = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonHelp = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonHelpWebSite = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonHelpManual = New System.Windows.Forms.ToolStripMenuItem()
|
||||
@@ -75,7 +83,6 @@ Partial Class frmMain
|
||||
Me.gMonHelpAbout = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.gMonNotification = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.pbIcon = New System.Windows.Forms.PictureBox()
|
||||
Me.btnLogToggle = New System.Windows.Forms.Button()
|
||||
Me.lblGameTitle = New System.Windows.Forms.Label()
|
||||
Me.lblLastAction = New System.Windows.Forms.Label()
|
||||
Me.lblLastActionTitle = New System.Windows.Forms.Label()
|
||||
@@ -99,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
|
||||
'
|
||||
@@ -138,7 +146,7 @@ Partial Class frmMain
|
||||
'
|
||||
'gMonTraySetup
|
||||
'
|
||||
Me.gMonTraySetup.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonTraySetupAddWizard, Me.gMonTraySetupGameManager, Me.gMonTraySetupCustomVariables, Me.gMonTraySetupTags})
|
||||
Me.gMonTraySetup.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonTraySetupAddWizard, Me.gMonTraySetupGameManager, Me.gMonTraySetupTags, Me.gMonTraySetupProcessManager, Me.gMonTraySetupCustomVariables})
|
||||
Me.gMonTraySetup.Name = "gMonTraySetup"
|
||||
Me.gMonTraySetup.Size = New System.Drawing.Size(161, 22)
|
||||
Me.gMonTraySetup.Text = "&Setup"
|
||||
@@ -155,42 +163,42 @@ 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"
|
||||
Me.gMonTraySetupTags.Size = New System.Drawing.Size(201, 22)
|
||||
Me.gMonTraySetupTags.Text = "&Tags..."
|
||||
Me.gMonTraySetupTags.Text = "&Tag Manager..."
|
||||
'
|
||||
'gMonTraySetupProcessManager
|
||||
'
|
||||
Me.gMonTraySetupProcessManager.Name = "gMonTraySetupProcessManager"
|
||||
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.gMonTrayToolsCleanMan, Me.gMonTrayToolsCompact, Me.gMonTrayToolsLog})
|
||||
Me.gMonTrayTools.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonTrayToolsCompact, Me.gMonTrayToolsLog, Me.gMonTrayToolsSessions, Me.gMonTrayToolsSyncGameID})
|
||||
Me.gMonTrayTools.Name = "gMonTrayTools"
|
||||
Me.gMonTrayTools.Size = New System.Drawing.Size(161, 22)
|
||||
Me.gMonTrayTools.Text = "&Tools"
|
||||
'
|
||||
'gMonTrayToolsCleanMan
|
||||
'
|
||||
Me.gMonTrayToolsCleanMan.Name = "gMonTrayToolsCleanMan"
|
||||
Me.gMonTrayToolsCleanMan.Size = New System.Drawing.Size(184, 22)
|
||||
Me.gMonTrayToolsCleanMan.Text = "Clean Local Ma&nifest"
|
||||
'
|
||||
'gMonTrayToolsCompact
|
||||
'
|
||||
Me.gMonTrayToolsCompact.Name = "gMonTrayToolsCompact"
|
||||
Me.gMonTrayToolsCompact.Size = New System.Drawing.Size(184, 22)
|
||||
Me.gMonTrayToolsCompact.Size = New System.Drawing.Size(179, 22)
|
||||
Me.gMonTrayToolsCompact.Text = "&Compact Databases"
|
||||
'
|
||||
'gMonTrayToolsLog
|
||||
'
|
||||
Me.gMonTrayToolsLog.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonTrayLogClear, Me.gMonTrayLogSave})
|
||||
Me.gMonTrayToolsLog.Name = "gMonTrayToolsLog"
|
||||
Me.gMonTrayToolsLog.Size = New System.Drawing.Size(184, 22)
|
||||
Me.gMonTrayToolsLog.Size = New System.Drawing.Size(179, 22)
|
||||
Me.gMonTrayToolsLog.Text = "&Log"
|
||||
'
|
||||
'gMonTrayLogClear
|
||||
@@ -205,6 +213,31 @@ Partial Class frmMain
|
||||
Me.gMonTrayLogSave.Size = New System.Drawing.Size(101, 22)
|
||||
Me.gMonTrayLogSave.Text = "&Save"
|
||||
'
|
||||
'gMonTrayToolsSessions
|
||||
'
|
||||
Me.gMonTrayToolsSessions.Name = "gMonTrayToolsSessions"
|
||||
Me.gMonTrayToolsSessions.Size = New System.Drawing.Size(179, 22)
|
||||
Me.gMonTrayToolsSessions.Text = "&Session Viewer..."
|
||||
'
|
||||
'gMonTrayToolsSyncGameID
|
||||
'
|
||||
Me.gMonTrayToolsSyncGameID.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonTrayToolsSyncGameIDOfficial, Me.gMonTrayToolsSyncGameIDFile})
|
||||
Me.gMonTrayToolsSyncGameID.Name = "gMonTrayToolsSyncGameID"
|
||||
Me.gMonTrayToolsSyncGameID.Size = New System.Drawing.Size(179, 22)
|
||||
Me.gMonTrayToolsSyncGameID.Text = "S&ync Game IDs"
|
||||
'
|
||||
'gMonTrayToolsSyncGameIDOfficial
|
||||
'
|
||||
Me.gMonTrayToolsSyncGameIDOfficial.Name = "gMonTrayToolsSyncGameIDOfficial"
|
||||
Me.gMonTrayToolsSyncGameIDOfficial.Size = New System.Drawing.Size(142, 22)
|
||||
Me.gMonTrayToolsSyncGameIDOfficial.Text = "&Official List..."
|
||||
'
|
||||
'gMonTrayToolsSyncGameIDFile
|
||||
'
|
||||
Me.gMonTrayToolsSyncGameIDFile.Name = "gMonTrayToolsSyncGameIDFile"
|
||||
Me.gMonTrayToolsSyncGameIDFile.Size = New System.Drawing.Size(142, 22)
|
||||
Me.gMonTrayToolsSyncGameIDFile.Text = "&File..."
|
||||
'
|
||||
'gMonTraySep1
|
||||
'
|
||||
Me.gMonTraySep1.Name = "gMonTraySep1"
|
||||
@@ -222,19 +255,24 @@ Partial Class frmMain
|
||||
'
|
||||
'txtLog
|
||||
'
|
||||
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, 177)
|
||||
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)
|
||||
@@ -273,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"
|
||||
@@ -315,7 +353,7 @@ Partial Class frmMain
|
||||
'
|
||||
'gMonSetup
|
||||
'
|
||||
Me.gMonSetup.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonSetupGameManager, Me.gMonSetupAddWizard, Me.gMonSetupCustomVariables, Me.gMonSetupTags})
|
||||
Me.gMonSetup.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonSetupGameManager, Me.gMonSetupAddWizard, Me.gMonSetupTags, Me.gMonSetupProcessManager, Me.gMonSetupCustomVariables})
|
||||
Me.gMonSetup.Name = "gMonSetup"
|
||||
Me.gMonSetup.Size = New System.Drawing.Size(49, 20)
|
||||
Me.gMonSetup.Text = "&Setup"
|
||||
@@ -332,42 +370,42 @@ 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"
|
||||
Me.gMonSetupTags.Size = New System.Drawing.Size(201, 22)
|
||||
Me.gMonSetupTags.Text = "&Tags..."
|
||||
Me.gMonSetupTags.Text = "&Tag Manager..."
|
||||
'
|
||||
'gMonSetupProcessManager
|
||||
'
|
||||
Me.gMonSetupProcessManager.Name = "gMonSetupProcessManager"
|
||||
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.gMonToolsCleanMan, Me.gMonToolsCompact, Me.gMonToolsLog})
|
||||
Me.gMonTools.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonToolsCompact, Me.gMonToolsLog, Me.gMonToolsSessions, Me.gMonToolsSyncGameID})
|
||||
Me.gMonTools.Name = "gMonTools"
|
||||
Me.gMonTools.Size = New System.Drawing.Size(47, 20)
|
||||
Me.gMonTools.Text = "&Tools"
|
||||
'
|
||||
'gMonToolsCleanMan
|
||||
'
|
||||
Me.gMonToolsCleanMan.Name = "gMonToolsCleanMan"
|
||||
Me.gMonToolsCleanMan.Size = New System.Drawing.Size(184, 22)
|
||||
Me.gMonToolsCleanMan.Text = "Clean Local Ma&nifest"
|
||||
'
|
||||
'gMonToolsCompact
|
||||
'
|
||||
Me.gMonToolsCompact.Name = "gMonToolsCompact"
|
||||
Me.gMonToolsCompact.Size = New System.Drawing.Size(184, 22)
|
||||
Me.gMonToolsCompact.Size = New System.Drawing.Size(179, 22)
|
||||
Me.gMonToolsCompact.Text = "&Compact Databases"
|
||||
'
|
||||
'gMonToolsLog
|
||||
'
|
||||
Me.gMonToolsLog.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonLogClear, Me.gMonLogSave})
|
||||
Me.gMonToolsLog.Name = "gMonToolsLog"
|
||||
Me.gMonToolsLog.Size = New System.Drawing.Size(184, 22)
|
||||
Me.gMonToolsLog.Size = New System.Drawing.Size(179, 22)
|
||||
Me.gMonToolsLog.Text = "&Log"
|
||||
'
|
||||
'gMonLogClear
|
||||
@@ -382,6 +420,31 @@ Partial Class frmMain
|
||||
Me.gMonLogSave.Size = New System.Drawing.Size(101, 22)
|
||||
Me.gMonLogSave.Text = "&Save"
|
||||
'
|
||||
'gMonToolsSessions
|
||||
'
|
||||
Me.gMonToolsSessions.Name = "gMonToolsSessions"
|
||||
Me.gMonToolsSessions.Size = New System.Drawing.Size(179, 22)
|
||||
Me.gMonToolsSessions.Text = "&Session Viewer..."
|
||||
'
|
||||
'gMonToolsSyncGameID
|
||||
'
|
||||
Me.gMonToolsSyncGameID.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonToolsSyncGameIDOfficial, Me.gMonToolsSyncGameIDFile})
|
||||
Me.gMonToolsSyncGameID.Name = "gMonToolsSyncGameID"
|
||||
Me.gMonToolsSyncGameID.Size = New System.Drawing.Size(179, 22)
|
||||
Me.gMonToolsSyncGameID.Text = "S&ync Game IDs"
|
||||
'
|
||||
'gMonToolsSyncGameIDOfficial
|
||||
'
|
||||
Me.gMonToolsSyncGameIDOfficial.Name = "gMonToolsSyncGameIDOfficial"
|
||||
Me.gMonToolsSyncGameIDOfficial.Size = New System.Drawing.Size(142, 22)
|
||||
Me.gMonToolsSyncGameIDOfficial.Text = "&Official List..."
|
||||
'
|
||||
'gMonToolsSyncGameIDFile
|
||||
'
|
||||
Me.gMonToolsSyncGameIDFile.Name = "gMonToolsSyncGameIDFile"
|
||||
Me.gMonToolsSyncGameIDFile.Size = New System.Drawing.Size(142, 22)
|
||||
Me.gMonToolsSyncGameIDFile.Text = "&File..."
|
||||
'
|
||||
'gMonHelp
|
||||
'
|
||||
Me.gMonHelp.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonHelpWebSite, Me.gMonHelpManual, Me.gMonHelpCheckforUpdates, Me.gMonHelpAbout})
|
||||
@@ -430,17 +493,11 @@ Partial Class frmMain
|
||||
Me.pbIcon.TabIndex = 9
|
||||
Me.pbIcon.TabStop = False
|
||||
'
|
||||
'btnLogToggle
|
||||
'
|
||||
Me.btnLogToggle.Location = New System.Drawing.Point(437, 155)
|
||||
Me.btnLogToggle.Name = "btnLogToggle"
|
||||
Me.btnLogToggle.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnLogToggle.TabIndex = 7
|
||||
Me.btnLogToggle.Text = "Show &Log"
|
||||
Me.btnLogToggle.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblGameTitle
|
||||
'
|
||||
Me.lblGameTitle.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.lblGameTitle.AutoEllipsis = True
|
||||
Me.lblGameTitle.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.lblGameTitle.Location = New System.Drawing.Point(66, 36)
|
||||
Me.lblGameTitle.Name = "lblGameTitle"
|
||||
@@ -450,6 +507,8 @@ Partial Class frmMain
|
||||
'
|
||||
'lblLastAction
|
||||
'
|
||||
Me.lblLastAction.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.lblLastAction.AutoEllipsis = True
|
||||
Me.lblLastAction.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.lblLastAction.Location = New System.Drawing.Point(12, 165)
|
||||
@@ -480,7 +539,8 @@ Partial Class frmMain
|
||||
'
|
||||
'btnCancelOperation
|
||||
'
|
||||
Me.btnCancelOperation.Location = New System.Drawing.Point(437, 126)
|
||||
Me.btnCancelOperation.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnCancelOperation.Location = New System.Drawing.Point(437, 155)
|
||||
Me.btnCancelOperation.Name = "btnCancelOperation"
|
||||
Me.btnCancelOperation.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnCancelOperation.TabIndex = 6
|
||||
@@ -489,6 +549,8 @@ Partial Class frmMain
|
||||
'
|
||||
'lblStatus1
|
||||
'
|
||||
Me.lblStatus1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.lblStatus1.AutoEllipsis = True
|
||||
Me.lblStatus1.Location = New System.Drawing.Point(66, 58)
|
||||
Me.lblStatus1.Name = "lblStatus1"
|
||||
@@ -497,6 +559,8 @@ Partial Class frmMain
|
||||
'
|
||||
'lblStatus2
|
||||
'
|
||||
Me.lblStatus2.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.lblStatus2.AutoEllipsis = True
|
||||
Me.lblStatus2.Location = New System.Drawing.Point(66, 74)
|
||||
Me.lblStatus2.Name = "lblStatus2"
|
||||
@@ -505,6 +569,8 @@ Partial Class frmMain
|
||||
'
|
||||
'lblStatus3
|
||||
'
|
||||
Me.lblStatus3.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.lblStatus3.AutoEllipsis = True
|
||||
Me.lblStatus3.Location = New System.Drawing.Point(66, 90)
|
||||
Me.lblStatus3.Name = "lblStatus3"
|
||||
@@ -533,17 +599,12 @@ Partial Class frmMain
|
||||
Me.Controls.Add(Me.lblLastActionTitle)
|
||||
Me.Controls.Add(Me.lblLastAction)
|
||||
Me.Controls.Add(Me.lblGameTitle)
|
||||
Me.Controls.Add(Me.btnLogToggle)
|
||||
Me.Controls.Add(Me.pbIcon)
|
||||
Me.Controls.Add(Me.gMonStatusStrip)
|
||||
Me.Controls.Add(Me.gMonMainMenu)
|
||||
Me.Controls.Add(Me.txtLog)
|
||||
Me.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||
Me.KeyPreview = True
|
||||
Me.MainMenuStrip = Me.gMonMainMenu
|
||||
Me.MaximizeBox = False
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmMain"
|
||||
Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide
|
||||
@@ -586,7 +647,6 @@ Partial Class frmMain
|
||||
Friend WithEvents gMonTraySetupGameManager As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents gMonTraySetupCustomVariables As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents pbIcon As System.Windows.Forms.PictureBox
|
||||
Friend WithEvents btnLogToggle As System.Windows.Forms.Button
|
||||
Friend WithEvents lblGameTitle As System.Windows.Forms.Label
|
||||
Friend WithEvents lblLastAction As System.Windows.Forms.Label
|
||||
Friend WithEvents lblLastActionTitle As System.Windows.Forms.Label
|
||||
@@ -611,8 +671,6 @@ Partial Class frmMain
|
||||
Friend WithEvents gMonTrayNotification As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents gMonHelpWebSite As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents pbTime As System.Windows.Forms.PictureBox
|
||||
Friend WithEvents gMonTrayToolsCleanMan As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents gMonToolsCleanMan As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents gMonToolsLog As ToolStripMenuItem
|
||||
Friend WithEvents gMonLogClear As ToolStripMenuItem
|
||||
Friend WithEvents gMonLogSave As ToolStripMenuItem
|
||||
@@ -621,4 +679,14 @@ Partial Class frmMain
|
||||
Friend WithEvents gMonTrayLogSave As ToolStripMenuItem
|
||||
Friend WithEvents gMonStripAdminButton As System.Windows.Forms.ToolStripStatusLabel
|
||||
Friend WithEvents gMonStripStatusButton As System.Windows.Forms.ToolStripStatusLabel
|
||||
Friend WithEvents gMonToolsSessions As ToolStripMenuItem
|
||||
Friend WithEvents gMonTrayToolsSessions As ToolStripMenuItem
|
||||
Friend WithEvents gMonToolsSyncGameID As ToolStripMenuItem
|
||||
Friend WithEvents gMonToolsSyncGameIDOfficial As ToolStripMenuItem
|
||||
Friend WithEvents gMonToolsSyncGameIDFile As ToolStripMenuItem
|
||||
Friend WithEvents gMonTrayToolsSyncGameID As ToolStripMenuItem
|
||||
Friend WithEvents gMonTrayToolsSyncGameIDOfficial As ToolStripMenuItem
|
||||
Friend WithEvents gMonTrayToolsSyncGameIDFile As ToolStripMenuItem
|
||||
Friend WithEvents gMonTraySetupProcessManager As ToolStripMenuItem
|
||||
Friend WithEvents gMonSetupProcessManager As ToolStripMenuItem
|
||||
End Class
|
||||
|
||||
@@ -1,105 +0,0 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class frmManifestViewer
|
||||
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.dgView = New System.Windows.Forms.DataGridView()
|
||||
Me.btnCancel = New System.Windows.Forms.Button()
|
||||
Me.lblError = New System.Windows.Forms.Label()
|
||||
Me.fbBrowser = New System.Windows.Forms.FolderBrowserDialog()
|
||||
Me.cboManifest = New System.Windows.Forms.ComboBox()
|
||||
CType(Me.dgView, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'dgView
|
||||
'
|
||||
Me.dgView.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.dgView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
|
||||
Me.dgView.BackgroundColor = System.Drawing.SystemColors.Window
|
||||
Me.dgView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||
Me.dgView.Location = New System.Drawing.Point(12, 12)
|
||||
Me.dgView.Name = "dgView"
|
||||
Me.dgView.RowHeadersVisible = False
|
||||
Me.dgView.Size = New System.Drawing.Size(960, 338)
|
||||
Me.dgView.TabIndex = 0
|
||||
'
|
||||
'btnCancel
|
||||
'
|
||||
Me.btnCancel.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnCancel.Location = New System.Drawing.Point(897, 356)
|
||||
Me.btnCancel.Name = "btnCancel"
|
||||
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnCancel.TabIndex = 2
|
||||
Me.btnCancel.Text = "C&lose"
|
||||
Me.btnCancel.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblError
|
||||
'
|
||||
Me.lblError.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.lblError.AutoSize = True
|
||||
Me.lblError.Location = New System.Drawing.Point(139, 362)
|
||||
Me.lblError.Name = "lblError"
|
||||
Me.lblError.Size = New System.Drawing.Size(54, 13)
|
||||
Me.lblError.TabIndex = 5
|
||||
Me.lblError.Text = "Info Label"
|
||||
'
|
||||
'fbBrowser
|
||||
'
|
||||
Me.fbBrowser.ShowNewFolderButton = False
|
||||
'
|
||||
'cboManifest
|
||||
'
|
||||
Me.cboManifest.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.cboManifest.FormattingEnabled = True
|
||||
Me.cboManifest.Location = New System.Drawing.Point(12, 359)
|
||||
Me.cboManifest.Name = "cboManifest"
|
||||
Me.cboManifest.Size = New System.Drawing.Size(121, 21)
|
||||
Me.cboManifest.TabIndex = 6
|
||||
'
|
||||
'frmManifestViewer
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(984, 392)
|
||||
Me.Controls.Add(Me.cboManifest)
|
||||
Me.Controls.Add(Me.lblError)
|
||||
Me.Controls.Add(Me.btnCancel)
|
||||
Me.Controls.Add(Me.dgView)
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmManifestViewer"
|
||||
Me.ShowIcon = False
|
||||
Me.ShowInTaskbar = False
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Manifest Viewer"
|
||||
CType(Me.dgView, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents dgView As System.Windows.Forms.DataGridView
|
||||
Friend WithEvents btnCancel As System.Windows.Forms.Button
|
||||
Friend WithEvents lblError As System.Windows.Forms.Label
|
||||
Friend WithEvents fbBrowser As System.Windows.Forms.FolderBrowserDialog
|
||||
Friend WithEvents cboManifest As System.Windows.Forms.ComboBox
|
||||
End Class
|
||||
@@ -1,149 +0,0 @@
|
||||
Public Class frmManifestViewer
|
||||
|
||||
Private bShutdown As Boolean = False
|
||||
Private oLocalManifest As SortedList
|
||||
Private oRemoteManfiest As SortedList
|
||||
Private oRestoreInfo As clsBackup
|
||||
Private oDataTable As DataTable
|
||||
|
||||
Property RestoreInfo As clsBackup
|
||||
Get
|
||||
Return oRestoreInfo
|
||||
End Get
|
||||
Set(value As clsBackup)
|
||||
oRestoreInfo = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property LocalManifestData As SortedList
|
||||
Get
|
||||
Return oLocalManifest
|
||||
End Get
|
||||
Set(value As SortedList)
|
||||
oLocalManifest = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property RemoteManifestData As SortedList
|
||||
Get
|
||||
Return oRemoteManfiest
|
||||
End Get
|
||||
Set(value As SortedList)
|
||||
oRemoteManfiest = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Sub FormatManifest(ByVal iManifest As Integer)
|
||||
Dim oRow As Object()
|
||||
Dim oLoadData As SortedList
|
||||
|
||||
If iManifest = 1 Then
|
||||
oLoadData = LocalManifestData
|
||||
Else
|
||||
oLoadData = RemoteManifestData
|
||||
End If
|
||||
|
||||
oDataTable = New DataTable
|
||||
|
||||
'Setup Columns
|
||||
oDataTable.Columns.Add("Name")
|
||||
oDataTable.Columns.Add("Backup Path")
|
||||
oDataTable.Columns.Add("Restore Path")
|
||||
oDataTable.Columns.Add("Absolute Path")
|
||||
oDataTable.Columns.Add("Date Updated")
|
||||
oDataTable.Columns.Add("Updated By")
|
||||
|
||||
|
||||
'Setup Data Types
|
||||
oDataTable.Columns(0).DataType = GetType(String)
|
||||
oDataTable.Columns(1).DataType = GetType(String)
|
||||
oDataTable.Columns(2).DataType = GetType(String)
|
||||
oDataTable.Columns(3).DataType = GetType(Boolean)
|
||||
oDataTable.Columns(4).DataType = GetType(DateTime)
|
||||
oDataTable.Columns(5).DataType = GetType(String)
|
||||
|
||||
|
||||
|
||||
For Each o As clsBackup In oLoadData.Values
|
||||
oRow = New Object() {o.Name, o.FileName, o.RestorePath, o.AbsolutePath, o.DateUpdated, o.UpdatedBy}
|
||||
oDataTable.Rows.Add(oRow)
|
||||
Next
|
||||
|
||||
'Sort
|
||||
oDataTable.DefaultView.Sort = "Name asc"
|
||||
dgView.DataSource = oDataTable
|
||||
|
||||
'Setup Column Widths
|
||||
dgView.Columns(0).MinimumWidth = 100
|
||||
dgView.Columns(1).MinimumWidth = 175
|
||||
dgView.Columns(2).MinimumWidth = 175
|
||||
dgView.Columns(3).MinimumWidth = 60
|
||||
dgView.Columns(4).MinimumWidth = 125
|
||||
dgView.Columns(5).MinimumWidth = 100
|
||||
|
||||
dgView.Columns(0).FillWeight = 100
|
||||
dgView.Columns(1).FillWeight = 100
|
||||
dgView.Columns(2).FillWeight = 100
|
||||
dgView.Columns(3).FillWeight = 25
|
||||
dgView.Columns(4).FillWeight = 50
|
||||
dgView.Columns(5).FillWeight = 50
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub LoadCombo()
|
||||
Dim oCombo As New List(Of KeyValuePair(Of Integer, String))
|
||||
oCombo.Add(New KeyValuePair(Of Integer, String)(1, "Local Manifest"))
|
||||
oCombo.Add(New KeyValuePair(Of Integer, String)(2, "Remote Manifest"))
|
||||
cboManifest.DataSource = oCombo
|
||||
cboManifest.ValueMember = "key"
|
||||
cboManifest.DisplayMember = "value"
|
||||
End Sub
|
||||
|
||||
Private Sub frmManifestInfo_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
||||
dgView.ReadOnly = True
|
||||
dgView.AllowUserToAddRows = False
|
||||
lblError.Text = String.Empty
|
||||
LoadCombo()
|
||||
FormatManifest(CInt(cboManifest.SelectedValue))
|
||||
End Sub
|
||||
|
||||
Private Sub dgView_CellStateChanged(sender As Object, e As DataGridViewCellStateChangedEventArgs) Handles dgView.CellStateChanged
|
||||
lblError.ForeColor = Color.Black
|
||||
|
||||
Select Case dgView.Columns(e.Cell.ColumnIndex).Index
|
||||
Case 0
|
||||
lblError.Text = "The name of the application."
|
||||
Case 1
|
||||
lblError.Text = "The location of the backup file to restore."
|
||||
Case 2
|
||||
lblError.Text = "When the backup file was updated from this computer."
|
||||
Case 3
|
||||
lblError.Text = "The name of this computer."
|
||||
Case 4
|
||||
lblError.Text = "When the local backup file was last updated."
|
||||
Case 5
|
||||
lblError.Text = "The name of the computer that performed the last backup."
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub frmGameInfo_FormClosing(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosing
|
||||
|
||||
If Not bShutdown Then
|
||||
If MsgBox("Are you sure you want to close?", MsgBoxStyle.YesNo, "ABM") = MsgBoxResult.Yes Then
|
||||
bShutdown = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not bShutdown Then
|
||||
e.Cancel = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub cboManifest_SelectionChangeCommitted(sender As Object, e As EventArgs) Handles cboManifest.SelectionChangeCommitted
|
||||
FormatManifest(CInt(cboManifest.SelectedValue))
|
||||
End Sub
|
||||
End Class
|
||||
@@ -0,0 +1,241 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class frmProcessManager
|
||||
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.grpProcess = New System.Windows.Forms.GroupBox()
|
||||
Me.chkKillProcess = New System.Windows.Forms.CheckBox()
|
||||
Me.txtArguments = New System.Windows.Forms.TextBox()
|
||||
Me.lblArguments = New System.Windows.Forms.Label()
|
||||
Me.btnProcessBrowse = New System.Windows.Forms.Button()
|
||||
Me.txtName = New System.Windows.Forms.TextBox()
|
||||
Me.txtPath = New System.Windows.Forms.TextBox()
|
||||
Me.lblProcess = New System.Windows.Forms.Label()
|
||||
Me.lblName = New System.Windows.Forms.Label()
|
||||
Me.btnClose = New System.Windows.Forms.Button()
|
||||
Me.btnDelete = New System.Windows.Forms.Button()
|
||||
Me.btnAdd = New System.Windows.Forms.Button()
|
||||
Me.lstProcesses = New System.Windows.Forms.ListBox()
|
||||
Me.txtID = New System.Windows.Forms.TextBox()
|
||||
Me.btnCancel = New System.Windows.Forms.Button()
|
||||
Me.btnSave = New System.Windows.Forms.Button()
|
||||
Me.grpProcess.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'grpProcess
|
||||
'
|
||||
Me.grpProcess.Controls.Add(Me.chkKillProcess)
|
||||
Me.grpProcess.Controls.Add(Me.txtArguments)
|
||||
Me.grpProcess.Controls.Add(Me.lblArguments)
|
||||
Me.grpProcess.Controls.Add(Me.btnProcessBrowse)
|
||||
Me.grpProcess.Controls.Add(Me.txtName)
|
||||
Me.grpProcess.Controls.Add(Me.txtPath)
|
||||
Me.grpProcess.Controls.Add(Me.lblProcess)
|
||||
Me.grpProcess.Controls.Add(Me.lblName)
|
||||
Me.grpProcess.Location = New System.Drawing.Point(238, 12)
|
||||
Me.grpProcess.Name = "grpProcess"
|
||||
Me.grpProcess.Size = New System.Drawing.Size(334, 120)
|
||||
Me.grpProcess.TabIndex = 3
|
||||
Me.grpProcess.TabStop = False
|
||||
Me.grpProcess.Text = "Configuration"
|
||||
'
|
||||
'chkKillProcess
|
||||
'
|
||||
Me.chkKillProcess.AutoSize = True
|
||||
Me.chkKillProcess.Location = New System.Drawing.Point(72, 96)
|
||||
Me.chkKillProcess.Name = "chkKillProcess"
|
||||
Me.chkKillProcess.Size = New System.Drawing.Size(181, 17)
|
||||
Me.chkKillProcess.TabIndex = 4
|
||||
Me.chkKillProcess.Text = "Kill process when game is closed"
|
||||
Me.chkKillProcess.UseVisualStyleBackColor = True
|
||||
'
|
||||
'txtArguments
|
||||
'
|
||||
Me.txtArguments.Location = New System.Drawing.Point(72, 70)
|
||||
Me.txtArguments.Name = "txtArguments"
|
||||
Me.txtArguments.Size = New System.Drawing.Size(256, 20)
|
||||
Me.txtArguments.TabIndex = 3
|
||||
'
|
||||
'lblArguments
|
||||
'
|
||||
Me.lblArguments.AutoSize = True
|
||||
Me.lblArguments.Location = New System.Drawing.Point(6, 73)
|
||||
Me.lblArguments.Name = "lblArguments"
|
||||
Me.lblArguments.Size = New System.Drawing.Size(60, 13)
|
||||
Me.lblArguments.TabIndex = 0
|
||||
Me.lblArguments.Text = "Arguments:"
|
||||
'
|
||||
'btnProcessBrowse
|
||||
'
|
||||
Me.btnProcessBrowse.Location = New System.Drawing.Point(298, 45)
|
||||
Me.btnProcessBrowse.Name = "btnProcessBrowse"
|
||||
Me.btnProcessBrowse.Size = New System.Drawing.Size(30, 20)
|
||||
Me.btnProcessBrowse.TabIndex = 2
|
||||
Me.btnProcessBrowse.Text = "..."
|
||||
Me.btnProcessBrowse.UseVisualStyleBackColor = True
|
||||
'
|
||||
'txtName
|
||||
'
|
||||
Me.txtName.Location = New System.Drawing.Point(72, 19)
|
||||
Me.txtName.Name = "txtName"
|
||||
Me.txtName.Size = New System.Drawing.Size(256, 20)
|
||||
Me.txtName.TabIndex = 0
|
||||
'
|
||||
'txtPath
|
||||
'
|
||||
Me.txtPath.Location = New System.Drawing.Point(72, 45)
|
||||
Me.txtPath.Name = "txtPath"
|
||||
Me.txtPath.Size = New System.Drawing.Size(220, 20)
|
||||
Me.txtPath.TabIndex = 1
|
||||
'
|
||||
'lblProcess
|
||||
'
|
||||
Me.lblProcess.AutoSize = True
|
||||
Me.lblProcess.Location = New System.Drawing.Point(6, 48)
|
||||
Me.lblProcess.Name = "lblProcess"
|
||||
Me.lblProcess.Size = New System.Drawing.Size(48, 13)
|
||||
Me.lblProcess.TabIndex = 0
|
||||
Me.lblProcess.Text = "Process:"
|
||||
'
|
||||
'lblName
|
||||
'
|
||||
Me.lblName.AutoSize = True
|
||||
Me.lblName.Location = New System.Drawing.Point(6, 22)
|
||||
Me.lblName.Name = "lblName"
|
||||
Me.lblName.Size = New System.Drawing.Size(38, 13)
|
||||
Me.lblName.TabIndex = 0
|
||||
Me.lblName.Text = "Name:"
|
||||
'
|
||||
'btnClose
|
||||
'
|
||||
Me.btnClose.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnClose.Location = New System.Drawing.Point(497, 226)
|
||||
Me.btnClose.Name = "btnClose"
|
||||
Me.btnClose.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnClose.TabIndex = 6
|
||||
Me.btnClose.Text = "C&lose"
|
||||
Me.btnClose.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnDelete
|
||||
'
|
||||
Me.btnDelete.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnDelete.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.btnDelete.Location = New System.Drawing.Point(48, 226)
|
||||
Me.btnDelete.Name = "btnDelete"
|
||||
Me.btnDelete.Size = New System.Drawing.Size(30, 23)
|
||||
Me.btnDelete.TabIndex = 2
|
||||
Me.btnDelete.Text = "-"
|
||||
Me.btnDelete.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnAdd
|
||||
'
|
||||
Me.btnAdd.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnAdd.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.btnAdd.Location = New System.Drawing.Point(12, 226)
|
||||
Me.btnAdd.Name = "btnAdd"
|
||||
Me.btnAdd.Size = New System.Drawing.Size(30, 23)
|
||||
Me.btnAdd.TabIndex = 1
|
||||
Me.btnAdd.Text = "+"
|
||||
Me.btnAdd.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lstProcesses
|
||||
'
|
||||
Me.lstProcesses.FormattingEnabled = True
|
||||
Me.lstProcesses.Location = New System.Drawing.Point(12, 12)
|
||||
Me.lstProcesses.Name = "lstProcesses"
|
||||
Me.lstProcesses.Size = New System.Drawing.Size(220, 212)
|
||||
Me.lstProcesses.Sorted = True
|
||||
Me.lstProcesses.TabIndex = 0
|
||||
'
|
||||
'txtID
|
||||
'
|
||||
Me.txtID.Enabled = False
|
||||
Me.txtID.Location = New System.Drawing.Point(374, 150)
|
||||
Me.txtID.Name = "txtID"
|
||||
Me.txtID.Size = New System.Drawing.Size(33, 20)
|
||||
Me.txtID.TabIndex = 0
|
||||
Me.txtID.TabStop = False
|
||||
Me.txtID.Visible = False
|
||||
'
|
||||
'btnCancel
|
||||
'
|
||||
Me.btnCancel.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnCancel.Location = New System.Drawing.Point(494, 149)
|
||||
Me.btnCancel.Name = "btnCancel"
|
||||
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnCancel.TabIndex = 5
|
||||
Me.btnCancel.Text = "&Cancel"
|
||||
Me.btnCancel.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnSave
|
||||
'
|
||||
Me.btnSave.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnSave.Location = New System.Drawing.Point(413, 149)
|
||||
Me.btnSave.Name = "btnSave"
|
||||
Me.btnSave.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnSave.TabIndex = 4
|
||||
Me.btnSave.Text = "&Save"
|
||||
Me.btnSave.UseVisualStyleBackColor = True
|
||||
'
|
||||
'frmProcessManager
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(584, 261)
|
||||
Me.Controls.Add(Me.grpProcess)
|
||||
Me.Controls.Add(Me.btnClose)
|
||||
Me.Controls.Add(Me.btnDelete)
|
||||
Me.Controls.Add(Me.btnAdd)
|
||||
Me.Controls.Add(Me.lstProcesses)
|
||||
Me.Controls.Add(Me.txtID)
|
||||
Me.Controls.Add(Me.btnCancel)
|
||||
Me.Controls.Add(Me.btnSave)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||
Me.MaximizeBox = False
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "frmProcessManager"
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Process Manager"
|
||||
Me.grpProcess.ResumeLayout(False)
|
||||
Me.grpProcess.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents grpProcess As GroupBox
|
||||
Friend WithEvents txtArguments As TextBox
|
||||
Friend WithEvents lblArguments As Label
|
||||
Friend WithEvents btnProcessBrowse As Button
|
||||
Friend WithEvents txtName As TextBox
|
||||
Friend WithEvents txtPath As TextBox
|
||||
Friend WithEvents lblProcess As Label
|
||||
Friend WithEvents lblName As Label
|
||||
Friend WithEvents btnClose As Button
|
||||
Friend WithEvents btnDelete As Button
|
||||
Friend WithEvents btnAdd As Button
|
||||
Friend WithEvents lstProcesses As ListBox
|
||||
Friend WithEvents txtID As TextBox
|
||||
Friend WithEvents btnCancel As Button
|
||||
Friend WithEvents btnSave As Button
|
||||
Friend WithEvents chkKillProcess As CheckBox
|
||||
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,372 @@
|
||||
Imports GBM.My.Resources
|
||||
Imports System.IO
|
||||
|
||||
Public Class frmProcessManager
|
||||
Dim hshProcessData As Hashtable
|
||||
Private bIsDirty As Boolean = False
|
||||
Private bIsLoading As Boolean = False
|
||||
Private oCurrentProcess As clsProcess
|
||||
|
||||
Private Property IsDirty As Boolean
|
||||
Get
|
||||
Return bIsDirty
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bIsDirty = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property IsLoading As Boolean
|
||||
Get
|
||||
Return bIsLoading
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bIsLoading = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Enum eModes As Integer
|
||||
View = 1
|
||||
Edit = 2
|
||||
Add = 3
|
||||
Disabled = 4
|
||||
End Enum
|
||||
|
||||
Private eCurrentMode As eModes = eModes.Disabled
|
||||
|
||||
Private Property ProcessData As Hashtable
|
||||
Get
|
||||
Return hshProcessData
|
||||
End Get
|
||||
Set(value As Hashtable)
|
||||
hshProcessData = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Sub ProcessBrowse()
|
||||
Dim sDefaultFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
|
||||
Dim sCurrentPath As String = txtPath.Text
|
||||
Dim sNewPath As String
|
||||
|
||||
If sCurrentPath <> String.Empty Then
|
||||
sCurrentPath = Path.GetDirectoryName(txtPath.Text)
|
||||
If Directory.Exists(sCurrentPath) Then
|
||||
sDefaultFolder = sCurrentPath
|
||||
End If
|
||||
End If
|
||||
|
||||
sNewPath = mgrCommon.OpenFileBrowser("PM_Process", frmProcessManager_ChooseProcess, "exe",
|
||||
frmProcessManager_Executable, sDefaultFolder, True)
|
||||
|
||||
If sNewPath <> String.Empty Then
|
||||
txtPath.Text = sNewPath
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub LoadData()
|
||||
ProcessData = mgrProcess.ReadProcesses
|
||||
lstProcesses.Items.Clear()
|
||||
FormatAndFillList()
|
||||
End Sub
|
||||
|
||||
Private Function HandleDirty() As MsgBoxResult
|
||||
Dim oResult As MsgBoxResult
|
||||
|
||||
oResult = mgrCommon.ShowMessage(App_ConfirmDirty, MsgBoxStyle.YesNoCancel)
|
||||
|
||||
Select Case oResult
|
||||
Case MsgBoxResult.Yes
|
||||
IsDirty = False
|
||||
Case MsgBoxResult.No
|
||||
IsDirty = False
|
||||
Case MsgBoxResult.Cancel
|
||||
'No Change
|
||||
End Select
|
||||
|
||||
Return oResult
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub FormatAndFillList()
|
||||
IsLoading = True
|
||||
|
||||
For Each oProcess As clsProcess In ProcessData.Values
|
||||
lstProcesses.Items.Add(oProcess.Name)
|
||||
Next
|
||||
|
||||
IsLoading = False
|
||||
End Sub
|
||||
|
||||
Private Sub FillData()
|
||||
IsLoading = True
|
||||
|
||||
oCurrentProcess = DirectCast(ProcessData(lstProcesses.SelectedItems(0).ToString), clsProcess)
|
||||
|
||||
txtID.Text = oCurrentProcess.ID
|
||||
txtName.Text = oCurrentProcess.Name
|
||||
txtPath.Text = oCurrentProcess.Path
|
||||
txtArguments.Text = oCurrentProcess.Args
|
||||
chkKillProcess.Checked = oCurrentProcess.Kill
|
||||
|
||||
IsLoading = False
|
||||
End Sub
|
||||
|
||||
Private Sub DirtyCheck_ValueChanged(sender As Object, e As EventArgs)
|
||||
If Not IsLoading Then
|
||||
IsDirty = True
|
||||
If Not eCurrentMode = eModes.Add Then EditProcess()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub AssignDirtyHandlers(ByVal oCtls As GroupBox.ControlCollection)
|
||||
For Each ctl As Control In oCtls
|
||||
If TypeOf ctl Is TextBox Then
|
||||
AddHandler DirectCast(ctl, TextBox).TextChanged, AddressOf DirtyCheck_ValueChanged
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub WipeControls(ByVal oCtls As GroupBox.ControlCollection)
|
||||
For Each ctl As Control In oCtls
|
||||
If TypeOf ctl Is TextBox Then
|
||||
DirectCast(ctl, TextBox).Text = String.Empty
|
||||
End If
|
||||
Next
|
||||
txtID.Text = String.Empty
|
||||
End Sub
|
||||
|
||||
Private Sub ModeChange()
|
||||
IsLoading = True
|
||||
|
||||
Select Case eCurrentMode
|
||||
Case eModes.Add
|
||||
grpProcess.Enabled = True
|
||||
WipeControls(grpProcess.Controls)
|
||||
btnSave.Enabled = True
|
||||
btnCancel.Enabled = True
|
||||
btnAdd.Enabled = False
|
||||
btnDelete.Enabled = False
|
||||
lstProcesses.Enabled = False
|
||||
chkKillProcess.Checked = True
|
||||
Case eModes.Edit
|
||||
lstProcesses.Enabled = False
|
||||
grpProcess.Enabled = True
|
||||
btnSave.Enabled = True
|
||||
btnCancel.Enabled = True
|
||||
btnAdd.Enabled = False
|
||||
btnDelete.Enabled = False
|
||||
Case eModes.View
|
||||
lstProcesses.Enabled = True
|
||||
grpProcess.Enabled = True
|
||||
btnSave.Enabled = False
|
||||
btnCancel.Enabled = False
|
||||
btnAdd.Enabled = True
|
||||
btnDelete.Enabled = True
|
||||
Case eModes.Disabled
|
||||
lstProcesses.Enabled = True
|
||||
WipeControls(grpProcess.Controls)
|
||||
grpProcess.Enabled = False
|
||||
btnSave.Enabled = False
|
||||
btnCancel.Enabled = False
|
||||
btnAdd.Enabled = True
|
||||
btnDelete.Enabled = True
|
||||
End Select
|
||||
|
||||
IsLoading = False
|
||||
End Sub
|
||||
|
||||
Private Sub EditProcess()
|
||||
eCurrentMode = eModes.Edit
|
||||
ModeChange()
|
||||
End Sub
|
||||
|
||||
Private Sub AddProcess()
|
||||
eCurrentMode = eModes.Add
|
||||
ModeChange()
|
||||
txtName.Focus()
|
||||
End Sub
|
||||
|
||||
Private Sub CancelEdit()
|
||||
If bIsDirty Then
|
||||
Select Case HandleDirty()
|
||||
Case MsgBoxResult.Yes
|
||||
SaveProcess()
|
||||
Case MsgBoxResult.No
|
||||
If lstProcesses.SelectedItems.Count > 0 Then
|
||||
eCurrentMode = eModes.View
|
||||
ModeChange()
|
||||
FillData()
|
||||
lstProcesses.Focus()
|
||||
Else
|
||||
eCurrentMode = eModes.Disabled
|
||||
ModeChange()
|
||||
End If
|
||||
Case MsgBoxResult.Cancel
|
||||
'Do Nothing
|
||||
End Select
|
||||
Else
|
||||
If lstProcesses.SelectedItems.Count > 0 Then
|
||||
eCurrentMode = eModes.View
|
||||
ModeChange()
|
||||
FillData()
|
||||
lstProcesses.Focus()
|
||||
Else
|
||||
eCurrentMode = eModes.Disabled
|
||||
ModeChange()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub SaveProcess()
|
||||
Dim oProcess As New clsProcess
|
||||
Dim bSuccess As Boolean = False
|
||||
|
||||
If txtID.Text <> String.Empty Then
|
||||
oProcess.ID = txtID.Text
|
||||
End If
|
||||
oProcess.Name = txtName.Text
|
||||
oProcess.Path = txtPath.Text
|
||||
oProcess.Args = txtArguments.Text
|
||||
oProcess.Kill = chkKillProcess.Checked
|
||||
|
||||
Select Case eCurrentMode
|
||||
Case eModes.Add
|
||||
If CoreValidatation(oProcess) Then
|
||||
bSuccess = True
|
||||
mgrProcess.DoProcessAdd(oProcess)
|
||||
eCurrentMode = eModes.View
|
||||
End If
|
||||
Case eModes.Edit
|
||||
If CoreValidatation(oProcess) Then
|
||||
bSuccess = True
|
||||
mgrProcess.DoProcessUpdate(oProcess)
|
||||
eCurrentMode = eModes.View
|
||||
End If
|
||||
End Select
|
||||
|
||||
If bSuccess Then
|
||||
IsDirty = False
|
||||
LoadData()
|
||||
ModeChange()
|
||||
If eCurrentMode = eModes.View Then lstProcesses.SelectedIndex = lstProcesses.Items.IndexOf(oProcess.Name)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub DeleteProcess()
|
||||
Dim oProcess As clsProcess
|
||||
|
||||
If lstProcesses.SelectedItems.Count > 0 Then
|
||||
oProcess = DirectCast(ProcessData(lstProcesses.SelectedItems(0).ToString), clsProcess)
|
||||
|
||||
If mgrCommon.ShowMessage(frmProcessManager_ConfirmDelete, oProcess.Name, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
mgrProcess.DoProcessDelete(oProcess.ID)
|
||||
LoadData()
|
||||
eCurrentMode = eModes.Disabled
|
||||
ModeChange()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub SwitchProcess()
|
||||
If lstProcesses.SelectedItems.Count > 0 Then
|
||||
eCurrentMode = eModes.View
|
||||
FillData()
|
||||
ModeChange()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function CoreValidatation(ByVal oProcess As clsProcess) As Boolean
|
||||
If txtName.Text.Trim = String.Empty Then
|
||||
mgrCommon.ShowMessage(frmProcessManager_ErrorValidName, MsgBoxStyle.Exclamation)
|
||||
txtName.Focus()
|
||||
Return False
|
||||
End If
|
||||
|
||||
If txtPath.Text.Trim = String.Empty Then
|
||||
mgrCommon.ShowMessage(frmProcessManager_ErrorValidPath, MsgBoxStyle.Exclamation)
|
||||
txtPath.Focus()
|
||||
Return False
|
||||
Else
|
||||
If Not File.Exists(txtPath.Text.Trim) Then
|
||||
mgrCommon.ShowMessage(frmProcessManager_ErrorPathNotFound, MsgBoxStyle.Exclamation)
|
||||
txtPath.Focus()
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
|
||||
If mgrProcess.DoCheckDuplicate(oProcess.Name, oProcess.ID) Then
|
||||
mgrCommon.ShowMessage(frmProcessManager_ErrorDupe, MsgBoxStyle.Exclamation)
|
||||
txtName.Focus()
|
||||
Return False
|
||||
End If
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub SetForm()
|
||||
'Set Form Name
|
||||
Me.Text = frmProcessManager_FormName
|
||||
Me.Icon = GBM_Icon
|
||||
|
||||
'Set Form Text
|
||||
btnCancel.Text = frmProcessManager_btnCancel
|
||||
btnSave.Text = frmProcessManager_btnSave
|
||||
grpProcess.Text = frmProcessManager_grpProcess
|
||||
btnProcessBrowse.Text = frmProcessManager_btnProcessBrowse
|
||||
lblProcess.Text = frmProcessManager_lblPath
|
||||
lblName.Text = frmProcessManager_lblName
|
||||
btnClose.Text = frmProcessManager_btnClose
|
||||
btnDelete.Text = frmProcessManager_btnDelete
|
||||
btnAdd.Text = frmProcessManager_btnAdd
|
||||
chkKillProcess.Text = frmProcessManager_chkKillProcess
|
||||
End Sub
|
||||
|
||||
Private Sub frmProcessManager_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
SetForm()
|
||||
LoadData()
|
||||
ModeChange()
|
||||
AssignDirtyHandlers(grpProcess.Controls)
|
||||
End Sub
|
||||
|
||||
Private Sub lstProcesses_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lstProcesses.SelectedIndexChanged
|
||||
SwitchProcess()
|
||||
End Sub
|
||||
|
||||
Private Sub btnAdd_Click(sender As Object, e As EventArgs) Handles btnAdd.Click
|
||||
AddProcess()
|
||||
End Sub
|
||||
|
||||
Private Sub btnDelete_Click(sender As Object, e As EventArgs) Handles btnDelete.Click
|
||||
DeleteProcess()
|
||||
End Sub
|
||||
|
||||
Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click
|
||||
SaveProcess()
|
||||
End Sub
|
||||
|
||||
Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click
|
||||
CancelEdit()
|
||||
End Sub
|
||||
|
||||
Private Sub btnClose_Click(sender As Object, e As EventArgs) Handles btnClose.Click
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub btnPathBrowse_Click(sender As Object, e As EventArgs) Handles btnProcessBrowse.Click
|
||||
ProcessBrowse()
|
||||
End Sub
|
||||
|
||||
Private Sub frmProcessManager_FormClosing(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosing
|
||||
If bIsDirty Then
|
||||
Select Case HandleDirty()
|
||||
Case MsgBoxResult.Yes
|
||||
SaveProcess()
|
||||
Case MsgBoxResult.No
|
||||
'Do Nothing
|
||||
Case MsgBoxResult.Cancel
|
||||
e.Cancel = True
|
||||
End Select
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
@@ -0,0 +1,181 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class frmSessionExport
|
||||
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.btnExport = New System.Windows.Forms.Button()
|
||||
Me.btnCancel = New System.Windows.Forms.Button()
|
||||
Me.grpExportType = New System.Windows.Forms.GroupBox()
|
||||
Me.optXML = 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()
|
||||
Me.grpDateType.SuspendLayout()
|
||||
Me.grpOptions.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'btnExport
|
||||
'
|
||||
Me.btnExport.Location = New System.Drawing.Point(116, 226)
|
||||
Me.btnExport.Name = "btnExport"
|
||||
Me.btnExport.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnExport.TabIndex = 3
|
||||
Me.btnExport.Text = "&Export"
|
||||
Me.btnExport.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnCancel
|
||||
'
|
||||
Me.btnCancel.Location = New System.Drawing.Point(197, 226)
|
||||
Me.btnCancel.Name = "btnCancel"
|
||||
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnCancel.TabIndex = 4
|
||||
Me.btnCancel.Text = "&Cancel"
|
||||
Me.btnCancel.UseVisualStyleBackColor = True
|
||||
'
|
||||
'grpExportType
|
||||
'
|
||||
Me.grpExportType.Controls.Add(Me.optXML)
|
||||
Me.grpExportType.Controls.Add(Me.optCSV)
|
||||
Me.grpExportType.Location = New System.Drawing.Point(12, 12)
|
||||
Me.grpExportType.Name = "grpExportType"
|
||||
Me.grpExportType.Size = New System.Drawing.Size(260, 70)
|
||||
Me.grpExportType.TabIndex = 0
|
||||
Me.grpExportType.TabStop = False
|
||||
Me.grpExportType.Text = "Export Type"
|
||||
'
|
||||
'optXML
|
||||
'
|
||||
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
|
||||
'
|
||||
Me.optCSV.AutoSize = True
|
||||
Me.optCSV.Location = New System.Drawing.Point(6, 19)
|
||||
Me.optCSV.Name = "optCSV"
|
||||
Me.optCSV.Size = New System.Drawing.Size(46, 17)
|
||||
Me.optCSV.TabIndex = 0
|
||||
Me.optCSV.TabStop = True
|
||||
Me.optCSV.Text = "CSV"
|
||||
Me.optCSV.UseVisualStyleBackColor = True
|
||||
'
|
||||
'grpDateType
|
||||
'
|
||||
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
|
||||
'
|
||||
Me.optUnix.AutoEllipsis = True
|
||||
Me.optUnix.Location = New System.Drawing.Point(6, 42)
|
||||
Me.optUnix.Name = "optUnix"
|
||||
Me.optUnix.Size = New System.Drawing.Size(248, 17)
|
||||
Me.optUnix.TabIndex = 1
|
||||
Me.optUnix.TabStop = True
|
||||
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)
|
||||
Me.grpOptions.Location = New System.Drawing.Point(12, 164)
|
||||
Me.grpOptions.Name = "grpOptions"
|
||||
Me.grpOptions.Size = New System.Drawing.Size(260, 45)
|
||||
Me.grpOptions.TabIndex = 2
|
||||
Me.grpOptions.TabStop = False
|
||||
Me.grpOptions.Text = "Other Options"
|
||||
'
|
||||
'chkCSVHeaders
|
||||
'
|
||||
Me.chkCSVHeaders.AutoSize = True
|
||||
Me.chkCSVHeaders.Location = New System.Drawing.Point(6, 19)
|
||||
Me.chkCSVHeaders.Name = "chkCSVHeaders"
|
||||
Me.chkCSVHeaders.Size = New System.Drawing.Size(167, 17)
|
||||
Me.chkCSVHeaders.TabIndex = 0
|
||||
Me.chkCSVHeaders.Text = "Export Column Headers (CSV)"
|
||||
Me.chkCSVHeaders.UseVisualStyleBackColor = True
|
||||
'
|
||||
'frmSessionExport
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(284, 261)
|
||||
Me.Controls.Add(Me.grpOptions)
|
||||
Me.Controls.Add(Me.grpDateType)
|
||||
Me.Controls.Add(Me.grpExportType)
|
||||
Me.Controls.Add(Me.btnCancel)
|
||||
Me.Controls.Add(Me.btnExport)
|
||||
Me.MaximizeBox = False
|
||||
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"
|
||||
Me.grpExportType.ResumeLayout(False)
|
||||
Me.grpExportType.PerformLayout()
|
||||
Me.grpDateType.ResumeLayout(False)
|
||||
Me.grpOptions.ResumeLayout(False)
|
||||
Me.grpOptions.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents btnExport As Button
|
||||
Friend WithEvents btnCancel As Button
|
||||
Friend WithEvents grpExportType As GroupBox
|
||||
Friend WithEvents optXML As RadioButton
|
||||
Friend WithEvents optCSV As RadioButton
|
||||
Friend WithEvents grpDateType As GroupBox
|
||||
Friend WithEvents optUnix As RadioButton
|
||||
Friend WithEvents optCurrentLocale As RadioButton
|
||||
Friend WithEvents grpOptions As GroupBox
|
||||
Friend WithEvents chkCSVHeaders As CheckBox
|
||||
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,91 @@
|
||||
Imports GBM.My.Resources
|
||||
|
||||
Public Class frmSessionExport
|
||||
|
||||
Private bXML As Boolean = True
|
||||
Private bUnix As Boolean = False
|
||||
Private bCSVHeaders As Boolean = True
|
||||
|
||||
Public ReadOnly Property XML As Boolean
|
||||
Get
|
||||
Return bXML
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Unix As Boolean
|
||||
Get
|
||||
Return bUnix
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Headers As Boolean
|
||||
Get
|
||||
Return bCSVHeaders
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Sub SetOptions()
|
||||
If optXML.Checked Then
|
||||
bXML = True
|
||||
Else
|
||||
bXML = False
|
||||
End If
|
||||
|
||||
If optUnix.Checked Then
|
||||
bUnix = True
|
||||
Else
|
||||
bUnix = False
|
||||
End If
|
||||
|
||||
If chkCSVHeaders.Checked Then
|
||||
bCSVHeaders = True
|
||||
Else
|
||||
bCSVHeaders = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub SetForm()
|
||||
Me.Text = frmSessionExport_FormName
|
||||
Me.Icon = GBM_Icon
|
||||
|
||||
grpExportType.Text = frmSessionExport_grpExportType
|
||||
grpDateType.Text = frmSessionExport_grpDateType
|
||||
grpOptions.Text = frmSessionExport_grpOptions
|
||||
|
||||
optCSV.Text = frmSessionExport_optCSV
|
||||
optXML.Text = frmSessionExport_optXML
|
||||
optCurrentLocale.Text = frmSessionExport_optCurrentLocale & " - " & Now
|
||||
optUnix.Text = frmSessionExport_optUnix & " - " & mgrCommon.DateToUnix(Now)
|
||||
|
||||
chkCSVHeaders.Text = frmSessionExport_chkCSVHeaders
|
||||
|
||||
btnExport.Text = frmSessionExport_btnExport
|
||||
btnCancel.Text = frmSessionExport_btnCancel
|
||||
|
||||
optCSV.Checked = True
|
||||
optCurrentLocale.Checked = True
|
||||
End Sub
|
||||
|
||||
Private Sub frmSessionExport_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
SetForm()
|
||||
End Sub
|
||||
|
||||
Private Sub btnExport_Click(sender As Object, e As EventArgs) Handles btnExport.Click
|
||||
SetOptions()
|
||||
Me.DialogResult = DialogResult.OK
|
||||
End Sub
|
||||
|
||||
Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click
|
||||
Me.DialogResult = DialogResult.Cancel
|
||||
End Sub
|
||||
|
||||
Private Sub optCSV_CheckedChanged(sender As Object, e As EventArgs) Handles optCSV.CheckedChanged
|
||||
If Not optCSV.Checked Then
|
||||
chkCSVHeaders.Checked = False
|
||||
chkCSVHeaders.Enabled = False
|
||||
Else
|
||||
chkCSVHeaders.Checked = True
|
||||
chkCSVHeaders.Enabled = True
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
@@ -0,0 +1,199 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class frmSessions
|
||||
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.lblFilter = New System.Windows.Forms.Label()
|
||||
Me.txtFilter = New System.Windows.Forms.TextBox()
|
||||
Me.dgSessions = New System.Windows.Forms.DataGridView()
|
||||
Me.dtpStart = New System.Windows.Forms.DateTimePicker()
|
||||
Me.dtpEnd = New System.Windows.Forms.DateTimePicker()
|
||||
Me.lblTo = New System.Windows.Forms.Label()
|
||||
Me.btnReset = New System.Windows.Forms.Button()
|
||||
Me.btnDelete = New System.Windows.Forms.Button()
|
||||
Me.btnClose = New System.Windows.Forms.Button()
|
||||
Me.lblDateRange = New System.Windows.Forms.Label()
|
||||
Me.lblTotalHours = New System.Windows.Forms.Label()
|
||||
Me.btnExport = New System.Windows.Forms.Button()
|
||||
CType(Me.dgSessions, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'lblFilter
|
||||
'
|
||||
Me.lblFilter.AutoSize = True
|
||||
Me.lblFilter.Location = New System.Drawing.Point(12, 9)
|
||||
Me.lblFilter.Name = "lblFilter"
|
||||
Me.lblFilter.Size = New System.Drawing.Size(63, 13)
|
||||
Me.lblFilter.TabIndex = 1
|
||||
Me.lblFilter.Text = "Game Filter:"
|
||||
'
|
||||
'txtFilter
|
||||
'
|
||||
Me.txtFilter.Location = New System.Drawing.Point(80, 6)
|
||||
Me.txtFilter.Name = "txtFilter"
|
||||
Me.txtFilter.Size = New System.Drawing.Size(190, 20)
|
||||
Me.txtFilter.TabIndex = 1
|
||||
'
|
||||
'dgSessions
|
||||
'
|
||||
Me.dgSessions.AllowUserToAddRows = False
|
||||
Me.dgSessions.AllowUserToDeleteRows = False
|
||||
Me.dgSessions.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.dgSessions.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
|
||||
Me.dgSessions.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnF2
|
||||
Me.dgSessions.Location = New System.Drawing.Point(12, 32)
|
||||
Me.dgSessions.Name = "dgSessions"
|
||||
Me.dgSessions.ReadOnly = True
|
||||
Me.dgSessions.RowHeadersVisible = False
|
||||
Me.dgSessions.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect
|
||||
Me.dgSessions.Size = New System.Drawing.Size(760, 488)
|
||||
Me.dgSessions.TabIndex = 6
|
||||
'
|
||||
'dtpStart
|
||||
'
|
||||
Me.dtpStart.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.dtpStart.Location = New System.Drawing.Point(384, 6)
|
||||
Me.dtpStart.Name = "dtpStart"
|
||||
Me.dtpStart.Size = New System.Drawing.Size(175, 20)
|
||||
Me.dtpStart.TabIndex = 3
|
||||
'
|
||||
'dtpEnd
|
||||
'
|
||||
Me.dtpEnd.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.dtpEnd.Location = New System.Drawing.Point(597, 6)
|
||||
Me.dtpEnd.Name = "dtpEnd"
|
||||
Me.dtpEnd.Size = New System.Drawing.Size(175, 20)
|
||||
Me.dtpEnd.TabIndex = 5
|
||||
'
|
||||
'lblTo
|
||||
'
|
||||
Me.lblTo.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.lblTo.Location = New System.Drawing.Point(565, 9)
|
||||
Me.lblTo.Name = "lblTo"
|
||||
Me.lblTo.Size = New System.Drawing.Size(26, 17)
|
||||
Me.lblTo.TabIndex = 4
|
||||
Me.lblTo.Text = "to"
|
||||
Me.lblTo.TextAlign = System.Drawing.ContentAlignment.TopCenter
|
||||
'
|
||||
'btnReset
|
||||
'
|
||||
Me.btnReset.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnReset.Location = New System.Drawing.Point(591, 526)
|
||||
Me.btnReset.Name = "btnReset"
|
||||
Me.btnReset.Size = New System.Drawing.Size(100, 23)
|
||||
Me.btnReset.TabIndex = 10
|
||||
Me.btnReset.Text = "&Reset Filters"
|
||||
Me.btnReset.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnDelete
|
||||
'
|
||||
Me.btnDelete.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnDelete.Location = New System.Drawing.Point(12, 526)
|
||||
Me.btnDelete.Name = "btnDelete"
|
||||
Me.btnDelete.Size = New System.Drawing.Size(100, 23)
|
||||
Me.btnDelete.TabIndex = 7
|
||||
Me.btnDelete.Text = "&Delete Session"
|
||||
Me.btnDelete.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnClose
|
||||
'
|
||||
Me.btnClose.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnClose.Location = New System.Drawing.Point(697, 526)
|
||||
Me.btnClose.Name = "btnClose"
|
||||
Me.btnClose.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnClose.TabIndex = 11
|
||||
Me.btnClose.Text = "&Close"
|
||||
Me.btnClose.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblDateRange
|
||||
'
|
||||
Me.lblDateRange.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.lblDateRange.AutoSize = True
|
||||
Me.lblDateRange.Location = New System.Drawing.Point(310, 9)
|
||||
Me.lblDateRange.Name = "lblDateRange"
|
||||
Me.lblDateRange.Size = New System.Drawing.Size(68, 13)
|
||||
Me.lblDateRange.TabIndex = 2
|
||||
Me.lblDateRange.Text = "Date Range:"
|
||||
'
|
||||
'lblTotalHours
|
||||
'
|
||||
Me.lblTotalHours.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.lblTotalHours.Location = New System.Drawing.Point(118, 531)
|
||||
Me.lblTotalHours.Name = "lblTotalHours"
|
||||
Me.lblTotalHours.Size = New System.Drawing.Size(361, 13)
|
||||
Me.lblTotalHours.TabIndex = 8
|
||||
Me.lblTotalHours.Text = "Total Hours:"
|
||||
Me.lblTotalHours.TextAlign = System.Drawing.ContentAlignment.TopCenter
|
||||
'
|
||||
'btnExport
|
||||
'
|
||||
Me.btnExport.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.btnExport.Location = New System.Drawing.Point(485, 526)
|
||||
Me.btnExport.Name = "btnExport"
|
||||
Me.btnExport.Size = New System.Drawing.Size(100, 23)
|
||||
Me.btnExport.TabIndex = 9
|
||||
Me.btnExport.Text = "&Export Grid"
|
||||
Me.btnExport.UseVisualStyleBackColor = True
|
||||
'
|
||||
'frmSessions
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(784, 561)
|
||||
Me.Controls.Add(Me.btnExport)
|
||||
Me.Controls.Add(Me.lblTotalHours)
|
||||
Me.Controls.Add(Me.lblDateRange)
|
||||
Me.Controls.Add(Me.btnClose)
|
||||
Me.Controls.Add(Me.btnDelete)
|
||||
Me.Controls.Add(Me.btnReset)
|
||||
Me.Controls.Add(Me.lblTo)
|
||||
Me.Controls.Add(Me.dtpEnd)
|
||||
Me.Controls.Add(Me.dtpStart)
|
||||
Me.Controls.Add(Me.dgSessions)
|
||||
Me.Controls.Add(Me.lblFilter)
|
||||
Me.Controls.Add(Me.txtFilter)
|
||||
Me.Name = "frmSessions"
|
||||
Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Session Viewer"
|
||||
CType(Me.dgSessions, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents lblFilter As Label
|
||||
Friend WithEvents txtFilter As TextBox
|
||||
Friend WithEvents dgSessions As DataGridView
|
||||
Friend WithEvents dtpStart As DateTimePicker
|
||||
Friend WithEvents dtpEnd As DateTimePicker
|
||||
Friend WithEvents lblTo As Label
|
||||
Friend WithEvents btnReset As Button
|
||||
Friend WithEvents btnDelete As Button
|
||||
Friend WithEvents btnClose As Button
|
||||
Friend WithEvents lblDateRange As Label
|
||||
Friend WithEvents lblTotalHours As Label
|
||||
Friend WithEvents btnExport 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,319 @@
|
||||
Imports GBM.My.Resources
|
||||
Imports System.Globalization
|
||||
Imports System.ComponentModel
|
||||
|
||||
Public Class frmSessions
|
||||
|
||||
Private bInitFinished As Boolean = False
|
||||
Private WithEvents tmFilterTimer As Timer
|
||||
Private bStartSortAsc As Boolean = True
|
||||
Private iStartDataCol As Integer
|
||||
Private iStartDisplayCol As Integer
|
||||
Private bEndSortAsc As Boolean = True
|
||||
Private iEndDataCol As Integer
|
||||
Private iEndDisplayCol As Integer
|
||||
Private bHoursSortAsc As Boolean = True
|
||||
Private iHoursCol As Integer
|
||||
|
||||
Private Sub FormatGrid()
|
||||
'Build Columns
|
||||
dgSessions.Columns.Add("MonitorID", frmSessions_ColumnMonitorID)
|
||||
dgSessions.Columns.Add("Name", frmSessions_ColumnGameName)
|
||||
dgSessions.Columns.Add("StartUnix", frmSessions_ColumnStart)
|
||||
dgSessions.Columns.Add("Start", frmSessions_ColumnStart)
|
||||
dgSessions.Columns.Add("EndUnix", frmSessions_ColumnEnd)
|
||||
dgSessions.Columns.Add("End", frmSessions_ColumnEnd)
|
||||
dgSessions.Columns.Add("Hours", frmSessions_ColumnHours)
|
||||
|
||||
'Get Column Indexes
|
||||
iStartDataCol = dgSessions.Columns.IndexOf(dgSessions.Columns("StartUnix"))
|
||||
iStartDisplayCol = dgSessions.Columns.IndexOf(dgSessions.Columns("Start"))
|
||||
iEndDataCol = dgSessions.Columns.IndexOf(dgSessions.Columns("EndUnix"))
|
||||
iEndDisplayCol = dgSessions.Columns.IndexOf(dgSessions.Columns("End"))
|
||||
iHoursCol = dgSessions.Columns.IndexOf(dgSessions.Columns("Hours"))
|
||||
|
||||
'Set Sorting
|
||||
dgSessions.Columns("Start").SortMode = DataGridViewColumnSortMode.Programmatic
|
||||
dgSessions.Columns("End").SortMode = DataGridViewColumnSortMode.Programmatic
|
||||
dgSessions.Columns("Hours").SortMode = DataGridViewColumnSortMode.Programmatic
|
||||
|
||||
'Hide Columns
|
||||
dgSessions.Columns("MonitorID").Visible = False
|
||||
dgSessions.Columns("StartUnix").Visible = False
|
||||
dgSessions.Columns("EndUnix").Visible = False
|
||||
End Sub
|
||||
|
||||
Private Sub LoadData()
|
||||
Dim oData As DataSet
|
||||
Dim sFilter As String
|
||||
Dim dStart As DateTime
|
||||
Dim dEnd As DateTime
|
||||
Dim dHours As Double
|
||||
Dim dTotalHours As Double
|
||||
|
||||
If txtFilter.Text = String.Empty Then
|
||||
oData = mgrSessions.GetSessionRange(dtpStart.Value, dtpEnd.Value)
|
||||
Else
|
||||
sFilter = txtFilter.Text.ToLower
|
||||
oData = mgrSessions.GetSessionsByGameNameAndRange(sFilter, dtpStart.Value, dtpEnd.Value)
|
||||
End If
|
||||
|
||||
dgSessions.Rows.Clear()
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
dStart = mgrCommon.UnixToDate(dr("Start"))
|
||||
dEnd = mgrCommon.UnixToDate(dr("End"))
|
||||
dHours = Math.Round(dEnd.Subtract(dStart).TotalHours, 2)
|
||||
dTotalHours += dHours
|
||||
dgSessions.Rows.Add(New Object() {dr("MonitorID"), dr("Name"), dr("Start"), dStart, dr("End"), dEnd, dHours})
|
||||
Next
|
||||
|
||||
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
|
||||
lblDateRange.Text = frmSessions_lblDateRange
|
||||
btnDelete.Text = frmSessions_btnDelete
|
||||
btnReset.Text = frmSessions_btnReset
|
||||
btnClose.Text = frmSessions_btnClose
|
||||
|
||||
'Init Filter Timer
|
||||
tmFilterTimer = New Timer()
|
||||
tmFilterTimer.Interval = 1000
|
||||
tmFilterTimer.Enabled = False
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ResetFilterFields()
|
||||
Dim dtMinDate As DateTime = mgrSessions.GetMinimumDateTime
|
||||
Dim dtMaxDate As DateTime = mgrSessions.GetMaximumDateTime
|
||||
Dim dtRecent As DateTime = dtMaxDate.Subtract(TimeSpan.FromDays(7))
|
||||
Dim sDateTimeFormat = CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern & " " & CultureInfo.CurrentCulture.DateTimeFormat.LongTimePattern
|
||||
|
||||
If dtRecent < dtMinDate Then
|
||||
dtRecent = dtMinDate
|
||||
End If
|
||||
|
||||
bInitFinished = False
|
||||
|
||||
'Init Date Fields
|
||||
dtpStart.Format = DateTimePickerFormat.Custom
|
||||
dtpEnd.Format = DateTimePickerFormat.Custom
|
||||
dtpStart.CustomFormat = sDateTimeFormat
|
||||
dtpEnd.CustomFormat = sDateTimeFormat
|
||||
|
||||
'Setting max or min dates breaks the control in Mono
|
||||
If Not mgrCommon.IsUnix Then
|
||||
dtpStart.MinDate = dtMinDate
|
||||
dtpStart.MaxDate = dtMaxDate
|
||||
dtpEnd.MinDate = dtMinDate
|
||||
dtpEnd.MaxDate = dtMaxDate
|
||||
End If
|
||||
|
||||
dtpStart.Value = dtRecent
|
||||
dtpEnd.Value = dtMaxDate
|
||||
|
||||
'Init Text Filter
|
||||
txtFilter.Text = String.Empty
|
||||
|
||||
bInitFinished = True
|
||||
End Sub
|
||||
|
||||
Private Sub Reset()
|
||||
ClearManualSortGlyphs()
|
||||
ResetFilterFields()
|
||||
LoadData()
|
||||
End Sub
|
||||
|
||||
Private Sub DeleteSession()
|
||||
Dim oSession As clsSession
|
||||
Dim oSessions As New List(Of clsSession)
|
||||
|
||||
For Each dgvRow As DataGridViewRow In dgSessions.SelectedRows
|
||||
oSession = New clsSession
|
||||
oSession.MonitorID = dgvRow.Cells(0).Value
|
||||
oSession.SessionStart = CInt(dgvRow.Cells(iStartDataCol).Value)
|
||||
oSession.SessionEnd = CInt(dgvRow.Cells(iEndDataCol).Value)
|
||||
oSessions.Add(oSession)
|
||||
Next
|
||||
|
||||
If oSessions.Count > 0 Then
|
||||
mgrSessions.DeleteSession(oSessions)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ClearManualSortGlyphs()
|
||||
dgSessions.Columns(iStartDisplayCol).HeaderCell.SortGlyphDirection = SortOrder.None
|
||||
dgSessions.Columns(iEndDisplayCol).HeaderCell.SortGlyphDirection = SortOrder.None
|
||||
dgSessions.Columns(iHoursCol).HeaderCell.SortGlyphDirection = SortOrder.None
|
||||
End Sub
|
||||
|
||||
Private Sub DoSort(ByRef bToggle As Boolean, ByVal iCol As Integer, ByVal iType As RowCompareHelper.iDataType)
|
||||
bToggle = Not bToggle
|
||||
If bToggle Then
|
||||
dgSessions.Sort(New RowCompareHelper(SortOrder.Ascending, iCol, iType))
|
||||
dgSessions.Columns(iCol).HeaderCell.SortGlyphDirection = SortOrder.Ascending
|
||||
Else
|
||||
dgSessions.Sort(New RowCompareHelper(SortOrder.Descending, iCol, iType))
|
||||
dgSessions.Columns(iCol).HeaderCell.SortGlyphDirection = SortOrder.Descending
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub HandleSort(ByVal iCol As Integer)
|
||||
ClearManualSortGlyphs()
|
||||
|
||||
Select Case iCol
|
||||
Case iStartDisplayCol
|
||||
DoSort(bStartSortAsc, iStartDisplayCol, RowCompareHelper.iDataType.DateTimeType)
|
||||
Case iEndDisplayCol
|
||||
DoSort(bEndSortAsc, iEndDisplayCol, RowCompareHelper.iDataType.DateTimeType)
|
||||
Case iHoursCol
|
||||
DoSort(bHoursSortAsc, iHoursCol, RowCompareHelper.iDataType.DecimalType)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub ExportGrid()
|
||||
Dim frm As New frmSessionExport
|
||||
Dim sLocation As String
|
||||
|
||||
frm.ShowDialog()
|
||||
|
||||
If frm.DialogResult = DialogResult.OK Then
|
||||
|
||||
If frm.XML Then
|
||||
sLocation = mgrCommon.SaveFileBrowser("Session_Export", frmSessions_ChooseExportLocation, "xml", frmSessions_XML, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), frmSessions_DefaultExportFileName)
|
||||
Else
|
||||
sLocation = mgrCommon.SaveFileBrowser("Session_Export", frmSessions_ChooseExportLocation, "csv", frmSessions_CSV, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), frmSessions_DefaultExportFileName)
|
||||
End If
|
||||
|
||||
If sLocation <> String.Empty Then
|
||||
If frm.XML Then
|
||||
mgrSessions.ExportAsXML(sLocation, frm.Unix, dgSessions)
|
||||
Else
|
||||
mgrSessions.ExportAsCSV(sLocation, frm.Unix, frm.Headers, dgSessions)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub frmSession_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
SetForm()
|
||||
ResetFilterFields()
|
||||
FormatGrid()
|
||||
LoadData()
|
||||
End Sub
|
||||
|
||||
Private Sub tmFilterTimer_Tick(sender As Object, ByVal e As EventArgs) Handles tmFilterTimer.Tick
|
||||
LoadData()
|
||||
tmFilterTimer.Stop()
|
||||
tmFilterTimer.Enabled = False
|
||||
End Sub
|
||||
|
||||
Private Sub txtFilter_TextChanged(sender As Object, e As EventArgs) Handles txtFilter.TextChanged
|
||||
If Not tmFilterTimer.Enabled Then
|
||||
tmFilterTimer.Enabled = True
|
||||
tmFilterTimer.Start()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub dtpStart_ValueChanged(sender As Object, e As EventArgs) Handles dtpStart.ValueChanged
|
||||
If bInitFinished Then LoadData()
|
||||
End Sub
|
||||
|
||||
Private Sub dtpEnd_ValueChanged(sender As Object, e As EventArgs) Handles dtpEnd.ValueChanged
|
||||
If bInitFinished Then LoadData()
|
||||
End Sub
|
||||
|
||||
Private Sub btnReset_Click(sender As Object, e As EventArgs) Handles btnReset.Click
|
||||
Reset()
|
||||
End Sub
|
||||
|
||||
Private Sub btnClose_Click(sender As Object, e As EventArgs) Handles btnClose.Click
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub btnDelete_Click(sender As Object, e As EventArgs) Handles btnDelete.Click
|
||||
If dgSessions.SelectedRows.Count > 0 Then
|
||||
If mgrCommon.ShowMessage(frmSessions_ConfirmDelete, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
DeleteSession()
|
||||
LoadData()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub btnExport_Click(sender As Object, e As EventArgs) Handles btnExport.Click
|
||||
ExportGrid()
|
||||
End Sub
|
||||
|
||||
Private Sub dgSessions_ColumnHeaderMouseClick(sender As Object, e As DataGridViewCellMouseEventArgs) Handles dgSessions.ColumnHeaderMouseClick
|
||||
HandleSort(e.ColumnIndex)
|
||||
End Sub
|
||||
|
||||
'The Mono version of the DataGridView control automatically treats all data as a string for sorting purposes.
|
||||
'This class manually handles column sorting by data type.
|
||||
Private Class RowCompareHelper
|
||||
Implements System.Collections.IComparer
|
||||
|
||||
'We need to manually define data types as the column ValueType doesn't work in Mono either.
|
||||
Public Enum iDataType As Integer
|
||||
StringType = 1
|
||||
DateTimeType = 2
|
||||
IntType = 3
|
||||
DecimalType = 4
|
||||
End Enum
|
||||
|
||||
Private iSortOrderModifier As Integer = 1
|
||||
Private iSortCol As Integer = 0
|
||||
Private iDataTypeCol As iDataType = iDataType.StringType
|
||||
|
||||
Public Sub New(ByVal sortOrder As SortOrder, ByVal iCol As Integer, ByVal iType As iDataType)
|
||||
iSortCol = iCol
|
||||
iDataTypeCol = iType
|
||||
|
||||
If sortOrder = SortOrder.Descending Then
|
||||
iSortOrderModifier = -1
|
||||
ElseIf sortOrder = SortOrder.Ascending Then
|
||||
iSortOrderModifier = 1
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Function Compare(ByVal x As Object, ByVal y As Object) As Integer Implements System.Collections.IComparer.Compare
|
||||
Dim iCompareResult As Integer
|
||||
Dim dgRow1 As DataGridViewRow = CType(x, DataGridViewRow)
|
||||
Dim dgRow2 As DataGridViewRow = CType(y, DataGridViewRow)
|
||||
|
||||
Select Case iDataTypeCol
|
||||
Case iDataType.DecimalType
|
||||
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
|
||||
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
|
||||
iCompareResult = Date.Compare(CDate(dgRow1.Cells(iSortCol).Value), CDate(dgRow2.Cells(iSortCol).Value))
|
||||
End Select
|
||||
|
||||
Return iCompareResult * iSortOrderModifier
|
||||
End Function
|
||||
End Class
|
||||
|
||||
End Class
|
||||
@@ -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,31 +20,20 @@ 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.chkMonitorOnStartup = New System.Windows.Forms.CheckBox()
|
||||
Me.chkBackupConfirm = New System.Windows.Forms.CheckBox()
|
||||
Me.grpStartup = New System.Windows.Forms.GroupBox()
|
||||
Me.chkStartWindows = New System.Windows.Forms.CheckBox()
|
||||
Me.chkStartToTray = New System.Windows.Forms.CheckBox()
|
||||
Me.chkAutoSaveLog = New System.Windows.Forms.CheckBox()
|
||||
Me.btnOptionalFields = New System.Windows.Forms.Button()
|
||||
Me.chkTimeTracking = New System.Windows.Forms.CheckBox()
|
||||
Me.chkSync = New System.Windows.Forms.CheckBox()
|
||||
Me.chkShowDetectionTips = New System.Windows.Forms.CheckBox()
|
||||
Me.grpFolderOptions = New System.Windows.Forms.GroupBox()
|
||||
Me.chkUseGameID = New System.Windows.Forms.CheckBox()
|
||||
Me.btnBackupFolder = New System.Windows.Forms.Button()
|
||||
Me.lblBackupFolder = New System.Windows.Forms.Label()
|
||||
Me.txtBackupFolder = New System.Windows.Forms.TextBox()
|
||||
Me.chkCreateFolder = New System.Windows.Forms.CheckBox()
|
||||
Me.btnSave = New System.Windows.Forms.Button()
|
||||
Me.btnCancel = New System.Windows.Forms.Button()
|
||||
Me.lblMinutes = New System.Windows.Forms.Label()
|
||||
Me.nudSupressBackupThreshold = New System.Windows.Forms.NumericUpDown()
|
||||
Me.chkSupressBackup = New System.Windows.Forms.CheckBox()
|
||||
Me.chkCheckSum = New System.Windows.Forms.CheckBox()
|
||||
Me.chkRestoreOnLaunch = New System.Windows.Forms.CheckBox()
|
||||
Me.chkOverwriteWarning = New System.Windows.Forms.CheckBox()
|
||||
Me.grp7zGeneral = New System.Windows.Forms.GroupBox()
|
||||
Me.cboCompression = New System.Windows.Forms.ComboBox()
|
||||
Me.lblCompression = New System.Windows.Forms.Label()
|
||||
@@ -57,93 +46,82 @@ Partial Class frmSettings
|
||||
Me.lbl7zProduct = New System.Windows.Forms.Label()
|
||||
Me.btnDefaults = New System.Windows.Forms.Button()
|
||||
Me.pnlBackup = New System.Windows.Forms.Panel()
|
||||
Me.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()
|
||||
Me.chkAutoRestore = New System.Windows.Forms.CheckBox()
|
||||
Me.chkRestoreNotify = New System.Windows.Forms.CheckBox()
|
||||
Me.chkAutoMark = New System.Windows.Forms.CheckBox()
|
||||
Me.pnl7z = New System.Windows.Forms.Panel()
|
||||
Me.grp7zAdvanced = New System.Windows.Forms.GroupBox()
|
||||
Me.grp7zInformation = New System.Windows.Forms.GroupBox()
|
||||
Me.pnlGeneral = New System.Windows.Forms.Panel()
|
||||
Me.grpGameMonitoringOptions = New System.Windows.Forms.GroupBox()
|
||||
Me.chkSuppressBackup = New System.Windows.Forms.CheckBox()
|
||||
Me.lblMinutes = New System.Windows.Forms.Label()
|
||||
Me.nudSuppressBackupThreshold = New System.Windows.Forms.NumericUpDown()
|
||||
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.grpStartup.SuspendLayout()
|
||||
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.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()
|
||||
CType(Me.nudSupressBackupThreshold, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.grp7zGeneral.SuspendLayout()
|
||||
Me.pnlBackup.SuspendLayout()
|
||||
Me.grpBackupConfirmations.SuspendLayout()
|
||||
Me.grpBackupHandling.SuspendLayout()
|
||||
Me.pnl7z.SuspendLayout()
|
||||
Me.grp7zAdvanced.SuspendLayout()
|
||||
Me.grp7zInformation.SuspendLayout()
|
||||
Me.pnlGeneral.SuspendLayout()
|
||||
Me.grpGameMonitoringOptions.SuspendLayout()
|
||||
CType(Me.nudSuppressBackupThreshold, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.grpLogOptions.SuspendLayout()
|
||||
Me.grpGameData.SuspendLayout()
|
||||
Me.pnlStartup.SuspendLayout()
|
||||
Me.grpStartup.SuspendLayout()
|
||||
Me.pnlInterface.SuspendLayout()
|
||||
Me.grpInterfaceOptions.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'chkMonitorOnStartup
|
||||
'
|
||||
Me.chkMonitorOnStartup.AutoSize = True
|
||||
Me.chkMonitorOnStartup.Location = New System.Drawing.Point(6, 65)
|
||||
Me.chkMonitorOnStartup.Name = "chkMonitorOnStartup"
|
||||
Me.chkMonitorOnStartup.Size = New System.Drawing.Size(146, 17)
|
||||
Me.chkMonitorOnStartup.TabIndex = 2
|
||||
Me.chkMonitorOnStartup.Text = "Start monitoring at launch"
|
||||
Me.chkMonitorOnStartup.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkBackupConfirm
|
||||
'
|
||||
Me.chkBackupConfirm.AutoSize = True
|
||||
Me.chkBackupConfirm.Location = New System.Drawing.Point(6, 88)
|
||||
Me.chkBackupConfirm.Name = "chkBackupConfirm"
|
||||
Me.chkBackupConfirm.Size = New System.Drawing.Size(160, 17)
|
||||
Me.chkBackupConfirm.TabIndex = 1
|
||||
Me.chkBackupConfirm.Text = "Disable backup confirmation"
|
||||
Me.chkBackupConfirm.UseVisualStyleBackColor = True
|
||||
'
|
||||
'grpStartup
|
||||
'
|
||||
Me.grpStartup.Controls.Add(Me.chkStartWindows)
|
||||
Me.grpStartup.Controls.Add(Me.chkStartToTray)
|
||||
Me.grpStartup.Controls.Add(Me.chkMonitorOnStartup)
|
||||
Me.grpStartup.Location = New System.Drawing.Point(6, 12)
|
||||
Me.grpStartup.Name = "grpStartup"
|
||||
Me.grpStartup.Size = New System.Drawing.Size(354, 90)
|
||||
Me.grpStartup.TabIndex = 0
|
||||
Me.grpStartup.TabStop = False
|
||||
Me.grpStartup.Text = "Startup"
|
||||
'
|
||||
'chkStartWindows
|
||||
'
|
||||
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
|
||||
'
|
||||
'chkStartToTray
|
||||
'
|
||||
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
|
||||
'
|
||||
'chkAutoSaveLog
|
||||
'
|
||||
Me.chkAutoSaveLog.AutoSize = True
|
||||
Me.chkAutoSaveLog.Location = New System.Drawing.Point(6, 204)
|
||||
Me.chkAutoSaveLog.Location = New System.Drawing.Point(6, 42)
|
||||
Me.chkAutoSaveLog.Name = "chkAutoSaveLog"
|
||||
Me.chkAutoSaveLog.Size = New System.Drawing.Size(231, 17)
|
||||
Me.chkAutoSaveLog.TabIndex = 7
|
||||
Me.chkAutoSaveLog.TabIndex = 1
|
||||
Me.chkAutoSaveLog.Text = "Autosave log when max length is exceeded"
|
||||
Me.chkAutoSaveLog.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnOptionalFields
|
||||
'
|
||||
Me.btnOptionalFields.Location = New System.Drawing.Point(110, 38)
|
||||
Me.btnOptionalFields.Location = New System.Drawing.Point(6, 88)
|
||||
Me.btnOptionalFields.Name = "btnOptionalFields"
|
||||
Me.btnOptionalFields.Size = New System.Drawing.Size(134, 23)
|
||||
Me.btnOptionalFields.TabIndex = 6
|
||||
Me.btnOptionalFields.Text = "Choose &Optional Fields..."
|
||||
Me.btnOptionalFields.Size = New System.Drawing.Size(216, 23)
|
||||
Me.btnOptionalFields.TabIndex = 3
|
||||
Me.btnOptionalFields.Text = "Choose &Optional Sync Fields..."
|
||||
Me.btnOptionalFields.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkTimeTracking
|
||||
@@ -152,49 +130,50 @@ Partial Class frmSettings
|
||||
Me.chkTimeTracking.Location = New System.Drawing.Point(6, 19)
|
||||
Me.chkTimeTracking.Name = "chkTimeTracking"
|
||||
Me.chkTimeTracking.Size = New System.Drawing.Size(122, 17)
|
||||
Me.chkTimeTracking.TabIndex = 4
|
||||
Me.chkTimeTracking.TabIndex = 0
|
||||
Me.chkTimeTracking.Text = "Enable time tracking"
|
||||
Me.chkTimeTracking.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkSync
|
||||
'
|
||||
Me.chkSync.AutoSize = True
|
||||
Me.chkSync.Location = New System.Drawing.Point(6, 42)
|
||||
Me.chkSync.Name = "chkSync"
|
||||
Me.chkSync.Size = New System.Drawing.Size(98, 17)
|
||||
Me.chkSync.TabIndex = 5
|
||||
Me.chkSync.Text = "Enable syncing"
|
||||
Me.chkSync.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkShowDetectionTips
|
||||
'
|
||||
Me.chkShowDetectionTips.AutoSize = True
|
||||
Me.chkShowDetectionTips.Location = New System.Drawing.Point(6, 181)
|
||||
Me.chkShowDetectionTips.Location = New System.Drawing.Point(6, 41)
|
||||
Me.chkShowDetectionTips.Name = "chkShowDetectionTips"
|
||||
Me.chkShowDetectionTips.Size = New System.Drawing.Size(159, 17)
|
||||
Me.chkShowDetectionTips.TabIndex = 3
|
||||
Me.chkShowDetectionTips.TabIndex = 4
|
||||
Me.chkShowDetectionTips.Text = "Show detection notifications"
|
||||
Me.chkShowDetectionTips.UseVisualStyleBackColor = True
|
||||
'
|
||||
'grpFolderOptions
|
||||
'
|
||||
Me.grpFolderOptions.Controls.Add(Me.chkUseGameID)
|
||||
Me.grpFolderOptions.Controls.Add(Me.btnBackupFolder)
|
||||
Me.grpFolderOptions.Controls.Add(Me.lblBackupFolder)
|
||||
Me.grpFolderOptions.Controls.Add(Me.txtBackupFolder)
|
||||
Me.grpFolderOptions.Controls.Add(Me.chkCreateFolder)
|
||||
Me.grpFolderOptions.Location = New System.Drawing.Point(6, 12)
|
||||
Me.grpFolderOptions.Name = "grpFolderOptions"
|
||||
Me.grpFolderOptions.Size = New System.Drawing.Size(354, 70)
|
||||
Me.grpFolderOptions.TabIndex = 1
|
||||
Me.grpFolderOptions.Size = New System.Drawing.Size(354, 90)
|
||||
Me.grpFolderOptions.TabIndex = 0
|
||||
Me.grpFolderOptions.TabStop = False
|
||||
Me.grpFolderOptions.Text = "Folders"
|
||||
Me.grpFolderOptions.Text = "Files and Folders"
|
||||
'
|
||||
'chkUseGameID
|
||||
'
|
||||
Me.chkUseGameID.AutoSize = True
|
||||
Me.chkUseGameID.Location = New System.Drawing.Point(9, 65)
|
||||
Me.chkUseGameID.Name = "chkUseGameID"
|
||||
Me.chkUseGameID.Size = New System.Drawing.Size(205, 17)
|
||||
Me.chkUseGameID.TabIndex = 3
|
||||
Me.chkUseGameID.Text = "Use Game ID for folder and file names"
|
||||
Me.chkUseGameID.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnBackupFolder
|
||||
'
|
||||
Me.btnBackupFolder.Location = New System.Drawing.Point(313, 17)
|
||||
Me.btnBackupFolder.Name = "btnBackupFolder"
|
||||
Me.btnBackupFolder.Size = New System.Drawing.Size(27, 20)
|
||||
Me.btnBackupFolder.TabIndex = 2
|
||||
Me.btnBackupFolder.TabIndex = 1
|
||||
Me.btnBackupFolder.Text = "..."
|
||||
Me.btnBackupFolder.UseVisualStyleBackColor = True
|
||||
'
|
||||
@@ -212,7 +191,7 @@ Partial Class frmSettings
|
||||
Me.txtBackupFolder.Location = New System.Drawing.Point(91, 17)
|
||||
Me.txtBackupFolder.Name = "txtBackupFolder"
|
||||
Me.txtBackupFolder.Size = New System.Drawing.Size(216, 20)
|
||||
Me.txtBackupFolder.TabIndex = 1
|
||||
Me.txtBackupFolder.TabIndex = 0
|
||||
'
|
||||
'chkCreateFolder
|
||||
'
|
||||
@@ -220,7 +199,7 @@ Partial Class frmSettings
|
||||
Me.chkCreateFolder.Location = New System.Drawing.Point(9, 43)
|
||||
Me.chkCreateFolder.Name = "chkCreateFolder"
|
||||
Me.chkCreateFolder.Size = New System.Drawing.Size(186, 17)
|
||||
Me.chkCreateFolder.TabIndex = 3
|
||||
Me.chkCreateFolder.TabIndex = 2
|
||||
Me.chkCreateFolder.Text = "Create a sub-folder for each game"
|
||||
Me.chkCreateFolder.UseVisualStyleBackColor = True
|
||||
'
|
||||
@@ -230,7 +209,7 @@ Partial Class frmSettings
|
||||
Me.btnSave.Location = New System.Drawing.Point(384, 321)
|
||||
Me.btnSave.Name = "btnSave"
|
||||
Me.btnSave.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnSave.TabIndex = 5
|
||||
Me.btnSave.TabIndex = 7
|
||||
Me.btnSave.Text = "&Save"
|
||||
Me.btnSave.UseVisualStyleBackColor = True
|
||||
'
|
||||
@@ -240,67 +219,10 @@ Partial Class frmSettings
|
||||
Me.btnCancel.Location = New System.Drawing.Point(465, 321)
|
||||
Me.btnCancel.Name = "btnCancel"
|
||||
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnCancel.TabIndex = 6
|
||||
Me.btnCancel.TabIndex = 8
|
||||
Me.btnCancel.Text = "&Cancel"
|
||||
Me.btnCancel.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblMinutes
|
||||
'
|
||||
Me.lblMinutes.AutoSize = True
|
||||
Me.lblMinutes.Location = New System.Drawing.Point(286, 181)
|
||||
Me.lblMinutes.Name = "lblMinutes"
|
||||
Me.lblMinutes.Size = New System.Drawing.Size(43, 13)
|
||||
Me.lblMinutes.TabIndex = 7
|
||||
Me.lblMinutes.Text = "minutes"
|
||||
'
|
||||
'nudSupressBackupThreshold
|
||||
'
|
||||
Me.nudSupressBackupThreshold.Location = New System.Drawing.Point(229, 179)
|
||||
Me.nudSupressBackupThreshold.Maximum = New Decimal(New Integer() {999, 0, 0, 0})
|
||||
Me.nudSupressBackupThreshold.Name = "nudSupressBackupThreshold"
|
||||
Me.nudSupressBackupThreshold.Size = New System.Drawing.Size(51, 20)
|
||||
Me.nudSupressBackupThreshold.TabIndex = 6
|
||||
'
|
||||
'chkSupressBackup
|
||||
'
|
||||
Me.chkSupressBackup.AutoSize = True
|
||||
Me.chkSupressBackup.Location = New System.Drawing.Point(6, 180)
|
||||
Me.chkSupressBackup.Name = "chkSupressBackup"
|
||||
Me.chkSupressBackup.Size = New System.Drawing.Size(217, 17)
|
||||
Me.chkSupressBackup.TabIndex = 5
|
||||
Me.chkSupressBackup.Text = "Backup only when session time exceeds"
|
||||
Me.chkSupressBackup.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkCheckSum
|
||||
'
|
||||
Me.chkCheckSum.AutoSize = True
|
||||
Me.chkCheckSum.Location = New System.Drawing.Point(6, 134)
|
||||
Me.chkCheckSum.Name = "chkCheckSum"
|
||||
Me.chkCheckSum.Size = New System.Drawing.Size(195, 17)
|
||||
Me.chkCheckSum.TabIndex = 3
|
||||
Me.chkCheckSum.Text = "Verify backup files with a checksum"
|
||||
Me.chkCheckSum.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkRestoreOnLaunch
|
||||
'
|
||||
Me.chkRestoreOnLaunch.AutoSize = True
|
||||
Me.chkRestoreOnLaunch.Location = New System.Drawing.Point(6, 157)
|
||||
Me.chkRestoreOnLaunch.Name = "chkRestoreOnLaunch"
|
||||
Me.chkRestoreOnLaunch.Size = New System.Drawing.Size(257, 17)
|
||||
Me.chkRestoreOnLaunch.TabIndex = 4
|
||||
Me.chkRestoreOnLaunch.Text = "Notify when there are new backup files to restore"
|
||||
Me.chkRestoreOnLaunch.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkOverwriteWarning
|
||||
'
|
||||
Me.chkOverwriteWarning.AutoSize = True
|
||||
Me.chkOverwriteWarning.Location = New System.Drawing.Point(6, 111)
|
||||
Me.chkOverwriteWarning.Name = "chkOverwriteWarning"
|
||||
Me.chkOverwriteWarning.Size = New System.Drawing.Size(139, 17)
|
||||
Me.chkOverwriteWarning.TabIndex = 2
|
||||
Me.chkOverwriteWarning.Text = "Show overwrite warning"
|
||||
Me.chkOverwriteWarning.UseVisualStyleBackColor = True
|
||||
'
|
||||
'grp7zGeneral
|
||||
'
|
||||
Me.grp7zGeneral.Controls.Add(Me.cboCompression)
|
||||
@@ -319,7 +241,7 @@ Partial Class frmSettings
|
||||
Me.cboCompression.Location = New System.Drawing.Point(110, 17)
|
||||
Me.cboCompression.Name = "cboCompression"
|
||||
Me.cboCompression.Size = New System.Drawing.Size(238, 21)
|
||||
Me.cboCompression.TabIndex = 1
|
||||
Me.cboCompression.TabIndex = 0
|
||||
'
|
||||
'lblCompression
|
||||
'
|
||||
@@ -335,7 +257,7 @@ Partial Class frmSettings
|
||||
Me.btn7zLocation.Location = New System.Drawing.Point(313, 41)
|
||||
Me.btn7zLocation.Name = "btn7zLocation"
|
||||
Me.btn7zLocation.Size = New System.Drawing.Size(27, 20)
|
||||
Me.btn7zLocation.TabIndex = 5
|
||||
Me.btn7zLocation.TabIndex = 2
|
||||
Me.btn7zLocation.Text = "..."
|
||||
Me.btn7zLocation.UseVisualStyleBackColor = True
|
||||
'
|
||||
@@ -344,7 +266,7 @@ Partial Class frmSettings
|
||||
Me.txt7zLocation.Location = New System.Drawing.Point(110, 41)
|
||||
Me.txt7zLocation.Name = "txt7zLocation"
|
||||
Me.txt7zLocation.Size = New System.Drawing.Size(197, 20)
|
||||
Me.txt7zLocation.TabIndex = 4
|
||||
Me.txt7zLocation.TabIndex = 1
|
||||
'
|
||||
'lblLocation
|
||||
'
|
||||
@@ -360,7 +282,7 @@ Partial Class frmSettings
|
||||
Me.txt7zArguments.Location = New System.Drawing.Point(110, 15)
|
||||
Me.txt7zArguments.Name = "txt7zArguments"
|
||||
Me.txt7zArguments.Size = New System.Drawing.Size(238, 20)
|
||||
Me.txt7zArguments.TabIndex = 3
|
||||
Me.txt7zArguments.TabIndex = 0
|
||||
'
|
||||
'lblArguments
|
||||
'
|
||||
@@ -394,24 +316,107 @@ Partial Class frmSettings
|
||||
Me.btnDefaults.Location = New System.Drawing.Point(12, 321)
|
||||
Me.btnDefaults.Name = "btnDefaults"
|
||||
Me.btnDefaults.Size = New System.Drawing.Size(110, 23)
|
||||
Me.btnDefaults.TabIndex = 4
|
||||
Me.btnDefaults.TabIndex = 5
|
||||
Me.btnDefaults.Text = "Set &Defaults"
|
||||
Me.btnDefaults.UseVisualStyleBackColor = True
|
||||
'
|
||||
'pnlBackup
|
||||
'
|
||||
Me.pnlBackup.Controls.Add(Me.lblMinutes)
|
||||
Me.pnlBackup.Controls.Add(Me.nudSupressBackupThreshold)
|
||||
Me.pnlBackup.Controls.Add(Me.grpBackupConfirmations)
|
||||
Me.pnlBackup.Controls.Add(Me.grpBackupHandling)
|
||||
Me.pnlBackup.Controls.Add(Me.grpFolderOptions)
|
||||
Me.pnlBackup.Controls.Add(Me.chkSupressBackup)
|
||||
Me.pnlBackup.Controls.Add(Me.chkBackupConfirm)
|
||||
Me.pnlBackup.Controls.Add(Me.chkCheckSum)
|
||||
Me.pnlBackup.Controls.Add(Me.chkOverwriteWarning)
|
||||
Me.pnlBackup.Controls.Add(Me.chkRestoreOnLaunch)
|
||||
Me.pnlBackup.Location = New System.Drawing.Point(180, 0)
|
||||
Me.pnlBackup.Name = "pnlBackup"
|
||||
Me.pnlBackup.Size = New System.Drawing.Size(367, 314)
|
||||
Me.pnlBackup.TabIndex = 3
|
||||
Me.pnlBackup.TabIndex = 2
|
||||
'
|
||||
'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, 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
|
||||
Me.chkBackupConfirm.Location = New System.Drawing.Point(9, 18)
|
||||
Me.chkBackupConfirm.Name = "chkBackupConfirm"
|
||||
Me.chkBackupConfirm.Size = New System.Drawing.Size(160, 17)
|
||||
Me.chkBackupConfirm.TabIndex = 0
|
||||
Me.chkBackupConfirm.Text = "Disable backup confirmation"
|
||||
Me.chkBackupConfirm.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkOverwriteWarning
|
||||
'
|
||||
Me.chkOverwriteWarning.AutoSize = True
|
||||
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 = 2
|
||||
Me.chkOverwriteWarning.Text = "Show overwrite warning"
|
||||
Me.chkOverwriteWarning.UseVisualStyleBackColor = True
|
||||
'
|
||||
'grpBackupHandling
|
||||
'
|
||||
Me.grpBackupHandling.Controls.Add(Me.chkAutoRestore)
|
||||
Me.grpBackupHandling.Controls.Add(Me.chkRestoreNotify)
|
||||
Me.grpBackupHandling.Controls.Add(Me.chkAutoMark)
|
||||
Me.grpBackupHandling.Location = New System.Drawing.Point(6, 107)
|
||||
Me.grpBackupHandling.Margin = New System.Windows.Forms.Padding(2)
|
||||
Me.grpBackupHandling.Name = "grpBackupHandling"
|
||||
Me.grpBackupHandling.Padding = New System.Windows.Forms.Padding(2)
|
||||
Me.grpBackupHandling.Size = New System.Drawing.Size(354, 87)
|
||||
Me.grpBackupHandling.TabIndex = 1
|
||||
Me.grpBackupHandling.TabStop = False
|
||||
Me.grpBackupHandling.Text = "Backup Handling"
|
||||
'
|
||||
'chkAutoRestore
|
||||
'
|
||||
Me.chkAutoRestore.AutoSize = True
|
||||
Me.chkAutoRestore.Location = New System.Drawing.Point(8, 41)
|
||||
Me.chkAutoRestore.Margin = New System.Windows.Forms.Padding(2)
|
||||
Me.chkAutoRestore.Name = "chkAutoRestore"
|
||||
Me.chkAutoRestore.Size = New System.Drawing.Size(190, 17)
|
||||
Me.chkAutoRestore.TabIndex = 1
|
||||
Me.chkAutoRestore.Text = "Automatically restore new backups"
|
||||
Me.chkAutoRestore.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkRestoreNotify
|
||||
'
|
||||
Me.chkRestoreNotify.AutoSize = True
|
||||
Me.chkRestoreNotify.Location = New System.Drawing.Point(8, 19)
|
||||
Me.chkRestoreNotify.Margin = New System.Windows.Forms.Padding(2)
|
||||
Me.chkRestoreNotify.Name = "chkRestoreNotify"
|
||||
Me.chkRestoreNotify.Size = New System.Drawing.Size(216, 17)
|
||||
Me.chkRestoreNotify.TabIndex = 0
|
||||
Me.chkRestoreNotify.Text = "Display notifications about new backups"
|
||||
Me.chkRestoreNotify.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkAutoMark
|
||||
'
|
||||
Me.chkAutoMark.AutoSize = True
|
||||
Me.chkAutoMark.Location = New System.Drawing.Point(8, 63)
|
||||
Me.chkAutoMark.Name = "chkAutoMark"
|
||||
Me.chkAutoMark.Size = New System.Drawing.Size(321, 17)
|
||||
Me.chkAutoMark.TabIndex = 2
|
||||
Me.chkAutoMark.Text = "Automatically mark new backups as restored when appropriate"
|
||||
Me.chkAutoMark.UseVisualStyleBackColor = True
|
||||
'
|
||||
'pnl7z
|
||||
'
|
||||
@@ -421,7 +426,7 @@ Partial Class frmSettings
|
||||
Me.pnl7z.Location = New System.Drawing.Point(180, 0)
|
||||
Me.pnl7z.Name = "pnl7z"
|
||||
Me.pnl7z.Size = New System.Drawing.Size(367, 314)
|
||||
Me.pnl7z.TabIndex = 2
|
||||
Me.pnl7z.TabIndex = 4
|
||||
'
|
||||
'grp7zAdvanced
|
||||
'
|
||||
@@ -433,7 +438,7 @@ Partial Class frmSettings
|
||||
Me.grp7zAdvanced.Location = New System.Drawing.Point(6, 68)
|
||||
Me.grp7zAdvanced.Name = "grp7zAdvanced"
|
||||
Me.grp7zAdvanced.Size = New System.Drawing.Size(354, 73)
|
||||
Me.grp7zAdvanced.TabIndex = 2
|
||||
Me.grp7zAdvanced.TabIndex = 1
|
||||
Me.grp7zAdvanced.TabStop = False
|
||||
Me.grp7zAdvanced.Text = "Advanced"
|
||||
'
|
||||
@@ -444,32 +449,113 @@ Partial Class frmSettings
|
||||
Me.grp7zInformation.Location = New System.Drawing.Point(6, 146)
|
||||
Me.grp7zInformation.Name = "grp7zInformation"
|
||||
Me.grp7zInformation.Size = New System.Drawing.Size(354, 63)
|
||||
Me.grp7zInformation.TabIndex = 1
|
||||
Me.grp7zInformation.TabIndex = 2
|
||||
Me.grp7zInformation.TabStop = False
|
||||
Me.grp7zInformation.Text = "Utility Information"
|
||||
'
|
||||
'pnlGeneral
|
||||
'
|
||||
Me.pnlGeneral.Controls.Add(Me.chkAutoSaveLog)
|
||||
Me.pnlGeneral.Controls.Add(Me.grpGameMonitoringOptions)
|
||||
Me.pnlGeneral.Controls.Add(Me.grpLogOptions)
|
||||
Me.pnlGeneral.Controls.Add(Me.grpGameData)
|
||||
Me.pnlGeneral.Controls.Add(Me.chkShowDetectionTips)
|
||||
Me.pnlGeneral.Controls.Add(Me.grpStartup)
|
||||
Me.pnlGeneral.Location = New System.Drawing.Point(180, 0)
|
||||
Me.pnlGeneral.Name = "pnlGeneral"
|
||||
Me.pnlGeneral.Size = New System.Drawing.Size(367, 314)
|
||||
Me.pnlGeneral.TabIndex = 1
|
||||
'
|
||||
'grpGameMonitoringOptions
|
||||
'
|
||||
Me.grpGameMonitoringOptions.Controls.Add(Me.chkSuppressBackup)
|
||||
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, 141)
|
||||
Me.grpGameMonitoringOptions.Name = "grpGameMonitoringOptions"
|
||||
Me.grpGameMonitoringOptions.Size = New System.Drawing.Size(354, 65)
|
||||
Me.grpGameMonitoringOptions.TabIndex = 1
|
||||
Me.grpGameMonitoringOptions.TabStop = False
|
||||
Me.grpGameMonitoringOptions.Text = "Game Monitoring Options"
|
||||
'
|
||||
'chkSuppressBackup
|
||||
'
|
||||
Me.chkSuppressBackup.AutoSize = True
|
||||
Me.chkSuppressBackup.Location = New System.Drawing.Point(6, 18)
|
||||
Me.chkSuppressBackup.Name = "chkSuppressBackup"
|
||||
Me.chkSuppressBackup.Size = New System.Drawing.Size(158, 17)
|
||||
Me.chkSuppressBackup.TabIndex = 2
|
||||
Me.chkSuppressBackup.Text = "Ignore sessions shorter than"
|
||||
Me.chkSuppressBackup.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblMinutes
|
||||
'
|
||||
Me.lblMinutes.AutoSize = True
|
||||
Me.lblMinutes.Location = New System.Drawing.Point(226, 19)
|
||||
Me.lblMinutes.Name = "lblMinutes"
|
||||
Me.lblMinutes.Size = New System.Drawing.Size(43, 13)
|
||||
Me.lblMinutes.TabIndex = 17
|
||||
Me.lblMinutes.Text = "minutes"
|
||||
'
|
||||
'nudSuppressBackupThreshold
|
||||
'
|
||||
Me.nudSuppressBackupThreshold.Location = New System.Drawing.Point(170, 17)
|
||||
Me.nudSuppressBackupThreshold.Maximum = New Decimal(New Integer() {999, 0, 0, 0})
|
||||
Me.nudSuppressBackupThreshold.Name = "nudSuppressBackupThreshold"
|
||||
Me.nudSuppressBackupThreshold.Size = New System.Drawing.Size(51, 20)
|
||||
Me.nudSuppressBackupThreshold.TabIndex = 3
|
||||
'
|
||||
'grpLogOptions
|
||||
'
|
||||
Me.grpLogOptions.Controls.Add(Me.chkDisableSyncMessages)
|
||||
Me.grpLogOptions.Controls.Add(Me.chkAutoSaveLog)
|
||||
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
|
||||
Me.grpLogOptions.TabStop = False
|
||||
Me.grpLogOptions.Text = "Log Options"
|
||||
'
|
||||
'chkDisableSyncMessages
|
||||
'
|
||||
Me.chkDisableSyncMessages.AutoSize = True
|
||||
Me.chkDisableSyncMessages.Location = New System.Drawing.Point(6, 19)
|
||||
Me.chkDisableSyncMessages.Name = "chkDisableSyncMessages"
|
||||
Me.chkDisableSyncMessages.Size = New System.Drawing.Size(166, 17)
|
||||
Me.chkDisableSyncMessages.TabIndex = 0
|
||||
Me.chkDisableSyncMessages.Text = "Disable sync event messages"
|
||||
Me.chkDisableSyncMessages.UseVisualStyleBackColor = True
|
||||
'
|
||||
'grpGameData
|
||||
'
|
||||
Me.grpGameData.Controls.Add(Me.chkShowResolvedPaths)
|
||||
Me.grpGameData.Controls.Add(Me.chkSessionTracking)
|
||||
Me.grpGameData.Controls.Add(Me.chkTimeTracking)
|
||||
Me.grpGameData.Controls.Add(Me.chkSync)
|
||||
Me.grpGameData.Controls.Add(Me.btnOptionalFields)
|
||||
Me.grpGameData.Location = New System.Drawing.Point(6, 106)
|
||||
Me.grpGameData.Location = New System.Drawing.Point(6, 12)
|
||||
Me.grpGameData.Name = "grpGameData"
|
||||
Me.grpGameData.Size = New System.Drawing.Size(354, 69)
|
||||
Me.grpGameData.TabIndex = 1
|
||||
Me.grpGameData.Size = New System.Drawing.Size(354, 123)
|
||||
Me.grpGameData.TabIndex = 0
|
||||
Me.grpGameData.TabStop = False
|
||||
Me.grpGameData.Text = "Game Data"
|
||||
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
|
||||
Me.chkSessionTracking.Location = New System.Drawing.Point(6, 42)
|
||||
Me.chkSessionTracking.Name = "chkSessionTracking"
|
||||
Me.chkSessionTracking.Size = New System.Drawing.Size(138, 17)
|
||||
Me.chkSessionTracking.TabIndex = 1
|
||||
Me.chkSessionTracking.Text = "Enable session tracking"
|
||||
Me.chkSessionTracking.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lstSettings
|
||||
'
|
||||
@@ -479,49 +565,238 @@ Partial Class frmSettings
|
||||
Me.lstSettings.Size = New System.Drawing.Size(162, 303)
|
||||
Me.lstSettings.TabIndex = 0
|
||||
'
|
||||
'btnResetMessages
|
||||
'
|
||||
Me.btnResetMessages.Location = New System.Drawing.Point(128, 321)
|
||||
Me.btnResetMessages.Name = "btnResetMessages"
|
||||
Me.btnResetMessages.Size = New System.Drawing.Size(110, 23)
|
||||
Me.btnResetMessages.TabIndex = 6
|
||||
Me.btnResetMessages.Text = "&Reset Warnings"
|
||||
Me.btnResetMessages.UseVisualStyleBackColor = True
|
||||
'
|
||||
'pnlStartup
|
||||
'
|
||||
Me.pnlStartup.Controls.Add(Me.grpStartup)
|
||||
Me.pnlStartup.Location = New System.Drawing.Point(180, 0)
|
||||
Me.pnlStartup.Name = "pnlStartup"
|
||||
Me.pnlStartup.Size = New System.Drawing.Size(367, 314)
|
||||
Me.pnlStartup.TabIndex = 3
|
||||
'
|
||||
'grpStartup
|
||||
'
|
||||
Me.grpStartup.Controls.Add(Me.chkBackupOnLaunch)
|
||||
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"
|
||||
Me.grpStartup.Size = New System.Drawing.Size(354, 112)
|
||||
Me.grpStartup.TabIndex = 1
|
||||
Me.grpStartup.TabStop = False
|
||||
Me.grpStartup.Text = "Startup Options"
|
||||
'
|
||||
'chkBackupOnLaunch
|
||||
'
|
||||
Me.chkBackupOnLaunch.AutoSize = True
|
||||
Me.chkBackupOnLaunch.Location = New System.Drawing.Point(6, 88)
|
||||
Me.chkBackupOnLaunch.Name = "chkBackupOnLaunch"
|
||||
Me.chkBackupOnLaunch.Size = New System.Drawing.Size(185, 17)
|
||||
Me.chkBackupOnLaunch.TabIndex = 3
|
||||
Me.chkBackupOnLaunch.Text = "Backup GBM data files on launch"
|
||||
Me.chkBackupOnLaunch.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkAutoStart
|
||||
'
|
||||
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
|
||||
'
|
||||
'chkStartMinimized
|
||||
'
|
||||
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
|
||||
'
|
||||
Me.chkMonitorOnStartup.AutoSize = True
|
||||
Me.chkMonitorOnStartup.Location = New System.Drawing.Point(6, 65)
|
||||
Me.chkMonitorOnStartup.Name = "chkMonitorOnStartup"
|
||||
Me.chkMonitorOnStartup.Size = New System.Drawing.Size(149, 17)
|
||||
Me.chkMonitorOnStartup.TabIndex = 2
|
||||
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.pnlInterface)
|
||||
Me.Controls.Add(Me.pnlStartup)
|
||||
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)
|
||||
Me.Controls.Add(Me.btnCancel)
|
||||
Me.Controls.Add(Me.btnSave)
|
||||
Me.Controls.Add(Me.pnlGeneral)
|
||||
Me.Controls.Add(Me.pnl7z)
|
||||
Me.Controls.Add(Me.pnlBackup)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||
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.grpStartup.ResumeLayout(False)
|
||||
Me.grpStartup.PerformLayout()
|
||||
Me.grpFolderOptions.ResumeLayout(False)
|
||||
Me.grpFolderOptions.PerformLayout()
|
||||
CType(Me.nudSupressBackupThreshold, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.grp7zGeneral.ResumeLayout(False)
|
||||
Me.grp7zGeneral.PerformLayout()
|
||||
Me.pnlBackup.ResumeLayout(False)
|
||||
Me.pnlBackup.PerformLayout()
|
||||
Me.grpBackupConfirmations.ResumeLayout(False)
|
||||
Me.grpBackupConfirmations.PerformLayout()
|
||||
Me.grpBackupHandling.ResumeLayout(False)
|
||||
Me.grpBackupHandling.PerformLayout()
|
||||
Me.pnl7z.ResumeLayout(False)
|
||||
Me.grp7zAdvanced.ResumeLayout(False)
|
||||
Me.grp7zAdvanced.PerformLayout()
|
||||
Me.grp7zInformation.ResumeLayout(False)
|
||||
Me.pnlGeneral.ResumeLayout(False)
|
||||
Me.pnlGeneral.PerformLayout()
|
||||
Me.grpGameMonitoringOptions.ResumeLayout(False)
|
||||
Me.grpGameMonitoringOptions.PerformLayout()
|
||||
CType(Me.nudSuppressBackupThreshold, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.grpLogOptions.ResumeLayout(False)
|
||||
Me.grpLogOptions.PerformLayout()
|
||||
Me.grpGameData.ResumeLayout(False)
|
||||
Me.grpGameData.PerformLayout()
|
||||
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
|
||||
Friend WithEvents chkMonitorOnStartup As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkBackupConfirm As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents grpStartup As System.Windows.Forms.GroupBox
|
||||
Friend WithEvents grpFolderOptions As System.Windows.Forms.GroupBox
|
||||
Friend WithEvents txtBackupFolder As System.Windows.Forms.TextBox
|
||||
Friend WithEvents btnSave As System.Windows.Forms.Button
|
||||
@@ -529,17 +804,8 @@ Partial Class frmSettings
|
||||
Friend WithEvents lblBackupFolder As System.Windows.Forms.Label
|
||||
Friend WithEvents btnBackupFolder As System.Windows.Forms.Button
|
||||
Friend WithEvents chkShowDetectionTips As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkStartToTray As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkOverwriteWarning As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkCreateFolder As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkRestoreOnLaunch As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkSync As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkCheckSum As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkStartWindows As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkTimeTracking As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents lblMinutes As Label
|
||||
Friend WithEvents nudSupressBackupThreshold As NumericUpDown
|
||||
Friend WithEvents chkSupressBackup As CheckBox
|
||||
Friend WithEvents grp7zGeneral As GroupBox
|
||||
Friend WithEvents cboCompression As ComboBox
|
||||
Friend WithEvents lblCompression As Label
|
||||
@@ -560,4 +826,39 @@ Partial Class frmSettings
|
||||
Friend WithEvents lstSettings As ListBox
|
||||
Friend WithEvents grp7zAdvanced As GroupBox
|
||||
Friend WithEvents grp7zInformation As GroupBox
|
||||
Friend WithEvents chkBackupConfirm As CheckBox
|
||||
Friend WithEvents chkOverwriteWarning As CheckBox
|
||||
Friend WithEvents grpBackupHandling As GroupBox
|
||||
Friend WithEvents chkAutoMark As CheckBox
|
||||
Friend WithEvents chkAutoRestore As CheckBox
|
||||
Friend WithEvents chkRestoreNotify As CheckBox
|
||||
Friend WithEvents chkSessionTracking As CheckBox
|
||||
Friend WithEvents lblMinutes As Label
|
||||
Friend WithEvents nudSuppressBackupThreshold As NumericUpDown
|
||||
Friend WithEvents chkSuppressBackup As CheckBox
|
||||
Friend WithEvents btnResetMessages As Button
|
||||
Friend WithEvents chkUseGameID As CheckBox
|
||||
Friend WithEvents grpBackupConfirmations As GroupBox
|
||||
Friend WithEvents grpLogOptions As GroupBox
|
||||
Friend WithEvents chkDisableSyncMessages As CheckBox
|
||||
Friend WithEvents pnlStartup As Panel
|
||||
Friend WithEvents grpStartup As GroupBox
|
||||
Friend WithEvents chkBackupOnLaunch 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
|
||||
|
||||
@@ -4,8 +4,8 @@ Imports System.IO
|
||||
Public Class frmSettings
|
||||
Dim bShutdown As Boolean = False
|
||||
Dim bSyncSettingsChanged As Boolean = False
|
||||
Dim bCheckSumDisabled As Boolean = False
|
||||
Dim eCurrentSyncFields As clsGame.eOptionalSyncFields
|
||||
|
||||
Private oSettings As mgrSettings
|
||||
|
||||
Property Settings As mgrSettings
|
||||
@@ -17,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,24 +65,43 @@ Public Class frmSettings
|
||||
|
||||
Private Function ValidateSettings() As Boolean
|
||||
|
||||
'Only modify registry key when the value changed
|
||||
If chkStartWindows.Checked <> oSettings.StartWithWindows Then
|
||||
HandleRegistryUpdate(chkStartWindows.Checked)
|
||||
'Show Start with Windows warning if running as admin
|
||||
If Not mgrCommon.IsUnix And chkAutoStart.Checked And mgrCommon.IsElevated Then
|
||||
mgrCommon.ShowMessage(frmSettings_WarningAdminStart, MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
oSettings.StartWithWindows = 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 = 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
|
||||
oSettings.RestoreOnLaunch = chkRestoreOnLaunch.Checked
|
||||
oSettings.RestoreOnLaunch = chkRestoreNotify.Checked
|
||||
oSettings.AutoRestore = chkAutoRestore.Checked
|
||||
oSettings.AutoMark = chkAutoMark.Checked
|
||||
oSettings.TimeTracking = chkTimeTracking.Checked
|
||||
oSettings.SupressBackup = chkSupressBackup.Checked
|
||||
oSettings.SupressBackupThreshold = nudSupressBackupThreshold.Value
|
||||
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)
|
||||
@@ -61,21 +110,9 @@ Public Class frmSettings
|
||||
oSettings.Custom7zArguments = txt7zArguments.Text.Trim
|
||||
oSettings.Custom7zLocation = txt7zLocation.Text.Trim
|
||||
|
||||
'We need to clear all checksums its turned off
|
||||
If chkCheckSum.Checked = False And oSettings.CheckSum = True Then
|
||||
bCheckSumDisabled = True
|
||||
End If
|
||||
oSettings.CheckSum = chkCheckSum.Checked
|
||||
|
||||
'Turning syncing from off to on is the same as changing the backup folder
|
||||
If chkSync.Checked = True And oSettings.Sync = False Then
|
||||
bSyncSettingsChanged = True
|
||||
End If
|
||||
oSettings.Sync = chkSync.Checked
|
||||
|
||||
If Directory.Exists(txtBackupFolder.Text) Then
|
||||
If oSettings.BackupFolder <> txtBackupFolder.Text Then
|
||||
If chkSync.Checked Then bSyncSettingsChanged = True
|
||||
bSyncSettingsChanged = True
|
||||
End If
|
||||
oSettings.BackupFolder = txtBackupFolder.Text
|
||||
Else
|
||||
@@ -95,7 +132,7 @@ Public Class frmSettings
|
||||
End If
|
||||
|
||||
'We must trigger a sync if optional fields have changed
|
||||
If Settings.Sync And (eCurrentSyncFields <> Settings.SyncFields) Then
|
||||
If eCurrentSyncFields <> Settings.SyncFields Then
|
||||
bSyncSettingsChanged = True
|
||||
End If
|
||||
|
||||
@@ -106,7 +143,6 @@ Public Class frmSettings
|
||||
If ValidateSettings() Then
|
||||
oSettings.SaveSettings()
|
||||
If bSyncSettingsChanged Then mgrMonitorList.HandleBackupLocationChange(Settings)
|
||||
If bCheckSumDisabled Then mgrManifest.DoManifestHashWipe()
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
@@ -168,44 +204,51 @@ Public Class frmSettings
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ResetMessages()
|
||||
If mgrCommon.ShowMessage(frmSettings_ConfirmMessageReset, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
oSettings.SuppressMessages = mgrSettings.eSuppressMessages.None
|
||||
End If
|
||||
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
|
||||
chkRestoreOnLaunch.Checked = oSettings.RestoreOnLaunch
|
||||
chkRestoreNotify.Checked = oSettings.RestoreOnLaunch
|
||||
chkAutoRestore.Checked = oSettings.AutoRestore
|
||||
chkAutoMark.Checked = oSettings.AutoMark
|
||||
txtBackupFolder.Text = oSettings.BackupFolder
|
||||
chkSync.Checked = oSettings.Sync
|
||||
chkCheckSum.Checked = oSettings.CheckSum
|
||||
chkTimeTracking.Checked = oSettings.TimeTracking
|
||||
chkSupressBackup.Checked = oSettings.SupressBackup
|
||||
nudSupressBackupThreshold.Value = oSettings.SupressBackupThreshold
|
||||
nudSupressBackupThreshold.Enabled = chkSupressBackup.Checked
|
||||
chkSessionTracking.Checked = oSettings.SessionTracking
|
||||
chkShowResolvedPaths.Checked = oSettings.ShowResolvedPaths
|
||||
chkSuppressBackup.Checked = oSettings.SuppressBackup
|
||||
nudSuppressBackupThreshold.Value = oSettings.SuppressBackupThreshold
|
||||
nudSuppressBackupThreshold.Enabled = chkSuppressBackup.Checked
|
||||
cboCompression.SelectedValue = oSettings.CompressionLevel
|
||||
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)
|
||||
|
||||
'Toggle Sync Button
|
||||
ToggleSyncButton()
|
||||
End Sub
|
||||
|
||||
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"
|
||||
@@ -220,13 +263,27 @@ 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"
|
||||
|
||||
oSettingsItems.Add(New KeyValuePair(Of Integer, String)(0, frmSettings_lstSettings_General))
|
||||
oSettingsItems.Add(New KeyValuePair(Of Integer, String)(1, frmSettings_lstSettings_BackupRestore))
|
||||
oSettingsItems.Add(New KeyValuePair(Of Integer, String)(2, frmSettings_lstSettings_7z))
|
||||
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
|
||||
|
||||
@@ -234,14 +291,6 @@ Public Class frmSettings
|
||||
lstSettings.SelectedIndex = 0
|
||||
End Sub
|
||||
|
||||
Private Sub ToggleSyncButton()
|
||||
If chkSync.Checked Then
|
||||
btnOptionalFields.Enabled = True
|
||||
Else
|
||||
btnOptionalFields.Enabled = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OpenOptionalFields()
|
||||
Dim frm As New frmSyncFields
|
||||
frm.SyncFields = Settings.SyncFields
|
||||
@@ -258,16 +307,35 @@ Public Class frmSettings
|
||||
Select Case oSettingsItem.Key
|
||||
Case 0
|
||||
pnlGeneral.Visible = True
|
||||
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
|
||||
@@ -275,14 +343,18 @@ Public Class frmSettings
|
||||
Private Sub SetForm()
|
||||
'Set Form Name
|
||||
Me.Text = frmSettings_FormName
|
||||
Me.Icon = GBM_Icon
|
||||
|
||||
'Set Form Text
|
||||
lblMinutes.Text = frmSettings_lblMinutes
|
||||
chkSupressBackup.Text = frmSettings_chkSupressBackup
|
||||
chkCheckSum.Text = frmSettings_chkCheckSum
|
||||
chkRestoreOnLaunch.Text = frmSettings_chkRestoreOnLaunch
|
||||
chkSuppressBackup.Text = frmSettings_chkSuppressBackup
|
||||
grpBackupHandling.Text = frmSettings_grpBackupHandling
|
||||
chkRestoreNotify.Text = frmSettings_chkRestoreNotify
|
||||
chkAutoRestore.Text = frmSettings_chkAutoRestore
|
||||
chkAutoMark.Text = frmSettings_chkAutoMark
|
||||
chkOverwriteWarning.Text = frmSettings_chkOverwriteWarning
|
||||
chkCreateFolder.Text = frmSettings_chkCreateFolder
|
||||
chkUseGameID.Text = frmSettings_chkUseGameID
|
||||
chkBackupConfirm.Text = frmSettings_chkBackupConfirm
|
||||
btnCancel.Text = frmSettings_btnCancel
|
||||
btnSave.Text = frmSettings_btnSave
|
||||
@@ -292,11 +364,11 @@ Public Class frmSettings
|
||||
grpStartup.Text = frmSettings_grpStartup
|
||||
grpGameData.Text = frmSettings_grpGameData
|
||||
chkTimeTracking.Text = frmSettings_chkTimeTracking
|
||||
chkStartWindows.Text = frmSettings_chkStartWindows
|
||||
chkSync.Text = frmSettings_chkSync
|
||||
chkSessionTracking.Text = frmSettings_chkSessionTracking
|
||||
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
|
||||
@@ -306,11 +378,20 @@ Public Class frmSettings
|
||||
lblArguments.Text = frmSettings_lblArguments
|
||||
lblLocation.Text = frmSettings_lblLocation
|
||||
btnOptionalFields.Text = frmSettings_btnOptionalFields
|
||||
btnResetMessages.Text = frmSettings_btnResetMessages
|
||||
chkBackupOnLaunch.Text = frmSettings_chkBackupOnLaunch
|
||||
grpBackupConfirmations.Text = frmSettings_grpBackupConfirmations
|
||||
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
|
||||
@@ -339,21 +420,21 @@ 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(frmSettings_BrowseFolder, oSettings.BackupFolder, True)
|
||||
sNewFolder = mgrCommon.OpenClassicFolderBrowser("Settings_Backup_Path", frmSettings_BrowseFolder, oSettings.BackupFolder, True, False)
|
||||
If sNewFolder <> String.Empty Then txtBackupFolder.Text = sNewFolder
|
||||
End Sub
|
||||
|
||||
Private Sub btn7zLocation_Click(sender As Object, e As EventArgs) Handles btn7zLocation.Click
|
||||
Dim sNewLocation As String
|
||||
sNewLocation = mgrCommon.OpenFileBrowser(frmSettings_Browse7za, "exe", frmSettings_7zaFileType, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), False)
|
||||
sNewLocation = mgrCommon.OpenFileBrowser("7z_Browse", frmSettings_Browse7za, "exe", frmSettings_7zaFileType, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), False)
|
||||
If sNewLocation <> String.Empty Then
|
||||
txt7zLocation.Text = sNewLocation
|
||||
GetUtilityInfo(txt7zLocation.Text)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub chkSupressBackup_CheckedChanged(sender As Object, e As EventArgs) Handles chkSupressBackup.CheckedChanged
|
||||
nudSupressBackupThreshold.Enabled = chkSupressBackup.Checked
|
||||
Private Sub chkSuppressBackup_CheckedChanged(sender As Object, e As EventArgs) Handles chkSuppressBackup.CheckedChanged
|
||||
nudSuppressBackupThreshold.Enabled = chkSuppressBackup.Checked
|
||||
End Sub
|
||||
|
||||
Private Sub txt7zLocation_Leave(sender As Object, e As EventArgs) Handles txt7zLocation.Leave
|
||||
@@ -364,15 +445,51 @@ Public Class frmSettings
|
||||
SetDefaults()
|
||||
End Sub
|
||||
|
||||
Private Sub btnOptionalFields_Click(sender As Object, e As EventArgs) Handles btnOptionalFields.Click
|
||||
OpenOptionalFields()
|
||||
Private Sub btnResetMessages_Click(sender As Object, e As EventArgs) Handles btnResetMessages.Click
|
||||
ResetMessages()
|
||||
End Sub
|
||||
|
||||
Private Sub chkSync_CheckedChanged(sender As Object, e As EventArgs) Handles chkSync.CheckedChanged
|
||||
ToggleSyncButton()
|
||||
Private Sub btnOptionalFields_Click(sender As Object, e As EventArgs) Handles btnOptionalFields.Click
|
||||
OpenOptionalFields()
|
||||
End Sub
|
||||
|
||||
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
|
||||
@@ -30,7 +30,6 @@ Partial Class frmStartUpWizard
|
||||
Me.lblStep1Title = New System.Windows.Forms.Label()
|
||||
Me.lblStep1Instructions = New System.Windows.Forms.Label()
|
||||
Me.tbPage2 = New System.Windows.Forms.TabPage()
|
||||
Me.chkSync = New System.Windows.Forms.CheckBox()
|
||||
Me.chkCreateFolder = New System.Windows.Forms.CheckBox()
|
||||
Me.lblStep2Title = New System.Windows.Forms.Label()
|
||||
Me.lblStep2Instructions = New System.Windows.Forms.Label()
|
||||
@@ -50,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()
|
||||
@@ -91,7 +91,7 @@ Partial Class frmStartUpWizard
|
||||
Me.lblStep1Instructions2.Name = "lblStep1Instructions2"
|
||||
Me.lblStep1Instructions2.Size = New System.Drawing.Size(303, 53)
|
||||
Me.lblStep1Instructions2.TabIndex = 2
|
||||
Me.lblStep1Instructions2.Text = "If you'd like to learn about advanced features or have any other questions before" & _
|
||||
Me.lblStep1Instructions2.Text = "If you'd like to learn about advanced features or have any other questions before" &
|
||||
" you get started, there is a detailed online manual available."
|
||||
'
|
||||
'llbManual
|
||||
@@ -126,7 +126,7 @@ Partial Class frmStartUpWizard
|
||||
'tbPage2
|
||||
'
|
||||
Me.tbPage2.BackColor = System.Drawing.SystemColors.Control
|
||||
Me.tbPage2.Controls.Add(Me.chkSync)
|
||||
Me.tbPage2.Controls.Add(Me.lblStep2Warning)
|
||||
Me.tbPage2.Controls.Add(Me.chkCreateFolder)
|
||||
Me.tbPage2.Controls.Add(Me.lblStep2Title)
|
||||
Me.tbPage2.Controls.Add(Me.lblStep2Instructions)
|
||||
@@ -140,16 +140,6 @@ Partial Class frmStartUpWizard
|
||||
Me.tbPage2.TabIndex = 1
|
||||
Me.tbPage2.Text = "TabPage2"
|
||||
'
|
||||
'chkSync
|
||||
'
|
||||
Me.chkSync.AutoSize = True
|
||||
Me.chkSync.Location = New System.Drawing.Point(17, 105)
|
||||
Me.chkSync.Name = "chkSync"
|
||||
Me.chkSync.Size = New System.Drawing.Size(261, 17)
|
||||
Me.chkSync.TabIndex = 5
|
||||
Me.chkSync.Text = "Import any existing GBM data in the backup folder"
|
||||
Me.chkSync.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkCreateFolder
|
||||
'
|
||||
Me.chkCreateFolder.AutoSize = True
|
||||
@@ -172,12 +162,13 @@ Partial Class frmStartUpWizard
|
||||
'
|
||||
'lblStep2Instructions
|
||||
'
|
||||
Me.lblStep2Instructions.Location = New System.Drawing.Point(14, 151)
|
||||
Me.lblStep2Instructions.Location = New System.Drawing.Point(14, 103)
|
||||
Me.lblStep2Instructions.Name = "lblStep2Instructions"
|
||||
Me.lblStep2Instructions.Size = New System.Drawing.Size(335, 31)
|
||||
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. "
|
||||
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" &
|
||||
"rted."
|
||||
'
|
||||
'btnFolderBrowse
|
||||
'
|
||||
@@ -283,7 +274,7 @@ Partial Class frmStartUpWizard
|
||||
Me.lblStep4Instructions3.Name = "lblStep4Instructions3"
|
||||
Me.lblStep4Instructions3.Size = New System.Drawing.Size(303, 33)
|
||||
Me.lblStep4Instructions3.TabIndex = 18
|
||||
Me.lblStep4Instructions3.Text = "You can change anything you've setup in this wizard and find more settings and fe" & _
|
||||
Me.lblStep4Instructions3.Text = "You can change anything you've setup in this wizard and find more settings and fe" &
|
||||
"atures by exploring the menus. Thanks!"
|
||||
'
|
||||
'lblStep4Instructions2
|
||||
@@ -329,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
|
||||
'
|
||||
@@ -342,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)
|
||||
@@ -381,7 +380,7 @@ Partial Class frmStartUpWizard
|
||||
Friend WithEvents btnOpenMonitorList As System.Windows.Forms.Button
|
||||
Friend WithEvents lblStep4Instructions3 As System.Windows.Forms.Label
|
||||
Friend WithEvents lblStep4Instructions2 As System.Windows.Forms.Label
|
||||
Friend WithEvents chkSync As System.Windows.Forms.CheckBox
|
||||
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
|
||||
@@ -38,10 +39,10 @@ Public Class frmStartUpWizard
|
||||
llbManual.Text = frmStartUpWizard_llbManual
|
||||
lblStep1Title.Text = frmStartUpWizard_lblStep1Title
|
||||
lblStep1Instructions.Text = frmStartUpWizard_lblStep1Instructions
|
||||
chkSync.Text = frmStartUpWizard_chkSync
|
||||
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
|
||||
@@ -55,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
|
||||
|
||||
@@ -66,7 +68,7 @@ Public Class frmStartUpWizard
|
||||
If oDatabase.CheckDB() Then
|
||||
'Make sure database is the latest version
|
||||
oDatabase.DatabaseUpgrade()
|
||||
mgrMonitorList.SyncMonitorLists(oSettings.SyncFields, False)
|
||||
mgrMonitorList.SyncMonitorLists(oSettings, False)
|
||||
mgrCommon.ShowMessage(frmStartUpWizard_ExistingData, MsgBoxStyle.Information)
|
||||
End If
|
||||
End Sub
|
||||
@@ -78,9 +80,6 @@ Public Class frmStartUpWizard
|
||||
btnNext.Enabled = True
|
||||
tabWizard.SelectTab(0)
|
||||
Case eSteps.Step2
|
||||
txtBackupPath.Text = oSettings.BackupFolder
|
||||
chkCreateFolder.Checked = oSettings.CreateSubFolder
|
||||
chkSync.Checked = oSettings.Sync
|
||||
btnBack.Enabled = True
|
||||
btnNext.Enabled = True
|
||||
tabWizard.SelectTab(1)
|
||||
@@ -107,9 +106,9 @@ Public Class frmStartUpWizard
|
||||
End If
|
||||
|
||||
If mgrCommon.ShowMessage(frmStartUpWizard_ConfirmOfficialImport, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
If mgrMonitorList.DoImport(sImportURL) Then
|
||||
If mgrMonitorList.DoImport(sImportURL, True) Then
|
||||
oGameData = mgrMonitorList.ReadList(mgrMonitorList.eListTypes.FullList)
|
||||
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
|
||||
mgrMonitorList.SyncMonitorLists(oSettings)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
@@ -124,16 +123,15 @@ Public Class frmStartUpWizard
|
||||
frm.GameData = oGameData
|
||||
frm.ShowDialog()
|
||||
LoadGameSettings()
|
||||
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
|
||||
mgrMonitorList.SyncMonitorLists(oSettings)
|
||||
End Sub
|
||||
|
||||
Private Sub OpenMonitorList()
|
||||
Dim frm As New frmGameManager
|
||||
frm.BackupFolder = oSettings.BackupFolder
|
||||
frm.Settings = oSettings
|
||||
frm.DisableExternalFunctions = True
|
||||
frm.ShowDialog()
|
||||
LoadGameSettings()
|
||||
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
|
||||
End Sub
|
||||
|
||||
Private Function ValidateBackupPath(ByVal strPath As String, ByRef sErrorMessage As String) As Boolean
|
||||
@@ -143,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
|
||||
|
||||
@@ -183,10 +185,9 @@ Public Class frmStartUpWizard
|
||||
If ValidateBackupPath(txtBackupPath.Text, sErrorMessage) Then
|
||||
oSettings.BackupFolder = txtBackupPath.Text
|
||||
oSettings.CreateSubFolder = chkCreateFolder.Checked
|
||||
oSettings.Sync = chkSync.Checked
|
||||
oSettings.SaveSettings()
|
||||
oSettings.LoadSettings()
|
||||
If oSettings.Sync Then CheckSync()
|
||||
CheckSync()
|
||||
eCurrentStep = eSteps.Step3
|
||||
Else
|
||||
bError = True
|
||||
@@ -215,7 +216,7 @@ Public Class frmStartUpWizard
|
||||
End If
|
||||
End If
|
||||
|
||||
sNewPath = mgrCommon.OpenFolderBrowser(frmStartUpWizard_BrowseFolder, sDefaultFolder, True)
|
||||
sNewPath = mgrCommon.OpenClassicFolderBrowser("Wizard_Backup_Path", frmStartUpWizard_BrowseFolder, sDefaultFolder, True, False)
|
||||
|
||||
If sNewPath <> String.Empty Then txtBackupPath.Text = sNewPath
|
||||
End Sub
|
||||
|
||||
@@ -28,7 +28,6 @@ Partial Class frmSyncFields
|
||||
Me.chkVersion = New System.Windows.Forms.CheckBox()
|
||||
Me.chkCompany = New System.Windows.Forms.CheckBox()
|
||||
Me.chkGamePath = New System.Windows.Forms.CheckBox()
|
||||
Me.chkTimeStamp = New System.Windows.Forms.CheckBox()
|
||||
Me.btnCancel = New System.Windows.Forms.Button()
|
||||
Me.btnSave = New System.Windows.Forms.Button()
|
||||
Me.grpFields.SuspendLayout()
|
||||
@@ -41,10 +40,9 @@ Partial Class frmSyncFields
|
||||
Me.grpFields.Controls.Add(Me.chkVersion)
|
||||
Me.grpFields.Controls.Add(Me.chkCompany)
|
||||
Me.grpFields.Controls.Add(Me.chkGamePath)
|
||||
Me.grpFields.Controls.Add(Me.chkTimeStamp)
|
||||
Me.grpFields.Location = New System.Drawing.Point(12, 12)
|
||||
Me.grpFields.Name = "grpFields"
|
||||
Me.grpFields.Size = New System.Drawing.Size(195, 162)
|
||||
Me.grpFields.Size = New System.Drawing.Size(195, 135)
|
||||
Me.grpFields.TabIndex = 0
|
||||
Me.grpFields.TabStop = False
|
||||
Me.grpFields.Text = "Available Fields"
|
||||
@@ -52,7 +50,7 @@ Partial Class frmSyncFields
|
||||
'chkMonitorGame
|
||||
'
|
||||
Me.chkMonitorGame.AutoSize = True
|
||||
Me.chkMonitorGame.Location = New System.Drawing.Point(6, 134)
|
||||
Me.chkMonitorGame.Location = New System.Drawing.Point(6, 111)
|
||||
Me.chkMonitorGame.Name = "chkMonitorGame"
|
||||
Me.chkMonitorGame.Size = New System.Drawing.Size(109, 17)
|
||||
Me.chkMonitorGame.TabIndex = 5
|
||||
@@ -62,7 +60,7 @@ Partial Class frmSyncFields
|
||||
'chkIcon
|
||||
'
|
||||
Me.chkIcon.AutoSize = True
|
||||
Me.chkIcon.Location = New System.Drawing.Point(6, 111)
|
||||
Me.chkIcon.Location = New System.Drawing.Point(6, 88)
|
||||
Me.chkIcon.Name = "chkIcon"
|
||||
Me.chkIcon.Size = New System.Drawing.Size(148, 17)
|
||||
Me.chkIcon.TabIndex = 4
|
||||
@@ -72,7 +70,7 @@ Partial Class frmSyncFields
|
||||
'chkVersion
|
||||
'
|
||||
Me.chkVersion.AutoSize = True
|
||||
Me.chkVersion.Location = New System.Drawing.Point(6, 88)
|
||||
Me.chkVersion.Location = New System.Drawing.Point(6, 65)
|
||||
Me.chkVersion.Name = "chkVersion"
|
||||
Me.chkVersion.Size = New System.Drawing.Size(61, 17)
|
||||
Me.chkVersion.TabIndex = 3
|
||||
@@ -82,7 +80,7 @@ Partial Class frmSyncFields
|
||||
'chkCompany
|
||||
'
|
||||
Me.chkCompany.AutoSize = True
|
||||
Me.chkCompany.Location = New System.Drawing.Point(6, 65)
|
||||
Me.chkCompany.Location = New System.Drawing.Point(6, 42)
|
||||
Me.chkCompany.Name = "chkCompany"
|
||||
Me.chkCompany.Size = New System.Drawing.Size(70, 17)
|
||||
Me.chkCompany.TabIndex = 2
|
||||
@@ -92,27 +90,17 @@ Partial Class frmSyncFields
|
||||
'chkGamePath
|
||||
'
|
||||
Me.chkGamePath.AutoSize = True
|
||||
Me.chkGamePath.Location = New System.Drawing.Point(6, 42)
|
||||
Me.chkGamePath.Location = New System.Drawing.Point(6, 19)
|
||||
Me.chkGamePath.Name = "chkGamePath"
|
||||
Me.chkGamePath.Size = New System.Drawing.Size(180, 17)
|
||||
Me.chkGamePath.TabIndex = 1
|
||||
Me.chkGamePath.Text = "Game Path (Not Recommended)"
|
||||
Me.chkGamePath.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkTimeStamp
|
||||
'
|
||||
Me.chkTimeStamp.AutoSize = True
|
||||
Me.chkTimeStamp.Location = New System.Drawing.Point(6, 19)
|
||||
Me.chkTimeStamp.Name = "chkTimeStamp"
|
||||
Me.chkTimeStamp.Size = New System.Drawing.Size(146, 17)
|
||||
Me.chkTimeStamp.TabIndex = 0
|
||||
Me.chkTimeStamp.Text = "Time stamp each backup"
|
||||
Me.chkTimeStamp.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnCancel
|
||||
'
|
||||
Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
|
||||
Me.btnCancel.Location = New System.Drawing.Point(132, 180)
|
||||
Me.btnCancel.Location = New System.Drawing.Point(132, 153)
|
||||
Me.btnCancel.Name = "btnCancel"
|
||||
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnCancel.TabIndex = 2
|
||||
@@ -122,7 +110,7 @@ Partial Class frmSyncFields
|
||||
'btnSave
|
||||
'
|
||||
Me.btnSave.DialogResult = System.Windows.Forms.DialogResult.OK
|
||||
Me.btnSave.Location = New System.Drawing.Point(52, 180)
|
||||
Me.btnSave.Location = New System.Drawing.Point(52, 153)
|
||||
Me.btnSave.Name = "btnSave"
|
||||
Me.btnSave.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnSave.TabIndex = 1
|
||||
@@ -133,7 +121,7 @@ Partial Class frmSyncFields
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(219, 211)
|
||||
Me.ClientSize = New System.Drawing.Size(219, 186)
|
||||
Me.Controls.Add(Me.btnCancel)
|
||||
Me.Controls.Add(Me.btnSave)
|
||||
Me.Controls.Add(Me.grpFields)
|
||||
@@ -157,7 +145,6 @@ Partial Class frmSyncFields
|
||||
Friend WithEvents chkVersion As CheckBox
|
||||
Friend WithEvents chkCompany As CheckBox
|
||||
Friend WithEvents chkGamePath As CheckBox
|
||||
Friend WithEvents chkTimeStamp As CheckBox
|
||||
Friend WithEvents btnCancel As Button
|
||||
Friend WithEvents btnSave As Button
|
||||
End Class
|
||||
|
||||
@@ -26,9 +26,6 @@ Public Class frmSyncFields
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.MonitorGame) = clsGame.eOptionalSyncFields.MonitorGame Then
|
||||
chkMonitorGame.Checked = True
|
||||
End If
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.TimeStamp) = clsGame.eOptionalSyncFields.TimeStamp Then
|
||||
chkTimeStamp.Checked = True
|
||||
End If
|
||||
If (eSyncFields And clsGame.eOptionalSyncFields.Version) = clsGame.eOptionalSyncFields.Version Then
|
||||
chkVersion.Checked = True
|
||||
End If
|
||||
@@ -37,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
|
||||
@@ -47,7 +45,6 @@ Public Class frmSyncFields
|
||||
chkVersion.Text = frmSyncFields_chkVersion
|
||||
chkCompany.Text = frmSyncFields_chkCompany
|
||||
chkGamePath.Text = frmSyncFields_chkGamePath
|
||||
chkTimeStamp.Text = frmSyncFields_chkTimeStamp
|
||||
End Sub
|
||||
|
||||
Private Sub frmSyncFields_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
@@ -65,51 +62,43 @@ Public Class frmSyncFields
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub chkTimeStamp_CheckedChanged(sender As Object, e As EventArgs) Handles chkTimeStamp.CheckedChanged
|
||||
If chkTimeStamp.Checked Then
|
||||
SyncFields = mgrCommon.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.TimeStamp)
|
||||
Else
|
||||
SyncFields = mgrCommon.RemoveSyncField(SyncFields, clsGame.eOptionalSyncFields.TimeStamp)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub chkGamePath_CheckedChanged(sender As Object, e As EventArgs) Handles chkGamePath.CheckedChanged
|
||||
If chkGamePath.Checked Then
|
||||
SyncFields = mgrCommon.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.GamePath)
|
||||
SyncFields = clsGame.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.GamePath)
|
||||
Else
|
||||
SyncFields = mgrCommon.RemoveSyncField(SyncFields, clsGame.eOptionalSyncFields.GamePath)
|
||||
SyncFields = clsGame.RemoveSyncField(SyncFields, clsGame.eOptionalSyncFields.GamePath)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub chkCompany_CheckedChanged(sender As Object, e As EventArgs) Handles chkCompany.CheckedChanged
|
||||
If chkCompany.Checked Then
|
||||
SyncFields = mgrCommon.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.Company)
|
||||
SyncFields = clsGame.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.Company)
|
||||
Else
|
||||
SyncFields = mgrCommon.RemoveSyncField(SyncFields, clsGame.eOptionalSyncFields.Company)
|
||||
SyncFields = clsGame.RemoveSyncField(SyncFields, clsGame.eOptionalSyncFields.Company)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub chkVersion_CheckedChanged(sender As Object, e As EventArgs) Handles chkVersion.CheckedChanged
|
||||
If chkVersion.Checked Then
|
||||
SyncFields = mgrCommon.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.Version)
|
||||
SyncFields = clsGame.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.Version)
|
||||
Else
|
||||
SyncFields = mgrCommon.RemoveSyncField(SyncFields, clsGame.eOptionalSyncFields.Version)
|
||||
SyncFields = clsGame.RemoveSyncField(SyncFields, clsGame.eOptionalSyncFields.Version)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub chkIcon_CheckedChanged(sender As Object, e As EventArgs) Handles chkIcon.CheckedChanged
|
||||
If chkIcon.Checked Then
|
||||
SyncFields = mgrCommon.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.Icon)
|
||||
SyncFields = clsGame.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.Icon)
|
||||
Else
|
||||
SyncFields = mgrCommon.RemoveSyncField(SyncFields, clsGame.eOptionalSyncFields.Icon)
|
||||
SyncFields = clsGame.RemoveSyncField(SyncFields, clsGame.eOptionalSyncFields.Icon)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub chkMonitorGame_CheckedChanged(sender As Object, e As EventArgs) Handles chkMonitorGame.CheckedChanged
|
||||
If chkMonitorGame.Checked Then
|
||||
SyncFields = mgrCommon.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.MonitorGame)
|
||||
SyncFields = clsGame.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.MonitorGame)
|
||||
Else
|
||||
SyncFields = mgrCommon.RemoveSyncField(SyncFields, clsGame.eOptionalSyncFields.MonitorGame)
|
||||
SyncFields = clsGame.RemoveSyncField(SyncFields, clsGame.eOptionalSyncFields.MonitorGame)
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
@@ -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(frmVariableManager_PathBrowse, sDefaultFolder, 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
|
||||
@@ -106,6 +106,7 @@
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Management" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
@@ -121,6 +122,16 @@
|
||||
<Import Include="System.Windows.Forms" />
|
||||
</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" />
|
||||
<Compile Include="Classes\clsSavedPath.vb" />
|
||||
<Compile Include="Classes\clsSession.vb" />
|
||||
<Compile Include="Classes\XML Serialize Classes\ExportData.vb" />
|
||||
<Compile Include="Classes\XML Serialize Classes\Session.vb" />
|
||||
<Compile Include="Classes\XML Serialize Classes\Tag.vb" />
|
||||
<Compile Include="Classes\XML Serialize Classes\Game.vb" />
|
||||
<Compile Include="Classes\clsGameTag.vb" />
|
||||
@@ -128,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>
|
||||
@@ -152,6 +169,12 @@
|
||||
<Compile Include="Forms\frmFileFolderSearch.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\frmGameProcesses.Designer.vb">
|
||||
<DependentUpon>frmGameProcesses.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\frmGameProcesses.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\frmGameTags.Designer.vb">
|
||||
<DependentUpon>frmGameTags.vb</DependentUpon>
|
||||
</Compile>
|
||||
@@ -164,6 +187,24 @@
|
||||
<Compile Include="Forms\frmIncludeExclude.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\frmProcessManager.Designer.vb">
|
||||
<DependentUpon>frmProcessManager.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\frmProcessManager.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\frmSessionExport.Designer.vb">
|
||||
<DependentUpon>frmSessionExport.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\frmSessionExport.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\frmSessions.Designer.vb">
|
||||
<DependentUpon>frmSessions.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\frmSessions.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\frmStartUpWizard.Designer.vb">
|
||||
<DependentUpon>frmStartUpWizard.vb</DependentUpon>
|
||||
</Compile>
|
||||
@@ -213,6 +254,9 @@
|
||||
<Compile Include="Forms\frmVariableManager.vb">
|
||||
<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" />
|
||||
<Compile Include="Managers\mgrHash.vb" />
|
||||
@@ -220,13 +264,15 @@
|
||||
<Compile Include="Managers\mgrMonitorList.vb" />
|
||||
<Compile Include="Managers\mgrPath.vb" />
|
||||
<Compile Include="Managers\mgrRestore.vb" />
|
||||
<Compile Include="Managers\mgrSavedPath.vb" />
|
||||
<Compile Include="Managers\mgrSessions.vb" />
|
||||
<Compile Include="Managers\mgrSettings.vb" />
|
||||
<Compile Include="Managers\mgrBackup.vb" />
|
||||
<Compile Include="Managers\mgrSQLite.vb" />
|
||||
<Compile Include="Managers\mgrTags.vb" />
|
||||
<Compile Include="Managers\mgrVariables.vb" />
|
||||
<Compile Include="Managers\mgrXML.vb" />
|
||||
<Compile Include="Managers\mgrProcesses.vb" />
|
||||
<Compile Include="Managers\mgrProcessDetection.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
@@ -244,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>
|
||||
@@ -256,12 +305,24 @@
|
||||
<EmbeddedResource Include="Forms\frmFileFolderSearch.resx">
|
||||
<DependentUpon>frmFileFolderSearch.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\frmGameProcesses.resx">
|
||||
<DependentUpon>frmGameProcesses.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\frmGameTags.resx">
|
||||
<DependentUpon>frmGameTags.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\frmIncludeExclude.resx">
|
||||
<DependentUpon>frmIncludeExclude.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\frmProcessManager.resx">
|
||||
<DependentUpon>frmProcessManager.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\frmSessionExport.resx">
|
||||
<DependentUpon>frmSessionExport.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\frmSessions.resx">
|
||||
<DependentUpon>frmSessions.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\frmStartUpWizard.resx">
|
||||
<DependentUpon>frmStartUpWizard.vb</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -338,12 +399,15 @@
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="References\Mono.Data.Sqlite.dll" />
|
||||
<Content Include="Resources\New.png" />
|
||||
<Content Include="Resources\Update.png" />
|
||||
<Content Include="Utilities\x64\7za.exe">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Utilities\x86\7za.exe">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="x64\sqlite3.dll" />
|
||||
<Content Include="x86\sqlite3.dll" />
|
||||
<None Include="Resources\gbm.ico" />
|
||||
<Content Include="Resources\Admin.png" />
|
||||
@@ -356,7 +420,6 @@
|
||||
<Content Include="Resources\Inbox.png" />
|
||||
<Content Include="Resources\type.ico" />
|
||||
<Content Include="Resources\User.png" />
|
||||
<Content Include="x64\sqlite3.dll" />
|
||||
<None Include="Resources\Stopped.png" />
|
||||
<None Include="Resources\Detected.png" />
|
||||
<None Include="Resources\Ready.png" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
License for use and distribution
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Copyright (C) 1999-2015 Igor Pavlov.
|
||||
Copyright (C) 1999-2019 Igor Pavlov.
|
||||
|
||||
7-Zip Extra files are under the GNU LGPL license.
|
||||
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
Game Backup Monitor would like to credit the following people/organizations:
|
||||
|
||||
7-zip - Igor Pavlov
|
||||
Contributors:
|
||||
|
||||
Michael J. Seiferling (MikeMaximus) - Design, Programming and Windows Game Configuration Maintainer.
|
||||
Sebastian Riedel (basxto) - Linux Packaging, Installation and Game Configuration Maintainer.
|
||||
|
||||
Special Thanks:
|
||||
|
||||
7-Zip - Igor Pavlov
|
||||
Sixpack Status Icons - JankoAtWarpSpeed.com
|
||||
Primo Icon Set - webdesignerdepot.com
|
||||
@@ -1,5 +1,5 @@
|
||||
GBM - Game Backup Monitor
|
||||
Copyright (C) 2015 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
|
||||
@@ -16,4 +16,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Contact Information:
|
||||
|
||||
mseiferling@gmail.com
|
||||
gamebackupmonitor@gmail.com
|
||||
@@ -40,25 +40,25 @@ Public Class mgrBackup
|
||||
Dim oItem As New clsBackup
|
||||
|
||||
'Create manifest item
|
||||
oItem.Name = oGameInfo.Name
|
||||
oItem.MonitorID = oGameInfo.ID
|
||||
'Keep the path relative to the manifest location
|
||||
oItem.FileName = sBackupFile.Replace(Path.GetDirectoryName(mgrPath.RemoteDatabaseLocation) & Path.DirectorySeparatorChar, "")
|
||||
oItem.RestorePath = oGameInfo.TruePath
|
||||
oItem.AbsolutePath = oGameInfo.AbsolutePath
|
||||
oItem.FileName = sBackupFile.Replace(Settings.BackupFolder & Path.DirectorySeparatorChar, String.Empty)
|
||||
oItem.DateUpdated = dTimeStamp
|
||||
oItem.UpdatedBy = My.Computer.Name
|
||||
oItem.CheckSum = sCheckSum
|
||||
|
||||
'Save Remote Manifest
|
||||
If mgrManifest.DoManifestCheck(oItem.Name, mgrSQLite.Database.Remote) Then
|
||||
mgrManifest.DoManifestUpdate(oItem, mgrSQLite.Database.Remote)
|
||||
If Not oGameInfo.AppendTimeStamp Then
|
||||
If Not mgrManifest.DoUpdateLatestManifest(oItem, mgrSQLite.Database.Remote) Then
|
||||
mgrManifest.DoManifestAdd(oItem, mgrSQLite.Database.Remote)
|
||||
End If
|
||||
Else
|
||||
mgrManifest.DoManifestAdd(oItem, mgrSQLite.Database.Remote)
|
||||
mgrManifest.DoManifestAdd(oItem, mgrSQLite.Database.Remote)
|
||||
End If
|
||||
|
||||
'Save Local Manifest
|
||||
If mgrManifest.DoManifestCheck(oItem.Name, mgrSQLite.Database.Local) Then
|
||||
mgrManifest.DoManifestUpdate(oItem, mgrSQLite.Database.Local)
|
||||
If mgrManifest.DoManifestCheck(oItem.MonitorID, mgrSQLite.Database.Local) Then
|
||||
mgrManifest.DoManifestUpdateByMonitorID(oItem, mgrSQLite.Database.Local)
|
||||
Else
|
||||
mgrManifest.DoManifestAdd(oItem, mgrSQLite.Database.Local)
|
||||
End If
|
||||
@@ -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()
|
||||
@@ -85,20 +85,118 @@ Public Class mgrBackup
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Function VerifySavePath(ByVal oGame As clsGame) As String
|
||||
Dim sSavePath As String
|
||||
|
||||
If oGame.AbsolutePath = False Then
|
||||
If oGame.Path <> String.Empty Then
|
||||
sSavePath = oGame.ProcessPath & Path.DirectorySeparatorChar & oGame.Path
|
||||
Else
|
||||
sSavePath = oGame.ProcessPath
|
||||
End If
|
||||
Else
|
||||
sSavePath = oGame.Path
|
||||
End If
|
||||
|
||||
Return sSavePath
|
||||
End Function
|
||||
|
||||
Private Function GetFileName(ByVal oGame As clsGame) As String
|
||||
Dim sName As String
|
||||
|
||||
If oSettings.UseGameID Then
|
||||
sName = oGame.ID
|
||||
Else
|
||||
sName = oGame.FileSafeName
|
||||
End If
|
||||
|
||||
Return sName
|
||||
End Function
|
||||
|
||||
Public Function CheckBackupPrereq(ByVal oGame As clsGame) As Boolean
|
||||
Dim sBackupFile As String = oSettings.BackupFolder
|
||||
If oSettings.CreateSubFolder Then sBackupFile = sBackupFile & Path.DirectorySeparatorChar & oGame.Name
|
||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & oGame.Name & ".7z"
|
||||
Dim sSavePath As String
|
||||
Dim sOverwriteMessage As String
|
||||
Dim lAvailableSpace As Long
|
||||
Dim lFolderSize As Long = 0
|
||||
Dim sDeepFolder As String
|
||||
Dim bRegistry As Boolean
|
||||
Dim sExtension As String
|
||||
|
||||
If mgrRestore.CheckManifest(oGame.Name) Then
|
||||
If mgrCommon.ShowMessage(mgrBackup_ConfirmManifestConflict, oGame.Name, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
RaiseEvent UpdateLog(mgrBackup_ErrorManifestConflict, False, ToolTipIcon.Error, True)
|
||||
'Check if this is a registry backup
|
||||
bRegistry = mgrPath.IsSupportedRegistryPath(oGame.TruePath)
|
||||
|
||||
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 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
|
||||
|
||||
If oSettings.ShowOverwriteWarning And File.Exists(sBackupFile) And Not oGame.AppendTimeStamp Then
|
||||
If mgrCommon.ShowMessage(mgrBackup_ConfirmOverwrite, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
If oGame.AbsolutePath Then
|
||||
sOverwriteMessage = mgrBackup_ConfirmOverwrite
|
||||
Else
|
||||
sOverwriteMessage = mgrBackup_ConfirmOverwriteRelative
|
||||
End If
|
||||
|
||||
If mgrCommon.ShowMessage(sOverwriteMessage, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorOverwriteAbort, oGame.Name), False, ToolTipIcon.Error, True)
|
||||
Return False
|
||||
End If
|
||||
@@ -107,24 +205,268 @@ Public Class mgrBackup
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub CheckOldBackups(ByVal oGame As clsGame)
|
||||
Dim oGameBackups As List(Of clsBackup) = mgrManifest.DoManifestGetByMonitorID(oGame.ID, mgrSQLite.Database.Remote)
|
||||
Dim oGameBackup As clsBackup
|
||||
Dim sOldBackup As String
|
||||
Dim iBackupCount As Integer = oGameBackups.Count
|
||||
Dim iDelCount As Integer
|
||||
|
||||
'If we've hit or exceeded the maximum backup limit
|
||||
If oGameBackups.Count >= oGame.BackupLimit Then
|
||||
'How many do we need to delete
|
||||
iDelCount = (oGameBackups.Count - oGame.BackupLimit) + 1
|
||||
|
||||
'Delete the oldest backup(s) (Manifest entry and backup file)
|
||||
For i = 1 To iDelCount
|
||||
oGameBackup = oGameBackups(oGameBackups.Count - i)
|
||||
sOldBackup = Settings.BackupFolder & Path.DirectorySeparatorChar & oGameBackup.FileName
|
||||
|
||||
mgrManifest.DoManifestDeleteByManifestID(oGameBackup, mgrSQLite.Database.Remote)
|
||||
mgrManifest.DoManifestDeleteByManifestID(oGameBackup, mgrSQLite.Database.Local)
|
||||
mgrCommon.DeleteFile(sOldBackup)
|
||||
mgrCommon.DeleteDirectoryByBackup(Settings.BackupFolder & Path.DirectorySeparatorChar, oGameBackup)
|
||||
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_BackupLimitExceeded, Path.GetFileName(sOldBackup)), False, ToolTipIcon.Info, True)
|
||||
Next
|
||||
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
|
||||
@@ -132,105 +474,46 @@ Public Class mgrBackup
|
||||
RaiseEvent UpdateBackupInfo(oGame)
|
||||
|
||||
If oSettings.CreateSubFolder Then
|
||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & oGame.Name
|
||||
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
|
||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame)
|
||||
bDoBackup = HandleSubFolder(oGame, sBackupFile)
|
||||
End If
|
||||
|
||||
If mgrPath.IsSupportedRegistryPath(oGame.TruePath) Then
|
||||
sBackupExt = ".reg"
|
||||
Else
|
||||
sBackupExt = ".7z"
|
||||
End If
|
||||
|
||||
If oGame.AppendTimeStamp Then
|
||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & oGame.Name & sTimeStamp & ".7z"
|
||||
If oGame.BackupLimit > 0 Then CheckOldBackups(oGame)
|
||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame) & sTimeStamp & sBackupExt
|
||||
Else
|
||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & oGame.Name & ".7z"
|
||||
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame) & sBackupExt
|
||||
End If
|
||||
|
||||
If bDoBackup Then
|
||||
If oGame.AbsolutePath = False Then
|
||||
If oGame.Path <> String.Empty Then
|
||||
sSavePath = oGame.ProcessPath & Path.DirectorySeparatorChar & oGame.Path
|
||||
Else
|
||||
sSavePath = oGame.ProcessPath
|
||||
End If
|
||||
'Choose Backup Type
|
||||
If mgrPath.IsSupportedRegistryPath(oGame.TruePath) Then
|
||||
bBackupCompleted = RunRegistryBackup(oGame, sBackupFile)
|
||||
Else
|
||||
sSavePath = oGame.Path
|
||||
bBackupCompleted = Run7zBackup(oGame, sBackupFile)
|
||||
End If
|
||||
|
||||
If oGame.FolderSave = True Then
|
||||
BuildFileList(sSavePath, "*", mgrPath.IncludeFileLocation)
|
||||
Else
|
||||
BuildFileList(sSavePath, oGame.FileType, mgrPath.IncludeFileLocation)
|
||||
'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.DoListFieldUpdate("ProcessPath", oGame.ProcessPath, oGame.ID)
|
||||
End If
|
||||
End If
|
||||
|
||||
BuildFileList(sSavePath, oGame.ExcludeList, mgrPath.ExcludeFileLocation)
|
||||
|
||||
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
|
||||
If prs7z.ExitCode = 0 Then
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_BackupComplete, New String() {oGame.Name, mgrCommon.GetFileSize(sBackupFile)}), False, ToolTipIcon.Info, True)
|
||||
bBackupCompleted = True
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_BackupWarnings, oGame.Name), True, ToolTipIcon.Warning, True)
|
||||
bBackupCompleted = False
|
||||
End If
|
||||
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
|
||||
End If
|
||||
|
||||
'Write Main Manifest
|
||||
If bBackupCompleted Then
|
||||
If oSettings.CheckSum Then
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_GenerateHash, oGame.Name), False, ToolTipIcon.Info, True)
|
||||
sHash = mgrHash.Generate_SHA256_Hash(sBackupFile)
|
||||
End If
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
If bBackupCompleted Then
|
||||
|
||||
@@ -2,12 +2,15 @@
|
||||
Imports System.Net
|
||||
Imports System.IO
|
||||
Imports System.Security.Principal
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports System.Runtime.Serialization
|
||||
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 = "05ACEE3BAC0C6C4E396116EF27B953F992DE8D28DD14D317977F45692304C318" 'v16.02 7za.exe x64
|
||||
Private Shared sUtility32Hash As String = "7AA7056DB4348229A288EEF49027B94C0D8D1A3C3AEDC6FA89B640334C7B37E9" 'v16.02 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
|
||||
@@ -30,13 +33,38 @@ Public Class mgrCommon
|
||||
|
||||
Public Shared ReadOnly Property AppVersion As Integer
|
||||
Get
|
||||
Return (My.Application.Info.Version.Major * 100) + My.Application.Info.Version.Minor
|
||||
Return (My.Application.Info.Version.Major * 100) + (My.Application.Info.Version.Minor * 10) + My.Application.Info.Version.Build
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Shared Function CheckAddress(ByVal URL As String) As Boolean
|
||||
Public Shared ReadOnly Property DisplayAppVersion As String
|
||||
Get
|
||||
Return My.Application.Info.Version.Major & "." & My.Application.Info.Version.Minor & "." & My.Application.Info.Version.Build
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Shared Function SafeIconFromFile(ByVal sPath As String) As Image
|
||||
Dim oImage As Image
|
||||
Dim oReturnImage As Image
|
||||
Dim oImageSize As Size = New Size(48, 48)
|
||||
|
||||
oImage = Image.FromFile(sPath)
|
||||
oReturnImage = New Bitmap(oImage, oImageSize)
|
||||
oImage.Dispose()
|
||||
|
||||
Return oReturnImage
|
||||
End Function
|
||||
|
||||
Public Shared Function IsAddress(ByVal sURL As String) As Boolean
|
||||
If (sURL.IndexOf("http://", 0, StringComparison.CurrentCultureIgnoreCase) > -1) Or (sURL.IndexOf("https://", 0, StringComparison.CurrentCultureIgnoreCase) > -1) Then
|
||||
Return True
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Shared Function CheckAddress(ByVal sURL As String) As Boolean
|
||||
Try
|
||||
Dim request As WebRequest = WebRequest.Create(URL)
|
||||
Dim request As WebRequest = WebRequest.Create(sURL)
|
||||
Dim response As WebResponse = request.GetResponse()
|
||||
response.Close()
|
||||
Catch ex As Exception
|
||||
@@ -61,51 +89,171 @@ Public Class mgrCommon
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function SaveFileBrowser(ByVal sTitle As String, ByVal sExtension As String, ByVal sFileType As String, ByVal sDefaultFolder As String, ByVal sDefaultFile As String) As String
|
||||
Public Shared Function SaveFileBrowser(ByVal sName As String, ByVal sTitle As String, ByVal sExtension As String, ByVal sFileType As String, ByVal sDefaultFolder As String,
|
||||
ByVal sDefaultFile As String, Optional ByVal bSavedPath As Boolean = True) As String
|
||||
Dim fbBrowser As New SaveFileDialog
|
||||
Dim oSavedPath As New clsSavedPath
|
||||
|
||||
fbBrowser.Title = sTitle
|
||||
fbBrowser.DefaultExt = sExtension
|
||||
fbBrowser.Filter = FormatString(mgrCommon_FilesFilter, New String() {sFileType, sExtension, sExtension})
|
||||
fbBrowser.InitialDirectory = sDefaultFolder
|
||||
fbBrowser.FileName = sDefaultFile
|
||||
fbBrowser.InitialDirectory = sDefaultFolder
|
||||
|
||||
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 fbBrowser.FileName
|
||||
End If
|
||||
|
||||
Return String.Empty
|
||||
End Function
|
||||
|
||||
Public Shared Function OpenFileBrowser(ByVal sTitle As String, ByVal sExtension As String, ByVal sFileType As String, ByVal sDefaultFolder As String, ByVal bMulti As Boolean) 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
|
||||
fbBrowser.DefaultExt = sExtension
|
||||
fbBrowser.Filter = FormatString(mgrCommon_FilesFilter, New String() {sFileType, sExtension, sExtension})
|
||||
fbBrowser.InitialDirectory = sDefaultFolder
|
||||
fbBrowser.Multiselect = bMulti
|
||||
fbBrowser.InitialDirectory = sDefaultFolder
|
||||
|
||||
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 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
|
||||
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
|
||||
|
||||
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 sTitle As String, ByVal sDefaultFolder As String, ByVal bEnableNewFolder As Boolean) As String
|
||||
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
|
||||
|
||||
fbBrowser.Description = sTitle
|
||||
fbBrowser.SelectedPath = sDefaultFolder
|
||||
fbBrowser.ShowNewFolderButton = bEnableNewFolder
|
||||
|
||||
If bSavedPath Then
|
||||
oSavedPath = mgrSavedPath.GetPathByName(sName)
|
||||
If oSavedPath.Path <> String.Empty Then
|
||||
If Directory.Exists(oSavedPath.Path) Then
|
||||
fbBrowser.SelectedPath = oSavedPath.Path
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If fbBrowser.ShowDialog() = Windows.Forms.DialogResult.OK Then
|
||||
If bSavedPath Then
|
||||
oSavedPath.PathName = sName
|
||||
oSavedPath.Path = fbBrowser.SelectedPath
|
||||
mgrSavedPath.AddUpdatePath(oSavedPath)
|
||||
End If
|
||||
|
||||
Return fbBrowser.SelectedPath
|
||||
End If
|
||||
|
||||
@@ -116,16 +264,11 @@ Public Class mgrCommon
|
||||
Dim sExemptList As String() = {"dosbox", "scummvm"}
|
||||
Dim bFound As Boolean = False
|
||||
|
||||
'We can't search if we don't have a configuration
|
||||
If oGame.Temporary Then
|
||||
Return True
|
||||
End If
|
||||
|
||||
For Each s As String In sExemptList
|
||||
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
|
||||
@@ -140,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)
|
||||
@@ -157,12 +308,199 @@ Public Class mgrCommon
|
||||
oProcess.Start()
|
||||
End Sub
|
||||
|
||||
Public Shared Function SetSyncField(ByVal eSyncFields As clsGame.eOptionalSyncFields, ByVal eSyncField As clsGame.eOptionalSyncFields) As clsGame.eOptionalSyncFields
|
||||
Return eSyncFields Or eSyncField
|
||||
'Get a file size
|
||||
Public Shared Function GetFileSize(ByVal sFile As String) As Long
|
||||
Dim oFileInfo As FileInfo
|
||||
Dim dFileSize As Long = 0
|
||||
|
||||
Try
|
||||
oFileInfo = New FileInfo(sFile)
|
||||
dFileSize = oFileInfo.Length
|
||||
Catch ex As Exception
|
||||
'Do Nothing
|
||||
End Try
|
||||
|
||||
Return dFileSize
|
||||
End Function
|
||||
|
||||
Public Shared Function RemoveSyncField(ByVal eSyncFields As clsGame.eOptionalSyncFields, ByVal eSyncField As clsGame.eOptionalSyncFields) As clsGame.eOptionalSyncFields
|
||||
Return eSyncFields And (Not eSyncField)
|
||||
Public Shared Function WildcardToRegex(ByVal sPattern As String) As String
|
||||
Dim sRegEx As String
|
||||
sPattern = Regex.Escape(sPattern)
|
||||
sRegEx = sPattern.Replace("\*", ".*")
|
||||
sRegEx = sRegEx.Replace("\?", ".")
|
||||
Return sRegEx
|
||||
End Function
|
||||
|
||||
Public Shared Function CompareValueToArrayRegEx(ByVal sValue As String, ByVal sValues As String()) As Boolean
|
||||
For Each se As String In sValues
|
||||
If Regex.IsMatch(sValue, WildcardToRegex(se)) Then
|
||||
Return True
|
||||
End If
|
||||
Next
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Shared Function IsRegExValid(ByVal sPattern As String) As Boolean
|
||||
Dim oRegEx As Regex
|
||||
Try
|
||||
oRegEx = New Regex(sPattern)
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Return False
|
||||
End Try
|
||||
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(), Optional ByVal b7zStyleRecurse As Boolean = True) As Long
|
||||
Dim oFolder As DirectoryInfo
|
||||
Dim bInclude As Boolean
|
||||
Dim bExclude As Boolean
|
||||
Dim lSize As Long = 0
|
||||
|
||||
Try
|
||||
If Not Directory.Exists(sPath) Then Return lSize
|
||||
|
||||
oFolder = New DirectoryInfo(sPath)
|
||||
|
||||
'Files
|
||||
For Each fi As FileInfo In oFolder.EnumerateFiles()
|
||||
|
||||
If sInclude.Length > 0 Then
|
||||
bInclude = CompareValueToArrayRegEx(fi.FullName, sInclude)
|
||||
Else
|
||||
bInclude = True
|
||||
End If
|
||||
|
||||
If sExclude.Length > 0 Then
|
||||
bExclude = CompareValueToArrayRegEx(fi.FullName, sExclude)
|
||||
Else
|
||||
bExclude = False
|
||||
End If
|
||||
|
||||
If bInclude And Not bExclude Then
|
||||
lSize += fi.Length
|
||||
End If
|
||||
Next
|
||||
|
||||
'Sub Folders
|
||||
For Each di As DirectoryInfo In oFolder.EnumerateDirectories()
|
||||
If Not ((di.Attributes And FileAttributes.ReparsePoint) = FileAttributes.ReparsePoint) Then
|
||||
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
|
||||
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
|
||||
|
||||
Return lSize
|
||||
End Function
|
||||
|
||||
'Format Disk Space Amounts
|
||||
Public Shared Function FormatDiskSpace(ByVal lSize As Long)
|
||||
|
||||
Select Case lSize
|
||||
Case >= 1125899906842624
|
||||
Return FormatString(mgrCommon_PB, Math.Round(lSize / 1125899906842624, 2))
|
||||
Case >= 1099511627776
|
||||
Return FormatString(mgrCommon_TB, Math.Round(lSize / 1099511627776, 2))
|
||||
Case >= 1073741824
|
||||
Return FormatString(mgrCommon_GB, Math.Round(lSize / 1073741824, 2))
|
||||
Case >= 1048576
|
||||
Return FormatString(mgrCommon_MB, Math.Round(lSize / 1048576, 2))
|
||||
Case >= 1024
|
||||
Return FormatString(mgrCommon_KB, Math.Round(lSize / 1024, 2))
|
||||
Case >= 0
|
||||
Return FormatString(mgrCommon_B, lSize)
|
||||
End Select
|
||||
|
||||
Return lSize
|
||||
End Function
|
||||
|
||||
'Get available disk space on a drive (Unix)
|
||||
Private Shared Function GetAvailableDiskSpaceUnix(ByVal sPath As String) As Long
|
||||
Dim prsdf As Process
|
||||
Dim sOutput As String
|
||||
Dim sAvailableSpace As String
|
||||
Try
|
||||
prsdf = New Process
|
||||
prsdf.StartInfo.FileName = "/bin/df"
|
||||
prsdf.StartInfo.Arguments = """" & sPath & """"
|
||||
prsdf.StartInfo.UseShellExecute = False
|
||||
prsdf.StartInfo.RedirectStandardOutput = True
|
||||
prsdf.StartInfo.CreateNoWindow = True
|
||||
prsdf.Start()
|
||||
sOutput = prsdf.StandardOutput.ReadToEnd
|
||||
'Parse df output to grab "Available" value
|
||||
sAvailableSpace = sOutput.Split(vbLf)(1).Split(New Char() {" "}, StringSplitOptions.RemoveEmptyEntries)(3)
|
||||
'Return value in bytes
|
||||
Return CLng(sAvailableSpace) * 1024
|
||||
Catch
|
||||
Return 0
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'Get available disk space on a drive (Windows)
|
||||
Private Shared Function GetAvailableDiskSpaceWindows(ByVal sPath As String) As Long
|
||||
Dim oDrive As DriveInfo
|
||||
Dim lAvailableSpace As Long = 0
|
||||
Try
|
||||
oDrive = New DriveInfo(Path.GetPathRoot(sPath))
|
||||
lAvailableSpace = oDrive.AvailableFreeSpace
|
||||
Catch
|
||||
'Do Nothing
|
||||
End Try
|
||||
Return lAvailableSpace
|
||||
End Function
|
||||
|
||||
'Get available disk space on a drive
|
||||
Public Shared Function GetAvailableDiskSpace(ByVal sPath As String) As Long
|
||||
If IsUnix() Then
|
||||
Return GetAvailableDiskSpaceUnix(sPath)
|
||||
Else
|
||||
Return GetAvailableDiskSpaceWindows(sPath)
|
||||
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
|
||||
@@ -191,6 +529,54 @@ 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
|
||||
Dim sDir As String = sBackupFolder & oBackup.MonitorID
|
||||
|
||||
'Check if the sub-folder is an ID or Name
|
||||
If oBackup.FileName.StartsWith(oBackup.MonitorID & Path.DirectorySeparatorChar) Then
|
||||
sDir = sBackupFolder & oBackup.MonitorID
|
||||
ElseIf oBackup.FileName.StartsWith(oBackup.FileSafeName & Path.DirectorySeparatorChar) Then
|
||||
sDir = sBackupFolder & oBackup.FileSafeName
|
||||
Else
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
'Delete sub directory if it's empty
|
||||
If Directory.Exists(sDir) Then
|
||||
'Check if there's any sub-directories or files remaining
|
||||
oDir = New DirectoryInfo(sDir)
|
||||
If oDir.GetDirectories.Length = 0 And oDir.GetFiles.Length = 0 Then
|
||||
'Folder is empty, delete the empty sub-folder
|
||||
If Directory.Exists(sDir) Then DeleteDirectory(sDir)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Save string as text file
|
||||
Public Shared Sub SaveText(ByVal sText As String, ByVal sPath As String)
|
||||
Dim oStream As StreamWriter
|
||||
@@ -206,23 +592,24 @@ Public Class mgrCommon
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Get a file size
|
||||
Public Shared Function GetFileSize(ByVal sFile As String) As String
|
||||
Dim oFileInfo As FileInfo
|
||||
Dim dFileSize As Double
|
||||
'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
|
||||
|
||||
Try
|
||||
oFileInfo = New FileInfo(sFile)
|
||||
dFileSize = oFileInfo.Length
|
||||
If dFileSize > 1048576 Then
|
||||
Return FormatString(App_MB, Math.Round(dFileSize / 1048576, 2).ToString)
|
||||
Else
|
||||
Return FormatString(App_KB, Math.Round(dFileSize / 1024, 2).ToString)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Return String.Empty
|
||||
End Try
|
||||
End Function
|
||||
'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
|
||||
@@ -231,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
|
||||
@@ -238,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
|
||||
@@ -245,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)
|
||||
@@ -252,7 +690,6 @@ Public Class mgrCommon
|
||||
Return sString
|
||||
End Function
|
||||
|
||||
|
||||
'Handles single parameter stings
|
||||
Public Shared Function FormatString(ByVal sString As String, ByVal sParam As String) As String
|
||||
sString = sString.Replace("[BR]", vbCrLf)
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
Public Class mgrGameProcesses
|
||||
|
||||
Public Shared Sub DoGameProcessAdd(ByVal oGameProcess As clsGameProcess)
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
sSQL = "INSERT INTO gameprocesses VALUES (@ProcessID, @MonitorID)"
|
||||
hshParams.Add("ProcessID", oGameProcess.ProcessID)
|
||||
hshParams.Add("MonitorID", oGameProcess.MonitorID)
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
End Sub
|
||||
|
||||
Public Shared Sub DoGameProcessAddBatch(ByVal oGameProcesss As List(Of clsGameProcess))
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As Hashtable
|
||||
Dim oParamList As New List(Of Hashtable)
|
||||
|
||||
sSQL = "INSERT INTO gameprocesses VALUES (@ProcessID, @MonitorID);"
|
||||
|
||||
For Each oGameProcess As clsGameProcess In oGameProcesss
|
||||
hshParams = New Hashtable
|
||||
hshParams.Add("ProcessID", oGameProcess.ProcessID)
|
||||
hshParams.Add("MonitorID", oGameProcess.MonitorID)
|
||||
oParamList.Add(hshParams)
|
||||
Next
|
||||
|
||||
oDatabase.RunMassParamQuery(sSQL, oParamList)
|
||||
End Sub
|
||||
|
||||
Public Shared Sub DoGameProcessDelete(ByVal oGameProcesss As List(Of clsGameProcess))
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As Hashtable
|
||||
Dim oParamList As New List(Of Hashtable)
|
||||
|
||||
sSQL = "DELETE FROM gameprocesses "
|
||||
sSQL &= "WHERE ProcessID = @ProcessID AND MonitorID = @MonitorID;"
|
||||
|
||||
For Each oGameProcess As clsGameProcess In oGameProcesss
|
||||
hshParams = New Hashtable
|
||||
hshParams.Add("ProcessID", oGameProcess.ProcessID)
|
||||
hshParams.Add("MonitorID", oGameProcess.MonitorID)
|
||||
oParamList.Add(hshParams)
|
||||
Next
|
||||
|
||||
oDatabase.RunMassParamQuery(sSQL, oParamList)
|
||||
End Sub
|
||||
|
||||
Public Shared Sub DoGameProcessDeleteByGame(ByVal sMonitorID As String)
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
sSQL = "DELETE FROM gameprocesses "
|
||||
sSQL &= "WHERE MonitorID = @ID;"
|
||||
|
||||
hshParams.Add("ID", sMonitorID)
|
||||
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
End Sub
|
||||
|
||||
|
||||
Public Shared Sub DoGameProcessDeleteByProcess(ByVal sProcessID As String)
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
sSQL = "DELETE FROM gameprocesses "
|
||||
sSQL &= "WHERE ProcessID = @ID;"
|
||||
|
||||
hshParams.Add("ID", sProcessID)
|
||||
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
|
||||
End Sub
|
||||
|
||||
Public Shared Function GetProcessesByGame(ByVal sMonitorID As String) As Hashtable
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim oData As DataSet
|
||||
Dim sSQL As String
|
||||
Dim hshList As New Hashtable
|
||||
Dim hshParams As New Hashtable
|
||||
Dim oProcess As clsProcess
|
||||
|
||||
sSQL = "SELECT ProcessID, processes.Name, processes.Path, processes.Args, processes.Kill FROM gameprocesses NATURAL JOIN processes WHERE MonitorID = @ID"
|
||||
|
||||
hshParams.Add("ID", sMonitorID)
|
||||
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oProcess = New clsProcess
|
||||
oProcess.ID = CStr(dr("ProcessID"))
|
||||
oProcess.Name = CStr(dr("Name"))
|
||||
oProcess.Path = CStr(dr("Path"))
|
||||
If Not IsDBNull(dr("Args")) Then oProcess.Args = CStr(dr("Args"))
|
||||
oProcess.Kill = CBool(dr("Kill"))
|
||||
|
||||
hshList.Add(oProcess.ID, oProcess)
|
||||
Next
|
||||
|
||||
Return hshList
|
||||
End Function
|
||||
|
||||
Public Shared Function GetProcessesByGameMulti(ByVal sMonitorIDs As List(Of String)) As Hashtable
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim oData As DataSet
|
||||
Dim sSQL As String
|
||||
Dim hshList As New Hashtable
|
||||
Dim hshParams As New Hashtable
|
||||
Dim oProcess As clsProcess
|
||||
Dim iCounter As Integer
|
||||
|
||||
sSQL = "SELECT DISTINCT ProcessID, processes.Name, processes.Path, processes.Args, processes.Kill FROM gameprocesses NATURAL JOIN processes 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 &= ")"
|
||||
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oProcess = New clsProcess
|
||||
oProcess.ID = CStr(dr("ProcessID"))
|
||||
oProcess.Name = CStr(dr("Name"))
|
||||
oProcess.Path = CStr(dr("Path"))
|
||||
If Not IsDBNull(dr("Args")) Then oProcess.Args = CStr(dr("Args"))
|
||||
oProcess.Kill = CBool(dr("Kill"))
|
||||
hshList.Add(oProcess.ID, oProcess)
|
||||
Next
|
||||
|
||||
Return hshList
|
||||
End Function
|
||||
|
||||
Public Shared Function ReadGameProcesss() As Hashtable
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim oData As DataSet
|
||||
Dim sSQL As String
|
||||
Dim sCompoundKey As String
|
||||
Dim hshList As New Hashtable
|
||||
Dim oGameProcess As clsGameProcess
|
||||
|
||||
sSQL = "SELECT * from gameprocesses"
|
||||
oData = oDatabase.ReadParamData(sSQL, New Hashtable)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oGameProcess = New clsGameProcess
|
||||
oGameProcess.ProcessID = CStr(dr("ProcessID"))
|
||||
oGameProcess.MonitorID = CStr(dr("MonitorID"))
|
||||
sCompoundKey = oGameProcess.ProcessID & ":" & oGameProcess.MonitorID
|
||||
hshList.Add(sCompoundKey, oGameProcess)
|
||||
Next
|
||||
|
||||
Return hshList
|
||||
End Function
|
||||
End Class
|
||||
@@ -76,11 +76,11 @@
|
||||
|
||||
End Sub
|
||||
|
||||
Public Shared Function GetTagsByGame(ByVal sMonitorID As String) As Hashtable
|
||||
Public Shared Function GetTagsByGame(ByVal sMonitorID As String) As SortedList
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim oData As DataSet
|
||||
Dim sSQL As String
|
||||
Dim hshList As New Hashtable
|
||||
Dim slList As New SortedList
|
||||
Dim hshParams As New Hashtable
|
||||
Dim oTag As clsTag
|
||||
|
||||
@@ -94,10 +94,10 @@
|
||||
oTag = New clsTag
|
||||
oTag.ID = CStr(dr("TagID"))
|
||||
oTag.Name = CStr(dr("Name"))
|
||||
hshList.Add(oTag.Name, oTag)
|
||||
slList.Add(oTag.Name, oTag)
|
||||
Next
|
||||
|
||||
Return hshList
|
||||
Return slList
|
||||
End Function
|
||||
|
||||
Public Shared Function GetTagsByGameForExport(ByVal sMonitorID As String) As List(Of Tag)
|
||||
@@ -108,7 +108,7 @@
|
||||
Dim hshParams As New Hashtable
|
||||
Dim oTag As Tag
|
||||
|
||||
sSQL = "SELECT TagID, tags.Name FROM gametags NATURAL JOIN tags WHERE MonitorID = @ID"
|
||||
sSQL = "SELECT TagID, tags.Name FROM gametags NATURAL JOIN tags WHERE MonitorID = @ID ORDER BY tags.Name ASC"
|
||||
|
||||
hshParams.Add("ID", sMonitorID)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
Public Class mgrGlobals
|
||||
Public Shared LocalDatabaseHash As String = String.Empty
|
||||
Public Shared RemoteDatabaseHash As String = String.Empty
|
||||
End Class
|
||||
@@ -1,42 +1,152 @@
|
||||
Public Class mgrManifest
|
||||
|
||||
Public Shared Function ReadManifest(ByVal iSelectDB As mgrSQLite.Database) As SortedList
|
||||
Private Shared Function MapToObject(ByVal dr As DataRow) As clsBackup
|
||||
Dim oBackupItem As clsBackup
|
||||
|
||||
oBackupItem = New clsBackup
|
||||
oBackupItem.ManifestID = CStr(dr("ManifestID"))
|
||||
oBackupItem.MonitorID = CStr(dr("MonitorID"))
|
||||
oBackupItem.Name = CStr(dr("Name"))
|
||||
oBackupItem.FileName = CStr(dr("FileName"))
|
||||
oBackupItem.RestorePath = CStr(dr("Path"))
|
||||
oBackupItem.AbsolutePath = CBool(dr("AbsolutePath"))
|
||||
oBackupItem.DateUpdated = mgrCommon.UnixToDate(dr("DateUpdated"))
|
||||
oBackupItem.UpdatedBy = CStr(dr("UpdatedBy"))
|
||||
If Not IsDBNull(dr("CheckSum")) Then oBackupItem.CheckSum = CStr(dr("CheckSum"))
|
||||
|
||||
Return oBackupItem
|
||||
End Function
|
||||
|
||||
Private Shared Function SetCoreParameters(ByVal oBackupItem As clsBackup) As Hashtable
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
hshParams.Add("ManifestID", oBackupItem.ManifestID)
|
||||
hshParams.Add("MonitorID", oBackupItem.MonitorID)
|
||||
hshParams.Add("FileName", oBackupItem.FileName)
|
||||
hshParams.Add("DateUpdated", oBackupItem.DateUpdatedUnix)
|
||||
hshParams.Add("UpdatedBy", oBackupItem.UpdatedBy)
|
||||
hshParams.Add("CheckSum", oBackupItem.CheckSum)
|
||||
|
||||
Return hshParams
|
||||
End Function
|
||||
|
||||
Public Shared Function ReadFullManifest(ByVal iSelectDB As mgrSQLite.Database) As SortedList
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim oData As DataSet
|
||||
Dim sSQL As String
|
||||
Dim oBackupItem As clsBackup
|
||||
Dim slList As New SortedList
|
||||
|
||||
sSQL = "SELECT * from manifest ORDER BY Name Asc"
|
||||
sSQL = "SELECT * from manifest NATURAL JOIN monitorlist ORDER BY Name Asc"
|
||||
oData = oDatabase.ReadParamData(sSQL, New Hashtable)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oBackupItem = New clsBackup
|
||||
oBackupItem.ID = CStr(dr("ManifestID"))
|
||||
oBackupItem.Name = CStr(dr("Name"))
|
||||
oBackupItem.FileName = CStr(dr("FileName"))
|
||||
oBackupItem.RestorePath = CStr(dr("RestorePath"))
|
||||
oBackupItem.AbsolutePath = CBool(dr("AbsolutePath"))
|
||||
oBackupItem.DateUpdated = mgrCommon.UnixToDate(dr("DateUpdated"))
|
||||
oBackupItem.UpdatedBy = CStr(dr("UpdatedBy"))
|
||||
If Not IsDBNull(dr("CheckSum")) Then oBackupItem.CheckSum = CStr(dr("CheckSum"))
|
||||
slList.Add(oBackupItem.Name, oBackupItem)
|
||||
oBackupItem = MapToObject(dr)
|
||||
slList.Add(oBackupItem.ManifestID, oBackupItem)
|
||||
Next
|
||||
|
||||
Return slList
|
||||
|
||||
End Function
|
||||
|
||||
Public Shared Function DoManifestCheck(ByVal sName As String, ByVal iSelectDB As mgrSQLite.Database) As Boolean
|
||||
Public Shared Function ReadLatestManifest(ByVal iSelectDB As mgrSQLite.Database) As SortedList
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim oData As DataSet
|
||||
Dim sSQL As String
|
||||
Dim oBackupItem As clsBackup
|
||||
Dim slList As New SortedList
|
||||
|
||||
sSQL = "SELECT ManifestID, MonitorID, Name, FileName, Path, AbsolutePath, Max(DateUpdated) As DateUpdated, UpdatedBy, CheckSum FROM manifest NATURAL JOIN monitorlist GROUP BY Name ORDER By Name ASC"
|
||||
oData = oDatabase.ReadParamData(sSQL, New Hashtable)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oBackupItem = MapToObject(dr)
|
||||
slList.Add(oBackupItem.MonitorID, oBackupItem)
|
||||
Next
|
||||
|
||||
Return slList
|
||||
|
||||
End Function
|
||||
|
||||
Public Shared Function DoManifestGetByMonitorID(ByVal sMonitorID As String, ByVal iSelectDB As mgrSQLite.Database) As List(Of clsBackup)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim oData As DataSet
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
Dim oBackupItem As New clsBackup
|
||||
Dim oList As New List(Of clsBackup)
|
||||
|
||||
|
||||
sSQL = "SELECT * FROM manifest NATURAL JOIN monitorlist "
|
||||
sSQL &= "WHERE MonitorID = @MonitorID ORDER BY DateUpdated Desc"
|
||||
|
||||
hshParams.Add("MonitorID", sMonitorID)
|
||||
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oBackupItem = MapToObject(dr)
|
||||
oList.Add(oBackupItem)
|
||||
Next
|
||||
|
||||
Return oList
|
||||
End Function
|
||||
|
||||
Public Shared Function DoManifestGetByManifestID(ByVal sManifestID As String, ByVal iSelectDB As mgrSQLite.Database) As clsBackup
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim oData As DataSet
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
Dim oBackupItem As New clsBackup
|
||||
Dim oList As New List(Of clsBackup)
|
||||
|
||||
sSQL = "SELECT * FROM manifest NATURAL JOIN monitorlist "
|
||||
sSQL &= "WHERE ManifestID = @ManifestID ORDER BY DateUpdated Desc"
|
||||
|
||||
hshParams.Add("ManifestID", sManifestID)
|
||||
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oBackupItem = MapToObject(dr)
|
||||
Next
|
||||
|
||||
Return oBackupItem
|
||||
End Function
|
||||
|
||||
Public Shared Function DoUpdateLatestManifest(ByRef oItem As clsBackup, ByVal iSelectDB As mgrSQLite.Database) As Boolean
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim oData As Object
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
sSQL = "SELECT ManifestID FROM manifest NATURAL JOIN monitorlist "
|
||||
sSQL &= "WHERE MonitorID = @MonitorID ORDER BY DateUpdated DESC LIMIT 1"
|
||||
|
||||
hshParams.Add("MonitorID", oItem.MonitorID)
|
||||
|
||||
oData = oDatabase.ReadSingleValue(sSQL, hshParams)
|
||||
|
||||
If Not oData Is Nothing Then
|
||||
oItem.ManifestID = CStr(oData)
|
||||
DoManifestUpdateByManifestID(oItem, mgrSQLite.Database.Remote)
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
|
||||
End Function
|
||||
|
||||
Public Shared Function DoManifestCheck(ByVal sMonitorID As String, ByVal iSelectDB As mgrSQLite.Database) As Boolean
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim oData As DataSet
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
sSQL = "SELECT * from manifest "
|
||||
sSQL &= "WHERE Name = @Name"
|
||||
sSQL = "SELECT * FROM manifest "
|
||||
sSQL &= "WHERE MonitorID = @MonitorID"
|
||||
|
||||
hshParams.Add("Name", sName)
|
||||
hshParams.Add("MonitorID", sMonitorID)
|
||||
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
@@ -48,104 +158,68 @@
|
||||
|
||||
End Function
|
||||
|
||||
Public Shared Function DoManifestGetByName(ByVal sName As String, ByVal iSelectDB As mgrSQLite.Database) As clsBackup
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim oData As DataSet
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
Dim oBackupItem As New clsBackup
|
||||
|
||||
sSQL = "SELECT * from manifest "
|
||||
sSQL &= "WHERE Name = @Name"
|
||||
|
||||
hshParams.Add("Name", sName)
|
||||
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oBackupItem = New clsBackup
|
||||
oBackupItem.ID = CStr(dr("ManifestID"))
|
||||
oBackupItem.Name = CStr(dr("Name"))
|
||||
oBackupItem.FileName = CStr(dr("FileName"))
|
||||
oBackupItem.RestorePath = CStr(dr("RestorePath"))
|
||||
oBackupItem.AbsolutePath = CBool(dr("AbsolutePath"))
|
||||
oBackupItem.DateUpdated = mgrCommon.UnixToDate(dr("DateUpdated"))
|
||||
oBackupItem.UpdatedBy = CStr(dr("UpdatedBy"))
|
||||
If Not IsDBNull(dr("CheckSum")) Then oBackupItem.CheckSum = CStr(dr("CheckSum"))
|
||||
Next
|
||||
|
||||
Return oBackupItem
|
||||
End Function
|
||||
|
||||
Public Shared Sub DoManifestAdd(ByVal oBackupItem As clsBackup, ByVal iSelectDB As mgrSQLite.Database)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
Dim hshParams As Hashtable
|
||||
|
||||
sSQL = "INSERT OR REPLACE INTO manifest VALUES (@ID, @Name, @FileName, @Path, @AbsolutePath, @DateUpdated, @UpdatedBy, @CheckSum)"
|
||||
sSQL = "INSERT INTO manifest VALUES (@ManifestID, @MonitorID, @FileName, @DateUpdated, @UpdatedBy, @CheckSum)"
|
||||
|
||||
hshParams.Add("ID", oBackupItem.ID)
|
||||
hshParams.Add("Name", oBackupItem.Name)
|
||||
hshParams.Add("FileName", oBackupItem.FileName)
|
||||
hshParams.Add("Path", oBackupItem.TruePath)
|
||||
hshParams.Add("AbsolutePath", oBackupItem.AbsolutePath)
|
||||
hshParams.Add("DateUpdated", oBackupItem.DateUpdatedUnix)
|
||||
hshParams.Add("UpdatedBy", oBackupItem.UpdatedBy)
|
||||
hshParams.Add("CheckSum", oBackupItem.CheckSum)
|
||||
hshParams = SetCoreParameters(oBackupItem)
|
||||
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
End Sub
|
||||
|
||||
Public Shared Sub DoManifestUpdate(ByVal oBackupItem As clsBackup, ByVal iSelectDB As mgrSQLite.Database)
|
||||
Public Shared Sub DoManifestUpdateByMonitorID(ByVal oBackupItem As clsBackup, ByVal iSelectDB As mgrSQLite.Database)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
Dim hshParams As Hashtable
|
||||
|
||||
sSQL = "UPDATE manifest SET Name = @Name, FileName = @FileName, RestorePath = @Path, AbsolutePath = @AbsolutePath, "
|
||||
sSQL &= "DateUpdated = @DateUpdated, UpdatedBy = @UpdatedBy, CheckSum = @CheckSum WHERE Name = @QueryName"
|
||||
sSQL = "UPDATE manifest SET MonitorID = @MonitorID, FileName = @FileName, DateUpdated = @DateUpdated, "
|
||||
sSQL &= "UpdatedBy = @UpdatedBy, CheckSum = @CheckSum WHERE MonitorID = @QueryID"
|
||||
|
||||
hshParams.Add("Name", oBackupItem.Name)
|
||||
hshParams.Add("FileName", oBackupItem.FileName)
|
||||
hshParams.Add("Path", oBackupItem.TruePath)
|
||||
hshParams.Add("AbsolutePath", oBackupItem.AbsolutePath)
|
||||
hshParams.Add("DateUpdated", oBackupItem.DateUpdatedUnix)
|
||||
hshParams.Add("UpdatedBy", oBackupItem.UpdatedBy)
|
||||
hshParams.Add("CheckSum", oBackupItem.CheckSum)
|
||||
hshParams.Add("QueryName", oBackupItem.Name)
|
||||
hshParams = SetCoreParameters(oBackupItem)
|
||||
hshParams.Add("QueryID", oBackupItem.MonitorID)
|
||||
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
End Sub
|
||||
|
||||
Public Shared Sub DoManifestNameUpdate(ByVal sOriginalName As String, ByVal oBackupItem As clsBackup, ByVal iSelectDB As mgrSQLite.Database)
|
||||
Public Shared Sub DoManifestUpdateByManifestID(ByVal oBackupItem As clsBackup, ByVal iSelectDB As mgrSQLite.Database)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
Dim hshParams As Hashtable
|
||||
|
||||
sSQL = "UPDATE manifest SET Name = @Name, FileName = @FileName, RestorePath = @Path, AbsolutePath = @AbsolutePath, "
|
||||
sSQL &= "DateUpdated = @DateUpdated, UpdatedBy = @UpdatedBy, CheckSum = @CheckSum WHERE Name = @QueryName"
|
||||
sSQL = "UPDATE manifest SET MonitorID = @MonitorID, FileName = @FileName, DateUpdated = @DateUpdated, "
|
||||
sSQL &= "UpdatedBy = @UpdatedBy, CheckSum = @CheckSum WHERE ManifestID = @QueryID"
|
||||
|
||||
hshParams.Add("Name", oBackupItem.Name)
|
||||
hshParams.Add("FileName", oBackupItem.FileName)
|
||||
hshParams.Add("Path", oBackupItem.TruePath)
|
||||
hshParams.Add("AbsolutePath", oBackupItem.AbsolutePath)
|
||||
hshParams.Add("DateUpdated", oBackupItem.DateUpdatedUnix)
|
||||
hshParams.Add("UpdatedBy", oBackupItem.UpdatedBy)
|
||||
hshParams.Add("CheckSum", oBackupItem.CheckSum)
|
||||
hshParams.Add("QueryName", sOriginalName)
|
||||
hshParams = SetCoreParameters(oBackupItem)
|
||||
hshParams.Add("QueryID", oBackupItem.ManifestID)
|
||||
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
|
||||
End Sub
|
||||
|
||||
Public Shared Sub DoManifestDelete(ByVal oBackupItem As clsBackup, ByVal iSelectDB As mgrSQLite.Database)
|
||||
Public Shared Sub DoManifestDeleteByMonitorID(ByVal oBackupItem As clsBackup, ByVal iSelectDB As mgrSQLite.Database)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
sSQL = "DELETE FROM manifest "
|
||||
sSQL &= "WHERE Name = @Name"
|
||||
sSQL &= "WHERE MonitorID = @MonitorID"
|
||||
|
||||
hshParams.Add("Name", oBackupItem.Name)
|
||||
hshParams.Add("MonitorID", oBackupItem.MonitorID)
|
||||
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
End Sub
|
||||
|
||||
Public Shared Sub DoManifestDeleteByManifestID(ByVal oBackupItem As clsBackup, ByVal iSelectDB As mgrSQLite.Database)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
sSQL = "DELETE FROM manifest "
|
||||
sSQL &= "WHERE ManifestID = @ManifestID"
|
||||
|
||||
hshParams.Add("ManifestID", oBackupItem.ManifestID)
|
||||
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
End Sub
|
||||
|
||||
@@ -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,15 +101,29 @@ Public Class mgrPath
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Shared Function ValidateForFileSystem(ByVal sCheckString As String) As String
|
||||
Dim cInvalidCharacters As Char() = {"\", "/", ":", "*", "?", """", "<", ">", "|", "."}
|
||||
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, "")
|
||||
Next
|
||||
|
||||
If sCheckString.Length > 257 Then
|
||||
sCheckString = sCheckString.Substring(0, 257)
|
||||
Return sCheckString.Trim
|
||||
End Function
|
||||
|
||||
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 > 255 Then
|
||||
sCheckString = sCheckString.Substring(0, 255)
|
||||
End If
|
||||
|
||||
Return sCheckString.Trim
|
||||
@@ -192,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
|
||||
@@ -207,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
|
||||
@@ -248,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
|
||||
@@ -283,11 +513,12 @@ Public Class mgrPath
|
||||
|
||||
hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData))
|
||||
hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData))
|
||||
hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments))
|
||||
|
||||
'Don't use these in Unix
|
||||
If Not mgrCommon.IsUnix Then
|
||||
hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments))
|
||||
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
|
||||
|
||||
@@ -307,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
|
||||
@@ -316,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
|
||||
@@ -327,15 +560,19 @@ 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
|
||||
Dim sDefaultFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
|
||||
Dim sNewPath As String
|
||||
|
||||
sNewPath = mgrCommon.OpenFolderBrowser(mgrPath_ChoosePath, sDefaultFolder, False)
|
||||
sNewPath = mgrCommon.OpenFolderBrowser("Manual_Game_Location", mgrPath_ChoosePath, sDefaultFolder, False)
|
||||
|
||||
Return sNewPath
|
||||
End Function
|
||||
@@ -354,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
|
||||
@@ -363,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
|
||||
@@ -379,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()
|
||||
@@ -390,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
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
Public Class mgrProcess
|
||||
|
||||
Private Shared Function MapToObject(ByVal dr As DataRow) As clsProcess
|
||||
Dim oProcess As New clsProcess
|
||||
|
||||
oProcess.ID = CStr(dr("ProcessID"))
|
||||
oProcess.Name = CStr(dr("Name"))
|
||||
oProcess.Path = CStr(dr("Path"))
|
||||
If Not IsDBNull(dr("Args")) Then oProcess.Args = CStr(dr("Args"))
|
||||
oProcess.Kill = CBool(dr("Kill"))
|
||||
|
||||
Return oProcess
|
||||
End Function
|
||||
|
||||
Private Shared Function SetCoreParameters(ByVal oProcess As clsProcess) As Hashtable
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
hshParams.Add("ProcessID", oProcess.ID)
|
||||
hshParams.Add("Name", oProcess.Name)
|
||||
hshParams.Add("Path", oProcess.Path)
|
||||
hshParams.Add("Args", oProcess.Args)
|
||||
hshParams.Add("Kill", oProcess.Kill)
|
||||
|
||||
Return hshParams
|
||||
End Function
|
||||
|
||||
Public Shared Sub DoProcessAdd(ByVal oProcess As clsProcess)
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As Hashtable
|
||||
|
||||
sSQL = "INSERT INTO processes VALUES (@ProcessID, @Name, @Path, @Args, @Kill)"
|
||||
hshParams = SetCoreParameters(oProcess)
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
End Sub
|
||||
|
||||
Public Shared Sub DoProcessUpdate(ByVal oProcess As clsProcess)
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As Hashtable
|
||||
|
||||
sSQL = "UPDATE processes SET Name=@Name, Path=@Path, Args=@Args, Kill=@Kill "
|
||||
sSQL &= "WHERE ProcessID = @ProcessID"
|
||||
|
||||
hshParams = SetCoreParameters(oProcess)
|
||||
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
|
||||
End Sub
|
||||
|
||||
Public Shared Sub DoProcessDelete(ByVal sProcessID As String)
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
sSQL = "DELETE FROM gameprocesses "
|
||||
sSQL &= "WHERE ProcessID = @ProcessID;"
|
||||
sSQL &= "DELETE FROM processes "
|
||||
sSQL &= "WHERE ProcessID = @ProcessID;"
|
||||
|
||||
hshParams.Add("ProcessID", sProcessID)
|
||||
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
|
||||
End Sub
|
||||
|
||||
Public Shared Function DoProcessGetbyID(ByVal sProcessID As String) As clsProcess
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim sSQL As String
|
||||
Dim oData As DataSet
|
||||
Dim oProcess As New clsProcess
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
sSQL = "SELECT * FROM processes "
|
||||
sSQL &= "WHERE ProcessID = @ProcessID"
|
||||
|
||||
hshParams.Add("ProcessID", sProcessID)
|
||||
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oProcess = MapToObject(dr)
|
||||
Next
|
||||
|
||||
Return oProcess
|
||||
End Function
|
||||
|
||||
Public Shared Function DoProcessGetbyName(ByVal sProcessName As String) As clsProcess
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim sSQL As String
|
||||
Dim oData As DataSet
|
||||
Dim oProcess As New clsProcess
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
sSQL = "SELECT * FROM processes "
|
||||
sSQL &= "WHERE Name = @Name"
|
||||
|
||||
hshParams.Add("Name", sProcessName)
|
||||
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oProcess = MapToObject(dr)
|
||||
Next
|
||||
|
||||
Return oProcess
|
||||
End Function
|
||||
|
||||
Public Shared Function DoCheckDuplicate(ByVal sName As String, Optional ByVal sExcludeID As String = "") As Boolean
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim sSQL As String
|
||||
Dim oData As DataSet
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
sSQL = "SELECT * FROM processes "
|
||||
sSQL &= "WHERE Name = @Name"
|
||||
|
||||
hshParams.Add("Name", sName)
|
||||
|
||||
If sExcludeID <> String.Empty Then
|
||||
sSQL &= " AND ProcessID <> @ProcessID"
|
||||
hshParams.Add("ProcessID", sExcludeID)
|
||||
End If
|
||||
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
If oData.Tables(0).Rows.Count > 0 Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
|
||||
Public Shared Function ReadProcesses() As Hashtable
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim oData As DataSet
|
||||
Dim sSQL As String
|
||||
Dim hshList As New Hashtable
|
||||
Dim oProcess As clsProcess
|
||||
|
||||
sSQL = "SELECT * from processes"
|
||||
oData = oDatabase.ReadParamData(sSQL, New Hashtable)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oProcess = MapToObject(dr)
|
||||
hshList.Add(oProcess.Name, oProcess)
|
||||
Next
|
||||
|
||||
Return hshList
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,360 @@
|
||||
Imports System.IO
|
||||
Imports System.Management
|
||||
|
||||
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
|
||||
|
||||
Property FoundProcess As Process
|
||||
Get
|
||||
Return prsFoundProcess
|
||||
End Get
|
||||
Set(value As Process)
|
||||
prsFoundProcess = value
|
||||
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
|
||||
End Get
|
||||
Set(value As DateTime)
|
||||
dStartTime = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property EndTime As DateTime
|
||||
Get
|
||||
Return dEndTime
|
||||
End Get
|
||||
Set(value As DateTime)
|
||||
dEndTime = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
ReadOnly Property TimeSpent As TimeSpan
|
||||
Get
|
||||
Return dEndTime.Subtract(dStartTime)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property GameInfo As clsGame
|
||||
Get
|
||||
Return oGame
|
||||
End Get
|
||||
Set(value As clsGame)
|
||||
oGame = value
|
||||
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
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bDuplicates = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property DuplicateList As ArrayList
|
||||
Get
|
||||
Return oDuplicateGames
|
||||
End Get
|
||||
Set(value As ArrayList)
|
||||
oDuplicateGames = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'This function will only work correctly on Windows
|
||||
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()
|
||||
sFullCommand &= o("CommandLine") & " "
|
||||
Next
|
||||
End Using
|
||||
Catch
|
||||
'Do Nothing
|
||||
End Try
|
||||
Return sFullCommand
|
||||
End Function
|
||||
|
||||
'This function will only work correctly on Unix
|
||||
Private Function GetUnixCommand(ByVal prs As Process) As String
|
||||
Dim sFullCommand As String = String.Empty
|
||||
Try
|
||||
sFullCommand = File.ReadAllText("/proc/" & prs.Id.ToString() & "/cmdline").Replace(vbNullChar, " ")
|
||||
Catch
|
||||
'Do Nothing
|
||||
End Try
|
||||
|
||||
Return sFullCommand
|
||||
End Function
|
||||
|
||||
'This function will only work correctly on Unix
|
||||
Private Function GetUnixProcessArguments(ByVal prs As Process) As String()
|
||||
Dim sArguments As String
|
||||
Try
|
||||
sArguments = File.ReadAllText("/proc/" & prs.Id.ToString() & "/cmdline")
|
||||
Return sArguments.Split(vbNullChar)
|
||||
Catch ex As Exception
|
||||
Return New String() {String.Empty}
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'This function will only work correctly on Unix
|
||||
Private Function GetUnixSymLinkDirectory(ByVal prs As Process) As String
|
||||
Dim prsls As Process
|
||||
Dim slsinfo As String
|
||||
|
||||
Try
|
||||
prsls = New Process
|
||||
prsls.StartInfo.FileName = "/bin/readlink"
|
||||
prsls.StartInfo.Arguments = "-f /proc/" & prs.Id.ToString & "/cwd"
|
||||
prsls.StartInfo.UseShellExecute = False
|
||||
prsls.StartInfo.RedirectStandardOutput = True
|
||||
prsls.StartInfo.CreateNoWindow = True
|
||||
prsls.Start()
|
||||
slsinfo = prsls.StandardOutput.ReadToEnd()
|
||||
Return slsinfo.Trim()
|
||||
Catch ex As Exception
|
||||
Return String.Empty
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Function IsMatch(ByRef oGame As clsGame, ByRef sProcessCheck As String) As Boolean
|
||||
If oGame.IsRegEx Then
|
||||
Try
|
||||
If oGame.CompiledRegEx.IsMatch(sProcessCheck) Then
|
||||
Return True
|
||||
End If
|
||||
Catch
|
||||
'Ignore malformed regular expressions that may have passed validation
|
||||
End Try
|
||||
Else
|
||||
If oGame.ProcessName = sProcessCheck Then
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
|
||||
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 oDetectedGames As New ArrayList
|
||||
|
||||
For Each prsCurrent As Process In prsList
|
||||
'This needs to be wrapped due to issues with Mono.
|
||||
Try
|
||||
'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()
|
||||
'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 & " " & GetUnixCommand(prsCurrent) & vbCrLf
|
||||
ElseIf bDebugMode Then
|
||||
sProcessList &= prsCurrent.Id & " " & prsCurrent.ProcessName & " " & GetWindowsCommand(prsCurrent) & vbCrLf
|
||||
End If
|
||||
Catch ex As Exception
|
||||
'Do Nothing
|
||||
End Try
|
||||
|
||||
For Each oCurrentGame As clsGame In hshScanList.Values
|
||||
If IsMatch(oCurrentGame, sProcessCheck) Then
|
||||
prsFoundProcess = prsCurrent
|
||||
oGame = oCurrentGame.ShallowCopy
|
||||
oDetectedGames.Add(oGame.ShallowCopy)
|
||||
End If
|
||||
Next
|
||||
|
||||
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)
|
||||
Else
|
||||
oGame.ProcessPath = GetUnixSymLinkDirectory(prsCurrent)
|
||||
End If
|
||||
Catch exWin32 As System.ComponentModel.Win32Exception
|
||||
If exWin32.NativeErrorCode = 5 Then
|
||||
bNeedsPath = True
|
||||
iErrorCode = 5
|
||||
ElseIf exWin32.NativeErrorCode = 299 Then
|
||||
bNeedsPath = True
|
||||
iErrorCode = 299
|
||||
Else
|
||||
If bDebugMode Then mgrCommon.ShowMessage(exWin32.NativeErrorCode & " " & exWin32.Message & vbCrLf & vbCrLf & exWin32.StackTrace, MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End If
|
||||
Catch exAll As Exception
|
||||
If bDebugMode Then mgrCommon.ShowMessage(exAll.Message & vbCrLf & vbCrLf & exAll.StackTrace, MsgBoxStyle.Critical)
|
||||
Return False
|
||||
End Try
|
||||
End If
|
||||
|
||||
'This will force two cycles for detection to try and prevent issues with UAC prompt
|
||||
If Not bVerified Then
|
||||
bVerified = True
|
||||
Return False
|
||||
Else
|
||||
bVerified = False
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If bDebugMode Then mgrCommon.SaveText(sProcessList, mgrPath.SettingsRoot & "/gbm_process_list.txt")
|
||||
|
||||
Return False
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -1,208 +0,0 @@
|
||||
Imports System.Diagnostics
|
||||
Imports System.IO
|
||||
Imports System.Threading
|
||||
|
||||
Public Class mgrProcesses
|
||||
|
||||
Private prsFoundProcess As Process
|
||||
Private dStartTime As DateTime = Now, dEndTime As DateTime = Now
|
||||
Private lTimeSpent As Long = 0
|
||||
Private oGame As clsGame
|
||||
Private oDuplicateGames As New ArrayList
|
||||
Private bDuplicates As Boolean
|
||||
Private bVerified As Boolean = False
|
||||
|
||||
Property FoundProcess As Process
|
||||
Get
|
||||
Return prsFoundProcess
|
||||
End Get
|
||||
Set(value As Process)
|
||||
prsFoundProcess = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property StartTime As DateTime
|
||||
Get
|
||||
Return dStartTime
|
||||
End Get
|
||||
Set(value As DateTime)
|
||||
dStartTime = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property EndTime As DateTime
|
||||
Get
|
||||
Return dEndTime
|
||||
End Get
|
||||
Set(value As DateTime)
|
||||
dEndTime = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
ReadOnly Property TimeSpent As TimeSpan
|
||||
Get
|
||||
Return dEndTime.Subtract(dStartTime)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Property GameInfo As clsGame
|
||||
Get
|
||||
Return oGame
|
||||
End Get
|
||||
Set(value As clsGame)
|
||||
oGame = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Duplicate As Boolean
|
||||
Get
|
||||
Return bDuplicates
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bDuplicates = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property DuplicateList As ArrayList
|
||||
Get
|
||||
Return oDuplicateGames
|
||||
End Get
|
||||
Set(value As ArrayList)
|
||||
oDuplicateGames = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Sub VerifyDuplicate(oGame As clsGame, hshScanList As Hashtable)
|
||||
Dim sProcess As String
|
||||
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 Then
|
||||
oDuplicateGames.Add(o.ShallowCopy)
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
'This function will only work correctly on Unix
|
||||
Private Function GetUnixProcessArguments(ByVal prs As Process) As String()
|
||||
Dim sArguments As String
|
||||
Try
|
||||
sArguments = File.ReadAllText("/proc/" & prs.Id.ToString() & "/cmdline")
|
||||
Return sArguments.Split(vbNullChar)
|
||||
Catch ex As Exception
|
||||
Return New String() {String.Empty}
|
||||
End Try
|
||||
End Function
|
||||
|
||||
'This function will only work correctly on Unix
|
||||
Private Function GetUnixSymLinkDirectory(ByVal prs As Process) As String
|
||||
Dim prsls As Process
|
||||
Dim slsinfo As String()
|
||||
|
||||
'This is the best way I can think of to determine the end point of a symlink without doing even more crazy shit
|
||||
Try
|
||||
prsls = New Process
|
||||
prsls.StartInfo.FileName = "/bin/bash"
|
||||
prsls.StartInfo.Arguments = "-c ""ls -l /proc/" & prs.Id.ToString & " | grep cwd"""
|
||||
prsls.StartInfo.UseShellExecute = False
|
||||
prsls.StartInfo.RedirectStandardOutput = True
|
||||
prsls.StartInfo.CreateNoWindow = True
|
||||
prsls.Start()
|
||||
slsinfo = prsls.StandardOutput.ReadToEnd().Split(">")
|
||||
Return slsinfo(slsinfo.Length - 1).Trim
|
||||
Catch ex As Exception
|
||||
Return String.Empty
|
||||
End Try
|
||||
End Function
|
||||
|
||||
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
|
||||
|
||||
For Each prsCurrent As Process In prsList
|
||||
'This needs to be wrapped due to issues with Mono.
|
||||
Try
|
||||
sProcessCheck = prsCurrent.ProcessName
|
||||
|
||||
'Unix Handler
|
||||
'We need some special handling for Wine processes
|
||||
If mgrCommon.IsUnix And sProcessCheck.ToLower = "wine-preloader" Then
|
||||
Dim sWinePath As String()
|
||||
'We can't use Path.GetFileName here, Wine uses the Windows seperator in arguments and the Unix version of the function expects a different one.
|
||||
sWinePath = GetUnixProcessArguments(prsCurrent)(0).Split("\")
|
||||
sProcessCheck = sWinePath(sWinePath.Length - 1).Replace(".exe", "")
|
||||
bWineProcess = True
|
||||
Else
|
||||
bWineProcess = False
|
||||
End If
|
||||
|
||||
If bDebugMode And mgrCommon.IsUnix Then
|
||||
sProcessList &= prsCurrent.Id & " " & prsCurrent.ProcessName & " " & GetUnixProcessArguments(prsCurrent)(0) & vbCrLf
|
||||
ElseIf bDebugMode Then
|
||||
sProcessList &= prsCurrent.Id & " " & prsCurrent.ProcessName & vbCrLf
|
||||
End If
|
||||
Catch ex As Exception
|
||||
'Do Nothing
|
||||
End Try
|
||||
|
||||
If hshScanList.ContainsKey(sProcessCheck) Then
|
||||
prsFoundProcess = prsCurrent
|
||||
oGame = DirectCast(hshScanList.Item(sProcessCheck), clsGame).ShallowCopy
|
||||
|
||||
If oGame.Duplicate = True Then
|
||||
VerifyDuplicate(oGame, hshScanList)
|
||||
Else
|
||||
bDuplicates = False
|
||||
oDuplicateGames.Clear()
|
||||
End If
|
||||
|
||||
If Not oGame.AbsolutePath Or oGame.Duplicate Then
|
||||
Try
|
||||
If Not bWineProcess Then
|
||||
oGame.ProcessPath = Path.GetDirectoryName(prsCurrent.MainModule.FileName)
|
||||
Else
|
||||
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
|
||||
ElseIf exWin32.NativeErrorCode = 299 Then
|
||||
bNeedsPath = True
|
||||
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.
|
||||
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.
|
||||
Return False
|
||||
End Try
|
||||
End If
|
||||
|
||||
'This will force two cycles for detection to try and prevent issues with UAC prompt
|
||||
If Not bVerified Then
|
||||
bVerified = True
|
||||
Return False
|
||||
Else
|
||||
bVerified = False
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If bDebugMode Then mgrCommon.SaveText(sProcessList, mgrPath.SettingsRoot & "/gbm_process_list.txt")
|
||||
|
||||
Return False
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -28,30 +28,16 @@ Public Class mgrRestore
|
||||
Public Event UpdateRestoreInfo(oRestoreInfo As clsBackup)
|
||||
Public Event SetLastAction(sMessage As String)
|
||||
|
||||
Public Shared Sub DoPathOverride(ByRef oCheckBackup As clsBackup, ByVal oCheckGame As clsGame)
|
||||
'Always override the manifest restore path with the current configuration path if possible
|
||||
If Not oCheckGame.Temporary Then
|
||||
If Path.IsPathRooted(oCheckGame.Path) Then
|
||||
oCheckBackup.AbsolutePath = True
|
||||
Else
|
||||
oCheckBackup.AbsolutePath = False
|
||||
End If
|
||||
oCheckBackup.RestorePath = oCheckGame.Path
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Shared Function CheckPath(ByRef oRestoreInfo As clsBackup, ByVal oGame As clsGame, ByRef bTriggerReload As Boolean) As Boolean
|
||||
Dim sProcess As String
|
||||
Dim sRestorePath As String
|
||||
Dim bNoAuto As Boolean
|
||||
|
||||
DoPathOverride(oRestoreInfo, oGame)
|
||||
|
||||
If Not oRestoreInfo.AbsolutePath Then
|
||||
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)
|
||||
|
||||
@@ -72,7 +58,7 @@ Public Class mgrRestore
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Shared Function CheckManifest(ByVal sAppName As String) As Boolean
|
||||
Public Shared Function CheckManifest(ByVal sMonitorID As String) As Boolean
|
||||
Dim slLocalManifest As SortedList
|
||||
Dim slRemoteManifest As SortedList
|
||||
Dim oLocalItem As New clsBackup
|
||||
@@ -80,24 +66,22 @@ Public Class mgrRestore
|
||||
Dim bLocal As Boolean = False
|
||||
Dim bRemote As Boolean = False
|
||||
|
||||
slLocalManifest = mgrManifest.ReadManifest(mgrSQLite.Database.Local)
|
||||
slRemoteManifest = mgrManifest.ReadManifest(mgrSQLite.Database.Remote)
|
||||
slLocalManifest = mgrManifest.ReadLatestManifest(mgrSQLite.Database.Local)
|
||||
slRemoteManifest = mgrManifest.ReadLatestManifest(mgrSQLite.Database.Remote)
|
||||
|
||||
If slLocalManifest.Contains(sAppName) Then
|
||||
oLocalItem = DirectCast(slLocalManifest(sAppName), clsBackup)
|
||||
If slLocalManifest.Contains(sMonitorID) Then
|
||||
oLocalItem = DirectCast(slLocalManifest(sMonitorID), clsBackup)
|
||||
bLocal = True
|
||||
End If
|
||||
|
||||
If slRemoteManifest.Contains(sAppName) Then
|
||||
oRemoteItem = DirectCast(slRemoteManifest(sAppName), clsBackup)
|
||||
If slRemoteManifest.Contains(sMonitorID) Then
|
||||
oRemoteItem = DirectCast(slRemoteManifest(sMonitorID), clsBackup)
|
||||
bRemote = True
|
||||
End If
|
||||
|
||||
If bLocal And bRemote Then
|
||||
'Compare
|
||||
If oRemoteItem.DateUpdated > oLocalItem.DateUpdated Then
|
||||
oRemoteItem.LastDateUpdated = oLocalItem.DateUpdated
|
||||
oRemoteItem.LastUpdatedBy = oLocalItem.UpdatedBy
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
@@ -117,172 +101,230 @@ Public Class mgrRestore
|
||||
Dim bLocal As Boolean = False
|
||||
Dim bRemote As Boolean = False
|
||||
|
||||
slLocalManifest = mgrManifest.ReadManifest(mgrSQLite.Database.Local)
|
||||
slRemoteManifest = mgrManifest.ReadManifest(mgrSQLite.Database.Remote)
|
||||
slLocalManifest = mgrManifest.ReadLatestManifest(mgrSQLite.Database.Local)
|
||||
slRemoteManifest = mgrManifest.ReadLatestManifest(mgrSQLite.Database.Remote)
|
||||
|
||||
For Each oItem As clsBackup In slRemoteManifest.Values
|
||||
If slLocalManifest.Contains(oItem.Name) Then
|
||||
oLocalItem = DirectCast(slLocalManifest(oItem.Name), clsBackup)
|
||||
If slLocalManifest.Contains(oItem.MonitorID) Then
|
||||
oLocalItem = DirectCast(slLocalManifest(oItem.MonitorID), clsBackup)
|
||||
|
||||
If oItem.DateUpdated > oLocalItem.DateUpdated Then
|
||||
oLocalItem.FileName = oItem.FileName
|
||||
oLocalItem.LastDateUpdated = oItem.DateUpdated
|
||||
oLocalItem.LastUpdatedBy = oItem.UpdatedBy
|
||||
slRestoreItems.Add(oLocalItem.Name, oLocalItem)
|
||||
slRestoreItems.Add(oItem.MonitorID, oItem)
|
||||
End If
|
||||
Else
|
||||
oLocalItem = oItem
|
||||
oLocalItem.LastDateUpdated = oItem.DateUpdated
|
||||
oLocalItem.LastUpdatedBy = oItem.UpdatedBy
|
||||
oLocalItem.DateUpdated = Nothing
|
||||
oLocalItem.UpdatedBy = Nothing
|
||||
slRestoreItems.Add(oLocalItem.Name, oLocalItem)
|
||||
slRestoreItems.Add(oItem.MonitorID, oItem)
|
||||
End If
|
||||
Next
|
||||
|
||||
Return slRestoreItems
|
||||
End Function
|
||||
|
||||
Public Shared Function SyncLocalManifest() As SortedList
|
||||
Dim slLocalManifest As SortedList
|
||||
Dim slRemoteManifest As SortedList
|
||||
Dim slRemovedItems As New SortedList
|
||||
|
||||
slLocalManifest = mgrManifest.ReadManifest(mgrSQLite.Database.Local)
|
||||
slRemoteManifest = mgrManifest.ReadManifest(mgrSQLite.Database.Remote)
|
||||
|
||||
For Each oItem As clsBackup In slLocalManifest.Values
|
||||
If Not slRemoteManifest.Contains(oItem.Name) Then
|
||||
slRemovedItems.Add(oItem.Name, oItem)
|
||||
mgrManifest.DoManifestDelete(oItem, mgrSQLite.Database.Local)
|
||||
End If
|
||||
Next
|
||||
|
||||
Return slRemovedItems
|
||||
End Function
|
||||
|
||||
Public Function CheckRestorePrereq(ByVal oBackupInfo As clsBackup) As Boolean
|
||||
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
|
||||
|
||||
'Check if this is a registry backup
|
||||
bRegistry = mgrPath.IsSupportedRegistryPath(oBackupInfo.TruePath)
|
||||
|
||||
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 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
|
||||
|
||||
'Check file integrity
|
||||
If oBackupInfo.CheckSum <> String.Empty Then
|
||||
sHash = mgrHash.Generate_SHA256_Hash(sBackupFile)
|
||||
If sHash <> oBackupInfo.CheckSum Then
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorFailedCheck, oBackupInfo.Name), False, ToolTipIcon.Info, True)
|
||||
If mgrCommon.ShowMessage(mgrRestore_ConfirmFailedCheck, oBackupInfo.Name, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
RaiseEvent UpdateLog(mgrRestore_ErrorCheckAbort, False, ToolTipIcon.Info, True)
|
||||
Return False
|
||||
End If
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_Verified, oBackupInfo.Name), False, ToolTipIcon.Info, True)
|
||||
End If
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_NoVerify, oBackupInfo.Name), False, ToolTipIcon.Info, True)
|
||||
End If
|
||||
|
||||
|
||||
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
|
||||
|
||||
'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
|
||||
End If
|
||||
|
||||
'Check file integrity
|
||||
If oSettings.CheckSum Then
|
||||
If oBackupInfo.CheckSum <> String.Empty Then
|
||||
sHash = mgrHash.Generate_SHA256_Hash(sBackupFile)
|
||||
If sHash <> oBackupInfo.CheckSum Then
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorFailedCheck, oBackupInfo.Name), False, ToolTipIcon.Info, True)
|
||||
If mgrCommon.ShowMessage(mgrRestore_ConfirmFailedCheck, oBackupInfo.Name, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||
RaiseEvent UpdateLog(mgrRestore_ErrorCheckAbort, False, ToolTipIcon.Info, True)
|
||||
Return False
|
||||
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(mgrCommon.FormatString(mgrRestore_Verified, oBackupInfo.Name), False, ToolTipIcon.Info, True)
|
||||
RaiseEvent UpdateLog(App_Invalid7zDetected, True, ToolTipIcon.Error, True)
|
||||
End If
|
||||
Else
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_NoVerify, oBackupInfo.Name), False, ToolTipIcon.Info, True)
|
||||
RaiseEvent UpdateLog(mgrRestore_ErrorNoBackup, True, ToolTipIcon.Error, True)
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorOtherFailure, ex.Message), False, ToolTipIcon.Error, True)
|
||||
End Try
|
||||
|
||||
Return True
|
||||
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.Name, mgrSQLite.Database.Local) Then
|
||||
mgrManifest.DoManifestUpdate(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))
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -27,17 +27,17 @@ Public Class mgrSQLite
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub BackupDB(ByVal sLastVer As String)
|
||||
Public Sub BackupDB(ByVal sDescription As String, Optional ByVal bOverwrite As Boolean = False)
|
||||
Dim sNewFile As String = String.Empty
|
||||
|
||||
Try
|
||||
Select Case eDatabase
|
||||
Case Database.Local
|
||||
sNewFile = mgrPath.DatabaseLocation & "." & sLastVer & ".bak"
|
||||
File.Copy(mgrPath.DatabaseLocation, sNewFile, False)
|
||||
sNewFile = mgrPath.DatabaseLocation & "." & sDescription & ".bak"
|
||||
File.Copy(mgrPath.DatabaseLocation, sNewFile, bOverwrite)
|
||||
Case Database.Remote
|
||||
sNewFile = mgrPath.RemoteDatabaseLocation & "." & sLastVer & ".bak"
|
||||
File.Copy(mgrPath.RemoteDatabaseLocation, sNewFile, False)
|
||||
sNewFile = mgrPath.RemoteDatabaseLocation & "." & sDescription & ".bak"
|
||||
File.Copy(mgrPath.RemoteDatabaseLocation, sNewFile, bOverwrite)
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
mgrCommon.ShowMessage(mgrSQLite_ErrorBackupFailure, New String() {sNewFile, ex.Message}, MsgBoxStyle.Exclamation)
|
||||
@@ -72,15 +72,20 @@ Public Class mgrSQLite
|
||||
'Add Tables (Settings)
|
||||
sSql = "CREATE TABLE settings (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, CheckSum 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);"
|
||||
"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, 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);"
|
||||
|
||||
'Add Tables (Monitor List)
|
||||
sSql &= "CREATE TABLE monitorlist (MonitorID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL, Process TEXT NOT NULL, Path TEXT, " &
|
||||
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, " &
|
||||
"PRIMARY KEY(Name, Process));"
|
||||
"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); "
|
||||
@@ -92,8 +97,20 @@ Public Class mgrSQLite
|
||||
sSql &= "CREATE TABLE variables (VariableID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL PRIMARY KEY, Path TEXT NOT NULL);"
|
||||
|
||||
'Add Tables (Local Manifest)
|
||||
sSql &= "CREATE TABLE manifest (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 (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 (Sessions)
|
||||
sSql &= "CREATE TABLE sessions (MonitorID TEXT NOT NULL, Start INTEGER NOT NULL, End INTEGER NOT NULL, PRIMARY KEY(MonitorID, Start));"
|
||||
|
||||
'Add Tables (Processes)
|
||||
sSql &= "CREATE TABLE processes (ProcessID TEXT NOT NULL PRIMARY KEY, Name Text NOT NULL, Path TEXT NOT NULL, Args TEXT, Kill BOOLEAN NOT NULL);"
|
||||
|
||||
'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
|
||||
@@ -111,23 +128,24 @@ Public Class mgrSQLite
|
||||
|
||||
Try
|
||||
'Create the DB
|
||||
SQLiteConnection.CreateFile(sDatabaseLocation)
|
||||
SqliteConnection.CreateFile(sDatabaseLocation)
|
||||
|
||||
'Add Tables (Remote Monitor List)
|
||||
sSql = "CREATE TABLE monitorlist (MonitorID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL, Process TEXT NOT NULL, Path TEXT, " &
|
||||
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, " &
|
||||
"PRIMARY KEY(Name, Process));"
|
||||
"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 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 (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
|
||||
@@ -155,7 +173,7 @@ Public Class mgrSQLite
|
||||
|
||||
Public Sub Connect()
|
||||
If CheckDB() Then
|
||||
db = New SQLiteConnection(sConnectString)
|
||||
db = New SqliteConnection(sConnectString)
|
||||
db.Open()
|
||||
Else
|
||||
CreateDB()
|
||||
@@ -167,18 +185,27 @@ Public Class mgrSQLite
|
||||
db.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub BuildParams(ByRef command As SQLiteCommand, ByRef hshParams As Hashtable)
|
||||
Private Sub RollBack(ByRef trans As SqliteTransaction)
|
||||
Try
|
||||
trans.Rollback()
|
||||
Catch
|
||||
'SQLite may or may not perform an auto-rollback when certain failures occur, such as disk full or out of memory.
|
||||
'Multiple rollbacks will cause an exception, therefore lets just do nothing when that happens.
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub BuildParams(ByRef command As SqliteCommand, ByRef hshParams As Hashtable)
|
||||
For Each de As DictionaryEntry In hshParams
|
||||
command.Parameters.AddWithValue(de.Key, de.Value)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Function RunParamQuery(ByVal sSQL As String, ByVal hshParams As Hashtable) As Boolean
|
||||
Dim trans As SQLiteTransaction
|
||||
Dim command As SQLiteCommand
|
||||
Dim trans As SqliteTransaction
|
||||
Dim command As SqliteCommand
|
||||
|
||||
Connect()
|
||||
command = New SQLiteCommand(sSQL, db)
|
||||
command = New SqliteCommand(sSQL, db)
|
||||
BuildParams(command, hshParams)
|
||||
trans = db.BeginTransaction()
|
||||
|
||||
@@ -186,7 +213,7 @@ Public Class mgrSQLite
|
||||
command.ExecuteNonQuery()
|
||||
trans.Commit()
|
||||
Catch ex As Exception
|
||||
trans.Rollback()
|
||||
RollBack(trans)
|
||||
mgrCommon.ShowMessage(mgrSQLite_ErrorQueryFailure, New String() {sSQL, ex.Message}, MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
Finally
|
||||
@@ -198,11 +225,11 @@ Public Class mgrSQLite
|
||||
End Function
|
||||
|
||||
Public Function RunMassParamQuery(ByVal sSQL As String, ByVal oParamList As List(Of Hashtable)) As Boolean
|
||||
Dim trans As SQLiteTransaction
|
||||
Dim command As SQLiteCommand
|
||||
Dim trans As SqliteTransaction
|
||||
Dim command As SqliteCommand
|
||||
|
||||
Connect()
|
||||
command = New SQLiteCommand(sSQL, db)
|
||||
command = New SqliteCommand(sSQL, db)
|
||||
trans = db.BeginTransaction()
|
||||
|
||||
Try
|
||||
@@ -212,7 +239,7 @@ Public Class mgrSQLite
|
||||
Next
|
||||
trans.Commit()
|
||||
Catch ex As Exception
|
||||
trans.Rollback()
|
||||
RollBack(trans)
|
||||
mgrCommon.ShowMessage(mgrSQLite_ErrorQueryFailure, New String() {sSQL, ex.Message}, MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
Finally
|
||||
@@ -224,12 +251,12 @@ Public Class mgrSQLite
|
||||
End Function
|
||||
|
||||
Public Function ReadParamData(ByVal sSQL As String, ByVal hshParams As Hashtable) As DataSet
|
||||
Dim adapter As SQLiteDataAdapter
|
||||
Dim command As SQLiteCommand
|
||||
Dim adapter As SqliteDataAdapter
|
||||
Dim command As SqliteCommand
|
||||
Dim oData As New DataSet
|
||||
|
||||
Connect()
|
||||
command = New SQLiteCommand(sSQL, db)
|
||||
command = New SqliteCommand(sSQL, db)
|
||||
BuildParams(command, hshParams)
|
||||
|
||||
Try
|
||||
@@ -246,6 +273,27 @@ Public Class mgrSQLite
|
||||
Return oData
|
||||
End Function
|
||||
|
||||
Public Function ReadSingleValue(ByVal sSQL As String, ByVal hshParams As Hashtable) As Object
|
||||
|
||||
Dim command As SqliteCommand
|
||||
Dim oResult As New Object
|
||||
|
||||
Connect()
|
||||
command = New SqliteCommand(sSQL, db)
|
||||
BuildParams(command, hshParams)
|
||||
|
||||
Try
|
||||
oResult = command.ExecuteScalar()
|
||||
Catch ex As Exception
|
||||
mgrCommon.ShowMessage(mgrSQLite_ErrorQueryFailure, New String() {sSQL, ex.Message}, MsgBoxStyle.Information)
|
||||
Finally
|
||||
command.Dispose()
|
||||
Disconnect()
|
||||
End Try
|
||||
|
||||
Return oResult
|
||||
End Function
|
||||
|
||||
Private Function GetDatabaseVersion() As Integer
|
||||
Dim sSQL As String
|
||||
Dim iVer As Integer
|
||||
@@ -336,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
|
||||
@@ -348,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)
|
||||
@@ -384,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;"
|
||||
@@ -414,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)
|
||||
@@ -460,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"
|
||||
|
||||
@@ -475,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"
|
||||
|
||||
@@ -491,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"
|
||||
|
||||
@@ -515,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"
|
||||
|
||||
@@ -540,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)
|
||||
@@ -556,6 +604,354 @@ Public Class mgrSQLite
|
||||
End If
|
||||
End If
|
||||
|
||||
'0.98 Upgrade
|
||||
If GetDatabaseVersion() < 98 Then
|
||||
If eDatabase = Database.Local Then
|
||||
'Backup DB before starting
|
||||
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 &= "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 &= "PRAGMA user_version=98"
|
||||
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
|
||||
'Run a compact
|
||||
CompactDatabase()
|
||||
End If
|
||||
If eDatabase = Database.Remote Then
|
||||
'Backup DB before starting
|
||||
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 &= "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 &= "PRAGMA user_version=98"
|
||||
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
|
||||
'Run a compact
|
||||
CompactDatabase()
|
||||
End If
|
||||
End If
|
||||
|
||||
'1.01 Upgrade
|
||||
If GetDatabaseVersion() < 101 Then
|
||||
If eDatabase = Database.Local Then
|
||||
'Backup DB before starting
|
||||
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 &= "INSERT INTO settings_new (SettingsID, MonitorOnStartup, StartToTray, ShowDetectionToolTips, DisableConfirmation, CreateSubFolder, " &
|
||||
"ShowOverwriteWarning, RestoreOnLaunch, BackupFolder, Sync, StartWithWindows, TimeTracking, SupressBackup, SupressBackupThreshold, " &
|
||||
"CompressionLevel, Custom7zArguments, Custom7zLocation, SyncFields, AutoSaveLog) " &
|
||||
"SELECT SettingsID, MonitorOnStartup, StartToTray, ShowDetectionToolTips, DisableConfirmation, CreateSubFolder, " &
|
||||
"ShowOverwriteWarning, RestoreOnLaunch, BackupFolder, Sync, StartWithWindows, TimeTracking, SupressBackup, SupressBackupThreshold, " &
|
||||
"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 &= "PRAGMA user_version=101"
|
||||
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
End If
|
||||
If eDatabase = Database.Remote Then
|
||||
'Backup DB before starting
|
||||
BackupDB("v98")
|
||||
|
||||
'Add new field(s)
|
||||
sSQL = "ALTER TABLE monitorlist ADD COLUMN CleanFolder BOOLEAN Not NULL DEFAULT 0;"
|
||||
sSQL &= "PRAGMA user_version=101"
|
||||
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
End If
|
||||
End If
|
||||
|
||||
'1.02 Upgrade
|
||||
If GetDatabaseVersion() < 102 Then
|
||||
If eDatabase = Database.Local Then
|
||||
'Backup DB before starting
|
||||
BackupDB("v101")
|
||||
|
||||
'Add Table (SavedPath)
|
||||
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;"
|
||||
|
||||
sSQL &= "PRAGMA user_version=102"
|
||||
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
End If
|
||||
If eDatabase = Database.Remote Then
|
||||
'Backup DB before starting
|
||||
BackupDB("v101")
|
||||
|
||||
'Add new field(s)
|
||||
sSQL = "ALTER TABLE monitorlist ADD COLUMN Parameter TEXT;"
|
||||
|
||||
sSQL &= "PRAGMA user_version=102"
|
||||
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
End If
|
||||
End If
|
||||
|
||||
'1.05 Upgrade
|
||||
If GetDatabaseVersion() < 105 Then
|
||||
If eDatabase = Database.Local Then
|
||||
'Backup DB before starting
|
||||
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));"
|
||||
|
||||
'Add new field(s)
|
||||
sSQL &= "ALTER TABLE monitorlist ADD COLUMN Comments TEXT;"
|
||||
sSQL &= "ALTER TABLE settings ADD COLUMN SessionTracking BOOLEAN DEFAULT 0;"
|
||||
|
||||
sSQL &= "PRAGMA user_version=105"
|
||||
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
End If
|
||||
If eDatabase = Database.Remote Then
|
||||
'Backup DB before starting
|
||||
BackupDB("v102")
|
||||
|
||||
'Add new field(s)
|
||||
sSQL = "ALTER TABLE monitorlist ADD COLUMN Comments TEXT;"
|
||||
|
||||
sSQL &= "PRAGMA user_version=105"
|
||||
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
End If
|
||||
End If
|
||||
|
||||
'1.08 Upgrade
|
||||
If GetDatabaseVersion() < 108 Then
|
||||
If eDatabase = Database.Local Then
|
||||
'Backup DB before starting
|
||||
BackupDB("v105")
|
||||
|
||||
'Add new field(s)
|
||||
sSQL = "ALTER TABLE monitorlist ADD COLUMN IsRegEx BOOLEAN Not NULL DEFAULT 0;"
|
||||
|
||||
sSQL &= "PRAGMA user_version=108"
|
||||
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
End If
|
||||
If eDatabase = Database.Remote Then
|
||||
'Backup DB before starting
|
||||
BackupDB("v105")
|
||||
|
||||
'Add new field(s)
|
||||
sSQL = "ALTER TABLE monitorlist ADD COLUMN IsRegEx BOOLEAN Not NULL DEFAULT 0;"
|
||||
|
||||
sSQL &= "PRAGMA user_version=108"
|
||||
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
End If
|
||||
End If
|
||||
|
||||
'1.10 Upgrade
|
||||
If GetDatabaseVersion() < 110 Then
|
||||
If eDatabase = Database.Local Then
|
||||
'Backup DB before starting
|
||||
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));"
|
||||
|
||||
'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 &= "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 &= "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 &= "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;"
|
||||
|
||||
sSQL &= "PRAGMA user_version=110"
|
||||
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
|
||||
CompactDatabase()
|
||||
|
||||
End If
|
||||
If eDatabase = Database.Remote Then
|
||||
'Backup DB before starting
|
||||
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 &= "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;"
|
||||
|
||||
'We need to push the local game list against the remote database in case they had syncing disabled
|
||||
Dim hshMonitorList As Hashtable = mgrMonitorList.ReadList(mgrMonitorList.eListTypes.FullList, mgrSQLite.Database.Local)
|
||||
Dim oSettings As New mgrSettings
|
||||
oSettings.LoadSettings()
|
||||
mgrMonitorList.DoListAddUpdateSync(hshMonitorList, Database.Remote, oSettings.SyncFields)
|
||||
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 &= "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;"
|
||||
|
||||
sSQL &= "PRAGMA user_version=110"
|
||||
|
||||
RunParamQuery(sSQL, New Hashtable)
|
||||
|
||||
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
|
||||
@@ -563,6 +959,10 @@ Public Class mgrSQLite
|
||||
Return Math.Round(oFileInfo.Length / 1024, 2)
|
||||
End Function
|
||||
|
||||
Public Function ReportVersion() As String
|
||||
Return SqliteConnection.SQLiteVersion
|
||||
End Function
|
||||
|
||||
Public Sub CompactDatabase()
|
||||
Dim sSQL As String
|
||||
Dim command As SQLiteCommand
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
Public Class mgrSavedPath
|
||||
|
||||
|
||||
Private Shared Function MapToObject(ByVal dr As DataRow) As clsSavedPath
|
||||
Dim oSavedPath As New clsSavedPath
|
||||
|
||||
oSavedPath.PathName = CStr(dr("PathName"))
|
||||
oSavedPath.Path = CStr(dr("Path"))
|
||||
|
||||
Return oSavedPath
|
||||
End Function
|
||||
|
||||
Private Shared Function SetCoreParameters(ByVal oSavedPath As clsSavedPath) As Hashtable
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
hshParams.Add("PathName", oSavedPath.PathName)
|
||||
hshParams.Add("Path", oSavedPath.Path)
|
||||
|
||||
Return hshParams
|
||||
End Function
|
||||
|
||||
Public Shared Function GetPathByName(ByVal sPathName As String) As clsSavedPath
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim oData As DataSet
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
Dim oSavedPath As New clsSavedPath
|
||||
|
||||
sSQL = "SELECT PathName, Path from savedpath WHERE PathName=@PathName;"
|
||||
|
||||
hshParams.Add("PathName", sPathName)
|
||||
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oSavedPath = MapToObject(dr)
|
||||
Next
|
||||
|
||||
Return oSavedPath
|
||||
End Function
|
||||
|
||||
Public Shared Sub AddUpdatePath(ByVal oSavedPath As clsSavedPath)
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As Hashtable
|
||||
|
||||
sSQL = "INSERT OR REPLACE INTO savedpath (PathName, Path) VALUES (@PathName, @Path);"
|
||||
|
||||
hshParams = SetCoreParameters(oSavedPath)
|
||||
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,257 @@
|
||||
Imports GBM.My.Resources
|
||||
Imports System.IO
|
||||
Imports System.Xml.Serialization
|
||||
|
||||
Public Class mgrSessions
|
||||
|
||||
Private Shared Function MapToObject(ByVal dr As DataRow) As clsSession
|
||||
Dim oSession As New clsSession
|
||||
|
||||
oSession.MonitorID = CStr(dr("MonitorID"))
|
||||
oSession.SessionStart = CInt(dr("Start"))
|
||||
oSession.SessionEnd = CInt(dr("End"))
|
||||
|
||||
Return oSession
|
||||
End Function
|
||||
|
||||
Private Shared Function SetCoreParameters(ByVal oSession As clsSession) As Hashtable
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
hshParams.Add("MonitorID", oSession.MonitorID)
|
||||
hshParams.Add("Start", oSession.SessionStart)
|
||||
hshParams.Add("End", oSession.SessionEnd)
|
||||
|
||||
Return hshParams
|
||||
End Function
|
||||
|
||||
Public Shared Sub AddSession(ByVal oSession As clsSession, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As Hashtable
|
||||
|
||||
sSQL = "INSERT INTO sessions (MonitorID, Start, End) VALUES (@MonitorID, @Start, @End);"
|
||||
|
||||
hshParams = SetCoreParameters(oSession)
|
||||
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
End Sub
|
||||
|
||||
Public Shared Function GetSessions(Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local) As DataSet
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
sSQL = "SELECT sessions.MonitorID, monitorlist.Name, Start, End FROM sessions NATURAL JOIN monitorlist;"
|
||||
|
||||
Return oDatabase.ReadParamData(sSQL, hshParams)
|
||||
End Function
|
||||
|
||||
Public Shared Function GetSessionRange(ByVal dtStart As DateTime, ByVal dtEnd As DateTime, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local) As DataSet
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
sSQL = "SELECT sessions.MonitorID, monitorlist.Name, Start, End FROM sessions NATURAL JOIN monitorlist WHERE Start >= @Start AND End <= @End;"
|
||||
|
||||
hshParams.Add("Start", mgrCommon.DateToUnix(dtStart))
|
||||
hshParams.Add("End", mgrCommon.DateToUnix(dtEnd))
|
||||
|
||||
Return oDatabase.ReadParamData(sSQL, hshParams)
|
||||
End Function
|
||||
|
||||
Public Shared Function GetSessionsByGameNameAndRange(ByVal sGameName As String, ByVal dtStart As DateTime, ByVal dtEnd As DateTime, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local) As DataSet
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
sSQL = "SELECT sessions.MonitorID, monitorlist.Name, Start, End FROM sessions NATURAL JOIN monitorlist WHERE monitorlist.Name LIKE @Name AND (Start >= @Start AND End <= @End);"
|
||||
|
||||
hshParams.Add("Name", "%" & sGameName & "%")
|
||||
hshParams.Add("Start", mgrCommon.DateToUnix(dtStart))
|
||||
hshParams.Add("End", mgrCommon.DateToUnix(dtEnd))
|
||||
|
||||
Return oDatabase.ReadParamData(sSQL, hshParams)
|
||||
End Function
|
||||
|
||||
Public Shared Sub DeleteSession(ByVal oSessions As List(Of clsSession), Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As Hashtable
|
||||
Dim oParamList As New List(Of Hashtable)
|
||||
|
||||
sSQL = "DELETE FROM sessions WHERE MonitorID = @MonitorID AND Start = @Start;"
|
||||
|
||||
For Each oSession As clsSession In oSessions
|
||||
hshParams = New Hashtable
|
||||
hshParams.Add("MonitorID", oSession.MonitorID)
|
||||
hshParams.Add("Start", oSession.SessionStart)
|
||||
oParamList.Add(hshParams)
|
||||
Next
|
||||
|
||||
oDatabase.RunMassParamQuery(sSQL, oParamList)
|
||||
End Sub
|
||||
|
||||
Public Shared Function GetMinimumDateTime(Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local) As DateTime
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
Dim iUnixDate As Int64
|
||||
|
||||
sSQL = "SELECT Start FROM sessions ORDER BY Start ASC LIMIT 1"
|
||||
|
||||
iUnixDate = CInt(oDatabase.ReadSingleValue(sSQL, hshParams))
|
||||
Return mgrCommon.UnixToDate(iUnixDate)
|
||||
End Function
|
||||
|
||||
Public Shared Function GetMaximumDateTime(Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local) As DateTime
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
Dim iUnixDate As Int64
|
||||
|
||||
sSQL = "SELECT End FROM sessions ORDER BY Start DESC LIMIT 1"
|
||||
|
||||
iUnixDate = CInt(oDatabase.ReadSingleValue(sSQL, hshParams))
|
||||
Return mgrCommon.UnixToDate(iUnixDate)
|
||||
End Function
|
||||
|
||||
Public Shared Function CountRows(Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local) As Integer
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
Dim iRowCount As Integer
|
||||
|
||||
sSQL = "SELECT COUNT(MonitorID) FROM sessions;"
|
||||
|
||||
iRowCount = CInt(oDatabase.ReadSingleValue(sSQL, hshParams))
|
||||
|
||||
Return iRowCount
|
||||
End Function
|
||||
|
||||
Private Shared Function EscapeCSV(ByVal sItem As String) As String
|
||||
Dim bEnclose As Boolean = False
|
||||
|
||||
If sItem.Contains("""") Then
|
||||
sItem = sItem.Replace("""", """""")
|
||||
bEnclose = True
|
||||
End If
|
||||
|
||||
If sItem.Contains(",") Then
|
||||
bEnclose = True
|
||||
End If
|
||||
|
||||
If sItem.Contains(vbCrLf) Or sItem.Contains(vbCr) Or sItem.Contains(vbLf) Then
|
||||
bEnclose = True
|
||||
End If
|
||||
|
||||
If bEnclose Then
|
||||
sItem = """" & sItem & """"
|
||||
End If
|
||||
|
||||
Return sItem
|
||||
End Function
|
||||
|
||||
Public Shared Function ExportAsCSV(ByVal sLocation As String, ByVal bUnixTime As Boolean, ByVal bHeaders As Boolean, ByRef dg As DataGridView) As Boolean
|
||||
Dim oWriter As StreamWriter
|
||||
Dim sHeader As String
|
||||
Dim sCurrentRow As String
|
||||
Dim oBannedColumns As New List(Of DataGridViewColumn)
|
||||
|
||||
Try
|
||||
oWriter = New StreamWriter(sLocation)
|
||||
|
||||
'Set Ban Columns
|
||||
oBannedColumns.Add(dg.Columns("MonitorID"))
|
||||
|
||||
If bUnixTime Then
|
||||
oBannedColumns.Add(dg.Columns("Start"))
|
||||
oBannedColumns.Add(dg.Columns("End"))
|
||||
Else
|
||||
oBannedColumns.Add(dg.Columns("StartUnix"))
|
||||
oBannedColumns.Add(dg.Columns("EndUnix"))
|
||||
End If
|
||||
|
||||
'Handle Headers
|
||||
If bHeaders Then
|
||||
sHeader = String.Empty
|
||||
For Each dgCol As DataGridViewColumn In dg.Columns
|
||||
If Not oBannedColumns.Contains(dgCol) Then
|
||||
sHeader &= dgCol.HeaderText & ","
|
||||
End If
|
||||
Next
|
||||
sHeader = sHeader.TrimEnd(",")
|
||||
|
||||
oWriter.WriteLine(sHeader)
|
||||
End If
|
||||
|
||||
'Handle Rows
|
||||
For Each dgRow As DataGridViewRow In dg.Rows
|
||||
sCurrentRow = String.Empty
|
||||
For Each dgCell As DataGridViewCell In dgRow.Cells
|
||||
If Not oBannedColumns.Contains(dg.Columns(dgCell.ColumnIndex)) Then
|
||||
sCurrentRow &= EscapeCSV(dgCell.Value.ToString) & ","
|
||||
End If
|
||||
Next
|
||||
sCurrentRow = sCurrentRow.TrimEnd(",")
|
||||
|
||||
'Don't write a LF on the last row
|
||||
If dg.Rows.Count = (dgRow.Index + 1) Then
|
||||
oWriter.Write(sCurrentRow)
|
||||
Else
|
||||
oWriter.WriteLine(sCurrentRow)
|
||||
End If
|
||||
Next
|
||||
|
||||
'Finish up
|
||||
oWriter.Flush()
|
||||
oWriter.Close()
|
||||
|
||||
mgrCommon.ShowMessage(mgrSessions_ExportSuccess, MsgBoxStyle.Information)
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
mgrCommon.ShowMessage(mgrSessions_ErrorExportFailure, ex.Message, MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Shared Function ExportAsXML(ByVal sLocation As String, ByVal bUnixTime As Boolean, ByRef dg As DataGridView) As Boolean
|
||||
Dim oSerializer As XmlSerializer
|
||||
Dim oWriter As StreamWriter
|
||||
Dim oCurrentSession As Session
|
||||
Dim oSessions As New List(Of Session)
|
||||
Dim oBannedColumns As New List(Of DataGridViewColumn)
|
||||
|
||||
Try
|
||||
'Format data for export
|
||||
For Each dgRow As DataGridViewRow In dg.Rows
|
||||
oCurrentSession = New Session
|
||||
oCurrentSession.GameName = dgRow.Cells("Name").Value.ToString
|
||||
If bUnixTime Then
|
||||
oCurrentSession.StartDate = dgRow.Cells("StartUnix").Value.ToString
|
||||
oCurrentSession.EndDate = dgRow.Cells("EndUnix").Value.ToString
|
||||
Else
|
||||
oCurrentSession.StartDate = dgRow.Cells("Start").Value.ToString
|
||||
oCurrentSession.EndDate = dgRow.Cells("End").Value.ToString
|
||||
End If
|
||||
oCurrentSession.Hours = dgRow.Cells("Hours").Value.ToString
|
||||
oSessions.Add(oCurrentSession)
|
||||
Next
|
||||
|
||||
'Serialize
|
||||
oSerializer = New XmlSerializer(oSessions.GetType, New XmlRootAttribute("Sessions"))
|
||||
oWriter = New StreamWriter(sLocation)
|
||||
oSerializer.Serialize(oWriter.BaseStream, oSessions)
|
||||
|
||||
'Finish up
|
||||
oWriter.Flush()
|
||||
oWriter.Close()
|
||||
|
||||
mgrCommon.ShowMessage(mgrSessions_ExportSuccess, MsgBoxStyle.Information)
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
mgrCommon.ShowMessage(mgrSessions_ErrorExportFailure, ex.Message, MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
End Class
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports System.IO
|
||||
Imports GBM.My.Resources
|
||||
|
||||
Public Class mgrSettings
|
||||
Private bStartWithWindows As Boolean = False
|
||||
@@ -9,17 +10,34 @@ Public Class mgrSettings
|
||||
Private bCreateSubFolder As Boolean = False
|
||||
Private bShowOverwriteWarning As Boolean = True
|
||||
Private bRestoreOnLaunch As Boolean = False
|
||||
Private bSync As Boolean = True
|
||||
Private bCheckSum As Boolean = True
|
||||
Private bAutoRestore As Boolean = False
|
||||
Private bAutoMark As Boolean = False
|
||||
Private bTimeTracking As Boolean = True
|
||||
Private bSupressBackup As Boolean = False
|
||||
Private iSupressBackupThreshold As Integer = 10
|
||||
Private bSessionTracking As Boolean = False
|
||||
Private bSuppressBackup As Boolean = False
|
||||
Private iSuppressBackupThreshold As Integer = 10
|
||||
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 eSyncFields As clsGame.eOptionalSyncFields = clsGame.eOptionalSyncFields.None Or clsGame.eOptionalSyncFields.TimeStamp
|
||||
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
|
||||
Get
|
||||
@@ -93,21 +111,21 @@ Public Class mgrSettings
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property Sync As Boolean
|
||||
Property AutoRestore As Boolean
|
||||
Get
|
||||
Return bSync
|
||||
Return bAutoRestore
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bSync = value
|
||||
bAutoRestore = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property CheckSum As Boolean
|
||||
Property AutoMark As Boolean
|
||||
Get
|
||||
Return bCheckSum
|
||||
Return bAutoMark
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bCheckSum = value
|
||||
bAutoMark = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -120,21 +138,30 @@ Public Class mgrSettings
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property SupressBackup As Boolean
|
||||
Property SessionTracking As Boolean
|
||||
Get
|
||||
Return bSupressBackup
|
||||
Return bSessionTracking
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bSupressBackup = value
|
||||
bSessionTracking = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property SupressBackupThreshold As Integer
|
||||
Property SuppressBackup As Boolean
|
||||
Get
|
||||
Return iSupressBackupThreshold
|
||||
Return bSuppressBackup
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bSuppressBackup = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property SuppressBackupThreshold As Integer
|
||||
Get
|
||||
Return iSuppressBackupThreshold
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
iSupressBackupThreshold = value
|
||||
iSuppressBackupThreshold = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -156,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
|
||||
@@ -240,18 +276,84 @@ Public Class mgrSettings
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property SuppressMessages As eSuppressMessages
|
||||
Get
|
||||
Return eMessages
|
||||
End Get
|
||||
Set(value As eSuppressMessages)
|
||||
eMessages = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property BackupOnLaunch As Boolean
|
||||
Get
|
||||
Return bBackupOnLaunch
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bBackupOnLaunch = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property UseGameID As Boolean
|
||||
Get
|
||||
Return bUseGameID
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bUseGameID = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property DisableSyncMessages As Boolean
|
||||
Get
|
||||
Return bDisableSyncMessages
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
bDisableSyncMessages = value
|
||||
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)
|
||||
End Sub
|
||||
|
||||
Private Sub SaveFromClass()
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
sSQL = "DELETE FROM settings WHERE SettingsID = 1"
|
||||
oDatabase.RunParamQuery(sSQL, New Hashtable)
|
||||
|
||||
sSQL = "INSERT INTO settings VALUES (1, @MonitorOnStartup, @StartToTray, @ShowDetectionToolTips, @DisableConfirmation, "
|
||||
sSQL &= "@CreateSubFolder, @ShowOverwriteWarning, @RestoreOnLaunch, @BackupFolder, @Sync, @CheckSum, @StartWithWindows, "
|
||||
sSQL &= "@TimeTracking, @SupressBackup, @SupressBackupThreshold, @CompressionLevel, @Custom7zArguments, @Custom7zLocation, "
|
||||
sSQL &= "@SyncFields,@AutoSaveLog)"
|
||||
sSQL = "INSERT OR REPLACE INTO settings VALUES (1, @MonitorOnStartup, @StartToTray, @ShowDetectionToolTips, @DisableConfirmation, "
|
||||
sSQL &= "@CreateSubFolder, @ShowOverwriteWarning, @RestoreOnLaunch, @BackupFolder, @StartWithWindows, "
|
||||
sSQL &= "@TimeTracking, @SuppressBackup, @SuppressBackupThreshold, @CompressionLevel, @Custom7zArguments, @Custom7zLocation, "
|
||||
sSQL &= "@SyncFields, @AutoSaveLog, @AutoRestore, @AutoMark, @SessionTracking, @SuppressMessages, @BackupOnLaunch, @UseGameID, "
|
||||
sSQL &= "@DisableSyncMessages, @ShowResolvedPaths, @DisableDiskSpaceCheck, @ThemeSelection, @AutoHideLog)"
|
||||
|
||||
hshParams.Add("MonitorOnStartup", MonitorOnStartup)
|
||||
hshParams.Add("StartToTray", StartToTray)
|
||||
@@ -261,17 +363,26 @@ Public Class mgrSettings
|
||||
hshParams.Add("ShowOverwriteWarning", ShowOverwriteWarning)
|
||||
hshParams.Add("RestoreOnLaunch", RestoreOnLaunch)
|
||||
hshParams.Add("BackupFolder", BackupFolder)
|
||||
hshParams.Add("Sync", Sync)
|
||||
hshParams.Add("CheckSum", CheckSum)
|
||||
hshParams.Add("StartWithWindows", StartWithWindows)
|
||||
hshParams.Add("TimeTracking", TimeTracking)
|
||||
hshParams.Add("SupressBackup", SupressBackup)
|
||||
hshParams.Add("SupressBackupThreshold", SupressBackupThreshold)
|
||||
hshParams.Add("SuppressBackup", SuppressBackup)
|
||||
hshParams.Add("SuppressBackupThreshold", SuppressBackupThreshold)
|
||||
hshParams.Add("CompressionLevel", CompressionLevel)
|
||||
hshParams.Add("Custom7zArguments", Custom7zArguments)
|
||||
hshParams.Add("Custom7zLocation", Custom7zLocation)
|
||||
hshParams.Add("SyncFields", SyncFields)
|
||||
hshParams.Add("AutoSaveLog", AutoSaveLog)
|
||||
hshParams.Add("AutoRestore", AutoRestore)
|
||||
hshParams.Add("AutoMark", AutoMark)
|
||||
hshParams.Add("SessionTracking", SessionTracking)
|
||||
hshParams.Add("SuppressMessages", SuppressMessages)
|
||||
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
|
||||
|
||||
@@ -294,17 +405,26 @@ Public Class mgrSettings
|
||||
ShowOverwriteWarning = CBool(dr("ShowOverwriteWarning"))
|
||||
RestoreOnLaunch = CBool(dr("RestoreOnLaunch"))
|
||||
BackupFolder = CStr(dr("BackupFolder"))
|
||||
Sync = CBool(dr("Sync"))
|
||||
CheckSum = CBool(dr("CheckSum"))
|
||||
StartWithWindows = CBool(dr("StartWithWindows"))
|
||||
TimeTracking = CBool(dr("TimeTracking"))
|
||||
SupressBackup = CBool(dr("SupressBackup"))
|
||||
SupressBackupThreshold = CInt(dr("SupressBackupThreshold"))
|
||||
SuppressBackup = CBool(dr("SuppressBackup"))
|
||||
SuppressBackupThreshold = CInt(dr("SuppressBackupThreshold"))
|
||||
CompressionLevel = CInt(dr("CompressionLevel"))
|
||||
If Not IsDBNull(dr("Custom7zArguments")) Then Custom7zArguments = CStr(dr("Custom7zArguments"))
|
||||
If Not IsDBNull(dr("Custom7zLocation")) Then Custom7zLocation = CStr(dr("Custom7zLocation"))
|
||||
SyncFields = CInt(dr("SyncFields"))
|
||||
AutoSaveLog = CBool(dr("AutoSaveLog"))
|
||||
AutoRestore = CBool(dr("AutoRestore"))
|
||||
AutoMark = CBool(dr("AutoMark"))
|
||||
SessionTracking = CBool(dr("SessionTracking"))
|
||||
SuppressMessages = CInt(dr("SuppressMessages"))
|
||||
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()
|
||||
@@ -323,4 +443,13 @@ Public Class mgrSettings
|
||||
'Set Remote Manifest Location
|
||||
mgrPath.RemoteDatabaseLocation = Me.BackupFolder
|
||||
End Sub
|
||||
|
||||
Public Function SetMessageField(ByVal eMessages As eSuppressMessages, ByVal eMessage As eSuppressMessages) As eSuppressMessages
|
||||
Return eMessages Or eMessage
|
||||
End Function
|
||||
|
||||
Public Function RemoveMessageField(ByVal eMessages As eSuppressMessages, ByVal eMessage As eSuppressMessages) As eSuppressMessages
|
||||
Return eMessages And (Not eMessage)
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1,26 +1,44 @@
|
||||
Public Class mgrTags
|
||||
|
||||
Private Shared Function MapToObject(ByVal dr As DataRow) As clsTag
|
||||
Dim oTag As New clsTag
|
||||
|
||||
oTag.ID = CStr(dr("TagID"))
|
||||
oTag.Name = CStr(dr("Name"))
|
||||
|
||||
Return oTag
|
||||
End Function
|
||||
|
||||
Private Shared Function SetCoreParameters(ByVal oTag As clsTag) As Hashtable
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
hshParams.Add("ID", oTag.ID)
|
||||
hshParams.Add("Name", oTag.Name)
|
||||
|
||||
Return hshParams
|
||||
End Function
|
||||
|
||||
Public Shared Sub DoTagAdd(ByVal oTag As clsTag, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
Dim hshParams As Hashtable
|
||||
|
||||
sSQL = "INSERT INTO tags VALUES (@ID, @Name)"
|
||||
hshParams.Add("ID", oTag.ID)
|
||||
hshParams.Add("Name", oTag.Name)
|
||||
|
||||
hshParams = SetCoreParameters(oTag)
|
||||
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
End Sub
|
||||
|
||||
Public Shared Sub DoTagUpdate(ByVal oTag As clsTag, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local)
|
||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
Dim hshParams As Hashtable
|
||||
|
||||
sSQL = "UPDATE tags SET Name=@Name "
|
||||
sSQL &= "WHERE TagID = @ID"
|
||||
|
||||
hshParams.Add("Name", oTag.Name)
|
||||
hshParams.Add("ID", oTag.ID)
|
||||
hshParams = SetCoreParameters(oTag)
|
||||
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
|
||||
@@ -57,9 +75,7 @@
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oTag = New clsTag
|
||||
oTag.ID = CStr(dr("TagID"))
|
||||
oTag.Name = CStr(dr("Name"))
|
||||
oTag = MapToObject(dr)
|
||||
Next
|
||||
|
||||
Return oTag
|
||||
@@ -80,9 +96,7 @@
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oTag = New clsTag
|
||||
oTag.ID = CStr(dr("TagID"))
|
||||
oTag.Name = CStr(dr("Name"))
|
||||
oTag = MapToObject(dr)
|
||||
Next
|
||||
|
||||
Return oTag
|
||||
@@ -124,9 +138,7 @@
|
||||
oData = oDatabase.ReadParamData(sSQL, New Hashtable)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oTag = New clsTag
|
||||
oTag.ID = CStr(dr("TagID"))
|
||||
oTag.Name = CStr(dr("Name"))
|
||||
oTag = MapToObject(dr)
|
||||
hshList.Add(oTag.Name, oTag)
|
||||
Next
|
||||
|
||||
@@ -141,7 +153,7 @@
|
||||
Dim hshParams As Hashtable
|
||||
Dim oParamList As New List(Of Hashtable)
|
||||
|
||||
sSQL = "INSERT OR REPLACE INTO tags VALUES (COALESCE((SELECT TagID FROM tags WHERE Name = @Name), @ID), @Name); INSERT INTO gametags VALUES ((SELECT TagID from tags WHERE Name=@Name), @MonitorID);"
|
||||
sSQL = "INSERT OR REPLACE INTO tags VALUES (COALESCE((SELECT TagID FROM tags WHERE Name = @Name), @ID), @Name); INSERT OR REPLACE INTO gametags VALUES ((SELECT TagID from tags WHERE Name=@Name), @MonitorID);"
|
||||
For Each oGame As clsGame In hshTags.Values
|
||||
sMonitorID = oGame.ID
|
||||
For Each t As Tag In oGame.ImportTags
|
||||
|
||||
@@ -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
|
||||
@@ -1,5 +1,25 @@
|
||||
Public Class mgrVariables
|
||||
|
||||
Private Shared Function MapToObject(ByVal dr As DataRow) As clsPathVariable
|
||||
Dim oCustomVariable As New clsPathVariable
|
||||
|
||||
oCustomVariable.ID = CStr(dr("VariableID"))
|
||||
oCustomVariable.Name = CStr(dr("Name"))
|
||||
oCustomVariable.Path = CStr(dr("Path"))
|
||||
|
||||
Return oCustomVariable
|
||||
End Function
|
||||
|
||||
Private Shared Function SetCoreParameters(ByVal oCustomVariable As clsPathVariable) As Hashtable
|
||||
Dim hshParams As New Hashtable
|
||||
|
||||
hshParams.Add("ID", oCustomVariable.ID)
|
||||
hshParams.Add("Name", oCustomVariable.Name)
|
||||
hshParams.Add("Path", oCustomVariable.Path)
|
||||
|
||||
Return hshParams
|
||||
End Function
|
||||
|
||||
Public Shared Sub DoPathUpdate(ByVal sOld As String, ByVal sNew As String)
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim sSQL As String
|
||||
@@ -15,26 +35,22 @@
|
||||
Public Shared Sub DoVariableAdd(ByVal oCustomVariable As clsPathVariable)
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
Dim hshParams As Hashtable
|
||||
|
||||
sSQL = "INSERT INTO variables VALUES (@ID, @Name, @Path)"
|
||||
hshParams.Add("ID", oCustomVariable.ID)
|
||||
hshParams.Add("Name", oCustomVariable.Name)
|
||||
hshParams.Add("Path", oCustomVariable.Path)
|
||||
hshParams = SetCoreParameters(oCustomVariable)
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
End Sub
|
||||
|
||||
Public Shared Sub DoVariableUpdate(ByVal oCustomVariable As clsPathVariable)
|
||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||
Dim sSQL As String
|
||||
Dim hshParams As New Hashtable
|
||||
Dim hshParams As Hashtable
|
||||
|
||||
sSQL = "UPDATE variables SET Name=@Name, Path = @Path "
|
||||
sSQL &= "WHERE VariableID = @ID"
|
||||
|
||||
hshParams.Add("Name", oCustomVariable.Name)
|
||||
hshParams.Add("Path", oCustomVariable.Path)
|
||||
hshParams.Add("ID", oCustomVariable.ID)
|
||||
hshParams = SetCoreParameters(oCustomVariable)
|
||||
|
||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||
|
||||
@@ -69,10 +85,7 @@
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oCustomVariable = New clsPathVariable
|
||||
oCustomVariable.ID = CStr(dr("VariableID"))
|
||||
oCustomVariable.Name = CStr(dr("Name"))
|
||||
oCustomVariable.Path = CStr(dr("Path"))
|
||||
oCustomVariable = MapToObject(dr)
|
||||
Next
|
||||
|
||||
Return oCustomVariable
|
||||
@@ -93,10 +106,7 @@
|
||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oCustomVariable = New clsPathVariable
|
||||
oCustomVariable.ID = CStr(dr("VariableID"))
|
||||
oCustomVariable.Name = CStr(dr("Name"))
|
||||
oCustomVariable.Path = CStr(dr("Path"))
|
||||
oCustomVariable = MapToObject(dr)
|
||||
Next
|
||||
|
||||
Return oCustomVariable
|
||||
@@ -138,13 +148,36 @@
|
||||
oData = oDatabase.ReadParamData(sSQL, New Hashtable)
|
||||
|
||||
For Each dr As DataRow In oData.Tables(0).Rows
|
||||
oCustomVariable = New clsPathVariable
|
||||
oCustomVariable.ID = CStr(dr("VariableID"))
|
||||
oCustomVariable.Name = CStr(dr("Name"))
|
||||
oCustomVariable.Path = CStr(dr("Path"))
|
||||
oCustomVariable = MapToObject(dr)
|
||||
hshList.Add(oCustomVariable.Name, oCustomVariable)
|
||||
Next
|
||||
|
||||
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
|
||||
@@ -6,75 +6,112 @@ Imports System.Net
|
||||
|
||||
Public Class mgrXML
|
||||
|
||||
Public Shared Function ReadMonitorList(ByVal sLocation As String, Optional ByVal bWebRead As Boolean = False) As Hashtable
|
||||
Public Shared Function ReadMonitorList(ByVal sLocation As String, ByRef oExportInfo As ExportData, ByRef hshList As Hashtable, Optional ByVal bWebRead As Boolean = False) As Boolean
|
||||
Dim oList As List(Of Game)
|
||||
Dim hshList As New Hashtable
|
||||
Dim hshDupeList As New Hashtable
|
||||
Dim oExportData As New ExportData
|
||||
Dim oGame As clsGame
|
||||
|
||||
|
||||
'If the file doesn't exist return an empty list
|
||||
If Not File.Exists(sLocation) And Not bWebRead Then
|
||||
Return hshList
|
||||
Return False
|
||||
End If
|
||||
|
||||
oList = ImportandDeserialize(sLocation, bWebRead)
|
||||
If Not ImportandDeserialize(sLocation, oExportData, bWebRead) Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
oList = oExportData.Configurations
|
||||
oExportInfo = oExportData
|
||||
|
||||
For Each g As Game In oList
|
||||
oGame = New clsGame
|
||||
oGame.ID = g.ID
|
||||
oGame.Name = g.Name
|
||||
oGame.ProcessName = g.ProcessName
|
||||
oGame.AbsolutePath = g.AbsolutePath
|
||||
oGame.Path = g.Path
|
||||
oGame.FolderSave = g.FolderSave
|
||||
oGame.AppendTimeStamp = g.AppendTimeStamp
|
||||
oGame.BackupLimit = g.BackupLimit
|
||||
oGame.FileType = g.FileType
|
||||
oGame.ExcludeList = g.ExcludeList
|
||||
oGame.MonitorOnly = g.MonitorOnly
|
||||
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
|
||||
|
||||
'This should be wrapped just in case we get some bad data
|
||||
Try
|
||||
hshList.Add(oGame.ProcessName & ":" & oGame.Name, oGame)
|
||||
hshList.Add(oGame.ID, oGame)
|
||||
Catch e As Exception
|
||||
'Do Nothing
|
||||
End Try
|
||||
Next
|
||||
|
||||
Return hshList
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Shared Function ImportandDeserialize(ByVal sLocation As String, Optional ByVal bWebRead As Boolean = False) As List(Of Game)
|
||||
Private Shared Function ReadImportData(ByVal sLocation As String, ByVal bWebRead As Boolean)
|
||||
Dim oReader As StreamReader
|
||||
Dim oWebClient As WebClient
|
||||
|
||||
If bWebRead Then
|
||||
oWebClient = New WebClient
|
||||
oReader = New StreamReader(oWebClient.OpenRead(sLocation))
|
||||
Else
|
||||
oReader = New StreamReader(sLocation)
|
||||
End If
|
||||
|
||||
Return oReader
|
||||
End Function
|
||||
|
||||
Public Shared Function ImportandDeserialize(ByVal sLocation As String, ByRef oExportData As ExportData, Optional ByVal bWebRead As Boolean = False) As Boolean
|
||||
Dim oReader As StreamReader
|
||||
Dim oSerializer As XmlSerializer
|
||||
Dim oList As New List(Of Game)
|
||||
|
||||
Try
|
||||
If bWebRead Then
|
||||
oWebClient = New WebClient
|
||||
oReader = New StreamReader(oWebClient.OpenRead(sLocation))
|
||||
Else
|
||||
oReader = New StreamReader(sLocation)
|
||||
End If
|
||||
|
||||
oSerializer = New XmlSerializer(oList.GetType(), New XmlRootAttribute("gbm"))
|
||||
oList = oSerializer.Deserialize(oReader)
|
||||
oReader = ReadImportData(sLocation, bWebRead)
|
||||
oSerializer = New XmlSerializer(GetType(ExportData), New XmlRootAttribute("gbm"))
|
||||
oExportData = oSerializer.Deserialize(oReader)
|
||||
oReader.Close()
|
||||
|
||||
'Compatability Mode
|
||||
If oExportData.AppVer = 0 Then
|
||||
oReader = ReadImportData(sLocation, bWebRead)
|
||||
oSerializer = New XmlSerializer(GetType(List(Of Game)), New XmlRootAttribute("gbm"))
|
||||
oExportData.Configurations = oSerializer.Deserialize(oReader)
|
||||
oReader.Close()
|
||||
End If
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
mgrCommon.ShowMessage(mgrXML_ErrorImportFailure, ex.Message, MsgBoxStyle.Exclamation)
|
||||
Return False
|
||||
End Try
|
||||
|
||||
Return oList
|
||||
End Function
|
||||
|
||||
Public Shared Function SerializeAndExport(ByVal oList As List(Of Game), ByVal sLocation As String) As Boolean
|
||||
Dim oSerializer As XmlSerializer
|
||||
Dim oWriter As StreamWriter
|
||||
Dim oExportData As ExportData
|
||||
|
||||
Try
|
||||
oSerializer = New XmlSerializer(oList.GetType(), New XmlRootAttribute("gbm"))
|
||||
oExportData = New ExportData(mgrCommon.DateToUnix(Now), oList.Count, mgrCommon.AppVersion, oList)
|
||||
oSerializer = New XmlSerializer(oExportData.GetType())
|
||||
oWriter = New StreamWriter(sLocation)
|
||||
oSerializer.Serialize(oWriter.BaseStream, oList)
|
||||
oSerializer.Serialize(oWriter.BaseStream, oExportData)
|
||||
oWriter.Flush()
|
||||
oWriter.Close()
|
||||
Return True
|
||||
|
||||
@@ -24,7 +24,7 @@ Namespace My
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Public Sub New()
|
||||
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
|
||||
Me.IsSingleInstance = false
|
||||
Me.IsSingleInstance = true
|
||||
Me.EnableVisualStyles = true
|
||||
Me.SaveMySettingsOnExit = false
|
||||
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>true</MySubMain>
|
||||
<MainForm>frmMain</MainForm>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<SingleInstance>true</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
|
||||
@@ -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 © 2016 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("0.97.*")>
|
||||
<Assembly: AssemblyFileVersion("0.97.0.0")>
|
||||
<Assembly: AssemblyVersion("1.1.9.*")>
|
||||
<Assembly: AssemblyFileVersion("1.1.9.0")>
|
||||
|
||||
<Assembly: NeutralResourcesLanguageAttribute("en")>
|
||||
|
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 |
|
After Width: | Height: | Size: 1.2 KiB |