Compare commits
494 Commits
v0.93-beta
...
v1.1.5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8aa35491d | ||
|
|
b7d62f38af | ||
|
|
58e4c3f3f2 | ||
|
|
9d439e3d12 | ||
|
|
9a046bcb4c | ||
|
|
a556fa5da1 | ||
|
|
42726ac0ab | ||
|
|
58ac76eba0 | ||
|
|
f9b325ae67 | ||
|
|
8d82b2efd3 | ||
|
|
cb49434a46 | ||
|
|
f659edff64 | ||
|
|
e325678e76 | ||
|
|
854d2ed537 | ||
|
|
c7e3e62ce1 | ||
|
|
898e72f163 | ||
|
|
333f7ac36a | ||
|
|
ace287f42a | ||
|
|
0f800565fe | ||
|
|
7a4caab5a5 | ||
|
|
c1b81585a0 | ||
|
|
0fcbfbe430 | ||
|
|
26d33206df | ||
|
|
dcbfad7513 | ||
|
|
8ab209c1a9 | ||
|
|
b674e4e82b | ||
|
|
9fc53e74b1 | ||
|
|
fd6ddd4b85 | ||
|
|
8800c4ebf4 | ||
|
|
9b89af931f | ||
|
|
874dfd4c86 | ||
|
|
cc8d16f4a9 | ||
|
|
748a921d1c | ||
|
|
d74a6d50b1 | ||
|
|
7ca4178631 | ||
|
|
63da6eba19 | ||
|
|
3e141cebb5 | ||
|
|
52c9fe506f | ||
|
|
b04c1bc18b | ||
|
|
647193f933 | ||
|
|
e6277f1ae4 | ||
|
|
ccd6d1fd39 | ||
|
|
0ed067e36f | ||
|
|
bca2fe2239 | ||
|
|
fa5d03ef52 | ||
|
|
998a680999 | ||
|
|
f5972da9eb | ||
|
|
794b0f9908 | ||
|
|
daa5f928bf | ||
|
|
72e3ccb661 | ||
|
|
9e7a4b5efc | ||
|
|
692deaaef9 | ||
|
|
a3572abb3d | ||
|
|
2680f857a9 | ||
|
|
1e2f4de816 | ||
|
|
b9b959f96c | ||
|
|
2ae705be18 | ||
|
|
ccade84b65 | ||
|
|
017c5def56 | ||
|
|
1f9dc18c49 | ||
|
|
bc1630a122 | ||
|
|
478721dbd1 | ||
|
|
8ad4810011 | ||
|
|
93bc974cc3 | ||
|
|
c9463c3a36 | ||
|
|
8b2c5f376b | ||
|
|
9e329476a2 | ||
|
|
626fca3e1e | ||
|
|
039f91cd6f | ||
|
|
f98a98af99 | ||
|
|
d9bd7f38f5 | ||
|
|
4e2ab9a0fb | ||
|
|
218ce3f367 | ||
|
|
b3cfab7ee6 | ||
|
|
39440e1f98 | ||
|
|
9b9d3f9125 | ||
|
|
7eab3b8841 | ||
|
|
539009c5de | ||
|
|
01b46107ad | ||
|
|
a5d2ce2255 | ||
|
|
c0764d0c08 | ||
|
|
35ea6fb74b | ||
|
|
a51a7bea89 | ||
|
|
b5f3408261 | ||
|
|
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 | ||
|
|
378377a1a9 | ||
|
|
86ffc75666 | ||
|
|
f312e315b9 | ||
|
|
e567638c0e | ||
|
|
1f9fcca024 | ||
|
|
b68646c97e | ||
|
|
896c77fe11 | ||
|
|
e288c77ba8 | ||
|
|
8b779f6d66 | ||
|
|
ef6e608d30 | ||
|
|
7b524e42fc | ||
|
|
2beff1b46d | ||
|
|
0ad4fd890d | ||
|
|
761fed64cc | ||
|
|
f839793071 | ||
|
|
b8b4c63910 | ||
|
|
ef70c08469 | ||
|
|
45e59f8ae6 | ||
|
|
cb9bab9892 | ||
|
|
7f19ae6345 | ||
|
|
ab240b610c | ||
|
|
6c80094848 | ||
|
|
16649238f0 | ||
|
|
39460f57d5 | ||
|
|
d788c751f7 | ||
|
|
3acb790822 | ||
|
|
0e4f357c01 | ||
|
|
58684bf9a5 | ||
|
|
1d19a49b0e | ||
|
|
94bb4e70ef | ||
|
|
1c493f1d4e | ||
|
|
970b1f4e58 | ||
|
|
911b3bdfc4 | ||
|
|
ce759fe87f | ||
|
|
d1ca0a150e | ||
|
|
b149a19a8b | ||
|
|
b458b89b46 | ||
|
|
83df2edc90 | ||
|
|
31b72488b2 | ||
|
|
3dbf5d0e62 | ||
|
|
2eb6693275 | ||
|
|
d1e292d4bf | ||
|
|
640690514b | ||
|
|
aade2dcee9 | ||
|
|
76ffc79a6b | ||
|
|
a6341ffa76 | ||
|
|
09c7bf8f05 | ||
|
|
039f47fccd | ||
|
|
164bb4255e | ||
|
|
df5e8f2d2a | ||
|
|
7766a07cf3 | ||
|
|
e71b2f4064 | ||
|
|
be2335b61e | ||
|
|
ca9fef33ea | ||
|
|
93c9b1a5ee | ||
|
|
730305b694 | ||
|
|
8880373f34 | ||
|
|
321c72b6bf | ||
|
|
163b6cd3a0 | ||
|
|
44c2d98f25 | ||
|
|
f050061b76 | ||
|
|
0cafd00bf3 | ||
|
|
feb8a9d0b2 | ||
|
|
d46360b244 | ||
|
|
ca8798a460 | ||
|
|
da16a89baa | ||
|
|
b03545d86f | ||
|
|
430e1171fb | ||
|
|
e531ec5701 | ||
|
|
7a7fa65ce6 | ||
|
|
4c7d36baef | ||
|
|
de7a993abe | ||
|
|
ec47697434 | ||
|
|
a7b97912f2 | ||
|
|
8222f518f6 | ||
|
|
0a564ca510 | ||
|
|
85d9cc0c5f | ||
|
|
abbc6a4a70 | ||
|
|
5947b7d0b2 | ||
|
|
2fb18c5f19 | ||
|
|
47f4b0774d | ||
|
|
70be04b750 | ||
|
|
b5d6c058aa | ||
|
|
c847cf53d0 | ||
|
|
92ad195510 | ||
|
|
18686abced | ||
|
|
4f45239e90 | ||
|
|
88e0fa9afd | ||
|
|
51ca315edd | ||
|
|
da9a1d8b53 | ||
|
|
0e93d284ea | ||
|
|
96ca94a3ac | ||
|
|
83e14a20ad | ||
|
|
3c941bae8d | ||
|
|
4316a7c7be | ||
|
|
8778f2e1c0 | ||
|
|
8930f6d6cc | ||
|
|
50cb987e9a | ||
|
|
333d18f296 | ||
|
|
f79c446adc | ||
|
|
022ef5d35c | ||
|
|
3f35d442d5 | ||
|
|
3c64ef3320 | ||
|
|
8a359e949a | ||
|
|
19802a5883 | ||
|
|
87326981dd | ||
|
|
f22bcb91a9 | ||
|
|
fa27c3c389 | ||
|
|
d42093c860 | ||
|
|
7871b6e012 | ||
|
|
d26c78c093 | ||
|
|
80badb577a | ||
|
|
b270ffeabe | ||
|
|
83135acb90 | ||
|
|
1e68728930 | ||
|
|
a27802fea7 | ||
|
|
7abdf9da7b | ||
|
|
237f5e7fa4 | ||
|
|
f8207683ad | ||
|
|
b96f797bbf | ||
|
|
07a4981488 | ||
|
|
e0277ac0fa | ||
|
|
b86206a7a2 | ||
|
|
39bbafd731 | ||
|
|
3062b20775 | ||
|
|
525c7d3ec3 | ||
|
|
0339a09b08 | ||
|
|
1b47b6aa15 | ||
|
|
de5d1e062a | ||
|
|
7e1302714d | ||
|
|
27f03cbd35 | ||
|
|
254bcbbab5 | ||
|
|
2617852d77 | ||
|
|
ca7cc7824a | ||
|
|
91f423d7ae | ||
|
|
2744aa7cbc | ||
|
|
aba6ed1462 | ||
|
|
0ba1323fb2 | ||
|
|
c05ef0f32f | ||
|
|
a8cda1d5f8 | ||
|
|
049878202a | ||
|
|
0a3bb9a58f | ||
|
|
040d6c4bf3 | ||
|
|
e13b6cd58b | ||
|
|
7c1698388a | ||
|
|
ebf5fb5f4d | ||
|
|
5357fb214d | ||
|
|
5e5da3c068 | ||
|
|
3743e71288 | ||
|
|
0c3f3fd5f4 | ||
|
|
2e63862493 | ||
|
|
c7a279e11a | ||
|
|
90b1194cc5 | ||
|
|
d489738d08 | ||
|
|
0fc6ce772b |
Vendored
+4
@@ -1,6 +1,10 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# Set default behavior to automatically normalize line endings.
|
# 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
|
* text=auto
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|||||||
Vendored
+1
@@ -186,3 +186,4 @@ FakesAssemblies/
|
|||||||
GeneratedArtifacts/
|
GeneratedArtifacts/
|
||||||
_Pvt_Extensions/
|
_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
|
||||||
@@ -0,0 +1,153 @@
|
|||||||
|
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 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
|
||||||
|
End Set
|
||||||
|
Get
|
||||||
|
Return sGameName
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Property ProcessName As String
|
||||||
|
Set(value As String)
|
||||||
|
sProcessName = value
|
||||||
|
End Set
|
||||||
|
Get
|
||||||
|
Return sProcessName
|
||||||
|
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
|
||||||
|
End Set
|
||||||
|
Get
|
||||||
|
Return sPath
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Property AbsolutePath As Boolean
|
||||||
|
Set(value As Boolean)
|
||||||
|
bAbsolutePath = value
|
||||||
|
End Set
|
||||||
|
Get
|
||||||
|
Return bAbsolutePath
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Property FolderSave As Boolean
|
||||||
|
Set(value As Boolean)
|
||||||
|
bFolderSave = value
|
||||||
|
End Set
|
||||||
|
Get
|
||||||
|
Return bFolderSave
|
||||||
|
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
|
||||||
|
End Set
|
||||||
|
Get
|
||||||
|
Return sFileType
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Property ExcludeList As String
|
||||||
|
Set(value As String)
|
||||||
|
sExcludeList = value
|
||||||
|
End Set
|
||||||
|
Get
|
||||||
|
Return sExcludeList
|
||||||
|
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 Tags As List(Of Tag)
|
||||||
|
Get
|
||||||
|
Return oTags
|
||||||
|
End Get
|
||||||
|
Set(value As List(Of Tag))
|
||||||
|
oTags = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -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
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
<Serializable()>
|
||||||
|
Public Class Tag
|
||||||
|
Private sTagName As String
|
||||||
|
|
||||||
|
Property Name As String
|
||||||
|
Get
|
||||||
|
Return sTagName
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
sTagName = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
End Class
|
||||||
+23
-23
@@ -1,5 +1,6 @@
|
|||||||
Public Class clsBackup
|
Public Class clsBackup
|
||||||
Private sBackupID As String = Guid.NewGuid.ToString
|
Private sBackupID As String = Guid.NewGuid.ToString
|
||||||
|
Private sMonitorID As String = String.Empty
|
||||||
Private sName As String = String.Empty
|
Private sName As String = String.Empty
|
||||||
Private sFileName As String = String.Empty
|
Private sFileName As String = String.Empty
|
||||||
Private sRestorePath As String = String.Empty
|
Private sRestorePath As String = String.Empty
|
||||||
@@ -7,11 +8,9 @@
|
|||||||
Private sRelativeRestorePath As String = String.Empty
|
Private sRelativeRestorePath As String = String.Empty
|
||||||
Private dDateUpdated As DateTime = Date.Now
|
Private dDateUpdated As DateTime = Date.Now
|
||||||
Private sUpdatedBy As String = String.Empty
|
Private sUpdatedBy As String = String.Empty
|
||||||
Private dLastDateUpdated As DateTime = Date.Now
|
|
||||||
Private sLastUpdatedBy As String = String.Empty
|
|
||||||
Private sCheckSum As String = String.Empty
|
Private sCheckSum As String = String.Empty
|
||||||
|
|
||||||
Property ID As String
|
Property ManifestID As String
|
||||||
Get
|
Get
|
||||||
Return sBackupID
|
Return sBackupID
|
||||||
End Get
|
End Get
|
||||||
@@ -20,6 +19,15 @@
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
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
|
Property Name As String
|
||||||
Get
|
Get
|
||||||
Return sName
|
Return sName
|
||||||
@@ -32,16 +40,26 @@
|
|||||||
ReadOnly Property CroppedName As String
|
ReadOnly Property CroppedName As String
|
||||||
Get
|
Get
|
||||||
If Name.Length > 40 Then
|
If Name.Length > 40 Then
|
||||||
Return sName.Substring(0, 41) & "..."
|
Return sName.Substring(0, 41).Trim & "..."
|
||||||
Else
|
Else
|
||||||
Return sName
|
Return sName
|
||||||
End If
|
End If
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
ReadOnly Property FileSafeName As String
|
||||||
|
Get
|
||||||
|
Return mgrPath.ValidateFileNameForOS(sName)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Property FileName As String
|
Property FileName As String
|
||||||
Get
|
Get
|
||||||
Return sFileName
|
If mgrCommon.IsUnix Then
|
||||||
|
Return sFileName.Replace("\", "/")
|
||||||
|
Else
|
||||||
|
Return sFileName.Replace("/", "\")
|
||||||
|
End If
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
sFileName = value
|
sFileName = value
|
||||||
@@ -105,24 +123,6 @@
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
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
|
Property CheckSum As String
|
||||||
Get
|
Get
|
||||||
Return sCheckSum
|
Return sCheckSum
|
||||||
|
|||||||
+211
-53
@@ -1,12 +1,16 @@
|
|||||||
Public Class clsGame
|
<Serializable()>
|
||||||
|
Public Class clsGame
|
||||||
Private sGameID As String = Guid.NewGuid.ToString
|
Private sGameID As String = Guid.NewGuid.ToString
|
||||||
Private sGameName As String = String.Empty
|
Private sGameName As String = String.Empty
|
||||||
Private sProcessName As String = String.Empty
|
Private sProcessName As String = String.Empty
|
||||||
|
Private sParameter As String = String.Empty
|
||||||
Private sPath As String = String.Empty
|
Private sPath As String = String.Empty
|
||||||
Private bAbsolutePath As Boolean = False
|
Private bAbsolutePath As Boolean = False
|
||||||
Private bFolderSave As Boolean = False
|
Private bFolderSave As Boolean = False
|
||||||
Private sFileType As String = String.Empty
|
Private sFileType As String = String.Empty
|
||||||
Private bAppendTimeStamp As Boolean = False
|
Private bAppendTimeStamp As Boolean = False
|
||||||
|
Private iBackupLimit As Integer = 0
|
||||||
|
Private bCleanFolder As Boolean = False
|
||||||
Private sExcludeList As String = String.Empty
|
Private sExcludeList As String = String.Empty
|
||||||
Private sProcessPath As String = String.Empty
|
Private sProcessPath As String = String.Empty
|
||||||
Private sIcon As String = String.Empty
|
Private sIcon As String = String.Empty
|
||||||
@@ -15,13 +19,26 @@
|
|||||||
Private sCompany As String = String.Empty
|
Private sCompany As String = String.Empty
|
||||||
Private bEnabled As Boolean = True
|
Private bEnabled As Boolean = True
|
||||||
Private bMonitorOnly As Boolean = False
|
Private bMonitorOnly As Boolean = False
|
||||||
Private bDuplicate As Boolean = False
|
Private sComments As String = String.Empty
|
||||||
Private sDOSBoxProcess As String = String.Empty
|
Private bIsRegEx As Boolean = False
|
||||||
Private bTempGame As Boolean = False
|
Private oImportTags As New List(Of Tag)
|
||||||
|
Private bImportUpdate As Boolean = False
|
||||||
|
|
||||||
|
<Flags()> Public Enum eOptionalSyncFields
|
||||||
|
None = 0
|
||||||
|
GamePath = 1
|
||||||
|
Company = 2
|
||||||
|
Version = 4
|
||||||
|
Icon = 16
|
||||||
|
Unused = 32 'Do not remove to maintain compatability, re-use for a future field.
|
||||||
|
MonitorGame = 64
|
||||||
|
End Enum
|
||||||
|
|
||||||
Property ID As String
|
Property ID As String
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
sGameID = value
|
If Not value Is Nothing Then
|
||||||
|
sGameID = mgrPath.ValidateFileNameForOS(value)
|
||||||
|
End If
|
||||||
End Set
|
End Set
|
||||||
Get
|
Get
|
||||||
Return sGameID
|
Return sGameID
|
||||||
@@ -31,13 +48,18 @@
|
|||||||
ReadOnly Property CroppedName As String
|
ReadOnly Property CroppedName As String
|
||||||
Get
|
Get
|
||||||
If Name.Length > 40 Then
|
If Name.Length > 40 Then
|
||||||
Return sGameName.Substring(0, 41) & "..."
|
Return sGameName.Substring(0, 41).Trim & "..."
|
||||||
Else
|
Else
|
||||||
Return sGameName
|
Return sGameName
|
||||||
End If
|
End If
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
ReadOnly Property FileSafeName As String
|
||||||
|
Get
|
||||||
|
Return mgrPath.ValidateFileNameForOS(sGameName)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Property Name As String
|
Property Name As String
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
@@ -57,6 +79,15 @@
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
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
|
Property Path As String
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
sPath = mgrPath.ReverseSpecialPaths(value)
|
sPath = mgrPath.ReverseSpecialPaths(value)
|
||||||
@@ -102,6 +133,24 @@
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
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
|
Property ExcludeList As String
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
sExcludeList = value
|
sExcludeList = value
|
||||||
@@ -157,73 +206,106 @@
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
Property Enabled As Boolean
|
Property Enabled As Boolean
|
||||||
Set(value As Boolean)
|
|
||||||
bEnabled = value
|
|
||||||
End Set
|
|
||||||
Get
|
Get
|
||||||
Return bEnabled
|
Return bEnabled
|
||||||
End Get
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
bEnabled = value
|
||||||
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Property MonitorOnly As Boolean
|
Property MonitorOnly As Boolean
|
||||||
Set(value As Boolean)
|
|
||||||
bMonitorOnly = value
|
|
||||||
End Set
|
|
||||||
Get
|
Get
|
||||||
Return bMonitorOnly
|
Return bMonitorOnly
|
||||||
End Get
|
End Get
|
||||||
End Property
|
|
||||||
|
|
||||||
Property Duplicate As Boolean
|
|
||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
bDuplicate = value
|
bMonitorOnly = value
|
||||||
End Set
|
End Set
|
||||||
Get
|
|
||||||
Return bDuplicate
|
|
||||||
End Get
|
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Property DOSBoxProcess As String
|
Property Comments As String
|
||||||
|
Get
|
||||||
|
Return sComments
|
||||||
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
sDOSBoxProcess = value
|
sComments = value
|
||||||
End Set
|
End Set
|
||||||
Get
|
|
||||||
Return sDOSBoxProcess
|
|
||||||
End Get
|
|
||||||
End Property
|
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 TruePath As String
|
||||||
|
Set(value As String)
|
||||||
|
sPath = value
|
||||||
|
End Set
|
||||||
Get
|
Get
|
||||||
Return sPath
|
Return sPath
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
ReadOnly Property TrueProcess As String
|
Property ImportTags As List(Of Tag)
|
||||||
Get
|
Get
|
||||||
Return HandleProcessDuplicates()
|
Return oImportTags
|
||||||
End Get
|
End Get
|
||||||
End Property
|
Set(value As List(Of Tag))
|
||||||
|
oImportTags = value
|
||||||
Property Temporary As Boolean
|
|
||||||
Get
|
|
||||||
Return bTempGame
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
bTempGame = value
|
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public Function SyncEquals(obj As Object) As Boolean
|
Property ImportUpdate As Boolean
|
||||||
|
Get
|
||||||
|
Return bImportUpdate
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
bImportUpdate = 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)
|
Dim oGame As clsGame = TryCast(obj, clsGame)
|
||||||
If oGame Is Nothing Then
|
If oGame Is Nothing Then
|
||||||
Return False
|
Return False
|
||||||
Else
|
Else
|
||||||
|
'Core Sync Fields
|
||||||
|
If ID <> oGame.ID Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
If Name <> oGame.Name Then
|
If Name <> oGame.Name Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
If ProcessName <> oGame.ProcessName Then
|
If ProcessName <> oGame.ProcessName Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
If Parameter <> oGame.Parameter Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
If Path <> oGame.Path Then
|
If Path <> oGame.Path Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
@@ -242,9 +324,51 @@
|
|||||||
If AppendTimeStamp <> oGame.AppendTimeStamp Then
|
If AppendTimeStamp <> oGame.AppendTimeStamp Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
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
|
If Hours <> oGame.Hours Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
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
|
||||||
|
|
||||||
|
'Optional Sync Fields
|
||||||
|
If (eSyncFields And eOptionalSyncFields.Company) = eOptionalSyncFields.Company Then
|
||||||
|
If Company <> oGame.Company Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
If (eSyncFields And eOptionalSyncFields.GamePath) = eOptionalSyncFields.GamePath Then
|
||||||
|
If ProcessPath <> oGame.ProcessPath Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
If (eSyncFields And eOptionalSyncFields.Icon) = eOptionalSyncFields.Icon Then
|
||||||
|
If Icon <> oGame.Icon Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
If (eSyncFields And eOptionalSyncFields.MonitorGame) = eOptionalSyncFields.MonitorGame Then
|
||||||
|
If Enabled <> oGame.Enabled Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
If (eSyncFields And eOptionalSyncFields.Version) = eOptionalSyncFields.Version Then
|
||||||
|
If Version <> oGame.Version Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
@@ -254,12 +378,58 @@
|
|||||||
If oGame Is Nothing Then
|
If oGame Is Nothing Then
|
||||||
Return False
|
Return False
|
||||||
Else
|
Else
|
||||||
|
'Core Fields
|
||||||
|
If ID <> oGame.ID Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
If Name <> oGame.Name Then
|
If Name <> oGame.Name Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
If ProcessName <> oGame.ProcessName Then
|
If ProcessName <> oGame.ProcessName Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
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
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function MinimalEquals(obj As Object) As Boolean
|
||||||
|
Dim oGame As clsGame = TryCast(obj, clsGame)
|
||||||
|
If oGame Is Nothing Then
|
||||||
|
Return False
|
||||||
|
Else
|
||||||
|
If ID <> oGame.ID Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
@@ -268,24 +438,12 @@
|
|||||||
Return DirectCast(Me.MemberwiseClone(), clsGame)
|
Return DirectCast(Me.MemberwiseClone(), clsGame)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function HandleProcessDuplicates() As String
|
Public Shared Function SetSyncField(ByVal eSyncFields As eOptionalSyncFields, ByVal eSyncField As eOptionalSyncFields) As eOptionalSyncFields
|
||||||
Dim sProcessName As String
|
Return eSyncFields Or eSyncField
|
||||||
|
End Function
|
||||||
|
|
||||||
'Handle Duplicates
|
Public Shared Function RemoveSyncField(ByVal eSyncFields As eOptionalSyncFields, ByVal eSyncField As eOptionalSyncFields) As eOptionalSyncFields
|
||||||
sProcessName = Me.ProcessName
|
Return eSyncFields And (Not eSyncField)
|
||||||
If Me.Duplicate Then
|
|
||||||
If Me.ProcessName.Contains("dosbox") Then
|
|
||||||
If Me.ProcessName.Split(":").Length = 3 Then
|
|
||||||
sProcessName = Me.ProcessName.Remove(Me.ProcessName.LastIndexOf(":"))
|
|
||||||
Else
|
|
||||||
sProcessName = Me.ProcessName
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
sProcessName = Me.ProcessName.Split(":")(0)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
Return sProcessName
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
End Class
|
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,77 @@
|
|||||||
|
Public Class clsGameFilterField
|
||||||
|
|
||||||
|
Public Enum eDataType As Integer
|
||||||
|
fString = 1
|
||||||
|
fNumeric = 2
|
||||||
|
fBool = 3
|
||||||
|
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 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
|
||||||
|
|
||||||
|
'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
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
Public Class clsGameTag
|
||||||
|
Private sTagID As String = String.Empty
|
||||||
|
Private sMonitorID As String = String.Empty
|
||||||
|
|
||||||
|
Property TagID As String
|
||||||
|
Get
|
||||||
|
Return sTagID
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
sTagID = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Property MonitorID As String
|
||||||
|
Get
|
||||||
|
Return sMonitorID
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
sMonitorID = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Function CoreEquals(obj As Object) As Boolean
|
||||||
|
Dim oGameTag As clsGameTag = TryCast(obj, clsGameTag)
|
||||||
|
If oGameTag Is Nothing Then
|
||||||
|
Return False
|
||||||
|
Else
|
||||||
|
If TagID <> oGameTag.TagID Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
If MonitorID <> oGameTag.MonitorID Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
ReadOnly Property FormattedName As String
|
ReadOnly Property FormattedName As String
|
||||||
Get
|
Get
|
||||||
Return "*" & sVariableName & "*"
|
Return "%" & sVariableName & "%"
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
Public Class clsSavedPath
|
||||||
Private sName As String
|
Private sPathName As String = String.Empty
|
||||||
Private sPath As String
|
Private sPath As String = String.Empty
|
||||||
|
|
||||||
Property Name As String
|
Property PathName As String
|
||||||
Get
|
Get
|
||||||
Return sName
|
Return sPathName
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
sName = value
|
sPathName = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -19,5 +19,4 @@
|
|||||||
sPath = value
|
sPath = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
End Class
|
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,50 @@
|
|||||||
|
Public Class clsTag
|
||||||
|
Private sTagID As String = Guid.NewGuid.ToString
|
||||||
|
Private sTagName As String = String.Empty
|
||||||
|
|
||||||
|
Property ID As String
|
||||||
|
Get
|
||||||
|
Return sTagID
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
sTagID = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Property Name As String
|
||||||
|
Get
|
||||||
|
Return sTagName
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
sTagName = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Function CoreEquals(obj As Object) As Boolean
|
||||||
|
Dim oTag As clsTag = TryCast(obj, clsTag)
|
||||||
|
If oTag Is Nothing Then
|
||||||
|
Return False
|
||||||
|
Else
|
||||||
|
If ID <> oTag.ID Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
If Name <> oTag.Name Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function MinimalEquals(obj As Object) As Boolean
|
||||||
|
Dim oTag As clsTag = TryCast(obj, clsTag)
|
||||||
|
If oTag Is Nothing Then
|
||||||
|
Return False
|
||||||
|
Else
|
||||||
|
If ID <> oTag.ID Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
Generated
+142
-236
@@ -26,21 +26,18 @@ Partial Class frmAddWizard
|
|||||||
Me.tabWizard = New System.Windows.Forms.TabControl()
|
Me.tabWizard = New System.Windows.Forms.TabControl()
|
||||||
Me.tbPage1 = New System.Windows.Forms.TabPage()
|
Me.tbPage1 = New System.Windows.Forms.TabPage()
|
||||||
Me.lblStep1Title = New System.Windows.Forms.Label()
|
Me.lblStep1Title = New System.Windows.Forms.Label()
|
||||||
Me.lblDrag1 = New System.Windows.Forms.Label()
|
|
||||||
Me.lblStep1Instructions = New System.Windows.Forms.Label()
|
Me.lblStep1Instructions = New System.Windows.Forms.Label()
|
||||||
Me.txtName = New System.Windows.Forms.TextBox()
|
Me.txtName = New System.Windows.Forms.TextBox()
|
||||||
Me.lblStep1Intro = New System.Windows.Forms.Label()
|
Me.lblStep1Intro = New System.Windows.Forms.Label()
|
||||||
Me.tbPage2 = New System.Windows.Forms.TabPage()
|
Me.tbPage2 = New System.Windows.Forms.TabPage()
|
||||||
Me.lbldBox = New System.Windows.Forms.Label()
|
|
||||||
Me.btndBoxBrowse = New System.Windows.Forms.Button()
|
|
||||||
Me.txtdBoxProcess = New System.Windows.Forms.TextBox()
|
|
||||||
Me.lblStep2Title = New System.Windows.Forms.Label()
|
Me.lblStep2Title = New System.Windows.Forms.Label()
|
||||||
Me.lblStep2Instructions = New System.Windows.Forms.Label()
|
Me.lblStep2Instructions = New System.Windows.Forms.Label()
|
||||||
Me.lblDrag2 = New System.Windows.Forms.Label()
|
|
||||||
Me.btnProcessBrowse = New System.Windows.Forms.Button()
|
Me.btnProcessBrowse = New System.Windows.Forms.Button()
|
||||||
Me.txtProcessPath = New System.Windows.Forms.TextBox()
|
Me.txtProcessPath = New System.Windows.Forms.TextBox()
|
||||||
Me.lblStep2Intro = New System.Windows.Forms.Label()
|
Me.lblStep2Intro = New System.Windows.Forms.Label()
|
||||||
Me.tbPage3 = New System.Windows.Forms.TabPage()
|
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.lblStep3Title = New System.Windows.Forms.Label()
|
||||||
Me.lblStep3Instructions = New System.Windows.Forms.Label()
|
Me.lblStep3Instructions = New System.Windows.Forms.Label()
|
||||||
Me.chkTimeStamp = New System.Windows.Forms.CheckBox()
|
Me.chkTimeStamp = New System.Windows.Forms.CheckBox()
|
||||||
@@ -49,21 +46,18 @@ Partial Class frmAddWizard
|
|||||||
Me.txtSavePath = New System.Windows.Forms.TextBox()
|
Me.txtSavePath = New System.Windows.Forms.TextBox()
|
||||||
Me.lblStep3Intro = New System.Windows.Forms.Label()
|
Me.lblStep3Intro = New System.Windows.Forms.Label()
|
||||||
Me.tbPage3a = New System.Windows.Forms.TabPage()
|
Me.tbPage3a = New System.Windows.Forms.TabPage()
|
||||||
Me.grpFileTypes = New System.Windows.Forms.GroupBox()
|
Me.lblIncludePathTitle = New System.Windows.Forms.Label()
|
||||||
Me.optSpecificFile = New System.Windows.Forms.RadioButton()
|
Me.lblIncludePath = New System.Windows.Forms.Label()
|
||||||
Me.btnFileTypeBrowse = New System.Windows.Forms.Button()
|
Me.lblFileTypes = New System.Windows.Forms.Label()
|
||||||
Me.optFileType = New System.Windows.Forms.RadioButton()
|
Me.btnInclude = New System.Windows.Forms.Button()
|
||||||
Me.btnStep3aClear = New System.Windows.Forms.Button()
|
|
||||||
Me.lblStep3aTitle = New System.Windows.Forms.Label()
|
Me.lblStep3aTitle = New System.Windows.Forms.Label()
|
||||||
Me.lblStep3aInstructions = New System.Windows.Forms.Label()
|
Me.lblStep3aInstructions = New System.Windows.Forms.Label()
|
||||||
Me.txtFileTypes = New System.Windows.Forms.TextBox()
|
Me.txtFileTypes = New System.Windows.Forms.TextBox()
|
||||||
Me.tbPage4 = New System.Windows.Forms.TabPage()
|
Me.tbPage4 = New System.Windows.Forms.TabPage()
|
||||||
Me.grpExclude = New System.Windows.Forms.GroupBox()
|
Me.lblExcludePathTitle = New System.Windows.Forms.Label()
|
||||||
Me.optExcludeSpecificFile = New System.Windows.Forms.RadioButton()
|
Me.lblExcludePath = New System.Windows.Forms.Label()
|
||||||
Me.btnExcludeBrowse = New System.Windows.Forms.Button()
|
Me.lblExclude = New System.Windows.Forms.Label()
|
||||||
Me.optExcludeFileType = New System.Windows.Forms.RadioButton()
|
Me.btnExclude = New System.Windows.Forms.Button()
|
||||||
Me.optExcludeFolder = New System.Windows.Forms.RadioButton()
|
|
||||||
Me.btnStep4Clear = New System.Windows.Forms.Button()
|
|
||||||
Me.lblStep4Title = New System.Windows.Forms.Label()
|
Me.lblStep4Title = New System.Windows.Forms.Label()
|
||||||
Me.lblStep4Instructions = New System.Windows.Forms.Label()
|
Me.lblStep4Instructions = New System.Windows.Forms.Label()
|
||||||
Me.txtExcludeList = New System.Windows.Forms.TextBox()
|
Me.txtExcludeList = New System.Windows.Forms.TextBox()
|
||||||
@@ -74,15 +68,13 @@ Partial Class frmAddWizard
|
|||||||
Me.btnCancel = New System.Windows.Forms.Button()
|
Me.btnCancel = New System.Windows.Forms.Button()
|
||||||
Me.btnNext = New System.Windows.Forms.Button()
|
Me.btnNext = New System.Windows.Forms.Button()
|
||||||
Me.btnBack = New System.Windows.Forms.Button()
|
Me.btnBack = New System.Windows.Forms.Button()
|
||||||
Me.optFileTypeFolder = New System.Windows.Forms.RadioButton()
|
|
||||||
Me.tabWizard.SuspendLayout()
|
Me.tabWizard.SuspendLayout()
|
||||||
Me.tbPage1.SuspendLayout()
|
Me.tbPage1.SuspendLayout()
|
||||||
Me.tbPage2.SuspendLayout()
|
Me.tbPage2.SuspendLayout()
|
||||||
Me.tbPage3.SuspendLayout()
|
Me.tbPage3.SuspendLayout()
|
||||||
|
CType(Me.nudLimit, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
Me.tbPage3a.SuspendLayout()
|
Me.tbPage3a.SuspendLayout()
|
||||||
Me.grpFileTypes.SuspendLayout()
|
|
||||||
Me.tbPage4.SuspendLayout()
|
Me.tbPage4.SuspendLayout()
|
||||||
Me.grpExclude.SuspendLayout()
|
|
||||||
Me.tbPage5.SuspendLayout()
|
Me.tbPage5.SuspendLayout()
|
||||||
Me.SuspendLayout()
|
Me.SuspendLayout()
|
||||||
'
|
'
|
||||||
@@ -105,7 +97,6 @@ Partial Class frmAddWizard
|
|||||||
'
|
'
|
||||||
Me.tbPage1.BackColor = System.Drawing.SystemColors.Control
|
Me.tbPage1.BackColor = System.Drawing.SystemColors.Control
|
||||||
Me.tbPage1.Controls.Add(Me.lblStep1Title)
|
Me.tbPage1.Controls.Add(Me.lblStep1Title)
|
||||||
Me.tbPage1.Controls.Add(Me.lblDrag1)
|
|
||||||
Me.tbPage1.Controls.Add(Me.lblStep1Instructions)
|
Me.tbPage1.Controls.Add(Me.lblStep1Instructions)
|
||||||
Me.tbPage1.Controls.Add(Me.txtName)
|
Me.tbPage1.Controls.Add(Me.txtName)
|
||||||
Me.tbPage1.Controls.Add(Me.lblStep1Intro)
|
Me.tbPage1.Controls.Add(Me.lblStep1Intro)
|
||||||
@@ -126,25 +117,15 @@ Partial Class frmAddWizard
|
|||||||
Me.lblStep1Title.TabIndex = 8
|
Me.lblStep1Title.TabIndex = 8
|
||||||
Me.lblStep1Title.Text = "Game Name"
|
Me.lblStep1Title.Text = "Game Name"
|
||||||
'
|
'
|
||||||
'lblDrag1
|
|
||||||
'
|
|
||||||
Me.lblDrag1.AllowDrop = True
|
|
||||||
Me.lblDrag1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
|
||||||
Me.lblDrag1.Location = New System.Drawing.Point(14, 147)
|
|
||||||
Me.lblDrag1.Name = "lblDrag1"
|
|
||||||
Me.lblDrag1.Size = New System.Drawing.Size(303, 37)
|
|
||||||
Me.lblDrag1.TabIndex = 7
|
|
||||||
Me.lblDrag1.Text = "Drag a shortcut here to complete this step."
|
|
||||||
'
|
|
||||||
'lblStep1Instructions
|
'lblStep1Instructions
|
||||||
'
|
'
|
||||||
|
Me.lblStep1Instructions.AllowDrop = True
|
||||||
Me.lblStep1Instructions.Location = New System.Drawing.Point(14, 93)
|
Me.lblStep1Instructions.Location = New System.Drawing.Point(14, 93)
|
||||||
Me.lblStep1Instructions.Name = "lblStep1Instructions"
|
Me.lblStep1Instructions.Name = "lblStep1Instructions"
|
||||||
Me.lblStep1Instructions.Size = New System.Drawing.Size(303, 42)
|
Me.lblStep1Instructions.Size = New System.Drawing.Size(303, 85)
|
||||||
Me.lblStep1Instructions.TabIndex = 6
|
Me.lblStep1Instructions.TabIndex = 6
|
||||||
Me.lblStep1Instructions.Text = "The name of the game is used for the backup file and must conform to Windows file" &
|
Me.lblStep1Instructions.Text = "You may drag and drop a shortcut here to complete this step, only Windows shortcu" &
|
||||||
" name standards. It will be automatically filtered for length and invalid chara" &
|
"ts are currently supported."
|
||||||
"cters. "
|
|
||||||
'
|
'
|
||||||
'txtName
|
'txtName
|
||||||
'
|
'
|
||||||
@@ -166,12 +147,8 @@ Partial Class frmAddWizard
|
|||||||
'tbPage2
|
'tbPage2
|
||||||
'
|
'
|
||||||
Me.tbPage2.BackColor = System.Drawing.SystemColors.Control
|
Me.tbPage2.BackColor = System.Drawing.SystemColors.Control
|
||||||
Me.tbPage2.Controls.Add(Me.lbldBox)
|
|
||||||
Me.tbPage2.Controls.Add(Me.btndBoxBrowse)
|
|
||||||
Me.tbPage2.Controls.Add(Me.txtdBoxProcess)
|
|
||||||
Me.tbPage2.Controls.Add(Me.lblStep2Title)
|
Me.tbPage2.Controls.Add(Me.lblStep2Title)
|
||||||
Me.tbPage2.Controls.Add(Me.lblStep2Instructions)
|
Me.tbPage2.Controls.Add(Me.lblStep2Instructions)
|
||||||
Me.tbPage2.Controls.Add(Me.lblDrag2)
|
|
||||||
Me.tbPage2.Controls.Add(Me.btnProcessBrowse)
|
Me.tbPage2.Controls.Add(Me.btnProcessBrowse)
|
||||||
Me.tbPage2.Controls.Add(Me.txtProcessPath)
|
Me.tbPage2.Controls.Add(Me.txtProcessPath)
|
||||||
Me.tbPage2.Controls.Add(Me.lblStep2Intro)
|
Me.tbPage2.Controls.Add(Me.lblStep2Intro)
|
||||||
@@ -182,32 +159,6 @@ Partial Class frmAddWizard
|
|||||||
Me.tbPage2.TabIndex = 1
|
Me.tbPage2.TabIndex = 1
|
||||||
Me.tbPage2.Text = "TabPage2"
|
Me.tbPage2.Text = "TabPage2"
|
||||||
'
|
'
|
||||||
'lbldBox
|
|
||||||
'
|
|
||||||
Me.lbldBox.AutoSize = True
|
|
||||||
Me.lbldBox.Location = New System.Drawing.Point(184, 18)
|
|
||||||
Me.lbldBox.Name = "lbldBox"
|
|
||||||
Me.lbldBox.Size = New System.Drawing.Size(52, 13)
|
|
||||||
Me.lbldBox.TabIndex = 14
|
|
||||||
Me.lbldBox.Text = "DOS File:"
|
|
||||||
'
|
|
||||||
'btndBoxBrowse
|
|
||||||
'
|
|
||||||
Me.btndBoxBrowse.Location = New System.Drawing.Point(322, 14)
|
|
||||||
Me.btndBoxBrowse.Name = "btndBoxBrowse"
|
|
||||||
Me.btndBoxBrowse.Size = New System.Drawing.Size(27, 20)
|
|
||||||
Me.btndBoxBrowse.TabIndex = 13
|
|
||||||
Me.btndBoxBrowse.Text = "..."
|
|
||||||
Me.btndBoxBrowse.UseVisualStyleBackColor = True
|
|
||||||
'
|
|
||||||
'txtdBoxProcess
|
|
||||||
'
|
|
||||||
Me.txtdBoxProcess.AllowDrop = True
|
|
||||||
Me.txtdBoxProcess.Location = New System.Drawing.Point(244, 14)
|
|
||||||
Me.txtdBoxProcess.Name = "txtdBoxProcess"
|
|
||||||
Me.txtdBoxProcess.Size = New System.Drawing.Size(72, 20)
|
|
||||||
Me.txtdBoxProcess.TabIndex = 12
|
|
||||||
'
|
|
||||||
'lblStep2Title
|
'lblStep2Title
|
||||||
'
|
'
|
||||||
Me.lblStep2Title.AutoSize = True
|
Me.lblStep2Title.AutoSize = True
|
||||||
@@ -220,22 +171,12 @@ Partial Class frmAddWizard
|
|||||||
'
|
'
|
||||||
'lblStep2Instructions
|
'lblStep2Instructions
|
||||||
'
|
'
|
||||||
|
Me.lblStep2Instructions.AllowDrop = True
|
||||||
Me.lblStep2Instructions.Location = New System.Drawing.Point(14, 93)
|
Me.lblStep2Instructions.Location = New System.Drawing.Point(14, 93)
|
||||||
Me.lblStep2Instructions.Name = "lblStep2Instructions"
|
Me.lblStep2Instructions.Name = "lblStep2Instructions"
|
||||||
Me.lblStep2Instructions.Size = New System.Drawing.Size(303, 41)
|
Me.lblStep2Instructions.Size = New System.Drawing.Size(303, 85)
|
||||||
Me.lblStep2Instructions.TabIndex = 10
|
Me.lblStep2Instructions.TabIndex = 10
|
||||||
Me.lblStep2Instructions.Text = "GBM needs to know what to look for when you run the application. Some games use " &
|
Me.lblStep2Instructions.Text = resources.GetString("lblStep2Instructions.Text")
|
||||||
"launchers. Do not monitor launchers, choose the actual game exe file."
|
|
||||||
'
|
|
||||||
'lblDrag2
|
|
||||||
'
|
|
||||||
Me.lblDrag2.AllowDrop = True
|
|
||||||
Me.lblDrag2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
|
||||||
Me.lblDrag2.Location = New System.Drawing.Point(14, 147)
|
|
||||||
Me.lblDrag2.Name = "lblDrag2"
|
|
||||||
Me.lblDrag2.Size = New System.Drawing.Size(336, 44)
|
|
||||||
Me.lblDrag2.TabIndex = 9
|
|
||||||
Me.lblDrag2.Text = "Drag a shortcut here to complete this step."
|
|
||||||
'
|
'
|
||||||
'btnProcessBrowse
|
'btnProcessBrowse
|
||||||
'
|
'
|
||||||
@@ -266,6 +207,8 @@ Partial Class frmAddWizard
|
|||||||
'tbPage3
|
'tbPage3
|
||||||
'
|
'
|
||||||
Me.tbPage3.BackColor = System.Drawing.SystemColors.Control
|
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.lblStep3Title)
|
||||||
Me.tbPage3.Controls.Add(Me.lblStep3Instructions)
|
Me.tbPage3.Controls.Add(Me.lblStep3Instructions)
|
||||||
Me.tbPage3.Controls.Add(Me.chkTimeStamp)
|
Me.tbPage3.Controls.Add(Me.chkTimeStamp)
|
||||||
@@ -279,6 +222,26 @@ Partial Class frmAddWizard
|
|||||||
Me.tbPage3.TabIndex = 2
|
Me.tbPage3.TabIndex = 2
|
||||||
Me.tbPage3.Text = "TabPage3"
|
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(68, 13)
|
||||||
|
Me.lblLimit.TabIndex = 15
|
||||||
|
Me.lblLimit.Text = "Backup Limit"
|
||||||
|
Me.lblLimit.Visible = False
|
||||||
|
'
|
||||||
|
'nudLimit
|
||||||
|
'
|
||||||
|
Me.nudLimit.Location = New System.Drawing.Point(157, 107)
|
||||||
|
Me.nudLimit.Minimum = New Decimal(New Integer() {2, 0, 0, 0})
|
||||||
|
Me.nudLimit.Name = "nudLimit"
|
||||||
|
Me.nudLimit.Size = New System.Drawing.Size(40, 20)
|
||||||
|
Me.nudLimit.TabIndex = 14
|
||||||
|
Me.nudLimit.Value = New Decimal(New Integer() {2, 0, 0, 0})
|
||||||
|
Me.nudLimit.Visible = False
|
||||||
|
'
|
||||||
'lblStep3Title
|
'lblStep3Title
|
||||||
'
|
'
|
||||||
Me.lblStep3Title.AutoSize = True
|
Me.lblStep3Title.AutoSize = True
|
||||||
@@ -291,32 +254,32 @@ Partial Class frmAddWizard
|
|||||||
'
|
'
|
||||||
'lblStep3Instructions
|
'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.Name = "lblStep3Instructions"
|
||||||
Me.lblStep3Instructions.Size = New System.Drawing.Size(303, 42)
|
Me.lblStep3Instructions.Size = New System.Drawing.Size(303, 42)
|
||||||
Me.lblStep3Instructions.TabIndex = 9
|
Me.lblStep3Instructions.TabIndex = 9
|
||||||
Me.lblStep3Instructions.Text = "If you're unsure of exactly which files to backup, make sure Save Entire Folder " &
|
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" &
|
"is checked. You can also choose to save multiple backups and set a limit on how" &
|
||||||
"ps."
|
" many to keep."
|
||||||
'
|
'
|
||||||
'chkTimeStamp
|
'chkTimeStamp
|
||||||
'
|
'
|
||||||
Me.chkTimeStamp.AutoSize = True
|
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.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.TabIndex = 8
|
||||||
Me.chkTimeStamp.Text = "Time Stamp Backup"
|
Me.chkTimeStamp.Text = "Save multiple backups"
|
||||||
Me.chkTimeStamp.UseVisualStyleBackColor = True
|
Me.chkTimeStamp.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
'chkFolderSave
|
'chkFolderSave
|
||||||
'
|
'
|
||||||
Me.chkFolderSave.AutoSize = True
|
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.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.TabIndex = 7
|
||||||
Me.chkFolderSave.Text = "Save Entire Folder"
|
Me.chkFolderSave.Text = "Save entire folder"
|
||||||
Me.chkFolderSave.UseVisualStyleBackColor = True
|
Me.chkFolderSave.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
'btnSaveBrowse
|
'btnSaveBrowse
|
||||||
@@ -347,8 +310,10 @@ Partial Class frmAddWizard
|
|||||||
'tbPage3a
|
'tbPage3a
|
||||||
'
|
'
|
||||||
Me.tbPage3a.BackColor = System.Drawing.SystemColors.Control
|
Me.tbPage3a.BackColor = System.Drawing.SystemColors.Control
|
||||||
Me.tbPage3a.Controls.Add(Me.grpFileTypes)
|
Me.tbPage3a.Controls.Add(Me.lblIncludePathTitle)
|
||||||
Me.tbPage3a.Controls.Add(Me.btnStep3aClear)
|
Me.tbPage3a.Controls.Add(Me.lblIncludePath)
|
||||||
|
Me.tbPage3a.Controls.Add(Me.lblFileTypes)
|
||||||
|
Me.tbPage3a.Controls.Add(Me.btnInclude)
|
||||||
Me.tbPage3a.Controls.Add(Me.lblStep3aTitle)
|
Me.tbPage3a.Controls.Add(Me.lblStep3aTitle)
|
||||||
Me.tbPage3a.Controls.Add(Me.lblStep3aInstructions)
|
Me.tbPage3a.Controls.Add(Me.lblStep3aInstructions)
|
||||||
Me.tbPage3a.Controls.Add(Me.txtFileTypes)
|
Me.tbPage3a.Controls.Add(Me.txtFileTypes)
|
||||||
@@ -358,58 +323,42 @@ Partial Class frmAddWizard
|
|||||||
Me.tbPage3a.TabIndex = 3
|
Me.tbPage3a.TabIndex = 3
|
||||||
Me.tbPage3a.Text = "TabPage4"
|
Me.tbPage3a.Text = "TabPage4"
|
||||||
'
|
'
|
||||||
'grpFileTypes
|
'lblIncludePathTitle
|
||||||
'
|
'
|
||||||
Me.grpFileTypes.Controls.Add(Me.optFileTypeFolder)
|
Me.lblIncludePathTitle.AutoSize = True
|
||||||
Me.grpFileTypes.Controls.Add(Me.optSpecificFile)
|
Me.lblIncludePathTitle.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
Me.grpFileTypes.Controls.Add(Me.btnFileTypeBrowse)
|
Me.lblIncludePathTitle.Location = New System.Drawing.Point(14, 45)
|
||||||
Me.grpFileTypes.Controls.Add(Me.optFileType)
|
Me.lblIncludePathTitle.Name = "lblIncludePathTitle"
|
||||||
Me.grpFileTypes.Location = New System.Drawing.Point(17, 43)
|
Me.lblIncludePathTitle.Size = New System.Drawing.Size(122, 13)
|
||||||
Me.grpFileTypes.Name = "grpFileTypes"
|
Me.lblIncludePathTitle.TabIndex = 6
|
||||||
Me.grpFileTypes.Size = New System.Drawing.Size(310, 47)
|
Me.lblIncludePathTitle.Text = "Saved Game Folder:"
|
||||||
Me.grpFileTypes.TabIndex = 0
|
|
||||||
Me.grpFileTypes.TabStop = False
|
|
||||||
Me.grpFileTypes.Text = "Choose any files or folders to include in the backup"
|
|
||||||
'
|
'
|
||||||
'optSpecificFile
|
'lblIncludePath
|
||||||
'
|
'
|
||||||
Me.optSpecificFile.AutoSize = True
|
Me.lblIncludePath.AutoEllipsis = True
|
||||||
Me.optSpecificFile.Location = New System.Drawing.Point(80, 19)
|
Me.lblIncludePath.Location = New System.Drawing.Point(14, 60)
|
||||||
Me.optSpecificFile.Name = "optSpecificFile"
|
Me.lblIncludePath.Name = "lblIncludePath"
|
||||||
Me.optSpecificFile.Size = New System.Drawing.Size(82, 17)
|
Me.lblIncludePath.Size = New System.Drawing.Size(324, 13)
|
||||||
Me.optSpecificFile.TabIndex = 2
|
Me.lblIncludePath.TabIndex = 1
|
||||||
Me.optSpecificFile.TabStop = True
|
Me.lblIncludePath.Text = "Save Path"
|
||||||
Me.optSpecificFile.Text = "Specific File"
|
|
||||||
Me.optSpecificFile.UseVisualStyleBackColor = True
|
|
||||||
'
|
'
|
||||||
'btnFileTypeBrowse
|
'lblFileTypes
|
||||||
'
|
'
|
||||||
Me.btnFileTypeBrowse.Location = New System.Drawing.Point(229, 16)
|
Me.lblFileTypes.AutoSize = True
|
||||||
Me.btnFileTypeBrowse.Name = "btnFileTypeBrowse"
|
Me.lblFileTypes.Location = New System.Drawing.Point(199, 91)
|
||||||
Me.btnFileTypeBrowse.Size = New System.Drawing.Size(75, 23)
|
Me.lblFileTypes.Name = "lblFileTypes"
|
||||||
Me.btnFileTypeBrowse.TabIndex = 3
|
Me.lblFileTypes.Size = New System.Drawing.Size(89, 13)
|
||||||
Me.btnFileTypeBrowse.Text = "Browse..."
|
Me.lblFileTypes.TabIndex = 3
|
||||||
Me.btnFileTypeBrowse.UseVisualStyleBackColor = True
|
Me.lblFileTypes.Text = "0 item(s) selected"
|
||||||
'
|
'
|
||||||
'optFileType
|
'btnInclude
|
||||||
'
|
'
|
||||||
Me.optFileType.AutoSize = True
|
Me.btnInclude.Location = New System.Drawing.Point(17, 86)
|
||||||
Me.optFileType.Location = New System.Drawing.Point(6, 19)
|
Me.btnInclude.Name = "btnInclude"
|
||||||
Me.optFileType.Name = "optFileType"
|
Me.btnInclude.Size = New System.Drawing.Size(176, 23)
|
||||||
Me.optFileType.Size = New System.Drawing.Size(68, 17)
|
Me.btnInclude.TabIndex = 2
|
||||||
Me.optFileType.TabIndex = 1
|
Me.btnInclude.Text = "Choose items to in&clude..."
|
||||||
Me.optFileType.TabStop = True
|
Me.btnInclude.UseVisualStyleBackColor = True
|
||||||
Me.optFileType.Text = "File Type"
|
|
||||||
Me.optFileType.UseVisualStyleBackColor = True
|
|
||||||
'
|
|
||||||
'btnStep3aClear
|
|
||||||
'
|
|
||||||
Me.btnStep3aClear.Location = New System.Drawing.Point(253, 93)
|
|
||||||
Me.btnStep3aClear.Name = "btnStep3aClear"
|
|
||||||
Me.btnStep3aClear.Size = New System.Drawing.Size(75, 23)
|
|
||||||
Me.btnStep3aClear.TabIndex = 5
|
|
||||||
Me.btnStep3aClear.Text = "&Clear"
|
|
||||||
Me.btnStep3aClear.UseVisualStyleBackColor = True
|
|
||||||
'
|
'
|
||||||
'lblStep3aTitle
|
'lblStep3aTitle
|
||||||
'
|
'
|
||||||
@@ -418,7 +367,7 @@ Partial Class frmAddWizard
|
|||||||
Me.lblStep3aTitle.Location = New System.Drawing.Point(13, 11)
|
Me.lblStep3aTitle.Location = New System.Drawing.Point(13, 11)
|
||||||
Me.lblStep3aTitle.Name = "lblStep3aTitle"
|
Me.lblStep3aTitle.Name = "lblStep3aTitle"
|
||||||
Me.lblStep3aTitle.Size = New System.Drawing.Size(199, 20)
|
Me.lblStep3aTitle.Size = New System.Drawing.Size(199, 20)
|
||||||
Me.lblStep3aTitle.TabIndex = 12
|
Me.lblStep3aTitle.TabIndex = 0
|
||||||
Me.lblStep3aTitle.Text = "Choose Files to Backup"
|
Me.lblStep3aTitle.Text = "Choose Files to Backup"
|
||||||
'
|
'
|
||||||
'lblStep3aInstructions
|
'lblStep3aInstructions
|
||||||
@@ -426,25 +375,27 @@ Partial Class frmAddWizard
|
|||||||
Me.lblStep3aInstructions.Location = New System.Drawing.Point(14, 126)
|
Me.lblStep3aInstructions.Location = New System.Drawing.Point(14, 126)
|
||||||
Me.lblStep3aInstructions.Name = "lblStep3aInstructions"
|
Me.lblStep3aInstructions.Name = "lblStep3aInstructions"
|
||||||
Me.lblStep3aInstructions.Size = New System.Drawing.Size(303, 56)
|
Me.lblStep3aInstructions.Size = New System.Drawing.Size(303, 56)
|
||||||
Me.lblStep3aInstructions.TabIndex = 11
|
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. You may choose multiple items to include. If you're unsure, go back a step" &
|
"up. If you're unsure, go back a step and choose to save the entire folder. "
|
||||||
" and choose to save the entire folder. "
|
|
||||||
'
|
'
|
||||||
'txtFileTypes
|
'txtFileTypes
|
||||||
'
|
'
|
||||||
Me.txtFileTypes.Location = New System.Drawing.Point(18, 95)
|
Me.txtFileTypes.Location = New System.Drawing.Point(218, 14)
|
||||||
Me.txtFileTypes.Name = "txtFileTypes"
|
Me.txtFileTypes.Name = "txtFileTypes"
|
||||||
Me.txtFileTypes.ReadOnly = True
|
Me.txtFileTypes.ReadOnly = True
|
||||||
Me.txtFileTypes.Size = New System.Drawing.Size(229, 20)
|
Me.txtFileTypes.Size = New System.Drawing.Size(131, 20)
|
||||||
Me.txtFileTypes.TabIndex = 4
|
Me.txtFileTypes.TabIndex = 4
|
||||||
Me.txtFileTypes.TabStop = False
|
Me.txtFileTypes.TabStop = False
|
||||||
|
Me.txtFileTypes.Visible = False
|
||||||
'
|
'
|
||||||
'tbPage4
|
'tbPage4
|
||||||
'
|
'
|
||||||
Me.tbPage4.BackColor = System.Drawing.SystemColors.Control
|
Me.tbPage4.BackColor = System.Drawing.SystemColors.Control
|
||||||
Me.tbPage4.Controls.Add(Me.grpExclude)
|
Me.tbPage4.Controls.Add(Me.lblExcludePathTitle)
|
||||||
Me.tbPage4.Controls.Add(Me.btnStep4Clear)
|
Me.tbPage4.Controls.Add(Me.lblExcludePath)
|
||||||
|
Me.tbPage4.Controls.Add(Me.lblExclude)
|
||||||
|
Me.tbPage4.Controls.Add(Me.btnExclude)
|
||||||
Me.tbPage4.Controls.Add(Me.lblStep4Title)
|
Me.tbPage4.Controls.Add(Me.lblStep4Title)
|
||||||
Me.tbPage4.Controls.Add(Me.lblStep4Instructions)
|
Me.tbPage4.Controls.Add(Me.lblStep4Instructions)
|
||||||
Me.tbPage4.Controls.Add(Me.txtExcludeList)
|
Me.tbPage4.Controls.Add(Me.txtExcludeList)
|
||||||
@@ -454,69 +405,42 @@ Partial Class frmAddWizard
|
|||||||
Me.tbPage4.TabIndex = 4
|
Me.tbPage4.TabIndex = 4
|
||||||
Me.tbPage4.Text = "TabPage5"
|
Me.tbPage4.Text = "TabPage5"
|
||||||
'
|
'
|
||||||
'grpExclude
|
'lblExcludePathTitle
|
||||||
'
|
'
|
||||||
Me.grpExclude.Controls.Add(Me.optExcludeSpecificFile)
|
Me.lblExcludePathTitle.AutoSize = True
|
||||||
Me.grpExclude.Controls.Add(Me.btnExcludeBrowse)
|
Me.lblExcludePathTitle.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
Me.grpExclude.Controls.Add(Me.optExcludeFileType)
|
Me.lblExcludePathTitle.Location = New System.Drawing.Point(14, 45)
|
||||||
Me.grpExclude.Controls.Add(Me.optExcludeFolder)
|
Me.lblExcludePathTitle.Name = "lblExcludePathTitle"
|
||||||
Me.grpExclude.Location = New System.Drawing.Point(17, 43)
|
Me.lblExcludePathTitle.Size = New System.Drawing.Size(122, 13)
|
||||||
Me.grpExclude.Name = "grpExclude"
|
Me.lblExcludePathTitle.TabIndex = 7
|
||||||
Me.grpExclude.Size = New System.Drawing.Size(310, 47)
|
Me.lblExcludePathTitle.Text = "Saved Game Folder:"
|
||||||
Me.grpExclude.TabIndex = 0
|
|
||||||
Me.grpExclude.TabStop = False
|
|
||||||
Me.grpExclude.Text = "Choose any files or folders to exclude from the backup:"
|
|
||||||
'
|
'
|
||||||
'optExcludeSpecificFile
|
'lblExcludePath
|
||||||
'
|
'
|
||||||
Me.optExcludeSpecificFile.AutoSize = True
|
Me.lblExcludePath.AutoEllipsis = True
|
||||||
Me.optExcludeSpecificFile.Location = New System.Drawing.Point(80, 19)
|
Me.lblExcludePath.Location = New System.Drawing.Point(14, 60)
|
||||||
Me.optExcludeSpecificFile.Name = "optExcludeSpecificFile"
|
Me.lblExcludePath.Name = "lblExcludePath"
|
||||||
Me.optExcludeSpecificFile.Size = New System.Drawing.Size(82, 17)
|
Me.lblExcludePath.Size = New System.Drawing.Size(334, 13)
|
||||||
Me.optExcludeSpecificFile.TabIndex = 2
|
Me.lblExcludePath.TabIndex = 1
|
||||||
Me.optExcludeSpecificFile.TabStop = True
|
Me.lblExcludePath.Text = "Save Path"
|
||||||
Me.optExcludeSpecificFile.Text = "Specific File"
|
|
||||||
Me.optExcludeSpecificFile.UseVisualStyleBackColor = True
|
|
||||||
'
|
'
|
||||||
'btnExcludeBrowse
|
'lblExclude
|
||||||
'
|
'
|
||||||
Me.btnExcludeBrowse.Location = New System.Drawing.Point(229, 16)
|
Me.lblExclude.AutoSize = True
|
||||||
Me.btnExcludeBrowse.Name = "btnExcludeBrowse"
|
Me.lblExclude.Location = New System.Drawing.Point(199, 91)
|
||||||
Me.btnExcludeBrowse.Size = New System.Drawing.Size(75, 23)
|
Me.lblExclude.Name = "lblExclude"
|
||||||
Me.btnExcludeBrowse.TabIndex = 4
|
Me.lblExclude.Size = New System.Drawing.Size(89, 13)
|
||||||
Me.btnExcludeBrowse.Text = "&Browse..."
|
Me.lblExclude.TabIndex = 3
|
||||||
Me.btnExcludeBrowse.UseVisualStyleBackColor = True
|
Me.lblExclude.Text = "0 item(s) selected"
|
||||||
'
|
'
|
||||||
'optExcludeFileType
|
'btnExclude
|
||||||
'
|
'
|
||||||
Me.optExcludeFileType.AutoSize = True
|
Me.btnExclude.Location = New System.Drawing.Point(17, 86)
|
||||||
Me.optExcludeFileType.Location = New System.Drawing.Point(6, 19)
|
Me.btnExclude.Name = "btnExclude"
|
||||||
Me.optExcludeFileType.Name = "optExcludeFileType"
|
Me.btnExclude.Size = New System.Drawing.Size(176, 23)
|
||||||
Me.optExcludeFileType.Size = New System.Drawing.Size(68, 17)
|
Me.btnExclude.TabIndex = 2
|
||||||
Me.optExcludeFileType.TabIndex = 1
|
Me.btnExclude.Text = "Choose items to e&xclude..."
|
||||||
Me.optExcludeFileType.TabStop = True
|
Me.btnExclude.UseVisualStyleBackColor = True
|
||||||
Me.optExcludeFileType.Text = "File Type"
|
|
||||||
Me.optExcludeFileType.UseVisualStyleBackColor = True
|
|
||||||
'
|
|
||||||
'optExcludeFolder
|
|
||||||
'
|
|
||||||
Me.optExcludeFolder.AutoSize = True
|
|
||||||
Me.optExcludeFolder.Location = New System.Drawing.Point(168, 19)
|
|
||||||
Me.optExcludeFolder.Name = "optExcludeFolder"
|
|
||||||
Me.optExcludeFolder.Size = New System.Drawing.Size(54, 17)
|
|
||||||
Me.optExcludeFolder.TabIndex = 3
|
|
||||||
Me.optExcludeFolder.TabStop = True
|
|
||||||
Me.optExcludeFolder.Text = "Folder"
|
|
||||||
Me.optExcludeFolder.UseVisualStyleBackColor = True
|
|
||||||
'
|
|
||||||
'btnStep4Clear
|
|
||||||
'
|
|
||||||
Me.btnStep4Clear.Location = New System.Drawing.Point(253, 93)
|
|
||||||
Me.btnStep4Clear.Name = "btnStep4Clear"
|
|
||||||
Me.btnStep4Clear.Size = New System.Drawing.Size(75, 23)
|
|
||||||
Me.btnStep4Clear.TabIndex = 6
|
|
||||||
Me.btnStep4Clear.Text = "&Clear"
|
|
||||||
Me.btnStep4Clear.UseVisualStyleBackColor = True
|
|
||||||
'
|
'
|
||||||
'lblStep4Title
|
'lblStep4Title
|
||||||
'
|
'
|
||||||
@@ -525,7 +449,7 @@ Partial Class frmAddWizard
|
|||||||
Me.lblStep4Title.Location = New System.Drawing.Point(14, 11)
|
Me.lblStep4Title.Location = New System.Drawing.Point(14, 11)
|
||||||
Me.lblStep4Title.Name = "lblStep4Title"
|
Me.lblStep4Title.Name = "lblStep4Title"
|
||||||
Me.lblStep4Title.Size = New System.Drawing.Size(201, 20)
|
Me.lblStep4Title.Size = New System.Drawing.Size(201, 20)
|
||||||
Me.lblStep4Title.TabIndex = 16
|
Me.lblStep4Title.TabIndex = 0
|
||||||
Me.lblStep4Title.Text = "Exclude Files or Folders"
|
Me.lblStep4Title.Text = "Exclude Files or Folders"
|
||||||
'
|
'
|
||||||
'lblStep4Instructions
|
'lblStep4Instructions
|
||||||
@@ -533,17 +457,19 @@ Partial Class frmAddWizard
|
|||||||
Me.lblStep4Instructions.Location = New System.Drawing.Point(14, 126)
|
Me.lblStep4Instructions.Location = New System.Drawing.Point(14, 126)
|
||||||
Me.lblStep4Instructions.Name = "lblStep4Instructions"
|
Me.lblStep4Instructions.Name = "lblStep4Instructions"
|
||||||
Me.lblStep4Instructions.Size = New System.Drawing.Size(303, 59)
|
Me.lblStep4Instructions.Size = New System.Drawing.Size(303, 59)
|
||||||
Me.lblStep4Instructions.TabIndex = 12
|
Me.lblStep4Instructions.TabIndex = 5
|
||||||
Me.lblStep4Instructions.Text = resources.GetString("lblStep4Instructions.Text")
|
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
|
'txtExcludeList
|
||||||
'
|
'
|
||||||
Me.txtExcludeList.Location = New System.Drawing.Point(18, 95)
|
Me.txtExcludeList.Location = New System.Drawing.Point(221, 13)
|
||||||
Me.txtExcludeList.Name = "txtExcludeList"
|
Me.txtExcludeList.Name = "txtExcludeList"
|
||||||
Me.txtExcludeList.ReadOnly = True
|
Me.txtExcludeList.ReadOnly = True
|
||||||
Me.txtExcludeList.Size = New System.Drawing.Size(229, 20)
|
Me.txtExcludeList.Size = New System.Drawing.Size(128, 20)
|
||||||
Me.txtExcludeList.TabIndex = 5
|
Me.txtExcludeList.TabIndex = 4
|
||||||
Me.txtExcludeList.TabStop = False
|
Me.txtExcludeList.TabStop = False
|
||||||
|
Me.txtExcludeList.Visible = False
|
||||||
'
|
'
|
||||||
'tbPage5
|
'tbPage5
|
||||||
'
|
'
|
||||||
@@ -581,6 +507,7 @@ Partial Class frmAddWizard
|
|||||||
Me.lstSummary.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable
|
Me.lstSummary.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable
|
||||||
Me.lstSummary.Location = New System.Drawing.Point(14, 65)
|
Me.lstSummary.Location = New System.Drawing.Point(14, 65)
|
||||||
Me.lstSummary.Name = "lstSummary"
|
Me.lstSummary.Name = "lstSummary"
|
||||||
|
Me.lstSummary.ShowItemToolTips = True
|
||||||
Me.lstSummary.Size = New System.Drawing.Size(335, 126)
|
Me.lstSummary.Size = New System.Drawing.Size(335, 126)
|
||||||
Me.lstSummary.TabIndex = 1
|
Me.lstSummary.TabIndex = 1
|
||||||
Me.lstSummary.UseCompatibleStateImageBehavior = False
|
Me.lstSummary.UseCompatibleStateImageBehavior = False
|
||||||
@@ -613,17 +540,6 @@ Partial Class frmAddWizard
|
|||||||
Me.btnBack.Text = "&Back"
|
Me.btnBack.Text = "&Back"
|
||||||
Me.btnBack.UseVisualStyleBackColor = True
|
Me.btnBack.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
'optFileTypeFolder
|
|
||||||
'
|
|
||||||
Me.optFileTypeFolder.AutoSize = True
|
|
||||||
Me.optFileTypeFolder.Location = New System.Drawing.Point(168, 19)
|
|
||||||
Me.optFileTypeFolder.Name = "optFileTypeFolder"
|
|
||||||
Me.optFileTypeFolder.Size = New System.Drawing.Size(54, 17)
|
|
||||||
Me.optFileTypeFolder.TabIndex = 4
|
|
||||||
Me.optFileTypeFolder.TabStop = True
|
|
||||||
Me.optFileTypeFolder.Text = "Folder"
|
|
||||||
Me.optFileTypeFolder.UseVisualStyleBackColor = True
|
|
||||||
'
|
|
||||||
'frmAddWizard
|
'frmAddWizard
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
@@ -647,14 +563,11 @@ Partial Class frmAddWizard
|
|||||||
Me.tbPage2.PerformLayout()
|
Me.tbPage2.PerformLayout()
|
||||||
Me.tbPage3.ResumeLayout(False)
|
Me.tbPage3.ResumeLayout(False)
|
||||||
Me.tbPage3.PerformLayout()
|
Me.tbPage3.PerformLayout()
|
||||||
|
CType(Me.nudLimit, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
Me.tbPage3a.ResumeLayout(False)
|
Me.tbPage3a.ResumeLayout(False)
|
||||||
Me.tbPage3a.PerformLayout()
|
Me.tbPage3a.PerformLayout()
|
||||||
Me.grpFileTypes.ResumeLayout(False)
|
|
||||||
Me.grpFileTypes.PerformLayout()
|
|
||||||
Me.tbPage4.ResumeLayout(False)
|
Me.tbPage4.ResumeLayout(False)
|
||||||
Me.tbPage4.PerformLayout()
|
Me.tbPage4.PerformLayout()
|
||||||
Me.grpExclude.ResumeLayout(False)
|
|
||||||
Me.grpExclude.PerformLayout()
|
|
||||||
Me.tbPage5.ResumeLayout(False)
|
Me.tbPage5.ResumeLayout(False)
|
||||||
Me.tbPage5.PerformLayout()
|
Me.tbPage5.PerformLayout()
|
||||||
Me.ResumeLayout(False)
|
Me.ResumeLayout(False)
|
||||||
@@ -670,12 +583,10 @@ Partial Class frmAddWizard
|
|||||||
Friend WithEvents tbPage3a As System.Windows.Forms.TabPage
|
Friend WithEvents tbPage3a As System.Windows.Forms.TabPage
|
||||||
Friend WithEvents tbPage4 As System.Windows.Forms.TabPage
|
Friend WithEvents tbPage4 As System.Windows.Forms.TabPage
|
||||||
Friend WithEvents tbPage5 As System.Windows.Forms.TabPage
|
Friend WithEvents tbPage5 As System.Windows.Forms.TabPage
|
||||||
Friend WithEvents lblDrag1 As System.Windows.Forms.Label
|
|
||||||
Friend WithEvents lblStep1Instructions As System.Windows.Forms.Label
|
Friend WithEvents lblStep1Instructions As System.Windows.Forms.Label
|
||||||
Friend WithEvents txtName As System.Windows.Forms.TextBox
|
Friend WithEvents txtName As System.Windows.Forms.TextBox
|
||||||
Friend WithEvents lblStep1Intro As System.Windows.Forms.Label
|
Friend WithEvents lblStep1Intro As System.Windows.Forms.Label
|
||||||
Friend WithEvents lblStep2Instructions As System.Windows.Forms.Label
|
Friend WithEvents lblStep2Instructions As System.Windows.Forms.Label
|
||||||
Friend WithEvents lblDrag2 As System.Windows.Forms.Label
|
|
||||||
Friend WithEvents btnProcessBrowse As System.Windows.Forms.Button
|
Friend WithEvents btnProcessBrowse As System.Windows.Forms.Button
|
||||||
Friend WithEvents txtProcessPath As System.Windows.Forms.TextBox
|
Friend WithEvents txtProcessPath As System.Windows.Forms.TextBox
|
||||||
Friend WithEvents lblStep2Intro As System.Windows.Forms.Label
|
Friend WithEvents lblStep2Intro As System.Windows.Forms.Label
|
||||||
@@ -684,17 +595,10 @@ Partial Class frmAddWizard
|
|||||||
Friend WithEvents btnSaveBrowse As System.Windows.Forms.Button
|
Friend WithEvents btnSaveBrowse As System.Windows.Forms.Button
|
||||||
Friend WithEvents txtSavePath As System.Windows.Forms.TextBox
|
Friend WithEvents txtSavePath As System.Windows.Forms.TextBox
|
||||||
Friend WithEvents lblStep3Intro As System.Windows.Forms.Label
|
Friend WithEvents lblStep3Intro As System.Windows.Forms.Label
|
||||||
Friend WithEvents btnFileTypeBrowse As System.Windows.Forms.Button
|
|
||||||
Friend WithEvents txtFileTypes As System.Windows.Forms.TextBox
|
Friend WithEvents txtFileTypes As System.Windows.Forms.TextBox
|
||||||
Friend WithEvents btnExcludeBrowse As System.Windows.Forms.Button
|
|
||||||
Friend WithEvents txtExcludeList As System.Windows.Forms.TextBox
|
Friend WithEvents txtExcludeList As System.Windows.Forms.TextBox
|
||||||
Friend WithEvents optSpecificFile As System.Windows.Forms.RadioButton
|
|
||||||
Friend WithEvents optFileType As System.Windows.Forms.RadioButton
|
|
||||||
Friend WithEvents lblStep3aInstructions As System.Windows.Forms.Label
|
Friend WithEvents lblStep3aInstructions As System.Windows.Forms.Label
|
||||||
Friend WithEvents optExcludeFolder As System.Windows.Forms.RadioButton
|
|
||||||
Friend WithEvents optExcludeFileType As System.Windows.Forms.RadioButton
|
|
||||||
Friend WithEvents lblStep4Instructions As System.Windows.Forms.Label
|
Friend WithEvents lblStep4Instructions As System.Windows.Forms.Label
|
||||||
Friend WithEvents optExcludeSpecificFile As System.Windows.Forms.RadioButton
|
|
||||||
Friend WithEvents lblStep3Instructions As System.Windows.Forms.Label
|
Friend WithEvents lblStep3Instructions As System.Windows.Forms.Label
|
||||||
Friend WithEvents lstSummary As System.Windows.Forms.ListView
|
Friend WithEvents lstSummary As System.Windows.Forms.ListView
|
||||||
Friend WithEvents lblStep1Title As System.Windows.Forms.Label
|
Friend WithEvents lblStep1Title As System.Windows.Forms.Label
|
||||||
@@ -704,12 +608,14 @@ Partial Class frmAddWizard
|
|||||||
Friend WithEvents lblStep3aTitle As System.Windows.Forms.Label
|
Friend WithEvents lblStep3aTitle As System.Windows.Forms.Label
|
||||||
Friend WithEvents lblStep5Intro As System.Windows.Forms.Label
|
Friend WithEvents lblStep5Intro As System.Windows.Forms.Label
|
||||||
Friend WithEvents lblStep5Title As System.Windows.Forms.Label
|
Friend WithEvents lblStep5Title As System.Windows.Forms.Label
|
||||||
Friend WithEvents btnStep3aClear As System.Windows.Forms.Button
|
Friend WithEvents lblFileTypes As Label
|
||||||
Friend WithEvents btnStep4Clear As System.Windows.Forms.Button
|
Friend WithEvents btnInclude As Button
|
||||||
Friend WithEvents grpExclude As System.Windows.Forms.GroupBox
|
Friend WithEvents lblExclude As Label
|
||||||
Friend WithEvents grpFileTypes As System.Windows.Forms.GroupBox
|
Friend WithEvents btnExclude As Button
|
||||||
Friend WithEvents lbldBox As System.Windows.Forms.Label
|
Friend WithEvents lblIncludePath As Label
|
||||||
Friend WithEvents btndBoxBrowse As System.Windows.Forms.Button
|
Friend WithEvents lblExcludePath As Label
|
||||||
Friend WithEvents txtdBoxProcess As System.Windows.Forms.TextBox
|
Friend WithEvents lblIncludePathTitle As Label
|
||||||
Friend WithEvents optFileTypeFolder As RadioButton
|
Friend WithEvents lblExcludePathTitle As Label
|
||||||
|
Friend WithEvents lblLimit As Label
|
||||||
|
Friend WithEvents nudLimit As NumericUpDown
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -117,7 +117,7 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<data name="lblStep4Instructions.Text" xml:space="preserve">
|
<data name="lblStep2Instructions.Text" xml:space="preserve">
|
||||||
<value>Choose any file types, specific files or folders you wish to exclude from the backup. You may choose multiple items to exclude. A more advanced exclude list can be created manually via the Game Manager. This step can be skipped.</value>
|
<value>Some games use launchers. Do not monitor launchers, be sure to choose the game's actual exe file. You may drag and drop a shortcut here to complete this step, only Windows shortcuts are currently supported.</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
||||||
+151
-255
@@ -1,11 +1,11 @@
|
|||||||
Imports System.IO
|
Imports GBM.My.Resources
|
||||||
|
Imports System.IO
|
||||||
|
|
||||||
Public Class frmAddWizard
|
Public Class frmAddWizard
|
||||||
|
|
||||||
Private oGameData As Hashtable
|
Private oGameData As Hashtable
|
||||||
Private oGameToSave As clsGame
|
Private oGameToSave As clsGame
|
||||||
Private bDisableAdminWarning As Boolean = False
|
Private bDisableAdminWarning As Boolean = False
|
||||||
Private bIsDOSBoxGame As Boolean
|
|
||||||
|
|
||||||
Property GameData As Hashtable
|
Property GameData As Hashtable
|
||||||
Get
|
Get
|
||||||
@@ -27,20 +27,73 @@ Public Class frmAddWizard
|
|||||||
|
|
||||||
Private eCurrentStep As eSteps = eSteps.Step1
|
Private eCurrentStep As eSteps = eSteps.Step1
|
||||||
|
|
||||||
Private Sub FormInit()
|
Private Sub SetForm()
|
||||||
btndBoxBrowse.Visible = False
|
'Set Form Name
|
||||||
txtdBoxProcess.Visible = False
|
Me.Text = frmAddWizard_FormName
|
||||||
lbldBox.Visible = False
|
|
||||||
|
'Set Form Text
|
||||||
|
btnCancel.Text = frmAddWizard_btnCancel
|
||||||
|
btnNext.Text = frmAddWizard_btnNext
|
||||||
|
btnBack.Text = frmAddWizard_btnBack
|
||||||
|
lblStep1Title.Text = frmAddWizard_lblStep1Title
|
||||||
|
lblStep1Instructions.Text = frmAddWizard_lblStep1Instructions
|
||||||
|
lblStep1Intro.Text = frmAddWizard_lblStep1Intro
|
||||||
|
lblStep2Title.Text = frmAddWizard_lblStep2Title
|
||||||
|
lblStep2Instructions.Text = frmAddWizard_lblStep2Instructions
|
||||||
|
btnProcessBrowse.Text = frmAddWizard_btnProcessBrowse
|
||||||
|
lblStep2Intro.Text = frmAddWizard_lblStep2Intro
|
||||||
|
lblStep3Title.Text = frmAddWizard_lblStep3Title
|
||||||
|
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
|
||||||
|
lblIncludePath.Text = frmAddWizard_lblIncludePath
|
||||||
|
lblFileTypes.Text = frmAddWizard_ItemsSelectedNone
|
||||||
|
btnInclude.Text = frmAddWizard_btnInclude
|
||||||
|
lblStep3aTitle.Text = frmAddWizard_lblStep3aTitle
|
||||||
|
lblStep3aInstructions.Text = frmAddWizard_lblStep3aInstructions
|
||||||
|
lblExcludePathTitle.Text = frmAddWizard_lblExcludePathTitle
|
||||||
|
lblExcludePath.Text = frmAddWizard_lblExcludePath
|
||||||
|
lblExclude.Text = frmAddWizard_ItemsSelectedNone
|
||||||
|
btnExclude.Text = frmAddWizard_btnExclude
|
||||||
|
lblStep4Title.Text = frmAddWizard_lblStep4Title
|
||||||
|
lblStep4Instructions.Text = frmAddWizard_lblStep4Instructions
|
||||||
|
lblStep5Intro.Text = frmAddWizard_lblStep5Intro
|
||||||
|
lblStep5Title.Text = frmAddWizard_lblStep5Title
|
||||||
|
|
||||||
chkFolderSave.Checked = True
|
chkFolderSave.Checked = True
|
||||||
chkTimeStamp.Checked = False
|
chkTimeStamp.Checked = False
|
||||||
optFileType.Checked = True
|
|
||||||
optExcludeFileType.Checked = True
|
|
||||||
StepHandler()
|
StepHandler()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ShowHideLimit()
|
||||||
|
If chkTimeStamp.Checked Then
|
||||||
|
nudLimit.Visible = True
|
||||||
|
lblLimit.Visible = True
|
||||||
|
nudLimit.Value = 5
|
||||||
|
Else
|
||||||
|
nudLimit.Visible = False
|
||||||
|
nudLimit.Value = nudLimit.Minimum
|
||||||
|
lblLimit.Visible = False
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function ShowSummaryLimit(ByVal bTimeStamp As Boolean, ByVal iLimit As Integer) As String
|
||||||
|
Dim sLimit As String = String.Empty
|
||||||
|
|
||||||
|
If bTimeStamp Then
|
||||||
|
Return mgrCommon.BooleanYesNo(bTimeStamp) & " (" & iLimit & ")"
|
||||||
|
Else
|
||||||
|
Return mgrCommon.BooleanYesNo(bTimeStamp)
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Function StringEmptyText(ByVal sString As String) As String
|
Private Function StringEmptyText(ByVal sString As String) As String
|
||||||
If sString = String.Empty Then
|
If sString = String.Empty Then
|
||||||
Return "None"
|
Return frmAddWizard_None
|
||||||
Else
|
Else
|
||||||
Return sString
|
Return sString
|
||||||
End If
|
End If
|
||||||
@@ -51,33 +104,33 @@ Public Class frmAddWizard
|
|||||||
Dim sName As String = txtName.Text
|
Dim sName As String = txtName.Text
|
||||||
Dim sProcessFullPath As String = txtProcessPath.Text
|
Dim sProcessFullPath As String = txtProcessPath.Text
|
||||||
Dim sProcessPath As String = Path.GetDirectoryName(sProcessFullPath)
|
Dim sProcessPath As String = Path.GetDirectoryName(sProcessFullPath)
|
||||||
Dim sProcess As String = Path.GetFileNameWithoutExtension(sProcessFullPath)
|
|
||||||
Dim sProcessSummaryText As String = Path.GetFileName(sProcessFullPath) & " (" & sProcessPath & ")"
|
Dim sProcessSummaryText As String = Path.GetFileName(sProcessFullPath) & " (" & sProcessPath & ")"
|
||||||
Dim sdBoxProcessFullPath As String = String.Empty
|
|
||||||
Dim sdBoxProcessPath As String = String.Empty
|
|
||||||
Dim sdBoxProcess As String = String.Empty
|
|
||||||
Dim sdBoxProcessSummaryText As String = String.Empty
|
|
||||||
Dim sSavePath As String = txtSavePath.Text
|
Dim sSavePath As String = txtSavePath.Text
|
||||||
Dim bIsAbsolute As Boolean = mgrPath.IsAbsolute(sSavePath)
|
Dim bIsAbsolute As Boolean = mgrPath.IsAbsolute(sSavePath)
|
||||||
Dim bFolderBackup As Boolean = chkFolderSave.Checked
|
Dim bFolderBackup As Boolean = chkFolderSave.Checked
|
||||||
Dim bTimeStamp As Boolean = chkTimeStamp.Checked
|
Dim bTimeStamp As Boolean = chkTimeStamp.Checked
|
||||||
|
Dim iLimit As Integer = nudLimit.Value
|
||||||
Dim sFileType As String = txtFileTypes.Text
|
Dim sFileType As String = txtFileTypes.Text
|
||||||
Dim sExcludeList As String = txtExcludeList.Text
|
Dim sExcludeList As String = txtExcludeList.Text
|
||||||
|
Dim sProcess As String
|
||||||
Dim sItem As String()
|
Dim sItem As String()
|
||||||
Dim sItems As String()
|
Dim sItems As String()
|
||||||
Dim sValues As String()
|
Dim sValues As String()
|
||||||
Dim lstItem As ListViewItem
|
Dim lstItem As ListViewItem
|
||||||
|
|
||||||
If Not bIsAbsolute Then
|
'Handle Process
|
||||||
sSavePath = mgrPath.DetermineRelativePath(sProcessPath, sSavePath)
|
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
|
End If
|
||||||
|
|
||||||
If bIsDOSBoxGame Then
|
If Not bIsAbsolute Then
|
||||||
sdBoxProcessFullPath = txtdBoxProcess.Text
|
sSavePath = mgrPath.DetermineRelativePath(sProcessPath, sSavePath)
|
||||||
sdBoxProcessPath = Path.GetDirectoryName(sdBoxProcessFullPath)
|
|
||||||
sdBoxProcess = Path.GetFileNameWithoutExtension(sdBoxProcessFullPath)
|
|
||||||
sdBoxProcessSummaryText = Path.GetFileName(sdBoxProcessFullPath) & " (" & sdBoxProcessPath & ")"
|
|
||||||
sProcess = sProcess.ToLower & ":" & sdBoxProcess
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Build Summary Listview
|
'Build Summary Listview
|
||||||
@@ -87,8 +140,8 @@ Public Class frmAddWizard
|
|||||||
lstSummary.Columns(0).Width = 95
|
lstSummary.Columns(0).Width = 95
|
||||||
lstSummary.Columns(1).Width = 210
|
lstSummary.Columns(1).Width = 210
|
||||||
|
|
||||||
sItems = {"Name", "Process", "DOS Process", "Absolute Path", "Save Path", "Folder Backup", "Specific Files", "Time Stamp", "Exclude List"}
|
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, StringEmptyText(sdBoxProcessSummaryText), mgrCommon.BooleanYesNo(bIsAbsolute), sSavePath, mgrCommon.BooleanYesNo(bFolderBackup), StringEmptyText(sFileType), mgrCommon.BooleanYesNo(bTimeStamp), 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
|
For i = 0 To sItems.Length - 1
|
||||||
sItem = {sItems(i), sValues(i)}
|
sItem = {sItems(i), sValues(i)}
|
||||||
@@ -104,7 +157,9 @@ Public Class frmAddWizard
|
|||||||
oGame.FolderSave = bFolderBackup
|
oGame.FolderSave = bFolderBackup
|
||||||
oGame.FileType = sFileType
|
oGame.FileType = sFileType
|
||||||
oGame.AppendTimeStamp = bTimeStamp
|
oGame.AppendTimeStamp = bTimeStamp
|
||||||
|
oGame.BackupLimit = iLimit
|
||||||
oGame.ExcludeList = sExcludeList
|
oGame.ExcludeList = sExcludeList
|
||||||
|
oGame.ProcessPath = sProcessPath
|
||||||
|
|
||||||
Return oGame
|
Return oGame
|
||||||
End Function
|
End Function
|
||||||
@@ -130,98 +185,47 @@ Public Class frmAddWizard
|
|||||||
Case eSteps.Step4
|
Case eSteps.Step4
|
||||||
btnBack.Enabled = True
|
btnBack.Enabled = True
|
||||||
btnNext.Enabled = True
|
btnNext.Enabled = True
|
||||||
btnNext.Text = "&Next"
|
btnNext.Text = frmAddWizard_btnNext
|
||||||
tabWizard.SelectTab(4)
|
tabWizard.SelectTab(4)
|
||||||
Case eSteps.Step5
|
Case eSteps.Step5
|
||||||
btnBack.Enabled = True
|
btnBack.Enabled = True
|
||||||
btnNext.Text = "&Finish"
|
btnNext.Text = frmAddWizard_btnNext_Finish
|
||||||
tabWizard.SelectTab(5)
|
tabWizard.SelectTab(5)
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function ValidateName(ByVal strName As String, ByRef sErrorMessage As String) As Boolean
|
Private Function ValidateName(ByVal strName As String, ByRef sErrorMessage As String) As Boolean
|
||||||
If txtName.Text <> String.Empty Then
|
If txtName.Text.Trim = String.Empty Then
|
||||||
txtName.Text = mgrPath.ValidateForFileSystem(txtName.Text)
|
sErrorMessage = frmAddWizard_ErrorValidName
|
||||||
Return True
|
|
||||||
Else
|
|
||||||
sErrorMessage = "You must enter a valid game name."
|
|
||||||
txtName.Focus()
|
txtName.Focus()
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function CheckforDOSBox(ByVal strpath As String) As Boolean
|
|
||||||
If strpath.ToLower.Contains("dosbox.exe") Then
|
|
||||||
bIsDOSBoxGame = True
|
|
||||||
lbldBox.Visible = True
|
|
||||||
txtdBoxProcess.Visible = True
|
|
||||||
btndBoxBrowse.Visible = True
|
|
||||||
If txtdBoxProcess.Text = String.Empty Then
|
|
||||||
If MsgBox("You have selected a DOSBox executable, to monitor DOS programs you need to also select the actual DOS executable file." & vbCrLf & vbCrLf & "Would you like to do this now?", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
|
||||||
DOSProcessBrowse()
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Return True
|
|
||||||
Else
|
|
||||||
bIsDOSBoxGame = False
|
|
||||||
lbldBox.Visible = False
|
|
||||||
txtdBoxProcess.Text = String.Empty
|
|
||||||
txtdBoxProcess.Visible = False
|
|
||||||
btndBoxBrowse.Visible = False
|
|
||||||
Return False
|
|
||||||
End If
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Private Function ValidateDOSProcessPath(ByVal strPath As String, ByRef sErrorMessage As String) As Boolean
|
|
||||||
If strPath = String.Empty Then
|
|
||||||
sErrorMessage = "You must select the DOS game's executable file (.exe or .com) to continue."
|
|
||||||
txtProcessPath.Focus()
|
|
||||||
Return False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Path.GetExtension(strPath.ToLower) <> ".exe" And Path.GetExtension(strPath.ToLower) <> ".com" Then
|
|
||||||
sErrorMessage = "The DOS file you selected is not an executable file. (.exe or .com)"
|
|
||||||
txtProcessPath.Focus()
|
|
||||||
Return False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not Path.IsPathRooted(strPath) Then
|
|
||||||
sErrorMessage = "The path to the DOS executable must be a full path."
|
|
||||||
txtProcessPath.Focus()
|
|
||||||
Return False
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not File.Exists(strPath) Then
|
|
||||||
sErrorMessage = "The selected DOS executable file does not exist."
|
|
||||||
txtProcessPath.Focus()
|
|
||||||
Return False
|
|
||||||
End If
|
|
||||||
|
|
||||||
Return True
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Private Function ValidateProcessPath(ByVal strPath As String, ByRef sErrorMessage As String) As Boolean
|
Private Function ValidateProcessPath(ByVal strPath As String, ByRef sErrorMessage As String) As Boolean
|
||||||
If strPath = String.Empty Then
|
strPath = mgrPath.ValidatePathForOS(strPath)
|
||||||
sErrorMessage = "You must select the game's executable file (.exe) to continue."
|
|
||||||
|
If strPath.Trim = String.Empty Then
|
||||||
|
sErrorMessage = frmAddWizard_ErrorValidProcess
|
||||||
txtProcessPath.Focus()
|
txtProcessPath.Focus()
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Path.GetExtension(strPath.ToLower) <> ".exe" Then
|
If Path.GetExtension(strPath.ToLower) <> ".exe" And Not mgrCommon.IsUnix Then
|
||||||
sErrorMessage = "The file you selected is not an executable file."
|
sErrorMessage = frmAddWizard_ErrorNotAProcess
|
||||||
txtProcessPath.Focus()
|
txtProcessPath.Focus()
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not Path.IsPathRooted(strPath) Then
|
If Not Path.IsPathRooted(strPath) Then
|
||||||
sErrorMessage = "The path to the executable must be a full path."
|
sErrorMessage = frmAddWizard_ErrorBadProcessPath
|
||||||
txtProcessPath.Focus()
|
txtProcessPath.Focus()
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not File.Exists(strPath) Then
|
If Not File.Exists(strPath) Then
|
||||||
sErrorMessage = "The selected executable file does not exist."
|
sErrorMessage = frmAddWizard_ErrorProcessNotExist
|
||||||
txtProcessPath.Focus()
|
txtProcessPath.Focus()
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
@@ -230,20 +234,22 @@ Public Class frmAddWizard
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function ValidateSavePath(ByVal strPath As String, ByRef sErrorMessage As String) As Boolean
|
Private Function ValidateSavePath(ByVal strPath As String, ByRef sErrorMessage As String) As Boolean
|
||||||
If strPath = String.Empty Then
|
strPath = mgrPath.ValidatePathForOS(strPath)
|
||||||
sErrorMessage = "You must select the game's save file path to continue."
|
|
||||||
|
If strPath.Trim = String.Empty Then
|
||||||
|
sErrorMessage = frmAddWizard_ErrorValidSavePath
|
||||||
txtSavePath.Focus()
|
txtSavePath.Focus()
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not Directory.Exists(strPath) Then
|
If Not Directory.Exists(strPath) Then
|
||||||
sErrorMessage = "The folder you selected does not exist or is not a valid folder."
|
sErrorMessage = frmAddWizard_ErrorSavePathNotExist
|
||||||
txtSavePath.Focus()
|
txtSavePath.Focus()
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not Path.IsPathRooted(strPath) Then
|
If Not Path.IsPathRooted(strPath) Then
|
||||||
sErrorMessage = "The selected path must be a full path."
|
sErrorMessage = frmAddWizard_ErrorBadSavePath
|
||||||
txtSavePath.Focus()
|
txtSavePath.Focus()
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
@@ -252,8 +258,8 @@ Public Class frmAddWizard
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function ValidateSaveType(ByVal strSaveType As String, ByRef sErrorMessage As String)
|
Private Function ValidateSaveType(ByVal strSaveType As String, ByRef sErrorMessage As String)
|
||||||
If strSaveType = String.Empty Then
|
If strSaveType.Trim = String.Empty Then
|
||||||
sErrorMessage = "You must choose a file type or specific file to backup."
|
sErrorMessage = frmAddWizard_ErrorValidSaveType
|
||||||
txtFileTypes.Focus()
|
txtFileTypes.Focus()
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
@@ -262,24 +268,11 @@ Public Class frmAddWizard
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub DoSave()
|
Private Sub DoSave()
|
||||||
Dim oGames As New List(Of clsGame)
|
|
||||||
Dim hshDupeCheck As New Hashtable
|
|
||||||
Dim sExistingGame As String
|
|
||||||
Dim sNewGame As String = oGameToSave.Name & ":" & oGameToSave.ProcessName
|
|
||||||
|
|
||||||
For Each o As clsGame In GameData.Values
|
|
||||||
oGames.Add(o)
|
|
||||||
sExistingGame = o.Name & ":" & o.ProcessName
|
|
||||||
hshDupeCheck.Add(sExistingGame, String.Empty)
|
|
||||||
Next
|
|
||||||
|
|
||||||
If hshDupeCheck.Contains(sNewGame) Then
|
|
||||||
MsgBox("The monitor list already contains a game with this exact name and process.", MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
|
||||||
Else
|
|
||||||
mgrMonitorList.DoListAdd(oGameToSave)
|
mgrMonitorList.DoListAdd(oGameToSave)
|
||||||
MsgBox(oGameToSave.Name & " has been added to the monitor list.", MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
If mgrCommon.ShowMessage(frmAddWizard_ConfirmSaveTags, New String() {oGameToSave.Name, oGameToSave.Name}, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
Me.Close()
|
OpenTags(oGameToSave)
|
||||||
End If
|
End If
|
||||||
|
Me.Close()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ValidateBack()
|
Private Sub ValidateBack()
|
||||||
@@ -324,21 +317,15 @@ Public Class frmAddWizard
|
|||||||
|
|
||||||
Case eSteps.Step2
|
Case eSteps.Step2
|
||||||
If ValidateProcessPath(txtProcessPath.Text, sErrorMessage) Then
|
If ValidateProcessPath(txtProcessPath.Text, sErrorMessage) Then
|
||||||
If CheckforDOSBox(txtProcessPath.Text) Then
|
|
||||||
If ValidateDOSProcessPath(txtdBoxProcess.Text, sErrorMessage) Then
|
|
||||||
eCurrentStep = eSteps.Step3
|
eCurrentStep = eSteps.Step3
|
||||||
Else
|
Else
|
||||||
bError = True
|
bError = True
|
||||||
End If
|
End If
|
||||||
Else
|
|
||||||
eCurrentStep = eSteps.Step3
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
bError = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
Case eSteps.Step3
|
Case eSteps.Step3
|
||||||
If ValidateSavePath(txtSavePath.Text, sErrorMessage) Then
|
If ValidateSavePath(txtSavePath.Text, sErrorMessage) Then
|
||||||
|
lblIncludePath.Text = txtSavePath.Text
|
||||||
|
lblExcludePath.Text = txtSavePath.Text
|
||||||
If chkFolderSave.Checked = False Then
|
If chkFolderSave.Checked = False Then
|
||||||
eCurrentStep = eSteps.Step3a
|
eCurrentStep = eSteps.Step3a
|
||||||
Else
|
Else
|
||||||
@@ -361,7 +348,7 @@ Public Class frmAddWizard
|
|||||||
DoSave()
|
DoSave()
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
If bError Then MsgBox(sErrorMessage, MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
If bError Then mgrCommon.ShowMessage(sErrorMessage, MsgBoxStyle.Exclamation)
|
||||||
StepHandler()
|
StepHandler()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -405,35 +392,17 @@ Public Class frmAddWizard
|
|||||||
ReadShortcut(sTemp)
|
ReadShortcut(sTemp)
|
||||||
File.Delete(sTemp)
|
File.Delete(sTemp)
|
||||||
Catch e2 As Exception
|
Catch e2 As Exception
|
||||||
MsgBox("An error occured working with the shortcut file." & vbCrLf & vbCrLf & e2.Message, MsgBoxStyle.Critical, "Game Backup Monitor")
|
mgrCommon.ShowMessage(frmAddWizard_ErrorWithShortcut, e2.Message, MsgBoxStyle.Critical)
|
||||||
End Try
|
End Try
|
||||||
Else
|
Else
|
||||||
MsgBox("An error occured reading the shortcut file." & vbCrLf & vbCrLf & e1.Message, MsgBoxStyle.Critical, "Game Backup Monitor")
|
mgrCommon.ShowMessage(frmAddWizard_ErrorWithShortcut, e1.Message, MsgBoxStyle.Critical)
|
||||||
End If
|
End If
|
||||||
End Try
|
End Try
|
||||||
Else
|
Else
|
||||||
MsgBox("This file is not a shorcut.")
|
mgrCommon.ShowMessage(frmAddWizard_ErrorNotAShortcut, MsgBoxStyle.Information)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub DOSProcessBrowse()
|
|
||||||
Dim sDefaultFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
|
|
||||||
Dim sCurrentPath As String
|
|
||||||
Dim sNewPath As String
|
|
||||||
|
|
||||||
If txtProcessPath.Text <> String.Empty Then
|
|
||||||
sCurrentPath = Path.GetDirectoryName(txtProcessPath.Text)
|
|
||||||
If Directory.Exists(sCurrentPath) Then
|
|
||||||
sDefaultFolder = sCurrentPath
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
sNewPath = mgrCommon.OpenFileBrowser("Choose DOS executable file that starts the game", "*", _
|
|
||||||
"", sDefaultFolder, False)
|
|
||||||
|
|
||||||
If sNewPath <> String.Empty Then txtdBoxProcess.Text = sNewPath
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub ProcessBrowse()
|
Private Sub ProcessBrowse()
|
||||||
Dim sDefaultFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
|
Dim sDefaultFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
|
||||||
Dim sCurrentPath As String
|
Dim sCurrentPath As String
|
||||||
@@ -446,8 +415,8 @@ Public Class frmAddWizard
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
sNewPath = mgrCommon.OpenFileBrowser("Choose exe file that starts the game", "exe", _
|
sNewPath = mgrCommon.OpenFileBrowser("Wizard_Process_Path", frmAddWizard_ChooseProcess, "exe",
|
||||||
"Executable", sDefaultFolder, False)
|
frmAddWizard_Executable, sDefaultFolder, False)
|
||||||
|
|
||||||
If sNewPath <> String.Empty Then txtProcessPath.Text = sNewPath
|
If sNewPath <> String.Empty Then txtProcessPath.Text = sNewPath
|
||||||
End Sub
|
End Sub
|
||||||
@@ -463,117 +432,41 @@ Public Class frmAddWizard
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
sNewPath = mgrCommon.OpenFolderBrowser("Choose the game save folder:", sDefaultFolder, False)
|
sNewPath = mgrCommon.OpenFolderBrowser("Wizard_Save_Path", frmAddWizard_ChooseSavePath, sDefaultFolder, False, False)
|
||||||
|
|
||||||
If sNewPath <> String.Empty Then txtSavePath.Text = sNewPath
|
If sNewPath <> String.Empty Then txtSavePath.Text = sNewPath
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SaveTypeBrowse()
|
Private Sub UpdateBuilderLabel(ByVal sBuilderString As String, ByVal lbl As Label)
|
||||||
Dim sDefaultFolder As String = txtSavePath.Text
|
Dim iCount As Integer = sBuilderString.Split(":").Length
|
||||||
Dim sCurrentSaveType As String = txtFileTypes.Text
|
|
||||||
Dim sSaveType As String
|
|
||||||
Dim sTitle As String = String.Empty
|
|
||||||
Dim sSaveTypeList As String()
|
|
||||||
|
|
||||||
If optFileType.Checked Then
|
If sBuilderString <> String.Empty And iCount > 0 Then
|
||||||
sTitle = "Choose the type of file to backup"
|
lbl.Text = mgrCommon.FormatString(frmAddWizard_ItemsSelectedMulti, iCount)
|
||||||
ElseIf optSpecificFile.Checked Then
|
|
||||||
sTitle = "Choose a specific file to backup"
|
|
||||||
Else
|
Else
|
||||||
sTitle = "Choose a specific folder to backup"
|
lbl.Text = frmAddWizard_ItemsSelectedNone
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If optFileType.Checked Or optSpecificFile.Checked Then
|
|
||||||
sSaveType = mgrCommon.OpenFileBrowser(sTitle, "*", "All", sDefaultFolder, False)
|
|
||||||
If sSaveType <> String.Empty Then
|
|
||||||
sSaveTypeList = sSaveType.Split("|")
|
|
||||||
For Each s As String In sSaveTypeList
|
|
||||||
If optFileType.Checked Then
|
|
||||||
sSaveType = "*" & Path.GetExtension(s) & ":"
|
|
||||||
Else
|
|
||||||
sSaveType = Path.GetFileName(s) & ":"
|
|
||||||
End If
|
|
||||||
|
|
||||||
sSaveType = sSaveType.TrimEnd(":")
|
|
||||||
|
|
||||||
If sCurrentSaveType <> String.Empty Then
|
|
||||||
sCurrentSaveType &= ":" & sSaveType
|
|
||||||
Else
|
|
||||||
sCurrentSaveType = sSaveType
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
sSaveType = mgrCommon.OpenFolderBrowser(sTitle, sDefaultFolder, False)
|
|
||||||
If sSaveType <> String.Empty Then
|
|
||||||
Dim sPath As String() = sSaveType.Split("\")
|
|
||||||
|
|
||||||
If sCurrentSaveType <> String.Empty Then
|
|
||||||
sCurrentSaveType &= ":" & sPath(sPath.Length - 1)
|
|
||||||
Else
|
|
||||||
sCurrentSaveType = sPath(sPath.Length - 1)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
txtFileTypes.Text = sCurrentSaveType
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ExcludeBrowse()
|
Private Sub OpenBuilder(ByVal sFormText As String, ByRef txtBox As TextBox)
|
||||||
Dim sDefaultFolder As String = txtSavePath.Text
|
Dim frm As New frmIncludeExclude
|
||||||
Dim sCurrentExclude As String = txtExcludeList.Text
|
frm.FormName = sFormText
|
||||||
Dim sExclude As String
|
frm.BuilderString = txtBox.Text
|
||||||
Dim sExcludeList As String()
|
frm.RootFolder = txtSavePath.Text
|
||||||
Dim sTitle As String = String.Empty
|
|
||||||
|
|
||||||
If optExcludeFileType.Checked Then
|
frm.ShowDialog()
|
||||||
sTitle = "Choose the type of file(s) to exclude"
|
|
||||||
ElseIf optExcludeSpecificFile.Checked Then
|
|
||||||
sTitle = "Choose any file(s) to exclude"
|
|
||||||
Else
|
|
||||||
sTitle = "Choose a folder to exclude"
|
|
||||||
End If
|
|
||||||
|
|
||||||
If optExcludeFileType.Checked Or optExcludeSpecificFile.Checked Then
|
|
||||||
sExclude = mgrCommon.OpenFileBrowser(sTitle, "*", "All", sDefaultFolder, True)
|
|
||||||
If sExclude <> String.Empty Then
|
|
||||||
sExcludeList = sExclude.Split("|")
|
|
||||||
For Each s As String In sExcludeList
|
|
||||||
If optExcludeFileType.Checked Then
|
|
||||||
sExclude = "*" & Path.GetExtension(s) & ":"
|
|
||||||
Else
|
|
||||||
sExclude = Path.GetFileName(s) & ":"
|
|
||||||
End If
|
|
||||||
|
|
||||||
sExclude = sExclude.TrimEnd(":")
|
|
||||||
|
|
||||||
If sCurrentExclude <> String.Empty Then
|
|
||||||
sCurrentExclude &= ":" & sExclude
|
|
||||||
Else
|
|
||||||
sCurrentExclude = sExclude
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
sExclude = mgrCommon.OpenFolderBrowser(sTitle, sDefaultFolder, False)
|
|
||||||
If sExclude <> String.Empty Then
|
|
||||||
Dim sPath As String() = sExclude.Split("\")
|
|
||||||
|
|
||||||
If sCurrentExclude <> String.Empty Then
|
|
||||||
sCurrentExclude &= ":" & sPath(sPath.Length - 1)
|
|
||||||
Else
|
|
||||||
sCurrentExclude = sPath(sPath.Length - 1)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If sCurrentExclude <> String.Empty Then
|
|
||||||
txtExcludeList.Text = sCurrentExclude
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
txtBox.Text = frm.BuilderString
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OpenTags(ByVal oGame As clsGame)
|
||||||
|
Dim frm As New frmGameTags
|
||||||
|
Dim sMonitorIDs As New List(Of String)
|
||||||
|
sMonitorIDs.Add(oGame.ID)
|
||||||
|
|
||||||
|
frm.IDList = sMonitorIDs
|
||||||
|
frm.GameName = oGame.Name
|
||||||
|
frm.ShowDialog()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub btnBack_Click(sender As Object, e As EventArgs) Handles btnBack.Click
|
Private Sub btnBack_Click(sender As Object, e As EventArgs) Handles btnBack.Click
|
||||||
ValidateBack()
|
ValidateBack()
|
||||||
@@ -588,26 +481,22 @@ Public Class frmAddWizard
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub frmAddWizard_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
Private Sub frmAddWizard_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
FormInit()
|
SetForm()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub DropTarget_DragEnter(sender As Object, e As DragEventArgs) Handles lblDrag1.DragEnter, lblDrag2.DragEnter, txtName.DragEnter, txtProcessPath.DragEnter
|
Private Sub DropTarget_DragEnter(sender As Object, e As DragEventArgs) Handles txtName.DragEnter, txtProcessPath.DragEnter, lblStep1Instructions.DragEnter, lblStep2Instructions.DragEnter
|
||||||
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
|
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
|
||||||
e.Effect = DragDropEffects.Copy
|
e.Effect = DragDropEffects.Copy
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub DropTarget_DragDrop(sender As Object, e As DragEventArgs) Handles lblDrag1.DragDrop, lblDrag2.DragDrop, txtName.DragDrop, txtProcessPath.DragDrop
|
Private Sub DropTarget_DragDrop(sender As Object, e As DragEventArgs) Handles txtName.DragDrop, txtProcessPath.DragDrop, lblStep1Instructions.DragDrop, lblStep2Instructions.DragDrop
|
||||||
Dim oFiles() As String = e.Data.GetData(DataFormats.FileDrop)
|
Dim oFiles() As String = e.Data.GetData(DataFormats.FileDrop)
|
||||||
For Each sPath In oFiles
|
For Each sPath In oFiles
|
||||||
ReadShortcut(sPath)
|
ReadShortcut(sPath)
|
||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub btndBoxBrowse_Click(sender As Object, e As EventArgs) Handles btndBoxBrowse.Click
|
|
||||||
DOSProcessBrowse()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub btnProcessBrowse_Click(sender As Object, e As EventArgs) Handles btnProcessBrowse.Click
|
Private Sub btnProcessBrowse_Click(sender As Object, e As EventArgs) Handles btnProcessBrowse.Click
|
||||||
ProcessBrowse()
|
ProcessBrowse()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -616,19 +505,11 @@ Public Class frmAddWizard
|
|||||||
SavePathBrowse()
|
SavePathBrowse()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub btnFileTypeBrowse_Click(sender As Object, e As EventArgs) Handles btnFileTypeBrowse.Click
|
Private Sub btnStep4Clear_Click(sender As Object, e As EventArgs)
|
||||||
SaveTypeBrowse()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub btnExcludeBrowse_Click(sender As Object, e As EventArgs) Handles btnExcludeBrowse.Click
|
|
||||||
ExcludeBrowse()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub btnStep4Clear_Click(sender As Object, e As EventArgs) Handles btnStep4Clear.Click
|
|
||||||
txtExcludeList.Clear()
|
txtExcludeList.Clear()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub btnStep3aClear_Click(sender As Object, e As EventArgs) Handles btnStep3aClear.Click
|
Private Sub btnStep3aClear_Click(sender As Object, e As EventArgs)
|
||||||
txtFileTypes.Clear()
|
txtFileTypes.Clear()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -636,4 +517,19 @@ Public Class frmAddWizard
|
|||||||
txtFileTypes.Clear()
|
txtFileTypes.Clear()
|
||||||
End Sub
|
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)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnExclude_Click(sender As Object, e As EventArgs) Handles btnExclude.Click
|
||||||
|
OpenBuilder(frmAddWizard_Exclude, txtExcludeList)
|
||||||
|
UpdateBuilderLabel(txtExcludeList.Text, lblExclude)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
Generated
+51
-26
@@ -1,9 +1,9 @@
|
|||||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||||
Partial Class frmAdvancedImport
|
Partial Class frmAdvancedImport
|
||||||
Inherits System.Windows.Forms.Form
|
Inherits System.Windows.Forms.Form
|
||||||
|
|
||||||
'Form overrides dispose to clean up the component list.
|
'Form overrides dispose to clean up the component list.
|
||||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
<System.Diagnostics.DebuggerNonUserCode()>
|
||||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||||
Try
|
Try
|
||||||
If disposing AndAlso components IsNot Nothing Then
|
If disposing AndAlso components IsNot Nothing Then
|
||||||
@@ -20,49 +20,42 @@ Partial Class frmAdvancedImport
|
|||||||
'NOTE: The following procedure is required by the Windows Form Designer
|
'NOTE: The following procedure is required by the Windows Form Designer
|
||||||
'It can be modified using the Windows Form Designer.
|
'It can be modified using the Windows Form Designer.
|
||||||
'Do not modify it using the code editor.
|
'Do not modify it using the code editor.
|
||||||
<System.Diagnostics.DebuggerStepThrough()> _
|
<System.Diagnostics.DebuggerStepThrough()>
|
||||||
Private Sub InitializeComponent()
|
Private Sub InitializeComponent()
|
||||||
Me.lstGames = New System.Windows.Forms.CheckedListBox()
|
|
||||||
Me.btnImport = New System.Windows.Forms.Button()
|
Me.btnImport = New System.Windows.Forms.Button()
|
||||||
Me.chkSelectAll = New System.Windows.Forms.CheckBox()
|
Me.chkSelectAll = New System.Windows.Forms.CheckBox()
|
||||||
Me.lblGames = New System.Windows.Forms.Label()
|
Me.lblGames = New System.Windows.Forms.Label()
|
||||||
Me.lblSelected = New System.Windows.Forms.Label()
|
Me.lblSelected = New System.Windows.Forms.Label()
|
||||||
Me.btnCancel = New System.Windows.Forms.Button()
|
Me.btnCancel = New System.Windows.Forms.Button()
|
||||||
|
Me.lstGames = New System.Windows.Forms.ListView()
|
||||||
|
Me.txtFilter = New System.Windows.Forms.TextBox()
|
||||||
|
Me.lblFilter = New System.Windows.Forms.Label()
|
||||||
Me.SuspendLayout()
|
Me.SuspendLayout()
|
||||||
'
|
'
|
||||||
'lstGames
|
|
||||||
'
|
|
||||||
Me.lstGames.CheckOnClick = True
|
|
||||||
Me.lstGames.FormattingEnabled = True
|
|
||||||
Me.lstGames.Location = New System.Drawing.Point(12, 30)
|
|
||||||
Me.lstGames.Name = "lstGames"
|
|
||||||
Me.lstGames.Size = New System.Drawing.Size(335, 334)
|
|
||||||
Me.lstGames.Sorted = True
|
|
||||||
Me.lstGames.TabIndex = 1
|
|
||||||
'
|
|
||||||
'btnImport
|
'btnImport
|
||||||
'
|
'
|
||||||
Me.btnImport.Location = New System.Drawing.Point(191, 370)
|
Me.btnImport.Location = New System.Drawing.Point(416, 375)
|
||||||
Me.btnImport.Name = "btnImport"
|
Me.btnImport.Name = "btnImport"
|
||||||
Me.btnImport.Size = New System.Drawing.Size(75, 23)
|
Me.btnImport.Size = New System.Drawing.Size(75, 23)
|
||||||
Me.btnImport.TabIndex = 2
|
Me.btnImport.TabIndex = 3
|
||||||
Me.btnImport.Text = "&Import"
|
Me.btnImport.Text = "&Import"
|
||||||
Me.btnImport.UseVisualStyleBackColor = True
|
Me.btnImport.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
'chkSelectAll
|
'chkSelectAll
|
||||||
'
|
'
|
||||||
Me.chkSelectAll.AutoSize = True
|
Me.chkSelectAll.AutoSize = True
|
||||||
Me.chkSelectAll.Location = New System.Drawing.Point(15, 12)
|
Me.chkSelectAll.Location = New System.Drawing.Point(12, 11)
|
||||||
Me.chkSelectAll.Name = "chkSelectAll"
|
Me.chkSelectAll.Name = "chkSelectAll"
|
||||||
Me.chkSelectAll.Size = New System.Drawing.Size(15, 14)
|
Me.chkSelectAll.Size = New System.Drawing.Size(70, 17)
|
||||||
Me.chkSelectAll.TabIndex = 0
|
Me.chkSelectAll.TabIndex = 0
|
||||||
|
Me.chkSelectAll.Text = "Select All"
|
||||||
Me.chkSelectAll.UseVisualStyleBackColor = True
|
Me.chkSelectAll.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
'lblGames
|
'lblGames
|
||||||
'
|
'
|
||||||
Me.lblGames.Location = New System.Drawing.Point(12, 12)
|
Me.lblGames.Location = New System.Drawing.Point(12, 380)
|
||||||
Me.lblGames.Name = "lblGames"
|
Me.lblGames.Name = "lblGames"
|
||||||
Me.lblGames.Size = New System.Drawing.Size(335, 14)
|
Me.lblGames.Size = New System.Drawing.Size(560, 14)
|
||||||
Me.lblGames.TabIndex = 0
|
Me.lblGames.TabIndex = 0
|
||||||
Me.lblGames.Text = "Games"
|
Me.lblGames.Text = "Games"
|
||||||
Me.lblGames.TextAlign = System.Drawing.ContentAlignment.TopCenter
|
Me.lblGames.TextAlign = System.Drawing.ContentAlignment.TopCenter
|
||||||
@@ -70,7 +63,7 @@ Partial Class frmAdvancedImport
|
|||||||
'lblSelected
|
'lblSelected
|
||||||
'
|
'
|
||||||
Me.lblSelected.AutoSize = True
|
Me.lblSelected.AutoSize = True
|
||||||
Me.lblSelected.Location = New System.Drawing.Point(9, 375)
|
Me.lblSelected.Location = New System.Drawing.Point(9, 380)
|
||||||
Me.lblSelected.Name = "lblSelected"
|
Me.lblSelected.Name = "lblSelected"
|
||||||
Me.lblSelected.Size = New System.Drawing.Size(77, 13)
|
Me.lblSelected.Size = New System.Drawing.Size(77, 13)
|
||||||
Me.lblSelected.TabIndex = 0
|
Me.lblSelected.TabIndex = 0
|
||||||
@@ -78,24 +71,54 @@ Partial Class frmAdvancedImport
|
|||||||
'
|
'
|
||||||
'btnCancel
|
'btnCancel
|
||||||
'
|
'
|
||||||
Me.btnCancel.Location = New System.Drawing.Point(272, 370)
|
Me.btnCancel.Location = New System.Drawing.Point(497, 375)
|
||||||
Me.btnCancel.Name = "btnCancel"
|
Me.btnCancel.Name = "btnCancel"
|
||||||
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
|
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
|
||||||
Me.btnCancel.TabIndex = 3
|
Me.btnCancel.TabIndex = 4
|
||||||
Me.btnCancel.Text = "&Cancel"
|
Me.btnCancel.Text = "&Cancel"
|
||||||
Me.btnCancel.UseVisualStyleBackColor = True
|
Me.btnCancel.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
|
'lstGames
|
||||||
|
'
|
||||||
|
Me.lstGames.CheckBoxes = True
|
||||||
|
Me.lstGames.FullRowSelect = True
|
||||||
|
Me.lstGames.Location = New System.Drawing.Point(12, 35)
|
||||||
|
Me.lstGames.Name = "lstGames"
|
||||||
|
Me.lstGames.Size = New System.Drawing.Size(560, 329)
|
||||||
|
Me.lstGames.TabIndex = 2
|
||||||
|
Me.lstGames.UseCompatibleStateImageBehavior = False
|
||||||
|
Me.lstGames.View = System.Windows.Forms.View.Details
|
||||||
|
'
|
||||||
|
'txtFilter
|
||||||
|
'
|
||||||
|
Me.txtFilter.Location = New System.Drawing.Point(416, 9)
|
||||||
|
Me.txtFilter.Name = "txtFilter"
|
||||||
|
Me.txtFilter.Size = New System.Drawing.Size(156, 20)
|
||||||
|
Me.txtFilter.TabIndex = 1
|
||||||
|
'
|
||||||
|
'lblFilter
|
||||||
|
'
|
||||||
|
Me.lblFilter.Location = New System.Drawing.Point(371, 12)
|
||||||
|
Me.lblFilter.Name = "lblFilter"
|
||||||
|
Me.lblFilter.Size = New System.Drawing.Size(39, 14)
|
||||||
|
Me.lblFilter.TabIndex = 0
|
||||||
|
Me.lblFilter.Text = "Filter:"
|
||||||
|
Me.lblFilter.TextAlign = System.Drawing.ContentAlignment.TopRight
|
||||||
|
'
|
||||||
'frmAdvancedImport
|
'frmAdvancedImport
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
Me.ClientSize = New System.Drawing.Size(359, 402)
|
Me.ClientSize = New System.Drawing.Size(584, 411)
|
||||||
|
Me.Controls.Add(Me.lblFilter)
|
||||||
|
Me.Controls.Add(Me.txtFilter)
|
||||||
|
Me.Controls.Add(Me.lstGames)
|
||||||
Me.Controls.Add(Me.btnCancel)
|
Me.Controls.Add(Me.btnCancel)
|
||||||
Me.Controls.Add(Me.lblSelected)
|
Me.Controls.Add(Me.lblSelected)
|
||||||
Me.Controls.Add(Me.chkSelectAll)
|
Me.Controls.Add(Me.chkSelectAll)
|
||||||
Me.Controls.Add(Me.btnImport)
|
Me.Controls.Add(Me.btnImport)
|
||||||
Me.Controls.Add(Me.lstGames)
|
|
||||||
Me.Controls.Add(Me.lblGames)
|
Me.Controls.Add(Me.lblGames)
|
||||||
|
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||||
Me.MaximizeBox = False
|
Me.MaximizeBox = False
|
||||||
Me.MinimizeBox = False
|
Me.MinimizeBox = False
|
||||||
Me.Name = "frmAdvancedImport"
|
Me.Name = "frmAdvancedImport"
|
||||||
@@ -106,10 +129,12 @@ Partial Class frmAdvancedImport
|
|||||||
Me.PerformLayout()
|
Me.PerformLayout()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Friend WithEvents lstGames As System.Windows.Forms.CheckedListBox
|
|
||||||
Friend WithEvents btnImport As System.Windows.Forms.Button
|
Friend WithEvents btnImport As System.Windows.Forms.Button
|
||||||
Friend WithEvents chkSelectAll As System.Windows.Forms.CheckBox
|
Friend WithEvents chkSelectAll As System.Windows.Forms.CheckBox
|
||||||
Friend WithEvents lblGames As System.Windows.Forms.Label
|
Friend WithEvents lblGames As System.Windows.Forms.Label
|
||||||
Friend WithEvents lblSelected As System.Windows.Forms.Label
|
Friend WithEvents lblSelected As System.Windows.Forms.Label
|
||||||
Friend WithEvents btnCancel As System.Windows.Forms.Button
|
Friend WithEvents btnCancel As System.Windows.Forms.Button
|
||||||
|
Friend WithEvents lstGames As System.Windows.Forms.ListView
|
||||||
|
Friend WithEvents txtFilter As System.Windows.Forms.TextBox
|
||||||
|
Friend WithEvents lblFilter As System.Windows.Forms.Label
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
+272
-28
@@ -1,8 +1,26 @@
|
|||||||
Public Class frmAdvancedImport
|
Imports GBM.My.Resources
|
||||||
|
Imports System.IO
|
||||||
|
|
||||||
|
Public Class frmAdvancedImport
|
||||||
|
|
||||||
|
Private oImportData As ExportData
|
||||||
Private hshImportData As Hashtable
|
Private hshImportData As Hashtable
|
||||||
Private bSelectAll As Boolean = False
|
Private hshFinalData As New Hashtable
|
||||||
|
Private bModWinConfigsForLinux As Boolean
|
||||||
|
Private bSelectAll As Boolean = True
|
||||||
Private bIsLoading As Boolean = False
|
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
|
Public Property ImportData As Hashtable
|
||||||
Set(value As Hashtable)
|
Set(value As Hashtable)
|
||||||
@@ -13,53 +31,239 @@
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public Property ModWinConfigsForLinux As Boolean
|
||||||
|
Set(value As Boolean)
|
||||||
|
bModWinConfigsForLinux = value
|
||||||
|
End Set
|
||||||
|
Get
|
||||||
|
Return bModWinConfigsForLinux
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property FinalData As Hashtable
|
||||||
|
Get
|
||||||
|
Return hshFinalData
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Private Sub SelectToggle()
|
Private Sub SelectToggle()
|
||||||
|
Cursor.Current = Cursors.WaitCursor
|
||||||
|
lstGames.BeginUpdate()
|
||||||
bSelectAll = Not bSelectAll
|
bSelectAll = Not bSelectAll
|
||||||
For i As Integer = 0 To lstGames.Items.Count - 1
|
For i As Integer = 0 To lstGames.Items.Count - 1
|
||||||
lstGames.SetItemChecked(i, bSelectAll)
|
lstGames.Items(i).Checked = bSelectAll
|
||||||
Next
|
Next
|
||||||
|
lstGames.EndUpdate()
|
||||||
|
Cursor.Current = Cursors.Default
|
||||||
UpdateSelected()
|
UpdateSelected()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub LoadData()
|
Private Sub SaveChecked(ByVal oItem As ListViewItem)
|
||||||
Dim oApp As clsGame
|
If oItem.Checked Then
|
||||||
Dim oData As KeyValuePair(Of String, String)
|
FinalData.Add(oItem.Tag, ImportData(oItem.Tag))
|
||||||
|
Else
|
||||||
|
FinalData.Remove(oItem.Tag)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
lstGames.ValueMember = "Key"
|
Private Sub ModTags(ByRef oTags As List(Of Tag))
|
||||||
lstGames.DisplayMember = "Value"
|
Dim bExists As Boolean
|
||||||
|
Dim oTag As Tag
|
||||||
|
Dim oNewTag As Tag
|
||||||
|
Dim oRemoveTag As New Tag
|
||||||
|
Dim sTag As String
|
||||||
|
Dim sAddTags() As String = {"Wine"}
|
||||||
|
Dim sRemoveTags() As String = {"Official"}
|
||||||
|
|
||||||
|
For Each sTag In sAddTags
|
||||||
|
bExists = False
|
||||||
|
For Each oTag In oTags
|
||||||
|
If oTag.Name = sTag Then
|
||||||
|
bExists = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If Not bExists Then
|
||||||
|
oNewTag = New Tag
|
||||||
|
oNewTag.Name = sTag
|
||||||
|
oTags.Add(oNewTag)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
For Each sTag In sRemoveTags
|
||||||
|
bExists = False
|
||||||
|
For Each oTag In oTags
|
||||||
|
If oTag.Name = sTag Then
|
||||||
|
bExists = True
|
||||||
|
oRemoveTag = oTag
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If bExists Then
|
||||||
|
oTags.Remove(oRemoveTag)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function CheckIgnoreTags(ByVal oTags As List(Of Tag)) As Boolean
|
||||||
|
Dim oTag As Tag
|
||||||
|
Dim sTag As String
|
||||||
|
Dim sIgnoreTags() As String = {"DOSBox", "ScummVM"}
|
||||||
|
|
||||||
|
For Each oTag In oTags
|
||||||
|
For Each sTag In sIgnoreTags
|
||||||
|
If oTag.Name = sTag Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub LoadData(Optional ByVal sFilter As String = "", Optional ByVal bAutoDetect As Boolean = False)
|
||||||
|
Dim oApp As clsGame
|
||||||
|
Dim oListViewItem As ListViewItem
|
||||||
|
Dim sTags As String
|
||||||
|
Dim bAddItem As Boolean
|
||||||
|
Dim bResetSelectAll As Boolean = False
|
||||||
|
|
||||||
|
Cursor.Current = Cursors.WaitCursor
|
||||||
|
lstGames.BeginUpdate()
|
||||||
|
|
||||||
|
lstGames.Clear()
|
||||||
|
|
||||||
|
lstGames.Columns.Add(frmAdvancedImport_ColumnName, 215)
|
||||||
|
lstGames.Columns.Add(frmAdvancedImport_ColumnProcess, 130)
|
||||||
|
lstGames.Columns.Add(frmAdvancedImport_ColumnTags, 190)
|
||||||
|
|
||||||
For Each de As DictionaryEntry In ImportData
|
For Each de As DictionaryEntry In ImportData
|
||||||
|
bAddItem = False
|
||||||
oApp = DirectCast(de.Value, clsGame)
|
oApp = DirectCast(de.Value, clsGame)
|
||||||
oData = New KeyValuePair(Of String, String)(oApp.ProcessName, oApp.Name & " (" & oApp.TrueProcess & ")")
|
|
||||||
lstGames.Items.Add(oData)
|
'Run any required tag mods
|
||||||
|
If ModWinConfigsForLinux Then
|
||||||
|
ModTags(oApp.ImportTags)
|
||||||
|
End If
|
||||||
|
|
||||||
|
sTags = String.Empty
|
||||||
|
oApp.ImportTags.Sort(AddressOf mgrCommon.CompareImportTagsByName)
|
||||||
|
For Each oTag As Tag In oApp.ImportTags
|
||||||
|
sTags &= oTag.Name & ", "
|
||||||
Next
|
Next
|
||||||
|
sTags = sTags.TrimEnd(New Char() {",", " "})
|
||||||
|
|
||||||
|
oListViewItem = New ListViewItem(New String() {oApp.Name, oApp.ProcessName, sTags})
|
||||||
|
oListViewItem.Tag = oApp.ID
|
||||||
|
|
||||||
|
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.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 ModWinConfigsForLinux Then
|
||||||
|
bAddItem = CheckIgnoreTags(oApp.ImportTags)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If bAddItem Then
|
||||||
|
If oListViewItem.Checked Then bResetSelectAll = True
|
||||||
|
lstGames.Items.Add(oListViewItem)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
'Change the status of the "Select All" checkbox depending on the status of the items filter results. Set loading flag so we don't trigger any events
|
||||||
|
bIsLoading = True
|
||||||
|
If Not bResetSelectAll And bSelectAll Then
|
||||||
|
bSelectAll = False
|
||||||
|
chkSelectAll.Checked = False
|
||||||
|
ElseIf bResetSelectAll And Not bSelectAll Then
|
||||||
|
bSelectAll = True
|
||||||
|
chkSelectAll.Checked = True
|
||||||
|
End If
|
||||||
|
bIsLoading = False
|
||||||
|
|
||||||
|
lstGames.ListViewItemSorter = New ListViewItemComparer(iCurrentSort)
|
||||||
|
lstGames.EndUpdate()
|
||||||
|
UpdateSelected()
|
||||||
|
|
||||||
|
If txtFilter.Text = String.Empty Then
|
||||||
|
lblGames.Text = mgrCommon.FormatString(frmAdvancedImport_Configs, lstGames.Items.Count)
|
||||||
|
Else
|
||||||
|
lblGames.Text = mgrCommon.FormatString(frmAdvancedImport_Configs, lstGames.Items.Count) & " " & frmAdvancedImport_Filtered
|
||||||
|
End If
|
||||||
|
|
||||||
|
Cursor.Current = Cursors.Default
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SetForm()
|
Private Sub SetForm()
|
||||||
chkSelectAll.Checked = True
|
'Set Form Name
|
||||||
lblGames.Text = ImportData.Count & " new configurations available."
|
Me.Text = frmAdvancedImport_FormName
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub BuildList()
|
'Add configuration date to title if applicable
|
||||||
Dim oData As KeyValuePair(Of String, String)
|
If ImportInfo.Exported <> 0 Then
|
||||||
|
Me.Text &= " [" & mgrCommon.UnixToDate(ImportInfo.Exported).Date & "]"
|
||||||
For i As Integer = 0 To lstGames.Items.Count - 1
|
|
||||||
If Not lstGames.GetItemChecked(i) Then
|
|
||||||
oData = lstGames.Items(i)
|
|
||||||
ImportData.Remove(oData.Key)
|
|
||||||
End If
|
End If
|
||||||
Next
|
|
||||||
|
'Set Form Text
|
||||||
|
lblFilter.Text = frmAdvancedImport_lblFilter
|
||||||
|
btnCancel.Text = frmAdvancedImport_btnCancel
|
||||||
|
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
|
||||||
|
tmFilterTimer = New Timer()
|
||||||
|
tmFilterTimer.Interval = 1000
|
||||||
|
tmFilterTimer.Enabled = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub UpdateSelected()
|
Private Sub UpdateSelected()
|
||||||
lblSelected.Text = lstGames.CheckedItems.Count & " Selected"
|
lblSelected.Text = mgrCommon.FormatString(frmAdvancedImport_Selected, FinalData.Count)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub frmAdvancedImport_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
Private Sub frmAdvancedImport_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
bIsLoading = True
|
bIsLoading = True
|
||||||
SetForm()
|
SetForm()
|
||||||
LoadData()
|
LoadData(String.Empty, True)
|
||||||
SelectToggle()
|
|
||||||
bIsLoading = False
|
bIsLoading = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -67,8 +271,11 @@
|
|||||||
If Not bIsLoading Then SelectToggle()
|
If Not bIsLoading Then SelectToggle()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub lstGames_SelectedValueChanged(sender As Object, e As EventArgs) Handles lstGames.SelectedValueChanged
|
Private Sub lstGames_ItemChecked(sender As Object, e As ItemCheckedEventArgs) Handles lstGames.ItemChecked
|
||||||
If Not bIsLoading Then UpdateSelected()
|
SaveChecked(e.Item)
|
||||||
|
If Not bIsLoading Then
|
||||||
|
UpdateSelected()
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click
|
Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click
|
||||||
@@ -76,8 +283,45 @@
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub btnImport_Click(sender As Object, e As EventArgs) Handles btnImport.Click
|
Private Sub btnImport_Click(sender As Object, e As EventArgs) Handles btnImport.Click
|
||||||
BuildList()
|
If FinalData.Count > 0 Then Me.DialogResult = Windows.Forms.DialogResult.OK
|
||||||
If ImportData.Count > 0 Then Me.DialogResult = Windows.Forms.DialogResult.OK
|
|
||||||
Me.Close()
|
Me.Close()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub lstGames_ColumnClick(sender As Object, e As ColumnClickEventArgs) Handles lstGames.ColumnClick
|
||||||
|
iCurrentSort = e.Column
|
||||||
|
lstGames.ListViewItemSorter = New ListViewItemComparer(e.Column)
|
||||||
|
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 tmFilterTimer_Tick(sender As Object, ByVal e As EventArgs) Handles tmFilterTimer.Tick
|
||||||
|
LoadData(txtFilter.Text)
|
||||||
|
tmFilterTimer.Stop()
|
||||||
|
tmFilterTimer.Enabled = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
' Column Sorter
|
||||||
|
Class ListViewItemComparer
|
||||||
|
Implements IComparer
|
||||||
|
|
||||||
|
Private col As Integer
|
||||||
|
|
||||||
|
Public Sub New()
|
||||||
|
col = 0
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub New(ByVal column As Integer)
|
||||||
|
col = column
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function Compare(ByVal x As Object, ByVal y As Object) As Integer Implements IComparer.Compare
|
||||||
|
Return String.Compare(CType(x, ListViewItem).SubItems(col).Text, CType(y, ListViewItem).SubItems(col).Text)
|
||||||
|
End Function
|
||||||
End Class
|
End Class
|
||||||
Generated
+15
-2
@@ -25,6 +25,7 @@ Partial Class frmChooseGame
|
|||||||
Me.lblChoose = New System.Windows.Forms.Label()
|
Me.lblChoose = New System.Windows.Forms.Label()
|
||||||
Me.btnChoose = New System.Windows.Forms.Button()
|
Me.btnChoose = New System.Windows.Forms.Button()
|
||||||
Me.lstGameBox = New System.Windows.Forms.ListBox()
|
Me.lstGameBox = New System.Windows.Forms.ListBox()
|
||||||
|
Me.btnCancel = New System.Windows.Forms.Button()
|
||||||
Me.SuspendLayout()
|
Me.SuspendLayout()
|
||||||
'
|
'
|
||||||
'lblChoose
|
'lblChoose
|
||||||
@@ -38,9 +39,9 @@ Partial Class frmChooseGame
|
|||||||
'
|
'
|
||||||
'btnChoose
|
'btnChoose
|
||||||
'
|
'
|
||||||
Me.btnChoose.Location = New System.Drawing.Point(124, 135)
|
Me.btnChoose.Location = New System.Drawing.Point(72, 135)
|
||||||
Me.btnChoose.Name = "btnChoose"
|
Me.btnChoose.Name = "btnChoose"
|
||||||
Me.btnChoose.Size = New System.Drawing.Size(119, 23)
|
Me.btnChoose.Size = New System.Drawing.Size(90, 23)
|
||||||
Me.btnChoose.TabIndex = 2
|
Me.btnChoose.TabIndex = 2
|
||||||
Me.btnChoose.Text = "C&hoose Game"
|
Me.btnChoose.Text = "C&hoose Game"
|
||||||
Me.btnChoose.UseVisualStyleBackColor = True
|
Me.btnChoose.UseVisualStyleBackColor = True
|
||||||
@@ -51,13 +52,24 @@ Partial Class frmChooseGame
|
|||||||
Me.lstGameBox.Location = New System.Drawing.Point(15, 34)
|
Me.lstGameBox.Location = New System.Drawing.Point(15, 34)
|
||||||
Me.lstGameBox.Name = "lstGameBox"
|
Me.lstGameBox.Name = "lstGameBox"
|
||||||
Me.lstGameBox.Size = New System.Drawing.Size(228, 95)
|
Me.lstGameBox.Size = New System.Drawing.Size(228, 95)
|
||||||
|
Me.lstGameBox.Sorted = True
|
||||||
Me.lstGameBox.TabIndex = 1
|
Me.lstGameBox.TabIndex = 1
|
||||||
'
|
'
|
||||||
|
'btnCancel
|
||||||
|
'
|
||||||
|
Me.btnCancel.Location = New System.Drawing.Point(168, 135)
|
||||||
|
Me.btnCancel.Name = "btnCancel"
|
||||||
|
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
|
||||||
|
Me.btnCancel.TabIndex = 3
|
||||||
|
Me.btnCancel.Text = "&Cancel"
|
||||||
|
Me.btnCancel.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
'frmChooseGame
|
'frmChooseGame
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
Me.ClientSize = New System.Drawing.Size(255, 166)
|
Me.ClientSize = New System.Drawing.Size(255, 166)
|
||||||
|
Me.Controls.Add(Me.btnCancel)
|
||||||
Me.Controls.Add(Me.lstGameBox)
|
Me.Controls.Add(Me.lstGameBox)
|
||||||
Me.Controls.Add(Me.btnChoose)
|
Me.Controls.Add(Me.btnChoose)
|
||||||
Me.Controls.Add(Me.lblChoose)
|
Me.Controls.Add(Me.lblChoose)
|
||||||
@@ -75,4 +87,5 @@ Partial Class frmChooseGame
|
|||||||
Friend WithEvents lblChoose As System.Windows.Forms.Label
|
Friend WithEvents lblChoose As System.Windows.Forms.Label
|
||||||
Friend WithEvents btnChoose As System.Windows.Forms.Button
|
Friend WithEvents btnChoose As System.Windows.Forms.Button
|
||||||
Friend WithEvents lstGameBox As System.Windows.Forms.ListBox
|
Friend WithEvents lstGameBox As System.Windows.Forms.ListBox
|
||||||
|
Friend WithEvents btnCancel As Button
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
+30
-15
@@ -1,16 +1,17 @@
|
|||||||
Public Class frmChooseGame
|
Imports GBM.My.Resources
|
||||||
|
|
||||||
Private oProcess As mgrProcesses
|
Public Class frmChooseGame
|
||||||
|
|
||||||
|
Private oProcess As mgrProcessDetection
|
||||||
Private oGame As clsGame
|
Private oGame As clsGame
|
||||||
Private oGamesList As New List(Of KeyValuePair(Of String, String))
|
|
||||||
Private oGamesHash As New Hashtable
|
Private oGamesHash As New Hashtable
|
||||||
Private bGameSelected As Boolean = False
|
Private bGameSelected As Boolean = False
|
||||||
|
|
||||||
Property Process As mgrProcesses
|
Property Process As mgrProcessDetection
|
||||||
Get
|
Get
|
||||||
Return oProcess
|
Return oProcess
|
||||||
End Get
|
End Get
|
||||||
Set(value As mgrProcesses)
|
Set(value As mgrProcessDetection)
|
||||||
oProcess = value
|
oProcess = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
@@ -25,33 +26,43 @@
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private Sub FillComboBox()
|
Private Sub FillComboBox()
|
||||||
|
lstGameBox.ValueMember = "Key"
|
||||||
|
lstGameBox.DisplayMember = "Value"
|
||||||
|
|
||||||
For Each o As clsGame In Process.DuplicateList
|
For Each o As clsGame In Process.DuplicateList
|
||||||
oGamesList.Add(New KeyValuePair(Of String, String)(o.ID, o.Name))
|
lstGameBox.Items.Add(New KeyValuePair(Of String, String)(o.ID, o.Name))
|
||||||
oGamesHash.Add(o.ID, o)
|
oGamesHash.Add(o.ID, o)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
lstGameBox.DataSource = oGamesList
|
|
||||||
lstGameBox.ValueMember = "key"
|
|
||||||
lstGameBox.DisplayMember = "value"
|
|
||||||
lstGameBox.SelectedIndex = 0
|
lstGameBox.SelectedIndex = 0
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SaveSelection()
|
Private Sub SaveSelection()
|
||||||
oGame.ProcessPath = oProcess.GameInfo.ProcessPath
|
oGame.ProcessPath = oProcess.ProcessPath
|
||||||
mgrMonitorList.DoListUpdate(oGame)
|
mgrMonitorList.DoListUpdate(oGame)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub GetSelection()
|
Private Sub GetSelection()
|
||||||
Dim sSelectedGame As String
|
Dim oSelected As KeyValuePair(Of String, String) = lstGameBox.SelectedItem
|
||||||
sSelectedGame = CStr(lstGameBox.SelectedValue)
|
oGame = DirectCast(oGamesHash.Item(oSelected.Key), clsGame)
|
||||||
oGame = DirectCast(oGamesHash.Item(sSelectedGame), clsGame)
|
|
||||||
SaveSelection()
|
SaveSelection()
|
||||||
bGameSelected = True
|
bGameSelected = True
|
||||||
|
Me.DialogResult = DialogResult.OK
|
||||||
Me.Close()
|
Me.Close()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SetForm()
|
||||||
|
'Set Form Name
|
||||||
|
Me.Text = frmChooseGame_FormName
|
||||||
|
|
||||||
|
'Set Form Text
|
||||||
|
btnCancel.Text = frmChooseGame_btnCancel
|
||||||
|
btnChoose.Text = frmChooseGame_btnChoose
|
||||||
|
lblChoose.Text = frmChooseGame_lblChoose
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub frmChooseGame_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
Private Sub frmChooseGame_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
||||||
|
SetForm()
|
||||||
FillComboBox()
|
FillComboBox()
|
||||||
Me.Focus()
|
Me.Focus()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -62,7 +73,11 @@
|
|||||||
|
|
||||||
Private Sub frmChooseGame_FormClosing(sender As System.Object, e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
|
Private Sub frmChooseGame_FormClosing(sender As System.Object, e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
|
||||||
If bGameSelected = False Then
|
If bGameSelected = False Then
|
||||||
e.Cancel = True
|
Me.DialogResult = DialogResult.Cancel
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click
|
||||||
|
Me.Close()
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
+52
-16
@@ -22,35 +22,30 @@ Partial Class frmFileFolderSearch
|
|||||||
'Do not modify it using the code editor.
|
'Do not modify it using the code editor.
|
||||||
<System.Diagnostics.DebuggerStepThrough()> _
|
<System.Diagnostics.DebuggerStepThrough()> _
|
||||||
Private Sub InitializeComponent()
|
Private Sub InitializeComponent()
|
||||||
Me.pgbProgress = New System.Windows.Forms.ProgressBar()
|
|
||||||
Me.txtCurrentLocation = New System.Windows.Forms.TextBox()
|
Me.txtCurrentLocation = New System.Windows.Forms.TextBox()
|
||||||
Me.btnCancel = New System.Windows.Forms.Button()
|
Me.btnCancel = New System.Windows.Forms.Button()
|
||||||
Me.bwSearch = New System.ComponentModel.BackgroundWorker()
|
Me.bwSearch = New System.ComponentModel.BackgroundWorker()
|
||||||
|
Me.lstResults = New System.Windows.Forms.ListBox()
|
||||||
|
Me.btnOk = New System.Windows.Forms.Button()
|
||||||
|
Me.lblResults = New System.Windows.Forms.Label()
|
||||||
|
Me.cboDrive = New System.Windows.Forms.ComboBox()
|
||||||
Me.SuspendLayout()
|
Me.SuspendLayout()
|
||||||
'
|
'
|
||||||
'pgbProgress
|
|
||||||
'
|
|
||||||
Me.pgbProgress.Location = New System.Drawing.Point(12, 12)
|
|
||||||
Me.pgbProgress.MarqueeAnimationSpeed = 0
|
|
||||||
Me.pgbProgress.Name = "pgbProgress"
|
|
||||||
Me.pgbProgress.Size = New System.Drawing.Size(460, 23)
|
|
||||||
Me.pgbProgress.TabIndex = 0
|
|
||||||
'
|
|
||||||
'txtCurrentLocation
|
'txtCurrentLocation
|
||||||
'
|
'
|
||||||
Me.txtCurrentLocation.Location = New System.Drawing.Point(12, 43)
|
Me.txtCurrentLocation.Location = New System.Drawing.Point(102, 13)
|
||||||
Me.txtCurrentLocation.Name = "txtCurrentLocation"
|
Me.txtCurrentLocation.Name = "txtCurrentLocation"
|
||||||
Me.txtCurrentLocation.ReadOnly = True
|
Me.txtCurrentLocation.ReadOnly = True
|
||||||
Me.txtCurrentLocation.Size = New System.Drawing.Size(379, 20)
|
Me.txtCurrentLocation.Size = New System.Drawing.Size(370, 20)
|
||||||
Me.txtCurrentLocation.TabIndex = 0
|
Me.txtCurrentLocation.TabIndex = 0
|
||||||
Me.txtCurrentLocation.TabStop = False
|
Me.txtCurrentLocation.TabStop = False
|
||||||
'
|
'
|
||||||
'btnCancel
|
'btnCancel
|
||||||
'
|
'
|
||||||
Me.btnCancel.Location = New System.Drawing.Point(397, 41)
|
Me.btnCancel.Location = New System.Drawing.Point(397, 146)
|
||||||
Me.btnCancel.Name = "btnCancel"
|
Me.btnCancel.Name = "btnCancel"
|
||||||
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
|
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
|
||||||
Me.btnCancel.TabIndex = 0
|
Me.btnCancel.TabIndex = 4
|
||||||
Me.btnCancel.Text = "&Cancel"
|
Me.btnCancel.Text = "&Cancel"
|
||||||
Me.btnCancel.UseVisualStyleBackColor = True
|
Me.btnCancel.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
@@ -58,14 +53,52 @@ Partial Class frmFileFolderSearch
|
|||||||
'
|
'
|
||||||
Me.bwSearch.WorkerSupportsCancellation = True
|
Me.bwSearch.WorkerSupportsCancellation = True
|
||||||
'
|
'
|
||||||
|
'lstResults
|
||||||
|
'
|
||||||
|
Me.lstResults.FormattingEnabled = True
|
||||||
|
Me.lstResults.Location = New System.Drawing.Point(12, 58)
|
||||||
|
Me.lstResults.Name = "lstResults"
|
||||||
|
Me.lstResults.Size = New System.Drawing.Size(460, 82)
|
||||||
|
Me.lstResults.TabIndex = 2
|
||||||
|
'
|
||||||
|
'btnOk
|
||||||
|
'
|
||||||
|
Me.btnOk.Location = New System.Drawing.Point(316, 146)
|
||||||
|
Me.btnOk.Name = "btnOk"
|
||||||
|
Me.btnOk.Size = New System.Drawing.Size(75, 23)
|
||||||
|
Me.btnOk.TabIndex = 3
|
||||||
|
Me.btnOk.Text = "&OK"
|
||||||
|
Me.btnOk.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'lblResults
|
||||||
|
'
|
||||||
|
Me.lblResults.Location = New System.Drawing.Point(9, 42)
|
||||||
|
Me.lblResults.Name = "lblResults"
|
||||||
|
Me.lblResults.Size = New System.Drawing.Size(463, 13)
|
||||||
|
Me.lblResults.TabIndex = 1
|
||||||
|
Me.lblResults.Text = "Search Results"
|
||||||
|
Me.lblResults.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||||
|
'
|
||||||
|
'cboDrive
|
||||||
|
'
|
||||||
|
Me.cboDrive.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||||
|
Me.cboDrive.FormattingEnabled = True
|
||||||
|
Me.cboDrive.Location = New System.Drawing.Point(12, 13)
|
||||||
|
Me.cboDrive.Name = "cboDrive"
|
||||||
|
Me.cboDrive.Size = New System.Drawing.Size(85, 21)
|
||||||
|
Me.cboDrive.TabIndex = 5
|
||||||
|
'
|
||||||
'frmFileFolderSearch
|
'frmFileFolderSearch
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
Me.ClientSize = New System.Drawing.Size(484, 77)
|
Me.ClientSize = New System.Drawing.Size(484, 181)
|
||||||
|
Me.Controls.Add(Me.cboDrive)
|
||||||
|
Me.Controls.Add(Me.lblResults)
|
||||||
|
Me.Controls.Add(Me.btnOk)
|
||||||
|
Me.Controls.Add(Me.lstResults)
|
||||||
Me.Controls.Add(Me.btnCancel)
|
Me.Controls.Add(Me.btnCancel)
|
||||||
Me.Controls.Add(Me.txtCurrentLocation)
|
Me.Controls.Add(Me.txtCurrentLocation)
|
||||||
Me.Controls.Add(Me.pgbProgress)
|
|
||||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||||
Me.MaximizeBox = False
|
Me.MaximizeBox = False
|
||||||
Me.MinimizeBox = False
|
Me.MinimizeBox = False
|
||||||
@@ -77,8 +110,11 @@ Partial Class frmFileFolderSearch
|
|||||||
Me.PerformLayout()
|
Me.PerformLayout()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Friend WithEvents pgbProgress As System.Windows.Forms.ProgressBar
|
|
||||||
Friend WithEvents txtCurrentLocation As System.Windows.Forms.TextBox
|
Friend WithEvents txtCurrentLocation As System.Windows.Forms.TextBox
|
||||||
Friend WithEvents btnCancel As System.Windows.Forms.Button
|
Friend WithEvents btnCancel As System.Windows.Forms.Button
|
||||||
Friend WithEvents bwSearch As System.ComponentModel.BackgroundWorker
|
Friend WithEvents bwSearch As System.ComponentModel.BackgroundWorker
|
||||||
|
Friend WithEvents lstResults As System.Windows.Forms.ListBox
|
||||||
|
Friend WithEvents btnOk As System.Windows.Forms.Button
|
||||||
|
Friend WithEvents lblResults As System.Windows.Forms.Label
|
||||||
|
Friend WithEvents cboDrive As System.Windows.Forms.ComboBox
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1,15 +1,36 @@
|
|||||||
Imports System.IO
|
Imports GBM.My.Resources
|
||||||
|
Imports System.IO
|
||||||
|
|
||||||
Public Class frmFileFolderSearch
|
Public Class frmFileFolderSearch
|
||||||
Private sSearchItem As String
|
Private sSearchItem As String
|
||||||
|
Private sGameName As String = String.Empty
|
||||||
|
Private bIsLoading As Boolean
|
||||||
Private bIsFolder As Boolean
|
Private bIsFolder As Boolean
|
||||||
Private sFoundItem As String
|
Private sFoundItem As String
|
||||||
Private oDrives As List(Of DriveInfo)
|
Private oDrives As List(Of DriveInfo)
|
||||||
Private iCurrentDrive As Integer
|
|
||||||
Private oSearchDrive As DirectoryInfo
|
Private oSearchDrive As DirectoryInfo
|
||||||
Dim bShutdown As Boolean = False
|
Dim bShutdown As Boolean = False
|
||||||
|
|
||||||
|
Private Enum eStopStatus As Integer
|
||||||
|
Cancel = 1
|
||||||
|
ChangeDrive = 2
|
||||||
|
FoundResult = 3
|
||||||
|
FinishedDrive = 4
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
Private iStopStatus As eStopStatus
|
||||||
|
|
||||||
Delegate Sub UpdateInfoCallBack(ByVal sCurrentFolder As String)
|
Delegate Sub UpdateInfoCallBack(ByVal sCurrentFolder As String)
|
||||||
|
Delegate Sub UpdateResultsCallBack(ByVal sItem As String)
|
||||||
|
|
||||||
|
Public Property GameName As String
|
||||||
|
Get
|
||||||
|
Return sGameName
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
sGameName = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Public Property SearchItem As String
|
Public Property SearchItem As String
|
||||||
Get
|
Get
|
||||||
@@ -47,19 +68,38 @@ Public Class frmFileFolderSearch
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub UpdateResults(ByVal sItem As String)
|
||||||
|
If lstResults.InvokeRequired = True Then
|
||||||
|
Dim d As New UpdateInfoCallBack(AddressOf UpdateResults)
|
||||||
|
Me.Invoke(d, New Object() {sItem})
|
||||||
|
Else
|
||||||
|
'It's possible the same location will be searched twice when using Linux. Filter out duplicate results
|
||||||
|
If Not lstResults.Items.Contains(sItem) Then
|
||||||
|
lstResults.Items.Add(sItem)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Function SearchDirectory(ByVal dir As DirectoryInfo, ByVal sDirectoryName As String) As String
|
Private Function SearchDirectory(ByVal dir As DirectoryInfo, ByVal sDirectoryName As String) As String
|
||||||
Dim sSubSearch As String = String.Empty
|
Dim sSubSearch As String = String.Empty
|
||||||
|
Dim sFoundItem As String = String.Empty
|
||||||
|
|
||||||
If bwSearch.CancellationPending Then
|
If bwSearch.CancellationPending Then
|
||||||
Return "Cancel"
|
Return "Cancel"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'Ignore Symlinks
|
||||||
|
If (dir.Attributes And FileAttributes.ReparsePoint) = FileAttributes.ReparsePoint Then
|
||||||
|
Return String.Empty
|
||||||
|
End If
|
||||||
|
|
||||||
UpdateInfo(dir.FullName)
|
UpdateInfo(dir.FullName)
|
||||||
|
|
||||||
Try
|
Try
|
||||||
'Search Current Directory
|
'Search Current Directory
|
||||||
If dir.GetDirectories(sDirectoryName).Length > 0 Then
|
If dir.GetDirectories(sDirectoryName).Length > 0 Then
|
||||||
Return dir.FullName & "\" & sDirectoryName
|
sFoundItem = dir.FullName & Path.DirectorySeparatorChar & sDirectoryName
|
||||||
|
UpdateResults(sFoundItem)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Search Sub Directory
|
'Search Sub Directory
|
||||||
@@ -81,23 +121,31 @@ Public Class frmFileFolderSearch
|
|||||||
|
|
||||||
Private Function SearchFile(ByVal dir As DirectoryInfo, ByVal sFileName As String) As String
|
Private Function SearchFile(ByVal dir As DirectoryInfo, ByVal sFileName As String) As String
|
||||||
Dim sSubSearch As String = String.Empty
|
Dim sSubSearch As String = String.Empty
|
||||||
|
Dim sFoundItem As String = String.Empty
|
||||||
|
|
||||||
If bwSearch.CancellationPending Then
|
If bwSearch.CancellationPending Then
|
||||||
Return "Cancel"
|
Return "Cancel"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'Ignore Symlinks
|
||||||
|
If (dir.Attributes And FileAttributes.ReparsePoint) = FileAttributes.ReparsePoint Then
|
||||||
|
Return String.Empty
|
||||||
|
End If
|
||||||
|
|
||||||
UpdateInfo(dir.FullName)
|
UpdateInfo(dir.FullName)
|
||||||
|
|
||||||
Try
|
Try
|
||||||
'Search Current Directory
|
'Search Current Directory
|
||||||
If dir.GetFiles(sFileName).Length > 0 Then
|
If dir.GetFiles(sFileName).Length > 0 Then
|
||||||
Return dir.FullName & "\" & sFileName
|
sFoundItem = Path.GetDirectoryName(dir.FullName & Path.DirectorySeparatorChar & sFileName)
|
||||||
|
UpdateResults(sFoundItem)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Search Sub Directory
|
'Search Sub Directory
|
||||||
Dim subdirs() As DirectoryInfo = dir.GetDirectories("*")
|
Dim subdirs() As DirectoryInfo = dir.GetDirectories("*")
|
||||||
For Each newDir As DirectoryInfo In subdirs
|
For Each newDir As DirectoryInfo In subdirs
|
||||||
sSubSearch = SearchFile(newDir, sFileName)
|
sSubSearch = SearchFile(newDir, sFileName)
|
||||||
|
|
||||||
If sSubSearch <> String.Empty Then
|
If sSubSearch <> String.Empty Then
|
||||||
Return sSubSearch
|
Return sSubSearch
|
||||||
End If
|
End If
|
||||||
@@ -112,47 +160,79 @@ Public Class frmFileFolderSearch
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub GetDrives()
|
Private Sub GetDrives()
|
||||||
|
Dim oComboItems As New List(Of KeyValuePair(Of Integer, String))
|
||||||
|
Dim iCount As Integer = 0
|
||||||
|
|
||||||
|
'cboDrive
|
||||||
|
cboDrive.ValueMember = "Key"
|
||||||
|
cboDrive.DisplayMember = "Value"
|
||||||
|
|
||||||
oDrives = New List(Of DriveInfo)
|
oDrives = New List(Of DriveInfo)
|
||||||
For Each oDrive As DriveInfo In My.Computer.FileSystem.Drives
|
For Each oDrive As DriveInfo In My.Computer.FileSystem.Drives
|
||||||
If oDrive.DriveType = IO.DriveType.Fixed Then
|
If oDrive.DriveType = IO.DriveType.Fixed Then
|
||||||
oDrives.Add(oDrive)
|
oDrives.Add(oDrive)
|
||||||
|
oComboItems.Add(New KeyValuePair(Of Integer, String)(iCount, oDrive.RootDirectory.ToString))
|
||||||
|
iCount += 1
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
cboDrive.DataSource = oComboItems
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Search(ByVal oDrive As DriveInfo)
|
Private Sub Search(ByVal oDrive As DriveInfo)
|
||||||
pgbProgress.Style = ProgressBarStyle.Marquee
|
iStopStatus = eStopStatus.FinishedDrive
|
||||||
pgbProgress.MarqueeAnimationSpeed = 5
|
|
||||||
oSearchDrive = oDrive.RootDirectory
|
oSearchDrive = oDrive.RootDirectory
|
||||||
bwSearch.RunWorkerAsync()
|
bwSearch.RunWorkerAsync()
|
||||||
iCurrentDrive += 1
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub EndSearch()
|
Private Sub EndSearch()
|
||||||
Dim oResult As MsgBoxResult
|
|
||||||
pgbProgress.MarqueeAnimationSpeed = 0
|
|
||||||
|
|
||||||
If FoundItem = "Cancel" Then FoundItem = String.Empty
|
If FoundItem = "Cancel" Then FoundItem = String.Empty
|
||||||
|
|
||||||
If oDrives.Count > iCurrentDrive And FoundItem = String.Empty Then
|
Select Case iStopStatus
|
||||||
oResult = MsgBox("The location was not found on the " & oSearchDrive.Root.ToString & _
|
Case eStopStatus.Cancel
|
||||||
" drive. Do you wish to search the " & oDrives(iCurrentDrive).RootDirectory.ToString & _
|
SearchComplete(frmFileFolderSearch_SearchCancel)
|
||||||
" drive?", MsgBoxStyle.YesNo, "Game Backup Monitor")
|
Case eStopStatus.ChangeDrive
|
||||||
If oResult = MsgBoxResult.Yes Then
|
Search(oDrives(cboDrive.SelectedValue))
|
||||||
Search(oDrives(iCurrentDrive))
|
Case eStopStatus.FinishedDrive
|
||||||
|
'Attempt to move onto the next drive it one exists and there's been no results
|
||||||
|
If oDrives.Count > 1 And lstResults.Items.Count = 0 Then
|
||||||
|
If cboDrive.SelectedIndex = (cboDrive.Items.Count - 1) Then
|
||||||
|
cboDrive.SelectedIndex = 0
|
||||||
Else
|
Else
|
||||||
bShutdown = True
|
cboDrive.SelectedIndex = cboDrive.SelectedIndex + 1
|
||||||
Me.Close()
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
SearchComplete(frmFileFolderSearch_SearchComplete)
|
||||||
|
End If
|
||||||
|
Case eStopStatus.FoundResult
|
||||||
|
FoundItem = lstResults.SelectedItem.ToString
|
||||||
bShutdown = True
|
bShutdown = True
|
||||||
Me.Close()
|
Me.Close()
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SearchComplete(ByVal sStopMessage As String)
|
||||||
|
txtCurrentLocation.Text = sStopMessage
|
||||||
|
If lstResults.Items.Count > 0 Then
|
||||||
|
lstResults.SelectedIndex = 0
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SetForm()
|
||||||
|
'Set Form Name
|
||||||
|
Me.Text = frmFileFolderSearch_FormName
|
||||||
|
|
||||||
|
'Set Form Text
|
||||||
|
lblResults.Text = frmFileFolderSearch_lblResults
|
||||||
|
btnOk.Text = frmFileFolderSearch_btnOk
|
||||||
|
btnCancel.Text = frmFileFolderSearch_btnCancel
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub frmFileFolderSearch_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
Private Sub frmFileFolderSearch_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
|
bIsLoading = True
|
||||||
|
SetForm()
|
||||||
GetDrives()
|
GetDrives()
|
||||||
Search(oDrives(iCurrentDrive))
|
bIsLoading = False
|
||||||
|
Search(oDrives(0))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub bwSearch_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles bwSearch.DoWork
|
Private Sub bwSearch_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles bwSearch.DoWork
|
||||||
@@ -168,11 +248,54 @@ Public Class frmFileFolderSearch
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click
|
Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click
|
||||||
|
If bwSearch.IsBusy Then
|
||||||
|
iStopStatus = eStopStatus.Cancel
|
||||||
bwSearch.CancelAsync()
|
bwSearch.CancelAsync()
|
||||||
|
Else
|
||||||
|
bShutdown = True
|
||||||
|
Me.Close()
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub frmFileFolderSearch_FormClosing(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosing
|
Private Sub frmFileFolderSearch_FormClosing(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosing
|
||||||
bwSearch.CancelAsync()
|
|
||||||
If Not bShutdown Then e.Cancel = True
|
If Not bShutdown Then e.Cancel = True
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnOk_Click(sender As Object, e As EventArgs) Handles btnOk.Click
|
||||||
|
Dim sItem As String
|
||||||
|
|
||||||
|
If lstResults.SelectedItems.Count = 1 Then
|
||||||
|
sItem = lstResults.SelectedItem.ToString
|
||||||
|
If mgrCommon.ShowMessage(mgrPath_ConfirmPathCorrect, New String() {GameName, sItem}, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
|
If bwSearch.IsBusy Then
|
||||||
|
iStopStatus = eStopStatus.FoundResult
|
||||||
|
bwSearch.CancelAsync()
|
||||||
|
Else
|
||||||
|
FoundItem = sItem
|
||||||
|
bShutdown = True
|
||||||
|
Me.Close()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub cboDrive_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboDrive.SelectedIndexChanged
|
||||||
|
If Not bIsLoading Then
|
||||||
|
Dim oResult As MsgBoxResult
|
||||||
|
|
||||||
|
oResult = mgrCommon.ShowMessage(frmFileFolderSearch_SwitchDrives, New String() {oDrives(cboDrive.SelectedValue).RootDirectory.ToString}, MsgBoxStyle.YesNo)
|
||||||
|
|
||||||
|
If oResult = MsgBoxResult.Yes Then
|
||||||
|
If bwSearch.IsBusy Then
|
||||||
|
iStopStatus = eStopStatus.ChangeDrive
|
||||||
|
bwSearch.CancelAsync()
|
||||||
|
Else
|
||||||
|
Search(oDrives(cboDrive.SelectedValue))
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
iStopStatus = eStopStatus.FinishedDrive
|
||||||
|
SearchComplete(frmFileFolderSearch_SearchCancel)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
Generated
+562
@@ -0,0 +1,562 @@
|
|||||||
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||||
|
Partial Class frmFilter
|
||||||
|
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.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.lblIncludeTags = New System.Windows.Forms.Label()
|
||||||
|
Me.lblTags = New System.Windows.Forms.Label()
|
||||||
|
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.lblNot = New System.Windows.Forms.Label()
|
||||||
|
Me.chkNot = New System.Windows.Forms.CheckBox()
|
||||||
|
Me.cboBoolFilter = 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.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()
|
||||||
|
CType(Me.numFilter, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
Me.grpFilterType.SuspendLayout()
|
||||||
|
Me.grpSorting.SuspendLayout()
|
||||||
|
Me.grpSortOptions.SuspendLayout()
|
||||||
|
Me.SuspendLayout()
|
||||||
|
'
|
||||||
|
'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.lblIncludeTags)
|
||||||
|
Me.grpTagFilter.Controls.Add(Me.lblTags)
|
||||||
|
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, 236)
|
||||||
|
Me.grpTagFilter.Name = "grpTagFilter"
|
||||||
|
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, 146)
|
||||||
|
Me.grpTagOptions.Name = "grpTagOptions"
|
||||||
|
Me.grpTagOptions.Size = New System.Drawing.Size(150, 46)
|
||||||
|
Me.grpTagOptions.TabIndex = 6
|
||||||
|
Me.grpTagOptions.TabStop = False
|
||||||
|
Me.grpTagOptions.Text = "Options"
|
||||||
|
'
|
||||||
|
'optAll
|
||||||
|
'
|
||||||
|
Me.optAll.Location = New System.Drawing.Point(77, 19)
|
||||||
|
Me.optAll.Name = "optAll"
|
||||||
|
Me.optAll.Size = New System.Drawing.Size(63, 17)
|
||||||
|
Me.optAll.TabIndex = 1
|
||||||
|
Me.optAll.TabStop = True
|
||||||
|
Me.optAll.Text = "All Tags"
|
||||||
|
Me.optAll.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'optAny
|
||||||
|
'
|
||||||
|
Me.optAny.Checked = True
|
||||||
|
Me.optAny.Location = New System.Drawing.Point(6, 19)
|
||||||
|
Me.optAny.Name = "optAny"
|
||||||
|
Me.optAny.Size = New System.Drawing.Size(65, 17)
|
||||||
|
Me.optAny.TabIndex = 0
|
||||||
|
Me.optAny.TabStop = True
|
||||||
|
Me.optAny.Text = "Any Tag"
|
||||||
|
Me.optAny.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'lblIncludeTags
|
||||||
|
'
|
||||||
|
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(165, 16)
|
||||||
|
Me.lblTags.Name = "lblTags"
|
||||||
|
Me.lblTags.Size = New System.Drawing.Size(77, 13)
|
||||||
|
Me.lblTags.TabIndex = 0
|
||||||
|
Me.lblTags.Text = "Available Tags"
|
||||||
|
'
|
||||||
|
'btnIncludeRemove
|
||||||
|
'
|
||||||
|
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
|
||||||
|
'
|
||||||
|
'btnIncludeAdd
|
||||||
|
'
|
||||||
|
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
|
||||||
|
'
|
||||||
|
'lstIncludeTags
|
||||||
|
'
|
||||||
|
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(152, 32)
|
||||||
|
Me.lstTags.Name = "lstTags"
|
||||||
|
Me.lstTags.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
|
||||||
|
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(347, 526)
|
||||||
|
Me.btnOK.Name = "btnOK"
|
||||||
|
Me.btnOK.Size = New System.Drawing.Size(75, 23)
|
||||||
|
Me.btnOK.TabIndex = 6
|
||||||
|
Me.btnOK.Text = "&OK"
|
||||||
|
Me.btnOK.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'grpGameFilter
|
||||||
|
'
|
||||||
|
Me.grpGameFilter.Controls.Add(Me.lblNot)
|
||||||
|
Me.grpGameFilter.Controls.Add(Me.chkNot)
|
||||||
|
Me.grpGameFilter.Controls.Add(Me.cboBoolFilter)
|
||||||
|
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(410, 172)
|
||||||
|
Me.grpGameFilter.TabIndex = 1
|
||||||
|
Me.grpGameFilter.TabStop = False
|
||||||
|
'
|
||||||
|
'lblNot
|
||||||
|
'
|
||||||
|
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
|
||||||
|
'
|
||||||
|
'cboBoolFilter
|
||||||
|
'
|
||||||
|
Me.cboBoolFilter.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||||
|
Me.cboBoolFilter.FormattingEnabled = True
|
||||||
|
Me.cboBoolFilter.Location = New System.Drawing.Point(187, 36)
|
||||||
|
Me.cboBoolFilter.Name = "cboBoolFilter"
|
||||||
|
Me.cboBoolFilter.Size = New System.Drawing.Size(136, 21)
|
||||||
|
Me.cboBoolFilter.TabIndex = 3
|
||||||
|
'
|
||||||
|
'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.Checked = True
|
||||||
|
Me.optOr.Location = New System.Drawing.Point(6, 19)
|
||||||
|
Me.optOr.Name = "optOr"
|
||||||
|
Me.optOr.Size = New System.Drawing.Size(44, 17)
|
||||||
|
Me.optOr.TabIndex = 0
|
||||||
|
Me.optOr.TabStop = True
|
||||||
|
Me.optOr.Text = "Any"
|
||||||
|
Me.optOr.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'optAnd
|
||||||
|
'
|
||||||
|
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 = 1
|
||||||
|
Me.optAnd.Text = "All"
|
||||||
|
Me.optAnd.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'txtStringFilter
|
||||||
|
'
|
||||||
|
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
|
||||||
|
'
|
||||||
|
'grpSorting
|
||||||
|
'
|
||||||
|
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"
|
||||||
|
'
|
||||||
|
'grpSortOptions
|
||||||
|
'
|
||||||
|
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"
|
||||||
|
'
|
||||||
|
'optSortAsc
|
||||||
|
'
|
||||||
|
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
|
||||||
|
'
|
||||||
|
'optSortDesc
|
||||||
|
'
|
||||||
|
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
|
||||||
|
'
|
||||||
|
'lblSortFields
|
||||||
|
'
|
||||||
|
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(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.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||||
|
Me.MaximizeBox = False
|
||||||
|
Me.MinimizeBox = False
|
||||||
|
Me.Name = "frmFilter"
|
||||||
|
Me.ShowIcon = False
|
||||||
|
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||||
|
Me.Text = "Custom Filter"
|
||||||
|
Me.grpTagFilter.ResumeLayout(False)
|
||||||
|
Me.grpTagFilter.PerformLayout()
|
||||||
|
Me.grpTagOptions.ResumeLayout(False)
|
||||||
|
Me.grpGameFilter.ResumeLayout(False)
|
||||||
|
Me.grpGameFilter.PerformLayout()
|
||||||
|
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 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 lblIncludeTags As System.Windows.Forms.Label
|
||||||
|
Friend WithEvents lblTags As System.Windows.Forms.Label
|
||||||
|
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 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 cboBoolFilter 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
|
||||||
@@ -117,7 +117,4 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</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>
|
</root>
|
||||||
@@ -0,0 +1,695 @@
|
|||||||
|
Imports GBM.My.Resources
|
||||||
|
|
||||||
|
Public Class frmFilter
|
||||||
|
|
||||||
|
Public Enum eFilterType As Integer
|
||||||
|
BaseFilter = 1
|
||||||
|
AnyTag = 2
|
||||||
|
AllTags = 3
|
||||||
|
NoTags = 4
|
||||||
|
End Enum
|
||||||
|
|
||||||
|
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 Property GameFilters As List(Of clsGameFilter)
|
||||||
|
Get
|
||||||
|
Return oGameFilters
|
||||||
|
End Get
|
||||||
|
Set(value As List(Of clsGameFilter))
|
||||||
|
oGameFilters = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property IncludeTagFilters As List(Of clsTag)
|
||||||
|
Get
|
||||||
|
Return oIncludeTagFilters
|
||||||
|
End Get
|
||||||
|
Set(value As List(Of clsTag))
|
||||||
|
oIncludeTagFilters = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
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)
|
||||||
|
lst.Items.Add(oData)
|
||||||
|
lstTags.Items.Remove(oData)
|
||||||
|
ElseIf lstTags.SelectedItems.Count > 1 Then
|
||||||
|
oTags = New List(Of KeyValuePair(Of String, String))
|
||||||
|
|
||||||
|
For Each oData In lstTags.SelectedItems
|
||||||
|
oTags.Add(oData)
|
||||||
|
Next
|
||||||
|
|
||||||
|
For Each kp As KeyValuePair(Of String, String) In oTags
|
||||||
|
lst.Items.Add(kp)
|
||||||
|
lstTags.Items.Remove(kp)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RemoveTag(ByRef lst As ListBox)
|
||||||
|
Dim oData As KeyValuePair(Of String, String)
|
||||||
|
Dim oTags As List(Of KeyValuePair(Of String, String))
|
||||||
|
|
||||||
|
If lst.SelectedItems.Count = 1 Then
|
||||||
|
oData = lst.SelectedItems(0)
|
||||||
|
lst.Items.Remove(oData)
|
||||||
|
lstTags.Items.Add(oData)
|
||||||
|
ElseIf lst.SelectedItems.Count > 1 Then
|
||||||
|
oTags = New List(Of KeyValuePair(Of String, String))
|
||||||
|
|
||||||
|
For Each oData In lst.SelectedItems
|
||||||
|
oTags.Add(oData)
|
||||||
|
Next
|
||||||
|
|
||||||
|
For Each kp As KeyValuePair(Of String, String) In oTags
|
||||||
|
lst.Items.Remove(kp)
|
||||||
|
lstTags.Items.Add(kp)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
'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)
|
||||||
|
|
||||||
|
'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)
|
||||||
|
|
||||||
|
'Handle Data
|
||||||
|
hshTags = mgrTags.ReadTags()
|
||||||
|
|
||||||
|
'Handle Lists
|
||||||
|
lstTags.Items.Clear()
|
||||||
|
lstIncludeTags.Items.Clear()
|
||||||
|
lstExcludeTags.Items.Clear()
|
||||||
|
|
||||||
|
lstTags.ValueMember = "Key"
|
||||||
|
lstTags.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)
|
||||||
|
oData = New KeyValuePair(Of String, String)(oTag.ID, oTag.Name)
|
||||||
|
lstTags.Items.Add(oData)
|
||||||
|
Next
|
||||||
|
|
||||||
|
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
|
||||||
|
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 oFilterType As clsGameFilterField.eDataType = DirectCast(cboFilterField.SelectedValue, clsGameFilterField).Type
|
||||||
|
|
||||||
|
'Reset
|
||||||
|
cboNumericOps.SelectedIndex = 0
|
||||||
|
cboBoolFilter.SelectedIndex = 0
|
||||||
|
numFilter.Value = 0
|
||||||
|
txtStringFilter.Text = String.Empty
|
||||||
|
chkNot.Checked = False
|
||||||
|
|
||||||
|
'Reset Visibilty
|
||||||
|
cboBoolFilter.Visible = False
|
||||||
|
cboNumericOps.Visible = False
|
||||||
|
numFilter.Visible = False
|
||||||
|
txtStringFilter.Visible = False
|
||||||
|
|
||||||
|
'Set Visiblity
|
||||||
|
Select Case oFilterType
|
||||||
|
Case clsGameFilterField.eDataType.fString
|
||||||
|
txtStringFilter.Visible = True
|
||||||
|
Case clsGameFilterField.eDataType.fNumeric
|
||||||
|
cboNumericOps.Visible = True
|
||||||
|
numFilter.Visible = True
|
||||||
|
txtStringFilter.Visible = False
|
||||||
|
Case clsGameFilterField.eDataType.fBool
|
||||||
|
cboBoolFilter.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
|
||||||
|
oFilter.Data = cboBoolFilter.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 chkGameInfo.Checked Then
|
||||||
|
'Set Filter Type(s)
|
||||||
|
eCurrentFilterType = eFilterType.BaseFilter
|
||||||
|
bAndOperator = optAnd.Checked
|
||||||
|
End If
|
||||||
|
|
||||||
|
If chkTag.Checked Then
|
||||||
|
'Set Tags
|
||||||
|
IncludeTagFilters.Clear()
|
||||||
|
For Each oData In lstIncludeTags.Items
|
||||||
|
oTag = DirectCast(hshTags(oData.Value), clsTag)
|
||||||
|
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 IncludeTagFilters.Count = 0 And ExcludeTagFilters.Count = 0 Then
|
||||||
|
eCurrentFilterType = eFilterType.NoTags
|
||||||
|
ElseIf optAll.Checked Then
|
||||||
|
eCurrentFilterType = eFilterType.AllTags
|
||||||
|
Else
|
||||||
|
eCurrentFilterType = eFilterType.AnyTag
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Sorting
|
||||||
|
If optSortAsc.Checked Then
|
||||||
|
bSortAsc = True
|
||||||
|
Else
|
||||||
|
bSortAsc = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
sSortField = cboSortField.SelectedValue
|
||||||
|
|
||||||
|
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))
|
||||||
|
Dim oBoolOperators As New List(Of KeyValuePair(Of Boolean, String))
|
||||||
|
|
||||||
|
'cboBoolFilter
|
||||||
|
cboBoolFilter.ValueMember = "Key"
|
||||||
|
cboBoolFilter.DisplayMember = "Value"
|
||||||
|
|
||||||
|
oBoolOperators.Add(New KeyValuePair(Of Boolean, String)(True, frmFilter_cboBoolFilterEnabled))
|
||||||
|
oBoolOperators.Add(New KeyValuePair(Of Boolean, String)(False, frmFilter_cboBoolFilterDisabled))
|
||||||
|
|
||||||
|
cboBoolFilter.DataSource = oBoolOperators
|
||||||
|
|
||||||
|
'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
|
||||||
|
|
||||||
|
'Set Form Text
|
||||||
|
optOr.Text = frmFilter_optOr
|
||||||
|
optAnd.Text = frmFilter_optAnd
|
||||||
|
grpFilterType.Text = frmFilter_grpFilterType
|
||||||
|
optAll.Text = frmFilter_optAll
|
||||||
|
optAny.Text = frmFilter_optAny
|
||||||
|
lblIncludeTags.Text = frmFilter_lblIncludeTags
|
||||||
|
lblExcludeTags.Text = frmFilter_lblExcludeTags
|
||||||
|
lblTags.Text = frmFilter_lblTags
|
||||||
|
btnIncludeRemove.Text = frmFilter_btnIncludeRemove
|
||||||
|
btnIncludeAdd.Text = frmFilter_btnIncludeAdd
|
||||||
|
btnExcludeRemove.Text = frmFilter_btnExcludeRemove
|
||||||
|
btnExcludeAdd.Text = frmFilter_btnExcludeAdd
|
||||||
|
btnOK.Text = frmFilter_btnOK
|
||||||
|
grpTagOptions.Text = frmFilter_grpTagOptions
|
||||||
|
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()
|
||||||
|
LoadFilterFields()
|
||||||
|
LoadCombos()
|
||||||
|
LoadTagData()
|
||||||
|
LoadExistingFilters()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnOK_Click(sender As Object, e As EventArgs) Handles btnOK.Click
|
||||||
|
GetFilters()
|
||||||
|
bShutdown = True
|
||||||
|
Me.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnIncludeAdd_Click(sender As Object, e As EventArgs) Handles btnIncludeAdd.Click
|
||||||
|
AddTag(lstIncludeTags)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
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
|
||||||
|
If Not bShutdown Then
|
||||||
|
e.Cancel = True
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub chkGameInfo_CheckedChanged(sender As Object, e As EventArgs) Handles chkGameInfo.CheckedChanged
|
||||||
|
If chkGameInfo.Checked Then
|
||||||
|
grpGameFilter.Enabled = True
|
||||||
|
Else
|
||||||
|
optOr.Checked = True
|
||||||
|
grpGameFilter.Enabled = False
|
||||||
|
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
|
||||||
Generated
+532
-215
File diff suppressed because it is too large
Load Diff
@@ -117,4 +117,13 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
|
<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>
|
||||||
</root>
|
</root>
|
||||||
+1152
-248
File diff suppressed because it is too large
Load Diff
Generated
+142
@@ -0,0 +1,142 @@
|
|||||||
|
<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.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
|
||||||
@@ -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,247 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
'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
|
||||||
Generated
+141
@@ -0,0 +1,141 @@
|
|||||||
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||||
|
Partial Class frmGameTags
|
||||||
|
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.lstTags = New System.Windows.Forms.ListBox()
|
||||||
|
Me.lstGameTags = New System.Windows.Forms.ListBox()
|
||||||
|
Me.btnAdd = New System.Windows.Forms.Button()
|
||||||
|
Me.btnRemove = New System.Windows.Forms.Button()
|
||||||
|
Me.lblTags = New System.Windows.Forms.Label()
|
||||||
|
Me.lblGameTags = New System.Windows.Forms.Label()
|
||||||
|
Me.btnClose = New System.Windows.Forms.Button()
|
||||||
|
Me.btnOpenTags = New System.Windows.Forms.Button()
|
||||||
|
Me.SuspendLayout()
|
||||||
|
'
|
||||||
|
'lstTags
|
||||||
|
'
|
||||||
|
Me.lstTags.FormattingEnabled = True
|
||||||
|
Me.lstTags.Location = New System.Drawing.Point(12, 25)
|
||||||
|
Me.lstTags.Name = "lstTags"
|
||||||
|
Me.lstTags.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
|
||||||
|
Me.lstTags.Size = New System.Drawing.Size(150, 199)
|
||||||
|
Me.lstTags.Sorted = True
|
||||||
|
Me.lstTags.TabIndex = 0
|
||||||
|
'
|
||||||
|
'lstGameTags
|
||||||
|
'
|
||||||
|
Me.lstGameTags.FormattingEnabled = True
|
||||||
|
Me.lstGameTags.Location = New System.Drawing.Point(222, 25)
|
||||||
|
Me.lstGameTags.Name = "lstGameTags"
|
||||||
|
Me.lstGameTags.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended
|
||||||
|
Me.lstGameTags.Size = New System.Drawing.Size(150, 199)
|
||||||
|
Me.lstGameTags.Sorted = True
|
||||||
|
Me.lstGameTags.TabIndex = 3
|
||||||
|
'
|
||||||
|
'btnAdd
|
||||||
|
'
|
||||||
|
Me.btnAdd.Location = New System.Drawing.Point(168, 86)
|
||||||
|
Me.btnAdd.Name = "btnAdd"
|
||||||
|
Me.btnAdd.Size = New System.Drawing.Size(48, 23)
|
||||||
|
Me.btnAdd.TabIndex = 1
|
||||||
|
Me.btnAdd.Text = ">"
|
||||||
|
Me.btnAdd.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'btnRemove
|
||||||
|
'
|
||||||
|
Me.btnRemove.Location = New System.Drawing.Point(168, 115)
|
||||||
|
Me.btnRemove.Name = "btnRemove"
|
||||||
|
Me.btnRemove.Size = New System.Drawing.Size(48, 23)
|
||||||
|
Me.btnRemove.TabIndex = 2
|
||||||
|
Me.btnRemove.Text = "<"
|
||||||
|
Me.btnRemove.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'lblTags
|
||||||
|
'
|
||||||
|
Me.lblTags.AutoSize = True
|
||||||
|
Me.lblTags.Location = New System.Drawing.Point(49, 9)
|
||||||
|
Me.lblTags.Name = "lblTags"
|
||||||
|
Me.lblTags.Size = New System.Drawing.Size(77, 13)
|
||||||
|
Me.lblTags.TabIndex = 0
|
||||||
|
Me.lblTags.Text = "Available Tags"
|
||||||
|
'
|
||||||
|
'lblGameTags
|
||||||
|
'
|
||||||
|
Me.lblGameTags.AutoSize = True
|
||||||
|
Me.lblGameTags.Location = New System.Drawing.Point(263, 9)
|
||||||
|
Me.lblGameTags.Name = "lblGameTags"
|
||||||
|
Me.lblGameTags.Size = New System.Drawing.Size(68, 13)
|
||||||
|
Me.lblGameTags.TabIndex = 0
|
||||||
|
Me.lblGameTags.Text = "Current Tags"
|
||||||
|
'
|
||||||
|
'btnClose
|
||||||
|
'
|
||||||
|
Me.btnClose.Location = New System.Drawing.Point(297, 230)
|
||||||
|
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
|
||||||
|
'
|
||||||
|
'btnOpenTags
|
||||||
|
'
|
||||||
|
Me.btnOpenTags.Location = New System.Drawing.Point(12, 230)
|
||||||
|
Me.btnOpenTags.Name = "btnOpenTags"
|
||||||
|
Me.btnOpenTags.Size = New System.Drawing.Size(90, 23)
|
||||||
|
Me.btnOpenTags.TabIndex = 4
|
||||||
|
Me.btnOpenTags.Text = "Setup &Tags..."
|
||||||
|
Me.btnOpenTags.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'frmGameTags
|
||||||
|
'
|
||||||
|
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.btnOpenTags)
|
||||||
|
Me.Controls.Add(Me.btnClose)
|
||||||
|
Me.Controls.Add(Me.lblGameTags)
|
||||||
|
Me.Controls.Add(Me.lblTags)
|
||||||
|
Me.Controls.Add(Me.btnRemove)
|
||||||
|
Me.Controls.Add(Me.btnAdd)
|
||||||
|
Me.Controls.Add(Me.lstGameTags)
|
||||||
|
Me.Controls.Add(Me.lstTags)
|
||||||
|
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||||
|
Me.MaximizeBox = False
|
||||||
|
Me.MinimizeBox = False
|
||||||
|
Me.Name = "frmGameTags"
|
||||||
|
Me.ShowIcon = False
|
||||||
|
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||||
|
Me.Text = "Edit Tags"
|
||||||
|
Me.ResumeLayout(False)
|
||||||
|
Me.PerformLayout()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
Friend WithEvents lstTags As System.Windows.Forms.ListBox
|
||||||
|
Friend WithEvents lstGameTags As System.Windows.Forms.ListBox
|
||||||
|
Friend WithEvents btnAdd As System.Windows.Forms.Button
|
||||||
|
Friend WithEvents btnRemove As System.Windows.Forms.Button
|
||||||
|
Friend WithEvents lblTags As System.Windows.Forms.Label
|
||||||
|
Friend WithEvents lblGameTags As System.Windows.Forms.Label
|
||||||
|
Friend WithEvents btnClose As System.Windows.Forms.Button
|
||||||
|
Friend WithEvents btnOpenTags As System.Windows.Forms.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,249 @@
|
|||||||
|
Imports GBM.My.Resources
|
||||||
|
|
||||||
|
Public Class frmGameTags
|
||||||
|
|
||||||
|
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
|
||||||
|
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 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))
|
||||||
|
Dim oGameTag As clsGameTag
|
||||||
|
Dim oGameTags As List(Of clsGameTag)
|
||||||
|
|
||||||
|
If lstTags.SelectedItems.Count = 1 Then
|
||||||
|
oData = lstTags.SelectedItems(0)
|
||||||
|
|
||||||
|
oGameTags = New List(Of clsGameTag)
|
||||||
|
For Each sID As String In IDList
|
||||||
|
oGameTag = New clsGameTag
|
||||||
|
oGameTag.MonitorID = sID
|
||||||
|
oGameTag.TagID = oData.Key
|
||||||
|
oGameTags.Add(oGameTag)
|
||||||
|
Next
|
||||||
|
|
||||||
|
If Not bNewMode Then mgrGameTags.DoGameTagAddBatch(oGameTags)
|
||||||
|
|
||||||
|
lstGameTags.Items.Add(oData)
|
||||||
|
lstTags.Items.Remove(oData)
|
||||||
|
ElseIf lstTags.SelectedItems.Count > 1 Then
|
||||||
|
oTags = New List(Of KeyValuePair(Of String, String))
|
||||||
|
|
||||||
|
For Each oData In lstTags.SelectedItems
|
||||||
|
oTags.Add(oData)
|
||||||
|
Next
|
||||||
|
|
||||||
|
For Each kp As KeyValuePair(Of String, String) In oTags
|
||||||
|
oGameTags = New List(Of clsGameTag)
|
||||||
|
For Each sID As String In IDList
|
||||||
|
oGameTag = New clsGameTag
|
||||||
|
oGameTag.MonitorID = sID
|
||||||
|
oGameTag.TagID = kp.Key
|
||||||
|
oGameTags.Add(oGameTag)
|
||||||
|
Next
|
||||||
|
|
||||||
|
If Not bNewMode Then mgrGameTags.DoGameTagAddBatch(oGameTags)
|
||||||
|
|
||||||
|
lstGameTags.Items.Add(kp)
|
||||||
|
lstTags.Items.Remove(kp)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RemoveTag()
|
||||||
|
Dim oData As KeyValuePair(Of String, String)
|
||||||
|
Dim oTags As List(Of KeyValuePair(Of String, String))
|
||||||
|
Dim oGameTag As clsGameTag
|
||||||
|
Dim oGameTags As List(Of clsGameTag)
|
||||||
|
|
||||||
|
If lstGameTags.SelectedItems.Count = 1 Then
|
||||||
|
oData = lstGameTags.SelectedItems(0)
|
||||||
|
|
||||||
|
oGameTags = New List(Of clsGameTag)
|
||||||
|
For Each sID As String In IDList
|
||||||
|
oGameTag = New clsGameTag
|
||||||
|
oGameTag.MonitorID = sID
|
||||||
|
oGameTag.TagID = oData.Key
|
||||||
|
oGameTags.Add(oGameTag)
|
||||||
|
Next
|
||||||
|
|
||||||
|
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))
|
||||||
|
|
||||||
|
For Each oData In lstGameTags.SelectedItems
|
||||||
|
oTags.Add(oData)
|
||||||
|
Next
|
||||||
|
|
||||||
|
For Each kp As KeyValuePair(Of String, String) In oTags
|
||||||
|
oGameTags = New List(Of clsGameTag)
|
||||||
|
For Each sID As String In IDList
|
||||||
|
oGameTag = New clsGameTag
|
||||||
|
oGameTag.MonitorID = sID
|
||||||
|
oGameTag.TagID = kp.Key
|
||||||
|
oGameTags.Add(oGameTag)
|
||||||
|
Next
|
||||||
|
|
||||||
|
If Not bNewMode Then mgrGameTags.DoGameTagDelete(oGameTags)
|
||||||
|
|
||||||
|
lstGameTags.Items.Remove(kp)
|
||||||
|
lstTags.Items.Add(kp)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub LoadData()
|
||||||
|
Dim hshTags As Hashtable
|
||||||
|
Dim hshGameTags As Hashtable
|
||||||
|
Dim oTag As clsTag
|
||||||
|
Dim oData As KeyValuePair(Of String, String)
|
||||||
|
|
||||||
|
'Load Tags
|
||||||
|
hshTags = mgrTags.ReadTags()
|
||||||
|
|
||||||
|
'Handle Lists
|
||||||
|
lstTags.Items.Clear()
|
||||||
|
lstGameTags.Items.Clear()
|
||||||
|
|
||||||
|
lstTags.ValueMember = "Key"
|
||||||
|
lstTags.DisplayMember = "Value"
|
||||||
|
lstGameTags.ValueMember = "Key"
|
||||||
|
lstGameTags.DisplayMember = "Value"
|
||||||
|
|
||||||
|
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)
|
||||||
|
oData = New KeyValuePair(Of String, String)(oTag.ID, oTag.Name)
|
||||||
|
lstTags.Items.Add(oData)
|
||||||
|
Next
|
||||||
|
|
||||||
|
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()
|
||||||
|
LoadData()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SetForm()
|
||||||
|
'Set Form Name
|
||||||
|
If IDList.Count > 1 Then
|
||||||
|
Me.Text = frmGameTags_FormNameMulti
|
||||||
|
Else
|
||||||
|
Me.Text = mgrCommon.FormatString(frmGameTags_FormNameSingle, GameName)
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Set Form Text
|
||||||
|
btnOpenTags.Text = frmGameTags_btnOpenTags
|
||||||
|
btnClose.Text = frmGameTags_btnClose
|
||||||
|
lblGameTags.Text = frmGameTags_lblGameTags
|
||||||
|
lblTags.Text = frmGameTags_lblTags
|
||||||
|
btnRemove.Text = frmGameTags_btnRemove
|
||||||
|
btnAdd.Text = frmGameTags_btnAdd
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub frmGameTags_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 BuildTagList()
|
||||||
|
Me.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnAdd_Click(sender As Object, e As EventArgs) Handles btnAdd.Click
|
||||||
|
AddTag()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnRemove_Click(sender As Object, e As EventArgs) Handles btnRemove.Click
|
||||||
|
RemoveTag()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnOpenTags_Click(sender As Object, e As EventArgs) Handles btnOpenTags.Click
|
||||||
|
If bNewMode Then BuildTagList()
|
||||||
|
OpenTags()
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
Generated
+275
@@ -0,0 +1,275 @@
|
|||||||
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||||
|
Partial Class frmIncludeExclude
|
||||||
|
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.components = New System.ComponentModel.Container()
|
||||||
|
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmIncludeExclude))
|
||||||
|
Me.treFiles = New System.Windows.Forms.TreeView()
|
||||||
|
Me.imgIcons = New System.Windows.Forms.ImageList(Me.components)
|
||||||
|
Me.btnSave = New System.Windows.Forms.Button()
|
||||||
|
Me.btnCancel = New System.Windows.Forms.Button()
|
||||||
|
Me.txtRootFolder = New System.Windows.Forms.TextBox()
|
||||||
|
Me.btnBrowse = New System.Windows.Forms.Button()
|
||||||
|
Me.lstBuilder = New System.Windows.Forms.ListView()
|
||||||
|
Me.cmsItems = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||||
|
Me.cmsEdit = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
|
Me.cmsRemove = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
|
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.optFileTypes = New System.Windows.Forms.RadioButton()
|
||||||
|
Me.optIndividualFiles = New System.Windows.Forms.RadioButton()
|
||||||
|
Me.lblItems = New System.Windows.Forms.Label()
|
||||||
|
Me.btnRawEdit = New System.Windows.Forms.Button()
|
||||||
|
Me.lblSaveFolder = New System.Windows.Forms.Label()
|
||||||
|
Me.ttWarning = New System.Windows.Forms.ToolTip(Me.components)
|
||||||
|
Me.cmsItems.SuspendLayout()
|
||||||
|
Me.grpFileOptions.SuspendLayout()
|
||||||
|
Me.SuspendLayout()
|
||||||
|
'
|
||||||
|
'treFiles
|
||||||
|
'
|
||||||
|
Me.treFiles.CheckBoxes = True
|
||||||
|
Me.treFiles.ImageIndex = 0
|
||||||
|
Me.treFiles.ImageList = Me.imgIcons
|
||||||
|
Me.treFiles.Location = New System.Drawing.Point(12, 64)
|
||||||
|
Me.treFiles.Name = "treFiles"
|
||||||
|
Me.treFiles.SelectedImageIndex = 0
|
||||||
|
Me.treFiles.Size = New System.Drawing.Size(250, 333)
|
||||||
|
Me.treFiles.TabIndex = 1
|
||||||
|
'
|
||||||
|
'imgIcons
|
||||||
|
'
|
||||||
|
Me.imgIcons.ImageStream = CType(resources.GetObject("imgIcons.ImageStream"), System.Windows.Forms.ImageListStreamer)
|
||||||
|
Me.imgIcons.TransparentColor = System.Drawing.Color.Transparent
|
||||||
|
Me.imgIcons.Images.SetKeyName(0, "folder.ico")
|
||||||
|
Me.imgIcons.Images.SetKeyName(1, "file.ico")
|
||||||
|
Me.imgIcons.Images.SetKeyName(2, "type.ico")
|
||||||
|
'
|
||||||
|
'btnSave
|
||||||
|
'
|
||||||
|
Me.btnSave.Location = New System.Drawing.Point(416, 426)
|
||||||
|
Me.btnSave.Name = "btnSave"
|
||||||
|
Me.btnSave.Size = New System.Drawing.Size(75, 23)
|
||||||
|
Me.btnSave.TabIndex = 7
|
||||||
|
Me.btnSave.Text = "&Save"
|
||||||
|
Me.btnSave.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'btnCancel
|
||||||
|
'
|
||||||
|
Me.btnCancel.Location = New System.Drawing.Point(497, 426)
|
||||||
|
Me.btnCancel.Name = "btnCancel"
|
||||||
|
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
|
||||||
|
Me.btnCancel.TabIndex = 8
|
||||||
|
Me.btnCancel.Text = "&Cancel"
|
||||||
|
Me.btnCancel.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'txtRootFolder
|
||||||
|
'
|
||||||
|
Me.txtRootFolder.Location = New System.Drawing.Point(12, 38)
|
||||||
|
Me.txtRootFolder.Name = "txtRootFolder"
|
||||||
|
Me.txtRootFolder.ReadOnly = True
|
||||||
|
Me.txtRootFolder.Size = New System.Drawing.Size(214, 20)
|
||||||
|
Me.txtRootFolder.TabIndex = 0
|
||||||
|
Me.txtRootFolder.TabStop = False
|
||||||
|
'
|
||||||
|
'btnBrowse
|
||||||
|
'
|
||||||
|
Me.btnBrowse.Location = New System.Drawing.Point(232, 37)
|
||||||
|
Me.btnBrowse.Name = "btnBrowse"
|
||||||
|
Me.btnBrowse.Size = New System.Drawing.Size(30, 20)
|
||||||
|
Me.btnBrowse.TabIndex = 0
|
||||||
|
Me.btnBrowse.Text = "..."
|
||||||
|
Me.btnBrowse.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'lstBuilder
|
||||||
|
'
|
||||||
|
Me.lstBuilder.ContextMenuStrip = Me.cmsItems
|
||||||
|
Me.lstBuilder.LabelEdit = True
|
||||||
|
Me.lstBuilder.Location = New System.Drawing.Point(322, 38)
|
||||||
|
Me.lstBuilder.Name = "lstBuilder"
|
||||||
|
Me.lstBuilder.Size = New System.Drawing.Size(250, 359)
|
||||||
|
Me.lstBuilder.SmallImageList = Me.imgIcons
|
||||||
|
Me.lstBuilder.TabIndex = 5
|
||||||
|
Me.lstBuilder.UseCompatibleStateImageBehavior = False
|
||||||
|
Me.lstBuilder.View = System.Windows.Forms.View.List
|
||||||
|
'
|
||||||
|
'cmsItems
|
||||||
|
'
|
||||||
|
Me.cmsItems.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.cmsEdit, Me.cmsRemove, Me.cmsAdd})
|
||||||
|
Me.cmsItems.Name = "cmsItems"
|
||||||
|
Me.cmsItems.Size = New System.Drawing.Size(169, 70)
|
||||||
|
'
|
||||||
|
'cmsEdit
|
||||||
|
'
|
||||||
|
Me.cmsEdit.Name = "cmsEdit"
|
||||||
|
Me.cmsEdit.Size = New System.Drawing.Size(168, 22)
|
||||||
|
Me.cmsEdit.Text = "Edit"
|
||||||
|
'
|
||||||
|
'cmsRemove
|
||||||
|
'
|
||||||
|
Me.cmsRemove.Name = "cmsRemove"
|
||||||
|
Me.cmsRemove.Size = New System.Drawing.Size(168, 22)
|
||||||
|
Me.cmsRemove.Text = "Remove"
|
||||||
|
'
|
||||||
|
'cmsAdd
|
||||||
|
'
|
||||||
|
Me.cmsAdd.Name = "cmsAdd"
|
||||||
|
Me.cmsAdd.Size = New System.Drawing.Size(168, 22)
|
||||||
|
Me.cmsAdd.Text = "Add Custom Item"
|
||||||
|
'
|
||||||
|
'btnRemove
|
||||||
|
'
|
||||||
|
Me.btnRemove.Location = New System.Drawing.Point(268, 201)
|
||||||
|
Me.btnRemove.Name = "btnRemove"
|
||||||
|
Me.btnRemove.Size = New System.Drawing.Size(48, 23)
|
||||||
|
Me.btnRemove.TabIndex = 4
|
||||||
|
Me.btnRemove.Text = "<"
|
||||||
|
Me.btnRemove.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'btnAdd
|
||||||
|
'
|
||||||
|
Me.btnAdd.Location = New System.Drawing.Point(268, 172)
|
||||||
|
Me.btnAdd.Name = "btnAdd"
|
||||||
|
Me.btnAdd.Size = New System.Drawing.Size(48, 23)
|
||||||
|
Me.btnAdd.TabIndex = 3
|
||||||
|
Me.btnAdd.Text = ">"
|
||||||
|
Me.btnAdd.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'grpFileOptions
|
||||||
|
'
|
||||||
|
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"
|
||||||
|
'
|
||||||
|
'optFileTypes
|
||||||
|
'
|
||||||
|
Me.optFileTypes.Location = New System.Drawing.Point(6, 19)
|
||||||
|
Me.optFileTypes.Name = "optFileTypes"
|
||||||
|
Me.optFileTypes.Size = New System.Drawing.Size(73, 17)
|
||||||
|
Me.optFileTypes.TabIndex = 0
|
||||||
|
Me.optFileTypes.TabStop = True
|
||||||
|
Me.optFileTypes.Text = "File Types"
|
||||||
|
Me.optFileTypes.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'optIndividualFiles
|
||||||
|
'
|
||||||
|
Me.optIndividualFiles.Location = New System.Drawing.Point(85, 19)
|
||||||
|
Me.optIndividualFiles.Name = "optIndividualFiles"
|
||||||
|
Me.optIndividualFiles.Size = New System.Drawing.Size(94, 17)
|
||||||
|
Me.optIndividualFiles.TabIndex = 1
|
||||||
|
Me.optIndividualFiles.TabStop = True
|
||||||
|
Me.optIndividualFiles.Text = "Individual Files"
|
||||||
|
Me.optIndividualFiles.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'lblItems
|
||||||
|
'
|
||||||
|
Me.lblItems.Location = New System.Drawing.Point(322, 16)
|
||||||
|
Me.lblItems.Name = "lblItems"
|
||||||
|
Me.lblItems.Size = New System.Drawing.Size(250, 13)
|
||||||
|
Me.lblItems.TabIndex = 14
|
||||||
|
Me.lblItems.Text = "Items"
|
||||||
|
Me.lblItems.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||||
|
'
|
||||||
|
'btnRawEdit
|
||||||
|
'
|
||||||
|
Me.btnRawEdit.Location = New System.Drawing.Point(335, 426)
|
||||||
|
Me.btnRawEdit.Name = "btnRawEdit"
|
||||||
|
Me.btnRawEdit.Size = New System.Drawing.Size(75, 23)
|
||||||
|
Me.btnRawEdit.TabIndex = 6
|
||||||
|
Me.btnRawEdit.Text = "Raw &Edit"
|
||||||
|
Me.btnRawEdit.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'lblSaveFolder
|
||||||
|
'
|
||||||
|
Me.lblSaveFolder.Location = New System.Drawing.Point(9, 16)
|
||||||
|
Me.lblSaveFolder.Name = "lblSaveFolder"
|
||||||
|
Me.lblSaveFolder.Size = New System.Drawing.Size(250, 13)
|
||||||
|
Me.lblSaveFolder.TabIndex = 15
|
||||||
|
Me.lblSaveFolder.Text = "Saved Game Explorer"
|
||||||
|
Me.lblSaveFolder.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||||
|
'
|
||||||
|
'ttWarning
|
||||||
|
'
|
||||||
|
Me.ttWarning.AutoPopDelay = 5000
|
||||||
|
Me.ttWarning.InitialDelay = 200
|
||||||
|
Me.ttWarning.ReshowDelay = 50
|
||||||
|
Me.ttWarning.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Warning
|
||||||
|
'
|
||||||
|
'frmIncludeExclude
|
||||||
|
'
|
||||||
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
|
Me.ClientSize = New System.Drawing.Size(584, 461)
|
||||||
|
Me.Controls.Add(Me.lblSaveFolder)
|
||||||
|
Me.Controls.Add(Me.btnRawEdit)
|
||||||
|
Me.Controls.Add(Me.lblItems)
|
||||||
|
Me.Controls.Add(Me.grpFileOptions)
|
||||||
|
Me.Controls.Add(Me.btnRemove)
|
||||||
|
Me.Controls.Add(Me.btnAdd)
|
||||||
|
Me.Controls.Add(Me.lstBuilder)
|
||||||
|
Me.Controls.Add(Me.btnBrowse)
|
||||||
|
Me.Controls.Add(Me.txtRootFolder)
|
||||||
|
Me.Controls.Add(Me.btnCancel)
|
||||||
|
Me.Controls.Add(Me.btnSave)
|
||||||
|
Me.Controls.Add(Me.treFiles)
|
||||||
|
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||||
|
Me.MaximizeBox = False
|
||||||
|
Me.MinimizeBox = False
|
||||||
|
Me.Name = "frmIncludeExclude"
|
||||||
|
Me.ShowIcon = False
|
||||||
|
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||||
|
Me.Text = "Include / Exclude Builder"
|
||||||
|
Me.cmsItems.ResumeLayout(False)
|
||||||
|
Me.grpFileOptions.ResumeLayout(False)
|
||||||
|
Me.ResumeLayout(False)
|
||||||
|
Me.PerformLayout()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
Friend WithEvents treFiles As System.Windows.Forms.TreeView
|
||||||
|
Friend WithEvents imgIcons As System.Windows.Forms.ImageList
|
||||||
|
Friend WithEvents btnSave As System.Windows.Forms.Button
|
||||||
|
Friend WithEvents btnCancel As System.Windows.Forms.Button
|
||||||
|
Friend WithEvents txtRootFolder As System.Windows.Forms.TextBox
|
||||||
|
Friend WithEvents btnBrowse As System.Windows.Forms.Button
|
||||||
|
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 optFileTypes As System.Windows.Forms.RadioButton
|
||||||
|
Friend WithEvents optIndividualFiles As System.Windows.Forms.RadioButton
|
||||||
|
Friend WithEvents lblItems As System.Windows.Forms.Label
|
||||||
|
Friend WithEvents cmsItems As System.Windows.Forms.ContextMenuStrip
|
||||||
|
Friend WithEvents cmsEdit As System.Windows.Forms.ToolStripMenuItem
|
||||||
|
Friend WithEvents cmsRemove As System.Windows.Forms.ToolStripMenuItem
|
||||||
|
Friend WithEvents cmsAdd As System.Windows.Forms.ToolStripMenuItem
|
||||||
|
Friend WithEvents btnRawEdit As Button
|
||||||
|
Friend WithEvents lblSaveFolder As Label
|
||||||
|
Friend WithEvents ttWarning As ToolTip
|
||||||
|
End Class
|
||||||
@@ -0,0 +1,177 @@
|
|||||||
|
<?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>
|
||||||
|
<metadata name="imgIcons.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<data name="imgIcons.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>
|
||||||
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAB6
|
||||||
|
CQAAAk1TRnQBSQFMAgEBAwEAAbgBAAG4AQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||||
|
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||||
|
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||||
|
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||||
|
AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm
|
||||||
|
AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM
|
||||||
|
AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA
|
||||||
|
ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz
|
||||||
|
AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ
|
||||||
|
AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM
|
||||||
|
AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA
|
||||||
|
AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA
|
||||||
|
AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ
|
||||||
|
AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/
|
||||||
|
AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA
|
||||||
|
AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm
|
||||||
|
ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ
|
||||||
|
Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz
|
||||||
|
AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA
|
||||||
|
AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM
|
||||||
|
AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM
|
||||||
|
ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM
|
||||||
|
Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA
|
||||||
|
AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM
|
||||||
|
AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ
|
||||||
|
AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz
|
||||||
|
AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm
|
||||||
|
AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw
|
||||||
|
AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/xMACf82AAH0CQcB/wsA
|
||||||
|
Af8ZAAHyDLsB8gIAAfMJvAH0A/8IAAH/AbMBuwH/FgABuwyzAQkCAAHzAvIB8QkHAfQHAAH/A7MBugH/
|
||||||
|
FQABCQyzAQkCAAHzAvIB8QnwAfMGAAH/ArQB8QG8AbQBCQH/FAABCQyzAQkCAAHzDPIB8wUAAf8CtALy
|
||||||
|
AfEBvAG0AbsB/xMAAQkMugEJAgAC8wvyAfMEAAH/AbQBugHzA/IB8QG8AbQBuxMAAfAMugHwAgAD8wry
|
||||||
|
AfMDAAH/AroD8wPyAfEBugG0EwAB8AzbAfACAATzAfIJ8wIAAf8CugbzAfICugL/EgABGQzcARkCAATz
|
||||||
|
AfIJ8wIAAfQCugEJBfMCuwH/FAAB8QwJAfECAA7zAgAB9AG6AdsB3AEJA/MBCQG7Af8VAAHwB9wFugHw
|
||||||
|
AgAB8wL0B/MB8gHvAbwB9AIAAfQB3AHzAf8B3AEJAfICCQH/FgABGQG7BO8BCQH/CAAB9AnzAe8B9wHx
|
||||||
|
AwAB9AHcARkB8wPcAQkB/xcAAfMB8AQZAfIJAAP/AfQB8wT0AQcBvAH/BAAB9AIJAdwB4QIJAf8rAAH/
|
||||||
|
BPMC8gYAAf8F9AH/LQAF/yYAAUIBTQE+BwABPgMAASgDAAFAAwABEAMAAQEBAAEBBQABgBcAA/8BAAL/
|
||||||
|
AcABHwL/AgAC/wGAAQ8B/gH/AgABgAEBAYABAQH+AR8CAAGAAQEBgAEBAfwBDwIAAYABAQGAAQEB+AEH
|
||||||
|
AgABgAEBAYABAQHwAQMCAAGAAQEBgAEBAeABAwIAAYABAQGAAQEBwAEDAgABgAEBAYABAQGAAQECAAGA
|
||||||
|
AQEBgAEBAYABBwIAAYABAQGAAQEBgAEPAgABgAEBAYABAQGAAR8CAAGAAX8BgAEDAYABPwIAAYAB/wGA
|
||||||
|
AQcBgAF/AgAC/wHwAR8BgAH/AgAC/wH4AT8C/wIACw==
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<metadata name="cmsItems.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>118, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="ttWarning.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>221, 17</value>
|
||||||
|
</metadata>
|
||||||
|
</root>
|
||||||
@@ -0,0 +1,356 @@
|
|||||||
|
Imports GBM.My.Resources
|
||||||
|
Imports System.IO
|
||||||
|
|
||||||
|
Public Class frmIncludeExclude
|
||||||
|
|
||||||
|
Dim sFormName As String = String.Empty
|
||||||
|
Dim sRootFolder As String = String.Empty
|
||||||
|
Dim sBuilderString As String
|
||||||
|
|
||||||
|
Public Property BuilderString As String
|
||||||
|
Get
|
||||||
|
Return sBuilderString
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
sBuilderString = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property FormName As String
|
||||||
|
Get
|
||||||
|
Return sFormName
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
sFormName = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property RootFolder As String
|
||||||
|
Get
|
||||||
|
Return sRootFolder
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
sRootFolder = value.TrimEnd(Path.DirectorySeparatorChar)
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Sub BuildBranch(ByVal sDirectory As String, ByVal oNode As TreeNode)
|
||||||
|
Dim sFolders As String()
|
||||||
|
Dim sFiles As String()
|
||||||
|
Dim oChild As TreeNode
|
||||||
|
Dim oPlaceHolder As TreeNode
|
||||||
|
|
||||||
|
If oNode.Nodes.ContainsKey("GBM_Tree_Placeholder") Then
|
||||||
|
Try
|
||||||
|
Cursor.Current = Cursors.WaitCursor
|
||||||
|
treFiles.BeginUpdate()
|
||||||
|
|
||||||
|
oNode.Nodes.RemoveByKey("GBM_Tree_Placeholder")
|
||||||
|
|
||||||
|
sFolders = Directory.GetDirectories(sDirectory)
|
||||||
|
sFiles = Directory.GetFiles(sDirectory)
|
||||||
|
|
||||||
|
If sFolders.Length <> 0 Then
|
||||||
|
For Each sFolder As String In sFolders
|
||||||
|
oChild = New TreeNode(sFolder.Replace(sDirectory, String.Empty).TrimStart(Path.DirectorySeparatorChar), 0, 0)
|
||||||
|
oChild.Name = sFolder
|
||||||
|
oChild.Tag = 0
|
||||||
|
oNode.Nodes.Add(oChild)
|
||||||
|
oPlaceHolder = New TreeNode("GBM_Tree_Placeholder")
|
||||||
|
oPlaceHolder.Name = "GBM_Tree_Placeholder"
|
||||||
|
oChild.Nodes.Add(oPlaceHolder)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
If sFiles.Length <> 0 Then
|
||||||
|
For Each sFile As String In sFiles
|
||||||
|
oChild = New TreeNode(sFile.Replace(sDirectory, String.Empty).TrimStart(Path.DirectorySeparatorChar), 1, 1)
|
||||||
|
oChild.Tag = 1
|
||||||
|
oNode.Nodes.Add(oChild)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
Catch uaex As UnauthorizedAccessException
|
||||||
|
'Do Nothing
|
||||||
|
Catch ex As Exception
|
||||||
|
mgrCommon.ShowMessage(frmIncludeExclude_ErrorFileSystemRead, ex.Message, MsgBoxStyle.Critical)
|
||||||
|
Finally
|
||||||
|
treFiles.EndUpdate()
|
||||||
|
Cursor.Current = Cursors.Default
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub BuildTrunk()
|
||||||
|
Dim oRootNode As TreeNode
|
||||||
|
|
||||||
|
If Path.GetPathRoot(txtRootFolder.Text) = txtRootFolder.Text Then
|
||||||
|
oRootNode = New TreeNode(txtRootFolder.Text, 0, 0)
|
||||||
|
Else
|
||||||
|
oRootNode = New TreeNode(Path.GetFileName(txtRootFolder.Text), 0, 0)
|
||||||
|
End If
|
||||||
|
|
||||||
|
treFiles.Nodes.Clear()
|
||||||
|
oRootNode.Name = "Root"
|
||||||
|
oRootNode.Nodes.Add("GBM_Tree_Placeholder", "GBM_Tree_Placeholder")
|
||||||
|
treFiles.Nodes.Add(oRootNode)
|
||||||
|
BuildBranch(txtRootFolder.Text, oRootNode)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RootPathBrowse()
|
||||||
|
Dim sDefaultFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
|
||||||
|
Dim sCurrentPath As String = txtRootFolder.Text
|
||||||
|
Dim sNewPath As String
|
||||||
|
|
||||||
|
If sCurrentPath <> String.Empty Then
|
||||||
|
If Directory.Exists(sCurrentPath) Then
|
||||||
|
sDefaultFolder = sCurrentPath
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
sNewPath = mgrCommon.OpenFolderBrowser("IE_Save_Path", frmIncludeExclude_BrowseSaveFolder, sDefaultFolder, False, False)
|
||||||
|
|
||||||
|
If sNewPath <> String.Empty Then txtRootFolder.Text = sNewPath
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub GetAllCheckedNodes(ByVal oRootNode As TreeNodeCollection, ByRef oNodeList As List(Of TreeNode))
|
||||||
|
For Each oNode As TreeNode In oRootNode
|
||||||
|
If oNode.Checked Then
|
||||||
|
oNode.Checked = False
|
||||||
|
oNodeList.Add(oNode)
|
||||||
|
End If
|
||||||
|
If oNode.Nodes.Count > 0 Then
|
||||||
|
GetAllCheckedNodes(oNode.Nodes, oNodeList)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub AddItem()
|
||||||
|
Dim oCheckedNodes As New List(Of TreeNode)
|
||||||
|
Dim oListViewItem As ListViewItem
|
||||||
|
Dim sItem As String
|
||||||
|
|
||||||
|
GetAllCheckedNodes(treFiles.Nodes, oCheckedNodes)
|
||||||
|
|
||||||
|
lstBuilder.BeginUpdate()
|
||||||
|
For Each oNode In oCheckedNodes
|
||||||
|
sItem = oNode.Text
|
||||||
|
If oNode.Tag = 1 And optFileTypes.Checked Then
|
||||||
|
sItem = Path.GetExtension(oNode.Text)
|
||||||
|
If sItem <> String.Empty Then
|
||||||
|
sItem = "*" & sItem
|
||||||
|
oListViewItem = New ListViewItem(sItem, 2)
|
||||||
|
oListViewItem.Name = sItem
|
||||||
|
Else
|
||||||
|
sItem = oNode.Text
|
||||||
|
oListViewItem = New ListViewItem(sItem, 1)
|
||||||
|
oListViewItem.Name = sItem
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
oListViewItem = New ListViewItem(sItem, CInt(oNode.Tag))
|
||||||
|
oListViewItem.Name = sItem
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not lstBuilder.Items.ContainsKey(sItem) Then
|
||||||
|
lstBuilder.Items.Add(oListViewItem)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
lstBuilder.EndUpdate()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RemoveItem()
|
||||||
|
For Each oListViewItem As ListViewItem In lstBuilder.SelectedItems
|
||||||
|
oListViewItem.Remove()
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ParseBuilderString(ByVal sString As String)
|
||||||
|
Dim iType As Integer = 1
|
||||||
|
Dim oListViewItem As ListViewItem
|
||||||
|
Dim sItems As String() = sString.Split(":")
|
||||||
|
|
||||||
|
lstBuilder.BeginUpdate()
|
||||||
|
lstBuilder.Clear()
|
||||||
|
|
||||||
|
For Each sItem As String In sItems
|
||||||
|
oListViewItem = New ListViewItem(sItem)
|
||||||
|
oListViewItem.Name = sItem
|
||||||
|
IdentifyEntry(oListViewItem, sItem)
|
||||||
|
If Not lstBuilder.Items.ContainsKey(sItem) Then
|
||||||
|
lstBuilder.Items.Add(oListViewItem)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
lstBuilder.EndUpdate()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub IdentifyEntry(ByRef oListItem As ListViewItem, ByVal sNewLabel As String)
|
||||||
|
Dim iType As Integer = 1
|
||||||
|
Dim sFolderCheck As String
|
||||||
|
|
||||||
|
If sNewLabel.Contains("*") Or sNewLabel.Contains("?") Then
|
||||||
|
iType = 2
|
||||||
|
Else
|
||||||
|
If txtRootFolder.Text <> String.Empty Then
|
||||||
|
If Path.GetFileName(txtRootFolder.Text) = sNewLabel Then
|
||||||
|
sFolderCheck = txtRootFolder.Text
|
||||||
|
Else
|
||||||
|
sFolderCheck = txtRootFolder.Text & Path.DirectorySeparatorChar & sNewLabel
|
||||||
|
End If
|
||||||
|
If Directory.Exists(sFolderCheck) Then
|
||||||
|
iType = 0
|
||||||
|
Else
|
||||||
|
iType = 1
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
oListItem.ImageIndex = iType
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function CreateNewBuilderString() As String
|
||||||
|
Dim sTempString As String = String.Empty
|
||||||
|
|
||||||
|
For Each oListViewItem As ListViewItem In lstBuilder.Items
|
||||||
|
sTempString &= oListViewItem.Text & ":"
|
||||||
|
Next
|
||||||
|
|
||||||
|
sTempString = sTempString.TrimEnd(":")
|
||||||
|
|
||||||
|
Return sTempString
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub OpenRawEdit()
|
||||||
|
Dim sCurrentString As String = CreateNewBuilderString()
|
||||||
|
Dim sNewString As String
|
||||||
|
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)
|
||||||
|
|
||||||
|
'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)
|
||||||
|
optFileTypes.Text = frmIncludeExclude_optFileTypes
|
||||||
|
optIndividualFiles.Text = frmIncludeExclude_optIndividualFiles
|
||||||
|
btnRemove.Text = frmIncludeExclude_btnRemove
|
||||||
|
btnAdd.Text = frmIncludeExclude_btnAdd
|
||||||
|
btnBrowse.Text = frmIncludeExclude_btnBrowse
|
||||||
|
btnCancel.Text = frmIncludeExclude_btnCancel
|
||||||
|
btnSave.Text = frmIncludeExclude_btnSave
|
||||||
|
cmsAdd.Text = frmIncludeExclude_cmsAdd
|
||||||
|
cmsEdit.Text = frmIncludeExclude_cmsEdit
|
||||||
|
cmsRemove.Text = frmIncludeExclude_cmsRemove
|
||||||
|
|
||||||
|
'Set Defaults
|
||||||
|
txtRootFolder.Text = RootFolder
|
||||||
|
optFileTypes.Checked = True
|
||||||
|
If BuilderString <> String.Empty Then ParseBuilderString(BuilderString)
|
||||||
|
If txtRootFolder.Text <> String.Empty Then BuildTrunk()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub frmIncludeExclude_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
|
SetForm()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub frmIncludeExclude_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
|
||||||
|
treFiles.Select()
|
||||||
|
If Not treFiles.SelectedNode Is Nothing Then treFiles.SelectedNode.Expand()
|
||||||
|
If txtRootFolder.Text = String.Empty Then
|
||||||
|
ttWarning.ToolTipTitle = frmIncludeExclude_ToolTipTitle
|
||||||
|
ttWarning.SetToolTip(treFiles, frmIncludeExclude_ToolTipFiles)
|
||||||
|
ttWarning.SetToolTip(txtRootFolder, frmIncludeExclude_ToolTipFolder)
|
||||||
|
ttWarning.SetToolTip(btnBrowse, frmIncludeExclude_ToolTipBrowse)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnBrowse_Click(sender As Object, e As EventArgs) Handles btnBrowse.Click
|
||||||
|
RootPathBrowse()
|
||||||
|
If txtRootFolder.Text <> String.Empty Then
|
||||||
|
BuildTrunk()
|
||||||
|
ttWarning.RemoveAll()
|
||||||
|
End If
|
||||||
|
treFiles.Select()
|
||||||
|
If Not treFiles.SelectedNode Is Nothing Then treFiles.SelectedNode.Expand()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click
|
||||||
|
BuilderString = CreateNewBuilderString()
|
||||||
|
Me.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click
|
||||||
|
Me.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub treFiles_BeforeExpand(sender As Object, e As TreeViewCancelEventArgs) Handles treFiles.BeforeExpand
|
||||||
|
If Not e.Node.Name = "Root" Then
|
||||||
|
BuildBranch(e.Node.Name, e.Node)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnAdd_Click(sender As Object, e As EventArgs) Handles btnAdd.Click
|
||||||
|
AddItem()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnRemove_Click(sender As Object, e As EventArgs) Handles btnRemove.Click
|
||||||
|
RemoveItem()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub cmsItems_Opening(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles cmsItems.Opening
|
||||||
|
If lstBuilder.SelectedItems.Count = 0 Then
|
||||||
|
cmsEdit.Visible = False
|
||||||
|
cmsRemove.Visible = False
|
||||||
|
cmsAdd.Visible = True
|
||||||
|
Else
|
||||||
|
cmsEdit.Visible = True
|
||||||
|
cmsRemove.Visible = True
|
||||||
|
cmsAdd.Visible = False
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub cmsEdit_Click(sender As Object, e As EventArgs) Handles cmsEdit.Click
|
||||||
|
If lstBuilder.SelectedItems.Count > 0 Then
|
||||||
|
lstBuilder.SelectedItems(0).BeginEdit()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub cmsRemove_Click(sender As Object, e As EventArgs) Handles cmsRemove.Click
|
||||||
|
RemoveItem()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub cmsAdd_Click(sender As Object, e As EventArgs) Handles cmsAdd.Click
|
||||||
|
Dim oNewItem As New ListViewItem(frmIncludeExclude_CustomItem, 1)
|
||||||
|
oNewItem.Selected = True
|
||||||
|
lstBuilder.Items.Add(oNewItem)
|
||||||
|
lstBuilder.SelectedItems(0).BeginEdit()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub lstBuilder_AfterLabelEdit(sender As Object, e As LabelEditEventArgs) Handles lstBuilder.AfterLabelEdit
|
||||||
|
If Not e.Label Is Nothing Then
|
||||||
|
If e.Label = String.Empty Then
|
||||||
|
e.CancelEdit = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If lstBuilder.Items.ContainsKey(e.Label) Then
|
||||||
|
e.CancelEdit = True
|
||||||
|
Else
|
||||||
|
'Unix Handler - Mono is unable to modify list items during an edit event without crashing
|
||||||
|
If Not mgrCommon.IsUnix Then IdentifyEntry(lstBuilder.Items(e.Item), e.Label)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnRawEdit_Click(sender As Object, e As EventArgs) Handles btnRawEdit.Click
|
||||||
|
OpenRawEdit()
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
Generated
+283
-178
@@ -26,6 +26,7 @@ Partial Class frmMain
|
|||||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmMain))
|
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmMain))
|
||||||
Me.gMonTray = New System.Windows.Forms.NotifyIcon(Me.components)
|
Me.gMonTray = New System.Windows.Forms.NotifyIcon(Me.components)
|
||||||
Me.gMonTrayMenu = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
Me.gMonTrayMenu = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||||
|
Me.gMonTrayNotification = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.gMonTrayShow = New System.Windows.Forms.ToolStripMenuItem()
|
Me.gMonTrayShow = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.gMonTraySep2 = New System.Windows.Forms.ToolStripSeparator()
|
Me.gMonTraySep2 = New System.Windows.Forms.ToolStripSeparator()
|
||||||
Me.gMonTrayMon = New System.Windows.Forms.ToolStripMenuItem()
|
Me.gMonTrayMon = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
@@ -34,21 +35,25 @@ Partial Class frmMain
|
|||||||
Me.gMonTraySetupAddWizard = New System.Windows.Forms.ToolStripMenuItem()
|
Me.gMonTraySetupAddWizard = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.gMonTraySetupGameManager = New System.Windows.Forms.ToolStripMenuItem()
|
Me.gMonTraySetupGameManager = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.gMonTraySetupCustomVariables = 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.gMonTrayTools = New System.Windows.Forms.ToolStripMenuItem()
|
Me.gMonTrayTools = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.gMonTrayToolsGameList = New System.Windows.Forms.ToolStripMenuItem()
|
|
||||||
Me.gMonTrayToolsGameImportOfficialList = New System.Windows.Forms.ToolStripMenuItem()
|
|
||||||
Me.gMonTrayToolsGameImportList = New System.Windows.Forms.ToolStripMenuItem()
|
|
||||||
Me.gMonTrayToolsGameExportList = New System.Windows.Forms.ToolStripMenuItem()
|
|
||||||
Me.gMonTrayToolsSyncMan = New System.Windows.Forms.ToolStripMenuItem()
|
|
||||||
Me.gMonTrayToolsCompact = 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.gMonTraySep1 = New System.Windows.Forms.ToolStripSeparator()
|
||||||
Me.gMonTrayExit = New System.Windows.Forms.ToolStripMenuItem()
|
Me.gMonTrayExit = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.bwMonitor = New System.ComponentModel.BackgroundWorker()
|
Me.bwMonitor = New System.ComponentModel.BackgroundWorker()
|
||||||
Me.txtLog = New System.Windows.Forms.TextBox()
|
Me.txtLog = New System.Windows.Forms.TextBox()
|
||||||
Me.gMonStatusStrip = New System.Windows.Forms.StatusStrip()
|
Me.gMonStatusStrip = New System.Windows.Forms.StatusStrip()
|
||||||
Me.gMonStripAdminButton = New System.Windows.Forms.ToolStripSplitButton()
|
Me.gMonStripAdminButton = New System.Windows.Forms.ToolStripStatusLabel()
|
||||||
Me.gMonStripTxtStatus = New System.Windows.Forms.ToolStripStatusLabel()
|
Me.gMonStripTxtStatus = New System.Windows.Forms.ToolStripStatusLabel()
|
||||||
Me.gMonStripStatusButton = New System.Windows.Forms.ToolStripSplitButton()
|
Me.gMonStripStatusButton = New System.Windows.Forms.ToolStripStatusLabel()
|
||||||
Me.gMonMainMenu = New System.Windows.Forms.MenuStrip()
|
Me.gMonMainMenu = New System.Windows.Forms.MenuStrip()
|
||||||
Me.gMonFile = New System.Windows.Forms.ToolStripMenuItem()
|
Me.gMonFile = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.gMonFileMonitor = New System.Windows.Forms.ToolStripMenuItem()
|
Me.gMonFileMonitor = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
@@ -60,30 +65,38 @@ Partial Class frmMain
|
|||||||
Me.gMonSetupGameManager = New System.Windows.Forms.ToolStripMenuItem()
|
Me.gMonSetupGameManager = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.gMonSetupAddWizard = New System.Windows.Forms.ToolStripMenuItem()
|
Me.gMonSetupAddWizard = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.gMonSetupCustomVariables = 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.gMonTools = New System.Windows.Forms.ToolStripMenuItem()
|
Me.gMonTools = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.gMonToolsGameList = New System.Windows.Forms.ToolStripMenuItem()
|
|
||||||
Me.gMonToolsGameImportOfficialList = New System.Windows.Forms.ToolStripMenuItem()
|
|
||||||
Me.gMonToolsGameImportList = New System.Windows.Forms.ToolStripMenuItem()
|
|
||||||
Me.gMonToolsGameExportList = New System.Windows.Forms.ToolStripMenuItem()
|
|
||||||
Me.gMonToolsSyncMan = New System.Windows.Forms.ToolStripMenuItem()
|
|
||||||
Me.gMonToolsCompact = 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.gMonHelp = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
|
Me.gMonHelpWebSite = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.gMonHelpManual = New System.Windows.Forms.ToolStripMenuItem()
|
Me.gMonHelpManual = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.gMonHelpCheckforUpdates = New System.Windows.Forms.ToolStripMenuItem()
|
Me.gMonHelpCheckforUpdates = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.gMonHelpAbout = New System.Windows.Forms.ToolStripMenuItem()
|
Me.gMonHelpAbout = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
|
Me.gMonNotification = New System.Windows.Forms.ToolStripMenuItem()
|
||||||
Me.pbIcon = New System.Windows.Forms.PictureBox()
|
Me.pbIcon = New System.Windows.Forms.PictureBox()
|
||||||
Me.btnLogToggle = New System.Windows.Forms.Button()
|
|
||||||
Me.lblGameTitle = New System.Windows.Forms.Label()
|
Me.lblGameTitle = New System.Windows.Forms.Label()
|
||||||
Me.lblLastAction = New System.Windows.Forms.Label()
|
Me.lblLastAction = New System.Windows.Forms.Label()
|
||||||
Me.lblLastActionTitle = New System.Windows.Forms.Label()
|
Me.lblLastActionTitle = New System.Windows.Forms.Label()
|
||||||
Me.lblTimeTitle = New System.Windows.Forms.Label()
|
|
||||||
Me.lblTimeSpent = New System.Windows.Forms.Label()
|
Me.lblTimeSpent = New System.Windows.Forms.Label()
|
||||||
Me.txtGameInfo = New System.Windows.Forms.TextBox()
|
|
||||||
Me.btnCancelOperation = New System.Windows.Forms.Button()
|
Me.btnCancelOperation = New System.Windows.Forms.Button()
|
||||||
|
Me.lblStatus1 = New System.Windows.Forms.Label()
|
||||||
|
Me.lblStatus2 = New System.Windows.Forms.Label()
|
||||||
|
Me.lblStatus3 = New System.Windows.Forms.Label()
|
||||||
|
Me.pbTime = New System.Windows.Forms.PictureBox()
|
||||||
Me.gMonTrayMenu.SuspendLayout()
|
Me.gMonTrayMenu.SuspendLayout()
|
||||||
Me.gMonStatusStrip.SuspendLayout()
|
Me.gMonStatusStrip.SuspendLayout()
|
||||||
Me.gMonMainMenu.SuspendLayout()
|
Me.gMonMainMenu.SuspendLayout()
|
||||||
CType(Me.pbIcon, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.pbIcon, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
|
CType(Me.pbTime, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
Me.SuspendLayout()
|
Me.SuspendLayout()
|
||||||
'
|
'
|
||||||
'gMonTray
|
'gMonTray
|
||||||
@@ -93,13 +106,19 @@ Partial Class frmMain
|
|||||||
Me.gMonTray.ContextMenuStrip = Me.gMonTrayMenu
|
Me.gMonTray.ContextMenuStrip = Me.gMonTrayMenu
|
||||||
Me.gMonTray.Icon = CType(resources.GetObject("gMonTray.Icon"), System.Drawing.Icon)
|
Me.gMonTray.Icon = CType(resources.GetObject("gMonTray.Icon"), System.Drawing.Icon)
|
||||||
Me.gMonTray.Text = "GBM"
|
Me.gMonTray.Text = "GBM"
|
||||||
Me.gMonTray.Visible = True
|
|
||||||
'
|
'
|
||||||
'gMonTrayMenu
|
'gMonTrayMenu
|
||||||
'
|
'
|
||||||
Me.gMonTrayMenu.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonTrayShow, Me.gMonTraySep2, Me.gMonTrayMon, Me.gMonTraySettings, Me.gMonTraySetup, Me.gMonTrayTools, Me.gMonTraySep1, Me.gMonTrayExit})
|
Me.gMonTrayMenu.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonTrayNotification, Me.gMonTrayShow, Me.gMonTraySep2, Me.gMonTrayMon, Me.gMonTraySettings, Me.gMonTraySetup, Me.gMonTrayTools, Me.gMonTraySep1, Me.gMonTrayExit})
|
||||||
Me.gMonTrayMenu.Name = "gMonTrayMenu"
|
Me.gMonTrayMenu.Name = "gMonTrayMenu"
|
||||||
Me.gMonTrayMenu.Size = New System.Drawing.Size(162, 148)
|
Me.gMonTrayMenu.Size = New System.Drawing.Size(162, 170)
|
||||||
|
'
|
||||||
|
'gMonTrayNotification
|
||||||
|
'
|
||||||
|
Me.gMonTrayNotification.Name = "gMonTrayNotification"
|
||||||
|
Me.gMonTrayNotification.Size = New System.Drawing.Size(161, 22)
|
||||||
|
Me.gMonTrayNotification.Text = "Notification"
|
||||||
|
Me.gMonTrayNotification.Visible = False
|
||||||
'
|
'
|
||||||
'gMonTrayShow
|
'gMonTrayShow
|
||||||
'
|
'
|
||||||
@@ -126,7 +145,7 @@ Partial Class frmMain
|
|||||||
'
|
'
|
||||||
'gMonTraySetup
|
'gMonTraySetup
|
||||||
'
|
'
|
||||||
Me.gMonTraySetup.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonTraySetupAddWizard, Me.gMonTraySetupGameManager, Me.gMonTraySetupCustomVariables})
|
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.Name = "gMonTraySetup"
|
||||||
Me.gMonTraySetup.Size = New System.Drawing.Size(161, 22)
|
Me.gMonTraySetup.Size = New System.Drawing.Size(161, 22)
|
||||||
Me.gMonTraySetup.Text = "&Setup"
|
Me.gMonTraySetup.Text = "&Setup"
|
||||||
@@ -147,52 +166,77 @@ Partial Class frmMain
|
|||||||
'
|
'
|
||||||
Me.gMonTraySetupCustomVariables.Name = "gMonTraySetupCustomVariables"
|
Me.gMonTraySetupCustomVariables.Name = "gMonTraySetupCustomVariables"
|
||||||
Me.gMonTraySetupCustomVariables.Size = New System.Drawing.Size(201, 22)
|
Me.gMonTraySetupCustomVariables.Size = New System.Drawing.Size(201, 22)
|
||||||
Me.gMonTraySetupCustomVariables.Text = "Custom &Path Variables..."
|
Me.gMonTraySetupCustomVariables.Text = "Custom Path &Variables..."
|
||||||
|
'
|
||||||
|
'gMonTraySetupTags
|
||||||
|
'
|
||||||
|
Me.gMonTraySetupTags.Name = "gMonTraySetupTags"
|
||||||
|
Me.gMonTraySetupTags.Size = New System.Drawing.Size(201, 22)
|
||||||
|
Me.gMonTraySetupTags.Text = "&Tag Manager..."
|
||||||
|
'
|
||||||
|
'gMonTraySetupProcessManager
|
||||||
|
'
|
||||||
|
Me.gMonTraySetupProcessManager.Name = "gMonTraySetupProcessManager"
|
||||||
|
Me.gMonTraySetupProcessManager.Size = New System.Drawing.Size(201, 22)
|
||||||
|
Me.gMonTraySetupProcessManager.Text = "&Process Manager..."
|
||||||
'
|
'
|
||||||
'gMonTrayTools
|
'gMonTrayTools
|
||||||
'
|
'
|
||||||
Me.gMonTrayTools.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonTrayToolsGameList, Me.gMonTrayToolsSyncMan, Me.gMonTrayToolsCompact})
|
Me.gMonTrayTools.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonTrayToolsCompact, Me.gMonTrayToolsLog, Me.gMonTrayToolsSessions, Me.gMonTrayToolsSyncGameID})
|
||||||
Me.gMonTrayTools.Name = "gMonTrayTools"
|
Me.gMonTrayTools.Name = "gMonTrayTools"
|
||||||
Me.gMonTrayTools.Size = New System.Drawing.Size(161, 22)
|
Me.gMonTrayTools.Size = New System.Drawing.Size(161, 22)
|
||||||
Me.gMonTrayTools.Text = "&Tools"
|
Me.gMonTrayTools.Text = "&Tools"
|
||||||
'
|
'
|
||||||
'gMonTrayToolsGameList
|
|
||||||
'
|
|
||||||
Me.gMonTrayToolsGameList.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonTrayToolsGameImportOfficialList, Me.gMonTrayToolsGameImportList, Me.gMonTrayToolsGameExportList})
|
|
||||||
Me.gMonTrayToolsGameList.Name = "gMonTrayToolsGameList"
|
|
||||||
Me.gMonTrayToolsGameList.Size = New System.Drawing.Size(179, 22)
|
|
||||||
Me.gMonTrayToolsGameList.Text = "&Game List"
|
|
||||||
'
|
|
||||||
'gMonTrayToolsGameImportOfficialList
|
|
||||||
'
|
|
||||||
Me.gMonTrayToolsGameImportOfficialList.Name = "gMonTrayToolsGameImportOfficialList"
|
|
||||||
Me.gMonTrayToolsGameImportOfficialList.Size = New System.Drawing.Size(201, 22)
|
|
||||||
Me.gMonTrayToolsGameImportOfficialList.Text = "Import from &Official List"
|
|
||||||
'
|
|
||||||
'gMonTrayToolsGameImportList
|
|
||||||
'
|
|
||||||
Me.gMonTrayToolsGameImportList.Name = "gMonTrayToolsGameImportList"
|
|
||||||
Me.gMonTrayToolsGameImportList.Size = New System.Drawing.Size(201, 22)
|
|
||||||
Me.gMonTrayToolsGameImportList.Text = "I&mport Game List"
|
|
||||||
'
|
|
||||||
'gMonTrayToolsGameExportList
|
|
||||||
'
|
|
||||||
Me.gMonTrayToolsGameExportList.Name = "gMonTrayToolsGameExportList"
|
|
||||||
Me.gMonTrayToolsGameExportList.Size = New System.Drawing.Size(201, 22)
|
|
||||||
Me.gMonTrayToolsGameExportList.Text = "E&xport Game List"
|
|
||||||
'
|
|
||||||
'gMonTrayToolsSyncMan
|
|
||||||
'
|
|
||||||
Me.gMonTrayToolsSyncMan.Name = "gMonTrayToolsSyncMan"
|
|
||||||
Me.gMonTrayToolsSyncMan.Size = New System.Drawing.Size(179, 22)
|
|
||||||
Me.gMonTrayToolsSyncMan.Text = "Sync Ma&nifests"
|
|
||||||
'
|
|
||||||
'gMonTrayToolsCompact
|
'gMonTrayToolsCompact
|
||||||
'
|
'
|
||||||
Me.gMonTrayToolsCompact.Name = "gMonTrayToolsCompact"
|
Me.gMonTrayToolsCompact.Name = "gMonTrayToolsCompact"
|
||||||
Me.gMonTrayToolsCompact.Size = New System.Drawing.Size(179, 22)
|
Me.gMonTrayToolsCompact.Size = New System.Drawing.Size(179, 22)
|
||||||
Me.gMonTrayToolsCompact.Text = "&Compact Databases"
|
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(179, 22)
|
||||||
|
Me.gMonTrayToolsLog.Text = "&Log"
|
||||||
|
'
|
||||||
|
'gMonTrayLogClear
|
||||||
|
'
|
||||||
|
Me.gMonTrayLogClear.Name = "gMonTrayLogClear"
|
||||||
|
Me.gMonTrayLogClear.Size = New System.Drawing.Size(101, 22)
|
||||||
|
Me.gMonTrayLogClear.Text = "&Clear"
|
||||||
|
'
|
||||||
|
'gMonTrayLogSave
|
||||||
|
'
|
||||||
|
Me.gMonTrayLogSave.Name = "gMonTrayLogSave"
|
||||||
|
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
|
'gMonTraySep1
|
||||||
'
|
'
|
||||||
Me.gMonTraySep1.Name = "gMonTraySep1"
|
Me.gMonTraySep1.Name = "gMonTraySep1"
|
||||||
@@ -210,21 +254,25 @@ Partial Class frmMain
|
|||||||
'
|
'
|
||||||
'txtLog
|
'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.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
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, 161)
|
Me.txtLog.Location = New System.Drawing.Point(12, 184)
|
||||||
|
Me.txtLog.MaxLength = 524288
|
||||||
Me.txtLog.Multiline = True
|
Me.txtLog.Multiline = True
|
||||||
Me.txtLog.Name = "txtLog"
|
Me.txtLog.Name = "txtLog"
|
||||||
Me.txtLog.ReadOnly = True
|
Me.txtLog.ReadOnly = True
|
||||||
Me.txtLog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
|
Me.txtLog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
|
||||||
Me.txtLog.Size = New System.Drawing.Size(500, 177)
|
Me.txtLog.Size = New System.Drawing.Size(500, 186)
|
||||||
Me.txtLog.TabIndex = 2
|
Me.txtLog.TabIndex = 10
|
||||||
Me.txtLog.TabStop = False
|
Me.txtLog.TabStop = False
|
||||||
'
|
'
|
||||||
'gMonStatusStrip
|
'gMonStatusStrip
|
||||||
'
|
'
|
||||||
Me.gMonStatusStrip.Font = New System.Drawing.Font("Segoe UI", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
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.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonStripAdminButton, Me.gMonStripTxtStatus, Me.gMonStripStatusButton})
|
||||||
Me.gMonStatusStrip.Location = New System.Drawing.Point(0, 350)
|
Me.gMonStatusStrip.Location = New System.Drawing.Point(0, 379)
|
||||||
Me.gMonStatusStrip.Name = "gMonStatusStrip"
|
Me.gMonStatusStrip.Name = "gMonStatusStrip"
|
||||||
Me.gMonStatusStrip.ShowItemToolTips = True
|
Me.gMonStatusStrip.ShowItemToolTips = True
|
||||||
Me.gMonStatusStrip.Size = New System.Drawing.Size(524, 22)
|
Me.gMonStatusStrip.Size = New System.Drawing.Size(524, 22)
|
||||||
@@ -234,42 +282,35 @@ Partial Class frmMain
|
|||||||
'gMonStripAdminButton
|
'gMonStripAdminButton
|
||||||
'
|
'
|
||||||
Me.gMonStripAdminButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
Me.gMonStripAdminButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||||
Me.gMonStripAdminButton.DropDownButtonWidth = 0
|
Me.gMonStripAdminButton.Image = Global.GBM.My.Resources.Resources.Icon_User
|
||||||
Me.gMonStripAdminButton.Image = Global.GBM.My.Resources.Resources.User
|
|
||||||
Me.gMonStripAdminButton.ImageTransparentColor = System.Drawing.Color.Magenta
|
|
||||||
Me.gMonStripAdminButton.Name = "gMonStripAdminButton"
|
Me.gMonStripAdminButton.Name = "gMonStripAdminButton"
|
||||||
Me.gMonStripAdminButton.Size = New System.Drawing.Size(21, 20)
|
Me.gMonStripAdminButton.Size = New System.Drawing.Size(16, 17)
|
||||||
Me.gMonStripAdminButton.Text = "Elevation"
|
Me.gMonStripAdminButton.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage
|
||||||
Me.gMonStripAdminButton.ToolTipText = "Elevation"
|
|
||||||
'
|
'
|
||||||
'gMonStripTxtStatus
|
'gMonStripTxtStatus
|
||||||
'
|
'
|
||||||
|
Me.gMonStripTxtStatus.Margin = New System.Windows.Forms.Padding(5, 0, 0, 0)
|
||||||
Me.gMonStripTxtStatus.Name = "gMonStripTxtStatus"
|
Me.gMonStripTxtStatus.Name = "gMonStripTxtStatus"
|
||||||
Me.gMonStripTxtStatus.Size = New System.Drawing.Size(395, 17)
|
Me.gMonStripTxtStatus.Size = New System.Drawing.Size(400, 22)
|
||||||
Me.gMonStripTxtStatus.Spring = True
|
Me.gMonStripTxtStatus.Spring = True
|
||||||
Me.gMonStripTxtStatus.Text = "Monitor Status"
|
Me.gMonStripTxtStatus.Text = "Monitor Status"
|
||||||
Me.gMonStripTxtStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
Me.gMonStripTxtStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||||
'
|
'
|
||||||
'gMonStripStatusButton
|
'gMonStripStatusButton
|
||||||
'
|
'
|
||||||
Me.gMonStripStatusButton.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right
|
|
||||||
Me.gMonStripStatusButton.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
|
|
||||||
Me.gMonStripStatusButton.DropDownButtonWidth = 0
|
|
||||||
Me.gMonStripStatusButton.ImageTransparentColor = System.Drawing.Color.Magenta
|
|
||||||
Me.gMonStripStatusButton.Name = "gMonStripStatusButton"
|
Me.gMonStripStatusButton.Name = "gMonStripStatusButton"
|
||||||
Me.gMonStripStatusButton.Size = New System.Drawing.Size(93, 20)
|
Me.gMonStripStatusButton.Size = New System.Drawing.Size(88, 17)
|
||||||
Me.gMonStripStatusButton.Text = "Monitor Status:"
|
Me.gMonStripStatusButton.Text = "Monitor Status:"
|
||||||
Me.gMonStripStatusButton.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage
|
Me.gMonStripStatusButton.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage
|
||||||
Me.gMonStripStatusButton.ToolTipText = "Click to toggle monitoring on or off."
|
|
||||||
'
|
'
|
||||||
'gMonMainMenu
|
'gMonMainMenu
|
||||||
'
|
'
|
||||||
Me.gMonMainMenu.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonFile, Me.gMonSetup, Me.gMonTools, Me.gMonHelp})
|
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.Location = New System.Drawing.Point(0, 0)
|
||||||
Me.gMonMainMenu.Name = "gMonMainMenu"
|
Me.gMonMainMenu.Name = "gMonMainMenu"
|
||||||
Me.gMonMainMenu.RenderMode = System.Windows.Forms.ToolStripRenderMode.System
|
Me.gMonMainMenu.RenderMode = System.Windows.Forms.ToolStripRenderMode.System
|
||||||
Me.gMonMainMenu.Size = New System.Drawing.Size(524, 24)
|
Me.gMonMainMenu.Size = New System.Drawing.Size(524, 24)
|
||||||
Me.gMonMainMenu.TabIndex = 8
|
Me.gMonMainMenu.TabIndex = 0
|
||||||
Me.gMonMainMenu.Text = "MenuStrip1"
|
Me.gMonMainMenu.Text = "MenuStrip1"
|
||||||
'
|
'
|
||||||
'gMonFile
|
'gMonFile
|
||||||
@@ -309,7 +350,7 @@ Partial Class frmMain
|
|||||||
'
|
'
|
||||||
'gMonSetup
|
'gMonSetup
|
||||||
'
|
'
|
||||||
Me.gMonSetup.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonSetupGameManager, Me.gMonSetupAddWizard, Me.gMonSetupCustomVariables})
|
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.Name = "gMonSetup"
|
||||||
Me.gMonSetup.Size = New System.Drawing.Size(49, 20)
|
Me.gMonSetup.Size = New System.Drawing.Size(49, 20)
|
||||||
Me.gMonSetup.Text = "&Setup"
|
Me.gMonSetup.Text = "&Setup"
|
||||||
@@ -330,77 +371,116 @@ Partial Class frmMain
|
|||||||
'
|
'
|
||||||
Me.gMonSetupCustomVariables.Name = "gMonSetupCustomVariables"
|
Me.gMonSetupCustomVariables.Name = "gMonSetupCustomVariables"
|
||||||
Me.gMonSetupCustomVariables.Size = New System.Drawing.Size(201, 22)
|
Me.gMonSetupCustomVariables.Size = New System.Drawing.Size(201, 22)
|
||||||
Me.gMonSetupCustomVariables.Text = "Custom &Path Variables..."
|
Me.gMonSetupCustomVariables.Text = "Custom Path &Variables..."
|
||||||
|
'
|
||||||
|
'gMonSetupTags
|
||||||
|
'
|
||||||
|
Me.gMonSetupTags.Name = "gMonSetupTags"
|
||||||
|
Me.gMonSetupTags.Size = New System.Drawing.Size(201, 22)
|
||||||
|
Me.gMonSetupTags.Text = "&Tag Manager..."
|
||||||
|
'
|
||||||
|
'gMonSetupProcessManager
|
||||||
|
'
|
||||||
|
Me.gMonSetupProcessManager.Name = "gMonSetupProcessManager"
|
||||||
|
Me.gMonSetupProcessManager.Size = New System.Drawing.Size(201, 22)
|
||||||
|
Me.gMonSetupProcessManager.Text = "&Process Manager..."
|
||||||
'
|
'
|
||||||
'gMonTools
|
'gMonTools
|
||||||
'
|
'
|
||||||
Me.gMonTools.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonToolsGameList, Me.gMonToolsSyncMan, Me.gMonToolsCompact})
|
Me.gMonTools.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonToolsCompact, Me.gMonToolsLog, Me.gMonToolsSessions, Me.gMonToolsSyncGameID})
|
||||||
Me.gMonTools.Name = "gMonTools"
|
Me.gMonTools.Name = "gMonTools"
|
||||||
Me.gMonTools.Size = New System.Drawing.Size(47, 20)
|
Me.gMonTools.Size = New System.Drawing.Size(47, 20)
|
||||||
Me.gMonTools.Text = "&Tools"
|
Me.gMonTools.Text = "&Tools"
|
||||||
'
|
'
|
||||||
'gMonToolsGameList
|
|
||||||
'
|
|
||||||
Me.gMonToolsGameList.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonToolsGameImportOfficialList, Me.gMonToolsGameImportList, Me.gMonToolsGameExportList})
|
|
||||||
Me.gMonToolsGameList.Name = "gMonToolsGameList"
|
|
||||||
Me.gMonToolsGameList.Size = New System.Drawing.Size(179, 22)
|
|
||||||
Me.gMonToolsGameList.Text = "&Game List"
|
|
||||||
'
|
|
||||||
'gMonToolsGameImportOfficialList
|
|
||||||
'
|
|
||||||
Me.gMonToolsGameImportOfficialList.Name = "gMonToolsGameImportOfficialList"
|
|
||||||
Me.gMonToolsGameImportOfficialList.Size = New System.Drawing.Size(201, 22)
|
|
||||||
Me.gMonToolsGameImportOfficialList.Text = "Import from &Official List"
|
|
||||||
'
|
|
||||||
'gMonToolsGameImportList
|
|
||||||
'
|
|
||||||
Me.gMonToolsGameImportList.Name = "gMonToolsGameImportList"
|
|
||||||
Me.gMonToolsGameImportList.Size = New System.Drawing.Size(201, 22)
|
|
||||||
Me.gMonToolsGameImportList.Text = "I&mport Game List"
|
|
||||||
'
|
|
||||||
'gMonToolsGameExportList
|
|
||||||
'
|
|
||||||
Me.gMonToolsGameExportList.Name = "gMonToolsGameExportList"
|
|
||||||
Me.gMonToolsGameExportList.Size = New System.Drawing.Size(201, 22)
|
|
||||||
Me.gMonToolsGameExportList.Text = "E&xport Game List"
|
|
||||||
'
|
|
||||||
'gMonToolsSyncMan
|
|
||||||
'
|
|
||||||
Me.gMonToolsSyncMan.Name = "gMonToolsSyncMan"
|
|
||||||
Me.gMonToolsSyncMan.Size = New System.Drawing.Size(179, 22)
|
|
||||||
Me.gMonToolsSyncMan.Text = "Sync Ma&nifests"
|
|
||||||
'
|
|
||||||
'gMonToolsCompact
|
'gMonToolsCompact
|
||||||
'
|
'
|
||||||
Me.gMonToolsCompact.Name = "gMonToolsCompact"
|
Me.gMonToolsCompact.Name = "gMonToolsCompact"
|
||||||
Me.gMonToolsCompact.Size = New System.Drawing.Size(179, 22)
|
Me.gMonToolsCompact.Size = New System.Drawing.Size(179, 22)
|
||||||
Me.gMonToolsCompact.Text = "&Compact Databases"
|
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(179, 22)
|
||||||
|
Me.gMonToolsLog.Text = "&Log"
|
||||||
|
'
|
||||||
|
'gMonLogClear
|
||||||
|
'
|
||||||
|
Me.gMonLogClear.Name = "gMonLogClear"
|
||||||
|
Me.gMonLogClear.Size = New System.Drawing.Size(101, 22)
|
||||||
|
Me.gMonLogClear.Text = "&Clear"
|
||||||
|
'
|
||||||
|
'gMonLogSave
|
||||||
|
'
|
||||||
|
Me.gMonLogSave.Name = "gMonLogSave"
|
||||||
|
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
|
'gMonHelp
|
||||||
'
|
'
|
||||||
Me.gMonHelp.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonHelpManual, Me.gMonHelpCheckforUpdates, Me.gMonHelpAbout})
|
Me.gMonHelp.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.gMonHelpWebSite, Me.gMonHelpManual, Me.gMonHelpCheckforUpdates, Me.gMonHelpAbout})
|
||||||
Me.gMonHelp.Name = "gMonHelp"
|
Me.gMonHelp.Name = "gMonHelp"
|
||||||
Me.gMonHelp.Size = New System.Drawing.Size(44, 20)
|
Me.gMonHelp.Size = New System.Drawing.Size(44, 20)
|
||||||
Me.gMonHelp.Text = "&Help"
|
Me.gMonHelp.Text = "&Help"
|
||||||
'
|
'
|
||||||
|
'gMonHelpWebSite
|
||||||
|
'
|
||||||
|
Me.gMonHelpWebSite.Name = "gMonHelpWebSite"
|
||||||
|
Me.gMonHelpWebSite.Size = New System.Drawing.Size(180, 22)
|
||||||
|
Me.gMonHelpWebSite.Text = "&Official Web Site..."
|
||||||
|
'
|
||||||
'gMonHelpManual
|
'gMonHelpManual
|
||||||
'
|
'
|
||||||
Me.gMonHelpManual.Name = "gMonHelpManual"
|
Me.gMonHelpManual.Name = "gMonHelpManual"
|
||||||
Me.gMonHelpManual.Size = New System.Drawing.Size(171, 22)
|
Me.gMonHelpManual.Size = New System.Drawing.Size(180, 22)
|
||||||
Me.gMonHelpManual.Text = "Online &Manual"
|
Me.gMonHelpManual.Text = "Online &Manual..."
|
||||||
'
|
'
|
||||||
'gMonHelpCheckforUpdates
|
'gMonHelpCheckforUpdates
|
||||||
'
|
'
|
||||||
Me.gMonHelpCheckforUpdates.Name = "gMonHelpCheckforUpdates"
|
Me.gMonHelpCheckforUpdates.Name = "gMonHelpCheckforUpdates"
|
||||||
Me.gMonHelpCheckforUpdates.Size = New System.Drawing.Size(171, 22)
|
Me.gMonHelpCheckforUpdates.Size = New System.Drawing.Size(180, 22)
|
||||||
Me.gMonHelpCheckforUpdates.Text = "Check for Updates"
|
Me.gMonHelpCheckforUpdates.Text = "&Check for Updates..."
|
||||||
'
|
'
|
||||||
'gMonHelpAbout
|
'gMonHelpAbout
|
||||||
'
|
'
|
||||||
Me.gMonHelpAbout.Name = "gMonHelpAbout"
|
Me.gMonHelpAbout.Name = "gMonHelpAbout"
|
||||||
Me.gMonHelpAbout.Size = New System.Drawing.Size(171, 22)
|
Me.gMonHelpAbout.Size = New System.Drawing.Size(180, 22)
|
||||||
Me.gMonHelpAbout.Text = "&About"
|
Me.gMonHelpAbout.Text = "&About"
|
||||||
'
|
'
|
||||||
|
'gMonNotification
|
||||||
|
'
|
||||||
|
Me.gMonNotification.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right
|
||||||
|
Me.gMonNotification.Name = "gMonNotification"
|
||||||
|
Me.gMonNotification.Size = New System.Drawing.Size(82, 20)
|
||||||
|
Me.gMonNotification.Text = "Notification"
|
||||||
|
Me.gMonNotification.Visible = False
|
||||||
|
'
|
||||||
'pbIcon
|
'pbIcon
|
||||||
'
|
'
|
||||||
Me.pbIcon.Location = New System.Drawing.Point(12, 36)
|
Me.pbIcon.Location = New System.Drawing.Point(12, 36)
|
||||||
@@ -410,107 +490,119 @@ Partial Class frmMain
|
|||||||
Me.pbIcon.TabIndex = 9
|
Me.pbIcon.TabIndex = 9
|
||||||
Me.pbIcon.TabStop = False
|
Me.pbIcon.TabStop = False
|
||||||
'
|
'
|
||||||
'btnLogToggle
|
|
||||||
'
|
|
||||||
Me.btnLogToggle.Location = New System.Drawing.Point(437, 132)
|
|
||||||
Me.btnLogToggle.Name = "btnLogToggle"
|
|
||||||
Me.btnLogToggle.Size = New System.Drawing.Size(75, 23)
|
|
||||||
Me.btnLogToggle.TabIndex = 1
|
|
||||||
Me.btnLogToggle.Text = "Show &Log"
|
|
||||||
Me.btnLogToggle.UseVisualStyleBackColor = True
|
|
||||||
'
|
|
||||||
'lblGameTitle
|
'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.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.Location = New System.Drawing.Point(66, 36)
|
||||||
Me.lblGameTitle.Name = "lblGameTitle"
|
Me.lblGameTitle.Name = "lblGameTitle"
|
||||||
Me.lblGameTitle.Size = New System.Drawing.Size(446, 16)
|
Me.lblGameTitle.Size = New System.Drawing.Size(446, 16)
|
||||||
Me.lblGameTitle.TabIndex = 10
|
Me.lblGameTitle.TabIndex = 1
|
||||||
Me.lblGameTitle.Text = "Game Title"
|
Me.lblGameTitle.Text = "Game Title"
|
||||||
'
|
'
|
||||||
'lblLastAction
|
'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.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, 139)
|
Me.lblLastAction.Location = New System.Drawing.Point(12, 165)
|
||||||
Me.lblLastAction.Name = "lblLastAction"
|
Me.lblLastAction.Name = "lblLastAction"
|
||||||
Me.lblLastAction.Size = New System.Drawing.Size(419, 16)
|
Me.lblLastAction.Size = New System.Drawing.Size(419, 13)
|
||||||
Me.lblLastAction.TabIndex = 11
|
Me.lblLastAction.TabIndex = 9
|
||||||
Me.lblLastAction.Text = "Last Action"
|
Me.lblLastAction.Text = "Last Action"
|
||||||
'
|
'
|
||||||
'lblLastActionTitle
|
'lblLastActionTitle
|
||||||
'
|
'
|
||||||
Me.lblLastActionTitle.AutoSize = True
|
Me.lblLastActionTitle.AutoSize = True
|
||||||
Me.lblLastActionTitle.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
Me.lblLastActionTitle.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
Me.lblLastActionTitle.Location = New System.Drawing.Point(12, 126)
|
Me.lblLastActionTitle.Location = New System.Drawing.Point(12, 147)
|
||||||
Me.lblLastActionTitle.Name = "lblLastActionTitle"
|
Me.lblLastActionTitle.Name = "lblLastActionTitle"
|
||||||
Me.lblLastActionTitle.Size = New System.Drawing.Size(75, 13)
|
Me.lblLastActionTitle.Size = New System.Drawing.Size(75, 13)
|
||||||
Me.lblLastActionTitle.TabIndex = 12
|
Me.lblLastActionTitle.TabIndex = 8
|
||||||
Me.lblLastActionTitle.Text = "Last Action:"
|
Me.lblLastActionTitle.Text = "Last Action:"
|
||||||
'
|
'
|
||||||
'lblTimeTitle
|
|
||||||
'
|
|
||||||
Me.lblTimeTitle.AutoSize = True
|
|
||||||
Me.lblTimeTitle.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
|
||||||
Me.lblTimeTitle.Location = New System.Drawing.Point(66, 55)
|
|
||||||
Me.lblTimeTitle.Name = "lblTimeTitle"
|
|
||||||
Me.lblTimeTitle.Size = New System.Drawing.Size(75, 13)
|
|
||||||
Me.lblTimeTitle.TabIndex = 13
|
|
||||||
Me.lblTimeTitle.Text = "Time Spent:"
|
|
||||||
'
|
|
||||||
'lblTimeSpent
|
'lblTimeSpent
|
||||||
'
|
'
|
||||||
Me.lblTimeSpent.AutoSize = True
|
Me.lblTimeSpent.AutoEllipsis = True
|
||||||
Me.lblTimeSpent.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
Me.lblTimeSpent.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
Me.lblTimeSpent.Location = New System.Drawing.Point(139, 55)
|
Me.lblTimeSpent.Location = New System.Drawing.Point(66, 110)
|
||||||
Me.lblTimeSpent.Name = "lblTimeSpent"
|
Me.lblTimeSpent.Name = "lblTimeSpent"
|
||||||
Me.lblTimeSpent.Size = New System.Drawing.Size(44, 13)
|
Me.lblTimeSpent.Size = New System.Drawing.Size(446, 16)
|
||||||
Me.lblTimeSpent.TabIndex = 14
|
Me.lblTimeSpent.TabIndex = 5
|
||||||
Me.lblTimeSpent.Text = "0 Hours"
|
Me.lblTimeSpent.Text = "0 Hours"
|
||||||
'
|
'
|
||||||
'txtGameInfo
|
|
||||||
'
|
|
||||||
Me.txtGameInfo.BorderStyle = System.Windows.Forms.BorderStyle.None
|
|
||||||
Me.txtGameInfo.Cursor = System.Windows.Forms.Cursors.Default
|
|
||||||
Me.txtGameInfo.Location = New System.Drawing.Point(69, 71)
|
|
||||||
Me.txtGameInfo.Multiline = True
|
|
||||||
Me.txtGameInfo.Name = "txtGameInfo"
|
|
||||||
Me.txtGameInfo.ReadOnly = True
|
|
||||||
Me.txtGameInfo.Size = New System.Drawing.Size(443, 52)
|
|
||||||
Me.txtGameInfo.TabIndex = 0
|
|
||||||
Me.txtGameInfo.TabStop = False
|
|
||||||
Me.txtGameInfo.WordWrap = False
|
|
||||||
'
|
|
||||||
'btnCancelOperation
|
'btnCancelOperation
|
||||||
'
|
'
|
||||||
Me.btnCancelOperation.Location = New System.Drawing.Point(437, 103)
|
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.Name = "btnCancelOperation"
|
||||||
Me.btnCancelOperation.Size = New System.Drawing.Size(75, 23)
|
Me.btnCancelOperation.Size = New System.Drawing.Size(75, 23)
|
||||||
Me.btnCancelOperation.TabIndex = 0
|
Me.btnCancelOperation.TabIndex = 6
|
||||||
Me.btnCancelOperation.Text = "&Cancel"
|
Me.btnCancelOperation.Text = "&Cancel"
|
||||||
Me.btnCancelOperation.UseVisualStyleBackColor = True
|
Me.btnCancelOperation.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
|
'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"
|
||||||
|
Me.lblStatus1.Size = New System.Drawing.Size(446, 13)
|
||||||
|
Me.lblStatus1.TabIndex = 2
|
||||||
|
'
|
||||||
|
'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"
|
||||||
|
Me.lblStatus2.Size = New System.Drawing.Size(446, 13)
|
||||||
|
Me.lblStatus2.TabIndex = 3
|
||||||
|
'
|
||||||
|
'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"
|
||||||
|
Me.lblStatus3.Size = New System.Drawing.Size(446, 13)
|
||||||
|
Me.lblStatus3.TabIndex = 4
|
||||||
|
'
|
||||||
|
'pbTime
|
||||||
|
'
|
||||||
|
Me.pbTime.Location = New System.Drawing.Point(36, 106)
|
||||||
|
Me.pbTime.Name = "pbTime"
|
||||||
|
Me.pbTime.Size = New System.Drawing.Size(24, 24)
|
||||||
|
Me.pbTime.TabIndex = 18
|
||||||
|
Me.pbTime.TabStop = False
|
||||||
|
'
|
||||||
'frmMain
|
'frmMain
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
Me.ClientSize = New System.Drawing.Size(524, 372)
|
Me.ClientSize = New System.Drawing.Size(524, 401)
|
||||||
|
Me.Controls.Add(Me.pbTime)
|
||||||
|
Me.Controls.Add(Me.lblStatus3)
|
||||||
|
Me.Controls.Add(Me.lblStatus2)
|
||||||
|
Me.Controls.Add(Me.lblStatus1)
|
||||||
Me.Controls.Add(Me.btnCancelOperation)
|
Me.Controls.Add(Me.btnCancelOperation)
|
||||||
Me.Controls.Add(Me.txtGameInfo)
|
|
||||||
Me.Controls.Add(Me.lblTimeSpent)
|
Me.Controls.Add(Me.lblTimeSpent)
|
||||||
Me.Controls.Add(Me.lblTimeTitle)
|
|
||||||
Me.Controls.Add(Me.lblLastActionTitle)
|
Me.Controls.Add(Me.lblLastActionTitle)
|
||||||
Me.Controls.Add(Me.lblLastAction)
|
Me.Controls.Add(Me.lblLastAction)
|
||||||
Me.Controls.Add(Me.lblGameTitle)
|
Me.Controls.Add(Me.lblGameTitle)
|
||||||
Me.Controls.Add(Me.btnLogToggle)
|
|
||||||
Me.Controls.Add(Me.pbIcon)
|
Me.Controls.Add(Me.pbIcon)
|
||||||
Me.Controls.Add(Me.gMonStatusStrip)
|
Me.Controls.Add(Me.gMonStatusStrip)
|
||||||
Me.Controls.Add(Me.gMonMainMenu)
|
Me.Controls.Add(Me.gMonMainMenu)
|
||||||
Me.Controls.Add(Me.txtLog)
|
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.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||||
|
Me.KeyPreview = True
|
||||||
Me.MainMenuStrip = Me.gMonMainMenu
|
Me.MainMenuStrip = Me.gMonMainMenu
|
||||||
Me.MaximizeBox = False
|
|
||||||
Me.MinimizeBox = False
|
Me.MinimizeBox = False
|
||||||
Me.Name = "frmMain"
|
Me.Name = "frmMain"
|
||||||
Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide
|
Me.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide
|
||||||
@@ -522,6 +614,7 @@ Partial Class frmMain
|
|||||||
Me.gMonMainMenu.ResumeLayout(False)
|
Me.gMonMainMenu.ResumeLayout(False)
|
||||||
Me.gMonMainMenu.PerformLayout()
|
Me.gMonMainMenu.PerformLayout()
|
||||||
CType(Me.pbIcon, System.ComponentModel.ISupportInitialize).EndInit()
|
CType(Me.pbIcon, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
|
CType(Me.pbTime, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
Me.ResumeLayout(False)
|
Me.ResumeLayout(False)
|
||||||
Me.PerformLayout()
|
Me.PerformLayout()
|
||||||
|
|
||||||
@@ -551,29 +644,15 @@ Partial Class frmMain
|
|||||||
Friend WithEvents gMonHelpAbout As System.Windows.Forms.ToolStripMenuItem
|
Friend WithEvents gMonHelpAbout As System.Windows.Forms.ToolStripMenuItem
|
||||||
Friend WithEvents gMonTraySetupGameManager As System.Windows.Forms.ToolStripMenuItem
|
Friend WithEvents gMonTraySetupGameManager As System.Windows.Forms.ToolStripMenuItem
|
||||||
Friend WithEvents gMonTraySetupCustomVariables As System.Windows.Forms.ToolStripMenuItem
|
Friend WithEvents gMonTraySetupCustomVariables As System.Windows.Forms.ToolStripMenuItem
|
||||||
Friend WithEvents gMonStripStatusButton As System.Windows.Forms.ToolStripSplitButton
|
|
||||||
Friend WithEvents pbIcon As System.Windows.Forms.PictureBox
|
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 lblGameTitle As System.Windows.Forms.Label
|
||||||
Friend WithEvents lblLastAction As System.Windows.Forms.Label
|
Friend WithEvents lblLastAction As System.Windows.Forms.Label
|
||||||
Friend WithEvents lblLastActionTitle As System.Windows.Forms.Label
|
Friend WithEvents lblLastActionTitle As System.Windows.Forms.Label
|
||||||
Friend WithEvents gMonTools As System.Windows.Forms.ToolStripMenuItem
|
Friend WithEvents gMonTools As System.Windows.Forms.ToolStripMenuItem
|
||||||
Friend WithEvents gMonToolsSyncMan As System.Windows.Forms.ToolStripMenuItem
|
|
||||||
Friend WithEvents gMonTrayTools As System.Windows.Forms.ToolStripMenuItem
|
Friend WithEvents gMonTrayTools As System.Windows.Forms.ToolStripMenuItem
|
||||||
Friend WithEvents gMonTrayToolsSyncMan As System.Windows.Forms.ToolStripMenuItem
|
|
||||||
Friend WithEvents gMonSetupAddWizard As System.Windows.Forms.ToolStripMenuItem
|
Friend WithEvents gMonSetupAddWizard As System.Windows.Forms.ToolStripMenuItem
|
||||||
Friend WithEvents gMonTraySetupAddWizard As System.Windows.Forms.ToolStripMenuItem
|
Friend WithEvents gMonTraySetupAddWizard As System.Windows.Forms.ToolStripMenuItem
|
||||||
Friend WithEvents lblTimeTitle As System.Windows.Forms.Label
|
|
||||||
Friend WithEvents lblTimeSpent As System.Windows.Forms.Label
|
Friend WithEvents lblTimeSpent As System.Windows.Forms.Label
|
||||||
Friend WithEvents txtGameInfo As System.Windows.Forms.TextBox
|
|
||||||
Friend WithEvents gMonToolsGameList As System.Windows.Forms.ToolStripMenuItem
|
|
||||||
Friend WithEvents gMonToolsGameImportOfficialList As System.Windows.Forms.ToolStripMenuItem
|
|
||||||
Friend WithEvents gMonToolsGameImportList As System.Windows.Forms.ToolStripMenuItem
|
|
||||||
Friend WithEvents gMonToolsGameExportList As System.Windows.Forms.ToolStripMenuItem
|
|
||||||
Friend WithEvents gMonTrayToolsGameList As System.Windows.Forms.ToolStripMenuItem
|
|
||||||
Friend WithEvents gMonTrayToolsGameImportList As System.Windows.Forms.ToolStripMenuItem
|
|
||||||
Friend WithEvents gMonTrayToolsGameExportList As System.Windows.Forms.ToolStripMenuItem
|
|
||||||
Friend WithEvents gMonTrayToolsGameImportOfficialList As System.Windows.Forms.ToolStripMenuItem
|
|
||||||
Friend WithEvents gMonSetupGameManager As System.Windows.Forms.ToolStripMenuItem
|
Friend WithEvents gMonSetupGameManager As System.Windows.Forms.ToolStripMenuItem
|
||||||
Friend WithEvents gMonSetupCustomVariables As System.Windows.Forms.ToolStripMenuItem
|
Friend WithEvents gMonSetupCustomVariables As System.Windows.Forms.ToolStripMenuItem
|
||||||
Friend WithEvents gMonToolsCompact As System.Windows.Forms.ToolStripMenuItem
|
Friend WithEvents gMonToolsCompact As System.Windows.Forms.ToolStripMenuItem
|
||||||
@@ -581,5 +660,31 @@ Partial Class frmMain
|
|||||||
Friend WithEvents gMonHelpManual As System.Windows.Forms.ToolStripMenuItem
|
Friend WithEvents gMonHelpManual As System.Windows.Forms.ToolStripMenuItem
|
||||||
Friend WithEvents gMonHelpCheckforUpdates As System.Windows.Forms.ToolStripMenuItem
|
Friend WithEvents gMonHelpCheckforUpdates As System.Windows.Forms.ToolStripMenuItem
|
||||||
Friend WithEvents btnCancelOperation As System.Windows.Forms.Button
|
Friend WithEvents btnCancelOperation As System.Windows.Forms.Button
|
||||||
Friend WithEvents gMonStripAdminButton As ToolStripSplitButton
|
Friend WithEvents gMonTraySetupTags As System.Windows.Forms.ToolStripMenuItem
|
||||||
|
Friend WithEvents gMonSetupTags As System.Windows.Forms.ToolStripMenuItem
|
||||||
|
Friend WithEvents lblStatus1 As Label
|
||||||
|
Friend WithEvents lblStatus2 As Label
|
||||||
|
Friend WithEvents lblStatus3 As Label
|
||||||
|
Friend WithEvents gMonNotification As System.Windows.Forms.ToolStripMenuItem
|
||||||
|
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 gMonToolsLog As ToolStripMenuItem
|
||||||
|
Friend WithEvents gMonLogClear As ToolStripMenuItem
|
||||||
|
Friend WithEvents gMonLogSave As ToolStripMenuItem
|
||||||
|
Friend WithEvents gMonTrayToolsLog As ToolStripMenuItem
|
||||||
|
Friend WithEvents gMonTrayLogClear As ToolStripMenuItem
|
||||||
|
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
|
End Class
|
||||||
|
|||||||
+1102
-385
File diff suppressed because it is too large
Load Diff
Generated
-105
@@ -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
|
|
||||||
Generated
+242
@@ -0,0 +1,242 @@
|
|||||||
|
<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.ShowIcon = False
|
||||||
|
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,371 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
'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
|
||||||
Generated
+180
@@ -0,0 +1,180 @@
|
|||||||
|
<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.grpDateType = New System.Windows.Forms.GroupBox()
|
||||||
|
Me.optCSV = New System.Windows.Forms.RadioButton()
|
||||||
|
Me.optXML = New System.Windows.Forms.RadioButton()
|
||||||
|
Me.optCurrentLocale = New System.Windows.Forms.RadioButton()
|
||||||
|
Me.optUnix = 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"
|
||||||
|
'
|
||||||
|
'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"
|
||||||
|
'
|
||||||
|
'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
|
||||||
|
'
|
||||||
|
'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
|
||||||
|
'
|
||||||
|
'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
|
||||||
|
'
|
||||||
|
'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
|
||||||
|
'
|
||||||
|
'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.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,90 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
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
|
||||||
Generated
+200
@@ -0,0 +1,200 @@
|
|||||||
|
<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.ShowIcon = False
|
||||||
|
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,318 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
'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
|
||||||
Generated
+622
-188
@@ -22,63 +22,563 @@ Partial Class frmSettings
|
|||||||
'Do not modify it using the code editor.
|
'Do not modify it using the code editor.
|
||||||
<System.Diagnostics.DebuggerStepThrough()> _
|
<System.Diagnostics.DebuggerStepThrough()> _
|
||||||
Private Sub InitializeComponent()
|
Private Sub InitializeComponent()
|
||||||
Me.chkMonitorOnStartup = New System.Windows.Forms.CheckBox()
|
Me.chkAutoSaveLog = New System.Windows.Forms.CheckBox()
|
||||||
Me.chkBackupConfirm = New System.Windows.Forms.CheckBox()
|
Me.btnOptionalFields = New System.Windows.Forms.Button()
|
||||||
Me.grpGeneral = New System.Windows.Forms.GroupBox()
|
Me.chkTimeTracking = New System.Windows.Forms.CheckBox()
|
||||||
Me.chkStartWindows = New System.Windows.Forms.CheckBox()
|
|
||||||
Me.chkSync = New System.Windows.Forms.CheckBox()
|
|
||||||
Me.chkShowDetectionTips = New System.Windows.Forms.CheckBox()
|
Me.chkShowDetectionTips = New System.Windows.Forms.CheckBox()
|
||||||
Me.chkStartToTray = New System.Windows.Forms.CheckBox()
|
Me.grpFolderOptions = New System.Windows.Forms.GroupBox()
|
||||||
Me.grpPaths = New System.Windows.Forms.GroupBox()
|
Me.chkUseGameID = New System.Windows.Forms.CheckBox()
|
||||||
Me.btnBackupFolder = New System.Windows.Forms.Button()
|
Me.btnBackupFolder = New System.Windows.Forms.Button()
|
||||||
Me.lblBackupFolder = New System.Windows.Forms.Label()
|
Me.lblBackupFolder = New System.Windows.Forms.Label()
|
||||||
Me.txtBackupFolder = New System.Windows.Forms.TextBox()
|
Me.txtBackupFolder = New System.Windows.Forms.TextBox()
|
||||||
Me.fbBrowser = New System.Windows.Forms.FolderBrowserDialog()
|
Me.chkCreateFolder = New System.Windows.Forms.CheckBox()
|
||||||
Me.btnSave = New System.Windows.Forms.Button()
|
Me.btnSave = New System.Windows.Forms.Button()
|
||||||
Me.btnCancel = New System.Windows.Forms.Button()
|
Me.btnCancel = New System.Windows.Forms.Button()
|
||||||
Me.grpBackup = New System.Windows.Forms.GroupBox()
|
Me.grp7zGeneral = New System.Windows.Forms.GroupBox()
|
||||||
Me.chkCheckSum = New System.Windows.Forms.CheckBox()
|
Me.cboCompression = New System.Windows.Forms.ComboBox()
|
||||||
Me.chkRestoreOnLaunch = New System.Windows.Forms.CheckBox()
|
Me.lblCompression = New System.Windows.Forms.Label()
|
||||||
|
Me.btn7zLocation = New System.Windows.Forms.Button()
|
||||||
|
Me.txt7zLocation = New System.Windows.Forms.TextBox()
|
||||||
|
Me.lblLocation = New System.Windows.Forms.Label()
|
||||||
|
Me.txt7zArguments = New System.Windows.Forms.TextBox()
|
||||||
|
Me.lblArguments = New System.Windows.Forms.Label()
|
||||||
|
Me.lbl7zCopyright = New System.Windows.Forms.Label()
|
||||||
|
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.chkBackupConfirm = New System.Windows.Forms.CheckBox()
|
||||||
Me.chkOverwriteWarning = New System.Windows.Forms.CheckBox()
|
Me.chkOverwriteWarning = New System.Windows.Forms.CheckBox()
|
||||||
Me.chkCreateFolder = New System.Windows.Forms.CheckBox()
|
Me.grpBackupHandling = New System.Windows.Forms.GroupBox()
|
||||||
Me.grpGeneral.SuspendLayout()
|
Me.chkAutoRestore = New System.Windows.Forms.CheckBox()
|
||||||
Me.grpPaths.SuspendLayout()
|
Me.chkRestoreNotify = New System.Windows.Forms.CheckBox()
|
||||||
Me.grpBackup.SuspendLayout()
|
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.btnResetMessages = New System.Windows.Forms.Button()
|
||||||
|
Me.pnlStartup = New System.Windows.Forms.Panel()
|
||||||
|
Me.grpStartup = New System.Windows.Forms.GroupBox()
|
||||||
|
Me.chkBackupOnLaunch = New System.Windows.Forms.CheckBox()
|
||||||
|
Me.chkStartWindows = New System.Windows.Forms.CheckBox()
|
||||||
|
Me.chkStartToTray = New System.Windows.Forms.CheckBox()
|
||||||
|
Me.chkMonitorOnStartup = New System.Windows.Forms.CheckBox()
|
||||||
|
Me.grpFolderOptions.SuspendLayout()
|
||||||
|
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.SuspendLayout()
|
Me.SuspendLayout()
|
||||||
'
|
'
|
||||||
'chkMonitorOnStartup
|
'chkAutoSaveLog
|
||||||
'
|
'
|
||||||
Me.chkMonitorOnStartup.AutoSize = True
|
Me.chkAutoSaveLog.AutoSize = True
|
||||||
Me.chkMonitorOnStartup.Location = New System.Drawing.Point(6, 65)
|
Me.chkAutoSaveLog.Location = New System.Drawing.Point(6, 42)
|
||||||
Me.chkMonitorOnStartup.Name = "chkMonitorOnStartup"
|
Me.chkAutoSaveLog.Name = "chkAutoSaveLog"
|
||||||
Me.chkMonitorOnStartup.Size = New System.Drawing.Size(146, 17)
|
Me.chkAutoSaveLog.Size = New System.Drawing.Size(231, 17)
|
||||||
Me.chkMonitorOnStartup.TabIndex = 2
|
Me.chkAutoSaveLog.TabIndex = 1
|
||||||
Me.chkMonitorOnStartup.Text = "Start monitoring at launch"
|
Me.chkAutoSaveLog.Text = "Autosave log when max length is exceeded"
|
||||||
Me.chkMonitorOnStartup.UseVisualStyleBackColor = True
|
Me.chkAutoSaveLog.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'btnOptionalFields
|
||||||
|
'
|
||||||
|
Me.btnOptionalFields.Location = New System.Drawing.Point(6, 88)
|
||||||
|
Me.btnOptionalFields.Name = "btnOptionalFields"
|
||||||
|
Me.btnOptionalFields.Size = New System.Drawing.Size(216, 23)
|
||||||
|
Me.btnOptionalFields.TabIndex = 3
|
||||||
|
Me.btnOptionalFields.Text = "Choose &Optional Sync Fields..."
|
||||||
|
Me.btnOptionalFields.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'chkTimeTracking
|
||||||
|
'
|
||||||
|
Me.chkTimeTracking.AutoSize = True
|
||||||
|
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 = 0
|
||||||
|
Me.chkTimeTracking.Text = "Enable time tracking"
|
||||||
|
Me.chkTimeTracking.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'chkShowDetectionTips
|
||||||
|
'
|
||||||
|
Me.chkShowDetectionTips.AutoSize = True
|
||||||
|
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 = 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, 90)
|
||||||
|
Me.grpFolderOptions.TabIndex = 0
|
||||||
|
Me.grpFolderOptions.TabStop = False
|
||||||
|
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 = 1
|
||||||
|
Me.btnBackupFolder.Text = "..."
|
||||||
|
Me.btnBackupFolder.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'lblBackupFolder
|
||||||
|
'
|
||||||
|
Me.lblBackupFolder.AutoSize = True
|
||||||
|
Me.lblBackupFolder.Location = New System.Drawing.Point(6, 20)
|
||||||
|
Me.lblBackupFolder.Name = "lblBackupFolder"
|
||||||
|
Me.lblBackupFolder.Size = New System.Drawing.Size(79, 13)
|
||||||
|
Me.lblBackupFolder.TabIndex = 0
|
||||||
|
Me.lblBackupFolder.Text = "Backup Folder:"
|
||||||
|
'
|
||||||
|
'txtBackupFolder
|
||||||
|
'
|
||||||
|
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 = 0
|
||||||
|
'
|
||||||
|
'chkCreateFolder
|
||||||
|
'
|
||||||
|
Me.chkCreateFolder.AutoSize = True
|
||||||
|
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 = 2
|
||||||
|
Me.chkCreateFolder.Text = "Create a sub-folder for each game"
|
||||||
|
Me.chkCreateFolder.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'btnSave
|
||||||
|
'
|
||||||
|
Me.btnSave.DialogResult = System.Windows.Forms.DialogResult.OK
|
||||||
|
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 = 7
|
||||||
|
Me.btnSave.Text = "&Save"
|
||||||
|
Me.btnSave.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'btnCancel
|
||||||
|
'
|
||||||
|
Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
|
||||||
|
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 = 8
|
||||||
|
Me.btnCancel.Text = "&Cancel"
|
||||||
|
Me.btnCancel.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'grp7zGeneral
|
||||||
|
'
|
||||||
|
Me.grp7zGeneral.Controls.Add(Me.cboCompression)
|
||||||
|
Me.grp7zGeneral.Controls.Add(Me.lblCompression)
|
||||||
|
Me.grp7zGeneral.Location = New System.Drawing.Point(6, 12)
|
||||||
|
Me.grp7zGeneral.Name = "grp7zGeneral"
|
||||||
|
Me.grp7zGeneral.Size = New System.Drawing.Size(354, 50)
|
||||||
|
Me.grp7zGeneral.TabIndex = 0
|
||||||
|
Me.grp7zGeneral.TabStop = False
|
||||||
|
Me.grp7zGeneral.Text = "General"
|
||||||
|
'
|
||||||
|
'cboCompression
|
||||||
|
'
|
||||||
|
Me.cboCompression.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||||
|
Me.cboCompression.FormattingEnabled = True
|
||||||
|
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 = 0
|
||||||
|
'
|
||||||
|
'lblCompression
|
||||||
|
'
|
||||||
|
Me.lblCompression.AutoSize = True
|
||||||
|
Me.lblCompression.Location = New System.Drawing.Point(6, 20)
|
||||||
|
Me.lblCompression.Name = "lblCompression"
|
||||||
|
Me.lblCompression.Size = New System.Drawing.Size(70, 13)
|
||||||
|
Me.lblCompression.TabIndex = 0
|
||||||
|
Me.lblCompression.Text = "Compression:"
|
||||||
|
'
|
||||||
|
'btn7zLocation
|
||||||
|
'
|
||||||
|
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 = 2
|
||||||
|
Me.btn7zLocation.Text = "..."
|
||||||
|
Me.btn7zLocation.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'txt7zLocation
|
||||||
|
'
|
||||||
|
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 = 1
|
||||||
|
'
|
||||||
|
'lblLocation
|
||||||
|
'
|
||||||
|
Me.lblLocation.AutoSize = True
|
||||||
|
Me.lblLocation.Location = New System.Drawing.Point(6, 44)
|
||||||
|
Me.lblLocation.Name = "lblLocation"
|
||||||
|
Me.lblLocation.Size = New System.Drawing.Size(89, 13)
|
||||||
|
Me.lblLocation.TabIndex = 4
|
||||||
|
Me.lblLocation.Text = "Custom Location:"
|
||||||
|
'
|
||||||
|
'txt7zArguments
|
||||||
|
'
|
||||||
|
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 = 0
|
||||||
|
'
|
||||||
|
'lblArguments
|
||||||
|
'
|
||||||
|
Me.lblArguments.AutoSize = True
|
||||||
|
Me.lblArguments.Location = New System.Drawing.Point(6, 20)
|
||||||
|
Me.lblArguments.Name = "lblArguments"
|
||||||
|
Me.lblArguments.Size = New System.Drawing.Size(98, 13)
|
||||||
|
Me.lblArguments.TabIndex = 2
|
||||||
|
Me.lblArguments.Text = "Custom Arguments:"
|
||||||
|
'
|
||||||
|
'lbl7zCopyright
|
||||||
|
'
|
||||||
|
Me.lbl7zCopyright.AutoEllipsis = True
|
||||||
|
Me.lbl7zCopyright.Location = New System.Drawing.Point(9, 34)
|
||||||
|
Me.lbl7zCopyright.Name = "lbl7zCopyright"
|
||||||
|
Me.lbl7zCopyright.Size = New System.Drawing.Size(339, 17)
|
||||||
|
Me.lbl7zCopyright.TabIndex = 8
|
||||||
|
Me.lbl7zCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||||
|
'
|
||||||
|
'lbl7zProduct
|
||||||
|
'
|
||||||
|
Me.lbl7zProduct.AutoEllipsis = True
|
||||||
|
Me.lbl7zProduct.Location = New System.Drawing.Point(9, 17)
|
||||||
|
Me.lbl7zProduct.Name = "lbl7zProduct"
|
||||||
|
Me.lbl7zProduct.Size = New System.Drawing.Size(339, 17)
|
||||||
|
Me.lbl7zProduct.TabIndex = 7
|
||||||
|
Me.lbl7zProduct.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||||
|
'
|
||||||
|
'btnDefaults
|
||||||
|
'
|
||||||
|
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 = 5
|
||||||
|
Me.btnDefaults.Text = "Set &Defaults"
|
||||||
|
Me.btnDefaults.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'pnlBackup
|
||||||
|
'
|
||||||
|
Me.pnlBackup.Controls.Add(Me.grpBackupConfirmations)
|
||||||
|
Me.pnlBackup.Controls.Add(Me.grpBackupHandling)
|
||||||
|
Me.pnlBackup.Controls.Add(Me.grpFolderOptions)
|
||||||
|
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 = 2
|
||||||
|
'
|
||||||
|
'grpBackupConfirmations
|
||||||
|
'
|
||||||
|
Me.grpBackupConfirmations.Controls.Add(Me.chkBackupConfirm)
|
||||||
|
Me.grpBackupConfirmations.Controls.Add(Me.chkOverwriteWarning)
|
||||||
|
Me.grpBackupConfirmations.Location = New System.Drawing.Point(6, 200)
|
||||||
|
Me.grpBackupConfirmations.Name = "grpBackupConfirmations"
|
||||||
|
Me.grpBackupConfirmations.Size = New System.Drawing.Size(354, 65)
|
||||||
|
Me.grpBackupConfirmations.TabIndex = 2
|
||||||
|
Me.grpBackupConfirmations.TabStop = False
|
||||||
|
Me.grpBackupConfirmations.Text = "Backup Confirmations"
|
||||||
'
|
'
|
||||||
'chkBackupConfirm
|
'chkBackupConfirm
|
||||||
'
|
'
|
||||||
Me.chkBackupConfirm.AutoSize = True
|
Me.chkBackupConfirm.AutoSize = True
|
||||||
Me.chkBackupConfirm.Location = New System.Drawing.Point(6, 19)
|
Me.chkBackupConfirm.Location = New System.Drawing.Point(9, 18)
|
||||||
Me.chkBackupConfirm.Name = "chkBackupConfirm"
|
Me.chkBackupConfirm.Name = "chkBackupConfirm"
|
||||||
Me.chkBackupConfirm.Size = New System.Drawing.Size(160, 17)
|
Me.chkBackupConfirm.Size = New System.Drawing.Size(160, 17)
|
||||||
Me.chkBackupConfirm.TabIndex = 0
|
Me.chkBackupConfirm.TabIndex = 0
|
||||||
Me.chkBackupConfirm.Text = "Disable backup confirmation"
|
Me.chkBackupConfirm.Text = "Disable backup confirmation"
|
||||||
Me.chkBackupConfirm.UseVisualStyleBackColor = True
|
Me.chkBackupConfirm.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
'grpGeneral
|
'chkOverwriteWarning
|
||||||
'
|
'
|
||||||
Me.grpGeneral.Controls.Add(Me.chkStartWindows)
|
Me.chkOverwriteWarning.AutoSize = True
|
||||||
Me.grpGeneral.Controls.Add(Me.chkSync)
|
Me.chkOverwriteWarning.Location = New System.Drawing.Point(9, 41)
|
||||||
Me.grpGeneral.Controls.Add(Me.chkShowDetectionTips)
|
Me.chkOverwriteWarning.Name = "chkOverwriteWarning"
|
||||||
Me.grpGeneral.Controls.Add(Me.chkStartToTray)
|
Me.chkOverwriteWarning.Size = New System.Drawing.Size(139, 17)
|
||||||
Me.grpGeneral.Controls.Add(Me.chkMonitorOnStartup)
|
Me.chkOverwriteWarning.TabIndex = 1
|
||||||
Me.grpGeneral.Location = New System.Drawing.Point(12, 12)
|
Me.chkOverwriteWarning.Text = "Show overwrite warning"
|
||||||
Me.grpGeneral.Name = "grpGeneral"
|
Me.chkOverwriteWarning.UseVisualStyleBackColor = True
|
||||||
Me.grpGeneral.Size = New System.Drawing.Size(360, 145)
|
'
|
||||||
Me.grpGeneral.TabIndex = 0
|
'grpBackupHandling
|
||||||
Me.grpGeneral.TabStop = False
|
'
|
||||||
Me.grpGeneral.Text = "General"
|
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
|
||||||
|
'
|
||||||
|
Me.pnl7z.Controls.Add(Me.grp7zAdvanced)
|
||||||
|
Me.pnl7z.Controls.Add(Me.grp7zInformation)
|
||||||
|
Me.pnl7z.Controls.Add(Me.grp7zGeneral)
|
||||||
|
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 = 4
|
||||||
|
'
|
||||||
|
'grp7zAdvanced
|
||||||
|
'
|
||||||
|
Me.grp7zAdvanced.Controls.Add(Me.btn7zLocation)
|
||||||
|
Me.grp7zAdvanced.Controls.Add(Me.lblArguments)
|
||||||
|
Me.grp7zAdvanced.Controls.Add(Me.txt7zLocation)
|
||||||
|
Me.grp7zAdvanced.Controls.Add(Me.txt7zArguments)
|
||||||
|
Me.grp7zAdvanced.Controls.Add(Me.lblLocation)
|
||||||
|
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 = 1
|
||||||
|
Me.grp7zAdvanced.TabStop = False
|
||||||
|
Me.grp7zAdvanced.Text = "Advanced"
|
||||||
|
'
|
||||||
|
'grp7zInformation
|
||||||
|
'
|
||||||
|
Me.grp7zInformation.Controls.Add(Me.lbl7zProduct)
|
||||||
|
Me.grp7zInformation.Controls.Add(Me.lbl7zCopyright)
|
||||||
|
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 = 2
|
||||||
|
Me.grp7zInformation.TabStop = False
|
||||||
|
Me.grp7zInformation.Text = "Utility Information"
|
||||||
|
'
|
||||||
|
'pnlGeneral
|
||||||
|
'
|
||||||
|
Me.pnlGeneral.Controls.Add(Me.grpGameMonitoringOptions)
|
||||||
|
Me.pnlGeneral.Controls.Add(Me.grpLogOptions)
|
||||||
|
Me.pnlGeneral.Controls.Add(Me.grpGameData)
|
||||||
|
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.btnOptionalFields)
|
||||||
|
Me.grpGameData.Location = New System.Drawing.Point(6, 12)
|
||||||
|
Me.grpGameData.Name = "grpGameData"
|
||||||
|
Me.grpGameData.Size = New System.Drawing.Size(354, 123)
|
||||||
|
Me.grpGameData.TabIndex = 0
|
||||||
|
Me.grpGameData.TabStop = False
|
||||||
|
Me.grpGameData.Text = "Game Data Options"
|
||||||
|
'
|
||||||
|
'chkShowResolvedPaths
|
||||||
|
'
|
||||||
|
Me.chkShowResolvedPaths.AutoSize = True
|
||||||
|
Me.chkShowResolvedPaths.Location = New System.Drawing.Point(6, 65)
|
||||||
|
Me.chkShowResolvedPaths.Name = "chkShowResolvedPaths"
|
||||||
|
Me.chkShowResolvedPaths.Size = New System.Drawing.Size(238, 17)
|
||||||
|
Me.chkShowResolvedPaths.TabIndex = 2
|
||||||
|
Me.chkShowResolvedPaths.Text = "Show resolved save paths in Game Manager"
|
||||||
|
Me.chkShowResolvedPaths.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'chkSessionTracking
|
||||||
|
'
|
||||||
|
Me.chkSessionTracking.AutoSize = True
|
||||||
|
Me.chkSessionTracking.Location = New System.Drawing.Point(6, 42)
|
||||||
|
Me.chkSessionTracking.Name = "chkSessionTracking"
|
||||||
|
Me.chkSessionTracking.Size = New System.Drawing.Size(138, 17)
|
||||||
|
Me.chkSessionTracking.TabIndex = 1
|
||||||
|
Me.chkSessionTracking.Text = "Enable session tracking"
|
||||||
|
Me.chkSessionTracking.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'lstSettings
|
||||||
|
'
|
||||||
|
Me.lstSettings.FormattingEnabled = True
|
||||||
|
Me.lstSettings.Location = New System.Drawing.Point(12, 12)
|
||||||
|
Me.lstSettings.Name = "lstSettings"
|
||||||
|
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.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, 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
|
||||||
'
|
'
|
||||||
'chkStartWindows
|
'chkStartWindows
|
||||||
'
|
'
|
||||||
@@ -90,26 +590,6 @@ Partial Class frmSettings
|
|||||||
Me.chkStartWindows.Text = "Start with Windows"
|
Me.chkStartWindows.Text = "Start with Windows"
|
||||||
Me.chkStartWindows.UseVisualStyleBackColor = True
|
Me.chkStartWindows.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
'chkSync
|
|
||||||
'
|
|
||||||
Me.chkSync.AutoSize = True
|
|
||||||
Me.chkSync.Location = New System.Drawing.Point(6, 111)
|
|
||||||
Me.chkSync.Name = "chkSync"
|
|
||||||
Me.chkSync.Size = New System.Drawing.Size(208, 17)
|
|
||||||
Me.chkSync.TabIndex = 4
|
|
||||||
Me.chkSync.Text = "Sync game list data with backup folder"
|
|
||||||
Me.chkSync.UseVisualStyleBackColor = True
|
|
||||||
'
|
|
||||||
'chkShowDetectionTips
|
|
||||||
'
|
|
||||||
Me.chkShowDetectionTips.AutoSize = True
|
|
||||||
Me.chkShowDetectionTips.Location = New System.Drawing.Point(6, 88)
|
|
||||||
Me.chkShowDetectionTips.Name = "chkShowDetectionTips"
|
|
||||||
Me.chkShowDetectionTips.Size = New System.Drawing.Size(136, 17)
|
|
||||||
Me.chkShowDetectionTips.TabIndex = 3
|
|
||||||
Me.chkShowDetectionTips.Text = "Show detection tooltips"
|
|
||||||
Me.chkShowDetectionTips.UseVisualStyleBackColor = True
|
|
||||||
'
|
|
||||||
'chkStartToTray
|
'chkStartToTray
|
||||||
'
|
'
|
||||||
Me.chkStartToTray.AutoSize = True
|
Me.chkStartToTray.AutoSize = True
|
||||||
@@ -120,161 +600,115 @@ Partial Class frmSettings
|
|||||||
Me.chkStartToTray.Text = "Start to system tray"
|
Me.chkStartToTray.Text = "Start to system tray"
|
||||||
Me.chkStartToTray.UseVisualStyleBackColor = True
|
Me.chkStartToTray.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
'grpPaths
|
'chkMonitorOnStartup
|
||||||
'
|
'
|
||||||
Me.grpPaths.Controls.Add(Me.btnBackupFolder)
|
Me.chkMonitorOnStartup.AutoSize = True
|
||||||
Me.grpPaths.Controls.Add(Me.lblBackupFolder)
|
Me.chkMonitorOnStartup.Location = New System.Drawing.Point(6, 65)
|
||||||
Me.grpPaths.Controls.Add(Me.txtBackupFolder)
|
Me.chkMonitorOnStartup.Name = "chkMonitorOnStartup"
|
||||||
Me.grpPaths.Location = New System.Drawing.Point(12, 311)
|
Me.chkMonitorOnStartup.Size = New System.Drawing.Size(149, 17)
|
||||||
Me.grpPaths.Name = "grpPaths"
|
Me.chkMonitorOnStartup.TabIndex = 2
|
||||||
Me.grpPaths.Size = New System.Drawing.Size(360, 60)
|
Me.chkMonitorOnStartup.Text = "Start monitoring on launch"
|
||||||
Me.grpPaths.TabIndex = 2
|
Me.chkMonitorOnStartup.UseVisualStyleBackColor = True
|
||||||
Me.grpPaths.TabStop = False
|
|
||||||
Me.grpPaths.Text = "Paths"
|
|
||||||
'
|
|
||||||
'btnBackupFolder
|
|
||||||
'
|
|
||||||
Me.btnBackupFolder.Location = New System.Drawing.Point(318, 23)
|
|
||||||
Me.btnBackupFolder.Name = "btnBackupFolder"
|
|
||||||
Me.btnBackupFolder.Size = New System.Drawing.Size(27, 20)
|
|
||||||
Me.btnBackupFolder.TabIndex = 2
|
|
||||||
Me.btnBackupFolder.Text = "..."
|
|
||||||
Me.btnBackupFolder.UseVisualStyleBackColor = True
|
|
||||||
'
|
|
||||||
'lblBackupFolder
|
|
||||||
'
|
|
||||||
Me.lblBackupFolder.AutoSize = True
|
|
||||||
Me.lblBackupFolder.Location = New System.Drawing.Point(6, 27)
|
|
||||||
Me.lblBackupFolder.Name = "lblBackupFolder"
|
|
||||||
Me.lblBackupFolder.Size = New System.Drawing.Size(76, 13)
|
|
||||||
Me.lblBackupFolder.TabIndex = 0
|
|
||||||
Me.lblBackupFolder.Text = "Backup Folder"
|
|
||||||
'
|
|
||||||
'txtBackupFolder
|
|
||||||
'
|
|
||||||
Me.txtBackupFolder.Location = New System.Drawing.Point(88, 24)
|
|
||||||
Me.txtBackupFolder.Name = "txtBackupFolder"
|
|
||||||
Me.txtBackupFolder.Size = New System.Drawing.Size(224, 20)
|
|
||||||
Me.txtBackupFolder.TabIndex = 1
|
|
||||||
'
|
|
||||||
'btnSave
|
|
||||||
'
|
|
||||||
Me.btnSave.DialogResult = System.Windows.Forms.DialogResult.OK
|
|
||||||
Me.btnSave.Location = New System.Drawing.Point(216, 377)
|
|
||||||
Me.btnSave.Name = "btnSave"
|
|
||||||
Me.btnSave.Size = New System.Drawing.Size(75, 23)
|
|
||||||
Me.btnSave.TabIndex = 3
|
|
||||||
Me.btnSave.Text = "&Save"
|
|
||||||
Me.btnSave.UseVisualStyleBackColor = True
|
|
||||||
'
|
|
||||||
'btnCancel
|
|
||||||
'
|
|
||||||
Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
|
|
||||||
Me.btnCancel.Location = New System.Drawing.Point(297, 377)
|
|
||||||
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
|
|
||||||
'
|
|
||||||
'grpBackup
|
|
||||||
'
|
|
||||||
Me.grpBackup.Controls.Add(Me.chkCheckSum)
|
|
||||||
Me.grpBackup.Controls.Add(Me.chkRestoreOnLaunch)
|
|
||||||
Me.grpBackup.Controls.Add(Me.chkOverwriteWarning)
|
|
||||||
Me.grpBackup.Controls.Add(Me.chkCreateFolder)
|
|
||||||
Me.grpBackup.Controls.Add(Me.chkBackupConfirm)
|
|
||||||
Me.grpBackup.Location = New System.Drawing.Point(12, 163)
|
|
||||||
Me.grpBackup.Name = "grpBackup"
|
|
||||||
Me.grpBackup.Size = New System.Drawing.Size(360, 142)
|
|
||||||
Me.grpBackup.TabIndex = 1
|
|
||||||
Me.grpBackup.TabStop = False
|
|
||||||
Me.grpBackup.Text = "Backup and Restore Options"
|
|
||||||
'
|
|
||||||
'chkCheckSum
|
|
||||||
'
|
|
||||||
Me.chkCheckSum.AutoSize = True
|
|
||||||
Me.chkCheckSum.Location = New System.Drawing.Point(6, 111)
|
|
||||||
Me.chkCheckSum.Name = "chkCheckSum"
|
|
||||||
Me.chkCheckSum.Size = New System.Drawing.Size(195, 17)
|
|
||||||
Me.chkCheckSum.TabIndex = 4
|
|
||||||
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, 88)
|
|
||||||
Me.chkRestoreOnLaunch.Name = "chkRestoreOnLaunch"
|
|
||||||
Me.chkRestoreOnLaunch.Size = New System.Drawing.Size(249, 17)
|
|
||||||
Me.chkRestoreOnLaunch.TabIndex = 3
|
|
||||||
Me.chkRestoreOnLaunch.Text = "Check for new backup files to restore at launch"
|
|
||||||
Me.chkRestoreOnLaunch.UseVisualStyleBackColor = True
|
|
||||||
'
|
|
||||||
'chkOverwriteWarning
|
|
||||||
'
|
|
||||||
Me.chkOverwriteWarning.AutoSize = True
|
|
||||||
Me.chkOverwriteWarning.Location = New System.Drawing.Point(6, 65)
|
|
||||||
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
|
|
||||||
'
|
|
||||||
'chkCreateFolder
|
|
||||||
'
|
|
||||||
Me.chkCreateFolder.AutoSize = True
|
|
||||||
Me.chkCreateFolder.Location = New System.Drawing.Point(6, 42)
|
|
||||||
Me.chkCreateFolder.Name = "chkCreateFolder"
|
|
||||||
Me.chkCreateFolder.Size = New System.Drawing.Size(211, 17)
|
|
||||||
Me.chkCreateFolder.TabIndex = 1
|
|
||||||
Me.chkCreateFolder.Text = "Create a sub-folder for each application"
|
|
||||||
Me.chkCreateFolder.UseVisualStyleBackColor = True
|
|
||||||
'
|
'
|
||||||
'frmSettings
|
'frmSettings
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
Me.ClientSize = New System.Drawing.Size(384, 412)
|
Me.ClientSize = New System.Drawing.Size(554, 361)
|
||||||
Me.Controls.Add(Me.grpBackup)
|
Me.Controls.Add(Me.pnlGeneral)
|
||||||
|
Me.Controls.Add(Me.pnlStartup)
|
||||||
|
Me.Controls.Add(Me.pnl7z)
|
||||||
|
Me.Controls.Add(Me.pnlBackup)
|
||||||
|
Me.Controls.Add(Me.btnResetMessages)
|
||||||
|
Me.Controls.Add(Me.lstSettings)
|
||||||
|
Me.Controls.Add(Me.btnDefaults)
|
||||||
Me.Controls.Add(Me.btnCancel)
|
Me.Controls.Add(Me.btnCancel)
|
||||||
Me.Controls.Add(Me.btnSave)
|
Me.Controls.Add(Me.btnSave)
|
||||||
Me.Controls.Add(Me.grpPaths)
|
|
||||||
Me.Controls.Add(Me.grpGeneral)
|
|
||||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||||
Me.MaximizeBox = False
|
Me.MaximizeBox = False
|
||||||
Me.MinimizeBox = False
|
Me.MinimizeBox = False
|
||||||
Me.Name = "frmSettings"
|
Me.Name = "frmSettings"
|
||||||
Me.ShowIcon = False
|
Me.ShowIcon = False
|
||||||
Me.ShowInTaskbar = False
|
Me.ShowInTaskbar = False
|
||||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
|
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||||
Me.Text = "Settings"
|
Me.Text = "Settings"
|
||||||
Me.grpGeneral.ResumeLayout(False)
|
Me.grpFolderOptions.ResumeLayout(False)
|
||||||
Me.grpGeneral.PerformLayout()
|
Me.grpFolderOptions.PerformLayout()
|
||||||
Me.grpPaths.ResumeLayout(False)
|
Me.grp7zGeneral.ResumeLayout(False)
|
||||||
Me.grpPaths.PerformLayout()
|
Me.grp7zGeneral.PerformLayout()
|
||||||
Me.grpBackup.ResumeLayout(False)
|
Me.pnlBackup.ResumeLayout(False)
|
||||||
Me.grpBackup.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.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.ResumeLayout(False)
|
Me.ResumeLayout(False)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Friend WithEvents chkMonitorOnStartup As System.Windows.Forms.CheckBox
|
Friend WithEvents grpFolderOptions As System.Windows.Forms.GroupBox
|
||||||
Friend WithEvents chkBackupConfirm As System.Windows.Forms.CheckBox
|
|
||||||
Friend WithEvents grpGeneral As System.Windows.Forms.GroupBox
|
|
||||||
Friend WithEvents grpPaths As System.Windows.Forms.GroupBox
|
|
||||||
Friend WithEvents txtBackupFolder As System.Windows.Forms.TextBox
|
Friend WithEvents txtBackupFolder As System.Windows.Forms.TextBox
|
||||||
Friend WithEvents fbBrowser As System.Windows.Forms.FolderBrowserDialog
|
|
||||||
Friend WithEvents btnSave As System.Windows.Forms.Button
|
Friend WithEvents btnSave As System.Windows.Forms.Button
|
||||||
Friend WithEvents btnCancel As System.Windows.Forms.Button
|
Friend WithEvents btnCancel As System.Windows.Forms.Button
|
||||||
Friend WithEvents lblBackupFolder As System.Windows.Forms.Label
|
Friend WithEvents lblBackupFolder As System.Windows.Forms.Label
|
||||||
Friend WithEvents btnBackupFolder As System.Windows.Forms.Button
|
Friend WithEvents btnBackupFolder As System.Windows.Forms.Button
|
||||||
Friend WithEvents chkShowDetectionTips As System.Windows.Forms.CheckBox
|
Friend WithEvents chkShowDetectionTips As System.Windows.Forms.CheckBox
|
||||||
Friend WithEvents chkStartToTray As System.Windows.Forms.CheckBox
|
|
||||||
Friend WithEvents grpBackup As System.Windows.Forms.GroupBox
|
|
||||||
Friend WithEvents chkOverwriteWarning As System.Windows.Forms.CheckBox
|
|
||||||
Friend WithEvents chkCreateFolder As System.Windows.Forms.CheckBox
|
Friend WithEvents chkCreateFolder As System.Windows.Forms.CheckBox
|
||||||
Friend WithEvents chkRestoreOnLaunch As System.Windows.Forms.CheckBox
|
Friend WithEvents chkTimeTracking As System.Windows.Forms.CheckBox
|
||||||
Friend WithEvents chkSync As System.Windows.Forms.CheckBox
|
Friend WithEvents grp7zGeneral As GroupBox
|
||||||
Friend WithEvents chkCheckSum As System.Windows.Forms.CheckBox
|
Friend WithEvents cboCompression As ComboBox
|
||||||
Friend WithEvents chkStartWindows As System.Windows.Forms.CheckBox
|
Friend WithEvents lblCompression As Label
|
||||||
|
Friend WithEvents lbl7zProduct As Label
|
||||||
|
Friend WithEvents lbl7zCopyright As Label
|
||||||
|
Friend WithEvents btn7zLocation As Button
|
||||||
|
Friend WithEvents txt7zLocation As TextBox
|
||||||
|
Friend WithEvents lblLocation As Label
|
||||||
|
Friend WithEvents txt7zArguments As TextBox
|
||||||
|
Friend WithEvents lblArguments As Label
|
||||||
|
Friend WithEvents btnDefaults As Button
|
||||||
|
Friend WithEvents btnOptionalFields As Button
|
||||||
|
Friend WithEvents chkAutoSaveLog As CheckBox
|
||||||
|
Friend WithEvents pnlBackup As Panel
|
||||||
|
Friend WithEvents pnl7z As Panel
|
||||||
|
Friend WithEvents pnlGeneral As Panel
|
||||||
|
Friend WithEvents grpGameData As GroupBox
|
||||||
|
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 chkStartWindows As CheckBox
|
||||||
|
Friend WithEvents chkStartToTray As CheckBox
|
||||||
|
Friend WithEvents chkMonitorOnStartup As CheckBox
|
||||||
|
Friend WithEvents grpGameMonitoringOptions As GroupBox
|
||||||
|
Friend WithEvents chkShowResolvedPaths As CheckBox
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -117,9 +117,6 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</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>
|
|
||||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>32</value>
|
<value>32</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
|||||||
+300
-39
@@ -1,7 +1,10 @@
|
|||||||
Public Class frmSettings
|
Imports GBM.My.Resources
|
||||||
|
Imports System.IO
|
||||||
|
|
||||||
|
Public Class frmSettings
|
||||||
Dim bShutdown As Boolean = False
|
Dim bShutdown As Boolean = False
|
||||||
Dim bBackupLocationChanged As Boolean = False
|
Dim bSyncSettingsChanged As Boolean = False
|
||||||
Dim bCheckSumDisabled As Boolean = False
|
Dim eCurrentSyncFields As clsGame.eOptionalSyncFields
|
||||||
Private oSettings As mgrSettings
|
Private oSettings As mgrSettings
|
||||||
|
|
||||||
Property Settings As mgrSettings
|
Property Settings As mgrSettings
|
||||||
@@ -13,15 +16,6 @@
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private Property BackupLocationChanged As Boolean
|
|
||||||
Get
|
|
||||||
Return bBackupLocationChanged
|
|
||||||
End Get
|
|
||||||
Set(value As Boolean)
|
|
||||||
bBackupLocationChanged = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private Sub HandleRegistryUpdate(ByVal bToggle As Boolean)
|
Private Sub HandleRegistryUpdate(ByVal bToggle As Boolean)
|
||||||
Dim oKey As Microsoft.Win32.RegistryKey
|
Dim oKey As Microsoft.Win32.RegistryKey
|
||||||
Dim sAppName As String = Application.ProductName
|
Dim sAppName As String = Application.ProductName
|
||||||
@@ -40,6 +34,11 @@
|
|||||||
|
|
||||||
Private Function ValidateSettings() As Boolean
|
Private Function ValidateSettings() As Boolean
|
||||||
|
|
||||||
|
'Show Start with Windows warning if running as admin
|
||||||
|
If chkStartWindows.Checked And mgrCommon.IsElevated Then
|
||||||
|
mgrCommon.ShowMessage(frmSettings_WarningAdminStart, MsgBoxStyle.Exclamation)
|
||||||
|
End If
|
||||||
|
|
||||||
'Only modify registry key when the value changed
|
'Only modify registry key when the value changed
|
||||||
If chkStartWindows.Checked <> oSettings.StartWithWindows Then
|
If chkStartWindows.Checked <> oSettings.StartWithWindows Then
|
||||||
HandleRegistryUpdate(chkStartWindows.Checked)
|
HandleRegistryUpdate(chkStartWindows.Checked)
|
||||||
@@ -48,60 +47,295 @@
|
|||||||
|
|
||||||
oSettings.MonitorOnStartup = chkMonitorOnStartup.Checked
|
oSettings.MonitorOnStartup = chkMonitorOnStartup.Checked
|
||||||
oSettings.StartToTray = chkStartToTray.Checked
|
oSettings.StartToTray = chkStartToTray.Checked
|
||||||
|
oSettings.BackupOnLaunch = chkBackupOnLaunch.Checked
|
||||||
oSettings.ShowDetectionToolTips = chkShowDetectionTips.Checked
|
oSettings.ShowDetectionToolTips = chkShowDetectionTips.Checked
|
||||||
|
oSettings.DisableSyncMessages = chkDisableSyncMessages.Checked
|
||||||
|
oSettings.AutoSaveLog = chkAutoSaveLog.Checked
|
||||||
oSettings.DisableConfirmation = chkBackupConfirm.Checked
|
oSettings.DisableConfirmation = chkBackupConfirm.Checked
|
||||||
oSettings.CreateSubFolder = chkCreateFolder.Checked
|
oSettings.CreateSubFolder = chkCreateFolder.Checked
|
||||||
|
oSettings.UseGameID = chkUseGameID.Checked
|
||||||
oSettings.ShowOverwriteWarning = chkOverwriteWarning.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.SessionTracking = chkSessionTracking.Checked
|
||||||
|
oSettings.ShowResolvedPaths = chkShowResolvedPaths.Checked
|
||||||
|
oSettings.SuppressBackup = chkSuppressBackup.Checked
|
||||||
|
oSettings.SuppressBackupThreshold = nudSuppressBackupThreshold.Value
|
||||||
|
oSettings.CompressionLevel = cboCompression.SelectedValue
|
||||||
|
|
||||||
'We need to clear all checksums its turned off
|
If oSettings.Custom7zArguments <> txt7zArguments.Text.Trim And txt7zArguments.Text.Trim <> String.Empty Then
|
||||||
If chkCheckSum.Checked = False And oSettings.CheckSum = True Then
|
mgrCommon.ShowMessage(frmSettings_WarningArguments, MsgBoxStyle.Exclamation)
|
||||||
bCheckSumDisabled = True
|
|
||||||
End If
|
End If
|
||||||
oSettings.CheckSum = chkCheckSum.Checked
|
|
||||||
|
|
||||||
'Turning syncing from off to on is the same as changing the backup folder
|
oSettings.Custom7zArguments = txt7zArguments.Text.Trim
|
||||||
If chkSync.Checked = True And oSettings.Sync = False Then
|
oSettings.Custom7zLocation = txt7zLocation.Text.Trim
|
||||||
bBackupLocationChanged = True
|
|
||||||
End If
|
|
||||||
oSettings.Sync = chkSync.Checked
|
|
||||||
|
|
||||||
If IO.Directory.Exists(txtBackupFolder.Text) Then
|
If Directory.Exists(txtBackupFolder.Text) Then
|
||||||
If oSettings.BackupFolder <> txtBackupFolder.Text Then
|
If oSettings.BackupFolder <> txtBackupFolder.Text Then
|
||||||
If chkSync.Checked Then bBackupLocationChanged = True
|
bSyncSettingsChanged = True
|
||||||
End If
|
End If
|
||||||
oSettings.BackupFolder = txtBackupFolder.Text
|
oSettings.BackupFolder = txtBackupFolder.Text
|
||||||
Else
|
Else
|
||||||
MsgBox("The backup folder does not exist. Please choose a valid backup folder.", MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
mgrCommon.ShowMessage(frmSettings_ErrorBackupFolder, MsgBoxStyle.Exclamation)
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If oSettings.Custom7zLocation <> String.Empty Then
|
||||||
|
If File.Exists(oSettings.Custom7zLocation) Then
|
||||||
|
If Path.GetFileNameWithoutExtension(oSettings.Custom7zLocation) <> "7za" Then
|
||||||
|
mgrCommon.ShowMessage(frmSettings_WarningLocation, MsgBoxStyle.Critical)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
mgrCommon.ShowMessage(frmSettings_ErrorLocation, oSettings.Custom7zLocation, MsgBoxStyle.Critical)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
'We must trigger a sync if optional fields have changed
|
||||||
|
If eCurrentSyncFields <> Settings.SyncFields Then
|
||||||
|
bSyncSettingsChanged = True
|
||||||
|
End If
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function SaveSettings() As Boolean
|
Private Function SaveSettings() As Boolean
|
||||||
If ValidateSettings() Then
|
If ValidateSettings() Then
|
||||||
oSettings.SaveSettings()
|
oSettings.SaveSettings()
|
||||||
If BackupLocationChanged Then mgrMonitorList.HandleBackupLocationChange()
|
If bSyncSettingsChanged Then mgrMonitorList.HandleBackupLocationChange(Settings)
|
||||||
If bCheckSumDisabled Then mgrManifest.DoManifestHashWipe()
|
|
||||||
Return True
|
Return True
|
||||||
Else
|
Else
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Sub GetUtilityInfo(ByVal sLocation As String)
|
||||||
|
Dim bDefault As Boolean = False
|
||||||
|
Dim sFileDescription As String
|
||||||
|
Dim sVersion As String
|
||||||
|
Dim sCopyright As String
|
||||||
|
|
||||||
|
'Ignore this function when on Unix and hide the information data
|
||||||
|
If mgrCommon.IsUnix Then
|
||||||
|
grp7zInformation.Visible = False
|
||||||
|
Else
|
||||||
|
Try
|
||||||
|
grp7zInformation.Visible = True
|
||||||
|
|
||||||
|
'Use default when no custom location is set
|
||||||
|
If sLocation = String.Empty Then
|
||||||
|
sLocation = mgrPath.Default7zLocation
|
||||||
|
bDefault = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Get info
|
||||||
|
Dim oFileInfo As FileVersionInfo = FileVersionInfo.GetVersionInfo(sLocation)
|
||||||
|
|
||||||
|
If oFileInfo.FileDescription = String.Empty Then
|
||||||
|
sFileDescription = App_NotAvailable
|
||||||
|
Else
|
||||||
|
sFileDescription = oFileInfo.FileDescription
|
||||||
|
End If
|
||||||
|
|
||||||
|
If oFileInfo.ProductVersion = String.Empty Then
|
||||||
|
sVersion = App_NotAvailable
|
||||||
|
Else
|
||||||
|
sVersion = oFileInfo.ProductVersion
|
||||||
|
End If
|
||||||
|
|
||||||
|
If oFileInfo.LegalCopyright = String.Empty Then
|
||||||
|
sCopyright = App_NotAvailable
|
||||||
|
Else
|
||||||
|
sCopyright = oFileInfo.LegalCopyright
|
||||||
|
End If
|
||||||
|
|
||||||
|
lbl7zProduct.Text = sFileDescription & " - " & sVersion
|
||||||
|
lbl7zCopyright.Text = sCopyright
|
||||||
|
Catch ex As Exception
|
||||||
|
grp7zInformation.Visible = False
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SetDefaults()
|
||||||
|
If mgrCommon.ShowMessage(frmSettings_ConfirmDefaults, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
|
oSettings = New mgrSettings
|
||||||
|
LoadSettings()
|
||||||
|
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()
|
Private Sub LoadSettings()
|
||||||
chkStartWindows.Checked = oSettings.StartWithWindows
|
chkStartWindows.Checked = oSettings.StartWithWindows
|
||||||
chkMonitorOnStartup.Checked = oSettings.MonitorOnStartup
|
chkMonitorOnStartup.Checked = oSettings.MonitorOnStartup
|
||||||
chkStartToTray.Checked = oSettings.StartToTray
|
chkStartToTray.Checked = oSettings.StartToTray
|
||||||
|
chkBackupOnLaunch.Checked = oSettings.BackupOnLaunch
|
||||||
chkShowDetectionTips.Checked = oSettings.ShowDetectionToolTips
|
chkShowDetectionTips.Checked = oSettings.ShowDetectionToolTips
|
||||||
|
chkDisableSyncMessages.Checked = oSettings.DisableSyncMessages
|
||||||
|
chkAutoSaveLog.Checked = oSettings.AutoSaveLog
|
||||||
chkBackupConfirm.Checked = oSettings.DisableConfirmation
|
chkBackupConfirm.Checked = oSettings.DisableConfirmation
|
||||||
chkCreateFolder.Checked = oSettings.CreateSubFolder
|
chkCreateFolder.Checked = oSettings.CreateSubFolder
|
||||||
|
chkUseGameID.Checked = oSettings.UseGameID
|
||||||
chkOverwriteWarning.Checked = oSettings.ShowOverwriteWarning
|
chkOverwriteWarning.Checked = oSettings.ShowOverwriteWarning
|
||||||
chkRestoreOnLaunch.Checked = oSettings.RestoreOnLaunch
|
chkRestoreNotify.Checked = oSettings.RestoreOnLaunch
|
||||||
|
chkAutoRestore.Checked = oSettings.AutoRestore
|
||||||
|
chkAutoMark.Checked = oSettings.AutoMark
|
||||||
txtBackupFolder.Text = oSettings.BackupFolder
|
txtBackupFolder.Text = oSettings.BackupFolder
|
||||||
chkSync.Checked = oSettings.Sync
|
chkTimeTracking.Checked = oSettings.TimeTracking
|
||||||
chkCheckSum.Checked = oSettings.CheckSum
|
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
|
||||||
|
|
||||||
|
'Retrieve 7z Info
|
||||||
|
GetUtilityInfo(oSettings.Custom7zLocation)
|
||||||
|
|
||||||
|
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))
|
||||||
|
|
||||||
|
'cboCompression
|
||||||
|
cboCompression.ValueMember = "Key"
|
||||||
|
cboCompression.DisplayMember = "Value"
|
||||||
|
|
||||||
|
oComboItems.Add(New KeyValuePair(Of Integer, String)(0, frmSettings_cboCompression_None))
|
||||||
|
oComboItems.Add(New KeyValuePair(Of Integer, String)(1, frmSettings_cboCompression_Fastest))
|
||||||
|
oComboItems.Add(New KeyValuePair(Of Integer, String)(3, frmSettings_cboCompression_Fast))
|
||||||
|
oComboItems.Add(New KeyValuePair(Of Integer, String)(5, frmSettings_cboCompression_Normal))
|
||||||
|
oComboItems.Add(New KeyValuePair(Of Integer, String)(7, frmSettings_cboCompression_Maximum))
|
||||||
|
oComboItems.Add(New KeyValuePair(Of Integer, String)(9, frmSettings_cboCompression_Ultra))
|
||||||
|
|
||||||
|
cboCompression.DataSource = oComboItems
|
||||||
|
|
||||||
|
'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_Startup))
|
||||||
|
oSettingsItems.Add(New KeyValuePair(Of Integer, String)(3, frmSettings_lstSettings_7z))
|
||||||
|
|
||||||
|
lstSettings.DataSource = oSettingsItems
|
||||||
|
|
||||||
|
'Select Default
|
||||||
|
lstSettings.SelectedIndex = 0
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OpenOptionalFields()
|
||||||
|
Dim frm As New frmSyncFields
|
||||||
|
frm.SyncFields = Settings.SyncFields
|
||||||
|
frm.ShowDialog()
|
||||||
|
If frm.DialogResult = DialogResult.OK Then
|
||||||
|
Settings.SyncFields = frm.SyncFields
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ChangePanel()
|
||||||
|
If lstSettings.SelectedItems.Count > 0 Then
|
||||||
|
Dim oSettingsItem As KeyValuePair(Of Integer, String) = lstSettings.SelectedItems(0)
|
||||||
|
|
||||||
|
Select Case oSettingsItem.Key
|
||||||
|
Case 0
|
||||||
|
pnlGeneral.Visible = True
|
||||||
|
pnlStartup.Visible = False
|
||||||
|
pnlBackup.Visible = False
|
||||||
|
pnl7z.Visible = False
|
||||||
|
Case 1
|
||||||
|
pnlGeneral.Visible = False
|
||||||
|
pnlBackup.Visible = True
|
||||||
|
pnlStartup.Visible = False
|
||||||
|
pnl7z.Visible = False
|
||||||
|
Case 2
|
||||||
|
pnlGeneral.Visible = False
|
||||||
|
pnlBackup.Visible = False
|
||||||
|
pnlStartup.Visible = True
|
||||||
|
pnl7z.Visible = False
|
||||||
|
|
||||||
|
Case 3
|
||||||
|
pnlGeneral.Visible = False
|
||||||
|
pnlBackup.Visible = False
|
||||||
|
pnlStartup.Visible = False
|
||||||
|
pnl7z.Visible = True
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SetForm()
|
||||||
|
'Set Form Name
|
||||||
|
Me.Text = frmSettings_FormName
|
||||||
|
|
||||||
|
'Set Form Text
|
||||||
|
lblMinutes.Text = frmSettings_lblMinutes
|
||||||
|
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
|
||||||
|
grpFolderOptions.Text = frmSettings_grpFolderOptions
|
||||||
|
btnBackupFolder.Text = frmSettings_btnBackupFolder
|
||||||
|
lblBackupFolder.Text = frmSettings_lblBackupFolder
|
||||||
|
grpStartup.Text = frmSettings_grpStartup
|
||||||
|
grpGameData.Text = frmSettings_grpGameData
|
||||||
|
chkTimeTracking.Text = frmSettings_chkTimeTracking
|
||||||
|
chkSessionTracking.Text = frmSettings_chkSessionTracking
|
||||||
|
chkStartWindows.Text = frmSettings_chkStartWindows
|
||||||
|
chkShowDetectionTips.Text = frmSettings_chkShowDetectionTips
|
||||||
|
chkAutoSaveLog.Text = frmSettings_chkAutoSaveLog
|
||||||
|
chkStartToTray.Text = frmSettings_chkStartToTray
|
||||||
|
chkMonitorOnStartup.Text = frmSettings_chkMonitorOnStartup
|
||||||
|
grp7zGeneral.Text = frmSettings_grp7zGeneral
|
||||||
|
grp7zAdvanced.Text = frmSettings_grp7zAdvanced
|
||||||
|
grp7zInformation.Text = frmSettings_grp7zInformation
|
||||||
|
lblCompression.Text = frmSettings_lblCompression
|
||||||
|
btnDefaults.Text = frmSettings_btnDefaults
|
||||||
|
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
|
||||||
|
|
||||||
|
'Unix Handler
|
||||||
|
If mgrCommon.IsUnix Then
|
||||||
|
chkStartToTray.Enabled = False
|
||||||
|
chkStartWindows.Enabled = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Handle Panels
|
||||||
|
pnlGeneral.Visible = False
|
||||||
|
pnlBackup.Visible = False
|
||||||
|
pnl7z.Visible = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub btnSave_Click(sender As System.Object, e As System.EventArgs) Handles btnSave.Click
|
Private Sub btnSave_Click(sender As System.Object, e As System.EventArgs) Handles btnSave.Click
|
||||||
@@ -116,21 +350,48 @@
|
|||||||
Me.Close()
|
Me.Close()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub frmSettings_FormClosing(sender As System.Object, e As System.Windows.Forms.FormClosingEventArgs) Handles MyBase.FormClosing
|
|
||||||
If bShutdown = False Then
|
|
||||||
e.Cancel = True
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub frmSettings_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
Private Sub frmSettings_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
|
||||||
|
SetForm()
|
||||||
|
LoadCombos()
|
||||||
LoadSettings()
|
LoadSettings()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub btnBackupFolder_Click(sender As System.Object, e As System.EventArgs) Handles btnBackupFolder.Click
|
Private Sub btnBackupFolder_Click(sender As System.Object, e As System.EventArgs) Handles btnBackupFolder.Click
|
||||||
fbBrowser.SelectedPath = oSettings.BackupFolder
|
Dim sNewFolder As String
|
||||||
If fbBrowser.ShowDialog() = Windows.Forms.DialogResult.OK Then
|
sNewFolder = mgrCommon.OpenFolderBrowser("Settings_Backup_Path", frmSettings_BrowseFolder, oSettings.BackupFolder, True, False)
|
||||||
txtBackupFolder.Text = fbBrowser.SelectedPath
|
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("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 If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
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
|
||||||
|
GetUtilityInfo(txt7zLocation.Text.Trim)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnDefaults_Click(sender As Object, e As EventArgs) Handles btnDefaults.Click
|
||||||
|
SetDefaults()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnResetMessages_Click(sender As Object, e As EventArgs) Handles btnResetMessages.Click
|
||||||
|
ResetMessages()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
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
|
||||||
End Class
|
End Class
|
||||||
Generated
+45
-67
@@ -25,13 +25,11 @@ Partial Class frmStartUpWizard
|
|||||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmStartUpWizard))
|
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmStartUpWizard))
|
||||||
Me.tabWizard = New System.Windows.Forms.TabControl()
|
Me.tabWizard = New System.Windows.Forms.TabControl()
|
||||||
Me.tbPage1 = New System.Windows.Forms.TabPage()
|
Me.tbPage1 = New System.Windows.Forms.TabPage()
|
||||||
Me.lblStep1Instructions3 = New System.Windows.Forms.Label()
|
|
||||||
Me.lblStep1Instructions2 = New System.Windows.Forms.Label()
|
Me.lblStep1Instructions2 = New System.Windows.Forms.Label()
|
||||||
|
Me.llbManual = New System.Windows.Forms.LinkLabel()
|
||||||
Me.lblStep1Title = New System.Windows.Forms.Label()
|
Me.lblStep1Title = New System.Windows.Forms.Label()
|
||||||
Me.lblStep1Instructions = New System.Windows.Forms.Label()
|
Me.lblStep1Instructions = New System.Windows.Forms.Label()
|
||||||
Me.lblStep1Intro = New System.Windows.Forms.Label()
|
|
||||||
Me.tbPage2 = New System.Windows.Forms.TabPage()
|
Me.tbPage2 = New System.Windows.Forms.TabPage()
|
||||||
Me.chkSync = New System.Windows.Forms.CheckBox()
|
|
||||||
Me.chkCreateFolder = New System.Windows.Forms.CheckBox()
|
Me.chkCreateFolder = New System.Windows.Forms.CheckBox()
|
||||||
Me.lblStep2Title = New System.Windows.Forms.Label()
|
Me.lblStep2Title = New System.Windows.Forms.Label()
|
||||||
Me.lblStep2Instructions = New System.Windows.Forms.Label()
|
Me.lblStep2Instructions = New System.Windows.Forms.Label()
|
||||||
@@ -74,11 +72,10 @@ Partial Class frmStartUpWizard
|
|||||||
'tbPage1
|
'tbPage1
|
||||||
'
|
'
|
||||||
Me.tbPage1.BackColor = System.Drawing.SystemColors.Control
|
Me.tbPage1.BackColor = System.Drawing.SystemColors.Control
|
||||||
Me.tbPage1.Controls.Add(Me.lblStep1Instructions3)
|
|
||||||
Me.tbPage1.Controls.Add(Me.lblStep1Instructions2)
|
Me.tbPage1.Controls.Add(Me.lblStep1Instructions2)
|
||||||
|
Me.tbPage1.Controls.Add(Me.llbManual)
|
||||||
Me.tbPage1.Controls.Add(Me.lblStep1Title)
|
Me.tbPage1.Controls.Add(Me.lblStep1Title)
|
||||||
Me.tbPage1.Controls.Add(Me.lblStep1Instructions)
|
Me.tbPage1.Controls.Add(Me.lblStep1Instructions)
|
||||||
Me.tbPage1.Controls.Add(Me.lblStep1Intro)
|
|
||||||
Me.tbPage1.Location = New System.Drawing.Point(4, 22)
|
Me.tbPage1.Location = New System.Drawing.Point(4, 22)
|
||||||
Me.tbPage1.Name = "tbPage1"
|
Me.tbPage1.Name = "tbPage1"
|
||||||
Me.tbPage1.Padding = New System.Windows.Forms.Padding(3)
|
Me.tbPage1.Padding = New System.Windows.Forms.Padding(3)
|
||||||
@@ -86,24 +83,25 @@ Partial Class frmStartUpWizard
|
|||||||
Me.tbPage1.TabIndex = 0
|
Me.tbPage1.TabIndex = 0
|
||||||
Me.tbPage1.Text = "TabPage1"
|
Me.tbPage1.Text = "TabPage1"
|
||||||
'
|
'
|
||||||
'lblStep1Instructions3
|
|
||||||
'
|
|
||||||
Me.lblStep1Instructions3.AutoSize = True
|
|
||||||
Me.lblStep1Instructions3.Location = New System.Drawing.Point(14, 160)
|
|
||||||
Me.lblStep1Instructions3.Name = "lblStep1Instructions3"
|
|
||||||
Me.lblStep1Instructions3.Size = New System.Drawing.Size(310, 13)
|
|
||||||
Me.lblStep1Instructions3.TabIndex = 10
|
|
||||||
Me.lblStep1Instructions3.Text = "GBM was designed and tested using the Dropbox cloud service."
|
|
||||||
'
|
|
||||||
'lblStep1Instructions2
|
'lblStep1Instructions2
|
||||||
'
|
'
|
||||||
Me.lblStep1Instructions2.Location = New System.Drawing.Point(14, 106)
|
Me.lblStep1Instructions2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
|
||||||
|
Me.lblStep1Instructions2.Location = New System.Drawing.Point(14, 91)
|
||||||
Me.lblStep1Instructions2.Name = "lblStep1Instructions2"
|
Me.lblStep1Instructions2.Name = "lblStep1Instructions2"
|
||||||
Me.lblStep1Instructions2.Size = New System.Drawing.Size(303, 42)
|
Me.lblStep1Instructions2.Size = New System.Drawing.Size(303, 53)
|
||||||
Me.lblStep1Instructions2.TabIndex = 9
|
Me.lblStep1Instructions2.TabIndex = 2
|
||||||
Me.lblStep1Instructions2.Text = "Before proceeding you may want to sign up for a cloud service and install their c" & _
|
Me.lblStep1Instructions2.Text = "If you'd like to learn about advanced features or have any other questions before" &
|
||||||
"lient software. GBM works best when paired with a cloud service and client but " & _
|
" you get started, there is a detailed online manual available."
|
||||||
"is not required!"
|
'
|
||||||
|
'llbManual
|
||||||
|
'
|
||||||
|
Me.llbManual.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
|
||||||
|
Me.llbManual.Location = New System.Drawing.Point(14, 158)
|
||||||
|
Me.llbManual.Name = "llbManual"
|
||||||
|
Me.llbManual.Size = New System.Drawing.Size(303, 13)
|
||||||
|
Me.llbManual.TabIndex = 3
|
||||||
|
Me.llbManual.TabStop = True
|
||||||
|
Me.llbManual.Text = "Game Backup Monitor Manual"
|
||||||
'
|
'
|
||||||
'lblStep1Title
|
'lblStep1Title
|
||||||
'
|
'
|
||||||
@@ -112,30 +110,21 @@ Partial Class frmStartUpWizard
|
|||||||
Me.lblStep1Title.Location = New System.Drawing.Point(13, 11)
|
Me.lblStep1Title.Location = New System.Drawing.Point(13, 11)
|
||||||
Me.lblStep1Title.Name = "lblStep1Title"
|
Me.lblStep1Title.Name = "lblStep1Title"
|
||||||
Me.lblStep1Title.Size = New System.Drawing.Size(148, 20)
|
Me.lblStep1Title.Size = New System.Drawing.Size(148, 20)
|
||||||
Me.lblStep1Title.TabIndex = 8
|
Me.lblStep1Title.TabIndex = 0
|
||||||
Me.lblStep1Title.Text = "Welcome to GBM"
|
Me.lblStep1Title.Text = "Welcome to GBM"
|
||||||
'
|
'
|
||||||
'lblStep1Instructions
|
'lblStep1Instructions
|
||||||
'
|
'
|
||||||
Me.lblStep1Instructions.Location = New System.Drawing.Point(14, 64)
|
Me.lblStep1Instructions.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
|
||||||
|
Me.lblStep1Instructions.Location = New System.Drawing.Point(14, 41)
|
||||||
Me.lblStep1Instructions.Name = "lblStep1Instructions"
|
Me.lblStep1Instructions.Name = "lblStep1Instructions"
|
||||||
Me.lblStep1Instructions.Size = New System.Drawing.Size(303, 42)
|
Me.lblStep1Instructions.Size = New System.Drawing.Size(303, 36)
|
||||||
Me.lblStep1Instructions.TabIndex = 6
|
Me.lblStep1Instructions.TabIndex = 1
|
||||||
Me.lblStep1Instructions.Text = "This wizard will guide you through some easy setup steps to get started."
|
Me.lblStep1Instructions.Text = "This guide will help you through some quick and easy steps to get started."
|
||||||
'
|
|
||||||
'lblStep1Intro
|
|
||||||
'
|
|
||||||
Me.lblStep1Intro.AutoSize = True
|
|
||||||
Me.lblStep1Intro.Location = New System.Drawing.Point(14, 41)
|
|
||||||
Me.lblStep1Intro.Name = "lblStep1Intro"
|
|
||||||
Me.lblStep1Intro.Size = New System.Drawing.Size(213, 13)
|
|
||||||
Me.lblStep1Intro.TabIndex = 5
|
|
||||||
Me.lblStep1Intro.Text = "Thank you for trying Game Backup Monitor!"
|
|
||||||
'
|
'
|
||||||
'tbPage2
|
'tbPage2
|
||||||
'
|
'
|
||||||
Me.tbPage2.BackColor = System.Drawing.SystemColors.Control
|
Me.tbPage2.BackColor = System.Drawing.SystemColors.Control
|
||||||
Me.tbPage2.Controls.Add(Me.chkSync)
|
|
||||||
Me.tbPage2.Controls.Add(Me.chkCreateFolder)
|
Me.tbPage2.Controls.Add(Me.chkCreateFolder)
|
||||||
Me.tbPage2.Controls.Add(Me.lblStep2Title)
|
Me.tbPage2.Controls.Add(Me.lblStep2Title)
|
||||||
Me.tbPage2.Controls.Add(Me.lblStep2Instructions)
|
Me.tbPage2.Controls.Add(Me.lblStep2Instructions)
|
||||||
@@ -149,24 +138,14 @@ Partial Class frmStartUpWizard
|
|||||||
Me.tbPage2.TabIndex = 1
|
Me.tbPage2.TabIndex = 1
|
||||||
Me.tbPage2.Text = "TabPage2"
|
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(258, 17)
|
|
||||||
Me.chkSync.TabIndex = 13
|
|
||||||
Me.chkSync.Text = "Sync with existing GBM data in the backup folder"
|
|
||||||
Me.chkSync.UseVisualStyleBackColor = True
|
|
||||||
'
|
|
||||||
'chkCreateFolder
|
'chkCreateFolder
|
||||||
'
|
'
|
||||||
Me.chkCreateFolder.AutoSize = True
|
Me.chkCreateFolder.AutoSize = True
|
||||||
Me.chkCreateFolder.Location = New System.Drawing.Point(17, 83)
|
Me.chkCreateFolder.Location = New System.Drawing.Point(17, 83)
|
||||||
Me.chkCreateFolder.Name = "chkCreateFolder"
|
Me.chkCreateFolder.Name = "chkCreateFolder"
|
||||||
Me.chkCreateFolder.Size = New System.Drawing.Size(211, 17)
|
Me.chkCreateFolder.Size = New System.Drawing.Size(186, 17)
|
||||||
Me.chkCreateFolder.TabIndex = 12
|
Me.chkCreateFolder.TabIndex = 4
|
||||||
Me.chkCreateFolder.Text = "Create a sub-folder for each application"
|
Me.chkCreateFolder.Text = "Create a sub-folder for each game"
|
||||||
Me.chkCreateFolder.UseVisualStyleBackColor = True
|
Me.chkCreateFolder.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
'lblStep2Title
|
'lblStep2Title
|
||||||
@@ -176,23 +155,25 @@ Partial Class frmStartUpWizard
|
|||||||
Me.lblStep2Title.Location = New System.Drawing.Point(13, 11)
|
Me.lblStep2Title.Location = New System.Drawing.Point(13, 11)
|
||||||
Me.lblStep2Title.Name = "lblStep2Title"
|
Me.lblStep2Title.Name = "lblStep2Title"
|
||||||
Me.lblStep2Title.Size = New System.Drawing.Size(143, 20)
|
Me.lblStep2Title.Size = New System.Drawing.Size(143, 20)
|
||||||
Me.lblStep2Title.TabIndex = 11
|
Me.lblStep2Title.TabIndex = 0
|
||||||
Me.lblStep2Title.Text = "Backup Location"
|
Me.lblStep2Title.Text = "Backup Location"
|
||||||
'
|
'
|
||||||
'lblStep2Instructions
|
'lblStep2Instructions
|
||||||
'
|
'
|
||||||
Me.lblStep2Instructions.Location = New System.Drawing.Point(14, 125)
|
Me.lblStep2Instructions.Location = New System.Drawing.Point(14, 103)
|
||||||
Me.lblStep2Instructions.Name = "lblStep2Instructions"
|
Me.lblStep2Instructions.Name = "lblStep2Instructions"
|
||||||
Me.lblStep2Instructions.Size = New System.Drawing.Size(335, 57)
|
Me.lblStep2Instructions.Size = New System.Drawing.Size(335, 50)
|
||||||
Me.lblStep2Instructions.TabIndex = 10
|
Me.lblStep2Instructions.TabIndex = 6
|
||||||
Me.lblStep2Instructions.Text = resources.GetString("lblStep2Instructions.Text")
|
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
|
'btnFolderBrowse
|
||||||
'
|
'
|
||||||
Me.btnFolderBrowse.Location = New System.Drawing.Point(322, 56)
|
Me.btnFolderBrowse.Location = New System.Drawing.Point(322, 56)
|
||||||
Me.btnFolderBrowse.Name = "btnFolderBrowse"
|
Me.btnFolderBrowse.Name = "btnFolderBrowse"
|
||||||
Me.btnFolderBrowse.Size = New System.Drawing.Size(27, 20)
|
Me.btnFolderBrowse.Size = New System.Drawing.Size(27, 20)
|
||||||
Me.btnFolderBrowse.TabIndex = 8
|
Me.btnFolderBrowse.TabIndex = 3
|
||||||
Me.btnFolderBrowse.Text = "..."
|
Me.btnFolderBrowse.Text = "..."
|
||||||
Me.btnFolderBrowse.UseVisualStyleBackColor = True
|
Me.btnFolderBrowse.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
@@ -202,7 +183,7 @@ Partial Class frmStartUpWizard
|
|||||||
Me.txtBackupPath.Location = New System.Drawing.Point(17, 57)
|
Me.txtBackupPath.Location = New System.Drawing.Point(17, 57)
|
||||||
Me.txtBackupPath.Name = "txtBackupPath"
|
Me.txtBackupPath.Name = "txtBackupPath"
|
||||||
Me.txtBackupPath.Size = New System.Drawing.Size(300, 20)
|
Me.txtBackupPath.Size = New System.Drawing.Size(300, 20)
|
||||||
Me.txtBackupPath.TabIndex = 6
|
Me.txtBackupPath.TabIndex = 2
|
||||||
'
|
'
|
||||||
'lblStep2Intro
|
'lblStep2Intro
|
||||||
'
|
'
|
||||||
@@ -210,7 +191,7 @@ Partial Class frmStartUpWizard
|
|||||||
Me.lblStep2Intro.Location = New System.Drawing.Point(14, 41)
|
Me.lblStep2Intro.Location = New System.Drawing.Point(14, 41)
|
||||||
Me.lblStep2Intro.Name = "lblStep2Intro"
|
Me.lblStep2Intro.Name = "lblStep2Intro"
|
||||||
Me.lblStep2Intro.Size = New System.Drawing.Size(219, 13)
|
Me.lblStep2Intro.Size = New System.Drawing.Size(219, 13)
|
||||||
Me.lblStep2Intro.TabIndex = 7
|
Me.lblStep2Intro.TabIndex = 1
|
||||||
Me.lblStep2Intro.Text = "Choose where GBM saves your backup files:"
|
Me.lblStep2Intro.Text = "Choose where GBM saves your backup files:"
|
||||||
'
|
'
|
||||||
'tbPage3
|
'tbPage3
|
||||||
@@ -291,8 +272,8 @@ Partial Class frmStartUpWizard
|
|||||||
Me.lblStep4Instructions3.Name = "lblStep4Instructions3"
|
Me.lblStep4Instructions3.Name = "lblStep4Instructions3"
|
||||||
Me.lblStep4Instructions3.Size = New System.Drawing.Size(303, 33)
|
Me.lblStep4Instructions3.Size = New System.Drawing.Size(303, 33)
|
||||||
Me.lblStep4Instructions3.TabIndex = 18
|
Me.lblStep4Instructions3.TabIndex = 18
|
||||||
Me.lblStep4Instructions3.Text = "To change anything you've setup in this wizard and see more settings and features" & _
|
Me.lblStep4Instructions3.Text = "You can change anything you've setup in this wizard and find more settings and fe" &
|
||||||
", explore the menus in the application,"
|
"atures by exploring the menus. Thanks!"
|
||||||
'
|
'
|
||||||
'lblStep4Instructions2
|
'lblStep4Instructions2
|
||||||
'
|
'
|
||||||
@@ -318,15 +299,14 @@ Partial Class frmStartUpWizard
|
|||||||
Me.lblStep4Instructions.Name = "lblStep4Instructions"
|
Me.lblStep4Instructions.Name = "lblStep4Instructions"
|
||||||
Me.lblStep4Instructions.Size = New System.Drawing.Size(303, 31)
|
Me.lblStep4Instructions.Size = New System.Drawing.Size(303, 31)
|
||||||
Me.lblStep4Instructions.TabIndex = 12
|
Me.lblStep4Instructions.TabIndex = 12
|
||||||
Me.lblStep4Instructions.Text = "That's all there is to it! GBM will automatically monitor and backup your applic" & _
|
Me.lblStep4Instructions.Text = "GBM will automatically monitor and backup your games each time they are closed."
|
||||||
"ations each time they are closed."
|
|
||||||
'
|
'
|
||||||
'btnNext
|
'btnNext
|
||||||
'
|
'
|
||||||
Me.btnNext.Location = New System.Drawing.Point(272, 202)
|
Me.btnNext.Location = New System.Drawing.Point(272, 202)
|
||||||
Me.btnNext.Name = "btnNext"
|
Me.btnNext.Name = "btnNext"
|
||||||
Me.btnNext.Size = New System.Drawing.Size(75, 23)
|
Me.btnNext.Size = New System.Drawing.Size(75, 23)
|
||||||
Me.btnNext.TabIndex = 11
|
Me.btnNext.TabIndex = 2
|
||||||
Me.btnNext.Text = "&Next"
|
Me.btnNext.Text = "&Next"
|
||||||
Me.btnNext.UseVisualStyleBackColor = True
|
Me.btnNext.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
@@ -335,7 +315,7 @@ Partial Class frmStartUpWizard
|
|||||||
Me.btnBack.Location = New System.Drawing.Point(191, 202)
|
Me.btnBack.Location = New System.Drawing.Point(191, 202)
|
||||||
Me.btnBack.Name = "btnBack"
|
Me.btnBack.Name = "btnBack"
|
||||||
Me.btnBack.Size = New System.Drawing.Size(75, 23)
|
Me.btnBack.Size = New System.Drawing.Size(75, 23)
|
||||||
Me.btnBack.TabIndex = 10
|
Me.btnBack.TabIndex = 1
|
||||||
Me.btnBack.Text = "&Back"
|
Me.btnBack.Text = "&Back"
|
||||||
Me.btnBack.UseVisualStyleBackColor = True
|
Me.btnBack.UseVisualStyleBackColor = True
|
||||||
'
|
'
|
||||||
@@ -353,7 +333,7 @@ Partial Class frmStartUpWizard
|
|||||||
Me.Name = "frmStartUpWizard"
|
Me.Name = "frmStartUpWizard"
|
||||||
Me.ShowIcon = False
|
Me.ShowIcon = False
|
||||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
|
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
|
||||||
Me.Text = "GBM Setup Wizard"
|
Me.Text = "GBM Setup"
|
||||||
Me.tabWizard.ResumeLayout(False)
|
Me.tabWizard.ResumeLayout(False)
|
||||||
Me.tbPage1.ResumeLayout(False)
|
Me.tbPage1.ResumeLayout(False)
|
||||||
Me.tbPage1.PerformLayout()
|
Me.tbPage1.PerformLayout()
|
||||||
@@ -374,7 +354,6 @@ Partial Class frmStartUpWizard
|
|||||||
Friend WithEvents tbPage3 As System.Windows.Forms.TabPage
|
Friend WithEvents tbPage3 As System.Windows.Forms.TabPage
|
||||||
Friend WithEvents tbPage4 As System.Windows.Forms.TabPage
|
Friend WithEvents tbPage4 As System.Windows.Forms.TabPage
|
||||||
Friend WithEvents lblStep1Instructions As System.Windows.Forms.Label
|
Friend WithEvents lblStep1Instructions As System.Windows.Forms.Label
|
||||||
Friend WithEvents lblStep1Intro As System.Windows.Forms.Label
|
|
||||||
Friend WithEvents lblStep2Instructions As System.Windows.Forms.Label
|
Friend WithEvents lblStep2Instructions As System.Windows.Forms.Label
|
||||||
Friend WithEvents btnFolderBrowse As System.Windows.Forms.Button
|
Friend WithEvents btnFolderBrowse As System.Windows.Forms.Button
|
||||||
Friend WithEvents txtBackupPath As System.Windows.Forms.TextBox
|
Friend WithEvents txtBackupPath As System.Windows.Forms.TextBox
|
||||||
@@ -385,13 +364,12 @@ Partial Class frmStartUpWizard
|
|||||||
Friend WithEvents lblStep2Title As System.Windows.Forms.Label
|
Friend WithEvents lblStep2Title As System.Windows.Forms.Label
|
||||||
Friend WithEvents lblStep3Title As System.Windows.Forms.Label
|
Friend WithEvents lblStep3Title As System.Windows.Forms.Label
|
||||||
Friend WithEvents lblStep4Title As System.Windows.Forms.Label
|
Friend WithEvents lblStep4Title As System.Windows.Forms.Label
|
||||||
Friend WithEvents lblStep1Instructions2 As System.Windows.Forms.Label
|
|
||||||
Friend WithEvents lblStep1Instructions3 As System.Windows.Forms.Label
|
|
||||||
Friend WithEvents chkCreateFolder As System.Windows.Forms.CheckBox
|
Friend WithEvents chkCreateFolder As System.Windows.Forms.CheckBox
|
||||||
Friend WithEvents btnDownloadList As System.Windows.Forms.Button
|
Friend WithEvents btnDownloadList As System.Windows.Forms.Button
|
||||||
Friend WithEvents btnOpenWizard As System.Windows.Forms.Button
|
Friend WithEvents btnOpenWizard As System.Windows.Forms.Button
|
||||||
Friend WithEvents btnOpenMonitorList As System.Windows.Forms.Button
|
Friend WithEvents btnOpenMonitorList As System.Windows.Forms.Button
|
||||||
Friend WithEvents lblStep4Instructions3 As System.Windows.Forms.Label
|
Friend WithEvents lblStep4Instructions3 As System.Windows.Forms.Label
|
||||||
Friend WithEvents lblStep4Instructions2 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
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -117,10 +117,7 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<data name="lblStep2Instructions.Text" xml:space="preserve">
|
|
||||||
<value>GBM will store all your backup files in this location. It's best to use a cloud folder so your backups are automatically uploaded as soon as they are completed. GBM also stores a file called gbm.s3db in this location, this is how your backups are tracked so don't delete it!</value>
|
|
||||||
</data>
|
|
||||||
<data name="lblStep3Intro.Text" xml:space="preserve">
|
<data name="lblStep3Intro.Text" xml:space="preserve">
|
||||||
<value>Before you can start monitoring for games, they need to be configured so GBM knows what to look for and how to handle them. You can download configurations from the official pre-configured list or add them all yourself.</value>
|
<value>Before you can start monitoring for games, they need to be configured so GBM knows what to look for and how to handle them. You can download pre-made configurations from the official list or add them all yourself using the tools below. You can also skip this step for now!</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
Imports System.IO
|
Imports GBM.My.Resources
|
||||||
|
Imports System.IO
|
||||||
|
|
||||||
Public Class frmStartUpWizard
|
Public Class frmStartUpWizard
|
||||||
|
|
||||||
@@ -26,7 +27,33 @@ Public Class frmStartUpWizard
|
|||||||
|
|
||||||
Private eCurrentStep As eSteps = eSteps.Step1
|
Private eCurrentStep As eSteps = eSteps.Step1
|
||||||
|
|
||||||
Private Sub FormInit()
|
Private Sub SetForm()
|
||||||
|
'Set Form Name
|
||||||
|
Me.Text = frmStartUpWizard_FormName
|
||||||
|
|
||||||
|
'Set Form Text
|
||||||
|
btnNext.Text = frmStartUpWizard_btnNext
|
||||||
|
btnBack.Text = frmStartUpWizard_btnBack
|
||||||
|
lblStep1Instructions2.Text = frmStartUpWizard_lblStep1Instructions2
|
||||||
|
llbManual.Text = frmStartUpWizard_llbManual
|
||||||
|
lblStep1Title.Text = frmStartUpWizard_lblStep1Title
|
||||||
|
lblStep1Instructions.Text = frmStartUpWizard_lblStep1Instructions
|
||||||
|
chkCreateFolder.Text = frmStartUpWizard_chkCreateFolder
|
||||||
|
lblStep2Title.Text = frmStartUpWizard_lblStep2Title
|
||||||
|
lblStep2Instructions.Text = frmStartUpWizard_lblStep2Instructions
|
||||||
|
btnFolderBrowse.Text = frmStartUpWizard_btnFolderBrowse
|
||||||
|
lblStep2Intro.Text = frmStartUpWizard_lblStep2Intro
|
||||||
|
btnOpenWizard.Text = frmStartUpWizard_btnOpenWizard
|
||||||
|
btnOpenMonitorList.Text = frmStartUpWizard_btnOpenMonitorList
|
||||||
|
btnDownloadList.Text = frmStartUpWizard_btnDownloadList
|
||||||
|
lblStep3Title.Text = frmStartUpWizard_lblStep3Title
|
||||||
|
lblStep3Intro.Text = frmStartUpWizard_lblStep3Intro
|
||||||
|
lblStep4Instructions3.Text = frmStartUpWizard_lblStep4Instructions3
|
||||||
|
lblStep4Instructions2.Text = frmStartUpWizard_lblStep4Instructions2
|
||||||
|
lblStep4Title.Text = frmStartUpWizard_lblStep4Title
|
||||||
|
lblStep4Instructions.Text = frmStartUpWizard_lblStep4Instructions
|
||||||
|
|
||||||
|
llbManual.Links.Add(0, 26, App_URLManual)
|
||||||
LoadGameSettings()
|
LoadGameSettings()
|
||||||
StepHandler()
|
StepHandler()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -38,8 +65,8 @@ Public Class frmStartUpWizard
|
|||||||
If oDatabase.CheckDB() Then
|
If oDatabase.CheckDB() Then
|
||||||
'Make sure database is the latest version
|
'Make sure database is the latest version
|
||||||
oDatabase.DatabaseUpgrade()
|
oDatabase.DatabaseUpgrade()
|
||||||
mgrMonitorList.SyncMonitorLists(False)
|
mgrMonitorList.SyncMonitorLists(oSettings, False)
|
||||||
MsgBox("Existing data was detected in the backup folder and has been imported.", MsgBoxStyle.Information, "Game Backup Monitor")
|
mgrCommon.ShowMessage(frmStartUpWizard_ExistingData, MsgBoxStyle.Information)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -52,35 +79,42 @@ Public Class frmStartUpWizard
|
|||||||
Case eSteps.Step2
|
Case eSteps.Step2
|
||||||
txtBackupPath.Text = oSettings.BackupFolder
|
txtBackupPath.Text = oSettings.BackupFolder
|
||||||
chkCreateFolder.Checked = oSettings.CreateSubFolder
|
chkCreateFolder.Checked = oSettings.CreateSubFolder
|
||||||
chkSync.Checked = oSettings.Sync
|
|
||||||
btnBack.Enabled = True
|
btnBack.Enabled = True
|
||||||
btnNext.Enabled = True
|
btnNext.Enabled = True
|
||||||
tabWizard.SelectTab(1)
|
tabWizard.SelectTab(1)
|
||||||
Case eSteps.Step3
|
Case eSteps.Step3
|
||||||
btnBack.Enabled = False
|
btnBack.Enabled = False
|
||||||
btnNext.Enabled = True
|
btnNext.Enabled = True
|
||||||
btnNext.Text = "&Next"
|
btnNext.Text = frmStartUpWizard_btnNext
|
||||||
tabWizard.SelectTab(2)
|
tabWizard.SelectTab(2)
|
||||||
Case eSteps.Step4
|
Case eSteps.Step4
|
||||||
btnBack.Enabled = True
|
btnBack.Enabled = True
|
||||||
btnNext.Enabled = True
|
btnNext.Enabled = True
|
||||||
btnNext.Text = "&Finish"
|
btnNext.Text = frmStartUpWizard_btnNext_Finish
|
||||||
tabWizard.SelectTab(3)
|
tabWizard.SelectTab(3)
|
||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub DownloadSettings()
|
Private Sub DownloadSettings()
|
||||||
If MsgBox("Would you like to import from the latest pre-configured game list?", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
Dim sImportURL As String
|
||||||
If mgrMonitorList.DoImport(mgrPath.OfficialImportURL) Then
|
|
||||||
oGameData = mgrMonitorList.ReadList(mgrMonitorList.eListTypes.ScanList)
|
If mgrCommon.IsUnix Then
|
||||||
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists()
|
sImportURL = App_URLImportLinux
|
||||||
|
Else
|
||||||
|
sImportURL = App_URLImport
|
||||||
|
End If
|
||||||
|
|
||||||
|
If mgrCommon.ShowMessage(frmStartUpWizard_ConfirmOfficialImport, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
|
If mgrMonitorList.DoImport(sImportURL, True, Settings, True) Then
|
||||||
|
oGameData = mgrMonitorList.ReadList(mgrMonitorList.eListTypes.FullList)
|
||||||
|
mgrMonitorList.SyncMonitorLists(oSettings)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub LoadGameSettings()
|
Private Sub LoadGameSettings()
|
||||||
'Load Game XML
|
'Load Game XML
|
||||||
oGameData = mgrMonitorList.ReadList(mgrMonitorList.eListTypes.ScanList)
|
oGameData = mgrMonitorList.ReadList(mgrMonitorList.eListTypes.FullList)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OpenGameWizard()
|
Private Sub OpenGameWizard()
|
||||||
@@ -88,33 +122,32 @@ Public Class frmStartUpWizard
|
|||||||
frm.GameData = oGameData
|
frm.GameData = oGameData
|
||||||
frm.ShowDialog()
|
frm.ShowDialog()
|
||||||
LoadGameSettings()
|
LoadGameSettings()
|
||||||
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists()
|
mgrMonitorList.SyncMonitorLists(oSettings)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OpenMonitorList()
|
Private Sub OpenMonitorList()
|
||||||
Dim frm As New frmGameManager
|
Dim frm As New frmGameManager
|
||||||
frm.BackupFolder = oSettings.BackupFolder
|
frm.Settings = oSettings
|
||||||
frm.DisableExternalFunctions = True
|
frm.DisableExternalFunctions = True
|
||||||
frm.ShowDialog()
|
frm.ShowDialog()
|
||||||
LoadGameSettings()
|
LoadGameSettings()
|
||||||
If oSettings.Sync Then mgrMonitorList.SyncMonitorLists()
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function ValidateBackupPath(ByVal strPath As String, ByRef sErrorMessage As String) As Boolean
|
Private Function ValidateBackupPath(ByVal strPath As String, ByRef sErrorMessage As String) As Boolean
|
||||||
If strPath = String.Empty Then
|
If strPath = String.Empty Then
|
||||||
sErrorMessage = "You must select a backup path to continue."
|
sErrorMessage = frmStartUpWizard_ErrorNoFolder
|
||||||
txtBackupPath.Focus()
|
txtBackupPath.Focus()
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not Directory.Exists(strPath) Then
|
If Not Directory.Exists(strPath) Then
|
||||||
sErrorMessage = "The folder you selected does not exist or is not a valid folder."
|
sErrorMessage = frmStartUpWizard_ErrorNoFolderExists
|
||||||
txtBackupPath.Focus()
|
txtBackupPath.Focus()
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not Path.IsPathRooted(strPath) Then
|
If Not Path.IsPathRooted(strPath) Then
|
||||||
sErrorMessage = "The selected path must be a full path."
|
sErrorMessage = frmStartUpWizard_ErrorBadFolder
|
||||||
txtBackupPath.Focus()
|
txtBackupPath.Focus()
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
@@ -147,10 +180,9 @@ Public Class frmStartUpWizard
|
|||||||
If ValidateBackupPath(txtBackupPath.Text, sErrorMessage) Then
|
If ValidateBackupPath(txtBackupPath.Text, sErrorMessage) Then
|
||||||
oSettings.BackupFolder = txtBackupPath.Text
|
oSettings.BackupFolder = txtBackupPath.Text
|
||||||
oSettings.CreateSubFolder = chkCreateFolder.Checked
|
oSettings.CreateSubFolder = chkCreateFolder.Checked
|
||||||
oSettings.Sync = chkSync.Checked
|
|
||||||
oSettings.SaveSettings()
|
oSettings.SaveSettings()
|
||||||
oSettings.LoadSettings()
|
oSettings.LoadSettings()
|
||||||
If oSettings.Sync Then CheckSync()
|
CheckSync()
|
||||||
eCurrentStep = eSteps.Step3
|
eCurrentStep = eSteps.Step3
|
||||||
Else
|
Else
|
||||||
bError = True
|
bError = True
|
||||||
@@ -164,7 +196,7 @@ Public Class frmStartUpWizard
|
|||||||
Me.Close()
|
Me.Close()
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
If bError Then MsgBox(sErrorMessage, MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
If bError Then mgrCommon.ShowMessage(sErrorMessage, MsgBoxStyle.Exclamation)
|
||||||
StepHandler()
|
StepHandler()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -179,7 +211,7 @@ Public Class frmStartUpWizard
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
sNewPath = mgrCommon.OpenFolderBrowser("Choose GBM backup folder:", sDefaultFolder, False)
|
sNewPath = mgrCommon.OpenFolderBrowser("Wizard_Backup_Path", frmStartUpWizard_BrowseFolder, sDefaultFolder, True, False)
|
||||||
|
|
||||||
If sNewPath <> String.Empty Then txtBackupPath.Text = sNewPath
|
If sNewPath <> String.Empty Then txtBackupPath.Text = sNewPath
|
||||||
End Sub
|
End Sub
|
||||||
@@ -193,7 +225,7 @@ Public Class frmStartUpWizard
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub frmStartUpWizard_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
Private Sub frmStartUpWizard_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
FormInit()
|
SetForm()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub btnFolderBrowse_Click(sender As Object, e As EventArgs) Handles btnFolderBrowse.Click
|
Private Sub btnFolderBrowse_Click(sender As Object, e As EventArgs) Handles btnFolderBrowse.Click
|
||||||
@@ -217,4 +249,8 @@ Public Class frmStartUpWizard
|
|||||||
e.Cancel = True
|
e.Cancel = True
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub llbManual_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles llbManual.LinkClicked
|
||||||
|
Process.Start(e.Link.LinkData.ToString)
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
Generated
+150
@@ -0,0 +1,150 @@
|
|||||||
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||||
|
Partial Class frmSyncFields
|
||||||
|
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.grpFields = New System.Windows.Forms.GroupBox()
|
||||||
|
Me.chkMonitorGame = New System.Windows.Forms.CheckBox()
|
||||||
|
Me.chkIcon = New System.Windows.Forms.CheckBox()
|
||||||
|
Me.chkVersion = New System.Windows.Forms.CheckBox()
|
||||||
|
Me.chkCompany = New System.Windows.Forms.CheckBox()
|
||||||
|
Me.chkGamePath = New System.Windows.Forms.CheckBox()
|
||||||
|
Me.btnCancel = New System.Windows.Forms.Button()
|
||||||
|
Me.btnSave = New System.Windows.Forms.Button()
|
||||||
|
Me.grpFields.SuspendLayout()
|
||||||
|
Me.SuspendLayout()
|
||||||
|
'
|
||||||
|
'grpFields
|
||||||
|
'
|
||||||
|
Me.grpFields.Controls.Add(Me.chkMonitorGame)
|
||||||
|
Me.grpFields.Controls.Add(Me.chkIcon)
|
||||||
|
Me.grpFields.Controls.Add(Me.chkVersion)
|
||||||
|
Me.grpFields.Controls.Add(Me.chkCompany)
|
||||||
|
Me.grpFields.Controls.Add(Me.chkGamePath)
|
||||||
|
Me.grpFields.Location = New System.Drawing.Point(12, 12)
|
||||||
|
Me.grpFields.Name = "grpFields"
|
||||||
|
Me.grpFields.Size = New System.Drawing.Size(195, 135)
|
||||||
|
Me.grpFields.TabIndex = 0
|
||||||
|
Me.grpFields.TabStop = False
|
||||||
|
Me.grpFields.Text = "Available Fields"
|
||||||
|
'
|
||||||
|
'chkMonitorGame
|
||||||
|
'
|
||||||
|
Me.chkMonitorGame.AutoSize = True
|
||||||
|
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
|
||||||
|
Me.chkMonitorGame.Text = "Monitor this game"
|
||||||
|
Me.chkMonitorGame.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'chkIcon
|
||||||
|
'
|
||||||
|
Me.chkIcon.AutoSize = True
|
||||||
|
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
|
||||||
|
Me.chkIcon.Text = "Icon (Not Recommended)"
|
||||||
|
Me.chkIcon.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'chkVersion
|
||||||
|
'
|
||||||
|
Me.chkVersion.AutoSize = True
|
||||||
|
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
|
||||||
|
Me.chkVersion.Text = "Version"
|
||||||
|
Me.chkVersion.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'chkCompany
|
||||||
|
'
|
||||||
|
Me.chkCompany.AutoSize = True
|
||||||
|
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
|
||||||
|
Me.chkCompany.Text = "Company"
|
||||||
|
Me.chkCompany.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'chkGamePath
|
||||||
|
'
|
||||||
|
Me.chkGamePath.AutoSize = True
|
||||||
|
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
|
||||||
|
'
|
||||||
|
'btnCancel
|
||||||
|
'
|
||||||
|
Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
|
||||||
|
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
|
||||||
|
Me.btnCancel.Text = "&Cancel"
|
||||||
|
Me.btnCancel.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'btnSave
|
||||||
|
'
|
||||||
|
Me.btnSave.DialogResult = System.Windows.Forms.DialogResult.OK
|
||||||
|
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
|
||||||
|
Me.btnSave.Text = "&Save"
|
||||||
|
Me.btnSave.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'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, 186)
|
||||||
|
Me.Controls.Add(Me.btnCancel)
|
||||||
|
Me.Controls.Add(Me.btnSave)
|
||||||
|
Me.Controls.Add(Me.grpFields)
|
||||||
|
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||||
|
Me.MaximizeBox = False
|
||||||
|
Me.MinimizeBox = False
|
||||||
|
Me.Name = "frmSyncFields"
|
||||||
|
Me.ShowIcon = False
|
||||||
|
Me.ShowInTaskbar = False
|
||||||
|
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
|
||||||
|
Me.Text = "Optional Sync Fields"
|
||||||
|
Me.grpFields.ResumeLayout(False)
|
||||||
|
Me.grpFields.PerformLayout()
|
||||||
|
Me.ResumeLayout(False)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend WithEvents grpFields As GroupBox
|
||||||
|
Friend WithEvents chkMonitorGame As CheckBox
|
||||||
|
Friend WithEvents chkIcon As CheckBox
|
||||||
|
Friend WithEvents chkVersion As CheckBox
|
||||||
|
Friend WithEvents chkCompany As CheckBox
|
||||||
|
Friend WithEvents chkGamePath As CheckBox
|
||||||
|
Friend WithEvents btnCancel As Button
|
||||||
|
Friend WithEvents btnSave 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,103 @@
|
|||||||
|
Imports GBM.My.Resources
|
||||||
|
|
||||||
|
Public Class frmSyncFields
|
||||||
|
Private eSyncFields As clsGame.eOptionalSyncFields
|
||||||
|
|
||||||
|
Public Property SyncFields As clsGame.eOptionalSyncFields
|
||||||
|
Get
|
||||||
|
Return eSyncFields
|
||||||
|
End Get
|
||||||
|
Set(value As clsGame.eOptionalSyncFields)
|
||||||
|
eSyncFields = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Sub LoadForm()
|
||||||
|
'Load fields
|
||||||
|
If (eSyncFields And clsGame.eOptionalSyncFields.Company) = clsGame.eOptionalSyncFields.Company Then
|
||||||
|
chkCompany.Checked = True
|
||||||
|
End If
|
||||||
|
If (eSyncFields And clsGame.eOptionalSyncFields.GamePath) = clsGame.eOptionalSyncFields.GamePath Then
|
||||||
|
chkGamePath.Checked = True
|
||||||
|
End If
|
||||||
|
If (eSyncFields And clsGame.eOptionalSyncFields.Icon) = clsGame.eOptionalSyncFields.Icon Then
|
||||||
|
chkIcon.Checked = True
|
||||||
|
End If
|
||||||
|
If (eSyncFields And clsGame.eOptionalSyncFields.MonitorGame) = clsGame.eOptionalSyncFields.MonitorGame Then
|
||||||
|
chkMonitorGame.Checked = True
|
||||||
|
End If
|
||||||
|
If (eSyncFields And clsGame.eOptionalSyncFields.Version) = clsGame.eOptionalSyncFields.Version Then
|
||||||
|
chkVersion.Checked = True
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SetForm()
|
||||||
|
'Set Form Name
|
||||||
|
Me.Text = frmSyncFields_FormName
|
||||||
|
|
||||||
|
'Set Form Text
|
||||||
|
btnCancel.Text = frmSyncFields_btnCancel
|
||||||
|
btnSave.Text = frmSyncFields_btnSave
|
||||||
|
grpFields.Text = frmSyncFields_grpFields
|
||||||
|
chkMonitorGame.Text = frmSyncFields_chkMonitorGame
|
||||||
|
chkIcon.Text = frmSyncFields_chkIcon
|
||||||
|
chkVersion.Text = frmSyncFields_chkVersion
|
||||||
|
chkCompany.Text = frmSyncFields_chkCompany
|
||||||
|
chkGamePath.Text = frmSyncFields_chkGamePath
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub frmSyncFields_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
|
SetForm()
|
||||||
|
LoadForm()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click
|
||||||
|
Me.DialogResult = DialogResult.OK
|
||||||
|
Me.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnCancel_Click(sender As Object, e As EventArgs) Handles btnCancel.Click
|
||||||
|
Me.DialogResult = DialogResult.Cancel
|
||||||
|
Me.Close()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub chkGamePath_CheckedChanged(sender As Object, e As EventArgs) Handles chkGamePath.CheckedChanged
|
||||||
|
If chkGamePath.Checked Then
|
||||||
|
SyncFields = clsGame.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.GamePath)
|
||||||
|
Else
|
||||||
|
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 = clsGame.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.Company)
|
||||||
|
Else
|
||||||
|
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 = clsGame.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.Version)
|
||||||
|
Else
|
||||||
|
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 = clsGame.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.Icon)
|
||||||
|
Else
|
||||||
|
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 = clsGame.SetSyncField(SyncFields, clsGame.eOptionalSyncFields.MonitorGame)
|
||||||
|
Else
|
||||||
|
SyncFields = clsGame.RemoveSyncField(SyncFields, clsGame.eOptionalSyncFields.MonitorGame)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
Generated
+172
@@ -0,0 +1,172 @@
|
|||||||
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||||
|
Partial Class frmTags
|
||||||
|
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.grpTag = New System.Windows.Forms.GroupBox()
|
||||||
|
Me.txtName = New System.Windows.Forms.TextBox()
|
||||||
|
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.lstTags = 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.grpTag.SuspendLayout()
|
||||||
|
Me.SuspendLayout()
|
||||||
|
'
|
||||||
|
'grpTag
|
||||||
|
'
|
||||||
|
Me.grpTag.Controls.Add(Me.txtName)
|
||||||
|
Me.grpTag.Controls.Add(Me.lblName)
|
||||||
|
Me.grpTag.Location = New System.Drawing.Point(238, 12)
|
||||||
|
Me.grpTag.Name = "grpTag"
|
||||||
|
Me.grpTag.Size = New System.Drawing.Size(334, 50)
|
||||||
|
Me.grpTag.TabIndex = 3
|
||||||
|
Me.grpTag.TabStop = False
|
||||||
|
Me.grpTag.Text = "Configuration"
|
||||||
|
'
|
||||||
|
'txtName
|
||||||
|
'
|
||||||
|
Me.txtName.Location = New System.Drawing.Point(50, 19)
|
||||||
|
Me.txtName.Name = "txtName"
|
||||||
|
Me.txtName.Size = New System.Drawing.Size(278, 20)
|
||||||
|
Me.txtName.TabIndex = 1
|
||||||
|
'
|
||||||
|
'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 = 7
|
||||||
|
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
|
||||||
|
'
|
||||||
|
'lstTags
|
||||||
|
'
|
||||||
|
Me.lstTags.FormattingEnabled = True
|
||||||
|
Me.lstTags.Location = New System.Drawing.Point(12, 12)
|
||||||
|
Me.lstTags.Name = "lstTags"
|
||||||
|
Me.lstTags.Size = New System.Drawing.Size(220, 212)
|
||||||
|
Me.lstTags.Sorted = True
|
||||||
|
Me.lstTags.TabIndex = 0
|
||||||
|
'
|
||||||
|
'txtID
|
||||||
|
'
|
||||||
|
Me.txtID.Enabled = False
|
||||||
|
Me.txtID.Location = New System.Drawing.Point(377, 67)
|
||||||
|
Me.txtID.Name = "txtID"
|
||||||
|
Me.txtID.Size = New System.Drawing.Size(33, 20)
|
||||||
|
Me.txtID.TabIndex = 4
|
||||||
|
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(497, 67)
|
||||||
|
Me.btnCancel.Name = "btnCancel"
|
||||||
|
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
|
||||||
|
Me.btnCancel.TabIndex = 6
|
||||||
|
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(416, 67)
|
||||||
|
Me.btnSave.Name = "btnSave"
|
||||||
|
Me.btnSave.Size = New System.Drawing.Size(75, 23)
|
||||||
|
Me.btnSave.TabIndex = 5
|
||||||
|
Me.btnSave.Text = "&Save"
|
||||||
|
Me.btnSave.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'frmTags
|
||||||
|
'
|
||||||
|
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.grpTag)
|
||||||
|
Me.Controls.Add(Me.btnClose)
|
||||||
|
Me.Controls.Add(Me.btnDelete)
|
||||||
|
Me.Controls.Add(Me.btnAdd)
|
||||||
|
Me.Controls.Add(Me.lstTags)
|
||||||
|
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 = "frmTags"
|
||||||
|
Me.ShowIcon = False
|
||||||
|
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||||
|
Me.Text = "Tags"
|
||||||
|
Me.grpTag.ResumeLayout(False)
|
||||||
|
Me.grpTag.PerformLayout()
|
||||||
|
Me.ResumeLayout(False)
|
||||||
|
Me.PerformLayout()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
Friend WithEvents grpTag As System.Windows.Forms.GroupBox
|
||||||
|
Friend WithEvents txtName As System.Windows.Forms.TextBox
|
||||||
|
Friend WithEvents lblName As System.Windows.Forms.Label
|
||||||
|
Friend WithEvents btnClose As System.Windows.Forms.Button
|
||||||
|
Friend WithEvents btnDelete As System.Windows.Forms.Button
|
||||||
|
Friend WithEvents btnAdd As System.Windows.Forms.Button
|
||||||
|
Friend WithEvents lstTags As System.Windows.Forms.ListBox
|
||||||
|
Friend WithEvents txtID As System.Windows.Forms.TextBox
|
||||||
|
Friend WithEvents btnCancel As System.Windows.Forms.Button
|
||||||
|
Friend WithEvents btnSave As System.Windows.Forms.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,324 @@
|
|||||||
|
Imports GBM.My.Resources
|
||||||
|
|
||||||
|
Public Class frmTags
|
||||||
|
|
||||||
|
Dim hshTagData As Hashtable
|
||||||
|
Private bIsDirty As Boolean = False
|
||||||
|
Private bIsLoading As Boolean = False
|
||||||
|
Private oCurrentTag As clsTag
|
||||||
|
|
||||||
|
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 TagData As Hashtable
|
||||||
|
Get
|
||||||
|
Return hshTagData
|
||||||
|
End Get
|
||||||
|
Set(value As Hashtable)
|
||||||
|
hshTagData = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Sub LoadData()
|
||||||
|
TagData = mgrTags.ReadTags
|
||||||
|
lstTags.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 oTag As clsTag In TagData.Values
|
||||||
|
lstTags.Items.Add(oTag.Name)
|
||||||
|
Next
|
||||||
|
|
||||||
|
IsLoading = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub FillData()
|
||||||
|
IsLoading = True
|
||||||
|
|
||||||
|
oCurrentTag = DirectCast(TagData(lstTags.SelectedItems(0).ToString), clsTag)
|
||||||
|
|
||||||
|
txtID.Text = oCurrentTag.ID
|
||||||
|
txtName.Text = oCurrentTag.Name
|
||||||
|
|
||||||
|
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 EditTag()
|
||||||
|
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
|
||||||
|
grpTag.Enabled = True
|
||||||
|
WipeControls(grpTag.Controls)
|
||||||
|
btnSave.Enabled = True
|
||||||
|
btnCancel.Enabled = True
|
||||||
|
btnAdd.Enabled = False
|
||||||
|
btnDelete.Enabled = False
|
||||||
|
lstTags.Enabled = False
|
||||||
|
Case eModes.Edit
|
||||||
|
lstTags.Enabled = False
|
||||||
|
grpTag.Enabled = True
|
||||||
|
btnSave.Enabled = True
|
||||||
|
btnCancel.Enabled = True
|
||||||
|
btnAdd.Enabled = False
|
||||||
|
btnDelete.Enabled = False
|
||||||
|
Case eModes.View
|
||||||
|
lstTags.Enabled = True
|
||||||
|
grpTag.Enabled = True
|
||||||
|
btnSave.Enabled = False
|
||||||
|
btnCancel.Enabled = False
|
||||||
|
btnAdd.Enabled = True
|
||||||
|
btnDelete.Enabled = True
|
||||||
|
Case eModes.Disabled
|
||||||
|
lstTags.Enabled = True
|
||||||
|
WipeControls(grpTag.Controls)
|
||||||
|
grpTag.Enabled = False
|
||||||
|
btnSave.Enabled = False
|
||||||
|
btnCancel.Enabled = False
|
||||||
|
btnAdd.Enabled = True
|
||||||
|
btnDelete.Enabled = True
|
||||||
|
End Select
|
||||||
|
|
||||||
|
IsLoading = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub EditTag()
|
||||||
|
eCurrentMode = eModes.Edit
|
||||||
|
ModeChange()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub AddTag()
|
||||||
|
eCurrentMode = eModes.Add
|
||||||
|
ModeChange()
|
||||||
|
txtName.Focus()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CancelEdit()
|
||||||
|
If bIsDirty Then
|
||||||
|
Select Case HandleDirty()
|
||||||
|
Case MsgBoxResult.Yes
|
||||||
|
SaveTag()
|
||||||
|
Case MsgBoxResult.No
|
||||||
|
If lstTags.SelectedItems.Count > 0 Then
|
||||||
|
eCurrentMode = eModes.View
|
||||||
|
ModeChange()
|
||||||
|
FillData()
|
||||||
|
lstTags.Focus()
|
||||||
|
Else
|
||||||
|
eCurrentMode = eModes.Disabled
|
||||||
|
ModeChange()
|
||||||
|
End If
|
||||||
|
Case MsgBoxResult.Cancel
|
||||||
|
'Do Nothing
|
||||||
|
End Select
|
||||||
|
Else
|
||||||
|
If lstTags.SelectedItems.Count > 0 Then
|
||||||
|
eCurrentMode = eModes.View
|
||||||
|
ModeChange()
|
||||||
|
FillData()
|
||||||
|
lstTags.Focus()
|
||||||
|
Else
|
||||||
|
eCurrentMode = eModes.Disabled
|
||||||
|
ModeChange()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SaveTag()
|
||||||
|
Dim oTag As New clsTag
|
||||||
|
Dim bSuccess As Boolean = False
|
||||||
|
|
||||||
|
If txtID.Text <> String.Empty Then
|
||||||
|
oTag.ID = txtID.Text
|
||||||
|
End If
|
||||||
|
oTag.Name = txtName.Text
|
||||||
|
|
||||||
|
Select Case eCurrentMode
|
||||||
|
Case eModes.Add
|
||||||
|
If CoreValidatation(oTag) Then
|
||||||
|
bSuccess = True
|
||||||
|
mgrTags.DoTagAdd(oTag)
|
||||||
|
eCurrentMode = eModes.View
|
||||||
|
End If
|
||||||
|
Case eModes.Edit
|
||||||
|
If CoreValidatation(oTag) Then
|
||||||
|
bSuccess = True
|
||||||
|
mgrTags.DoTagUpdate(oTag)
|
||||||
|
eCurrentMode = eModes.View
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
|
||||||
|
If bSuccess Then
|
||||||
|
IsDirty = False
|
||||||
|
LoadData()
|
||||||
|
ModeChange()
|
||||||
|
If eCurrentMode = eModes.View Then lstTags.SelectedIndex = lstTags.Items.IndexOf(oTag.Name)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub DeleteTag()
|
||||||
|
Dim oTag As clsTag
|
||||||
|
|
||||||
|
If lstTags.SelectedItems.Count > 0 Then
|
||||||
|
oTag = DirectCast(TagData(lstTags.SelectedItems(0).ToString), clsTag)
|
||||||
|
|
||||||
|
If mgrCommon.ShowMessage(frmTags_ConfirmDelete, oTag.Name, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
|
mgrTags.DoTagDelete(oTag.ID)
|
||||||
|
LoadData()
|
||||||
|
eCurrentMode = eModes.Disabled
|
||||||
|
ModeChange()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub SwitchTag()
|
||||||
|
If lstTags.SelectedItems.Count > 0 Then
|
||||||
|
eCurrentMode = eModes.View
|
||||||
|
FillData()
|
||||||
|
ModeChange()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function CoreValidatation(ByVal oTag As clsTag) As Boolean
|
||||||
|
If txtName.Text = String.Empty Then
|
||||||
|
mgrCommon.ShowMessage(frmTags_ErrorValidName, MsgBoxStyle.Exclamation)
|
||||||
|
txtName.Focus()
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If mgrTags.DoCheckDuplicate(oTag.Name, oTag.ID) Then
|
||||||
|
mgrCommon.ShowMessage(frmTags_ErrorTagDupe, MsgBoxStyle.Exclamation)
|
||||||
|
txtName.Focus()
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub SetForm()
|
||||||
|
'Set Form Name
|
||||||
|
Me.Text = frmTags_FormName
|
||||||
|
|
||||||
|
'Set Form Text
|
||||||
|
grpTag.Text = frmTags_grpTag
|
||||||
|
lblName.Text = frmTags_lblName
|
||||||
|
btnClose.Text = frmTags_btnClose
|
||||||
|
btnDelete.Text = frmTags_btnDelete
|
||||||
|
btnAdd.Text = frmTags_btnAdd
|
||||||
|
btnCancel.Text = frmTags_btnCancel
|
||||||
|
btnSave.Text = frmTags_btnSave
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub frmTags_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
|
SetForm()
|
||||||
|
LoadData()
|
||||||
|
ModeChange()
|
||||||
|
AssignDirtyHandlers(grpTag.Controls)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub lstTags_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lstTags.SelectedIndexChanged
|
||||||
|
SwitchTag()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnAdd_Click(sender As Object, e As EventArgs) Handles btnAdd.Click
|
||||||
|
AddTag()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnDelete_Click(sender As Object, e As EventArgs) Handles btnDelete.Click
|
||||||
|
DeleteTag()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click
|
||||||
|
SaveTag()
|
||||||
|
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 frmTags_FormClosing(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosing
|
||||||
|
If bIsDirty Then
|
||||||
|
Select Case HandleDirty()
|
||||||
|
Case MsgBoxResult.Yes
|
||||||
|
SaveTag()
|
||||||
|
Case MsgBoxResult.No
|
||||||
|
'Do Nothing
|
||||||
|
Case MsgBoxResult.Cancel
|
||||||
|
e.Cancel = True
|
||||||
|
End Select
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
Generated
+6
-6
@@ -51,7 +51,7 @@ Partial Class frmVariableManager
|
|||||||
'
|
'
|
||||||
Me.btnDelete.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
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.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, 227)
|
Me.btnDelete.Location = New System.Drawing.Point(48, 226)
|
||||||
Me.btnDelete.Name = "btnDelete"
|
Me.btnDelete.Name = "btnDelete"
|
||||||
Me.btnDelete.Size = New System.Drawing.Size(30, 23)
|
Me.btnDelete.Size = New System.Drawing.Size(30, 23)
|
||||||
Me.btnDelete.TabIndex = 2
|
Me.btnDelete.TabIndex = 2
|
||||||
@@ -62,7 +62,7 @@ Partial Class frmVariableManager
|
|||||||
'
|
'
|
||||||
Me.btnAdd.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
|
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.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, 227)
|
Me.btnAdd.Location = New System.Drawing.Point(12, 226)
|
||||||
Me.btnAdd.Name = "btnAdd"
|
Me.btnAdd.Name = "btnAdd"
|
||||||
Me.btnAdd.Size = New System.Drawing.Size(30, 23)
|
Me.btnAdd.Size = New System.Drawing.Size(30, 23)
|
||||||
Me.btnAdd.TabIndex = 1
|
Me.btnAdd.TabIndex = 1
|
||||||
@@ -72,7 +72,7 @@ Partial Class frmVariableManager
|
|||||||
'btnClose
|
'btnClose
|
||||||
'
|
'
|
||||||
Me.btnClose.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
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, 227)
|
Me.btnClose.Location = New System.Drawing.Point(497, 226)
|
||||||
Me.btnClose.Name = "btnClose"
|
Me.btnClose.Name = "btnClose"
|
||||||
Me.btnClose.Size = New System.Drawing.Size(75, 23)
|
Me.btnClose.Size = New System.Drawing.Size(75, 23)
|
||||||
Me.btnClose.TabIndex = 6
|
Me.btnClose.TabIndex = 6
|
||||||
@@ -137,7 +137,7 @@ Partial Class frmVariableManager
|
|||||||
'btnCancel
|
'btnCancel
|
||||||
'
|
'
|
||||||
Me.btnCancel.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
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(497, 95)
|
Me.btnCancel.Location = New System.Drawing.Point(497, 94)
|
||||||
Me.btnCancel.Name = "btnCancel"
|
Me.btnCancel.Name = "btnCancel"
|
||||||
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
|
Me.btnCancel.Size = New System.Drawing.Size(75, 23)
|
||||||
Me.btnCancel.TabIndex = 5
|
Me.btnCancel.TabIndex = 5
|
||||||
@@ -147,7 +147,7 @@ Partial Class frmVariableManager
|
|||||||
'btnSave
|
'btnSave
|
||||||
'
|
'
|
||||||
Me.btnSave.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
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(416, 95)
|
Me.btnSave.Location = New System.Drawing.Point(416, 94)
|
||||||
Me.btnSave.Name = "btnSave"
|
Me.btnSave.Name = "btnSave"
|
||||||
Me.btnSave.Size = New System.Drawing.Size(75, 23)
|
Me.btnSave.Size = New System.Drawing.Size(75, 23)
|
||||||
Me.btnSave.TabIndex = 4
|
Me.btnSave.TabIndex = 4
|
||||||
@@ -168,7 +168,7 @@ Partial Class frmVariableManager
|
|||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
Me.ClientSize = New System.Drawing.Size(584, 262)
|
Me.ClientSize = New System.Drawing.Size(584, 261)
|
||||||
Me.Controls.Add(Me.txtID)
|
Me.Controls.Add(Me.txtID)
|
||||||
Me.Controls.Add(Me.btnCancel)
|
Me.Controls.Add(Me.btnCancel)
|
||||||
Me.Controls.Add(Me.btnSave)
|
Me.Controls.Add(Me.btnSave)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
Imports System.IO
|
Imports GBM.My.Resources
|
||||||
|
Imports System.IO
|
||||||
|
|
||||||
Public Class frmVariableManager
|
Public Class frmVariableManager
|
||||||
Dim hshVariableData As Hashtable
|
Dim hshVariableData As Hashtable
|
||||||
@@ -53,7 +54,7 @@ Public Class frmVariableManager
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
sNewPath = mgrCommon.OpenFolderBrowser("Choose the path the variable represents:", sDefaultFolder, False)
|
sNewPath = mgrCommon.OpenFolderBrowser("VM_Path", frmVariableManager_PathBrowse, sDefaultFolder, False, False)
|
||||||
|
|
||||||
If sNewPath <> String.Empty Then txtPath.Text = sNewPath
|
If sNewPath <> String.Empty Then txtPath.Text = sNewPath
|
||||||
End Sub
|
End Sub
|
||||||
@@ -67,7 +68,7 @@ Public Class frmVariableManager
|
|||||||
Private Function HandleDirty() As MsgBoxResult
|
Private Function HandleDirty() As MsgBoxResult
|
||||||
Dim oResult As MsgBoxResult
|
Dim oResult As MsgBoxResult
|
||||||
|
|
||||||
oResult = MsgBox("There are unsaved changes on this form. Do you want to save?", MsgBoxStyle.YesNoCancel, "Game Backup Monitor")
|
oResult = mgrCommon.ShowMessage(App_ConfirmDirty, MsgBoxStyle.YesNoCancel)
|
||||||
|
|
||||||
Select Case oResult
|
Select Case oResult
|
||||||
Case MsgBoxResult.Yes
|
Case MsgBoxResult.Yes
|
||||||
@@ -251,7 +252,7 @@ Public Class frmVariableManager
|
|||||||
If lstVariables.SelectedItems.Count > 0 Then
|
If lstVariables.SelectedItems.Count > 0 Then
|
||||||
oCustomVariable = DirectCast(VariableData(lstVariables.SelectedItems(0).ToString), clsPathVariable)
|
oCustomVariable = DirectCast(VariableData(lstVariables.SelectedItems(0).ToString), clsPathVariable)
|
||||||
|
|
||||||
If MsgBox("Are you sure you want to delete " & oCustomVariable.Name & "? This cannot be undone.", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
If mgrCommon.ShowMessage(frmVariableManager_ConfirmDelete, oCustomVariable.Name, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
mgrVariables.DoVariableDelete(oCustomVariable.ID)
|
mgrVariables.DoVariableDelete(oCustomVariable.ID)
|
||||||
mgrVariables.DoPathUpdate(oCurrentVariable.FormattedName, oCurrentVariable.Path)
|
mgrVariables.DoPathUpdate(oCurrentVariable.FormattedName, oCurrentVariable.Path)
|
||||||
LoadData()
|
LoadData()
|
||||||
@@ -271,19 +272,25 @@ Public Class frmVariableManager
|
|||||||
|
|
||||||
Private Function CoreValidatation(ByVal oCustomVariable As clsPathVariable) As Boolean
|
Private Function CoreValidatation(ByVal oCustomVariable As clsPathVariable) As Boolean
|
||||||
If txtName.Text = String.Empty Then
|
If txtName.Text = String.Empty Then
|
||||||
MsgBox("You must enter a valid path name.", MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
mgrCommon.ShowMessage(frmVariableManager_ErrorValidName, MsgBoxStyle.Exclamation)
|
||||||
txtName.Focus()
|
txtName.Focus()
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If txtPath.Text = String.Empty Then
|
If txtPath.Text = String.Empty Then
|
||||||
MsgBox("You must enter a valid path.", MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
mgrCommon.ShowMessage(frmVariableManager_ErrorValidPath, MsgBoxStyle.Exclamation)
|
||||||
txtPath.Focus()
|
txtPath.Focus()
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If mgrVariables.DoCheckDuplicate(oCustomVariable.Name, oCustomVariable.ID) Then
|
If mgrVariables.DoCheckDuplicate(oCustomVariable.Name, oCustomVariable.ID) Then
|
||||||
MsgBox("An custom variable with this name already exists.", MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
mgrCommon.ShowMessage(frmVariableManager_ErrorVariableDupe, MsgBoxStyle.Exclamation)
|
||||||
|
txtName.Focus()
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If mgrVariables.GetReservedVariables.Contains(txtName.Text.ToUpper) Then
|
||||||
|
mgrCommon.ShowMessage(frmVariableManager_ErrorVariableReserved, txtName.Text, MsgBoxStyle.Exclamation)
|
||||||
txtName.Focus()
|
txtName.Focus()
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
@@ -291,7 +298,24 @@ Public Class frmVariableManager
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Sub SetForm()
|
||||||
|
'Set Form Name
|
||||||
|
Me.Text = frmVariableManager_FormName
|
||||||
|
|
||||||
|
'Set Form Text
|
||||||
|
btnCancel.Text = frmVariableManager_btnCancel
|
||||||
|
btnSave.Text = frmVariableManager_btnSave
|
||||||
|
grpVariable.Text = frmVariableManager_grpVariable
|
||||||
|
btnPathBrowse.Text = frmVariableManager_btnPathBrowse
|
||||||
|
lblPath.Text = frmVariableManager_lblPath
|
||||||
|
lblName.Text = frmVariableManager_lblName
|
||||||
|
btnClose.Text = frmVariableManager_btnClose
|
||||||
|
btnDelete.Text = frmVariableManager_btnDelete
|
||||||
|
btnAdd.Text = frmVariableManager_btnAdd
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub frmVariableManager_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
Private Sub frmVariableManager_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
|
SetForm()
|
||||||
LoadData()
|
LoadData()
|
||||||
ModeChange()
|
ModeChange()
|
||||||
AssignDirtyHandlers(grpVariable.Controls)
|
AssignDirtyHandlers(grpVariable.Controls)
|
||||||
|
|||||||
+135
-32
@@ -90,14 +90,23 @@
|
|||||||
<PlatformTarget>x64</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet>ManagedMinimumRules.ruleset</CodeAnalysisRuleSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<PostBuildEvent Condition="$(Platform)==x64">echo Running x64 Post Build Event...
|
||||||
|
COPY /Y "$(SolutionDir)\GBM\x64\sqlite3.dll" .
|
||||||
|
RMDIR /S /Q Utilities\x86</PostBuildEvent>
|
||||||
|
<PostBuildEvent Condition="$(Platform)==x86">echo Running x86 Post Build Event...
|
||||||
|
COPY /Y "$(SolutionDir)\GBM\x86\sqlite3.dll" .
|
||||||
|
RMDIR /S /Q Utilities\x64</PostBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Reference Include="Mono.Data.Sqlite, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>References\Mono.Data.Sqlite.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Data.SQLite, Version=1.0.94.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>References\System.Data.SQLite.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
|
<Reference Include="System.Management" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
@@ -113,15 +122,33 @@
|
|||||||
<Import Include="System.Windows.Forms" />
|
<Import Include="System.Windows.Forms" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="Classes\clsGameProcess.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" />
|
||||||
<Compile Include="Classes\clsPathVariable.vb" />
|
<Compile Include="Classes\clsPathVariable.vb" />
|
||||||
<Compile Include="Classes\clsBackup.vb" />
|
<Compile Include="Classes\clsBackup.vb" />
|
||||||
<Compile Include="Classes\clsGame.vb" />
|
<Compile Include="Classes\clsGame.vb" />
|
||||||
|
<Compile Include="Classes\clsTag.vb" />
|
||||||
<Compile Include="Forms\frmAdvancedImport.Designer.vb">
|
<Compile Include="Forms\frmAdvancedImport.Designer.vb">
|
||||||
<DependentUpon>frmAdvancedImport.vb</DependentUpon>
|
<DependentUpon>frmAdvancedImport.vb</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Forms\frmAdvancedImport.vb">
|
<Compile Include="Forms\frmAdvancedImport.vb">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Forms\frmFilter.Designer.vb">
|
||||||
|
<DependentUpon>frmFilter.vb</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Forms\frmFilter.vb">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Forms\frmGameManager.Designer.vb">
|
<Compile Include="Forms\frmGameManager.Designer.vb">
|
||||||
<DependentUpon>frmGameManager.vb</DependentUpon>
|
<DependentUpon>frmGameManager.vb</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -134,6 +161,42 @@
|
|||||||
<Compile Include="Forms\frmFileFolderSearch.vb">
|
<Compile Include="Forms\frmFileFolderSearch.vb">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</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>
|
||||||
|
<Compile Include="Forms\frmGameTags.vb">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Forms\frmIncludeExclude.Designer.vb">
|
||||||
|
<DependentUpon>frmIncludeExclude.vb</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<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">
|
<Compile Include="Forms\frmStartUpWizard.Designer.vb">
|
||||||
<DependentUpon>frmStartUpWizard.vb</DependentUpon>
|
<DependentUpon>frmStartUpWizard.vb</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -165,24 +228,42 @@
|
|||||||
<DependentUpon>frmMain.vb</DependentUpon>
|
<DependentUpon>frmMain.vb</DependentUpon>
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Forms\frmSyncFields.Designer.vb">
|
||||||
|
<DependentUpon>frmSyncFields.vb</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Forms\frmSyncFields.vb">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Forms\frmTags.Designer.vb">
|
||||||
|
<DependentUpon>frmTags.vb</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Forms\frmTags.vb">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Forms\frmVariableManager.Designer.vb">
|
<Compile Include="Forms\frmVariableManager.Designer.vb">
|
||||||
<DependentUpon>frmVariableManager.vb</DependentUpon>
|
<DependentUpon>frmVariableManager.vb</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Forms\frmVariableManager.vb">
|
<Compile Include="Forms\frmVariableManager.vb">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Managers\mgrGameProcesses.vb" />
|
||||||
|
<Compile Include="Managers\mgrProcess.vb" />
|
||||||
<Compile Include="Managers\mgrCommon.vb" />
|
<Compile Include="Managers\mgrCommon.vb" />
|
||||||
|
<Compile Include="Managers\mgrGameTags.vb" />
|
||||||
<Compile Include="Managers\mgrHash.vb" />
|
<Compile Include="Managers\mgrHash.vb" />
|
||||||
<Compile Include="Managers\mgrManifest.vb" />
|
<Compile Include="Managers\mgrManifest.vb" />
|
||||||
<Compile Include="Managers\mgrMonitorList.vb" />
|
<Compile Include="Managers\mgrMonitorList.vb" />
|
||||||
<Compile Include="Managers\mgrPath.vb" />
|
<Compile Include="Managers\mgrPath.vb" />
|
||||||
<Compile Include="Managers\mgrRestore.vb" />
|
<Compile Include="Managers\mgrRestore.vb" />
|
||||||
|
<Compile Include="Managers\mgrSavedPath.vb" />
|
||||||
|
<Compile Include="Managers\mgrSessions.vb" />
|
||||||
<Compile Include="Managers\mgrSettings.vb" />
|
<Compile Include="Managers\mgrSettings.vb" />
|
||||||
<Compile Include="Managers\mgrBackup.vb" />
|
<Compile Include="Managers\mgrBackup.vb" />
|
||||||
<Compile Include="Managers\mgrSQLite.vb" />
|
<Compile Include="Managers\mgrSQLite.vb" />
|
||||||
|
<Compile Include="Managers\mgrTags.vb" />
|
||||||
<Compile Include="Managers\mgrVariables.vb" />
|
<Compile Include="Managers\mgrVariables.vb" />
|
||||||
<Compile Include="Managers\mgrXML.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\AssemblyInfo.vb" />
|
||||||
<Compile Include="My Project\Application.Designer.vb">
|
<Compile Include="My Project\Application.Designer.vb">
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
@@ -203,12 +284,33 @@
|
|||||||
<EmbeddedResource Include="Forms\frmAdvancedImport.resx">
|
<EmbeddedResource Include="Forms\frmAdvancedImport.resx">
|
||||||
<DependentUpon>frmAdvancedImport.vb</DependentUpon>
|
<DependentUpon>frmAdvancedImport.vb</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Forms\frmFilter.resx">
|
||||||
|
<DependentUpon>frmFilter.vb</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Forms\frmGameManager.resx">
|
<EmbeddedResource Include="Forms\frmGameManager.resx">
|
||||||
<DependentUpon>frmGameManager.vb</DependentUpon>
|
<DependentUpon>frmGameManager.vb</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Forms\frmFileFolderSearch.resx">
|
<EmbeddedResource Include="Forms\frmFileFolderSearch.resx">
|
||||||
<DependentUpon>frmFileFolderSearch.vb</DependentUpon>
|
<DependentUpon>frmFileFolderSearch.vb</DependentUpon>
|
||||||
</EmbeddedResource>
|
</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">
|
<EmbeddedResource Include="Forms\frmStartUpWizard.resx">
|
||||||
<DependentUpon>frmStartUpWizard.vb</DependentUpon>
|
<DependentUpon>frmStartUpWizard.vb</DependentUpon>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
@@ -226,14 +328,20 @@
|
|||||||
<DependentUpon>frmMain.vb</DependentUpon>
|
<DependentUpon>frmMain.vb</DependentUpon>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Forms\frmSyncFields.resx">
|
||||||
|
<DependentUpon>frmSyncFields.vb</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="Forms\frmTags.resx">
|
||||||
|
<DependentUpon>frmTags.vb</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Forms\frmVariableManager.resx">
|
<EmbeddedResource Include="Forms\frmVariableManager.resx">
|
||||||
<DependentUpon>frmVariableManager.vb</DependentUpon>
|
<DependentUpon>frmVariableManager.vb</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="My Project\Resources.resx">
|
<EmbeddedResource Include="My Project\Resources.resx">
|
||||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
|
||||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
|
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -272,41 +380,34 @@
|
|||||||
</BootstrapperPackage>
|
</BootstrapperPackage>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="gbm.ico" />
|
<Content Include="gbm.ico">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
<Content Include="License\credits.txt">
|
<Content Include="License\credits.txt">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="References\System.Data.SQLite.dll" />
|
<Content Include="References\Mono.Data.Sqlite.dll" />
|
||||||
<None Include="Resources\gbm.ico" />
|
<Content Include="Resources\New.png" />
|
||||||
<Content Include="Resources\Admin.png" />
|
<Content Include="Resources\Update.png" />
|
||||||
<Content Include="Resources\GBM_Tray_Detected.ico" />
|
|
||||||
<Content Include="Resources\GBM_Tray_Ready.ico" />
|
|
||||||
<Content Include="Resources\GBM_Tray_Stopped.ico" />
|
|
||||||
<Content Include="Resources\User.png" />
|
|
||||||
<Content Include="Utilities\x64\7za.dll">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="Utilities\x64\7za.exe">
|
<Content Include="Utilities\x64\7za.exe">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="Utilities\x64\7zxa.dll">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="Utilities\x86\7za.dll">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="Utilities\x86\7za.exe">
|
<Content Include="Utilities\x86\7za.exe">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="Utilities\x86\7zxa.dll">
|
<Content Include="x64\sqlite3.dll" />
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<Content Include="x86\sqlite3.dll" />
|
||||||
</Content>
|
<None Include="Resources\gbm.ico" />
|
||||||
<Content Include="x64\SQLite.Interop.dll">
|
<Content Include="Resources\Admin.png" />
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<Content Include="Resources\Clock.png" />
|
||||||
</Content>
|
<Content Include="Resources\file.ico" />
|
||||||
<Content Include="x86\SQLite.Interop.dll">
|
<Content Include="Resources\folder.ico" />
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<Content Include="Resources\GBM_Tray_Detected.ico" />
|
||||||
</Content>
|
<Content Include="Resources\GBM_Tray_Ready.ico" />
|
||||||
|
<Content Include="Resources\GBM_Tray_Stopped.ico" />
|
||||||
|
<Content Include="Resources\Inbox.png" />
|
||||||
|
<Content Include="Resources\type.ico" />
|
||||||
|
<Content Include="Resources\User.png" />
|
||||||
<None Include="Resources\Stopped.png" />
|
<None Include="Resources\Stopped.png" />
|
||||||
<None Include="Resources\Detected.png" />
|
<None Include="Resources\Detected.png" />
|
||||||
<None Include="Resources\Ready.png" />
|
<None Include="Resources\Ready.png" />
|
||||||
@@ -338,6 +439,7 @@
|
|||||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||||
</COMReference>
|
</COMReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup />
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
@@ -345,5 +447,6 @@
|
|||||||
</Target>
|
</Target>
|
||||||
<Target Name="AfterBuild">
|
<Target Name="AfterBuild">
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
-->
|
-->
|
||||||
</Project>
|
</Project>
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
License for use and distribution
|
License for use and distribution
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Copyright (C) 1999-2015 Igor Pavlov.
|
Copyright (C) 1999-2018 Igor Pavlov.
|
||||||
|
|
||||||
7-Zip Extra files are under the GNU LGPL license.
|
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:
|
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
|
Sixpack Status Icons - JankoAtWarpSpeed.com
|
||||||
Primo Icon Set - webdesignerdepot.com
|
Primo Icon Set - webdesignerdepot.com
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
GBM - Game Backup Monitor
|
GBM - Game Backup Monitor
|
||||||
Copyright (C) 2015 Michael J. Seiferling
|
Copyright (C) 2016 Michael J. Seiferling
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
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
|
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:
|
Contact Information:
|
||||||
|
|
||||||
mseiferling@gmail.com
|
gamebackupmonitor@gmail.com
|
||||||
+239
-65
@@ -1,4 +1,5 @@
|
|||||||
Imports System.IO
|
Imports GBM.My.Resources
|
||||||
|
Imports System.IO
|
||||||
|
|
||||||
Public Class mgrBackup
|
Public Class mgrBackup
|
||||||
|
|
||||||
@@ -39,25 +40,25 @@ Public Class mgrBackup
|
|||||||
Dim oItem As New clsBackup
|
Dim oItem As New clsBackup
|
||||||
|
|
||||||
'Create manifest item
|
'Create manifest item
|
||||||
oItem.Name = oGameInfo.Name
|
oItem.MonitorID = oGameInfo.ID
|
||||||
'Keep the path relative to the manifest location
|
'Keep the path relative to the manifest location
|
||||||
oItem.FileName = sBackupFile.Replace(Path.GetDirectoryName(mgrPath.RemoteDatabaseLocation) & "\", "")
|
oItem.FileName = sBackupFile.Replace(Settings.BackupFolder & Path.DirectorySeparatorChar, String.Empty)
|
||||||
oItem.RestorePath = oGameInfo.TruePath
|
|
||||||
oItem.AbsolutePath = oGameInfo.AbsolutePath
|
|
||||||
oItem.DateUpdated = dTimeStamp
|
oItem.DateUpdated = dTimeStamp
|
||||||
oItem.UpdatedBy = My.Computer.Name
|
oItem.UpdatedBy = My.Computer.Name
|
||||||
oItem.CheckSum = sCheckSum
|
oItem.CheckSum = sCheckSum
|
||||||
|
|
||||||
'Save Remote Manifest
|
'Save Remote Manifest
|
||||||
If mgrManifest.DoManifestCheck(oItem.Name, mgrSQLite.Database.Remote) Then
|
If Not oGameInfo.AppendTimeStamp Then
|
||||||
mgrManifest.DoManifestUpdate(oItem, mgrSQLite.Database.Remote)
|
If Not mgrManifest.DoUpdateLatestManifest(oItem, mgrSQLite.Database.Remote) Then
|
||||||
|
mgrManifest.DoManifestAdd(oItem, mgrSQLite.Database.Remote)
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
mgrManifest.DoManifestAdd(oItem, mgrSQLite.Database.Remote)
|
mgrManifest.DoManifestAdd(oItem, mgrSQLite.Database.Remote)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Save Local Manifest
|
'Save Local Manifest
|
||||||
If mgrManifest.DoManifestCheck(oItem.Name, mgrSQLite.Database.Local) Then
|
If mgrManifest.DoManifestCheck(oItem.MonitorID, mgrSQLite.Database.Local) Then
|
||||||
mgrManifest.DoManifestUpdate(oItem, mgrSQLite.Database.Local)
|
mgrManifest.DoManifestUpdateByMonitorID(oItem, mgrSQLite.Database.Local)
|
||||||
Else
|
Else
|
||||||
mgrManifest.DoManifestAdd(oItem, mgrSQLite.Database.Local)
|
mgrManifest.DoManifestAdd(oItem, mgrSQLite.Database.Local)
|
||||||
End If
|
End If
|
||||||
@@ -74,16 +75,204 @@ Public Class mgrBackup
|
|||||||
Using oStream
|
Using oStream
|
||||||
If sList <> String.Empty Then
|
If sList <> String.Empty Then
|
||||||
For Each sTypeItem As String In sList.Split(":")
|
For Each sTypeItem As String In sList.Split(":")
|
||||||
oStream.WriteLine("""" & sBackupPath & "\" & sTypeItem & """")
|
oStream.WriteLine("""" & sBackupPath & Path.DirectorySeparatorChar & sTypeItem & """")
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
oStream.Flush()
|
oStream.Flush()
|
||||||
End Using
|
End Using
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
RaiseEvent UpdateLog("An error occured creating a file list: " & ex.Message, False, ToolTipIcon.Error, True)
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorFileList, ex.Message), False, ToolTipIcon.Error, True)
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
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
|
||||||
|
Dim sSavePath As String
|
||||||
|
Dim sOverwriteMessage As String
|
||||||
|
Dim lAvailableSpace As Long
|
||||||
|
Dim lFolderSize As Long
|
||||||
|
|
||||||
|
If oSettings.CreateSubFolder Then sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame)
|
||||||
|
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame) & ".7z"
|
||||||
|
|
||||||
|
'Verify saved game path
|
||||||
|
sSavePath = VerifySavePath(oGame)
|
||||||
|
|
||||||
|
'Calculate space
|
||||||
|
lAvailableSpace = mgrCommon.GetAvailableDiskSpace(oSettings.BackupFolder)
|
||||||
|
lFolderSize = mgrCommon.GetFolderSize(sSavePath, oGame.IncludeArray, oGame.ExcludeArray)
|
||||||
|
|
||||||
|
'Show Available Space
|
||||||
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrCommon_AvailableDiskSpace, mgrCommon.FormatDiskSpace(lAvailableSpace)), False, ToolTipIcon.Info, True)
|
||||||
|
|
||||||
|
'Show Save Folder Size
|
||||||
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrCommon_SavedGameFolderSize, New String() {oGame.Name, mgrCommon.FormatDiskSpace(lFolderSize)}), False, ToolTipIcon.Info, True)
|
||||||
|
|
||||||
|
If lFolderSize >= lAvailableSpace Then
|
||||||
|
If mgrCommon.ShowMessage(mgrBackup_ConfirmDiskSpace, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||||
|
RaiseEvent UpdateLog(mgrBackup_ErrorDiskSpace, False, ToolTipIcon.Error, True)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
'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 oGame.AbsolutePath Then
|
||||||
|
sOverwriteMessage = mgrBackup_ConfirmOverwrite
|
||||||
|
Else
|
||||||
|
sOverwriteMessage = mgrBackup_ConfirmOverwriteRelative
|
||||||
|
End If
|
||||||
|
|
||||||
|
If mgrCommon.ShowMessage(sOverwriteMessage, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||||
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorOverwriteAbort, oGame.Name), False, ToolTipIcon.Error, True)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return True
|
||||||
|
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
|
||||||
|
|
||||||
Public Sub DoBackup(ByVal oBackupList As List(Of clsGame))
|
Public Sub DoBackup(ByVal oBackupList As List(Of clsGame))
|
||||||
Dim oGame As clsGame
|
Dim oGame As clsGame
|
||||||
Dim bDoBackup As Boolean
|
Dim bDoBackup As Boolean
|
||||||
@@ -101,58 +290,31 @@ Public Class mgrBackup
|
|||||||
sBackupFile = oSettings.BackupFolder
|
sBackupFile = oSettings.BackupFolder
|
||||||
sSavePath = String.Empty
|
sSavePath = String.Empty
|
||||||
dTimeStamp = Date.Now
|
dTimeStamp = Date.Now
|
||||||
sTimeStamp = " " & dTimeStamp.Month & "-" & dTimeStamp.Day & "-" & dTimeStamp.Year & "-" & dTimeStamp.Hour & "-" & dTimeStamp.Minute & "-" & dTimeStamp.Second
|
sTimeStamp = BuildFileTimeStamp(dTimeStamp)
|
||||||
sHash = String.Empty
|
sHash = String.Empty
|
||||||
bDoBackup = True
|
bDoBackup = True
|
||||||
bBackupCompleted = False
|
bBackupCompleted = False
|
||||||
CancelOperation = False
|
CancelOperation = False
|
||||||
RaiseEvent UpdateBackupInfo(oGame)
|
RaiseEvent UpdateBackupInfo(oGame)
|
||||||
|
|
||||||
If mgrRestore.CheckManifest(oGame.Name) Then
|
|
||||||
If MsgBox("The manifest shows the backup folder contains a backup for " & oGame.Name & " that has not been restored on this computer." & vbCrLf & vbCrLf & "Do you want to overwrite this file anyway?", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.No Then
|
|
||||||
RaiseEvent UpdateLog("Backup aborted by user due to manifest conflict.", False, ToolTipIcon.Error, True)
|
|
||||||
bDoBackup = False
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If oSettings.CreateSubFolder Then
|
If oSettings.CreateSubFolder Then
|
||||||
sBackupFile = sBackupFile & "\" & oGame.Name
|
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame)
|
||||||
Try
|
bDoBackup = HandleSubFolder(oGame, sBackupFile)
|
||||||
If Not Directory.Exists(sBackupFile) Then
|
|
||||||
Directory.CreateDirectory(sBackupFile)
|
|
||||||
End If
|
|
||||||
Catch ex As Exception
|
|
||||||
RaiseEvent UpdateLog("Backup Aborted. A failure occured while creating backup sub-folder for " & oGame.Name & vbCrLf & ex.Message, False, ToolTipIcon.Error, True)
|
|
||||||
bDoBackup = False
|
|
||||||
End Try
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If oGame.AppendTimeStamp Then
|
If oGame.AppendTimeStamp Then
|
||||||
sBackupFile = sBackupFile & "\" & oGame.Name & sTimeStamp & ".7z"
|
If oGame.BackupLimit > 0 Then CheckOldBackups(oGame)
|
||||||
|
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame) & sTimeStamp & ".7z"
|
||||||
Else
|
Else
|
||||||
sBackupFile = sBackupFile & "\" & oGame.Name & ".7z"
|
sBackupFile = sBackupFile & Path.DirectorySeparatorChar & GetFileName(oGame) & ".7z"
|
||||||
End If
|
|
||||||
|
|
||||||
If oSettings.ShowOverwriteWarning And File.Exists(sBackupFile) Then
|
|
||||||
If MsgBox("A file with the same name already exists in the backup folder." & vbCrLf & vbCrLf & "Do you want to overwrite this file?", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.No Then
|
|
||||||
RaiseEvent UpdateLog(oGame.Name & " backup aborted by user due to overwrite.", False, ToolTipIcon.Error, True)
|
|
||||||
bDoBackup = False
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If bDoBackup Then
|
If bDoBackup Then
|
||||||
If oGame.AbsolutePath = False Then
|
|
||||||
If oGame.Path <> String.Empty Then
|
sSavePath = VerifySavePath(oGame)
|
||||||
sSavePath = oGame.ProcessPath & "\" & oGame.Path
|
|
||||||
Else
|
|
||||||
sSavePath = oGame.ProcessPath
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
sSavePath = oGame.Path
|
|
||||||
End If
|
|
||||||
|
|
||||||
If oGame.FolderSave = True Then
|
If oGame.FolderSave = True Then
|
||||||
BuildFileList(sSavePath, "*.*", mgrPath.IncludeFileLocation)
|
BuildFileList(sSavePath, "*", mgrPath.IncludeFileLocation)
|
||||||
Else
|
Else
|
||||||
BuildFileList(sSavePath, oGame.FileType, mgrPath.IncludeFileLocation)
|
BuildFileList(sSavePath, oGame.FileType, mgrPath.IncludeFileLocation)
|
||||||
End If
|
End If
|
||||||
@@ -160,53 +322,65 @@ Public Class mgrBackup
|
|||||||
BuildFileList(sSavePath, oGame.ExcludeList, mgrPath.ExcludeFileLocation)
|
BuildFileList(sSavePath, oGame.ExcludeList, mgrPath.ExcludeFileLocation)
|
||||||
|
|
||||||
Try
|
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.
|
'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 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
|
If File.Exists(sBackupFile) Then
|
||||||
File.Delete(sBackupFile)
|
File.Delete(sBackupFile)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Directory.Exists(sSavePath) Then
|
prs7z.StartInfo.Arguments = "a" & oSettings.Prepared7zArguments & "-t7z -mx" & oSettings.CompressionLevel & " -i@""" & mgrPath.IncludeFileLocation & """ -x@""" & mgrPath.ExcludeFileLocation & """ """ & sBackupFile & """ -r"
|
||||||
prs7z.StartInfo.Arguments = "a -t7z " & "-i@""" & mgrPath.IncludeFileLocation & """ -x@""" & mgrPath.ExcludeFileLocation & """ """ & sBackupFile & """ -r"
|
prs7z.StartInfo.FileName = oSettings.Utility7zLocation
|
||||||
prs7z.StartInfo.FileName = mgrPath.Utility7zLocation
|
|
||||||
prs7z.StartInfo.UseShellExecute = False
|
prs7z.StartInfo.UseShellExecute = False
|
||||||
prs7z.StartInfo.RedirectStandardOutput = True
|
prs7z.StartInfo.RedirectStandardOutput = True
|
||||||
prs7z.StartInfo.CreateNoWindow = True
|
prs7z.StartInfo.CreateNoWindow = True
|
||||||
prs7z.Start()
|
prs7z.Start()
|
||||||
RaiseEvent UpdateLog("Backup of " & sSavePath & " in progress...", True, ToolTipIcon.Info, True)
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_BackupInProgress, sSavePath), False, ToolTipIcon.Info, True)
|
||||||
While Not prs7z.StandardOutput.EndOfStream
|
While Not prs7z.StandardOutput.EndOfStream
|
||||||
If CancelOperation Then
|
If CancelOperation Then
|
||||||
prs7z.Kill()
|
prs7z.Kill()
|
||||||
RaiseEvent UpdateLog("Backup Aborted by user. The backup file for " & oGame.Name & " will be unusable.", False, ToolTipIcon.Error, True)
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorFullAbort, oGame.Name), True, ToolTipIcon.Error, True)
|
||||||
Exit While
|
Exit While
|
||||||
End If
|
End If
|
||||||
RaiseEvent UpdateLog(prs7z.StandardOutput.ReadLine, False, ToolTipIcon.Info, False)
|
RaiseEvent UpdateLog(prs7z.StandardOutput.ReadLine, False, ToolTipIcon.Info, False)
|
||||||
End While
|
End While
|
||||||
prs7z.WaitForExit()
|
prs7z.WaitForExit()
|
||||||
If Not CancelOperation Then
|
If Not CancelOperation Then
|
||||||
If prs7z.ExitCode = 0 Then
|
Select Case prs7z.ExitCode
|
||||||
RaiseEvent UpdateLog(oGame.Name & " backup completed.", False, ToolTipIcon.Info, True)
|
Case 0
|
||||||
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_BackupComplete, New String() {oGame.Name, mgrCommon.FormatDiskSpace(mgrCommon.GetFileSize(sBackupFile))}), False, ToolTipIcon.Info, True)
|
||||||
bBackupCompleted = True
|
bBackupCompleted = True
|
||||||
Else
|
Case 1
|
||||||
RaiseEvent UpdateLog(oGame.Name & " backup operation finished with warnings or errors.", False, ToolTipIcon.Error, True)
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_7zWarnings, oGame.Name), True, ToolTipIcon.Warning, True)
|
||||||
|
bBackupCompleted = True
|
||||||
|
Case 2
|
||||||
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_7zFatalError, oGame.Name), True, ToolTipIcon.Error, True)
|
||||||
bBackupCompleted = False
|
bBackupCompleted = False
|
||||||
End If
|
Case 7
|
||||||
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_7zCommandFailure, oGame.Name), True, ToolTipIcon.Error, True)
|
||||||
|
bBackupCompleted = False
|
||||||
|
End Select
|
||||||
End If
|
End If
|
||||||
prs7z.Dispose()
|
prs7z.Dispose()
|
||||||
Else
|
Else
|
||||||
RaiseEvent UpdateLog("Backup Aborted. The path " & sSavePath & " for " & oGame.Name & " does not exist.", False, ToolTipIcon.Error, True)
|
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
|
bBackupCompleted = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Write Main Manifest
|
'Write Main Manifest
|
||||||
If bBackupCompleted Then
|
If bBackupCompleted Then
|
||||||
If oSettings.CheckSum Then
|
|
||||||
RaiseEvent UpdateLog("Generating SHA-256 hash for " & oGame.Name & " backup file.", False, ToolTipIcon.Info, True)
|
'Generate checksum for new backup
|
||||||
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_GenerateHash, oGame.Name), False, ToolTipIcon.Info, True)
|
||||||
sHash = mgrHash.Generate_SHA256_Hash(sBackupFile)
|
sHash = mgrHash.Generate_SHA256_Hash(sBackupFile)
|
||||||
End If
|
|
||||||
|
|
||||||
If Not DoManifestUpdate(oGame, sBackupFile, dTimeStamp, sHash) Then
|
If Not DoManifestUpdate(oGame, sBackupFile, dTimeStamp, sHash) Then
|
||||||
RaiseEvent UpdateLog("The manifest update for " & oGame.Name & " failed.", False, ToolTipIcon.Error, True)
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorManifestFailure, oGame.Name), True, ToolTipIcon.Error, True)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Write the process path if we have it
|
'Write the process path if we have it
|
||||||
@@ -215,14 +389,14 @@ Public Class mgrBackup
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
RaiseEvent UpdateLog("An unexpected error occured during the backup process of " & oGame.Name & vbCrLf & ex.Message, False, ToolTipIcon.Error, True)
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_ErrorOtherFailure, New String() {oGame.Name, ex.Message}), False, ToolTipIcon.Error, True)
|
||||||
End Try
|
End Try
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If bBackupCompleted Then
|
If bBackupCompleted Then
|
||||||
RaiseEvent SetLastAction(oGame.CroppedName & " backup completed")
|
RaiseEvent SetLastAction(mgrCommon.FormatString(mgrBackup_ActionComplete, oGame.CroppedName))
|
||||||
Else
|
Else
|
||||||
RaiseEvent SetLastAction(oGame.CroppedName & " backup failed")
|
RaiseEvent SetLastAction(mgrCommon.FormatString(mgrBackup_ActionFailed, oGame.CroppedName))
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
+517
-25
@@ -1,7 +1,30 @@
|
|||||||
Imports System.Net
|
Imports GBM.My.Resources
|
||||||
|
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
|
Public Class mgrCommon
|
||||||
|
|
||||||
|
'These need to be updated when upgrading the packaged 7z utility
|
||||||
|
Private Shared sUtility64Hash As String = "8BC2A3D6C37C4DB9BD487AD35039AE0DC8A1DDF2C3B1F0B76B3E678FEBB9F223" 'v18.05 7za.exe x64
|
||||||
|
Private Shared sUtility32Hash As String = "77613CCA716EDF68B9D5BAB951463ED7FADE5BC0EC465B36190A76299C50F117" 'v18.05 7za.exe x86
|
||||||
|
|
||||||
|
Public Shared ReadOnly Property UtilityHash As String
|
||||||
|
Get
|
||||||
|
Select Case mgrPath.ReleaseType
|
||||||
|
Case 64
|
||||||
|
Return sUtility64Hash
|
||||||
|
Case 32
|
||||||
|
Return sUtility32Hash
|
||||||
|
Case Else
|
||||||
|
Return sUtility32Hash
|
||||||
|
End Select
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Public Shared ReadOnly Property BuildVersion As Integer
|
Public Shared ReadOnly Property BuildVersion As Integer
|
||||||
Get
|
Get
|
||||||
Return My.Application.Info.Version.Build
|
Return My.Application.Info.Version.Build
|
||||||
@@ -10,14 +33,62 @@ Public Class mgrCommon
|
|||||||
|
|
||||||
Public Shared ReadOnly Property AppVersion As Integer
|
Public Shared ReadOnly Property AppVersion As Integer
|
||||||
Get
|
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 Get
|
||||||
End Property
|
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
|
||||||
|
|
||||||
|
'Source - https://stackoverflow.com/questions/18873152/deep-copy-of-ordereddictionary
|
||||||
|
Public Shared Function GenericClone(ByVal oOriginal As Object) As Object
|
||||||
|
'Construct a temporary memory stream
|
||||||
|
Dim oStream As MemoryStream = New MemoryStream()
|
||||||
|
|
||||||
|
'Construct a serialization formatter that does all the hard work
|
||||||
|
Dim oFormatter As BinaryFormatter = New BinaryFormatter()
|
||||||
|
|
||||||
|
'This line Is explained in the "Streaming Contexts" section
|
||||||
|
oFormatter.Context = New StreamingContext(StreamingContextStates.Clone)
|
||||||
|
|
||||||
|
'Serialize the object graph into the memory stream
|
||||||
|
oFormatter.Serialize(oStream, oOriginal)
|
||||||
|
|
||||||
|
'Seek back to the start of the memory stream before deserializing
|
||||||
|
oStream.Position = 0
|
||||||
|
|
||||||
|
'Deserialize the graph into a New set of objects
|
||||||
|
'Return the root of the graph (deep copy) to the caller
|
||||||
|
Return oFormatter.Deserialize(oStream)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function SafeIconFromFile(ByVal sPath As String) As Image
|
||||||
|
Dim oImage As Image
|
||||||
|
Dim oReturnImage As Image
|
||||||
|
Dim oImageSize As Size = New Size(48, 48)
|
||||||
|
|
||||||
|
oImage = Image.FromFile(sPath)
|
||||||
|
oReturnImage = New Bitmap(oImage, oImageSize)
|
||||||
|
oImage.Dispose()
|
||||||
|
|
||||||
|
Return oReturnImage
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function IsAddress(ByVal sURL As String) As Boolean
|
||||||
|
If (sURL.IndexOf("http://", 0, StringComparison.CurrentCultureIgnoreCase) > -1) Or (sURL.IndexOf("https://", 0, StringComparison.CurrentCultureIgnoreCase) > -1) Then
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function CheckAddress(ByVal sURL As String) As Boolean
|
||||||
Try
|
Try
|
||||||
Dim request As WebRequest = WebRequest.Create(URL)
|
Dim request As WebRequest = WebRequest.Create(sURL)
|
||||||
Dim response As WebResponse = request.GetResponse()
|
Dim response As WebResponse = request.GetResponse()
|
||||||
|
response.Close()
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Return False
|
Return False
|
||||||
End Try
|
End Try
|
||||||
@@ -34,71 +105,166 @@ Public Class mgrCommon
|
|||||||
|
|
||||||
Public Shared Function BooleanYesNo(ByVal bBool As Boolean) As String
|
Public Shared Function BooleanYesNo(ByVal bBool As Boolean) As String
|
||||||
If bBool Then
|
If bBool Then
|
||||||
Return "Yes"
|
Return mgrCommon_Yes
|
||||||
Else
|
Else
|
||||||
Return "No"
|
Return mgrCommon_No
|
||||||
End If
|
End If
|
||||||
End Function
|
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 fbBrowser As New SaveFileDialog
|
||||||
|
Dim oSavedPath As New clsSavedPath
|
||||||
|
|
||||||
fbBrowser.Title = sTitle
|
fbBrowser.Title = sTitle
|
||||||
fbBrowser.DefaultExt = sExtension
|
fbBrowser.DefaultExt = sExtension
|
||||||
fbBrowser.Filter = sFileType & " files (*." & sExtension & ")|*." & sExtension
|
fbBrowser.Filter = FormatString(mgrCommon_FilesFilter, New String() {sFileType, sExtension, sExtension})
|
||||||
fbBrowser.InitialDirectory = sDefaultFolder
|
|
||||||
fbBrowser.FileName = sDefaultFile
|
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 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
|
Return fbBrowser.FileName
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return String.Empty
|
Return String.Empty
|
||||||
End Function
|
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
|
Private Shared Function BuildFileBrowser(ByVal sName As String, ByVal sTitle As String, ByVal sExtension As String, ByVal sFileType As String, ByVal sDefaultFolder As String,
|
||||||
Dim fbBrowser As New OpenFileDialog
|
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.Title = sTitle
|
||||||
fbBrowser.DefaultExt = sExtension
|
fbBrowser.DefaultExt = sExtension
|
||||||
fbBrowser.Filter = sFileType & " files (*." & sExtension & ")|*." & sExtension
|
fbBrowser.Filter = FormatString(mgrCommon_FilesFilter, New String() {sFileType, sExtension, sExtension})
|
||||||
fbBrowser.InitialDirectory = sDefaultFolder
|
|
||||||
fbBrowser.Multiselect = bMulti
|
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 fbBrowser.ShowDialog() = Windows.Forms.DialogResult.OK Then
|
||||||
If bMulti Then
|
If bSavedPath Then
|
||||||
Dim sFileNames As String = String.Empty
|
oSavedPath.PathName = sName
|
||||||
For Each sFileName As String In fbBrowser.FileNames
|
oSavedPath.Path = Path.GetDirectoryName(fbBrowser.FileName)
|
||||||
sFileNames &= sFileName & "|"
|
mgrSavedPath.AddUpdatePath(oSavedPath)
|
||||||
Next
|
|
||||||
sFileNames = sFileNames.TrimEnd("|")
|
|
||||||
Return sFileNames
|
|
||||||
Else
|
|
||||||
Return fbBrowser.FileName
|
|
||||||
End If
|
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
|
End If
|
||||||
|
|
||||||
Return String.Empty
|
Return String.Empty
|
||||||
End Function
|
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, ByVal bEnableNewFolder As Boolean,
|
||||||
|
Optional ByVal bSavedPath As Boolean = True) As String
|
||||||
Dim fbBrowser As New FolderBrowserDialog
|
Dim fbBrowser As New FolderBrowserDialog
|
||||||
|
Dim oSavedPath As New clsSavedPath
|
||||||
|
|
||||||
fbBrowser.Description = sTitle
|
fbBrowser.Description = sTitle
|
||||||
fbBrowser.SelectedPath = sDefaultFolder
|
fbBrowser.SelectedPath = sDefaultFolder
|
||||||
fbBrowser.ShowNewFolderButton = bEnableNewFolder
|
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 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
|
Return fbBrowser.SelectedPath
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return String.Empty
|
Return String.Empty
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function IsElevated() As Boolean
|
Public Shared Function IsProcessNotSearchable(ByVal oGame As clsGame) As Boolean
|
||||||
If My.User.IsInRole(ApplicationServices.BuiltInRole.Administrator) Then
|
Dim sExemptList As String() = {"dosbox", "scummvm"}
|
||||||
|
Dim bFound As Boolean = False
|
||||||
|
|
||||||
|
For Each s As String In sExemptList
|
||||||
|
If oGame.ProcessName.ToLower.Contains(s) Then bFound = True
|
||||||
|
Next
|
||||||
|
|
||||||
|
If bFound Then
|
||||||
Return True
|
Return True
|
||||||
Else
|
Else
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function IsUnix() As Boolean
|
||||||
|
If Path.DirectorySeparatorChar = "/" Then
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function IsElevated() As Boolean
|
||||||
|
Dim oID As WindowsIdentity = WindowsIdentity.GetCurrent
|
||||||
|
Dim oPrincipal As New WindowsPrincipal(oID)
|
||||||
|
Return oPrincipal.IsInRole(WindowsBuiltInRole.Administrator)
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Shared Sub RestartAsAdmin()
|
Public Shared Sub RestartAsAdmin()
|
||||||
Dim oProcess As New Process
|
Dim oProcess As New Process
|
||||||
|
|
||||||
@@ -110,4 +276,330 @@ Public Class mgrCommon
|
|||||||
oProcess.Start()
|
oProcess.Start()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
'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 WildcardToRegex(ByVal sPattern As String) As String
|
||||||
|
Dim sRegEx As String
|
||||||
|
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()) 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.Name, sInclude) Or CompareValueToArrayRegEx(fi.DirectoryName, sInclude)
|
||||||
|
Else
|
||||||
|
bInclude = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If sExclude.Length > 0 Then
|
||||||
|
bExclude = CompareValueToArrayRegEx(fi.Name, sExclude) Or CompareValueToArrayRegEx(fi.DirectoryName, 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 sExclude.Length > 0 Then
|
||||||
|
bExclude = CompareValueToArrayRegEx(di.Name, sExclude)
|
||||||
|
Else
|
||||||
|
bExclude = False
|
||||||
|
End If
|
||||||
|
If Not bExclude Then
|
||||||
|
lSize += GetFolderSize(di.FullName, sInclude, sExclude)
|
||||||
|
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
|
||||||
|
Public Shared Sub DeleteFile(ByVal sPath As String, Optional ByVal bRecycle As Boolean = True)
|
||||||
|
If File.Exists(sPath) Then
|
||||||
|
If IsUnix() Then
|
||||||
|
File.Delete(sPath)
|
||||||
|
Else
|
||||||
|
If bRecycle Then
|
||||||
|
My.Computer.FileSystem.DeleteFile(sPath, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.SendToRecycleBin)
|
||||||
|
Else
|
||||||
|
File.Delete(sPath)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'Delete directory based on OS type
|
||||||
|
Public Shared Sub DeleteDirectory(ByVal sPath As String, Optional ByVal bRecursive As Boolean = False)
|
||||||
|
If Directory.Exists(sPath) Then
|
||||||
|
If IsUnix() Then
|
||||||
|
Directory.Delete(sPath, bRecursive)
|
||||||
|
Else
|
||||||
|
My.Computer.FileSystem.DeleteDirectory(sPath, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.SendToRecycleBin)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'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
|
||||||
|
|
||||||
|
Try
|
||||||
|
If File.Exists(sPath) Then DeleteFile(sPath, False)
|
||||||
|
oStream = New StreamWriter(sPath)
|
||||||
|
oStream.Write(sText)
|
||||||
|
oStream.Flush()
|
||||||
|
oStream.Close()
|
||||||
|
Catch ex As Exception
|
||||||
|
ShowMessage(mgrCommon_ErrorWritingTextFile, ex.Message, MsgBoxStyle.Critical)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'Handles no extra parameters
|
||||||
|
Public Shared Function ShowMessage(ByVal sMsg As String, ByVal oType As MsgBoxStyle) As MsgBoxResult
|
||||||
|
Dim oResult As MsgBoxResult
|
||||||
|
oResult = MsgBox(FormatString(sMsg), oType, My.Resources.App_NameLong)
|
||||||
|
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
|
||||||
|
oResult = MsgBox(FormatString(sMsg, sParam), oType, My.Resources.App_NameLong)
|
||||||
|
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
|
||||||
|
oResult = MsgBox(FormatString(sMsg, sParams), oType, My.Resources.App_NameLong)
|
||||||
|
Return oResult
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'Handles no extra parameters
|
||||||
|
Public Shared Function FormatString(ByVal sString As String) As String
|
||||||
|
sString = sString.Replace("[BR]", vbCrLf)
|
||||||
|
|
||||||
|
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)
|
||||||
|
sString = sString.Replace("[PARAM]", sParam)
|
||||||
|
|
||||||
|
Return sString
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'Handles multi-parameter strings
|
||||||
|
Public Shared Function FormatString(ByVal sString As String, ByVal sParams As String()) As String
|
||||||
|
Dim iParam As Integer
|
||||||
|
|
||||||
|
sString = sString.Replace("[BR]", vbCrLf)
|
||||||
|
|
||||||
|
For Each s As String In sParams
|
||||||
|
iParam = sString.IndexOf("[PARAM]")
|
||||||
|
sString = sString.Remove(iParam, 7)
|
||||||
|
sString = sString.Insert(iParam, s)
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return sString
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'Compare functions
|
||||||
|
Public Shared Function CompareImportTagsByName(oItem1 As Tag, oItem2 As Tag) As Integer
|
||||||
|
Return String.Compare(oItem1.Name, oItem2.Name)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function CompareByListBoxItemByValue(sItem1 As KeyValuePair(Of String, String), sItem2 As KeyValuePair(Of String, String)) As Integer
|
||||||
|
Return String.Compare(sItem1.Value, sItem2.Value)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
'Maintenance Only - Function for string management
|
||||||
|
Public Shared Sub GetAllStrings(ByVal ctlParent As Control, ByRef sResource As String, ByRef sCode As String, ByVal sFormName As String)
|
||||||
|
For Each ctl As Control In ctlParent.Controls
|
||||||
|
If TypeOf ctl Is GroupBox Then
|
||||||
|
sResource &= sFormName & "_" & ctl.Name & vbTab & ctl.Text & vbCrLf
|
||||||
|
sCode &= ctl.Name & ".Text = " & sFormName & "_" & ctl.Name & vbCrLf
|
||||||
|
GetAllStrings(ctl, sResource, sCode, sFormName)
|
||||||
|
ElseIf TypeOf ctl Is TabControl Then
|
||||||
|
For Each tb As TabPage In ctl.Controls
|
||||||
|
GetAllStrings(tb, sResource, sCode, sFormName)
|
||||||
|
Next
|
||||||
|
ElseIf TypeOf ctl Is Label Then
|
||||||
|
sResource &= sFormName & "_" & ctl.Name & vbTab & ctl.Text & vbCrLf
|
||||||
|
sCode &= ctl.Name & ".Text = " & sFormName & "_" & ctl.Name & vbCrLf
|
||||||
|
ElseIf TypeOf ctl Is Button Then
|
||||||
|
sResource &= sFormName & "_" & ctl.Name & vbTab & ctl.Text & vbCrLf
|
||||||
|
sCode &= ctl.Name & ".Text = " & sFormName & "_" & ctl.Name & vbCrLf
|
||||||
|
ElseIf TypeOf ctl Is RadioButton Then
|
||||||
|
sResource &= sFormName & "_" & ctl.Name & vbTab & ctl.Text & vbCrLf
|
||||||
|
sCode &= ctl.Name & ".Text = " & sFormName & "_" & ctl.Name & vbCrLf
|
||||||
|
ElseIf TypeOf ctl Is CheckBox Then
|
||||||
|
sResource &= sFormName & "_" & ctl.Name & vbTab & ctl.Text & vbCrLf
|
||||||
|
sCode &= ctl.Name & ".Text = " & sFormName & "_" & ctl.Name & vbCrLf
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -0,0 +1,284 @@
|
|||||||
|
Public Class mgrGameTags
|
||||||
|
|
||||||
|
Public Shared Sub DoGameTagAdd(ByVal oGameTag As clsGameTag, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local)
|
||||||
|
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||||
|
Dim sSQL As String
|
||||||
|
Dim hshParams As New Hashtable
|
||||||
|
|
||||||
|
sSQL = "INSERT INTO gametags VALUES (@TagID, @MonitorID)"
|
||||||
|
hshParams.Add("TagID", oGameTag.TagID)
|
||||||
|
hshParams.Add("MonitorID", oGameTag.MonitorID)
|
||||||
|
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Shared Sub DoGameTagAddBatch(ByVal oGameTags As List(Of clsGameTag))
|
||||||
|
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 gametags VALUES (@TagID, @MonitorID);"
|
||||||
|
|
||||||
|
For Each oGameTag As clsGameTag In oGameTags
|
||||||
|
hshParams = New Hashtable
|
||||||
|
hshParams.Add("TagID", oGameTag.TagID)
|
||||||
|
hshParams.Add("MonitorID", oGameTag.MonitorID)
|
||||||
|
oParamList.Add(hshParams)
|
||||||
|
Next
|
||||||
|
|
||||||
|
oDatabase.RunMassParamQuery(sSQL, oParamList)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Shared Sub DoGameTagDelete(ByVal oGameTags As List(Of clsGameTag))
|
||||||
|
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 gametags "
|
||||||
|
sSQL &= "WHERE TagID = @TagID AND MonitorID = @MonitorID;"
|
||||||
|
|
||||||
|
For Each oGameTag As clsGameTag In oGameTags
|
||||||
|
hshParams = New Hashtable
|
||||||
|
hshParams.Add("TagID", oGameTag.TagID)
|
||||||
|
hshParams.Add("MonitorID", oGameTag.MonitorID)
|
||||||
|
oParamList.Add(hshParams)
|
||||||
|
Next
|
||||||
|
|
||||||
|
oDatabase.RunMassParamQuery(sSQL, oParamList)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Shared Sub DoGameTagDeleteByGame(ByVal sMonitorID As String)
|
||||||
|
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||||
|
Dim sSQL As String
|
||||||
|
Dim hshParams As New Hashtable
|
||||||
|
|
||||||
|
sSQL = "DELETE FROM gametags "
|
||||||
|
sSQL &= "WHERE MonitorID = @ID;"
|
||||||
|
|
||||||
|
hshParams.Add("ID", sMonitorID)
|
||||||
|
|
||||||
|
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Public Shared Sub DoGameTagDeleteByTag(ByVal sTagID As String)
|
||||||
|
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||||
|
Dim sSQL As String
|
||||||
|
Dim hshParams As New Hashtable
|
||||||
|
|
||||||
|
sSQL = "DELETE FROM gametags "
|
||||||
|
sSQL &= "WHERE TagID = @ID;"
|
||||||
|
|
||||||
|
hshParams.Add("ID", sTagID)
|
||||||
|
|
||||||
|
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
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 slList As New SortedList
|
||||||
|
Dim hshParams As New Hashtable
|
||||||
|
Dim oTag As clsTag
|
||||||
|
|
||||||
|
sSQL = "SELECT TagID, tags.Name FROM gametags NATURAL JOIN tags WHERE MonitorID = @ID"
|
||||||
|
|
||||||
|
hshParams.Add("ID", sMonitorID)
|
||||||
|
|
||||||
|
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"))
|
||||||
|
slList.Add(oTag.Name, oTag)
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return slList
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function GetTagsByGameForExport(ByVal sMonitorID As String) As List(Of Tag)
|
||||||
|
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||||
|
Dim oData As DataSet
|
||||||
|
Dim sSQL As String
|
||||||
|
Dim oList As New List(Of Tag)
|
||||||
|
Dim hshParams As New Hashtable
|
||||||
|
Dim oTag As Tag
|
||||||
|
|
||||||
|
sSQL = "SELECT TagID, tags.Name FROM gametags NATURAL JOIN tags WHERE MonitorID = @ID ORDER BY tags.Name ASC"
|
||||||
|
|
||||||
|
hshParams.Add("ID", sMonitorID)
|
||||||
|
|
||||||
|
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||||
|
|
||||||
|
For Each dr As DataRow In oData.Tables(0).Rows
|
||||||
|
oTag = New Tag
|
||||||
|
oTag.Name = CStr(dr("Name"))
|
||||||
|
oList.Add(oTag)
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return oList
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function GetTagsByGameMulti(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 oTag As clsTag
|
||||||
|
Dim iCounter As Integer
|
||||||
|
|
||||||
|
sSQL = "SELECT DISTINCT TagID, tags.Name FROM gametags NATURAL JOIN tags 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
|
||||||
|
oTag = New clsTag
|
||||||
|
oTag.ID = CStr(dr(0))
|
||||||
|
oTag.Name = CStr(dr(1))
|
||||||
|
hshList.Add(oTag.Name, oTag)
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return hshList
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function ReadGameTags(Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local) As Hashtable
|
||||||
|
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||||
|
Dim oData As DataSet
|
||||||
|
Dim sSQL As String
|
||||||
|
Dim sCompoundKey As String
|
||||||
|
Dim hshList As New Hashtable
|
||||||
|
Dim oGameTag As clsGameTag
|
||||||
|
|
||||||
|
sSQL = "SELECT * from gametags"
|
||||||
|
oData = oDatabase.ReadParamData(sSQL, New Hashtable)
|
||||||
|
|
||||||
|
For Each dr As DataRow In oData.Tables(0).Rows
|
||||||
|
oGameTag = New clsGameTag
|
||||||
|
oGameTag.TagID = CStr(dr("TagID"))
|
||||||
|
oGameTag.MonitorID = CStr(dr("MonitorID"))
|
||||||
|
sCompoundKey = oGameTag.TagID & ":" & oGameTag.MonitorID
|
||||||
|
hshList.Add(sCompoundKey, oGameTag)
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return hshList
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Sub DoGameTagAddSync(ByVal hshTags As Hashtable, 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 = "INSERT INTO gametags VALUES (@TagID, @MonitorID);"
|
||||||
|
|
||||||
|
For Each oGameTag As clsGameTag In hshTags.Values
|
||||||
|
hshParams = New Hashtable
|
||||||
|
hshParams.Add("TagID", oGameTag.TagID)
|
||||||
|
hshParams.Add("MonitorID", oGameTag.MonitorID)
|
||||||
|
oParamList.Add(hshParams)
|
||||||
|
Next
|
||||||
|
|
||||||
|
oDatabase.RunMassParamQuery(sSQL, oParamList)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Shared Sub DoGameTagDeleteSync(ByVal hshTags As Hashtable, 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 gametags "
|
||||||
|
sSQL &= "WHERE TagID = @TagID AND MonitorID = @MonitorID;"
|
||||||
|
|
||||||
|
For Each oGameTag As clsGameTag In hshTags.Values
|
||||||
|
hshParams = New Hashtable
|
||||||
|
hshParams.Add("TagID", oGameTag.TagID)
|
||||||
|
hshParams.Add("MonitorID", oGameTag.MonitorID)
|
||||||
|
oParamList.Add(hshParams)
|
||||||
|
Next
|
||||||
|
|
||||||
|
oDatabase.RunMassParamQuery(sSQL, oParamList)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Shared Function SyncGameTags(Optional ByVal bToRemote As Boolean = True) As Integer
|
||||||
|
Dim hshCompareFrom As Hashtable
|
||||||
|
Dim hshCompareTo As Hashtable
|
||||||
|
Dim hshSyncItems As Hashtable
|
||||||
|
Dim hshDeleteItems As Hashtable
|
||||||
|
Dim oFromItem As clsGameTag
|
||||||
|
Dim oToItem As clsGameTag
|
||||||
|
Dim sCompoundKey As String
|
||||||
|
|
||||||
|
'Add / Update Sync
|
||||||
|
If bToRemote Then
|
||||||
|
hshCompareFrom = ReadGameTags(mgrSQLite.Database.Local)
|
||||||
|
hshCompareTo = ReadGameTags(mgrSQLite.Database.Remote)
|
||||||
|
Else
|
||||||
|
hshCompareFrom = ReadGameTags(mgrSQLite.Database.Remote)
|
||||||
|
hshCompareTo = ReadGameTags(mgrSQLite.Database.Local)
|
||||||
|
End If
|
||||||
|
|
||||||
|
hshSyncItems = hshCompareFrom.Clone
|
||||||
|
|
||||||
|
For Each oFromItem In hshCompareFrom.Values
|
||||||
|
sCompoundKey = oFromItem.TagID & ":" & oFromItem.MonitorID
|
||||||
|
If hshCompareTo.Contains(sCompoundKey) Then
|
||||||
|
oToItem = DirectCast(hshCompareTo(sCompoundKey), clsGameTag)
|
||||||
|
If oFromItem.CoreEquals(oToItem) Then
|
||||||
|
hshSyncItems.Remove(sCompoundKey)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
If bToRemote Then
|
||||||
|
DoGameTagAddSync(hshSyncItems, mgrSQLite.Database.Remote)
|
||||||
|
Else
|
||||||
|
DoGameTagAddSync(hshSyncItems, mgrSQLite.Database.Local)
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Delete Sync
|
||||||
|
If bToRemote Then
|
||||||
|
hshCompareFrom = ReadGameTags(mgrSQLite.Database.Local)
|
||||||
|
hshCompareTo = ReadGameTags(mgrSQLite.Database.Remote)
|
||||||
|
Else
|
||||||
|
hshCompareFrom = ReadGameTags(mgrSQLite.Database.Remote)
|
||||||
|
hshCompareTo = ReadGameTags(mgrSQLite.Database.Local)
|
||||||
|
End If
|
||||||
|
|
||||||
|
hshDeleteItems = hshCompareTo.Clone
|
||||||
|
|
||||||
|
For Each oToItem In hshCompareTo.Values
|
||||||
|
sCompoundKey = oToItem.TagID & ":" & oToItem.MonitorID
|
||||||
|
If hshCompareFrom.Contains(sCompoundKey) Then
|
||||||
|
oFromItem = DirectCast(hshCompareFrom(sCompoundKey), clsGameTag)
|
||||||
|
If oToItem.CoreEquals(oFromItem) Then
|
||||||
|
hshDeleteItems.Remove(sCompoundKey)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
If bToRemote Then
|
||||||
|
DoGameTagDeleteSync(hshDeleteItems, mgrSQLite.Database.Remote)
|
||||||
|
Else
|
||||||
|
DoGameTagDeleteSync(hshDeleteItems, mgrSQLite.Database.Local)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return hshDeleteItems.Count + hshSyncItems.Count
|
||||||
|
|
||||||
|
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,5 +1,4 @@
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports System.Security
|
|
||||||
Imports System.Security.Cryptography
|
Imports System.Security.Cryptography
|
||||||
|
|
||||||
Public Class mgrHash
|
Public Class mgrHash
|
||||||
|
|||||||
+157
-85
@@ -1,44 +1,152 @@
|
|||||||
Imports System.IO
|
Public Class mgrManifest
|
||||||
|
|
||||||
Public Class mgrManifest
|
Private Shared Function MapToObject(ByVal dr As DataRow) As clsBackup
|
||||||
|
Dim oBackupItem As clsBackup
|
||||||
|
|
||||||
Public Shared Function ReadManifest(ByVal iSelectDB As mgrSQLite.Database) As SortedList
|
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 oDatabase As New mgrSQLite(iSelectDB)
|
||||||
Dim oData As DataSet
|
Dim oData As DataSet
|
||||||
Dim sSQL As String
|
Dim sSQL As String
|
||||||
Dim oBackupItem As clsBackup
|
Dim oBackupItem As clsBackup
|
||||||
Dim slList As New SortedList
|
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)
|
oData = oDatabase.ReadParamData(sSQL, New Hashtable)
|
||||||
|
|
||||||
For Each dr As DataRow In oData.Tables(0).Rows
|
For Each dr As DataRow In oData.Tables(0).Rows
|
||||||
oBackupItem = New clsBackup
|
oBackupItem = MapToObject(dr)
|
||||||
oBackupItem.ID = CStr(dr(0))
|
slList.Add(oBackupItem.ManifestID, oBackupItem)
|
||||||
oBackupItem.Name = CStr(dr(1))
|
|
||||||
oBackupItem.FileName = CStr(dr(2))
|
|
||||||
oBackupItem.RestorePath = CStr(dr(3))
|
|
||||||
oBackupItem.AbsolutePath = CBool(dr(4))
|
|
||||||
oBackupItem.DateUpdated = mgrCommon.UnixToDate(dr(5))
|
|
||||||
oBackupItem.UpdatedBy = CStr(dr(6))
|
|
||||||
If Not IsDBNull(dr(7)) Then oBackupItem.CheckSum = CStr(dr(7))
|
|
||||||
slList.Add(oBackupItem.Name, oBackupItem)
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Return slList
|
Return slList
|
||||||
|
|
||||||
End Function
|
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 oDatabase As New mgrSQLite(iSelectDB)
|
||||||
Dim oData As DataSet
|
Dim oData As DataSet
|
||||||
Dim sSQL As String
|
Dim sSQL As String
|
||||||
Dim hshParams As New Hashtable
|
Dim hshParams As New Hashtable
|
||||||
|
|
||||||
sSQL = "SELECT * from manifest "
|
sSQL = "SELECT * FROM manifest "
|
||||||
sSQL &= "WHERE Name = @Name"
|
sSQL &= "WHERE MonitorID = @MonitorID"
|
||||||
|
|
||||||
hshParams.Add("Name", sName)
|
hshParams.Add("MonitorID", sMonitorID)
|
||||||
|
|
||||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||||
|
|
||||||
@@ -50,104 +158,68 @@ Public Class mgrManifest
|
|||||||
|
|
||||||
End Function
|
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(0))
|
|
||||||
oBackupItem.Name = CStr(dr(1))
|
|
||||||
oBackupItem.FileName = CStr(dr(2))
|
|
||||||
oBackupItem.RestorePath = CStr(dr(3))
|
|
||||||
oBackupItem.AbsolutePath = CBool(dr(4))
|
|
||||||
oBackupItem.DateUpdated = mgrCommon.UnixToDate(dr(5))
|
|
||||||
oBackupItem.UpdatedBy = CStr(dr(6))
|
|
||||||
If Not IsDBNull(dr(7)) Then oBackupItem.CheckSum = CStr(dr(7))
|
|
||||||
Next
|
|
||||||
|
|
||||||
Return oBackupItem
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Shared Sub DoManifestAdd(ByVal oBackupItem As clsBackup, ByVal iSelectDB As mgrSQLite.Database)
|
Public Shared Sub DoManifestAdd(ByVal oBackupItem As clsBackup, ByVal iSelectDB As mgrSQLite.Database)
|
||||||
Dim oDatabase As New mgrSQLite(iSelectDB)
|
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||||
Dim sSQL As String
|
Dim sSQL As String
|
||||||
Dim hshParams As New Hashtable
|
Dim hshParams As Hashtable
|
||||||
|
|
||||||
sSQL = "INSERT 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 = SetCoreParameters(oBackupItem)
|
||||||
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)
|
|
||||||
|
|
||||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||||
End Sub
|
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 oDatabase As New mgrSQLite(iSelectDB)
|
||||||
Dim sSQL As String
|
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 = "UPDATE manifest SET MonitorID = @MonitorID, FileName = @FileName, DateUpdated = @DateUpdated, "
|
||||||
sSQL &= "DateUpdated = @DateUpdated, UpdatedBy = @UpdatedBy, CheckSum = @CheckSum WHERE Name = @QueryName"
|
sSQL &= "UpdatedBy = @UpdatedBy, CheckSum = @CheckSum WHERE MonitorID = @QueryID"
|
||||||
|
|
||||||
hshParams.Add("Name", oBackupItem.Name)
|
hshParams = SetCoreParameters(oBackupItem)
|
||||||
hshParams.Add("FileName", oBackupItem.FileName)
|
hshParams.Add("QueryID", oBackupItem.MonitorID)
|
||||||
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)
|
|
||||||
|
|
||||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||||
End Sub
|
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 oDatabase As New mgrSQLite(iSelectDB)
|
||||||
Dim sSQL As String
|
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 = "UPDATE manifest SET MonitorID = @MonitorID, FileName = @FileName, DateUpdated = @DateUpdated, "
|
||||||
sSQL &= "DateUpdated = @DateUpdated, UpdatedBy = @UpdatedBy, CheckSum = @CheckSum WHERE Name = @QueryName"
|
sSQL &= "UpdatedBy = @UpdatedBy, CheckSum = @CheckSum WHERE ManifestID = @QueryID"
|
||||||
|
|
||||||
hshParams.Add("Name", oBackupItem.Name)
|
hshParams = SetCoreParameters(oBackupItem)
|
||||||
hshParams.Add("FileName", oBackupItem.FileName)
|
hshParams.Add("QueryID", oBackupItem.ManifestID)
|
||||||
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)
|
|
||||||
|
|
||||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||||
|
|
||||||
End Sub
|
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 oDatabase As New mgrSQLite(iSelectDB)
|
||||||
Dim sSQL As String
|
Dim sSQL As String
|
||||||
Dim hshParams As New Hashtable
|
Dim hshParams As New Hashtable
|
||||||
|
|
||||||
sSQL = "DELETE FROM manifest "
|
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)
|
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
+827
-364
File diff suppressed because it is too large
Load Diff
+328
-119
@@ -1,22 +1,22 @@
|
|||||||
Imports System.IO
|
Imports GBM.My.Resources
|
||||||
|
Imports System.IO
|
||||||
Imports System.Text.RegularExpressions
|
Imports System.Text.RegularExpressions
|
||||||
Imports System.Reflection
|
Imports System.Reflection
|
||||||
|
|
||||||
Public Class mgrPath
|
Public Class mgrPath
|
||||||
'Important Note: Any changes to sSettingsRoot & sDBLocation need to be mirrored in frmMain.vb -> VerifyGameDataPath
|
'Important Note: Any changes to sSettingsRoot & sDBLocation need to be mirrored in frmMain.vb -> VerifyGameDataPath
|
||||||
Private Shared sSettingsRoot As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & "\gbm"
|
Private Shared sSettingsRoot As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) & Path.DirectorySeparatorChar & "gbm"
|
||||||
Private Shared sDBLocation As String = sSettingsRoot & "\gbm.s3db"
|
Private Shared sDBLocation As String = sSettingsRoot & Path.DirectorySeparatorChar & "gbm.s3db"
|
||||||
Private Shared sIncludeFile As String = sSettingsRoot & "\gbm_include.txt"
|
Private Shared sIncludeFile As String = sSettingsRoot & Path.DirectorySeparatorChar & "gbm_include.txt"
|
||||||
Private Shared sExcludeFile As String = sSettingsRoot & "\gbm_exclude.txt"
|
Private Shared sExcludeFile As String = sSettingsRoot & Path.DirectorySeparatorChar & "gbm_exclude.txt"
|
||||||
Private Shared sOfficialImportURL As String = "http://backupmonitor.sourceforge.net/GBM_Official.xml"
|
Private Shared sLogFile As String = sSettingsRoot & Path.DirectorySeparatorChar & "gbm_log_" & Date.Now.ToString("dd-MM-yyyy-HH-mm-ss") & ".txt"
|
||||||
Private Shared sOfficialManualURL As String = "http://backupmonitor.sourceforge.net/manual.php"
|
|
||||||
Private Shared sOfficialUpdatesURL As String = "http://backupmonitor.sourceforge.net/"
|
|
||||||
Private Shared sRemoteDatabaseLocation As String
|
Private Shared sRemoteDatabaseLocation As String
|
||||||
Private Shared hshCustomVariables As Hashtable
|
Private Shared hshCustomVariables As Hashtable
|
||||||
Private Shared oReleaseType As ProcessorArchitecture = AssemblyName.GetAssemblyName(Application.ExecutablePath()).ProcessorArchitecture
|
Private Shared oReleaseType As ProcessorArchitecture = AssemblyName.GetAssemblyName(Application.ExecutablePath()).ProcessorArchitecture
|
||||||
|
|
||||||
Shared Sub New()
|
Shared Sub New()
|
||||||
hshCustomVariables = mgrVariables.ReadVariables
|
SetEnv()
|
||||||
|
LoadCustomVariables()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Shared ReadOnly Property ReleaseType As Integer
|
Shared ReadOnly Property ReleaseType As Integer
|
||||||
@@ -38,8 +38,12 @@ Public Class mgrPath
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Shared ReadOnly Property Utility7zLocation As String
|
Shared ReadOnly Property Default7zLocation As String
|
||||||
Get
|
Get
|
||||||
|
If mgrCommon.IsUnix Then
|
||||||
|
Return "/usr/bin/7za"
|
||||||
|
End If
|
||||||
|
|
||||||
Select Case oReleaseType
|
Select Case oReleaseType
|
||||||
Case ProcessorArchitecture.Amd64
|
Case ProcessorArchitecture.Amd64
|
||||||
Return Application.StartupPath & "\Utilities\x64\7za.exe"
|
Return Application.StartupPath & "\Utilities\x64\7za.exe"
|
||||||
@@ -75,21 +79,9 @@ Public Class mgrPath
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Shared ReadOnly Property OfficialManualURL As String
|
Shared ReadOnly Property LogFileLocation As String
|
||||||
Get
|
Get
|
||||||
Return sOfficialManualURL
|
Return sLogFile
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Shared ReadOnly Property OfficialUpdatesURL As String
|
|
||||||
Get
|
|
||||||
Return sOfficialUpdatesURL
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Shared ReadOnly Property OfficialImportURL As String
|
|
||||||
Get
|
|
||||||
Return sOfficialImportURL
|
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
@@ -104,14 +96,22 @@ Public Class mgrPath
|
|||||||
Return sRemoteDatabaseLocation
|
Return sRemoteDatabaseLocation
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
sRemoteDatabaseLocation = value & "\gbm.s3db"
|
sRemoteDatabaseLocation = value & Path.DirectorySeparatorChar & "gbm.s3db"
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public Shared Function ValidatePathForOS(ByVal sCheckString As String) As String
|
||||||
|
Dim cInvalidCharacters As Char() = Path.GetInvalidPathChars
|
||||||
|
|
||||||
|
For Each c As Char In cInvalidCharacters
|
||||||
|
sCheckString = sCheckString.Replace(c, "")
|
||||||
|
Next
|
||||||
|
|
||||||
Public Shared Function ValidateForFileSystem(ByVal sCheckString As String) As String
|
Return sCheckString.Trim
|
||||||
Dim cInvalidCharacters As Char() = {"\", "/", ":", "*", "?", """", "<", ">", "|"}
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function ValidateFileNameForOS(ByVal sCheckString As String) As String
|
||||||
|
Dim cInvalidCharacters As Char() = Path.GetInvalidFileNameChars
|
||||||
|
|
||||||
For Each c As Char In cInvalidCharacters
|
For Each c As Char In cInvalidCharacters
|
||||||
sCheckString = sCheckString.Replace(c, "")
|
sCheckString = sCheckString.Replace(c, "")
|
||||||
@@ -121,8 +121,9 @@ Public Class mgrPath
|
|||||||
sCheckString = sCheckString.Substring(0, 257)
|
sCheckString = sCheckString.Substring(0, 257)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return sCheckString
|
Return sCheckString.Trim
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function DetermineRelativePath(ByVal sProcessPath As String, ByVal sSavePath As String) As String
|
Public Shared Function DetermineRelativePath(ByVal sProcessPath As String, ByVal sSavePath As String) As String
|
||||||
Dim sPath1Array As String()
|
Dim sPath1Array As String()
|
||||||
Dim sPath2Array As String()
|
Dim sPath2Array As String()
|
||||||
@@ -133,19 +134,27 @@ Public Class mgrPath
|
|||||||
Dim iRemove As Integer = 0
|
Dim iRemove As Integer = 0
|
||||||
Dim iBackFolders As Integer = 0
|
Dim iBackFolders As Integer = 0
|
||||||
Dim bDeep As Boolean
|
Dim bDeep As Boolean
|
||||||
|
Dim cDS As Char = Path.DirectorySeparatorChar 'Set the directory seperator based on the OS
|
||||||
|
|
||||||
'We are working with a case insenstive file system, ensure a uniform case
|
If Not mgrCommon.IsUnix Then
|
||||||
|
'If we are working with a case insenstive file system, use a uniform case to reduce possible issues
|
||||||
sProcessPath = sProcessPath.ToLower
|
sProcessPath = sProcessPath.ToLower
|
||||||
sSavePath = sSavePath.ToLower
|
sSavePath = sSavePath.ToLower
|
||||||
|
Else
|
||||||
|
'If we are on Unix trim the root off
|
||||||
|
sProcessPath = sProcessPath.TrimStart(cDS)
|
||||||
|
sSavePath = sSavePath.TrimStart(cDS)
|
||||||
|
End If
|
||||||
|
|
||||||
'We need to ensure we have a single trailing slash on the parameters
|
'We need to ensure we have a single trailing slash on the parameters
|
||||||
sProcessPath = sProcessPath.TrimEnd("\")
|
sProcessPath = sProcessPath.TrimEnd(cDS)
|
||||||
sSavePath = sSavePath.TrimEnd("\")
|
sSavePath = sSavePath.TrimEnd(cDS)
|
||||||
sProcessPath &= "\"
|
sProcessPath &= cDS
|
||||||
sSavePath &= "\"
|
sSavePath &= cDS
|
||||||
|
|
||||||
|
|
||||||
'Determines the direction we need to go, we always want to be relative to the process location
|
'Determines the direction we need to go, we always want to be relative to the process location
|
||||||
If sSavePath.Split("\").Length > sProcessPath.Split("\").Length Then
|
If sSavePath.Split(cDS).Length > sProcessPath.Split(cDS).Length Then
|
||||||
sPath1 = sProcessPath
|
sPath1 = sProcessPath
|
||||||
sPath2 = sSavePath
|
sPath2 = sSavePath
|
||||||
bDeep = True
|
bDeep = True
|
||||||
@@ -156,8 +165,8 @@ Public Class mgrPath
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'Build an array of folders to work with from each path
|
'Build an array of folders to work with from each path
|
||||||
sPath1Array = sPath1.Split("\")
|
sPath1Array = sPath1.Split(cDS)
|
||||||
sPath2Array = sPath2.Split("\")
|
sPath2Array = sPath2.Split(cDS)
|
||||||
|
|
||||||
'Take the shortest path and remove the common folders from both
|
'Take the shortest path and remove the common folders from both
|
||||||
For Each s As String In sPath1Array
|
For Each s As String In sPath1Array
|
||||||
@@ -169,102 +178,298 @@ Public Class mgrPath
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
'Remove the trailing slashes
|
'Remove the trailing slashes
|
||||||
sPath1 = sPath1.TrimEnd("\")
|
sPath1 = sPath1.TrimEnd(cDS)
|
||||||
sPath2 = sPath2.TrimEnd("\")
|
sPath2 = sPath2.TrimEnd(cDS)
|
||||||
|
|
||||||
'Determine which way we go
|
'Determine which way we go
|
||||||
If bDeep Then
|
If bDeep Then
|
||||||
If sPath1.Length > 0 Then
|
If sPath1.Length > 0 Then
|
||||||
iBackFolders = sPath1.Split("\").Length
|
iBackFolders = sPath1.Split(cDS).Length
|
||||||
End If
|
End If
|
||||||
sResult = sPath2
|
sResult = sPath2
|
||||||
Else
|
Else
|
||||||
If sPath2.Length > 0 Then
|
If sPath2.Length > 0 Then
|
||||||
iBackFolders = sPath2.Split("\").Length
|
iBackFolders = sPath2.Split(cDS).Length
|
||||||
End If
|
End If
|
||||||
sResult = sPath1
|
sResult = sPath1
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Insert direction modifiers based on how many folders are left
|
'Insert direction modifiers based on how many folders are left
|
||||||
For i = 1 To iBackFolders
|
For i = 1 To iBackFolders
|
||||||
sResult = "..\" & sResult
|
sResult = ".." & cDS & sResult
|
||||||
Next i
|
Next i
|
||||||
|
|
||||||
'Done
|
'Done
|
||||||
Return sResult
|
Return sResult
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function ReplaceSpecialPaths(sValue As String) As String
|
Private Shared Function BuildWinePath(ByVal sPath As String, ByVal sWinePrefix As String) As String
|
||||||
Dim sMyDocs As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
|
Dim sRealPath As String
|
||||||
Dim sPublicDocs As String = Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments)
|
Dim cDriveLetter As Char
|
||||||
Dim sAppDataRoaming As String = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
|
Dim sWineDrive As String
|
||||||
Dim sAppDataLocal As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
|
|
||||||
Dim sCurrentUser As String = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)
|
Try
|
||||||
|
'Grab Path
|
||||||
|
sRealPath = sPath.Split("=")(1)
|
||||||
|
|
||||||
|
'Remove Quotes
|
||||||
|
sRealPath = sRealPath.TrimStart("""")
|
||||||
|
sRealPath = sRealPath.TrimEnd("""")
|
||||||
|
|
||||||
|
'Flip Seperators
|
||||||
|
sRealPath = sRealPath.Replace("\\", "/")
|
||||||
|
|
||||||
|
'Change Wine Drive
|
||||||
|
cDriveLetter = sRealPath.Chars(sRealPath.IndexOf(":") - 1)
|
||||||
|
sWineDrive = "drive_" & cDriveLetter
|
||||||
|
sRealPath = sRealPath.Replace(cDriveLetter & ":", sWineDrive.ToLower)
|
||||||
|
|
||||||
|
Return sWinePrefix & Path.DirectorySeparatorChar & sRealPath
|
||||||
|
Catch ex As Exception
|
||||||
|
mgrCommon.ShowMessage(mgrPath_ErrorBuildingWinePath, ex.Message, MsgBoxStyle.Exclamation)
|
||||||
|
Return String.Empty
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function GetWineSavePath(ByVal sPrefix As String, ByVal sPath As String) As String
|
||||||
|
Dim sRegistry As String
|
||||||
|
Dim sWinePath As String
|
||||||
|
Dim sReplace As String
|
||||||
|
Dim oParse As Regex
|
||||||
|
Dim oMatch As Match
|
||||||
|
|
||||||
|
Try
|
||||||
|
If sPath.Contains("%APPDATA%") Then
|
||||||
|
sReplace = "%APPDATA%"
|
||||||
|
sRegistry = File.ReadAllText(sPrefix & Path.DirectorySeparatorChar & "user.reg")
|
||||||
|
oParse = New Regex("""AppData""="".+?(?=\n)")
|
||||||
|
ElseIf sPath.Contains("%LOCALAPPDATA%Low") Then
|
||||||
|
sReplace = "%LOCALAPPDATA%Low"
|
||||||
|
sRegistry = File.ReadAllText(sPrefix & Path.DirectorySeparatorChar & "user.reg")
|
||||||
|
oParse = New Regex("""{A520A1A4-1780-4FF6-BD18-167343C5AF16}""="".+?(?=\n)")
|
||||||
|
ElseIf sPath.Contains("%LOCALAPPDATA%") Then
|
||||||
|
sReplace = "%LOCALAPPDATA%"
|
||||||
|
sRegistry = File.ReadAllText(sPrefix & Path.DirectorySeparatorChar & "user.reg")
|
||||||
|
oParse = New Regex("""Local AppData""="".+?(?=\n)")
|
||||||
|
ElseIf sPath.Contains("%USERDOCUMENTS%") Then
|
||||||
|
sReplace = "%USERDOCUMENTS%"
|
||||||
|
sRegistry = File.ReadAllText(sPrefix & Path.DirectorySeparatorChar & "user.reg")
|
||||||
|
oParse = New Regex("""Personal""="".+?(?=\n)")
|
||||||
|
ElseIf sPath.Contains("%COMMONDOCUMENTS%") Then
|
||||||
|
sReplace = "%COMMONDOCUMENTS%"
|
||||||
|
sRegistry = File.ReadAllText(sPrefix & Path.DirectorySeparatorChar & "system.reg")
|
||||||
|
oParse = New Regex("""Common Documents""="".+?(?=\n)")
|
||||||
|
ElseIf sPath.Contains("%USERPROFILE%") Then
|
||||||
|
sReplace = "%USERPROFILE%"
|
||||||
|
sRegistry = File.ReadAllText(sPrefix & Path.DirectorySeparatorChar & "user.reg")
|
||||||
|
oParse = New Regex("""Desktop""="".+?(?=\\\\Desktop)")
|
||||||
|
Else
|
||||||
|
Return sPath
|
||||||
|
End If
|
||||||
|
|
||||||
|
If oParse.IsMatch(sRegistry) Then
|
||||||
|
oMatch = oParse.Match(sRegistry)
|
||||||
|
sWinePath = BuildWinePath(oMatch.Value, sPrefix)
|
||||||
|
sPath = sPath.Replace("\", Path.DirectorySeparatorChar)
|
||||||
|
Return sPath.Replace(sReplace, sWinePath)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return sPath
|
||||||
|
Catch ex As Exception
|
||||||
|
mgrCommon.ShowMessage(mgrPath_ErrorConvertWineSavePath, ex.Message, MsgBoxStyle.Exclamation)
|
||||||
|
Return sPath
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function GetWinePrefix(ByVal prs As Process) As String
|
||||||
|
Dim prps As Process
|
||||||
|
Dim sPsinfo As String
|
||||||
|
Dim oParse As New Regex("WINEPREFIX=.+?(?= )")
|
||||||
|
Dim oMatch As Match
|
||||||
|
|
||||||
|
Try
|
||||||
|
prps = New Process
|
||||||
|
prps.StartInfo.FileName = "/bin/ps"
|
||||||
|
prps.StartInfo.Arguments = "e " & prs.Id.ToString
|
||||||
|
prps.StartInfo.UseShellExecute = False
|
||||||
|
prps.StartInfo.RedirectStandardOutput = True
|
||||||
|
prps.StartInfo.CreateNoWindow = True
|
||||||
|
prps.Start()
|
||||||
|
sPsinfo = prps.StandardOutput.ReadToEnd()
|
||||||
|
If oParse.IsMatch(sPsinfo) Then
|
||||||
|
oMatch = oParse.Match(sPsinfo)
|
||||||
|
Return oMatch.Value.Trim("/").Split("=")(1)
|
||||||
|
Else
|
||||||
|
Return String.Empty
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
mgrCommon.ShowMessage(mgrPath_ErrorWinePrefix, ex.Message, MsgBoxStyle.Exclamation)
|
||||||
|
Return String.Empty
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function CheckSpecialPaths() As Boolean
|
||||||
|
Dim hshEnvs As New Hashtable
|
||||||
|
Dim bNoError As Boolean = True
|
||||||
|
|
||||||
|
hshEnvs.Add("Documents", Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments))
|
||||||
|
hshEnvs.Add("AppDataRoaming", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData))
|
||||||
|
hshEnvs.Add("AppDataLocal", Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData))
|
||||||
|
If Not mgrCommon.IsUnix Then
|
||||||
|
hshEnvs.Add("UserData", Environment.GetFolderPath(Environment.SpecialFolder.UserProfile))
|
||||||
|
hshEnvs.Add("PublicDocuments", Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments))
|
||||||
|
End If
|
||||||
|
|
||||||
|
For Each de As DictionaryEntry In hshEnvs
|
||||||
|
If de.Value = String.Empty Then
|
||||||
|
mgrCommon.ShowMessage(mgrPath_SpecialPathError, de.Key, MsgBoxStyle.Critical)
|
||||||
|
bNoError = False
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return bNoError
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Shared Sub SetEnv()
|
||||||
|
If Not mgrCommon.IsUnix Then
|
||||||
|
Environment.SetEnvironmentVariable("USERDOCUMENTS", Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments))
|
||||||
|
Environment.SetEnvironmentVariable("COMMONDOCUMENTS", Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments))
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Shared Function ReplaceSpecialPaths(ByVal sValue As String) As String
|
||||||
|
Dim sXdgData As String = "${XDG_DATA_HOME:-~/.local/share}"
|
||||||
|
Dim sEnvAppDataLocal As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
|
||||||
|
Dim sXdgConfig As String = "${XDG_CONFIG_HOME:-~/.config}"
|
||||||
|
Dim sEnvAppDataRoaming As String = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
|
||||||
|
Dim sHomeDir As String = "${HOME}"
|
||||||
|
Dim sEnvCurrentUser As String = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)
|
||||||
Dim oCustomVariable As clsPathVariable
|
Dim oCustomVariable As clsPathVariable
|
||||||
|
|
||||||
If sValue.Contains("*mydocs*") Then
|
|
||||||
Return sValue.Replace("*mydocs*", sMyDocs)
|
|
||||||
End If
|
|
||||||
|
|
||||||
If sValue.Contains("*publicdocs*") Then
|
|
||||||
Return sValue.Replace("*publicdocs*", sPublicDocs)
|
|
||||||
End If
|
|
||||||
|
|
||||||
If sValue.Contains("*appdatalocal*") Then
|
|
||||||
Return sValue.Replace("*appdatalocal*", sAppDataLocal)
|
|
||||||
End If
|
|
||||||
|
|
||||||
If sValue.Contains("*appdataroaming*") Then
|
|
||||||
Return sValue.Replace("*appdataroaming*", sAppDataRoaming)
|
|
||||||
End If
|
|
||||||
|
|
||||||
If sValue.Contains("*currentuser*") Then
|
|
||||||
Return sValue.Replace("*currentuser*", sCurrentUser)
|
|
||||||
End If
|
|
||||||
|
|
||||||
For Each oCustomVariable In hshCustomVariables.Values
|
For Each oCustomVariable In hshCustomVariables.Values
|
||||||
If sValue.Contains(oCustomVariable.FormattedName) Then
|
If sValue.Contains(oCustomVariable.FormattedName) Then
|
||||||
Return sValue.Replace(oCustomVariable.FormattedName, oCustomVariable.Path)
|
Return sValue.Replace(oCustomVariable.FormattedName, oCustomVariable.Path)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
'$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
|
Return sValue
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function ReverseSpecialPaths(sValue As String) As String
|
Public Shared Function ReverseSpecialPaths(sValue As String) As String
|
||||||
Dim sMyDocs As String = "*mydocs*"
|
Dim sMyDocs As String = "%USERDOCUMENTS%"
|
||||||
Dim sPublicDocs As String = "*publicdocs*"
|
Dim sEnvMyDocs As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
|
||||||
Dim sAppDataRoaming As String = "*appdatalocal*"
|
Dim sPublicDocs As String = "%COMMONDOCUMENTS%"
|
||||||
Dim sAppDataLocal As String = "*appdataroaming*"
|
Dim sEnvPublicDocs As String = Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments)
|
||||||
Dim sCurrentUser As String = "*currentuser*"
|
Dim sAppDataLocal As String = "%LOCALAPPDATA%"
|
||||||
|
Dim sXdgData As String = "${XDG_DATA_HOME:-~/.local/share}"
|
||||||
|
Dim sEnvAppDataLocal As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
|
||||||
|
Dim sAppDataRoaming As String = "%APPDATA%"
|
||||||
|
Dim sXdgConfig As String = "${XDG_CONFIG_HOME:-~/.config}"
|
||||||
|
Dim sEnvAppDataRoaming As String = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
|
||||||
|
Dim sCurrentUser As String = "%USERPROFILE%"
|
||||||
|
Dim sHomeDir As String = "~"
|
||||||
|
Dim sEnvCurrentUser As String = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)
|
||||||
Dim oCustomVariable As clsPathVariable
|
Dim oCustomVariable As clsPathVariable
|
||||||
|
|
||||||
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)) Then
|
|
||||||
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), sMyDocs)
|
|
||||||
End If
|
|
||||||
|
|
||||||
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments)) Then
|
|
||||||
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.CommonDocuments), sPublicDocs)
|
|
||||||
End If
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
If sValue.Contains(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)) Then
|
|
||||||
Return sValue.Replace(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), sCurrentUser)
|
|
||||||
End If
|
|
||||||
|
|
||||||
For Each oCustomVariable In hshCustomVariables.Values
|
For Each oCustomVariable In hshCustomVariables.Values
|
||||||
If sValue.Contains(oCustomVariable.Path) Then
|
If sValue.Contains(oCustomVariable.Path) Then
|
||||||
Return sValue.Replace(oCustomVariable.Path, oCustomVariable.FormattedName)
|
Return sValue.Replace(oCustomVariable.Path, oCustomVariable.FormattedName)
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
If Not mgrCommon.IsUnix Then
|
||||||
|
If sValue.Contains(sEnvAppDataRoaming) Then
|
||||||
|
Return sValue.Replace(sEnvAppDataRoaming, sAppDataRoaming)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If sValue.Contains(sEnvAppDataLocal) Then
|
||||||
|
Return sValue.Replace(sEnvAppDataLocal, sAppDataLocal)
|
||||||
|
End If
|
||||||
|
|
||||||
|
'This needs to be tested last for Unix compatability
|
||||||
|
If sValue.Contains(sEnvMyDocs) Then
|
||||||
|
Return sValue.Replace(sEnvMyDocs, sMyDocs)
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Mono doesn't set a path for these folders
|
||||||
|
If sValue.Contains(sEnvPublicDocs) Then
|
||||||
|
Return sValue.Replace(sEnvPublicDocs, sPublicDocs)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If sValue.Contains(sEnvCurrentUser) Then
|
||||||
|
Return sValue.Replace(sEnvCurrentUser, sCurrentUser)
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
'Use different paths on Linux
|
||||||
|
If sValue.Contains(sEnvAppDataRoaming) Then
|
||||||
|
Return sValue.Replace(sEnvAppDataRoaming, sXdgConfig)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If sValue.Contains(sEnvAppDataLocal) Then
|
||||||
|
Return sValue.Replace(sEnvAppDataLocal, sXdgData)
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Must be last
|
||||||
|
If sValue.Contains(sEnvCurrentUser) Then
|
||||||
|
If sEnvCurrentUser = String.Empty Then
|
||||||
|
'Fall back
|
||||||
|
sEnvCurrentUser = Environment.GetFolderPath(Environment.SpecialFolder.Personal)
|
||||||
|
End If
|
||||||
|
If sEnvCurrentUser = String.Empty Then
|
||||||
|
'Fall back
|
||||||
|
sEnvCurrentUser = sMyDocs
|
||||||
|
End If
|
||||||
|
Return sValue.Replace(sEnvCurrentUser, sHomeDir)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
Return sValue
|
Return sValue
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -273,11 +478,16 @@ Public Class mgrPath
|
|||||||
Dim hshCustomVariables As Hashtable = mgrVariables.ReadVariables
|
Dim hshCustomVariables As Hashtable = mgrVariables.ReadVariables
|
||||||
Dim oCustomVariable As clsPathVariable
|
Dim oCustomVariable As clsPathVariable
|
||||||
|
|
||||||
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.ApplicationData))
|
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.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.CommonDocuments))
|
||||||
hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.UserProfile))
|
hshFolders.Add(Guid.NewGuid.ToString, Environment.GetFolderPath(Environment.SpecialFolder.UserProfile))
|
||||||
|
End If
|
||||||
|
|
||||||
'Load Custom Variables
|
'Load Custom Variables
|
||||||
For Each oCustomVariable In hshCustomVariables.Values
|
For Each oCustomVariable In hshCustomVariables.Values
|
||||||
@@ -295,8 +505,10 @@ Public Class mgrPath
|
|||||||
|
|
||||||
Public Shared Function VerifyCustomVariables(ByVal hshScanlist As Hashtable, ByRef sGames As String) As Boolean
|
Public Shared Function VerifyCustomVariables(ByVal hshScanlist As Hashtable, ByRef sGames As String) As Boolean
|
||||||
Dim hshCustomVariables As Hashtable = mgrVariables.ReadVariables
|
Dim hshCustomVariables As Hashtable = mgrVariables.ReadVariables
|
||||||
|
'Reserved variables will be resolved on Windows, but not on a Linux. Therefore we an ignore list here, otherwise GBM will bitch about them when using Windows configurations for Wine.
|
||||||
|
Dim oReservedVariables As List(Of String) = mgrVariables.GetReservedVariables
|
||||||
Dim sVariableCheck As String
|
Dim sVariableCheck As String
|
||||||
Dim sPattern As String = "\*(.*)\*"
|
Dim sPattern As String = "\%(.*)\%"
|
||||||
Dim oGame As clsGame
|
Dim oGame As clsGame
|
||||||
Dim oMatch As Match
|
Dim oMatch As Match
|
||||||
Dim bClean As Boolean = True
|
Dim bClean As Boolean = True
|
||||||
@@ -304,8 +516,8 @@ Public Class mgrPath
|
|||||||
For Each oGame In hshScanlist.Values
|
For Each oGame In hshScanlist.Values
|
||||||
oMatch = Regex.Match(oGame.Path, sPattern)
|
oMatch = Regex.Match(oGame.Path, sPattern)
|
||||||
If oMatch.Success Then
|
If oMatch.Success Then
|
||||||
sVariableCheck = oMatch.Value.Replace("*", String.Empty)
|
sVariableCheck = oMatch.Value.Replace("%", String.Empty)
|
||||||
If Not hshCustomVariables.ContainsKey(sVariableCheck) Then
|
If Not hshCustomVariables.ContainsKey(sVariableCheck) And Not oReservedVariables.Contains(sVariableCheck) Then
|
||||||
sGames &= vbCrLf & oGame.Name & " (" & sVariableCheck & ")"
|
sGames &= vbCrLf & oGame.Name & " (" & sVariableCheck & ")"
|
||||||
bClean = False
|
bClean = False
|
||||||
End If
|
End If
|
||||||
@@ -315,15 +527,19 @@ Public Class mgrPath
|
|||||||
Return bClean
|
Return bClean
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Sub CustomVariablesReload()
|
Public Shared Sub LoadCustomVariables()
|
||||||
hshCustomVariables = mgrVariables.ReadVariables
|
hshCustomVariables = mgrVariables.ReadVariables
|
||||||
|
|
||||||
|
For Each oVariable As clsPathVariable In hshCustomVariables.Values
|
||||||
|
Environment.SetEnvironmentVariable(oVariable.Name, oVariable.Path)
|
||||||
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Shared Function SetManualgamePath() As String
|
Public Shared Function SetManualGamePath() As String
|
||||||
Dim sDefaultFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
|
Dim sDefaultFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
|
||||||
Dim sNewPath As String
|
Dim sNewPath As String
|
||||||
|
|
||||||
sNewPath = mgrCommon.OpenFolderBrowser("Choose the game folder containing the executable.", sDefaultFolder, False)
|
sNewPath = mgrCommon.OpenFolderBrowser("Manual_Game_Location", mgrPath_ChoosePath, sDefaultFolder, False)
|
||||||
|
|
||||||
Return sNewPath
|
Return sNewPath
|
||||||
End Function
|
End Function
|
||||||
@@ -334,48 +550,43 @@ Public Class mgrPath
|
|||||||
Dim sFolder As String = String.Empty
|
Dim sFolder As String = String.Empty
|
||||||
Dim bSearchFailed As Boolean = False
|
Dim bSearchFailed As Boolean = False
|
||||||
|
|
||||||
|
frmFind.GameName = sGameName
|
||||||
frmFind.SearchItem = sProcess & ".*"
|
frmFind.SearchItem = sProcess & ".*"
|
||||||
frmFind.FolderSearch = False
|
frmFind.FolderSearch = False
|
||||||
|
|
||||||
'We can't automatically search for certain game types
|
'We can't automatically search for certain game types
|
||||||
If bNoAuto Then
|
If bNoAuto Then
|
||||||
sMessage = sSearchReason & vbCrLf & vbCrLf & "Do you wish to manually set the game path? (Path will be saved)"
|
sMessage = mgrCommon.FormatString(mgrPath_ConfirmManualPath, sSearchReason)
|
||||||
|
|
||||||
If MsgBox(sMessage, MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
If mgrCommon.ShowMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
sFolder = SetManualgamePath()
|
sFolder = SetManualgamePath()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return sFolder
|
Return sFolder
|
||||||
End If
|
End If
|
||||||
|
|
||||||
sMessage = sSearchReason & vbCrLf & vbCrLf & "Do you wish to automatically search for the game path? (Path will be saved)"
|
sMessage = mgrCommon.FormatString(mgrPath_ConfirmAutoPath, sSearchReason)
|
||||||
|
|
||||||
If MsgBox(sMessage, MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
If mgrCommon.ShowMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
frmFind.ShowDialog()
|
frmFind.ShowDialog()
|
||||||
|
|
||||||
If frmFind.FoundItem <> String.Empty Then
|
If frmFind.FoundItem <> String.Empty Then
|
||||||
sFolder = IO.Path.GetDirectoryName(frmFind.FoundItem)
|
Return frmFind.FoundItem
|
||||||
sMessage = sGameName & " was located in the following folder:" & vbCrLf & vbCrLf & _
|
|
||||||
sFolder & vbCrLf & vbCrLf & "Is this correct?"
|
|
||||||
If MsgBox(sMessage, MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
|
||||||
Return sFolder
|
|
||||||
Else
|
|
||||||
sFolder = String.Empty
|
|
||||||
End If
|
|
||||||
Else
|
Else
|
||||||
bSearchFailed = True
|
bSearchFailed = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If bSearchFailed Then
|
If bSearchFailed Then
|
||||||
sMessage = "The search failed to locate the path for " & sGameName & "." & vbCrLf & vbCrLf & _
|
sMessage = mgrCommon.FormatString(mgrPath_ConfirmAutoFailure, sGameName)
|
||||||
"Do you wish to manually set the game path? (Path will be saved)"
|
|
||||||
Else
|
Else
|
||||||
sMessage = "Do you wish to manually set the game path? (Path will be saved)"
|
sMessage = mgPath_ConfirmManualPathNoParam
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If MsgBox(sMessage, MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
If mgrCommon.ShowMessage(sMessage, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
sFolder = SetManualgamePath()
|
sFolder = SetManualgamePath()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
frmFind.Dispose()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return sFolder
|
Return sFolder
|
||||||
@@ -385,9 +596,7 @@ Public Class mgrPath
|
|||||||
Dim dBrowser As FolderBrowserDialog
|
Dim dBrowser As FolderBrowserDialog
|
||||||
|
|
||||||
If Not Directory.Exists(sBackupPath) Then
|
If Not Directory.Exists(sBackupPath) Then
|
||||||
If MsgBox("The backup location " & sBackupPath & " is not available." & vbCrLf & _
|
If mgrCommon.ShowMessage(mgrPath_ConfirmBackupLocation, sBackupPath, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||||
"It may be on an external or network drive that isn't connected." & vbCrLf & vbCrLf & _
|
|
||||||
"Do you want to select another backup location and continue?", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
|
||||||
dBrowser = New FolderBrowserDialog
|
dBrowser = New FolderBrowserDialog
|
||||||
dBrowser.SelectedPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
|
dBrowser.SelectedPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
|
||||||
If dBrowser.ShowDialog = DialogResult.OK Then
|
If dBrowser.ShowDialog = DialogResult.OK Then
|
||||||
|
|||||||
@@ -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,340 @@
|
|||||||
|
Imports System.IO
|
||||||
|
Imports System.Management
|
||||||
|
Imports System.Text.RegularExpressions
|
||||||
|
|
||||||
|
Public Class mgrProcessDetection
|
||||||
|
|
||||||
|
Private prsFoundProcess As Process
|
||||||
|
Private sProcessPath As String
|
||||||
|
Private dStartTime As DateTime = Now, dEndTime As DateTime = Now
|
||||||
|
Private lTimeSpent As Long = 0
|
||||||
|
Private oGame As clsGame
|
||||||
|
Private 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 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 Regex.IsMatch(sProcessCheck, oGame.ProcessName) 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(ByVal bWineProcess As Boolean) As String
|
||||||
|
Try
|
||||||
|
If Not bWineProcess Then
|
||||||
|
Return Path.GetDirectoryName(FoundProcess.MainModule.FileName)
|
||||||
|
Else
|
||||||
|
Return GetUnixSymLinkDirectory(FoundProcess)
|
||||||
|
End If
|
||||||
|
Catch
|
||||||
|
Return String.Empty
|
||||||
|
End Try
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Sub FilterDetected(ByVal oDetectedGames As ArrayList, ByVal bWineProcess As Boolean)
|
||||||
|
Dim bMatch As Boolean = False
|
||||||
|
Dim sFullCommand As String
|
||||||
|
Dim oNotDetectedWithParameters As New ArrayList
|
||||||
|
Dim oDetectedWithParameters As New ArrayList
|
||||||
|
Dim oNotDetectedWithProcessPath As New ArrayList
|
||||||
|
Dim oDetectedWithProcessPath As New ArrayList
|
||||||
|
|
||||||
|
'Get parameters of the found process
|
||||||
|
If mgrCommon.IsUnix Then
|
||||||
|
sFullCommand = GetUnixCommand(FoundProcess)
|
||||||
|
Else
|
||||||
|
sFullCommand = GetWindowsCommand(FoundProcess)
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Get Process Path
|
||||||
|
ProcessPath = GetProcessPath(bWineProcess)
|
||||||
|
|
||||||
|
'Look for any games using parameters and any matches
|
||||||
|
For Each oDetectedGame As clsGame In oDetectedGames
|
||||||
|
If oDetectedGame.Parameter <> String.Empty Then
|
||||||
|
If sFullCommand.Contains(oDetectedGame.Parameter) Then
|
||||||
|
oDetectedWithParameters.Add(oDetectedGame)
|
||||||
|
Else
|
||||||
|
oNotDetectedWithParameters.Add(oDetectedGame)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
'If we detected at least one parameter match, replace full detected list with the detected with parameter list
|
||||||
|
If oDetectedWithParameters.Count > 0 Then
|
||||||
|
oDetectedGames = oDetectedWithParameters
|
||||||
|
Else
|
||||||
|
'If there is no parameter match, remove any games using parameters from the detected list
|
||||||
|
For Each oGameNotDetected As clsGame In oNotDetectedWithParameters
|
||||||
|
oDetectedGames.Remove(oGameNotDetected)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
'If there's only one match after parameter detection, set it as current game and we're done.
|
||||||
|
If oDetectedGames.Count = 1 Then
|
||||||
|
GameInfo = oDetectedGames(0)
|
||||||
|
Duplicate = False
|
||||||
|
Else
|
||||||
|
'Check if we have any exact matches based on process path
|
||||||
|
For Each oDetectedGame As clsGame In oDetectedGames
|
||||||
|
If oDetectedGame.ProcessPath <> String.Empty Then
|
||||||
|
If oDetectedGame.ProcessPath = ProcessPath Then
|
||||||
|
oDetectedWithProcessPath.Add(oDetectedGame)
|
||||||
|
Else
|
||||||
|
oNotDetectedWithProcessPath.Add(oDetectedGame)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
'If there's only one match after process detection, set it as current game and we're done
|
||||||
|
If oDetectedWithProcessPath.Count = 1 Then
|
||||||
|
GameInfo = oDetectedWithProcessPath(0)
|
||||||
|
Duplicate = False
|
||||||
|
Else
|
||||||
|
'Remove any games with a process path that does not match the current process
|
||||||
|
For Each oGameNotDetected As clsGame In oNotDetectedWithProcessPath
|
||||||
|
oDetectedGames.Remove(oGameNotDetected)
|
||||||
|
Next
|
||||||
|
|
||||||
|
'If only a single game remains, set it as current game and we're done
|
||||||
|
If oDetectedGames.Count = 1 Then
|
||||||
|
GameInfo = oDetectedGames(0)
|
||||||
|
Duplicate = False
|
||||||
|
Else
|
||||||
|
'We've done all we can, the user must selected which game they were playing when the process ends
|
||||||
|
Duplicate = True
|
||||||
|
oDuplicateGames = oDetectedGames
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function SearchRunningProcesses(ByVal hshScanList As Hashtable, ByRef bNeedsPath As Boolean, ByRef bWineProcess As Boolean, ByRef iErrorCode As Integer, ByVal bDebugMode As Boolean) As Boolean
|
||||||
|
Dim prsList() As Process = Process.GetProcesses
|
||||||
|
Dim 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
|
||||||
|
sProcessCheck = 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("\", "/")
|
||||||
|
sWinePath = sParameter.Split("/")
|
||||||
|
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, bWineProcess)
|
||||||
|
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,164 +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
|
|
||||||
If o.ProcessName.Contains("dosbox") Then
|
|
||||||
If o.ProcessName.Split(":").Length = 3 Then
|
|
||||||
sProcess = o.ProcessName.Remove(o.ProcessName.LastIndexOf(":"))
|
|
||||||
Else
|
|
||||||
sProcess = o.ProcessName
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
sProcess = o.ProcessName.Split(":")(0)
|
|
||||||
End If
|
|
||||||
|
|
||||||
If o.Duplicate = True And sProcess = oGame.TrueProcess Then
|
|
||||||
oDuplicateGames.Add(o.ShallowCopy)
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Public Function SearchRunningProcesses(ByVal hshScanList As Hashtable, ByRef bNeedsPath As Boolean, ByRef iErrorCode As Integer) As Boolean
|
|
||||||
Dim prsList() As Process = Process.GetProcesses
|
|
||||||
Dim sDBoxProcess As String()
|
|
||||||
Dim sProcessCheck As String = String.Empty
|
|
||||||
|
|
||||||
For Each prsCurrent As Process In prsList
|
|
||||||
'Handle DOSBox Processes
|
|
||||||
If prsCurrent.ProcessName.ToLower = "dosbox" Then
|
|
||||||
sDBoxProcess = prsCurrent.MainWindowTitle.Split(":")
|
|
||||||
'If the dosbox process title doesn't have 3 elements it's not ready yet.
|
|
||||||
If sDBoxProcess.Length = 3 Then
|
|
||||||
sProcessCheck = "dosbox:" & sDBoxProcess(2).Trim
|
|
||||||
Else
|
|
||||||
'Drop out for now
|
|
||||||
Return False
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
sProcessCheck = prsCurrent.ProcessName
|
|
||||||
End If
|
|
||||||
|
|
||||||
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
|
|
||||||
oGame.ProcessPath = Path.GetDirectoryName(prsCurrent.MainModule.FileName)
|
|
||||||
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
|
|
||||||
'A different failure occured, drop out and continue to scan.
|
|
||||||
Return False
|
|
||||||
End If
|
|
||||||
Catch exAll As Exception
|
|
||||||
'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
|
|
||||||
|
|
||||||
Return False
|
|
||||||
End Function
|
|
||||||
|
|
||||||
End Class
|
|
||||||
+91
-96
@@ -1,4 +1,5 @@
|
|||||||
Imports System.IO
|
Imports GBM.My.Resources
|
||||||
|
Imports System.IO
|
||||||
|
|
||||||
Public Class mgrRestore
|
Public Class mgrRestore
|
||||||
|
|
||||||
@@ -27,21 +28,27 @@ Public Class mgrRestore
|
|||||||
Public Event UpdateRestoreInfo(oRestoreInfo As clsBackup)
|
Public Event UpdateRestoreInfo(oRestoreInfo As clsBackup)
|
||||||
Public Event SetLastAction(sMessage As String)
|
Public Event SetLastAction(sMessage As String)
|
||||||
|
|
||||||
Public Shared Function CheckPath(ByRef oRestoreInfo As clsBackup, ByVal oGame As clsGame) As Boolean
|
Public Shared Function CheckPath(ByRef oRestoreInfo As clsBackup, ByVal oGame As clsGame, ByRef bTriggerReload As Boolean) As Boolean
|
||||||
Dim sProcess As String
|
Dim sProcess As String
|
||||||
Dim sRestorePath As String
|
Dim sRestorePath As String
|
||||||
Dim bNoAuto As Boolean
|
Dim bNoAuto As Boolean
|
||||||
|
|
||||||
If Not oRestoreInfo.AbsolutePath Then
|
If Not oRestoreInfo.AbsolutePath Then
|
||||||
If oGame.ProcessPath <> String.Empty Then
|
If oGame.ProcessPath <> String.Empty Then
|
||||||
oRestoreInfo.RelativeRestorePath = oGame.ProcessPath & "\" & oRestoreInfo.RestorePath
|
oRestoreInfo.RelativeRestorePath = oGame.ProcessPath & Path.DirectorySeparatorChar & oRestoreInfo.RestorePath
|
||||||
Else
|
Else
|
||||||
sProcess = oGame.TrueProcess
|
sProcess = oGame.ProcessName
|
||||||
If oGame.Duplicate = True Or oGame.ProcessName.Contains("dosbox") Then bNoAuto = True
|
If mgrCommon.IsProcessNotSearchable(oGame) Then bNoAuto = True
|
||||||
sRestorePath = mgrPath.ProcessPathSearch(oRestoreInfo.Name, sProcess, oRestoreInfo.Name & " uses a relative path and has never been detected on this computer.", bNoAuto)
|
sRestorePath = mgrPath.ProcessPathSearch(oRestoreInfo.Name, sProcess, mgrCommon.FormatString(mgrRestore_RelativeNeedPath, oRestoreInfo.Name), bNoAuto)
|
||||||
|
|
||||||
If sRestorePath <> String.Empty Then
|
If sRestorePath <> String.Empty Then
|
||||||
oRestoreInfo.RelativeRestorePath = sRestorePath & "\" & oRestoreInfo.RestorePath
|
'Update the process path in game object, save it, and make sure a monitor list reload is triggered
|
||||||
|
oGame.ProcessPath = sRestorePath
|
||||||
|
mgrMonitorList.DoListUpdate(oGame)
|
||||||
|
bTriggerReload = True
|
||||||
|
|
||||||
|
'Set path for restore
|
||||||
|
oRestoreInfo.RelativeRestorePath = sRestorePath & Path.DirectorySeparatorChar & oRestoreInfo.RestorePath
|
||||||
Else
|
Else
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
@@ -51,7 +58,7 @@ Public Class mgrRestore
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
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 slLocalManifest As SortedList
|
||||||
Dim slRemoteManifest As SortedList
|
Dim slRemoteManifest As SortedList
|
||||||
Dim oLocalItem As New clsBackup
|
Dim oLocalItem As New clsBackup
|
||||||
@@ -59,24 +66,22 @@ Public Class mgrRestore
|
|||||||
Dim bLocal As Boolean = False
|
Dim bLocal As Boolean = False
|
||||||
Dim bRemote As Boolean = False
|
Dim bRemote As Boolean = False
|
||||||
|
|
||||||
slLocalManifest = mgrManifest.ReadManifest(mgrSQLite.Database.Local)
|
slLocalManifest = mgrManifest.ReadLatestManifest(mgrSQLite.Database.Local)
|
||||||
slRemoteManifest = mgrManifest.ReadManifest(mgrSQLite.Database.Remote)
|
slRemoteManifest = mgrManifest.ReadLatestManifest(mgrSQLite.Database.Remote)
|
||||||
|
|
||||||
If slLocalManifest.Contains(sAppName) Then
|
If slLocalManifest.Contains(sMonitorID) Then
|
||||||
oLocalItem = DirectCast(slLocalManifest(sAppName), clsBackup)
|
oLocalItem = DirectCast(slLocalManifest(sMonitorID), clsBackup)
|
||||||
bLocal = True
|
bLocal = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If slRemoteManifest.Contains(sAppName) Then
|
If slRemoteManifest.Contains(sMonitorID) Then
|
||||||
oRemoteItem = DirectCast(slRemoteManifest(sAppName), clsBackup)
|
oRemoteItem = DirectCast(slRemoteManifest(sMonitorID), clsBackup)
|
||||||
bRemote = True
|
bRemote = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If bLocal And bRemote Then
|
If bLocal And bRemote Then
|
||||||
'Compare
|
'Compare
|
||||||
If oRemoteItem.DateUpdated > oLocalItem.DateUpdated Then
|
If oRemoteItem.DateUpdated > oLocalItem.DateUpdated Then
|
||||||
oRemoteItem.LastDateUpdated = oLocalItem.DateUpdated
|
|
||||||
oRemoteItem.LastUpdatedBy = oLocalItem.UpdatedBy
|
|
||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -96,64 +101,86 @@ Public Class mgrRestore
|
|||||||
Dim bLocal As Boolean = False
|
Dim bLocal As Boolean = False
|
||||||
Dim bRemote As Boolean = False
|
Dim bRemote As Boolean = False
|
||||||
|
|
||||||
slLocalManifest = mgrManifest.ReadManifest(mgrSQLite.Database.Local)
|
slLocalManifest = mgrManifest.ReadLatestManifest(mgrSQLite.Database.Local)
|
||||||
slRemoteManifest = mgrManifest.ReadManifest(mgrSQLite.Database.Remote)
|
slRemoteManifest = mgrManifest.ReadLatestManifest(mgrSQLite.Database.Remote)
|
||||||
|
|
||||||
For Each oItem As clsBackup In slRemoteManifest.Values
|
For Each oItem As clsBackup In slRemoteManifest.Values
|
||||||
If slLocalManifest.Contains(oItem.Name) Then
|
If slLocalManifest.Contains(oItem.MonitorID) Then
|
||||||
oLocalItem = DirectCast(slLocalManifest(oItem.Name), clsBackup)
|
oLocalItem = DirectCast(slLocalManifest(oItem.MonitorID), clsBackup)
|
||||||
|
|
||||||
If oItem.DateUpdated > oLocalItem.DateUpdated Then
|
If oItem.DateUpdated > oLocalItem.DateUpdated Then
|
||||||
oLocalItem.FileName = oItem.FileName
|
slRestoreItems.Add(oItem.MonitorID, oItem)
|
||||||
oLocalItem.LastDateUpdated = oItem.DateUpdated
|
|
||||||
oLocalItem.LastUpdatedBy = oItem.UpdatedBy
|
|
||||||
slRestoreItems.Add(oLocalItem.Name, oLocalItem)
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
oLocalItem = oItem
|
slRestoreItems.Add(oItem.MonitorID, oItem)
|
||||||
oLocalItem.LastDateUpdated = oItem.DateUpdated
|
|
||||||
oLocalItem.LastUpdatedBy = oItem.UpdatedBy
|
|
||||||
oLocalItem.DateUpdated = Nothing
|
|
||||||
oLocalItem.UpdatedBy = Nothing
|
|
||||||
slRestoreItems.Add(oLocalItem.Name, oLocalItem)
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Return slRestoreItems
|
Return slRestoreItems
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function SyncLocalManifest() As SortedList
|
Public Function CheckRestorePrereq(ByVal oBackupInfo As clsBackup, ByVal bCleanFolder As Boolean) As Boolean
|
||||||
Dim slLocalManifest As SortedList
|
Dim sHash As String
|
||||||
Dim slRemoteManifest As SortedList
|
Dim sExtractPath As String
|
||||||
Dim slRemovedItems As New SortedList
|
Dim sBackupFile As String = oSettings.BackupFolder & Path.DirectorySeparatorChar & oBackupInfo.FileName
|
||||||
|
|
||||||
slLocalManifest = mgrManifest.ReadManifest(mgrSQLite.Database.Local)
|
If oBackupInfo.AbsolutePath Then
|
||||||
slRemoteManifest = mgrManifest.ReadManifest(mgrSQLite.Database.Remote)
|
sExtractPath = oBackupInfo.RestorePath
|
||||||
|
Else
|
||||||
For Each oItem As clsBackup In slLocalManifest.Values
|
sExtractPath = oBackupInfo.RelativeRestorePath
|
||||||
If Not slRemoteManifest.Contains(oItem.Name) Then
|
|
||||||
slRemovedItems.Add(oItem.Name, oItem)
|
|
||||||
mgrManifest.DoManifestDelete(oItem, mgrSQLite.Database.Local)
|
|
||||||
End If
|
End If
|
||||||
Next
|
|
||||||
|
|
||||||
Return slRemovedItems
|
'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
|
||||||
|
|
||||||
|
'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
|
End Function
|
||||||
|
|
||||||
Public Sub DoRestore(ByVal oRestoreList As List(Of clsBackup))
|
Public Sub DoRestore(ByVal oRestoreList As List(Of clsBackup))
|
||||||
Dim prs7z As Process
|
Dim prs7z As Process
|
||||||
Dim sBackupFile As String
|
Dim sBackupFile As String
|
||||||
Dim sExtractPath As String
|
Dim sExtractPath As String
|
||||||
Dim bDoRestore As Boolean
|
|
||||||
Dim bRestoreCompleted As Boolean
|
Dim bRestoreCompleted As Boolean
|
||||||
Dim sHash As String
|
|
||||||
|
|
||||||
For Each oBackupInfo In oRestoreList
|
For Each oBackupInfo In oRestoreList
|
||||||
'Init
|
'Init
|
||||||
prs7z = New Process
|
prs7z = New Process
|
||||||
sBackupFile = oSettings.BackupFolder & "\" & oBackupInfo.FileName
|
sBackupFile = oSettings.BackupFolder & Path.DirectorySeparatorChar & oBackupInfo.FileName
|
||||||
sExtractPath = String.Empty
|
sExtractPath = String.Empty
|
||||||
bDoRestore = True
|
|
||||||
bRestoreCompleted = False
|
bRestoreCompleted = False
|
||||||
CancelOperation = False
|
CancelOperation = False
|
||||||
RaiseEvent UpdateRestoreInfo(oBackupInfo)
|
RaiseEvent UpdateRestoreInfo(oBackupInfo)
|
||||||
@@ -164,55 +191,20 @@ Public Class mgrRestore
|
|||||||
sExtractPath = oBackupInfo.RelativeRestorePath
|
sExtractPath = oBackupInfo.RelativeRestorePath
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Check if restore location exists, prompt to create if it doesn't.
|
|
||||||
If Not Directory.Exists(sExtractPath) Then
|
|
||||||
If MsgBox("The restore path " & sExtractPath & " does not exist." & vbCrLf & vbCrLf & _
|
|
||||||
"Do you want to create the folder and continue?", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.Yes Then
|
|
||||||
Try
|
|
||||||
Directory.CreateDirectory(sExtractPath)
|
|
||||||
Catch ex As Exception
|
|
||||||
RaiseEvent UpdateLog("The restore path could not be created due to an unexpected error." & vbCrLf & ex.Message, False, ToolTipIcon.Error, True)
|
|
||||||
bDoRestore = False
|
|
||||||
End Try
|
|
||||||
Else
|
|
||||||
RaiseEvent UpdateLog("Restored Aborted. The path " & sExtractPath & " does not exist.", False, ToolTipIcon.Error, True)
|
|
||||||
bDoRestore = 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("The backup file for " & oBackupInfo.Name & " has failed the file integrity check.", False, ToolTipIcon.Info, True)
|
|
||||||
If MsgBox("The backup file for " & oBackupInfo.Name & " has failed the file intergity check. It may be corrupted, not exist or been modified by another application." & vbCrLf & vbCrLf & _
|
|
||||||
"Do you still want to restore this backup? (Not Recommended)", MsgBoxStyle.YesNo, "Game Backup Monitor") = MsgBoxResult.No Then
|
|
||||||
RaiseEvent UpdateLog("Restored Aborted by user due to a failed file integrity check.", False, ToolTipIcon.Info, True)
|
|
||||||
bDoRestore = False
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
RaiseEvent UpdateLog(oBackupInfo.Name & " backup has been verified.", False, ToolTipIcon.Info, True)
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
RaiseEvent UpdateLog(oBackupInfo.Name & " has no stored checksum, verification has been skipped.", False, ToolTipIcon.Info, True)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If bDoRestore Then
|
|
||||||
Try
|
Try
|
||||||
If File.Exists(sBackupFile) Then
|
If File.Exists(sBackupFile) Then
|
||||||
prs7z.StartInfo.Arguments = "x """ & sBackupFile & """ -o""" & sExtractPath & "\"" -aoa -r"
|
If Settings.Is7zUtilityValid Then
|
||||||
prs7z.StartInfo.FileName = mgrPath.Utility7zLocation
|
prs7z.StartInfo.Arguments = "x" & oSettings.Prepared7zArguments & """" & sBackupFile & """ -o""" & sExtractPath & Path.DirectorySeparatorChar & """ -aoa -r"
|
||||||
|
prs7z.StartInfo.FileName = oSettings.Utility7zLocation
|
||||||
prs7z.StartInfo.UseShellExecute = False
|
prs7z.StartInfo.UseShellExecute = False
|
||||||
prs7z.StartInfo.RedirectStandardOutput = True
|
prs7z.StartInfo.RedirectStandardOutput = True
|
||||||
prs7z.StartInfo.CreateNoWindow = True
|
prs7z.StartInfo.CreateNoWindow = True
|
||||||
prs7z.Start()
|
prs7z.Start()
|
||||||
RaiseEvent UpdateLog("Restore to " & sExtractPath & " in progress...", True, ToolTipIcon.Info, True)
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_RestoreInProgress, sExtractPath), False, ToolTipIcon.Info, True)
|
||||||
While Not prs7z.StandardOutput.EndOfStream
|
While Not prs7z.StandardOutput.EndOfStream
|
||||||
If CancelOperation Then
|
If CancelOperation Then
|
||||||
prs7z.Kill()
|
prs7z.Kill()
|
||||||
RaiseEvent UpdateLog("Restored Aborted by user. The save games for " & oBackupInfo.Name & " will be damaged or invalid.", False, ToolTipIcon.Error, True)
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorFullAbort, oBackupInfo.Name), True, ToolTipIcon.Error, True)
|
||||||
Exit While
|
Exit While
|
||||||
End If
|
End If
|
||||||
RaiseEvent UpdateLog(prs7z.StandardOutput.ReadLine, False, ToolTipIcon.Info, False)
|
RaiseEvent UpdateLog(prs7z.StandardOutput.ReadLine, False, ToolTipIcon.Info, False)
|
||||||
@@ -220,35 +212,38 @@ Public Class mgrRestore
|
|||||||
prs7z.WaitForExit()
|
prs7z.WaitForExit()
|
||||||
If Not CancelOperation Then
|
If Not CancelOperation Then
|
||||||
If prs7z.ExitCode = 0 Then
|
If prs7z.ExitCode = 0 Then
|
||||||
RaiseEvent UpdateLog(oBackupInfo.Name & " backup restored.", True, ToolTipIcon.Info, True)
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_RestoreComplete, oBackupInfo.Name), False, ToolTipIcon.Info, True)
|
||||||
bRestoreCompleted = True
|
bRestoreCompleted = True
|
||||||
Else
|
Else
|
||||||
RaiseEvent UpdateLog(oBackupInfo.Name & " restore operation finished with warnings or errors.", False, ToolTipIcon.Info, True)
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_RestoreWarnings, oBackupInfo.Name), True, ToolTipIcon.Warning, True)
|
||||||
bRestoreCompleted = False
|
bRestoreCompleted = False
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
prs7z.Dispose()
|
prs7z.Dispose()
|
||||||
Else
|
Else
|
||||||
RaiseEvent UpdateLog("Restore Aborted. The backup file could not be found. Ensure the backup location is available.", False, ToolTipIcon.Error, True)
|
RaiseEvent UpdateLog(App_Invalid7zDetected, True, ToolTipIcon.Error, True)
|
||||||
|
bRestoreCompleted = False
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
RaiseEvent UpdateLog(mgrRestore_ErrorNoBackup, True, ToolTipIcon.Error, True)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If bRestoreCompleted Then
|
If bRestoreCompleted Then
|
||||||
'Save Local Manifest
|
'Save Local Manifest
|
||||||
If mgrManifest.DoManifestCheck(oBackupInfo.Name, mgrSQLite.Database.Local) Then
|
If mgrManifest.DoManifestCheck(oBackupInfo.MonitorID, mgrSQLite.Database.Local) Then
|
||||||
mgrManifest.DoManifestUpdate(oBackupInfo, mgrSQLite.Database.Local)
|
mgrManifest.DoManifestUpdateByMonitorID(oBackupInfo, mgrSQLite.Database.Local)
|
||||||
Else
|
Else
|
||||||
mgrManifest.DoManifestAdd(oBackupInfo, mgrSQLite.Database.Local)
|
mgrManifest.DoManifestAdd(oBackupInfo, mgrSQLite.Database.Local)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
RaiseEvent UpdateLog("An unexpected error occured during the restore process." & vbCrLf & ex.Message, False, ToolTipIcon.Error, True)
|
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorOtherFailure, ex.Message), False, ToolTipIcon.Error, True)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
If bRestoreCompleted Then
|
If bRestoreCompleted Then
|
||||||
RaiseEvent SetLastAction(oBackupInfo.CroppedName & " backup restored")
|
RaiseEvent SetLastAction(mgrCommon.FormatString(mgrRestore_ActionComplete, oBackupInfo.CroppedName))
|
||||||
Else
|
Else
|
||||||
RaiseEvent SetLastAction(oBackupInfo.CroppedName & " restore failed")
|
RaiseEvent SetLastAction(mgrCommon.FormatString(mgrRestore_ActionFailed, oBackupInfo.CroppedName))
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
+529
-44
@@ -1,5 +1,6 @@
|
|||||||
Imports System.IO
|
Imports GBM.My.Resources
|
||||||
Imports System.Data.SQLite
|
Imports System.IO
|
||||||
|
Imports Mono.Data.Sqlite
|
||||||
|
|
||||||
Public Class mgrSQLite
|
Public Class mgrSQLite
|
||||||
|
|
||||||
@@ -26,20 +27,20 @@ Public Class mgrSQLite
|
|||||||
End Select
|
End Select
|
||||||
End Sub
|
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
|
Dim sNewFile As String = String.Empty
|
||||||
|
|
||||||
Try
|
Try
|
||||||
Select Case eDatabase
|
Select Case eDatabase
|
||||||
Case Database.Local
|
Case Database.Local
|
||||||
sNewFile = mgrPath.DatabaseLocation & "." & sLastVer & ".bak"
|
sNewFile = mgrPath.DatabaseLocation & "." & sDescription & ".bak"
|
||||||
File.Copy(mgrPath.DatabaseLocation, sNewFile, False)
|
File.Copy(mgrPath.DatabaseLocation, sNewFile, bOverwrite)
|
||||||
Case Database.Remote
|
Case Database.Remote
|
||||||
sNewFile = mgrPath.RemoteDatabaseLocation & "." & sLastVer & ".bak"
|
sNewFile = mgrPath.RemoteDatabaseLocation & "." & sDescription & ".bak"
|
||||||
File.Copy(mgrPath.RemoteDatabaseLocation, sNewFile, False)
|
File.Copy(mgrPath.RemoteDatabaseLocation, sNewFile, bOverwrite)
|
||||||
End Select
|
End Select
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox("An error occured creating a backup of the database file at " & sNewFile & vbCrLf & vbCrLf & ex.Message)
|
mgrCommon.ShowMessage(mgrSQLite_ErrorBackupFailure, New String() {sNewFile, ex.Message}, MsgBoxStyle.Exclamation)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -69,30 +70,51 @@ Public Class mgrSQLite
|
|||||||
SQLiteConnection.CreateFile(sDatabaseLocation)
|
SQLiteConnection.CreateFile(sDatabaseLocation)
|
||||||
|
|
||||||
'Add Tables (Settings)
|
'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, " & _
|
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, " & _
|
"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);"
|
"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);"
|
||||||
|
|
||||||
|
'Add Tables (SavedPath)
|
||||||
|
sSql &= "CREATE TABLE savedpath (PathName TEXT NOT NULL PRIMARY KEY, Path TEXT NOT NULL);"
|
||||||
|
|
||||||
'Add Tables (Monitor List)
|
'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, " & _
|
"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, " & _
|
"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);"
|
||||||
|
|
||||||
|
'Add Tables (Tags)
|
||||||
|
sSql &= "CREATE TABLE tags (TagID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL PRIMARY KEY); "
|
||||||
|
|
||||||
|
'Add Tables (Game Tags)
|
||||||
|
sSql &= "CREATE TABLE gametags (TagID TEXT NOT NULL, MonitorID TEXT NOT NULL, PRIMARY KEY(TagID, MonitorID)); "
|
||||||
|
|
||||||
'Add Tables (Variables)
|
'Add Tables (Variables)
|
||||||
sSql &= "CREATE TABLE variables (VariableID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL PRIMARY KEY, Path TEXT NOT NULL);"
|
sSql &= "CREATE TABLE variables (VariableID TEXT NOT NULL UNIQUE, Name TEXT NOT NULL PRIMARY KEY, Path TEXT NOT NULL);"
|
||||||
|
|
||||||
'Add Tables (Local Manifest)
|
'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, " & _
|
sSql &= "CREATE TABLE manifest (ManifestID TEXT NOT NULL PRIMARY KEY, MonitorID TEXT NOT NULL, FileName TEXT NOT NULL, " &
|
||||||
"AbsolutePath BOOLEAN NOT NULL, DateUpdated TEXT NOT NULL, UpdatedBy TEXT NOT NULL, CheckSum TEXT);"
|
"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));"
|
||||||
|
|
||||||
'Set Version
|
'Set Version
|
||||||
sSql &= "PRAGMA user_version=" & mgrCommon.AppVersion
|
sSql &= "PRAGMA user_version=" & mgrCommon.AppVersion
|
||||||
|
|
||||||
RunParamQuery(sSql, New Hashtable)
|
RunParamQuery(sSql, New Hashtable)
|
||||||
Return True
|
Return True
|
||||||
Catch e As Exception
|
Catch ex As Exception
|
||||||
MsgBox("An error has occured attempting to create the local application database: " & vbCrLf & vbCrLf & e.Message)
|
mgrCommon.ShowMessage(mgrSQLite_ErrorCreatingLocalDB, ex.Message, MsgBoxStyle.Critical)
|
||||||
Return False
|
Return False
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
@@ -102,25 +124,31 @@ Public Class mgrSQLite
|
|||||||
|
|
||||||
Try
|
Try
|
||||||
'Create the DB
|
'Create the DB
|
||||||
SQLiteConnection.CreateFile(sDatabaseLocation)
|
SqliteConnection.CreateFile(sDatabaseLocation)
|
||||||
|
|
||||||
'Add Tables (Remote Monitor List)
|
'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, " & _
|
"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, " & _
|
"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);"
|
||||||
|
|
||||||
'Add Tables (Remote Manifest)
|
'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, " & _
|
sSql &= "CREATE TABLE manifest (ManifestID TEXT NOT NULL PRIMARY KEY, MonitorID TEXT NOT NULL, FileName TEXT NOT NULL, " &
|
||||||
"AbsolutePath BOOLEAN NOT NULL, DateUpdated TEXT NOT NULL, UpdatedBy TEXT NOT NULL, CheckSum TEXT);"
|
"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); "
|
||||||
|
|
||||||
|
'Add Tables (Remote Game Tags)
|
||||||
|
sSql &= "CREATE TABLE gametags (TagID TEXT NOT NULL, MonitorID TEXT NOT NULL, PRIMARY KEY(TagID, MonitorID)); "
|
||||||
|
|
||||||
'Set Version
|
'Set Version
|
||||||
sSql &= "PRAGMA user_version=" & mgrCommon.AppVersion
|
sSql &= "PRAGMA user_version=" & mgrCommon.AppVersion
|
||||||
|
|
||||||
RunParamQuery(sSql, New Hashtable)
|
RunParamQuery(sSql, New Hashtable)
|
||||||
Return True
|
Return True
|
||||||
Catch e As Exception
|
Catch ex As Exception
|
||||||
MsgBox("An error has occured attempting to create the remote application database: " & vbCrLf & vbCrLf & e.Message)
|
mgrCommon.ShowMessage(mgrSQLite_ErrorCreatingRemoteDB, ex.Message, MsgBoxStyle.Critical)
|
||||||
Return False
|
Return False
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
@@ -140,7 +168,7 @@ Public Class mgrSQLite
|
|||||||
|
|
||||||
Public Sub Connect()
|
Public Sub Connect()
|
||||||
If CheckDB() Then
|
If CheckDB() Then
|
||||||
db = New SQLiteConnection(sConnectString)
|
db = New SqliteConnection(sConnectString)
|
||||||
db.Open()
|
db.Open()
|
||||||
Else
|
Else
|
||||||
CreateDB()
|
CreateDB()
|
||||||
@@ -152,27 +180,62 @@ Public Class mgrSQLite
|
|||||||
db.Close()
|
db.Close()
|
||||||
End Sub
|
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
|
For Each de As DictionaryEntry In hshParams
|
||||||
command.Parameters.AddWithValue(de.Key, de.Value)
|
command.Parameters.AddWithValue(de.Key, de.Value)
|
||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Function RunParamQuery(ByVal sSQL As String, ByVal hshParams As Hashtable) As Boolean
|
Public Function RunParamQuery(ByVal sSQL As String, ByVal hshParams As Hashtable) As Boolean
|
||||||
Dim trans As SQLiteTransaction
|
Dim trans As SqliteTransaction
|
||||||
Dim command As SQLiteCommand
|
Dim command As SqliteCommand
|
||||||
|
|
||||||
Connect()
|
Connect()
|
||||||
command = New SQLiteCommand(sSQL, db)
|
command = New SqliteCommand(sSQL, db)
|
||||||
BuildParams(command, hshParams)
|
BuildParams(command, hshParams)
|
||||||
trans = db.BeginTransaction()
|
trans = db.BeginTransaction()
|
||||||
|
|
||||||
Try
|
Try
|
||||||
command.ExecuteNonQuery()
|
command.ExecuteNonQuery()
|
||||||
trans.Commit()
|
trans.Commit()
|
||||||
Catch e As Exception
|
Catch ex As Exception
|
||||||
trans.Rollback()
|
RollBack(trans)
|
||||||
MsgBox("An error has occured attempting run the query." & vbCrLf & vbCrLf & sSQL & vbCrLf & vbCrLf & e.Message)
|
mgrCommon.ShowMessage(mgrSQLite_ErrorQueryFailure, New String() {sSQL, ex.Message}, MsgBoxStyle.Exclamation)
|
||||||
|
Return False
|
||||||
|
Finally
|
||||||
|
command.Dispose()
|
||||||
|
Disconnect()
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return True
|
||||||
|
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
|
||||||
|
|
||||||
|
Connect()
|
||||||
|
command = New SqliteCommand(sSQL, db)
|
||||||
|
trans = db.BeginTransaction()
|
||||||
|
|
||||||
|
Try
|
||||||
|
For Each hshParams In oParamList
|
||||||
|
BuildParams(command, hshParams)
|
||||||
|
command.ExecuteNonQuery()
|
||||||
|
Next
|
||||||
|
trans.Commit()
|
||||||
|
Catch ex As Exception
|
||||||
|
RollBack(trans)
|
||||||
|
mgrCommon.ShowMessage(mgrSQLite_ErrorQueryFailure, New String() {sSQL, ex.Message}, MsgBoxStyle.Exclamation)
|
||||||
Return False
|
Return False
|
||||||
Finally
|
Finally
|
||||||
command.Dispose()
|
command.Dispose()
|
||||||
@@ -183,19 +246,20 @@ Public Class mgrSQLite
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function ReadParamData(ByVal sSQL As String, ByVal hshParams As Hashtable) As DataSet
|
Public Function ReadParamData(ByVal sSQL As String, ByVal hshParams As Hashtable) As DataSet
|
||||||
Dim adapter As SQLiteDataAdapter
|
Dim adapter As SqliteDataAdapter
|
||||||
Dim command As SQLiteCommand
|
Dim command As SqliteCommand
|
||||||
Dim oData As New DataSet
|
Dim oData As New DataSet
|
||||||
|
|
||||||
Connect()
|
Connect()
|
||||||
command = New SQLiteCommand(sSQL, db)
|
command = New SqliteCommand(sSQL, db)
|
||||||
BuildParams(command, hshParams)
|
BuildParams(command, hshParams)
|
||||||
|
|
||||||
Try
|
Try
|
||||||
adapter = New SQLiteDataAdapter(command)
|
adapter = New SqliteDataAdapter()
|
||||||
|
adapter.SelectCommand = command
|
||||||
adapter.Fill(oData)
|
adapter.Fill(oData)
|
||||||
Catch e As Exception
|
Catch ex As Exception
|
||||||
MsgBox("An error has occured attempting run the query." & vbCrLf & vbCrLf & sSQL & vbCrLf & vbCrLf & e.Message)
|
mgrCommon.ShowMessage(mgrSQLite_ErrorQueryFailure, New String() {sSQL, ex.Message}, MsgBoxStyle.Exclamation)
|
||||||
Finally
|
Finally
|
||||||
command.Dispose()
|
command.Dispose()
|
||||||
Disconnect()
|
Disconnect()
|
||||||
@@ -204,6 +268,27 @@ Public Class mgrSQLite
|
|||||||
Return oData
|
Return oData
|
||||||
End Function
|
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
|
Private Function GetDatabaseVersion() As Integer
|
||||||
Dim sSQL As String
|
Dim sSQL As String
|
||||||
Dim iVer As Integer
|
Dim iVer As Integer
|
||||||
@@ -411,6 +496,402 @@ Public Class mgrSQLite
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'0.94 Upgrade
|
||||||
|
If GetDatabaseVersion() < 94 Then
|
||||||
|
If eDatabase = Database.Local Then
|
||||||
|
'Backup DB before starting
|
||||||
|
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)); "
|
||||||
|
|
||||||
|
'Add new setting
|
||||||
|
sSQL &= "ALTER TABLE settings ADD COLUMN TimeTracking BOOLEAN NOT NULL DEFAULT 1;"
|
||||||
|
|
||||||
|
sSQL &= "PRAGMA user_version=94"
|
||||||
|
|
||||||
|
RunParamQuery(sSQL, New Hashtable)
|
||||||
|
End If
|
||||||
|
If eDatabase = Database.Remote Then
|
||||||
|
'Backup DB before starting
|
||||||
|
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 &= "PRAGMA user_version=94"
|
||||||
|
|
||||||
|
RunParamQuery(sSQL, New Hashtable)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
'0.95 Upgrade
|
||||||
|
If GetDatabaseVersion() < 95 Then
|
||||||
|
If eDatabase = Database.Local Then
|
||||||
|
'Backup DB before starting
|
||||||
|
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 &= "PRAGMA user_version=95"
|
||||||
|
|
||||||
|
RunParamQuery(sSQL, New Hashtable)
|
||||||
|
End If
|
||||||
|
If eDatabase = Database.Remote Then
|
||||||
|
'Backup DB before starting
|
||||||
|
BackupDB("v94")
|
||||||
|
|
||||||
|
sSQL = "PRAGMA user_version=95"
|
||||||
|
|
||||||
|
RunParamQuery(sSQL, New Hashtable)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
'0.96 Upgrade
|
||||||
|
If GetDatabaseVersion() < 96 Then
|
||||||
|
If eDatabase = Database.Local Then
|
||||||
|
'Backup DB before starting
|
||||||
|
BackupDB("v95")
|
||||||
|
|
||||||
|
'Add new setting
|
||||||
|
sSQL = "ALTER TABLE settings ADD COLUMN CompressionLevel INTEGER NOT NULL DEFAULT 5;"
|
||||||
|
|
||||||
|
sSQL &= "PRAGMA user_version=96"
|
||||||
|
|
||||||
|
RunParamQuery(sSQL, New Hashtable)
|
||||||
|
End If
|
||||||
|
If eDatabase = Database.Remote Then
|
||||||
|
'Backup DB before starting
|
||||||
|
BackupDB("v95")
|
||||||
|
|
||||||
|
sSQL = "PRAGMA user_version=96"
|
||||||
|
|
||||||
|
RunParamQuery(sSQL, New Hashtable)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
'0.97 Upgrade
|
||||||
|
If GetDatabaseVersion() < 97 Then
|
||||||
|
If eDatabase = Database.Local Then
|
||||||
|
'Backup DB before starting
|
||||||
|
BackupDB("v96")
|
||||||
|
|
||||||
|
'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 &= "PRAGMA user_version=97"
|
||||||
|
|
||||||
|
RunParamQuery(sSQL, New Hashtable)
|
||||||
|
End If
|
||||||
|
If eDatabase = Database.Remote Then
|
||||||
|
'Backup DB before starting
|
||||||
|
BackupDB("v96")
|
||||||
|
|
||||||
|
sSQL = "PRAGMA user_version=97"
|
||||||
|
|
||||||
|
RunParamQuery(sSQL, New Hashtable)
|
||||||
|
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
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Function GetDBSize() As Long
|
Public Function GetDBSize() As Long
|
||||||
@@ -418,6 +899,10 @@ Public Class mgrSQLite
|
|||||||
Return Math.Round(oFileInfo.Length / 1024, 2)
|
Return Math.Round(oFileInfo.Length / 1024, 2)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function ReportVersion() As String
|
||||||
|
Return SqliteConnection.SQLiteVersion
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Sub CompactDatabase()
|
Public Sub CompactDatabase()
|
||||||
Dim sSQL As String
|
Dim sSQL As String
|
||||||
Dim command As SQLiteCommand
|
Dim command As SQLiteCommand
|
||||||
@@ -429,8 +914,8 @@ Public Class mgrSQLite
|
|||||||
|
|
||||||
Try
|
Try
|
||||||
command.ExecuteNonQuery()
|
command.ExecuteNonQuery()
|
||||||
Catch e As Exception
|
Catch ex As Exception
|
||||||
MsgBox("An error has occured attempting run the query." & vbCrLf & vbCrLf & sSQL & vbCrLf & vbCrLf & e.Message)
|
mgrCommon.ShowMessage(mgrSQLite_ErrorQueryFailure, New String() {sSQL, ex.Message}, MsgBoxStyle.Exclamation)
|
||||||
Finally
|
Finally
|
||||||
command.Dispose()
|
command.Dispose()
|
||||||
Disconnect()
|
Disconnect()
|
||||||
|
|||||||
@@ -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
|
||||||
+263
-26
@@ -9,9 +9,30 @@ Public Class mgrSettings
|
|||||||
Private bCreateSubFolder As Boolean = False
|
Private bCreateSubFolder As Boolean = False
|
||||||
Private bShowOverwriteWarning As Boolean = True
|
Private bShowOverwriteWarning As Boolean = True
|
||||||
Private bRestoreOnLaunch As Boolean = False
|
Private bRestoreOnLaunch As Boolean = False
|
||||||
Private bSync As Boolean = True
|
Private bAutoRestore As Boolean = False
|
||||||
Private bCheckSum As Boolean = True
|
Private bAutoMark As Boolean = False
|
||||||
|
Private bTimeTracking As Boolean = True
|
||||||
|
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 sBackupFolder As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments).TrimEnd(New Char() {"\", "/"})
|
||||||
|
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
|
||||||
|
|
||||||
|
<Flags()> Public Enum eSuppressMessages
|
||||||
|
None = 0
|
||||||
|
GameIDSync = 1
|
||||||
|
BackupImport = 2
|
||||||
|
WinConfigsInLinux = 4
|
||||||
|
End Enum
|
||||||
|
|
||||||
Property StartWithWindows As Boolean
|
Property StartWithWindows As Boolean
|
||||||
Get
|
Get
|
||||||
@@ -85,24 +106,144 @@ Public Class mgrSettings
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Property Sync As Boolean
|
Property AutoRestore As Boolean
|
||||||
Get
|
Get
|
||||||
Return bSync
|
Return bAutoRestore
|
||||||
End Get
|
End Get
|
||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
bSync = value
|
bAutoRestore = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Property CheckSum As Boolean
|
Property AutoMark As Boolean
|
||||||
Get
|
Get
|
||||||
Return bCheckSum
|
Return bAutoMark
|
||||||
End Get
|
End Get
|
||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
bCheckSum = value
|
bAutoMark = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Property TimeTracking As Boolean
|
||||||
|
Get
|
||||||
|
Return bTimeTracking
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
bTimeTracking = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Property SessionTracking As Boolean
|
||||||
|
Get
|
||||||
|
Return bSessionTracking
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
bSessionTracking = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Property SuppressBackup As Boolean
|
||||||
|
Get
|
||||||
|
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)
|
||||||
|
iSuppressBackupThreshold = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Property CompressionLevel As Integer
|
||||||
|
Get
|
||||||
|
Return iCompressionLevel
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
iCompressionLevel = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Property Custom7zArguments As String
|
||||||
|
Get
|
||||||
|
Return s7zArguments
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
s7zArguments = value
|
||||||
|
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
|
||||||
|
Dim sPreparedArguments As String
|
||||||
|
If s7zArguments <> String.Empty Then
|
||||||
|
'Surround the arguments with spaces to be inserted into command
|
||||||
|
sPreparedArguments = " " & s7zArguments & " "
|
||||||
|
Else
|
||||||
|
'The command always needs at least one space inserted
|
||||||
|
sPreparedArguments = " "
|
||||||
|
End If
|
||||||
|
Return sPreparedArguments
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Property Custom7zLocation As String
|
||||||
|
Get
|
||||||
|
Return s7zLocation
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
s7zLocation = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
ReadOnly Property Is7zUtilityValid As Boolean
|
||||||
|
Get
|
||||||
|
'We don't use a packaged 7za on Unix, assume valid.
|
||||||
|
If mgrCommon.IsUnix Then
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If s7zLocation = String.Empty Then
|
||||||
|
'Verify stored hash of the default utility if we're using it
|
||||||
|
Return mgrCommon.UtilityHash = mgrHash.Generate_SHA256_Hash(mgrPath.Default7zLocation)
|
||||||
|
Else
|
||||||
|
'When using a custom utility assume it's valid, we have no way to be sure.
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
ReadOnly Property Utility7zLocation As String
|
||||||
|
Get
|
||||||
|
'Return default utility when custom setting is not used
|
||||||
|
If s7zLocation = String.Empty Then
|
||||||
|
Return mgrPath.Default7zLocation
|
||||||
|
Else
|
||||||
|
'Check if custom utility is available, if not use the default utility
|
||||||
|
If File.Exists(s7zLocation) Then
|
||||||
|
Return s7zLocation
|
||||||
|
Else
|
||||||
|
Return mgrPath.Default7zLocation
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Property BackupFolder As String
|
Property BackupFolder As String
|
||||||
Get
|
Get
|
||||||
Return sBackupFolder
|
Return sBackupFolder
|
||||||
@@ -112,16 +253,75 @@ Public Class mgrSettings
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Property SyncFields As clsGame.eOptionalSyncFields
|
||||||
|
Get
|
||||||
|
Return eSyncFields
|
||||||
|
End Get
|
||||||
|
Set(value As clsGame.eOptionalSyncFields)
|
||||||
|
eSyncFields = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Property AutoSaveLog As Boolean
|
||||||
|
Get
|
||||||
|
Return bAutoSaveLog
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
bAutoSaveLog = value
|
||||||
|
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
|
||||||
|
|
||||||
|
Sub New()
|
||||||
|
'The GameIDsync message should be suppressed on all new databases
|
||||||
|
SuppressMessages = SetMessageField(SuppressMessages, eSuppressMessages.GameIDSync)
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub SaveFromClass()
|
Private Sub SaveFromClass()
|
||||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||||
Dim sSQL As String
|
Dim sSQL As String
|
||||||
Dim hshParams As New Hashtable
|
Dim hshParams As New Hashtable
|
||||||
|
|
||||||
sSQL = "DELETE FROM settings WHERE SettingsID = 1"
|
sSQL = "INSERT OR REPLACE INTO settings VALUES (1, @MonitorOnStartup, @StartToTray, @ShowDetectionToolTips, @DisableConfirmation, "
|
||||||
oDatabase.RunParamQuery(sSQL, New Hashtable)
|
sSQL &= "@CreateSubFolder, @ShowOverwriteWarning, @RestoreOnLaunch, @BackupFolder, @StartWithWindows, "
|
||||||
|
sSQL &= "@TimeTracking, @SuppressBackup, @SuppressBackupThreshold, @CompressionLevel, @Custom7zArguments, @Custom7zLocation, "
|
||||||
sSQL = "INSERT INTO settings VALUES (1, @MonitorOnStartup, @StartToTray, @ShowDetectionToolTips, @DisableConfirmation, "
|
sSQL &= "@SyncFields, @AutoSaveLog, @AutoRestore, @AutoMark, @SessionTracking, @SuppressMessages, @BackupOnLaunch, @UseGameID, "
|
||||||
sSQL &= "@CreateSubFolder, @ShowOverwriteWarning, @RestoreOnLaunch, @BackupFolder, @Sync, @CheckSum, @StartWithWindows)"
|
sSQL &= "@DisableSyncMessages, @ShowResolvedPaths)"
|
||||||
|
|
||||||
hshParams.Add("MonitorOnStartup", MonitorOnStartup)
|
hshParams.Add("MonitorOnStartup", MonitorOnStartup)
|
||||||
hshParams.Add("StartToTray", StartToTray)
|
hshParams.Add("StartToTray", StartToTray)
|
||||||
@@ -131,9 +331,23 @@ Public Class mgrSettings
|
|||||||
hshParams.Add("ShowOverwriteWarning", ShowOverwriteWarning)
|
hshParams.Add("ShowOverwriteWarning", ShowOverwriteWarning)
|
||||||
hshParams.Add("RestoreOnLaunch", RestoreOnLaunch)
|
hshParams.Add("RestoreOnLaunch", RestoreOnLaunch)
|
||||||
hshParams.Add("BackupFolder", BackupFolder)
|
hshParams.Add("BackupFolder", BackupFolder)
|
||||||
hshParams.Add("Sync", Sync)
|
|
||||||
hshParams.Add("CheckSum", CheckSum)
|
|
||||||
hshParams.Add("StartWithWindows", StartWithWindows)
|
hshParams.Add("StartWithWindows", StartWithWindows)
|
||||||
|
hshParams.Add("TimeTracking", TimeTracking)
|
||||||
|
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)
|
||||||
|
|
||||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -149,17 +363,31 @@ Public Class mgrSettings
|
|||||||
oData = oDatabase.ReadParamData(sSQL, New Hashtable)
|
oData = oDatabase.ReadParamData(sSQL, New Hashtable)
|
||||||
|
|
||||||
For Each dr As DataRow In oData.Tables(0).Rows
|
For Each dr As DataRow In oData.Tables(0).Rows
|
||||||
MonitorOnStartup = CBool(dr(1))
|
MonitorOnStartup = CBool(dr("MonitorOnStartup"))
|
||||||
StartToTray = CBool(dr(2))
|
StartToTray = CBool(dr("StartToTray"))
|
||||||
ShowDetectionToolTips = CBool(dr(3))
|
ShowDetectionToolTips = CBool(dr("ShowDetectionToolTips"))
|
||||||
DisableConfirmation = CBool(dr(4))
|
DisableConfirmation = CBool(dr("DisableConfirmation"))
|
||||||
CreateSubFolder = CBool(dr(5))
|
CreateSubFolder = CBool(dr("CreateSubFolder"))
|
||||||
ShowOverwriteWarning = CBool(dr(6))
|
ShowOverwriteWarning = CBool(dr("ShowOverwriteWarning"))
|
||||||
RestoreOnLaunch = CBool(dr(7))
|
RestoreOnLaunch = CBool(dr("RestoreOnLaunch"))
|
||||||
BackupFolder = CStr(dr(8))
|
BackupFolder = CStr(dr("BackupFolder"))
|
||||||
Sync = CBool(dr(9))
|
StartWithWindows = CBool(dr("StartWithWindows"))
|
||||||
CheckSum = CBool(dr(10))
|
TimeTracking = CBool(dr("TimeTracking"))
|
||||||
StartWithWindows = CBool(dr(11))
|
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"))
|
||||||
Next
|
Next
|
||||||
|
|
||||||
oDatabase.Disconnect()
|
oDatabase.Disconnect()
|
||||||
@@ -178,4 +406,13 @@ Public Class mgrSettings
|
|||||||
'Set Remote Manifest Location
|
'Set Remote Manifest Location
|
||||||
mgrPath.RemoteDatabaseLocation = Me.BackupFolder
|
mgrPath.RemoteDatabaseLocation = Me.BackupFolder
|
||||||
End Sub
|
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
|
End Class
|
||||||
|
|||||||
@@ -0,0 +1,276 @@
|
|||||||
|
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 Hashtable
|
||||||
|
|
||||||
|
sSQL = "INSERT INTO tags VALUES (@ID, @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 Hashtable
|
||||||
|
|
||||||
|
sSQL = "UPDATE tags SET Name=@Name "
|
||||||
|
sSQL &= "WHERE TagID = @ID"
|
||||||
|
|
||||||
|
hshParams = SetCoreParameters(oTag)
|
||||||
|
|
||||||
|
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Shared Sub DoTagDelete(ByVal sTagID As String)
|
||||||
|
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||||
|
Dim sSQL As String
|
||||||
|
Dim hshParams As New Hashtable
|
||||||
|
|
||||||
|
sSQL = "DELETE FROM gametags "
|
||||||
|
sSQL &= "WHERE TagID = @ID;"
|
||||||
|
sSQL = "DELETE FROM tags "
|
||||||
|
sSQL &= "WHERE TagID = @ID;"
|
||||||
|
|
||||||
|
hshParams.Add("ID", sTagID)
|
||||||
|
|
||||||
|
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Shared Function DoTagGetbyID(ByVal sTagID As String) As clsTag
|
||||||
|
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||||
|
Dim sSQL As String
|
||||||
|
Dim oData As DataSet
|
||||||
|
Dim oTag As New clsTag
|
||||||
|
Dim hshParams As New Hashtable
|
||||||
|
|
||||||
|
sSQL = "SELECT * FROM tags "
|
||||||
|
sSQL &= "WHERE TagID = @ID"
|
||||||
|
|
||||||
|
hshParams.Add("ID", sTagID)
|
||||||
|
|
||||||
|
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||||
|
|
||||||
|
For Each dr As DataRow In oData.Tables(0).Rows
|
||||||
|
oTag = MapToObject(dr)
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return oTag
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function DoTagGetbyName(ByVal sTagName As String) As clsTag
|
||||||
|
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||||
|
Dim sSQL As String
|
||||||
|
Dim oData As DataSet
|
||||||
|
Dim oTag As New clsTag
|
||||||
|
Dim hshParams As New Hashtable
|
||||||
|
|
||||||
|
sSQL = "SELECT * FROM tags "
|
||||||
|
sSQL &= "WHERE Name = @Name"
|
||||||
|
|
||||||
|
hshParams.Add("Name", sTagName)
|
||||||
|
|
||||||
|
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||||
|
|
||||||
|
For Each dr As DataRow In oData.Tables(0).Rows
|
||||||
|
oTag = MapToObject(dr)
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return oTag
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function DoCheckDuplicate(ByVal sTagName As String, Optional ByVal sExcludeID As String = "", Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local) As Boolean
|
||||||
|
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||||
|
Dim sSQL As String
|
||||||
|
Dim oData As DataSet
|
||||||
|
Dim hshParams As New Hashtable
|
||||||
|
|
||||||
|
sSQL = "SELECT * FROM tags "
|
||||||
|
sSQL &= "WHERE Name = @Name"
|
||||||
|
|
||||||
|
hshParams.Add("Name", sTagName)
|
||||||
|
|
||||||
|
If sExcludeID <> String.Empty Then
|
||||||
|
sSQL &= " AND TagID <> @TagID"
|
||||||
|
hshParams.Add("TagID", 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 ReadTags(Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local) As Hashtable
|
||||||
|
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||||
|
Dim oData As DataSet
|
||||||
|
Dim sSQL As String
|
||||||
|
Dim hshList As New Hashtable
|
||||||
|
Dim oTag As clsTag
|
||||||
|
|
||||||
|
sSQL = "SELECT * from tags"
|
||||||
|
oData = oDatabase.ReadParamData(sSQL, New Hashtable)
|
||||||
|
|
||||||
|
For Each dr As DataRow In oData.Tables(0).Rows
|
||||||
|
oTag = MapToObject(dr)
|
||||||
|
hshList.Add(oTag.Name, oTag)
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return hshList
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Sub DoTagAddImport(ByVal hshTags As Hashtable, Optional ByVal iSelectDB As mgrSQLite.Database = mgrSQLite.Database.Local)
|
||||||
|
Dim oDatabase As New mgrSQLite(iSelectDB)
|
||||||
|
Dim sSQL As String
|
||||||
|
Dim sMonitorID As String
|
||||||
|
Dim oTag As clsTag
|
||||||
|
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 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
|
||||||
|
hshParams = New Hashtable
|
||||||
|
oTag = New clsTag
|
||||||
|
oTag.Name = t.Name
|
||||||
|
hshParams.Add("ID", oTag.ID)
|
||||||
|
hshParams.Add("Name", oTag.Name)
|
||||||
|
hshParams.Add("MonitorID", sMonitorID)
|
||||||
|
oParamList.Add(hshParams)
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
|
||||||
|
oDatabase.RunMassParamQuery(sSQL, oParamList)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Shared Sub DoTagAddUpdateSync(ByVal hshTags As Hashtable, 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 = "INSERT OR REPLACE INTO tags VALUES (@ID, @Name);"
|
||||||
|
|
||||||
|
For Each oTag As clsTag In hshTags.Values
|
||||||
|
hshParams = New Hashtable
|
||||||
|
hshParams.Add("ID", oTag.ID)
|
||||||
|
hshParams.Add("Name", oTag.Name)
|
||||||
|
oParamList.Add(hshParams)
|
||||||
|
Next
|
||||||
|
|
||||||
|
oDatabase.RunMassParamQuery(sSQL, oParamList)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Shared Sub DoTagDeleteSync(ByVal hshTags As Hashtable, 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 gametags "
|
||||||
|
sSQL &= "WHERE TagID = @ID;"
|
||||||
|
sSQL = "DELETE FROM tags "
|
||||||
|
sSQL &= "WHERE TagID = @ID;"
|
||||||
|
|
||||||
|
For Each oTag As clsTag In hshTags.Values
|
||||||
|
hshParams = New Hashtable
|
||||||
|
hshParams.Add("ID", oTag.ID)
|
||||||
|
oParamList.Add(hshParams)
|
||||||
|
Next
|
||||||
|
|
||||||
|
oDatabase.RunMassParamQuery(sSQL, oParamList)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Shared Function SyncTags(Optional ByVal bToRemote As Boolean = True) As Integer
|
||||||
|
Dim hshCompareFrom As Hashtable
|
||||||
|
Dim hshCompareTo As Hashtable
|
||||||
|
Dim hshSyncItems As Hashtable
|
||||||
|
Dim hshDeleteItems As Hashtable
|
||||||
|
Dim oFromItem As clsTag
|
||||||
|
Dim oToItem As clsTag
|
||||||
|
|
||||||
|
'Add / Update Sync
|
||||||
|
If bToRemote Then
|
||||||
|
hshCompareFrom = ReadTags(mgrSQLite.Database.Local)
|
||||||
|
hshCompareTo = ReadTags(mgrSQLite.Database.Remote)
|
||||||
|
Else
|
||||||
|
hshCompareFrom = ReadTags(mgrSQLite.Database.Remote)
|
||||||
|
hshCompareTo = ReadTags(mgrSQLite.Database.Local)
|
||||||
|
End If
|
||||||
|
|
||||||
|
hshSyncItems = hshCompareFrom.Clone
|
||||||
|
|
||||||
|
For Each oFromItem In hshCompareFrom.Values
|
||||||
|
If hshCompareTo.Contains(oFromItem.Name) Then
|
||||||
|
oToItem = DirectCast(hshCompareTo(oFromItem.Name), clsTag)
|
||||||
|
If oFromItem.CoreEquals(oToItem) Then
|
||||||
|
hshSyncItems.Remove(oFromItem.Name)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
If bToRemote Then
|
||||||
|
DoTagAddUpdateSync(hshSyncItems, mgrSQLite.Database.Remote)
|
||||||
|
Else
|
||||||
|
DoTagAddUpdateSync(hshSyncItems, mgrSQLite.Database.Local)
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Delete Sync
|
||||||
|
If bToRemote Then
|
||||||
|
hshCompareFrom = ReadTags(mgrSQLite.Database.Local)
|
||||||
|
hshCompareTo = ReadTags(mgrSQLite.Database.Remote)
|
||||||
|
Else
|
||||||
|
hshCompareFrom = ReadTags(mgrSQLite.Database.Remote)
|
||||||
|
hshCompareTo = ReadTags(mgrSQLite.Database.Local)
|
||||||
|
End If
|
||||||
|
|
||||||
|
hshDeleteItems = hshCompareTo.Clone
|
||||||
|
|
||||||
|
For Each oToItem In hshCompareTo.Values
|
||||||
|
If hshCompareFrom.Contains(oToItem.Name) Then
|
||||||
|
oFromItem = DirectCast(hshCompareFrom(oToItem.Name), clsTag)
|
||||||
|
If oToItem.MinimalEquals(oFromItem) Then
|
||||||
|
hshDeleteItems.Remove(oToItem.Name)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
If bToRemote Then
|
||||||
|
DoTagDeleteSync(hshDeleteItems, mgrSQLite.Database.Remote)
|
||||||
|
Else
|
||||||
|
DoTagDeleteSync(hshDeleteItems, mgrSQLite.Database.Local)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return hshDeleteItems.Count + hshSyncItems.Count
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -1,6 +1,24 @@
|
|||||||
Imports System.IO
|
Public Class mgrVariables
|
||||||
|
|
||||||
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)
|
Public Shared Sub DoPathUpdate(ByVal sOld As String, ByVal sNew As String)
|
||||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||||
@@ -17,26 +35,22 @@ Public Class mgrVariables
|
|||||||
Public Shared Sub DoVariableAdd(ByVal oCustomVariable As clsPathVariable)
|
Public Shared Sub DoVariableAdd(ByVal oCustomVariable As clsPathVariable)
|
||||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||||
Dim sSQL As String
|
Dim sSQL As String
|
||||||
Dim hshParams As New Hashtable
|
Dim hshParams As Hashtable
|
||||||
|
|
||||||
sSQL = "INSERT INTO variables VALUES (@ID, @Name, @Path)"
|
sSQL = "INSERT INTO variables VALUES (@ID, @Name, @Path)"
|
||||||
hshParams.Add("ID", oCustomVariable.ID)
|
hshParams = SetCoreParameters(oCustomVariable)
|
||||||
hshParams.Add("Name", oCustomVariable.Name)
|
|
||||||
hshParams.Add("Path", oCustomVariable.Path)
|
|
||||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Shared Sub DoVariableUpdate(ByVal oCustomVariable As clsPathVariable)
|
Public Shared Sub DoVariableUpdate(ByVal oCustomVariable As clsPathVariable)
|
||||||
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
Dim oDatabase As New mgrSQLite(mgrSQLite.Database.Local)
|
||||||
Dim sSQL As String
|
Dim sSQL As String
|
||||||
Dim hshParams As New Hashtable
|
Dim hshParams As Hashtable
|
||||||
|
|
||||||
sSQL = "UPDATE variables SET Name=@Name, Path = @Path "
|
sSQL = "UPDATE variables SET Name=@Name, Path = @Path "
|
||||||
sSQL &= "WHERE VariableID = @ID"
|
sSQL &= "WHERE VariableID = @ID"
|
||||||
|
|
||||||
hshParams.Add("Name", oCustomVariable.Name)
|
hshParams = SetCoreParameters(oCustomVariable)
|
||||||
hshParams.Add("Path", oCustomVariable.Path)
|
|
||||||
hshParams.Add("ID", oCustomVariable.ID)
|
|
||||||
|
|
||||||
oDatabase.RunParamQuery(sSQL, hshParams)
|
oDatabase.RunParamQuery(sSQL, hshParams)
|
||||||
|
|
||||||
@@ -71,10 +85,7 @@ Public Class mgrVariables
|
|||||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||||
|
|
||||||
For Each dr As DataRow In oData.Tables(0).Rows
|
For Each dr As DataRow In oData.Tables(0).Rows
|
||||||
oCustomVariable = New clsPathVariable
|
oCustomVariable = MapToObject(dr)
|
||||||
oCustomVariable.ID = CStr(dr(0))
|
|
||||||
oCustomVariable.Name = CStr(dr(1))
|
|
||||||
oCustomVariable.Path = CStr(dr(2))
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Return oCustomVariable
|
Return oCustomVariable
|
||||||
@@ -95,10 +106,7 @@ Public Class mgrVariables
|
|||||||
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
oData = oDatabase.ReadParamData(sSQL, hshParams)
|
||||||
|
|
||||||
For Each dr As DataRow In oData.Tables(0).Rows
|
For Each dr As DataRow In oData.Tables(0).Rows
|
||||||
oCustomVariable = New clsPathVariable
|
oCustomVariable = MapToObject(dr)
|
||||||
oCustomVariable.ID = CStr(dr(0))
|
|
||||||
oCustomVariable.Name = CStr(dr(1))
|
|
||||||
oCustomVariable.Path = CStr(dr(2))
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Return oCustomVariable
|
Return oCustomVariable
|
||||||
@@ -140,13 +148,35 @@ Public Class mgrVariables
|
|||||||
oData = oDatabase.ReadParamData(sSQL, New Hashtable)
|
oData = oDatabase.ReadParamData(sSQL, New Hashtable)
|
||||||
|
|
||||||
For Each dr As DataRow In oData.Tables(0).Rows
|
For Each dr As DataRow In oData.Tables(0).Rows
|
||||||
oCustomVariable = New clsPathVariable
|
oCustomVariable = MapToObject(dr)
|
||||||
oCustomVariable.ID = CStr(dr(0))
|
|
||||||
oCustomVariable.Name = CStr(dr(1))
|
|
||||||
oCustomVariable.Path = CStr(dr(2))
|
|
||||||
hshList.Add(oCustomVariable.Name, oCustomVariable)
|
hshList.Add(oCustomVariable.Name, oCustomVariable)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Return hshList
|
Return hshList
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function GetReservedVariables() As List(Of String)
|
||||||
|
Dim oList As New List(Of String)
|
||||||
|
|
||||||
|
oList.Add("APPDATA")
|
||||||
|
oList.Add("LOCALAPPDATA")
|
||||||
|
oList.Add("USERDOCUMENTS")
|
||||||
|
oList.Add("COMMONDOCUMENTS")
|
||||||
|
oList.Add("USERPROFILE")
|
||||||
|
|
||||||
|
Return oList
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Shared Function CheckForReservedVariables(ByVal sPath As String) As Boolean
|
||||||
|
Dim s As String
|
||||||
|
|
||||||
|
For Each s In GetReservedVariables()
|
||||||
|
s = "%" & s & "%"
|
||||||
|
If sPath.Contains(s) Then
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
+91
-72
@@ -1,99 +1,118 @@
|
|||||||
Imports System.Xml
|
Imports GBM.My.Resources
|
||||||
|
Imports System.Xml.Serialization
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports System.Text
|
Imports System.Net
|
||||||
|
|
||||||
|
|
||||||
Public Class mgrXML
|
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 xFileReader As XmlTextReader
|
Dim oList As List(Of Game)
|
||||||
Dim hshList As New Hashtable
|
|
||||||
Dim hshDupeList As New Hashtable
|
Dim hshDupeList As New Hashtable
|
||||||
|
Dim oExportData As New ExportData
|
||||||
Dim oGame As clsGame
|
Dim oGame As clsGame
|
||||||
Dim oDupeGame As clsGame
|
|
||||||
|
|
||||||
'If the file doesn't exist return an empty list
|
'If the file doesn't exist return an empty list
|
||||||
If Not File.Exists(sLocation) And Not bWebRead Then
|
If Not File.Exists(sLocation) And Not bWebRead Then
|
||||||
Return hshList
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Try
|
If Not ImportandDeserialize(sLocation, oExportData, bWebRead) Then
|
||||||
xFileReader = New XmlTextReader(sLocation)
|
Return False
|
||||||
xFileReader.WhitespaceHandling = WhitespaceHandling.None
|
End If
|
||||||
|
|
||||||
While (xFileReader.Read())
|
oList = oExportData.Configurations
|
||||||
If xFileReader.Name = "app" Then
|
oExportInfo = oExportData
|
||||||
|
|
||||||
|
For Each g As Game In oList
|
||||||
oGame = New clsGame
|
oGame = New clsGame
|
||||||
oGame.Name = xFileReader.GetAttribute("name")
|
oGame.ID = g.ID
|
||||||
xFileReader.Read()
|
oGame.Name = g.Name
|
||||||
oGame.ProcessName = xFileReader.ReadElementString("process")
|
oGame.ProcessName = g.ProcessName
|
||||||
oGame.AbsolutePath = xFileReader.ReadElementString("absolutepath")
|
oGame.AbsolutePath = g.AbsolutePath
|
||||||
oGame.Path = xFileReader.ReadElementString("savelocation")
|
oGame.Path = g.Path
|
||||||
oGame.FolderSave = xFileReader.ReadElementString("foldersave")
|
oGame.FolderSave = g.FolderSave
|
||||||
oGame.FileType = xFileReader.ReadElementString("filetype")
|
oGame.AppendTimeStamp = g.AppendTimeStamp
|
||||||
oGame.AppendTimeStamp = xFileReader.ReadElementString("appendtimestamp")
|
oGame.BackupLimit = g.BackupLimit
|
||||||
oGame.ExcludeList = xFileReader.ReadElementString("excludelist")
|
oGame.FileType = g.FileType
|
||||||
|
oGame.ExcludeList = g.ExcludeList
|
||||||
|
oGame.MonitorOnly = g.MonitorOnly
|
||||||
|
oGame.Parameter = g.Parameter
|
||||||
|
oGame.Comments = g.Comments
|
||||||
|
oGame.IsRegEx = g.IsRegEx
|
||||||
|
For Each t As Tag In g.Tags
|
||||||
|
oGame.ImportTags.Add(t)
|
||||||
|
Next
|
||||||
|
|
||||||
If hshList.Contains(oGame.ProcessName) Or hshDupeList.Contains(oGame.ProcessName) Then
|
'This should be wrapped just in case we get some bad data
|
||||||
oDupeGame = DirectCast(hshList.Item(oGame.ProcessName), clsGame)
|
Try
|
||||||
If Not hshDupeList.Contains(oGame.ProcessName) Then
|
hshList.Add(oGame.ID, oGame)
|
||||||
hshDupeList.Add(oGame.ProcessName, oDupeGame)
|
Catch e As Exception
|
||||||
hshList.Remove(oDupeGame.ProcessName)
|
'Do Nothing
|
||||||
oDupeGame.Duplicate = True
|
|
||||||
oDupeGame.ProcessName = oDupeGame.ProcessName & ":" & oDupeGame.Name
|
|
||||||
hshList.Add(oDupeGame.ProcessName, oDupeGame)
|
|
||||||
End If
|
|
||||||
oGame.ProcessName = oGame.ProcessName & ":" & oGame.Name
|
|
||||||
oGame.Duplicate = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
hshList.Add(oGame.ProcessName, oGame)
|
|
||||||
End If
|
|
||||||
End While
|
|
||||||
|
|
||||||
xFileReader.Close()
|
|
||||||
|
|
||||||
'We need to trigger a manual garbage collection here to prevent issues with the reader freezing up with multiple uses.
|
|
||||||
'There's no way to properly dispose a xml text reader in .NET 4, that's only fixed in 4.5+.
|
|
||||||
GC.Collect()
|
|
||||||
|
|
||||||
Catch ex As Exception
|
|
||||||
MsgBox("An error occured reading the monitor list import file." & vbCrLf & ex.Message, MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
|
||||||
End Try
|
End Try
|
||||||
|
Next
|
||||||
|
|
||||||
Return hshList
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function ExportMonitorList(ByVal hshList As Hashtable, ByVal sLocation As String) As Boolean
|
Private Shared Function ReadImportData(ByVal sLocation As String, ByVal bWebRead As Boolean)
|
||||||
Dim xFileWriter As XmlTextWriter
|
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
|
||||||
|
|
||||||
Try
|
Try
|
||||||
xFileWriter = New XmlTextWriter(sLocation, System.Text.Encoding.Unicode)
|
oReader = ReadImportData(sLocation, bWebRead)
|
||||||
xFileWriter.Formatting = Formatting.Indented
|
oSerializer = New XmlSerializer(GetType(ExportData), New XmlRootAttribute("gbm"))
|
||||||
xFileWriter.WriteStartDocument()
|
oExportData = oSerializer.Deserialize(oReader)
|
||||||
xFileWriter.WriteComment("GBM Export: " & Date.Now)
|
oReader.Close()
|
||||||
xFileWriter.WriteComment("Entries: " & hshList.Count)
|
|
||||||
xFileWriter.WriteStartElement("aMon")
|
'Compatability Mode
|
||||||
For Each o As clsGame In hshList.Values
|
If oExportData.AppVer = 0 Then
|
||||||
xFileWriter.WriteStartElement("app")
|
oReader = ReadImportData(sLocation, bWebRead)
|
||||||
xFileWriter.WriteAttributeString("name", o.Name)
|
oSerializer = New XmlSerializer(GetType(List(Of Game)), New XmlRootAttribute("gbm"))
|
||||||
xFileWriter.WriteElementString("process", o.TrueProcess)
|
oExportData.Configurations = oSerializer.Deserialize(oReader)
|
||||||
xFileWriter.WriteElementString("absolutepath", o.AbsolutePath)
|
oReader.Close()
|
||||||
xFileWriter.WriteElementString("savelocation", o.TruePath)
|
End If
|
||||||
xFileWriter.WriteElementString("foldersave", o.FolderSave)
|
|
||||||
xFileWriter.WriteElementString("filetype", o.FileType)
|
|
||||||
xFileWriter.WriteElementString("appendtimestamp", o.AppendTimeStamp)
|
|
||||||
xFileWriter.WriteElementString("excludelist", o.ExcludeList)
|
|
||||||
xFileWriter.WriteEndElement()
|
|
||||||
Next
|
|
||||||
xFileWriter.WriteEndElement()
|
|
||||||
xFileWriter.WriteEndDocument()
|
|
||||||
xFileWriter.Flush()
|
|
||||||
xFileWriter.Close()
|
|
||||||
Return True
|
Return True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox("An error occured exporting the monitor list. " & ex.Message, MsgBoxStyle.Exclamation, "Game Backup Monitor")
|
mgrCommon.ShowMessage(mgrXML_ErrorImportFailure, ex.Message, MsgBoxStyle.Exclamation)
|
||||||
|
Return False
|
||||||
|
End Try
|
||||||
|
|
||||||
|
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
|
||||||
|
oExportData = New ExportData(mgrCommon.DateToUnix(Now), oList.Count, mgrCommon.AppVersion, oList)
|
||||||
|
oSerializer = New XmlSerializer(oExportData.GetType())
|
||||||
|
oWriter = New StreamWriter(sLocation)
|
||||||
|
oSerializer.Serialize(oWriter.BaseStream, oExportData)
|
||||||
|
oWriter.Flush()
|
||||||
|
oWriter.Close()
|
||||||
|
Return True
|
||||||
|
Catch ex As Exception
|
||||||
|
mgrCommon.ShowMessage(mgrXML_ErrorExportFailure, ex.Message, MsgBoxStyle.Exclamation)
|
||||||
Return False
|
Return False
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Generated
+1
-1
@@ -24,7 +24,7 @@ Namespace My
|
|||||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||||
Public Sub New()
|
Public Sub New()
|
||||||
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
|
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
|
||||||
Me.IsSingleInstance = false
|
Me.IsSingleInstance = true
|
||||||
Me.EnableVisualStyles = true
|
Me.EnableVisualStyles = true
|
||||||
Me.SaveMySettingsOnExit = false
|
Me.SaveMySettingsOnExit = false
|
||||||
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
|
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">
|
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||||
<MySubMain>true</MySubMain>
|
<MySubMain>true</MySubMain>
|
||||||
<MainForm>frmMain</MainForm>
|
<MainForm>frmMain</MainForm>
|
||||||
<SingleInstance>false</SingleInstance>
|
<SingleInstance>true</SingleInstance>
|
||||||
<ShutdownMode>0</ShutdownMode>
|
<ShutdownMode>0</ShutdownMode>
|
||||||
<EnableVisualStyles>true</EnableVisualStyles>
|
<EnableVisualStyles>true</EnableVisualStyles>
|
||||||
<AuthenticationMode>0</AuthenticationMode>
|
<AuthenticationMode>0</AuthenticationMode>
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
Imports System.Resources
|
||||||
|
|
||||||
Imports System
|
Imports System
|
||||||
Imports System.Reflection
|
Imports System.Reflection
|
||||||
Imports System.Runtime.InteropServices
|
Imports System.Runtime.InteropServices
|
||||||
@@ -12,7 +14,7 @@ Imports System.Runtime.InteropServices
|
|||||||
<Assembly: AssemblyDescription("Game Backup Monitor")>
|
<Assembly: AssemblyDescription("Game Backup Monitor")>
|
||||||
<Assembly: AssemblyCompany("Michael J. Seiferling")>
|
<Assembly: AssemblyCompany("Michael J. Seiferling")>
|
||||||
<Assembly: AssemblyProduct("Game Backup Monitor")>
|
<Assembly: AssemblyProduct("Game Backup Monitor")>
|
||||||
<Assembly: AssemblyCopyright("Copyright © 2015 Michael J. Seiferling")>
|
<Assembly: AssemblyCopyright("Copyright © 2018 Michael J. Seiferling")>
|
||||||
<Assembly: AssemblyTrademark("")>
|
<Assembly: AssemblyTrademark("")>
|
||||||
|
|
||||||
<Assembly: ComVisible(False)>
|
<Assembly: ComVisible(False)>
|
||||||
@@ -31,5 +33,7 @@ Imports System.Runtime.InteropServices
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("0.94.*")>
|
<Assembly: AssemblyVersion("1.1.5.*")>
|
||||||
<Assembly: AssemblyFileVersion("0.94.0.0")>
|
<Assembly: AssemblyFileVersion("1.1.5.0")>
|
||||||
|
|
||||||
|
<Assembly: NeutralResourcesLanguageAttribute("en")>
|
||||||
Generated
+6379
-21
File diff suppressed because it is too large
Load Diff
+2126
-8
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user