mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Compare commits
583 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd9b07ca0a | ||
|
|
eb435bc6b0 | ||
|
|
c9ca613348 | ||
|
|
771855fd07 | ||
|
|
e6967bbc07 | ||
|
|
095d8ca719 | ||
|
|
9c089bed37 | ||
|
|
7e94c6f1c9 | ||
|
|
df44296ee0 | ||
|
|
da42b6f3b2 | ||
|
|
264756d986 | ||
|
|
49d9887d03 | ||
|
|
39f22dec4c | ||
|
|
69befbc97b | ||
|
|
820ed1c457 | ||
|
|
c0c6a6dc4b | ||
|
|
a410709f92 | ||
|
|
3b20e85ff0 | ||
|
|
5d8e7a9fa8 | ||
|
|
63ad0760cd | ||
|
|
2ea29ef8cb | ||
|
|
f34baa389c | ||
|
|
41db2f7fe7 | ||
|
|
2db04225a7 | ||
|
|
b6004117e6 | ||
|
|
fd73b28061 | ||
|
|
da39c03a6f | ||
|
|
ba721c9db6 | ||
|
|
9b707cf93d | ||
|
|
a73b42409f | ||
|
|
e743b2c699 | ||
|
|
107c44df88 | ||
|
|
5e19c420e7 | ||
|
|
2f55324708 | ||
|
|
6cc6c34c4b | ||
|
|
3d64fbef49 | ||
|
|
539a0198f3 | ||
|
|
9beebac7fc | ||
|
|
50567fd967 | ||
|
|
3ee004ce4e | ||
|
|
a58fd7559c | ||
|
|
73d738887a | ||
|
|
e96199dc37 | ||
|
|
f5cde10d62 | ||
|
|
1d5df08e78 | ||
|
|
869c2726bb | ||
|
|
2e663df42a | ||
|
|
1c33494547 | ||
|
|
4acaefe9c3 | ||
|
|
8c3f4c06df | ||
|
|
ed589f4b51 | ||
|
|
0a82828d2e | ||
|
|
13c1d049fc | ||
|
|
8c61e95a5b | ||
|
|
a6fa6e19d0 | ||
|
|
8273bdf70f | ||
|
|
5267de8b87 | ||
|
|
62feba1691 | ||
|
|
6036a792e5 | ||
|
|
3cb8784996 | ||
|
|
81d150f80a | ||
|
|
9ebce266ec | ||
|
|
42bcf8db31 | ||
|
|
ff2bbcf650 | ||
|
|
1341db0812 | ||
|
|
c16a4134c7 | ||
|
|
771047ddd7 | ||
|
|
718d67f20c | ||
|
|
d18a510310 | ||
|
|
3a3da1c6f1 | ||
|
|
ba55958327 | ||
|
|
2a67f493f6 | ||
|
|
00647e4963 | ||
|
|
06892deedf | ||
|
|
d12ea40845 | ||
|
|
3f21151331 | ||
|
|
c91f5e5cba | ||
|
|
9e90d17d80 | ||
|
|
2e67bbf6a1 | ||
|
|
ceec9749b9 | ||
|
|
f674b5bfeb | ||
|
|
b3e541c627 | ||
|
|
3389a152be | ||
|
|
662fcfa318 | ||
|
|
06baec9c55 | ||
|
|
270699c26b | ||
|
|
bc699a04ec | ||
|
|
3639e75f5b | ||
|
|
eef14ebc29 | ||
|
|
2568d2b750 | ||
|
|
58a57d7a7d | ||
|
|
8ddb71758e | ||
|
|
54f19eaeb6 | ||
|
|
960096273b | ||
|
|
b360902bd9 | ||
|
|
8006bb49ca | ||
|
|
ac65468233 | ||
|
|
8992cb29da | ||
|
|
b5f5f43b4c | ||
|
|
8a814d9016 | ||
|
|
4ff4a365e1 | ||
|
|
905b6bb92a | ||
|
|
88d06c8ef2 | ||
|
|
102987dac7 | ||
|
|
54cf76444e | ||
|
|
f595c1d446 | ||
|
|
9cf06c44e8 | ||
|
|
5d63ec6d2a | ||
|
|
0544b61138 | ||
|
|
ceb6f70b4d | ||
|
|
f3075f4c51 | ||
|
|
7b850892ae | ||
|
|
6a3ca9c9de | ||
|
|
d69d948963 | ||
|
|
aa6061d7b6 | ||
|
|
ba667475bf | ||
|
|
5737d78f78 | ||
|
|
079fe000bb | ||
|
|
29865c69ab | ||
|
|
f2e9cce248 | ||
|
|
6a16656f03 | ||
|
|
7f4d3605c0 | ||
|
|
d97ad31cc3 | ||
|
|
a49ebf17bf | ||
|
|
903a9dd5cc | ||
|
|
5d8db1ade6 | ||
|
|
423a89fdaa | ||
|
|
85d78fd4ae | ||
|
|
725269e914 | ||
|
|
9d3beaffbb | ||
|
|
7f36b7926b | ||
|
|
f4bb268e27 | ||
|
|
e1329348d1 | ||
|
|
4f06a48d16 | ||
|
|
1dea64d2eb | ||
|
|
375e737f02 | ||
|
|
1032801f12 | ||
|
|
1002b8d32f | ||
|
|
36a72da71f | ||
|
|
a2b3a815e7 | ||
|
|
7820707e46 | ||
|
|
c3f960cfe8 | ||
|
|
965f43a4c3 | ||
|
|
317175bb03 | ||
|
|
1608d48495 | ||
|
|
08ddee1bda | ||
|
|
72756a2bb8 | ||
|
|
38011a3546 | ||
|
|
d72dbdace0 | ||
|
|
5c887b648f | ||
|
|
4de7167352 | ||
|
|
54825b353f | ||
|
|
b23fb58977 | ||
|
|
7b831c6ab8 | ||
|
|
167344bd14 | ||
|
|
14f31ba461 | ||
|
|
13a82799b2 | ||
|
|
66fe33683e | ||
|
|
8030c9a63d | ||
|
|
60630a5cab | ||
|
|
d9ba8f81e2 | ||
|
|
7fe56402fd | ||
|
|
634bce25cd | ||
|
|
437ff003b0 | ||
|
|
9f09798da5 | ||
|
|
5da85b6a88 | ||
|
|
bb42a31486 | ||
|
|
7e5e1e6342 | ||
|
|
6f43bbf96e | ||
|
|
8ea514643d | ||
|
|
f7e12c6e92 | ||
|
|
30f2cc9e28 | ||
|
|
45b9dddb4b | ||
|
|
650dc487db | ||
|
|
5bc443707f | ||
|
|
4510219300 | ||
|
|
cd8601c7ff | ||
|
|
73c27069ee | ||
|
|
7dcad234f5 | ||
|
|
66281639b4 | ||
|
|
1af6fde986 | ||
|
|
83ec9e50b8 | ||
|
|
6d21c85d98 | ||
|
|
0ff00e59ba | ||
|
|
850a342e38 | ||
|
|
1caba06aca | ||
|
|
a115196cee | ||
|
|
5f451de94e | ||
|
|
a4921fc564 | ||
|
|
7d1d03e8cd | ||
|
|
92c18a45ba | ||
|
|
a61fb5c6d6 | ||
|
|
e1deaf73ea | ||
|
|
7d6d602477 | ||
|
|
b0439adee4 | ||
|
|
0a7c88a853 | ||
|
|
b735e6d3e4 | ||
|
|
960ecba12a | ||
|
|
3988820db9 | ||
|
|
22ea7055c9 | ||
|
|
edba3fbea0 | ||
|
|
51e4bc7eae | ||
|
|
3e680235ee | ||
|
|
d2459de700 | ||
|
|
f9f265b409 | ||
|
|
c218f0362e | ||
|
|
fb68ed099e | ||
|
|
01133b3d9f | ||
|
|
52461b758b | ||
|
|
3bc5ceede4 | ||
|
|
a3c9c667b4 | ||
|
|
73f71050a0 | ||
|
|
94d901ec4c | ||
|
|
9e67f36615 | ||
|
|
bf6f166d8f | ||
|
|
1de5ab43d6 | ||
|
|
39dd75dbde | ||
|
|
b509f75c17 | ||
|
|
877649b80a | ||
|
|
b5846f2286 | ||
|
|
80dd98e7fb | ||
|
|
7c3a349bd6 | ||
|
|
84d3f7d30b | ||
|
|
c29c5015d5 | ||
|
|
1f776fb9bf | ||
|
|
f90eb94484 | ||
|
|
80f35cea71 | ||
|
|
a12978967a | ||
|
|
8cce811ce5 | ||
|
|
adb45cec98 | ||
|
|
c09ea26a3c | ||
|
|
d71bf494df | ||
|
|
e82a9c5228 | ||
|
|
a7d976a0a7 | ||
|
|
d09727a9cd | ||
|
|
30c3b0111d | ||
|
|
4ea588d897 | ||
|
|
f7dfe0ecd0 | ||
|
|
323b3fb6de | ||
|
|
e6f1c947be | ||
|
|
a01663d2ca | ||
|
|
936f2e6655 | ||
|
|
67a6d60c62 | ||
|
|
85e6797c4f | ||
|
|
22322bc3ba | ||
|
|
b4a3b14334 | ||
|
|
a3ac44af55 | ||
|
|
d773f78ff5 | ||
|
|
76ee48269b | ||
|
|
35f442bad6 | ||
|
|
43c001b4ba | ||
|
|
182b097902 | ||
|
|
f841f4b41c | ||
|
|
67d07e5f0f | ||
|
|
6d15e3649e | ||
|
|
4fab4d91d5 | ||
|
|
61b70047c6 | ||
|
|
8c3cdc39fb | ||
|
|
a871074845 | ||
|
|
155bc07466 | ||
|
|
d32699008c | ||
|
|
28a8a3debd | ||
|
|
da50517113 | ||
|
|
3079b45ab1 | ||
|
|
62edfd2c50 | ||
|
|
becf48f347 | ||
|
|
568170d525 | ||
|
|
d853303bc6 | ||
|
|
5462242c39 | ||
|
|
cfa935df11 | ||
|
|
818708dfb4 | ||
|
|
3d26a1a028 | ||
|
|
5dcfb272d9 | ||
|
|
c634b0ccbc | ||
|
|
c957be8774 | ||
|
|
513356506b | ||
|
|
f7754d2371 | ||
|
|
aa9a642ade | ||
|
|
7868b7e76b | ||
|
|
01d62c410d | ||
|
|
a1b4cadc1d | ||
|
|
9a283e5da7 | ||
|
|
7a7c6aebd9 | ||
|
|
4b03e542d6 | ||
|
|
66d3a83f1c | ||
|
|
cbda4f3b96 | ||
|
|
1e139fa5d9 | ||
|
|
816b5baefb | ||
|
|
ba3fb6cab2 | ||
|
|
a19a027d5a | ||
|
|
ab9f61dbd8 | ||
|
|
b76019f516 | ||
|
|
9d97c86704 | ||
|
|
8bbb717ac1 | ||
|
|
43f1c1fdce | ||
|
|
ec6cb2218f | ||
|
|
b382c8556f | ||
|
|
427464bca5 | ||
|
|
5629acba85 | ||
|
|
55caaefe88 | ||
|
|
1ce99d89b3 | ||
|
|
ad64e7f7f3 | ||
|
|
8d857867f2 | ||
|
|
8211a730d2 | ||
|
|
4d4fd79ce1 | ||
|
|
c155ac234e | ||
|
|
0d71be34f2 | ||
|
|
b5295dc98d | ||
|
|
864bfd912e | ||
|
|
a20606888e | ||
|
|
80791ff642 | ||
|
|
00db5c4dc7 | ||
|
|
701933cfb5 | ||
|
|
13a19fc9eb | ||
|
|
be8ed0f263 | ||
|
|
435e5eb9a8 | ||
|
|
b539c34cf6 | ||
|
|
2cd27114d6 | ||
|
|
eff877169d | ||
|
|
4474b84dac | ||
|
|
175d955ef8 | ||
|
|
d23fd3fc1f | ||
|
|
82d56f13fc | ||
|
|
68cee49830 | ||
|
|
5892c0cda8 | ||
|
|
59e09e3762 | ||
|
|
79dad7e319 | ||
|
|
4455f9c71d | ||
|
|
ed8e4e0303 | ||
|
|
56993c0785 | ||
|
|
ec830a3fc4 | ||
|
|
cb224a352a | ||
|
|
99b981b988 | ||
|
|
e88cf2be5e | ||
|
|
91262db838 | ||
|
|
e339fb1390 | ||
|
|
4644741849 | ||
|
|
f249505d84 | ||
|
|
6792737f25 | ||
|
|
87b0f317d1 | ||
|
|
2778f8d1c3 | ||
|
|
b67a68b100 | ||
|
|
72e2d9c2ab | ||
|
|
2af9e02029 | ||
|
|
7b6d01a965 | ||
|
|
d9cfda43b6 | ||
|
|
d15aa639f5 | ||
|
|
8a70a3e64b | ||
|
|
1a26a6a145 | ||
|
|
5f3449876e | ||
|
|
d757443e38 | ||
|
|
f8fe2c9760 | ||
|
|
a24728eebf | ||
|
|
06bdb264bc | ||
|
|
7a2c18804b | ||
|
|
ac797aaa8e | ||
|
|
c530ea300f | ||
|
|
245282bd06 | ||
|
|
ab1930e972 | ||
|
|
13ba0b2802 | ||
|
|
ee94b65fb0 | ||
|
|
cf16606348 | ||
|
|
fb826c7fac | ||
|
|
5b57f46d99 | ||
|
|
d5822094c1 | ||
|
|
87f7fbdf45 | ||
|
|
0bed923a4d | ||
|
|
69ab11eb5f | ||
|
|
217a03b191 | ||
|
|
cab2163d01 | ||
|
|
2346aaa1c3 | ||
|
|
7e45928297 | ||
|
|
76543a440b | ||
|
|
5cb98e0543 | ||
|
|
0436a6490e | ||
|
|
b3ee2633a8 | ||
|
|
036b90370f | ||
|
|
04dbfb2bf4 | ||
|
|
bfb137c442 | ||
|
|
5c2059c16f | ||
|
|
52694a1c4c | ||
|
|
961eb0b92c | ||
|
|
cbf74e5432 | ||
|
|
760b9b5434 | ||
|
|
d344e5ad16 | ||
|
|
3247f9a487 | ||
|
|
33a140ed60 | ||
|
|
0bc3cdb111 | ||
|
|
127e7cce2e | ||
|
|
db428989b1 | ||
|
|
4c33adfee7 | ||
|
|
3876099d56 | ||
|
|
114db6c90d | ||
|
|
53c5da7e0e | ||
|
|
888e55aaee | ||
|
|
2234770dac | ||
|
|
17a5853041 | ||
|
|
d80f3d757e | ||
|
|
85a5d027dc | ||
|
|
006c76b11d | ||
|
|
61a76908ea | ||
|
|
b729cab9c9 | ||
|
|
654e3cae1f | ||
|
|
bcc681f623 | ||
|
|
77716fc058 | ||
|
|
103c34853e | ||
|
|
3ec52987eb | ||
|
|
d3130f91d1 | ||
|
|
aae96c112a | ||
|
|
635ae405bd | ||
|
|
66c315f629 | ||
|
|
89c7baf7fa | ||
|
|
90eedc689e | ||
|
|
b262f00491 | ||
|
|
d0d81e382d | ||
|
|
5615dc18a6 | ||
|
|
ce08728652 | ||
|
|
fbc613efe5 | ||
|
|
d3560eb893 | ||
|
|
e53be11383 | ||
|
|
17c25d6481 | ||
|
|
e07fbe913f | ||
|
|
c91f406346 | ||
|
|
46afd47ba0 | ||
|
|
5f1e9ae0b7 | ||
|
|
62c9d6f474 | ||
|
|
935df3d4fa | ||
|
|
ec850f6c15 | ||
|
|
2b1732d061 | ||
|
|
cec787fd63 | ||
|
|
97e43d9238 | ||
|
|
1ec28e0bfd | ||
|
|
22e9c36365 | ||
|
|
757dd4c8ca | ||
|
|
3de4153c1a | ||
|
|
cfbdd94ed3 | ||
|
|
eab49ef3bd | ||
|
|
5027f534e3 | ||
|
|
85e1402cc0 | ||
|
|
f048b2d04d | ||
|
|
19218f20bb | ||
|
|
3f2ffea1f4 | ||
|
|
6fa8923f90 | ||
|
|
9a63b8c316 | ||
|
|
d3311497f2 | ||
|
|
79bdc4f734 | ||
|
|
b5b9388d58 | ||
|
|
d168516859 | ||
|
|
c219d34fa3 | ||
|
|
99f3638fbf | ||
|
|
944906a594 | ||
|
|
4f9e6ebbd4 | ||
|
|
fae284ca86 | ||
|
|
4a1ac9eded | ||
|
|
58757ff85f | ||
|
|
31b9b21f61 | ||
|
|
49273a95bc | ||
|
|
50489ddcf1 | ||
|
|
e0a46b7882 | ||
|
|
b7eac745fa | ||
|
|
9cff221acb | ||
|
|
3592fbc418 | ||
|
|
605cb4048b | ||
|
|
9cb33c4fde | ||
|
|
1cbcffdd34 | ||
|
|
19f2d6c6aa | ||
|
|
e0b8d8fc9d | ||
|
|
ee3f0bfa3a | ||
|
|
e54097cea6 | ||
|
|
0db6ea0c46 | ||
|
|
55968e5e85 | ||
|
|
83b7f111b2 | ||
|
|
af8b6c9f07 | ||
|
|
48ec5cdb01 | ||
|
|
7923991fbf | ||
|
|
e11b25f22b | ||
|
|
e1274cb69a | ||
|
|
6ea439e08b | ||
|
|
e06d914d0a | ||
|
|
1a1e2452f3 | ||
|
|
611d352103 | ||
|
|
bfe68ad3eb | ||
|
|
6f1446fec7 | ||
|
|
3c449f9f3d | ||
|
|
25ef36d8a3 | ||
|
|
101ec68f76 | ||
|
|
a798785083 | ||
|
|
07ea389464 | ||
|
|
6509de486e | ||
|
|
2f60379f3c | ||
|
|
5edbe78672 | ||
|
|
94aa5357ed | ||
|
|
0477af479d | ||
|
|
2f296d691c | ||
|
|
5b0ba26ecd | ||
|
|
844b2e9575 | ||
|
|
69b4633e9e | ||
|
|
00f14684bb | ||
|
|
2eb2dc56bd | ||
|
|
661c930d51 | ||
|
|
9cf6086518 | ||
|
|
7353852429 | ||
|
|
2a112d1cc3 | ||
|
|
526412b40d | ||
|
|
3def5f2a37 | ||
|
|
43d6a64576 | ||
|
|
f24b1b5cec | ||
|
|
e7abe6b4cf | ||
|
|
18be51ec88 | ||
|
|
32ae93b760 | ||
|
|
9520fbf019 | ||
|
|
7d2a4f05f1 | ||
|
|
4ec984d22e | ||
|
|
0eedd9f6ae | ||
|
|
93f77e33c2 | ||
|
|
ea203ed539 | ||
|
|
6d5d6f0247 | ||
|
|
57c0236c66 | ||
|
|
e1623a8157 | ||
|
|
f06c4f7e6b | ||
|
|
be3c8de3a2 | ||
|
|
f8fb72f455 | ||
|
|
1700f1a940 | ||
|
|
b32617b114 | ||
|
|
7a25e3cc2e | ||
|
|
29b1b90ae6 | ||
|
|
9852293d98 | ||
|
|
49c758a8a6 | ||
|
|
89fee5b579 | ||
|
|
ccebf41645 | ||
|
|
4d1003cfec | ||
|
|
bd6c07e9d0 | ||
|
|
45b8e5c10f | ||
|
|
176bc52f62 | ||
|
|
98293c99aa | ||
|
|
9878acff9a | ||
|
|
e874292016 | ||
|
|
280c6678cb | ||
|
|
dc7460cbaa | ||
|
|
4bd4a604e7 | ||
|
|
16e2c927bb | ||
|
|
687fe28820 | ||
|
|
ee70bea036 | ||
|
|
c917193575 | ||
|
|
b1d40f2c74 | ||
|
|
a255d24867 | ||
|
|
5e726472bc | ||
|
|
6ab8bb4a58 | ||
|
|
e08c88db5f | ||
|
|
96e6752af3 | ||
|
|
e71bf93052 | ||
|
|
8232f10e14 | ||
|
|
cb13433102 | ||
|
|
3ead76ab77 | ||
|
|
ecf3ecbcf0 | ||
|
|
26afcaeef2 | ||
|
|
0c1d69946d | ||
|
|
5e584cf4c7 | ||
|
|
6301fcc320 | ||
|
|
a1fc6c0a0d | ||
|
|
98460eea2b | ||
|
|
de0142dd37 | ||
|
|
9a0f8881a7 | ||
|
|
7c41abb1b4 | ||
|
|
e3ae10518d | ||
|
|
93eb34b71f | ||
|
|
9ccf91ad74 | ||
|
|
d44254f6b2 | ||
|
|
6afe0c9748 | ||
|
|
201d1b7b42 | ||
|
|
61b3644a03 | ||
|
|
a5ac1284a2 | ||
|
|
090dc8b421 | ||
|
|
e3730b4e1f | ||
|
|
e6ff376e5b | ||
|
|
829475567b | ||
|
|
ef983b90b2 | ||
|
|
122945b575 | ||
|
|
016fcb13f7 | ||
|
|
6ef5c621e8 | ||
|
|
80a9c4de37 | ||
|
|
d6f145ede7 | ||
|
|
5fe4e9e058 |
28
.gitignore
vendored
28
.gitignore
vendored
@@ -1,8 +1,26 @@
|
||||
Installer/bin
|
||||
mRemoteV1/bin
|
||||
mRemoteV1/obj
|
||||
mRemoteV1/publish
|
||||
Release/
|
||||
mRemoteV1/bin/
|
||||
mRemoteV1/obj/
|
||||
mRemoteV1/publish/
|
||||
*.pfx
|
||||
*.suo
|
||||
*.vbproj.user
|
||||
Thumbs.db
|
||||
Thumbs.db
|
||||
[Dd]ebug/
|
||||
_Re[Ss]harper.*
|
||||
*.resharper
|
||||
*.resharper.user
|
||||
*.suo
|
||||
*.cache
|
||||
*~
|
||||
*.swp
|
||||
*.user*
|
||||
*.pidb
|
||||
*.gpState
|
||||
_UpgradeReport_Files/
|
||||
Backup/
|
||||
UpgradeLog.XML
|
||||
*.orig
|
||||
*.sdf
|
||||
*.opensdf
|
||||
*.ipch
|
||||
|
||||
149
BUILD.CMD
Normal file
149
BUILD.CMD
Normal file
@@ -0,0 +1,149 @@
|
||||
@echo off
|
||||
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
set VERSIONTAG=
|
||||
|
||||
set VCVARSALL="%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
|
||||
set DEVENV="devenv.exe"
|
||||
set MAKENSIS="%ProgramFiles(x86)%\NSIS\Unicode\makensis.exe"
|
||||
set RAR="%ProgramFiles%\WinRAR\WinRAR.exe"
|
||||
set SIGNCMD=signtool.exe sign /n "Astrospark Technologies, LLC" /sha1 "1cbd910dbd6e77f26506e7f600736972f700673f" /tr http://timestamp.comodoca.com/rfc3161
|
||||
|
||||
rem Windows Sysinternals Sigcheck from http://technet.microsoft.com/en-us/sysinternals/bb897441
|
||||
set SIGCHECK="%ProgramFiles(x86)%\Sigcheck\sigcheck.exe"
|
||||
|
||||
call %VCVARSALL% x86
|
||||
|
||||
rmdir /s /q "%~dp0\mRemoteV1\bin" > nul 2>&1
|
||||
rmdir /s /q "%~dp0\mRemoteV1\obj" > nul 2>&1
|
||||
|
||||
if exist "%~dp0\mRemoteV1\bin" goto ERROR_RMDIR
|
||||
if exist "%~dp0\mRemoteV1\obj" goto ERROR_RMDIR
|
||||
goto NOERROR_RMDIR
|
||||
|
||||
:ERROR_RMDIR
|
||||
echo.
|
||||
echo Could not clean output directories.
|
||||
echo.
|
||||
echo Build process failed.
|
||||
echo.
|
||||
goto END
|
||||
|
||||
:NOERROR_RMDIR
|
||||
|
||||
echo Building release version...
|
||||
%DEVENV% "%~dp0\mRemoteV1.sln" /build "Release"
|
||||
|
||||
echo Building portable version...
|
||||
%DEVENV% "%~dp0\mRemoteV1.sln" /build "Release Portable"
|
||||
|
||||
echo Signing binaries...
|
||||
%SIGNCMD% ^
|
||||
"%~dp0\mRemoteV1\bin\Release\de\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release\el\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release\en-US\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release\es\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release\es-AR\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release\fr\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release\hu\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release\it\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release\nb-NO\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release\nl\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release\pl\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release\pt\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release\pt-BR\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release\ru\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release\uk\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release\zh-CN\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release\zh-TW\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release\AxInterop.MSTSCLib.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release\AxInterop.WFICALib.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release\Interop.EOLWTSCOM.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release\Interop.MSTSCLib.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release\Interop.ShDocVw.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release\Interop.WFICALib.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release\mRemoteNG.exe" ^
|
||||
"%~dp0\mRemoteV1\bin\Release Portable\de\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release Portable\el\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release Portable\en-US\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release Portable\es\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release Portable\es-AR\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release Portable\fr\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release Portable\hu\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release Portable\it\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release Portable\nb-NO\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release Portable\nl\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release Portable\pl\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release Portable\pt\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release Portable\pt-BR\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release Portable\ru\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release Portable\uk\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release Portable\zh-CN\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release Portable\zh-TW\mRemoteNG.resources.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release Portable\AxInterop.MSTSCLib.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release Portable\AxInterop.WFICALib.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release Portable\Interop.EOLWTSCOM.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release Portable\Interop.MSTSCLib.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release Portable\Interop.ShDocVw.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release Portable\Interop.WFICALib.dll" ^
|
||||
"%~dp0\mRemoteV1\bin\Release Portable\mRemoteNG.exe" ^
|
||||
|
||||
|
||||
rem Do not remove the two blank lines above this line.
|
||||
|
||||
mkdir "%~dp0\Release" > nul 2>&1
|
||||
|
||||
echo Getting product version...
|
||||
set VERSIONNSH="%~dp0\Release\Version.nsh"
|
||||
set SIGCHECK=!SIGCHECK:"=^"!
|
||||
set SIGCHECK=!SIGCHECK: =^^ !
|
||||
set SIGCHECK=!SIGCHECK:(=^^(!
|
||||
set SIGCHECK=!SIGCHECK:)=^^)!
|
||||
for /F "usebackq delims=. tokens=1-4" %%i in (`!SIGCHECK! /accepteula -q -n "%~dp0\mRemoteV1\bin\Release\mRemoteNG.exe"`) do (
|
||||
set PRODUCT_VERSION_SHORT=%%i.%%j
|
||||
echo ^^!define PRODUCT_VERSION "%%i.%%j.%%k.%%l" > %VERSIONNSH%
|
||||
echo ^^!define PRODUCT_VERSION_SHORT "%%i.%%j" >> %VERSIONNSH%
|
||||
echo ^^!define PRODUCT_VERSION_MAJOR "%%i" >> %VERSIONNSH%
|
||||
echo ^^!define PRODUCT_VERSION_MINOR "%%j" >> %VERSIONNSH%
|
||||
)
|
||||
echo Version is %PRODUCT_VERSION_SHORT%
|
||||
|
||||
echo Creating installer package...
|
||||
if defined VERSIONTAG (
|
||||
%MAKENSIS% /DPRODUCT_VERSION_TAG=%VERSIONTAG% "%~dp0\Installer\mRemote.nsi"
|
||||
|
||||
set INSTALLEREXE="%~dp0\Release\mRemoteNG-Installer-%PRODUCT_VERSION_SHORT%-%VERSIONTAG%.exe"
|
||||
set BINARYZIP="%~dp0\Release\mRemoteNG-%PRODUCT_VERSION_SHORT%-%VERSIONTAG%.zip"
|
||||
set PORTABLEZIP="%~dp0\Release\mRemoteNG-Portable-%PRODUCT_VERSION_SHORT%-%VERSIONTAG%.zip"
|
||||
) else (
|
||||
%MAKENSIS% "%~dp0\Installer\mRemote.nsi"
|
||||
|
||||
set INSTALLEREXE="%~dp0\Release\mRemoteNG-Installer-%PRODUCT_VERSION_SHORT%.exe"
|
||||
set BINARYZIP="%~dp0\Release\mRemoteNG-%PRODUCT_VERSION_SHORT%.zip"
|
||||
set PORTABLEZIP="%~dp0\Release\mRemoteNG-Portable-%PRODUCT_VERSION_SHORT%.zip"
|
||||
)
|
||||
|
||||
del %VERSIONNSH%
|
||||
|
||||
echo Signing installer package...
|
||||
%SIGNCMD% %INSTALLEREXE%
|
||||
|
||||
echo Creating release ZIP file...
|
||||
del /f /q %BINARYZIP% > nul 2>&1
|
||||
%RAR% a -m5 -r -ep1 -afzip -inul %BINARYZIP% "%~dp0\mRemoteV1\bin\Release\*.*"
|
||||
%RAR% a -m5 -r -ep1 -afzip -inul %BINARYZIP% "%~dp0\Installer\Dependencies\*.*"
|
||||
%RAR% a -m5 -ep -afzip -inul %BINARYZIP% "%~dp0\*.TXT"
|
||||
|
||||
echo Creating portable ZIP file...
|
||||
del /f /q %PORTABLEZIP% > nul 2>&1
|
||||
%RAR% a -m5 -r -ep1 -afzip -inul %PORTABLEZIP% "%~dp0\mRemoteV1\bin\Release Portable\*.*"
|
||||
%RAR% a -m5 -r -ep1 -afzip -inul %PORTABLEZIP% "%~dp0\Installer\Dependencies\*.*"
|
||||
%RAR% a -m5 -ep -afzip -inul %PORTABLEZIP% "%~dp0\*.TXT"
|
||||
|
||||
echo.
|
||||
echo Build process complete.
|
||||
echo.
|
||||
|
||||
:END
|
||||
pause
|
||||
@@ -1,4 +1,326 @@
|
||||
1.62:
|
||||
1.73 Beta 1 (2013-11-19):
|
||||
Added feature MR-16 - Add keyboard shortcuts to switch between tabs
|
||||
Added feature MR-141 - Add a default protocol option
|
||||
Added feature MR-212 - Add option to connect without credentials
|
||||
Added feature MR-512 - Add support for importing files from Remote Desktop Connection Manager
|
||||
Added feature MR-547 - Add support for Xming Portable PuTTY
|
||||
Made improvement MR-250 - Show the name of the selected connection tab in the title of the window
|
||||
Made improvement MR-367 - Make the 'Connect' button on the 'Quick Connect' toolbar a forced dropdown
|
||||
Made improvement MR-419 - Password prompt dialog should have a meaningful window title
|
||||
Made improvement MR-486 - Allow escaping of variable names for external tools
|
||||
Made improvement MR-590 - Make panels docked to the edge of the window keep their size
|
||||
Fixed issue MR-187 - F7 keyboard shortcut for New Folder conflicts with remote connections
|
||||
Fixed issue MR-523 - Changes to external tools are not saved until exiting the program
|
||||
Fixed issue MR-556 - Export fails when overwriting an existing file
|
||||
Fixed issue MR-594 - Crash on startup if write access is denied to the IE browser emulation registry key
|
||||
Fixed issue MR-603 - Some configuration options are still shown even when inheritance is enabled
|
||||
Added "Reset" to config panel context menu to allow resetting some config settings to their default value.
|
||||
Added and improved menu icons.
|
||||
Removed misleading log messages about RD Gateway support.
|
||||
Removed invalid "Site" configuration option from PuTTY Saved Sessions.
|
||||
Fixed PuTTY Saved Sessions still showing if all saved sessions are removed.
|
||||
Fixed config panel showing settings from previously loaded connection file after loading a new one.
|
||||
Improved handling of variables in external tool arguments.
|
||||
|
||||
1.72 (2013-11-13):
|
||||
Fixed issue MR-592 - Unable to run VBS script as an external tool
|
||||
Fixed issue MR-596 - Incorrect escaping of quotation marks in external tool arguments
|
||||
|
||||
1.71 (2013-10-29):
|
||||
Fixed issue MR-574 - Crash when retrieving RDP session list if eolwtscom.dll is not registered
|
||||
Fixed issue MR-578 - Connections file is reset
|
||||
Fixed log file not showing operating system version on Windows XP and Windows Server 2003.
|
||||
Fixed the wrong connections file opening on startup under certain conditions.
|
||||
Fixed checking for updates even when disabled.
|
||||
Improved error reporting when loading connections files.
|
||||
Removed warning message when mRemoteNG is started for the first time about new connections file being created.
|
||||
|
||||
1.71 Release Candidate 2 (2013-10-16):
|
||||
Fixed issue MR-560 - Cannot Auto-Update With Open Connections: Unable to find an entry point named 'TaskDialogIndirect' in DLL 'ComCtl32'
|
||||
Fixed issue MR-565 - Double Folder keep heritage on the initial Folder
|
||||
Fixed issue MR-566 - Typo in German UI Automatic Update Settings
|
||||
Fixed duplicated folders possibly being named "New Connection" instead of the original folder's name.
|
||||
|
||||
1.71 Release Candidate 1 (2013-10-01):
|
||||
Fixed issue MR-495 - Having a negative range in port scan creates memory exhaustion.
|
||||
Fixed issue MR-514 - Window Proxy test failed without close button
|
||||
Fixed issue MR-521 - Right-Clicking in "Sessions" panel crashes mRemoteNG
|
||||
Fixed issue MR-525 - Could not start on windows 7 64bit
|
||||
Fixed issue MR-535 - SQL error saving Connections
|
||||
Fixed issue MR-538 - RDP loses connection when hiding config or connections pane
|
||||
Fixed issue MR-542 - Wrapped putty has security flaw
|
||||
Made minor improvements to the port scan functionality.
|
||||
Fixed possible cross-thread operation exception when loading connections from SQL.
|
||||
Fixed PuTTY Saved Sessions not showing after loading a new connections file.
|
||||
Updated PuTTY to version 0.63.
|
||||
Updated translations.
|
||||
Added Chinese (Traditional) translation.
|
||||
Added partial Greek and Hungarian translations.
|
||||
|
||||
1.71 Beta 5 (2013-06-09):
|
||||
Fixed issue MR-491 - Could not start RDP Connection
|
||||
Fixed issue MR-499 - TS Gateway is not working in latest release 1.71
|
||||
Fixed typo in SQL queries.
|
||||
|
||||
1.71 Beta 4 (2013-05-28):
|
||||
Added feature MR-435 - Add digital signature check to updater
|
||||
Fixed issue MR-255 - The version of the RDP AX client should be updated to 7
|
||||
Fixed issue MR-392 - Sessions Panel - context menu entries need to be context aware
|
||||
Fixed issue MR-422 - Gives error Object reference not set to an instance of an object.
|
||||
Fixed issue MR-424 - Import of a few Linux SSH2 hosts discovered via the port scan tool results in a UE
|
||||
Fixed issue MR-439 - MRemoteNG 1.70 does not start
|
||||
Fixed issue MR-440 - RDP import with non-standard port
|
||||
Fixed issue MR-443 - Instructions for eolwtscom.dll registration for Portable version are inaccurate
|
||||
Fixed issue MR-446 - Putty saved sessions show in connection panel
|
||||
Fixed issue MR-459 - Maximized -> Minimized -> Restored results in mangled active display
|
||||
Fixed issue MR-463 - Add support for LoadBalanceInfo to RDP
|
||||
Fixed issue MR-470 - Quick Connect to Linux server uses invalid credentials
|
||||
Fixed issue MR-471 - PuTTY Saved Sessions disappears from connection list
|
||||
Fixed issue MR-487 - Initiate connections on MouseUp event
|
||||
Added PuTTY Session Settings command to the Config panel for PuTTY Saved Sessions.
|
||||
Updated translations.
|
||||
Added Norwegian (Bokmal) and Portuguese (Brazil) translations.
|
||||
Added Spanish translation to the installer.
|
||||
Fixed an exception or crash when choosing unnamed colors for themes.
|
||||
Fixed possible error "Control does not support transparent background colors" when modifying themes.
|
||||
Fixed changes to the active theme not being saved reliably.
|
||||
Fixed handling of the plus (+) character in PuTTY session names.
|
||||
Changed Internet Explorer to no longer force IE7 compatibility mode.
|
||||
Changed the "Launch PuTTY" button in the "Options" dialog to open PuTTY from the path the user has currently set, instead of what was previously saved.
|
||||
Improved update and announcement checking.
|
||||
Improved the PuTTY Saved Sessions list to update automatically when any changes are made.
|
||||
Improved loading time of large connection files.
|
||||
Lowered required version of RDC from 6.1 to 6.0.
|
||||
Updated VncSharpNG to 1.3.4896.25007.
|
||||
|
||||
1.71 Beta 3 (2013-03-20):
|
||||
Fixed issue MR-397 - Putty disappears from the screen
|
||||
Fixed issue MR-398 - Full Screen mode doesn't correctly make use of available space
|
||||
Fixed issue MR-402 - scrollbar touch moves putty window
|
||||
Fixed issue MR-406 - Items disappear from External Tools toolbar when accessing External Tools panel
|
||||
Fixed issue MR-410 - Unhandled exception when clicking New button under Theme
|
||||
Fixed issue MR-413 - Can't use aplication
|
||||
Fixed new connections having a globe icon.
|
||||
Fixed the category names in the themes tab of the options dialog on Windows XP not showing correctly.
|
||||
Fixed PuTTY saved sessions with spaces or special characters not being listed.
|
||||
|
||||
1.71 Beta 2 (2013-03-19):
|
||||
Added feature MR-336 - Customizable background color for the windows/panels
|
||||
Added feature MR-345 - Two separate options for confirming closure of Tabs and Connection Panels
|
||||
Added feature MR-346 - Option to show/hide the description box at the bottom of the Config panel
|
||||
Added feature MR-351 - Import connections from PuTTY
|
||||
Fixed issue MR-354 - Re-ordering tabs doesn't give good, reliable visual feedback
|
||||
Fixed issue MR-375 - Changing a connection's icon using the picture button should immediately update Icon field
|
||||
Fixed issue MR-377 - Several redundant panels can be opened
|
||||
Fixed issue MR-379 - Connection variables not working with external tools
|
||||
Fixed issue MR-381 - Notifications panel - whitespace context menu allows Copy and Delete on nothing
|
||||
Fixed issue MR-401 - Checkbox misaligned
|
||||
The username and domain settings are now hidden for VNC connections since they are not supported.
|
||||
Changed "Automatically get session information" to be disabled by default.
|
||||
RDP connections can now be switched to full screen mode when redirect key combinations is enabled.
|
||||
|
||||
1.71 Beta 1 (2013-03-04):
|
||||
Added feature MR-329 - Create Option to disable the "Quick: " prefix
|
||||
Fixed issue MR-67 - Sort does not recursively sort
|
||||
Fixed issue MR-117 - Remote Session Info Window / Tab does not populate
|
||||
Fixed issue MR-121 - Config pane not sorting properties correctly when switching between alphabetical and categorized view
|
||||
Fixed issue MR-130 - Issues duplicating folders
|
||||
Fixed issue MR-142 - Start of mRemoteNG takes about one minute and consumes excessive CPU
|
||||
Fixed issue MR-158 - Password field not accepting Pipe
|
||||
Fixed issue MR-330 - Portable version saves log to user's profile folder
|
||||
Fixed issue MR-333 - Unnecessary prompt for 'close all open connections?'
|
||||
Fixed issue MR-342 - Incorrect view in config pane of new connection after viewing default inheritance
|
||||
Fixed issue MR-352 - Passwords with " (quotation mark) and # (hash key) characters make mRemoteNG to open PuttyNG dialog
|
||||
Fixed issue MR-362 - Rename 'Screenshot Manager' to 'Screenshots' on the View menu to match Panel name
|
||||
Added detection of newer versions of connection files and database schemata. mRemoteNG will now refuse to open them to avoid data loss.
|
||||
Improved appearance and discoverability of the connection search box.
|
||||
If RDC 7.0 or higher is installed, the connection bar is no longer briefly shown when connecting to an RDP connection with redirect key combinations enabled.
|
||||
If RDC 8.0 or higher is installed, RDP connections automatically adjust their size when the window is resized or when toggling full screen mode.
|
||||
|
||||
1.70 (2013-03-07):
|
||||
Fixed issue MR-339 - Connection group collapses with just one click
|
||||
Fixed issue MR-340 - Object reference not set to an instance of an object.
|
||||
Fixed issue MR-344 - Move "Always show panel tabs" option
|
||||
Fixed issue MR-350 - VerifyDatabaseVersion (Config.Connections.Save) failed. Version string portion was too short or too long.
|
||||
Fixed issue MR-355 - Moving sub folders to top level causes property loss
|
||||
Fixed tabs not closing on double-click when the active tab is a PuTTY connection.
|
||||
|
||||
1.70 Release Candidate 2 (2013-02-25):
|
||||
Fixed issue MR-332 - Can't select different tab with one click after disconnecting existing tab
|
||||
Fixed issue MR-338 - PuTTYNG crashing on fresh install of mRemoteNG
|
||||
Re-enabled PuTTYNG integration enhancements on Windows 8
|
||||
|
||||
1.70 Release Candidate 1 (2013-02-22):
|
||||
Fixed issue MR-183 - Error trying to save connections when using SQL - Invalid column name _parentConstantId
|
||||
Fixed issue MR-225 - Tabs do not open in a panel until multiple panels are displayed.
|
||||
Fixed issue MR-229 - Integrated PuTTY doesn't work in Windows 8 RP
|
||||
Fixed issue MR-264 - Windows 8 support
|
||||
Fixed issue MR-317 - Difficulty right-clicking on Tab
|
||||
Fixed issue MR-318 - Wrong tab gets selected when tab names overflow on the tab bar
|
||||
Fixed issue MR-321 - New connection panel doesn't get panel header if its the only one or is moved
|
||||
Fixed issue MR-322 - Connection Button not listing servers
|
||||
Added option to always show panel tabs.
|
||||
Fixed "Decryption failed. Padding is invalid and cannot be removed." notification.
|
||||
Fixed KiTTY opening in a separate window when using a saved session.
|
||||
|
||||
1.70 Beta 2 (2013-02-18):
|
||||
Fixed issue MR-47 - Silent Installation Prompts for Language
|
||||
Fixed issue MR-54 - Error When disconnecting from SSL channel RDP
|
||||
Fixed issue MR-58 - Bug when duplicating connection in connection view
|
||||
Fixed issue MR-68 - Config Window Loses Options
|
||||
Fixed issue MR-71 - Minimizing mRemoteNG causes temporary re-size of Putty sessions (windows)
|
||||
Fixed issue MR-80 - Reconnect previous sessions
|
||||
Fixed issue MR-81 - Problem Duplicating Folder w/ Sub-Folders
|
||||
Fixed issue MR-85 - Microsoft .NET Framework warning
|
||||
Fixed issue MR-86 - Citrix GDI+ Error when screen is locked
|
||||
Fixed issue MR-96 - When pressing SHIFT+F4 to create a new connection inside a folder, the new connections doesn't inherit any properties from its parent
|
||||
Fixed issue MR-101 - Collapse all folders causes a NullReferenceException
|
||||
Fixed issue MR-165 - Can't close About window if it is the last tab
|
||||
Fixed issue MR-166 - Inheritance button is disabled on some connections
|
||||
Fixed issue MR-167 - Name and description of properties not show in inheritance list
|
||||
Fixed issue MR-171 - Inherit configuration not showing friendly names for each inherit component
|
||||
Fixed issue MR-172 - RDGatewayPassword is unencrypted in confCons.xml file
|
||||
Fixed issue MR-174 - Trailing Space on a Hostname/IP will cause the connection not to happen.
|
||||
Fixed issue MR-175 - Problem with focus when 2 or more PuTTY sessions opened
|
||||
Fixed issue MR-176 - Del key while editing connection name triggers 'Delete Connection'
|
||||
Fixed issue MR-178 - 3 different panels crashes all connections
|
||||
Fixed issue MR-181 - Sessions on startup
|
||||
Fixed issue MR-190 - Can't click on tab/session
|
||||
Fixed issue MR-196 - Cannot export list without usernames and passwords
|
||||
Fixed issue MR-199 - when using screen inside putty, screen becomes dead when reduce mremoteNG
|
||||
Fixed issue MR-202 - The Connection "Tab" show Ampersands as underscores.
|
||||
Fixed issue MR-214 - Hostname/IP reset
|
||||
Fixed issue MR-224 - Session tabs become un-clickable after duplicating a tab or opening a new one in the same panel
|
||||
Fixed issue MR-233 - Backslash at end of password prevents success of putty invocation and corresponding auto-logon
|
||||
Fixed issue MR-235 - Config file gets corrupted when leaving the password entry box with ESC
|
||||
Fixed issue MR-264 - Windows 8 support
|
||||
Fixed issue MR-277 - Inheritance configuration button not appear in configuration tab
|
||||
Fixed issue MR-284 - SSH: Text not showing properly
|
||||
Fixed issue MR-299 - mRemoteNG crashes while using remotely (Windows XP remote desktop)
|
||||
Fixed issue MR-306 - Fatal .NET exception on program start
|
||||
Fixed issue MR-313 - PuTTY window not maximized when loading from saved session
|
||||
mRemoteNG now requires .NET Framework 3.0 instead of 2.0.
|
||||
Updated translations.
|
||||
Added translations for Spanish (Argentina), Italian, Polish, Portuguese, Chinese (Simplified).
|
||||
Improved the use of Tab and Shift-Tab to cycle through entries in the Config grid.
|
||||
Improved loading of XML files from older versions of mRemote/mRemoteNG.
|
||||
|
||||
1.70 Beta 1 (2012-02-27):
|
||||
Fixed issue MR-77 - VerifyDatabaseVersion (Config.Connections.Save) failed. Version string portion was too short or too long.
|
||||
Fixed issue MR-78 - Renaming Connections
|
||||
Fixed issue MR-79 - MoveUp/Down item doesn't work + Sort button broken
|
||||
Fixed issue MR-93 - Regional settings problem when using SQL connection in mRemoteNG
|
||||
Fixed issue MR-97 - Integrate Dutch translation
|
||||
Fixed issue MR-98 - Integrate Russian and Ukranian translations
|
||||
Fixed issue MR-99 - Integrate Spanish translation
|
||||
Fixed issue MR-131 - RD Gateway does not respect setting for use different credentials
|
||||
Added compatibility check for "Use FIPS compliant algorithms" security setting.
|
||||
Improved reporting of errors when encrypting and decrypting connection files.
|
||||
Added partial Polish translation.
|
||||
The panel tabs are now hidden if only one panel is open.
|
||||
Fix focus issue with RDP connections when changing tabs.
|
||||
Show changes live as connection tabs are being dragged around to change their order.
|
||||
Updated PuTTY to version 0.62.
|
||||
Improved error handling when loading connection files.
|
||||
Fixed bugs with creating a new connection file.
|
||||
A backup of the connection file is saved when it is loaded. The most recent ten backup copies are kept.
|
||||
Added the option to use a smart card for RD Gateway credentials.
|
||||
Made the use of CredSSP for RDP connections optional.
|
||||
Updated VncSharpNG to version 1.2.4440.36644.
|
||||
Added debugging symbols for VncSharpNG.
|
||||
|
||||
1.69 (2011-12-09):
|
||||
Fixed issue #66 - Fresh Install Fails to Create Config
|
||||
Fixed issue #69 - Connection file gets erased
|
||||
Fixed issue #72 - scrollbars added to RDP window after minimize/restore of mRemoteNG
|
||||
Disabled automatic updates in the portable edition
|
||||
Fixed file name in window title changing when exporting an XML file.
|
||||
Fixed Use only Notifications panel checkbox.
|
||||
Updated PuTTY to version 0.61
|
||||
Binaries are now digitally signed
|
||||
Added Credits, License, and Version History items to the Start Menu and made Start Menu item names localizable.
|
||||
|
||||
1.68 (2011-07-07):
|
||||
Fixed issue #48 - VerifyDatabaseVersion fails with new (empty) database tables.
|
||||
Fixed issue #60 - Can't save connections file
|
||||
Fixed issue #62 - Connection file error upon launch.
|
||||
|
||||
1.67 (2011-06-05):
|
||||
Fixed migration of external tools configuration and panel layout from Local to Roaming folder.
|
||||
Disable ICA Hotkeys for Citrix connections. Fixes issue with international users.
|
||||
Added a language selection option so users can override the language if they don't want it automatically detected.
|
||||
Added partial French translation to the application.
|
||||
Addded Thai translation to the installer.
|
||||
Updated graphics in the installer to mRemoteNG logo.
|
||||
Fixed RD Gateway default properties and RDP reconnection count setting not being saved.
|
||||
Fixed bug 33 - IPv6 doesn't work in quick Connect box.
|
||||
Moved the items under Tools in the Connections panel context menu up to the top level.
|
||||
Added buttons for Add Connection, Add Folder, and Sort Ascending (A-Z) to the Connections panel toolbar.
|
||||
Fixed rename edit control staying open when collapsing all folders.
|
||||
Changed sorting to sort all subfolders below the selected folder.
|
||||
Allow sorting of connections if a connection entry is selected.
|
||||
Fixed adding a connection entry if nothing is selected in the tree.
|
||||
Added 15-bit Color RDP setting.
|
||||
Fixed loading of RDP Colors setting from SQL.
|
||||
Added Font Smoothing and Desktop Composition RDP settings.
|
||||
Improved error handling when loading XML connection files.
|
||||
Added the mRemoteNG icon to the list of selectable icons for connection entries.
|
||||
Added confirmation before closing connection tabs.
|
||||
Fixed bug 42 - Maximized location not remembered with multiple monitors.
|
||||
Improved loading and saving of window location.
|
||||
Removed flickering on start up.
|
||||
Changed the Options page into a normal dialog.
|
||||
Improved Reset Layout function.
|
||||
Changed to use full four part version numbers with major, minor, build, and revision.
|
||||
Changed hard coded SQL database name into a user configurable setting.
|
||||
Fixed tab order of controls in Options dialog.
|
||||
Fixed bug 45 - Changing some settings in the config file may not save.
|
||||
|
||||
1.66 (2011-05-02):
|
||||
Fixed connections not working
|
||||
|
||||
1.65 (2011-05-02):
|
||||
Fixed Ctrl-Tab and Ctrl-Shift-Tab not working in any other applications while mRemoteNG is running
|
||||
Ctrl-Tab and Ctrl-Shift-Tab no longer work to switch tabs within mRemoteNG
|
||||
Fixed bug 36 - Install creates shortcuts only for the installing user
|
||||
Fixed bug 38 - Application uses the wrong Application Data settings folder (in Local Settings)
|
||||
Added code to the installer to check that the user is in the 'Power Users' or 'Administrators' group
|
||||
|
||||
1.64 (2011-04-27):
|
||||
Fixed bug 6 - VNC CTRL+key & keyboard combo mappings are broken
|
||||
Fixed bug 12 - Tab switch is not working in config panel
|
||||
Fixed bug 14 - RDP Connection authentication problem
|
||||
Fixed bug 22 - External App parameter macro expansion doesn't work with "try to integrate"
|
||||
Fixed bug 25 - Unhandled exception when mRemoteNG opens
|
||||
Added multilanguage support and German translation to the application
|
||||
Added Czech, Dutch, French, German, Polish, and Spanish translations to the installer
|
||||
Added Ctrl-Tab hotkey to switch to the next tab and Ctrl-Shift-Tab to switch to the previous tab
|
||||
Added Tab key to cycle through entries in the Config grid and Shift-Tab to cycle in reverse
|
||||
Added ability to configure external tools to run before or after a connection is established
|
||||
Fixed missing parameters in macro expansion for external tools
|
||||
Fixed RD Gateway and other inheritance bugs
|
||||
Changed how new connection files are created
|
||||
Changed the internal namespace of the application to mRemoteNG instead of mRemote
|
||||
Added credit for the DockPanel Suite to the About page
|
||||
Updated DockPanel Suite to version 2.5 RC1
|
||||
Updated VNCSharpNG to correct Ctrl and Alt key pass-through behavior
|
||||
|
||||
1.63 (2010-02-02):
|
||||
New icon and logo
|
||||
Fixed problems moving or resizing the main window while PuTTY (SSH/telnet/rlogin/raw) connections are open
|
||||
Fixed PuTTY processes not closing on Vista and 7 with UAC enabled
|
||||
Updated DockPanel Suite from 2.2.0 to 2.3.1
|
||||
Fixed error if the mouse is clicked outside of the remote screen area of a VNC connection
|
||||
Fixed flashing and red lines at bottom of the window on first run
|
||||
Added View->Reset Layout menu item
|
||||
Added F11 shortcut key to View->Full Screen
|
||||
Improved RDP error reporting
|
||||
Added support for Credential Security Support Provider (CredSSP) which is required for Network Level Authentication (NLA)
|
||||
Added support for connecting through Remote Desktop Gateway servers
|
||||
Popups can now be allowed in Internet Explorer by holding Ctrl+Alt when clicking a link
|
||||
Added PuTTY Settings item to tab context menu
|
||||
|
||||
1.62 (2010-01-19):
|
||||
Switched to VncSharp, an open source VNC component
|
||||
VNC is supported again except for the following features:
|
||||
Windows authentication
|
||||
@@ -14,11 +336,11 @@
|
||||
Added RDP, VNC and ICA version numbers to Components Check page
|
||||
Fixed a bug with the inheritance buttons on the Config panel disappearing after awhile
|
||||
|
||||
1.61:
|
||||
1.61 (2010-01-14):
|
||||
Removed unlicensed SmartCode Solutions ViewerX VNC Viewer ActiveX
|
||||
This version of mRemoteNG does not support VNC
|
||||
|
||||
1.60:
|
||||
1.60 (2010-01-09):
|
||||
Changed name to mRemoteNG
|
||||
Fixed menu bar not staying docked to left side
|
||||
Removed snakes game Easter egg
|
||||
@@ -487,7 +809,7 @@ V0.0.3.2:
|
||||
V0.0.3.0:
|
||||
Added Options Tab
|
||||
Load connections file from different location
|
||||
Save/Don’t Save connections file on exit
|
||||
Save/Don't Save connections file on exit
|
||||
Show current tab name in window title
|
||||
Added drag and drop functionality to the connections tree
|
||||
Added feature to hide top bar
|
||||
@@ -497,7 +819,7 @@ V0.0.3.0:
|
||||
V0.0.2.7:
|
||||
Added feature to save connection settings to all connections in the selected container
|
||||
Icon choosing bug fixed
|
||||
Taskbar button had no text when in fullscreen – fixed
|
||||
Taskbar button had no text when in fullscreen - fixed
|
||||
Fixed bug in Quick Connect GUI
|
||||
Disabled "Display Wallpaper" and "Display Themes" checkboxes as these features are not implemented
|
||||
|
||||
127
CREDITS.TXT
Normal file
127
CREDITS.TXT
Normal file
@@ -0,0 +1,127 @@
|
||||
Contributors
|
||||
============
|
||||
|
||||
Jason Barbier
|
||||
Wiktor Beryt
|
||||
Lionel Caignec
|
||||
Ruben d'Arco
|
||||
Felix Deimel
|
||||
Holger Henke
|
||||
Tom Hiller
|
||||
Riley McArdle
|
||||
Apisitt Rattana
|
||||
Andreas Rehm
|
||||
David Vidmar
|
||||
|
||||
|
||||
Translators
|
||||
===========
|
||||
|
||||
Eugenio "Ryo567" Mart<72>nez
|
||||
Mathieu Pape
|
||||
Emanuel Silva
|
||||
Robert Siwiec
|
||||
|
||||
|
||||
Included Source Code
|
||||
====================
|
||||
|
||||
Command Line Arguments Parser 1.0
|
||||
Copyright <20> 2002 Richard Lopes
|
||||
MIT License
|
||||
http://www.codeproject.com/KB/recipes/command_line.aspx
|
||||
|
||||
DotNetVer
|
||||
Copyright <20> 2010 David Grinberg
|
||||
Copyright <20> 2010-2011 Brandon Hansen
|
||||
http://nsis.sourceforge.net/DotNetVer
|
||||
|
||||
Hotkey Selection Control for .NET
|
||||
Copyright <20> 2006 Thomas Backman
|
||||
http://www.codeproject.com/Articles/15085/A-simple-hotkey-selection-control-for-NET
|
||||
|
||||
|
||||
Included Components
|
||||
===================
|
||||
|
||||
ADTree 1.0
|
||||
Copyright <20> 2004 Marc Merritt
|
||||
Copyright <20> 2008 Felix Deimel
|
||||
http://www.codeproject.com/KB/selection/ADPickerCtrl.aspx
|
||||
|
||||
DiffieHellman 1.0
|
||||
Copyright <20> 2003 The Mentalis.org Team
|
||||
Modified New BSD License
|
||||
http://www.mentalis.org/
|
||||
|
||||
DockPanel Suite 2.3.1
|
||||
Copyright <20> 2007 Weifen Luo
|
||||
MIT License
|
||||
http://sourceforge.net/projects/dockpanelsuite/
|
||||
|
||||
Emergent OnLine WTSCOM 2.0.6.0
|
||||
Copyright <20> 2001-2003 Emergent OnLine
|
||||
http://www.go-eol.com/
|
||||
|
||||
FilteredPropertyGrid 1.0.0.0
|
||||
Copyright <20> 2006 Azuria
|
||||
http://www.codeproject.com/KB/cs/FilteredPropertyGrid.aspx
|
||||
|
||||
GeckoFX 1.8.1.4
|
||||
Copyright <20> 2008 Skybound Software
|
||||
Mozilla Public License 1.1
|
||||
http://www.geckofx.org/
|
||||
|
||||
IPTextBox 1.1
|
||||
Copyright <20> 2006 Matthew Kleinwaks
|
||||
Copyright <20> 2008 Felix Deimel
|
||||
http://www.vbforums.com/showthread.php?t=430169
|
||||
|
||||
log4net 1.2.10.0
|
||||
Copyright <20> 2001-2006 The Apache Software Foundation
|
||||
Apache License Version 2.0
|
||||
http://logging.apache.org/log4net/
|
||||
|
||||
Magic Library 1.7.4
|
||||
Copyright <20> 2002-2003 Crownwood Consulting, Ltd.
|
||||
Freely redistributable with attribution
|
||||
http://www.dotnetmagic.com/magic_download.html
|
||||
|
||||
Mentalis.org Security Library 1.0.13.715
|
||||
Copyright <20> 2002-2005 The Mentalis.org Team
|
||||
Modified New BSD License
|
||||
http://www.mentalis.org/
|
||||
|
||||
MiniGeckoBrowser 1.0
|
||||
Copyright <20> 2008 Felix Deimel
|
||||
http://www.appjuice.org/
|
||||
|
||||
MiniTabControl 1.0
|
||||
Copyright <20> 2008 Felix Deimel
|
||||
http://www.appjuice.org/
|
||||
|
||||
PuTTY 0.62
|
||||
Copyright <20> 1997-2011 Simon Tatham
|
||||
MIT License
|
||||
http://www.chiark.greenend.org.uk/~sgtatham/putty/
|
||||
|
||||
SharpSSH 1.1.1.13
|
||||
Copyright <20> 2002-2008 Atsuhiko Yamanaka, JCraft, Inc.
|
||||
Copyright <20> 2007 Tamir Gal
|
||||
BSD Style License
|
||||
http://www.tamirgal.com/blog/page/SharpSSH.aspx
|
||||
|
||||
Silk Icon Set
|
||||
Copyright <20> 2005-2008 FAMFAMFAM
|
||||
Creative Commons Attribution 2.5 License
|
||||
http://www.famfamfam.com/
|
||||
|
||||
Vista TaskDialog Wrapper and Emulator 1.0
|
||||
Copyright <20> 2007-2009 Hedley Muscroft
|
||||
Code Project Open License (CPOL)
|
||||
http://www.codeproject.com/KB/vista/Vista_TaskDialog_Wrapper.aspx
|
||||
|
||||
VncSharp 1.0
|
||||
Copyright <20> 2004-2009 David Humphrey
|
||||
GNU General Public License (GPL) Version 2
|
||||
http://cdot.senecac.on.ca/projects/vncsharp/
|
||||
BIN
Installer/Dependencies/PuTTYNG.exe
Normal file
BIN
Installer/Dependencies/PuTTYNG.exe
Normal file
Binary file not shown.
BIN
Installer/Dependencies/PuTTYNG.pdb
Normal file
BIN
Installer/Dependencies/PuTTYNG.pdb
Normal file
Binary file not shown.
Binary file not shown.
296
Installer/DotNetVer.nsh
Normal file
296
Installer/DotNetVer.nsh
Normal file
@@ -0,0 +1,296 @@
|
||||
; ---------------------
|
||||
; DotNetVer.nsh
|
||||
; Written by: David Grinberg
|
||||
; Homepage: http://ontheperiphery.veraida.com/
|
||||
; Updated By: Brandon Hansen (http://www.remotehams.com/)
|
||||
; ---------------------
|
||||
;
|
||||
; LogicLib extensions for checking Microsoft .NET Framework versions and service packs.
|
||||
;
|
||||
; Latests Updates by Brandon Hansen, KG6YPI (RemoteHams.com)
|
||||
; Dec 26, 2011 - .NET Framework 4.0 detection fixes - client profile not being found
|
||||
; Dec 07, 2010 - .NET Framework 4.0 detection added by Brandon Hansen (KG6YPI)
|
||||
;
|
||||
; Usage examples:
|
||||
;
|
||||
; ${If} ${HasDotNet4.0}
|
||||
; DetailPrint "Microsoft .NET Framework 4.0 installed."
|
||||
; ${If} ${DOTNETVER_4_0} AtLeastDotNetServicePack 1
|
||||
; DetailPrint "Microsoft .NET Framework 4.0 is at least SP1."
|
||||
; ${Else}
|
||||
; DetailPrint "Microsoft .NET Framework 4.0 SP1 not installed."
|
||||
; ${EndIf}
|
||||
; ${If} ${DOTNETVER_4_0} HasDotNetClientProfile 1
|
||||
; DetailPrint "Microsoft .NET Framework 4.0 (Client Profile) available."
|
||||
; ${EndIf}
|
||||
; ${If} ${DOTNETVER_4_0} HasDotNetFullProfile 1
|
||||
; DetailPrint "Microsoft .NET Framework 4.0 (Full Profile) available."
|
||||
; ${EndIf}
|
||||
; ${If} ${DOTNETVER_4_0} HasDotNetFullProfile 0
|
||||
; DetailPrint "Microsoft .NET Framework 4.0 (Full Profile) not available."
|
||||
; ${EndIf}
|
||||
; ${EndIf}
|
||||
|
||||
|
||||
!verbose push
|
||||
!verbose 3
|
||||
|
||||
!ifndef ___DOTNETVER__NSH___
|
||||
!define ___DOTNETVER__NSH___
|
||||
|
||||
!include LogicLib.nsh
|
||||
!include Util.nsh
|
||||
|
||||
# constants
|
||||
|
||||
!define DOTNETVER_1_0 "1.0"
|
||||
!define DOTNETVER_1_1 "1.1"
|
||||
!define DOTNETVER_2_0 "2.0"
|
||||
!define DOTNETVER_3_0 "3.0"
|
||||
!define DOTNETVER_3_5 "3.5"
|
||||
!define DOTNETVER_4_0 "4.0"
|
||||
|
||||
# variable declaration
|
||||
|
||||
Var /GLOBAL __DONTNET_FOUNDVER
|
||||
|
||||
!macro __DotNetVer_DeclareVars
|
||||
!ifndef __DOTNETVER_VARS_DECLARED
|
||||
!define __DOTNETVER_VARS_DECLARED
|
||||
Var /GLOBAL __DOTNET_1.0
|
||||
Var /GLOBAL __DOTNET_1.1
|
||||
Var /GLOBAL __DOTNET_2.0
|
||||
Var /GLOBAL __DOTNET_3.0
|
||||
Var /GLOBAL __DOTNET_3.5
|
||||
Var /GLOBAL __DOTNET_4.0
|
||||
|
||||
Var /GLOBAL __DOTNETVER_1.0_SP
|
||||
Var /GLOBAL __DOTNETVER_1.1_SP
|
||||
Var /GLOBAL __DOTNETVER_2.0_SP
|
||||
Var /GLOBAL __DOTNETVER_3.0_SP
|
||||
Var /GLOBAL __DOTNETVER_3.5_SP
|
||||
Var /GLOBAL __DOTNETVER_4.0_SP
|
||||
|
||||
Var /GLOBAL __DOTNET_1.0_CLIENT
|
||||
Var /GLOBAL __DOTNET_1.1_CLIENT
|
||||
Var /GLOBAL __DOTNET_2.0_CLIENT
|
||||
Var /GLOBAL __DOTNET_3.0_CLIENT
|
||||
Var /GLOBAL __DOTNET_3.5_CLIENT
|
||||
Var /GLOBAL __DOTNET_4.0_CLIENT
|
||||
|
||||
Var /GLOBAL __DOTNET_1.0_FULL
|
||||
Var /GLOBAL __DOTNET_1.1_FULL
|
||||
Var /GLOBAL __DOTNET_2.0_FULL
|
||||
Var /GLOBAL __DOTNET_3.0_FULL
|
||||
Var /GLOBAL __DOTNET_3.5_FULL
|
||||
Var /GLOBAL __DOTNET_4.0_FULL
|
||||
|
||||
StrCpy $__DOTNET_1.0 0
|
||||
StrCpy $__DOTNET_1.1 0
|
||||
StrCpy $__DOTNET_2.0 0
|
||||
StrCpy $__DOTNET_3.0 0
|
||||
StrCpy $__DOTNET_3.5 0
|
||||
StrCpy $__DOTNET_4.0 0
|
||||
|
||||
StrCpy $__DOTNETVER_1.0_SP 0
|
||||
StrCpy $__DOTNETVER_1.1_SP 0
|
||||
StrCpy $__DOTNETVER_2.0_SP 0
|
||||
StrCpy $__DOTNETVER_3.0_SP 0
|
||||
StrCpy $__DOTNETVER_3.5_SP 0
|
||||
StrCpy $__DOTNETVER_4.0_SP 0
|
||||
|
||||
StrCpy $__DOTNET_1.0_CLIENT 0
|
||||
StrCpy $__DOTNET_1.1_CLIENT 0
|
||||
StrCpy $__DOTNET_2.0_CLIENT 0
|
||||
StrCpy $__DOTNET_3.0_CLIENT 0
|
||||
StrCpy $__DOTNET_3.5_CLIENT 0
|
||||
StrCpy $__DOTNET_4.0_CLIENT 0
|
||||
|
||||
StrCpy $__DOTNET_1.0_FULL 0
|
||||
StrCpy $__DOTNET_1.1_FULL 0
|
||||
StrCpy $__DOTNET_2.0_FULL 0
|
||||
StrCpy $__DOTNET_3.0_FULL 0
|
||||
StrCpy $__DOTNET_3.5_FULL 0
|
||||
StrCpy $__DOTNET_4.0_FULL 0
|
||||
|
||||
!endif
|
||||
!macroend
|
||||
|
||||
|
||||
# lazy initialization macro
|
||||
|
||||
!macro __DotNetVer_InitVars
|
||||
# only calculate version once
|
||||
StrCmp $__DONTNET_FOUNDVER "" dotnetver.noveryet
|
||||
Return
|
||||
|
||||
dotnetver.noveryet:
|
||||
!insertmacro __DotNetVer_DeclareVars
|
||||
|
||||
Push $0 ;registry count
|
||||
Push $1 ;registry key
|
||||
Push $2 ;version number
|
||||
Push $3 ;installed
|
||||
Push $4 ;service pack number
|
||||
Push $8 ;strLen helper var
|
||||
|
||||
StrCpy $0 0
|
||||
|
||||
dotnetver.startenum:
|
||||
|
||||
EnumRegKey $1 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP" $0
|
||||
StrCmp $1 "" dotnetver.done
|
||||
|
||||
IntOp $0 $0 + 1
|
||||
|
||||
StrCpy $2 $1 1 0
|
||||
StrCmp $2 "v" +1 dotnetver.startenum
|
||||
StrCpy $2 $1 3 1
|
||||
|
||||
; Check for .NET 1.0 to 3.5
|
||||
ReadRegDWORD $3 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\$1" "Install"
|
||||
ReadRegDWORD $4 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\$1" "SP"
|
||||
IntCmp $3 1 dotnetcheck.skipalt
|
||||
; Alternate check for versions that don't set the Install key
|
||||
ReadRegDWORD $3 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\$1\Setup" "InstallSuccess"
|
||||
dotnetcheck.skipalt:
|
||||
; This is a sanity check that works on .NET 1.0 to 3.5
|
||||
; if it fails check for dotnet 4
|
||||
IntCmp $3 0 dotnetcheck.40
|
||||
StrCmp $2 ${DOTNETVER_1_0} dotnetver.10
|
||||
StrCmp $2 ${DOTNETVER_1_1} dotnetver.11
|
||||
StrCmp $2 ${DOTNETVER_2_0} dotnetver.20
|
||||
StrCmp $2 ${DOTNETVER_3_0} dotnetver.30
|
||||
StrCmp $2 ${DOTNETVER_3_5} dotnetver.35
|
||||
dotnetcheck.40:
|
||||
StrCmp $2 ${DOTNETVER_4_0} dotnetver.40
|
||||
StrCmp $2 "4" dotnetver.40
|
||||
|
||||
Goto dotnetver.startenum
|
||||
|
||||
dotnetver.10:
|
||||
StrCpy $__DOTNET_1.0 1
|
||||
StrCpy $__DOTNETVER_1.0_SP $4
|
||||
StrCpy $__DOTNET_1.0_FULL 1
|
||||
Goto dotnetver.startenum
|
||||
dotnetver.11:
|
||||
StrCpy $__DOTNET_1.1 1
|
||||
StrCpy $__DOTNETVER_1.1_SP $4
|
||||
StrCpy $__DOTNET_1.1_FULL 1
|
||||
Goto dotnetver.startenum
|
||||
dotnetver.20:
|
||||
StrCpy $__DOTNET_2.0 1
|
||||
StrCpy $__DOTNETVER_2.0_SP $4
|
||||
StrCpy $__DOTNET_2.0_FULL 1
|
||||
Goto dotnetver.startenum
|
||||
dotnetver.30:
|
||||
StrCpy $__DOTNET_3.0 1
|
||||
StrCpy $__DOTNETVER_3.0_SP $4
|
||||
StrCpy $__DOTNET_3.0_FULL 1
|
||||
Goto dotnetver.startenum
|
||||
dotnetver.35:
|
||||
StrCpy $__DOTNET_3.5 1
|
||||
StrCpy $__DOTNETVER_3.5_SP $4
|
||||
StrCpy $__DOTNET_3.5_FULL 1
|
||||
Goto dotnetver.startenum
|
||||
dotnetver.40:
|
||||
; Check for .NET 4.0 (Full Profile)
|
||||
ReadRegDWORD $3 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" "Install"
|
||||
ReadRegDWORD $4 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" "SP"
|
||||
StrLen $8 $3
|
||||
IntCmp $8 0 dotnetcheck.40c
|
||||
IntCmp $3 0 dotnetcheck.40c
|
||||
StrCmp $2 ${DOTNETVER_4_0} dotnetver.40_Full
|
||||
StrCmp $2 "4" dotnetver.40_Full
|
||||
dotnetcheck.40c:
|
||||
; Check for .NET 4.0 (Client Profile)
|
||||
ReadRegDWORD $3 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client" "Install"
|
||||
ReadRegDWORD $4 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client" "SP"
|
||||
StrLen $8 $3
|
||||
IntCmp $8 0 dotnetver.startenum
|
||||
IntCmp $3 0 dotnetver.startenum
|
||||
StrCmp $2 ${DOTNETVER_4_0} dotnetver.40_Client
|
||||
StrCmp $2 "4" dotnetver.40_Client
|
||||
Goto dotnetver.startenum
|
||||
dotnetver.40_Full:
|
||||
StrCpy $__DOTNET_4.0 1
|
||||
StrCpy $__DOTNETVER_4.0_SP $4
|
||||
StrCpy $__DOTNET_4.0_FULL 1
|
||||
Goto dotnetcheck.40c ; continue looking for other profiles
|
||||
dotnetver.40_Client:
|
||||
StrCpy $__DOTNET_4.0 1
|
||||
StrCpy $__DOTNETVER_4.0_SP $4
|
||||
StrCpy $__DOTNET_4.0_CLIENT 1
|
||||
Goto dotnetver.startenum
|
||||
|
||||
dotnetver.done:
|
||||
|
||||
StrCpy $__DONTNET_FOUNDVER "1"
|
||||
|
||||
Pop $8
|
||||
Pop $4
|
||||
Pop $3
|
||||
Pop $2
|
||||
Pop $1
|
||||
Pop $0
|
||||
!macroend
|
||||
|
||||
!macro _HasDotNet _a _b _t _f
|
||||
${CallArtificialFunction} __DotNetVer_InitVars
|
||||
|
||||
!insertmacro _= `$__DOTNET_${_b}` `1` `${_t}` `${_f}`
|
||||
!macroend
|
||||
|
||||
!macro __DotNetVer_DefineTest Ver
|
||||
!define HasDotNet${Ver} `"" HasDotNet ${Ver}`
|
||||
!macroend
|
||||
|
||||
!insertmacro __DotNetVer_DefineTest ${DOTNETVER_1_0}
|
||||
!insertmacro __DotNetVer_DefineTest ${DOTNETVER_1_1}
|
||||
!insertmacro __DotNetVer_DefineTest ${DOTNETVER_2_0}
|
||||
!insertmacro __DotNetVer_DefineTest ${DOTNETVER_3_0}
|
||||
!insertmacro __DotNetVer_DefineTest ${DOTNETVER_3_5}
|
||||
!insertmacro __DotNetVer_DefineTest ${DOTNETVER_4_0}
|
||||
|
||||
!macro _AtLeastDotNetServicePack _a _b _t _f
|
||||
${CallArtificialFunction} __DotNetVer_InitVars
|
||||
|
||||
!insertmacro _>= `$__DOTNETVER_${_a}_SP` `${_b}` `${_t}` `${_f}`
|
||||
!macroend
|
||||
!define AtLeastDotNetServicePack `AtLeastDotNetServicePack`
|
||||
|
||||
|
||||
!macro _AtMostDotNetServicePack _a _b _t _f
|
||||
${CallArtificialFunction} __DotNetVer_InitVars
|
||||
|
||||
!insertmacro _<= `$__DOTNETVER_${_a}_SP` `${_b}` `${_t}` `${_f}`
|
||||
!macroend
|
||||
!define AtMostDotNetServicePack `AtMostDotNetServicePack`
|
||||
|
||||
|
||||
!macro _IsDotNetServicePack _a _b _t _f
|
||||
${CallArtificialFunction} __DotNetVer_InitVars
|
||||
|
||||
!insertmacro _= `$__DOTNETVER_${_a}_SP` `${_b}` `${_t}` `${_f}`
|
||||
!macroend
|
||||
!define IsDotNetServicePack `IsDotNetServicePack`
|
||||
|
||||
!macro _HasDotNetClientProfile _a _b _t _f
|
||||
${CallArtificialFunction} __DotNetVer_InitVars
|
||||
|
||||
!insertmacro _= `$__DOTNET_${_a}_CLIENT` `${_b}` `${_t}` `${_f}`
|
||||
!macroend
|
||||
!define HasDotNetClientProfile `HasDotNetClientProfile`
|
||||
|
||||
!macro _HasDotNetFullProfile _a _b _t _f
|
||||
${CallArtificialFunction} __DotNetVer_InitVars
|
||||
|
||||
!insertmacro _= `$__DOTNET_${_a}_FULL` `${_b}` `${_t}` `${_f}`
|
||||
!macroend
|
||||
!define HasDotNetFullProfile `HasDotNetFullProfile`
|
||||
|
||||
# done
|
||||
|
||||
!endif # !___DOTNETVER__NSH___
|
||||
|
||||
!verbose pop
|
||||
22
Installer/Language/czech.nsi
Normal file
22
Installer/Language/czech.nsi
Normal file
@@ -0,0 +1,22 @@
|
||||
; Czech installer translation
|
||||
|
||||
; Start mRemoteNG after installation
|
||||
LangString LaunchMremoteNow ${LANG_CZECH} "mRemoteNG run CZECH message"
|
||||
|
||||
; Installer Language
|
||||
LangString InstallerLanguage ${LANG_CZECH} "Installer Language"
|
||||
|
||||
; Select installer Language
|
||||
LangString SelectInstallerLanguage ${LANG_CZECH} "Please select the language of the installer"
|
||||
|
||||
; Requires .NET Framework
|
||||
LangString RequiresNetFramework ${LANG_CZECH} "mRemoteNG requires Microsoft .NET Framework 3.0."
|
||||
|
||||
; User needs to be Admin
|
||||
LangString RequiresAdminUser ${LANG_CZECH} "You must be a member of the 'Power Users' or 'Administrators' group to install mRemoteNG."
|
||||
|
||||
; Start Menu items
|
||||
LangString CreditsLinkName ${LANG_CZECH} "Credits"
|
||||
LangString CopyingLinkName ${LANG_CZECH} "License"
|
||||
LangString UninstallLinkName ${LANG_CZECH} "Uninstall"
|
||||
LangString ChangeLogLinkName ${LANG_CZECH} "Version History"
|
||||
22
Installer/Language/dutch.nsi
Normal file
22
Installer/Language/dutch.nsi
Normal file
@@ -0,0 +1,22 @@
|
||||
; Dutch installer translation
|
||||
|
||||
; Start mRemoteNG after installation
|
||||
LangString LaunchMremoteNow ${LANG_DUTCH} "mRemoteNG run DUTCH message"
|
||||
|
||||
; Installer Language
|
||||
LangString InstallerLanguage ${LANG_DUTCH} "Installer Language"
|
||||
|
||||
; Select installer Language
|
||||
LangString SelectInstallerLanguage ${LANG_DUTCH} "Please select the language of the installer"
|
||||
|
||||
; Requires .NET Framework
|
||||
LangString RequiresNetFramework ${LANG_DUTCH} "mRemoteNG requires Microsoft .NET Framework 3.0."
|
||||
|
||||
; User needs to be Admin
|
||||
LangString RequiresAdminUser ${LANG_DUTCH} "You must be a member of the 'Power Users' or 'Administrators' group to install mRemoteNG."
|
||||
|
||||
; Start Menu items
|
||||
LangString CreditsLinkName ${LANG_DUTCH} "Credits"
|
||||
LangString CopyingLinkName ${LANG_DUTCH} "License"
|
||||
LangString UninstallLinkName ${LANG_DUTCH} "Uninstall"
|
||||
LangString ChangeLogLinkName ${LANG_DUTCH} "Version History"
|
||||
22
Installer/Language/english.nsi
Normal file
22
Installer/Language/english.nsi
Normal file
@@ -0,0 +1,22 @@
|
||||
; English installer translation
|
||||
|
||||
; Start mRemoteNG after installation
|
||||
LangString LaunchMremoteNow ${LANG_ENGLISH} "Launch mRemoteNG Now"
|
||||
|
||||
; Installer Language
|
||||
LangString InstallerLanguage ${LANG_ENGLISH} "Installer Language"
|
||||
|
||||
; Select installer Language
|
||||
LangString SelectInstallerLanguage ${LANG_ENGLISH} "Please select the language of the installer"
|
||||
|
||||
; Requires .NET Framework
|
||||
LangString RequiresNetFramework ${LANG_ENGLISH} "mRemoteNG requires Microsoft .NET Framework 3.0."
|
||||
|
||||
; User needs to be Admin
|
||||
LangString RequiresAdminUser ${LANG_ENGLISH} "You must be a member of the 'Power Users' or 'Administrators' group to install mRemoteNG."
|
||||
|
||||
; Start Menu items
|
||||
LangString CreditsLinkName ${LANG_ENGLISH} "Credits"
|
||||
LangString CopyingLinkName ${LANG_ENGLISH} "License"
|
||||
LangString UninstallLinkName ${LANG_ENGLISH} "Uninstall"
|
||||
LangString ChangeLogLinkName ${LANG_ENGLISH} "Version History"
|
||||
22
Installer/Language/french.nsi
Normal file
22
Installer/Language/french.nsi
Normal file
@@ -0,0 +1,22 @@
|
||||
; French installer translation
|
||||
|
||||
; Start mRemoteNG after installation
|
||||
LangString LaunchMremoteNow ${LANG_FRENCH} "mRemoteNG run FRENCH message"
|
||||
|
||||
; Installer Language
|
||||
LangString InstallerLanguage ${LANG_FRENCH} "Installer Language"
|
||||
|
||||
; Select installer Language
|
||||
LangString SelectInstallerLanguage ${LANG_FRENCH} "Please select the language of the installer"
|
||||
|
||||
; Requires .NET Framework
|
||||
LangString RequiresNetFramework ${LANG_FRENCH} "mRemoteNG requires Microsoft .NET Framework 3.0."
|
||||
|
||||
; User needs to be Admin
|
||||
LangString RequiresAdminUser ${LANG_FRENCH} "You must be a member of the 'Power Users' or 'Administrators' group to install mRemoteNG."
|
||||
|
||||
; Start Menu items
|
||||
LangString CreditsLinkName ${LANG_FRENCH} "Credits"
|
||||
LangString CopyingLinkName ${LANG_FRENCH} "License"
|
||||
LangString UninstallLinkName ${LANG_FRENCH} "Uninstall"
|
||||
LangString ChangeLogLinkName ${LANG_FRENCH} "Version History"
|
||||
22
Installer/Language/german.nsi
Normal file
22
Installer/Language/german.nsi
Normal file
@@ -0,0 +1,22 @@
|
||||
; German installer translation
|
||||
|
||||
; Start mRemoteNG after installation
|
||||
LangString LaunchMremoteNow ${LANG_GERMAN} "mRemoteNG jetzt Starten"
|
||||
|
||||
; Installer Language
|
||||
LangString InstallerLanguage ${LANG_GERMAN} "Installationsprogamm Sprache"
|
||||
|
||||
; Select installer Language
|
||||
LangString SelectInstallerLanguage ${LANG_GERMAN} "Bitte w<>hlen Sie die Sprache f<>r das Installationsprogramm"
|
||||
|
||||
; Requires .NET Framework
|
||||
LangString RequiresNetFramework ${LANG_GERMAN} "mRemoteNG ben<65>tigt das Microsoft .NET Framework 3.0."
|
||||
|
||||
; User needs to be Admin
|
||||
LangString RequiresAdminUser ${LANG_GERMAN} "Sie m<>ssen Mitglied der Grupper 'Power Users' or 'Administratoren' sein, damit Sie mRemoteNG installieren k<>nnen."
|
||||
|
||||
; Start Menu items
|
||||
LangString CreditsLinkName ${LANG_GERMAN} "Credits"
|
||||
LangString CopyingLinkName ${LANG_GERMAN} "License"
|
||||
LangString UninstallLinkName ${LANG_GERMAN} "Uninstall"
|
||||
LangString ChangeLogLinkName ${LANG_GERMAN} "Version History"
|
||||
31
Installer/Language/languages.nsi
Normal file
31
Installer/Language/languages.nsi
Normal file
@@ -0,0 +1,31 @@
|
||||
!define LanguageNameEnglish "English"
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
!include "Language\english.nsi"
|
||||
|
||||
!define LanguageNameCzech "Čeština"
|
||||
!insertmacro MUI_LANGUAGE "Czech"
|
||||
!include "Language\czech.nsi"
|
||||
|
||||
!define LanguageNameGerman "Deutsch"
|
||||
!insertmacro MUI_LANGUAGE "German"
|
||||
!include "Language\german.nsi"
|
||||
|
||||
!define LanguageNameSpanish "Español"
|
||||
!insertmacro MUI_LANGUAGE "Spanish"
|
||||
!include "Language\spanish.nsi"
|
||||
|
||||
!define LanguageNameFrench "Français"
|
||||
!insertmacro MUI_LANGUAGE "French"
|
||||
!include "Language\french.nsi"
|
||||
|
||||
!define LanguageNameDutch "Nederlands"
|
||||
!insertmacro MUI_LANGUAGE "Dutch"
|
||||
!include "Language\dutch.nsi"
|
||||
|
||||
!define LanguageNamePolish "Polski"
|
||||
!insertmacro MUI_LANGUAGE "Polish"
|
||||
!include "Language\polish.nsi"
|
||||
|
||||
!define LanguageNameThai "ภาษาไทย"
|
||||
!insertmacro MUI_LANGUAGE "Thai"
|
||||
!include "Language\thai.nsi"
|
||||
22
Installer/Language/polish.nsi
Normal file
22
Installer/Language/polish.nsi
Normal file
@@ -0,0 +1,22 @@
|
||||
; Polish installer translation
|
||||
|
||||
; Start mRemoteNG after installation
|
||||
LangString LaunchMremoteNow ${LANG_POLISH} "mRemoteNG run POLISH message"
|
||||
|
||||
; Installer Language
|
||||
LangString InstallerLanguage ${LANG_POLISH} "Installer Language"
|
||||
|
||||
; Select installer Language
|
||||
LangString SelectInstallerLanguage ${LANG_POLISH} "Please select the language of the installer"
|
||||
|
||||
; Requires .NET Framework
|
||||
LangString RequiresNetFramework ${LANG_POLISH} "mRemoteNG requires Microsoft .NET Framework 3.0."
|
||||
|
||||
; User needs to be Admin
|
||||
LangString RequiresAdminUser ${LANG_POLISH} "You must be a member of the 'Power Users' or 'Administrators' group to install mRemoteNG."
|
||||
|
||||
; Start Menu items
|
||||
LangString CreditsLinkName ${LANG_POLISH} "Credits"
|
||||
LangString CopyingLinkName ${LANG_POLISH} "License"
|
||||
LangString UninstallLinkName ${LANG_POLISH} "Uninstall"
|
||||
LangString ChangeLogLinkName ${LANG_POLISH} "Version History"
|
||||
22
Installer/Language/spanish.nsi
Normal file
22
Installer/Language/spanish.nsi
Normal file
@@ -0,0 +1,22 @@
|
||||
; Spanish installer translation
|
||||
|
||||
; Start mRemoteNG after installation
|
||||
LangString LaunchMremoteNow ${LANG_SPANISH} "Iniciando de mRemoteNG"
|
||||
|
||||
; Installer Language
|
||||
LangString InstallerLanguage ${LANG_SPANISH} "Lenguaje de Instalación"
|
||||
|
||||
; Select installer Language
|
||||
LangString SelectInstallerLanguage ${LANG_SPANISH} "Seleccione el lenguaje de instalación"
|
||||
|
||||
; Requires .NET Framework
|
||||
LangString RequiresNetFramework ${LANG_SPANISH} "mRemoteNG requiere Microsoft .NET Framework 3.0."
|
||||
|
||||
; User needs to be Admin
|
||||
LangString RequiresAdminUser ${LANG_SPANISH} "Debe ser miembro del grupo 'Administradores' para poder instalar mRemoteNG."
|
||||
|
||||
; Start Menu items
|
||||
LangString CreditsLinkName ${LANG_SPANISH} "Créditos"
|
||||
LangString CopyingLinkName ${LANG_SPANISH} "Licencia"
|
||||
LangString UninstallLinkName ${LANG_SPANISH} "Desinstalar"
|
||||
LangString ChangeLogLinkName ${LANG_SPANISH} "Historial de Versiones"
|
||||
23
Installer/Language/thai.nsi
Normal file
23
Installer/Language/thai.nsi
Normal file
@@ -0,0 +1,23 @@
|
||||
; Thai installer translation
|
||||
; Contributed by Apisitt Rattana
|
||||
|
||||
; Start mRemoteNG after installation
|
||||
LangString LaunchMremoteNow ${LANG_THAI} "ขณะนี้กำลังติดตั้ง mRemoteNG"
|
||||
|
||||
; Installer Language
|
||||
LangString InstallerLanguage ${LANG_THAI} "ภาษาสำหรับการติดตั้ง"
|
||||
|
||||
; Select installer Language
|
||||
LangString SelectInstallerLanguage ${LANG_THAI} "กรุณาเลือกภาษาสำหรับการติดตั้ง"
|
||||
|
||||
; Requires .NET Framework
|
||||
LangString RequiresNetFramework ${LANG_THAI} "mRemoteNG มีความต้องการ Microsoft .NET Framework 3.0. เป็นพื้นฐาน"
|
||||
|
||||
; User needs to be Admin
|
||||
LangString RequiresAdminUser ${LANG_THAI} "คุณต้องเป็นสมาชิกในกลุ่มของ 'Power Users' หรือ 'Administrators' เพื่อการติดตั้ง mRemoteNG"
|
||||
|
||||
; Start Menu items
|
||||
LangString CreditsLinkName ${LANG_THAI} "Credits"
|
||||
LangString CopyingLinkName ${LANG_THAI} "License"
|
||||
LangString UninstallLinkName ${LANG_THAI} "Uninstall"
|
||||
LangString ChangeLogLinkName ${LANG_THAI} "Version History"
|
||||
BIN
Installer/RecycleBin.ico
Normal file
BIN
Installer/RecycleBin.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 78 KiB |
BIN
Installer/Setup_Install.ico
Normal file
BIN
Installer/Setup_Install.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 79 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 83 KiB |
@@ -2,33 +2,38 @@
|
||||
!include "WordFunc.nsh"
|
||||
!insertmacro VersionCompare
|
||||
|
||||
!DEFINE PRODUCT_VERSION_MAJOR 1
|
||||
!DEFINE PRODUCT_VERSION_MINOR 62
|
||||
!include "DotNetVer.nsh"
|
||||
!include "..\Release\Version.nsh"
|
||||
|
||||
!DEFINE PRODUCT_VERSION "${PRODUCT_VERSION_MAJOR}.${PRODUCT_VERSION_MINOR}"
|
||||
!DEFINE PRODUCT_VERSION_LONG "${PRODUCT_VERSION_MAJOR}.${PRODUCT_VERSION_MINOR}.0.0"
|
||||
|
||||
; Global Variables
|
||||
Var InstallDotNET
|
||||
; This will be passed in using the /D switch by BUILD.CMD
|
||||
!ifdef PRODUCT_VERSION_TAG
|
||||
!define PRODUCT_VERSION_FRIENDLY "${PRODUCT_VERSION_SHORT}"
|
||||
!define PRODUCT_VERSION_TAGGED "${PRODUCT_VERSION_SHORT}-${PRODUCT_VERSION_TAG}"
|
||||
!else
|
||||
!define PRODUCT_VERSION_FRIENDLY "${PRODUCT_VERSION_SHORT}"
|
||||
!define PRODUCT_VERSION_TAGGED "${PRODUCT_VERSION_SHORT}"
|
||||
!endif
|
||||
|
||||
; Basic Config
|
||||
Name "mRemoteNG ${PRODUCT_VERSION}"
|
||||
OutFile "bin\mRemoteNG-Installer-${PRODUCT_VERSION}.exe"
|
||||
Name "mRemoteNG ${PRODUCT_VERSION_FRIENDLY}"
|
||||
OutFile "..\Release\mRemoteNG-Installer-${PRODUCT_VERSION_TAGGED}.exe"
|
||||
SetCompressor /SOLID lzma
|
||||
InstallDir "$PROGRAMFILES\mRemoteNG"
|
||||
InstallDirRegKey HKLM "Software\mRemoteNG" "InstallPath"
|
||||
RequestExecutionLevel admin
|
||||
|
||||
; Version Information
|
||||
VIProductVersion ${PRODUCT_VERSION_LONG}
|
||||
!DEFINE LANG_ENGLISH "1033-English"
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "mRemoteNG"
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductVersion" ${PRODUCT_VERSION_LONG}
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright <EFBFBD> 2007-2010 Felix Deimel, Riley McArdle"
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "mRemoteNG ${PRODUCT_VERSION} Installer"
|
||||
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" ${PRODUCT_VERSION_LONG}
|
||||
VIProductVersion ${PRODUCT_VERSION}
|
||||
VIAddVersionKey "CompanyName" "Next Generation Software"
|
||||
VIAddVersionKey "ProductName" "mRemoteNG"
|
||||
VIAddVersionKey "ProductVersion" ${PRODUCT_VERSION}
|
||||
VIAddVersionKey "LegalCopyright" "Copyright © 2007-2009 Felix Deimel, 2010-2013 Riley McArdle"
|
||||
VIAddVersionKey "FileDescription" "mRemoteNG ${PRODUCT_VERSION_FRIENDLY} Installer"
|
||||
VIAddVersionKey "FileVersion" ${PRODUCT_VERSION}
|
||||
|
||||
; Design
|
||||
!define MUI_ICON "Setup_Install.ico"
|
||||
!define MUI_UNICON "RecycleBin.ico"
|
||||
!define MUI_HEADERIMAGE
|
||||
!define MUI_HEADERIMAGE_BITMAP "header.bmp" ; optional
|
||||
!define MUI_HEADERIMAGE_BITMAP_NOSTRETCH
|
||||
@@ -48,7 +53,6 @@ VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" ${PRODUCT_VERSION_LONG}
|
||||
|
||||
; Finish Page
|
||||
!define MUI_FINISHPAGE_RUN_NOTCHECKED
|
||||
!define MUI_FINISHPAGE_RUN_Text "Launch mRemoteNG Now"
|
||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\mRemoteNG.exe"
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
|
||||
@@ -56,35 +60,87 @@ VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" ${PRODUCT_VERSION_LONG}
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
|
||||
; Set Language
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
; Get Languages
|
||||
!include "Language\languages.nsi"
|
||||
|
||||
; Set finish page text
|
||||
!define MUI_FINISHPAGE_RUN_Text "$(LaunchMremoteNow)"
|
||||
|
||||
Function .onInit
|
||||
; Check .NET version
|
||||
StrCpy $InstallDotNET "No"
|
||||
Call GetDotNETVersion
|
||||
ClearErrors
|
||||
UserInfo::GetName
|
||||
IfErrors Win9x
|
||||
Pop $0
|
||||
UserInfo::GetAccountType
|
||||
Pop $1
|
||||
# GetOriginalAccountType will check the tokens of the original user of the
|
||||
# current thread/process. If the user tokens were elevated or limited for
|
||||
# this process, GetOriginalAccountType will return the non-restricted
|
||||
# account type.
|
||||
# On Vista with UAC, for example, this is not the same value when running
|
||||
# with `RequestExecutionLevel user`. GetOriginalAccountType will return
|
||||
# "admin" while GetAccountType will return "user".
|
||||
StrCmp $1 "Admin" 0 +3
|
||||
Goto doit
|
||||
StrCmp $1 "Power" 0 +3
|
||||
Goto doit
|
||||
StrCmp $1 "User" 0 +3
|
||||
Goto noop
|
||||
StrCmp $1 "Guest" 0 +3
|
||||
Goto noop
|
||||
MessageBox MB_OK "Unknown error"
|
||||
Goto doit
|
||||
|
||||
${If} $0 == "not found"
|
||||
StrCpy $InstallDotNET "Yes"
|
||||
${EndIf}
|
||||
Win9x:
|
||||
doit:
|
||||
# We can install
|
||||
IfSilent +2
|
||||
Call SelectLanguage
|
||||
Goto end
|
||||
noop:
|
||||
MessageBox MB_OK "$(RequiresAdminUser)"
|
||||
Quit
|
||||
end:
|
||||
FunctionEnd
|
||||
|
||||
StrCpy $0 $0 "" 1 # skip "v"
|
||||
Function SelectLanguage
|
||||
;Language selection dialog
|
||||
Push ""
|
||||
Push ${LANG_ENGLISH}
|
||||
Push ${LanguageNameEnglish}
|
||||
Push ${LANG_GERMAN}
|
||||
Push ${LanguageNameGerman}
|
||||
Push ${LANG_DUTCH}
|
||||
Push ${LanguageNameDutch}
|
||||
Push ${LANG_FRENCH}
|
||||
Push ${LanguageNameFrench}
|
||||
Push ${LANG_POLISH}
|
||||
Push ${LanguageNamePolish}
|
||||
Push ${LANG_SPANISH}
|
||||
Push ${LanguageNameSpanish}
|
||||
Push ${LANG_CZECH}
|
||||
Push ${LanguageNameCzech}
|
||||
Push ${LANG_THAI}
|
||||
Push ${LanguageNameThai}
|
||||
Push A ; A means auto count languages
|
||||
; for the auto count to work the first empty push (Push "") must remain
|
||||
LangDLL::LangDialog "$(InstallerLanguage)" "$(SelectInstallerLanguage)"
|
||||
|
||||
${VersionCompare} $0 "2.0" $1
|
||||
${If} $1 == 2
|
||||
StrCpy $InstallDotNET "Yes"
|
||||
${EndIf}
|
||||
Pop $LANGUAGE
|
||||
StrCmp $LANGUAGE "cancel" 0 +2
|
||||
Abort
|
||||
|
||||
${If} $InstallDotNET == "Yes"
|
||||
MessageBox MB_OK|MB_ICONEXCLAMATION "mRemoteNG requires Microsoft .NET Framework 2.0."
|
||||
; Check .NET version
|
||||
${IfNot} ${HasDotNet3.0}
|
||||
MessageBox MB_OK|MB_ICONEXCLAMATION "$(RequiresNetFramework)"
|
||||
Quit
|
||||
${EndIf}
|
||||
FunctionEnd
|
||||
|
||||
Section "" ; Install
|
||||
SetOutPath $INSTDIR
|
||||
|
||||
SetShellVarContext all
|
||||
|
||||
; AddFiles
|
||||
File /r /x "mRemoteNG.vshost.*" "..\mRemoteV1\bin\Release\*.*"
|
||||
File /r "Dependencies\*.*"
|
||||
@@ -98,15 +154,18 @@ Section "" ; Install
|
||||
|
||||
; Start Menu
|
||||
CreateDirectory "$SMPROGRAMS\mRemoteNG"
|
||||
CreateShortCut "$SMPROGRAMS\mRemoteNG\$(CreditsLinkName).lnk" "$INSTDIR\CREDITS.TXT"
|
||||
CreateShortCut "$SMPROGRAMS\mRemoteNG\$(CopyingLinkName).lnk" "$INSTDIR\COPYING.TXT"
|
||||
CreateShortCut "$SMPROGRAMS\mRemoteNG\mRemoteNG.lnk" "$INSTDIR\mRemoteNG.exe"
|
||||
CreateShortCut "$SMPROGRAMS\mRemoteNG\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
||||
CreateShortCut "$SMPROGRAMS\mRemoteNG\$(UninstallLinkName).lnk" "$INSTDIR\Uninstall.exe"
|
||||
CreateShortCut "$SMPROGRAMS\mRemoteNG\$(ChangeLogLinkName).lnk" "$INSTDIR\CHANGELOG.TXT"
|
||||
|
||||
; Registry
|
||||
WriteRegStr HKLM "Software\mRemoteNG" "InstallPath" $INSTDIR
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\mRemoteNG" "DisplayName" "mRemoteNG"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\mRemoteNG" "Publisher" "mRemoteNG"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\mRemoteNG" "Publisher" "Next Generation Software"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\mRemoteNG" "DisplayIcon" "$INSTDIR\mRemoteNG.exe"
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\mRemoteNG" "EstimatedSize" 5816
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\mRemoteNG" "EstimatedSize" 7080
|
||||
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\mRemoteNG" "DisplayVersion" ${PRODUCT_VERSION}
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\mRemoteNG" "VersionMajor" ${PRODUCT_VERSION_MAJOR}
|
||||
@@ -125,9 +184,10 @@ Section "un.Uninstall"
|
||||
RMDIR /r $INSTDIR
|
||||
|
||||
; Start Menu
|
||||
Delete "$SMPROGRAMS\mRemoteNG\mRemoteNG.lnk"
|
||||
Delete "$SMPROGRAMS\mRemoteNG\Uninstall.lnk"
|
||||
RMDir "$SMPROGRAMS\mRemoteNG"
|
||||
SetShellVarContext all
|
||||
RMDir /r "$SMPROGRAMS\mRemoteNG"
|
||||
SetShellVarContext current
|
||||
RMDir /r "$SMPROGRAMS\mRemoteNG"
|
||||
|
||||
; Registry
|
||||
DeleteRegValue HKLM "Software\mRemoteNG" "InstallPath"
|
||||
@@ -135,15 +195,3 @@ Section "un.Uninstall"
|
||||
DeleteRegKey /ifempty HKCU "Software\mRemoteNG"
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\mRemoteNG"
|
||||
SectionEnd
|
||||
|
||||
Function GetDotNETVersion
|
||||
Push $0
|
||||
Push $1
|
||||
|
||||
System::Call "mscoree::GetCORVersion(w .r0, i ${NSIS_MAX_STRLEN}, *i) i .r1"
|
||||
StrCmp $1 "error" 0 +2
|
||||
StrCpy $0 "not found"
|
||||
|
||||
Pop $1
|
||||
Exch $0
|
||||
FunctionEnd
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 151 KiB |
10
Local.testsettings
Normal file
10
Local.testsettings
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<TestSettings name="Local" id="2a25bb82-f5ff-4a67-b5e9-c6aaa54d1e80" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
|
||||
<Description>These are default test settings for a local test run.</Description>
|
||||
<Deployment enabled="false" />
|
||||
<Execution>
|
||||
<TestTypeSpecific />
|
||||
<AgentRule name="Execution Agents">
|
||||
</AgentRule>
|
||||
</Execution>
|
||||
</TestSettings>
|
||||
26
Sort Language Files.cmd
Normal file
26
Sort Language Files.cmd
Normal file
@@ -0,0 +1,26 @@
|
||||
@echo off
|
||||
|
||||
set TEMP_FOLDER="%TEMP%\Translations.tmp"
|
||||
set SORTRESX="%~dp0\Tools\SortRESX.exe"
|
||||
|
||||
echo.
|
||||
echo This script sorts the language files
|
||||
echo.
|
||||
|
||||
choice /m "Would you like to continue?"
|
||||
|
||||
echo.
|
||||
|
||||
rmdir /s /q %TEMP_FOLDER%
|
||||
mkdir %TEMP_FOLDER%
|
||||
copy "%~dp0\mRemoteV1\Language\*.resx" %TEMP_FOLDER%
|
||||
|
||||
pushd %TEMP_FOLDER%
|
||||
for %%f in (*) do %SORTRESX% %TEMP_FOLDER%\%%f "%~dp0\mRemoteV1\Language\%%f"
|
||||
popd
|
||||
|
||||
rmdir /s /q %TEMP_FOLDER%
|
||||
|
||||
echo Done.
|
||||
echo.
|
||||
pause
|
||||
145
TestProject/ExternalToolTest.vb
Normal file
145
TestProject/ExternalToolTest.vb
Normal file
@@ -0,0 +1,145 @@
|
||||
Imports Microsoft.VisualStudio.TestTools.UnitTesting
|
||||
|
||||
Imports mRemoteNG.Tools
|
||||
Imports mRemoteNG.Connection.PuttySession
|
||||
|
||||
|
||||
'''<summary>
|
||||
'''This is a test class for ExternalToolTest and is intended
|
||||
'''to contain all ExternalToolTest Unit Tests
|
||||
'''</summary>
|
||||
<TestClass()> _
|
||||
Public Class ExternalToolTest
|
||||
'''<summary>
|
||||
'''Gets or sets the test context which provides
|
||||
'''information about and functionality for the current test run.
|
||||
'''</summary>
|
||||
Public Property TestContext() As TestContext
|
||||
|
||||
#Region "Additional test attributes"
|
||||
'
|
||||
'You can use the following additional attributes as you write your tests:
|
||||
'
|
||||
'Use ClassInitialize to run code before running the first test in the class
|
||||
'<ClassInitialize()> _
|
||||
'Public Shared Sub MyClassInitialize(ByVal testContext As TestContext)
|
||||
'End Sub
|
||||
'
|
||||
'Use ClassCleanup to run code after all tests in a class have run
|
||||
'<ClassCleanup()> _
|
||||
'Public Shared Sub MyClassCleanup()
|
||||
'End Sub
|
||||
'
|
||||
'Use TestInitialize to run code before running each test
|
||||
'<TestInitialize()> _
|
||||
'Public Sub MyTestInitialize()
|
||||
'End Sub
|
||||
'
|
||||
'Use TestCleanup to run code after each test has run
|
||||
'<TestCleanup()> _
|
||||
'Public Sub MyTestCleanup()
|
||||
'End Sub
|
||||
'
|
||||
#End Region
|
||||
|
||||
|
||||
'''<summary>
|
||||
'''A test for ParseArguments
|
||||
'''</summary>
|
||||
<TestMethod(), _
|
||||
DeploymentItem("mRemoteNG.exe")> _
|
||||
Public Sub ParseArgumentsTest()
|
||||
Dim externalTool As New ExternalTool
|
||||
|
||||
' ReSharper disable StringLiteralTypo
|
||||
externalTool.ConnectionInfo = New Info()
|
||||
With externalTool.ConnectionInfo
|
||||
.Name = "EMAN"
|
||||
.Hostname = "EMANTSOH"
|
||||
.Port = 9876
|
||||
.Username = "EMANRESU"
|
||||
.Password = "DROWSSAP"
|
||||
.Domain = "NIAMOD"
|
||||
.Description = "NOITPIRCSED"
|
||||
.MacAddress = "SSERDDACAM"
|
||||
.UserField = "DLEIFRESU"
|
||||
End With
|
||||
|
||||
Assert.AreEqual("EMAN, EMANTSOH, 9876, EMANRESU, DROWSSAP, NIAMOD, NOITPIRCSED, SSERDDACAM, DLEIFRESU", externalTool.ParseArguments("%NAME%, %HOSTNAME%, %PORT%, %USERNAME%, %PASSWORD%, %DOMAIN%, %DESCRIPTION%, %MACADDRESS%, %USERFIELD%"))
|
||||
' ReSharper restore StringLiteralTypo
|
||||
|
||||
Assert.AreEqual(Environment.ExpandEnvironmentVariables("%PATH%"), externalTool.ParseArguments("%!PATH%"))
|
||||
|
||||
externalTool.ConnectionInfo.Name = "()%!^""<>&|\""\\"
|
||||
|
||||
Assert.AreEqual("%%", externalTool.ParseArguments("%%"))
|
||||
Assert.AreEqual("% %", externalTool.ParseArguments("% %"))
|
||||
Assert.AreEqual("%-%", externalTool.ParseArguments("%-%"))
|
||||
Assert.AreEqual("%!%", externalTool.ParseArguments("%!%"))
|
||||
Assert.AreEqual("%^%", externalTool.ParseArguments("%^%"))
|
||||
Assert.AreEqual("%%%", externalTool.ParseArguments("%%%"))
|
||||
Assert.AreEqual("%foobar%", externalTool.ParseArguments("%foobar%"))
|
||||
Assert.AreEqual("%-foobar%", externalTool.ParseArguments("%-foobar%"))
|
||||
Assert.AreEqual("%!foobar%", externalTool.ParseArguments("%!foobar%"))
|
||||
Assert.AreEqual("%-!^\", externalTool.ParseArguments("%-!^\"))
|
||||
|
||||
Assert.AreEqual("^(^)^%^!^^\^""^<^>^&^|\\\^""\\", externalTool.ParseArguments("%NAME%"))
|
||||
Assert.AreEqual("^(^)^%^!^^^""^<^>^&^|\^""\\", externalTool.ParseArguments("%-NAME%"))
|
||||
Assert.AreEqual("()%!^""<>&|\""\\", externalTool.ParseArguments("%!NAME%"))
|
||||
|
||||
Assert.AreEqual("^(^)^%^!^^\^""^<^>^&^|\\\^""\\", externalTool.ParseArguments("%name%"))
|
||||
Assert.AreEqual("%^(^)^%^!^^\^""^<^>^&^|\\\^""\\", externalTool.ParseArguments("%%name%"))
|
||||
Assert.AreEqual("^(^)^%^!^^\^""^<^>^&^|\\\^""\\%", externalTool.ParseArguments("%name%%"))
|
||||
Assert.AreEqual("^(^)^%^!^^\^""^<^>^&^|\\\^""\\ ^(^)^%^!^^\^""^<^>^&^|\\\^""\\", externalTool.ParseArguments("%name% %name%"))
|
||||
|
||||
Assert.AreEqual("%-^(^)^%^!^^\^""^<^>^&^|\\\^""\\", externalTool.ParseArguments("%-%name%"))
|
||||
Assert.AreEqual("^(^)^%^!^^\^""^<^>^&^|\\\^""\\-%", externalTool.ParseArguments("%name%-%"))
|
||||
Assert.AreEqual("%!^(^)^%^!^^\^""^<^>^&^|\\\^""\\", externalTool.ParseArguments("%!%name%"))
|
||||
Assert.AreEqual("^(^)^%^!^^\^""^<^>^&^|\\\^""\\!%", externalTool.ParseArguments("%name%!%"))
|
||||
|
||||
Assert.AreEqual("\^(^)^%^!^^\^""^<^>^&^|\\\^""\\", externalTool.ParseArguments("\%NAME%"))
|
||||
Assert.AreEqual("\^(^)^%^!^^\^""^<^>^&^|\\\^""\\NAME%", externalTool.ParseArguments("\%NAME%NAME%"))
|
||||
Assert.AreEqual("%NAME\%", externalTool.ParseArguments("%NAME\%"))
|
||||
|
||||
Assert.AreEqual("""^(^)^%^!^^\^""^<^>^&^|\\\^""\\\\""", externalTool.ParseArguments("""%NAME%"""))
|
||||
Assert.AreEqual("""^(^)^%^!^^^""^<^>^&^|\^""\\""", externalTool.ParseArguments("""%-NAME%"""))
|
||||
Assert.AreEqual("""()%!^""<>&|\""\\""", externalTool.ParseArguments("""%!NAME%"""))
|
||||
|
||||
Assert.AreEqual("""^(^)^%^!^^\^""^<^>^&^|\\\^""\\", externalTool.ParseArguments("""%NAME%"))
|
||||
Assert.AreEqual("""^(^)^%^!^^^""^<^>^&^|\^""\\", externalTool.ParseArguments("""%-NAME%"))
|
||||
Assert.AreEqual("""()%!^""<>&|\""\\", externalTool.ParseArguments("""%!NAME%"))
|
||||
|
||||
Assert.AreEqual("^(^)^%^!^^\^""^<^>^&^|\\\^""\\\\""", externalTool.ParseArguments("%NAME%"""))
|
||||
Assert.AreEqual("^(^)^%^!^^^""^<^>^&^|\^""\\""", externalTool.ParseArguments("%-NAME%"""))
|
||||
Assert.AreEqual("()%!^""<>&|\""\\""", externalTool.ParseArguments("%!NAME%"""))
|
||||
|
||||
Assert.AreEqual(Environment.ExpandEnvironmentVariables("%USERNAME%"), externalTool.ParseArguments("\%USERNAME\%"))
|
||||
Assert.AreEqual(Environment.ExpandEnvironmentVariables("%USERNAME%"), externalTool.ParseArguments("\%-USERNAME\%"))
|
||||
Assert.AreEqual(Environment.ExpandEnvironmentVariables("%USERNAME%"), externalTool.ParseArguments("\%!USERNAME\%"))
|
||||
|
||||
Assert.AreEqual("\^(^)^%^!^^\^""^<^>^&^|\\\^""\\", externalTool.ParseArguments("\%NAME%"))
|
||||
Assert.AreEqual("%NAME\%", externalTool.ParseArguments("%NAME\%"))
|
||||
Assert.AreEqual("\\%NAME\\%", externalTool.ParseArguments("\\%NAME\\%"))
|
||||
Assert.AreEqual("\\\%NAME\\\%", externalTool.ParseArguments("\\\%NAME\\\%"))
|
||||
Assert.AreEqual("\\\\%NAME\\\\%", externalTool.ParseArguments("\\\\%NAME\\\\%"))
|
||||
Assert.AreEqual("\\\\\%NAME\\\\\%", externalTool.ParseArguments("\\\\\%NAME\\\\\%"))
|
||||
|
||||
Assert.AreEqual("%NAME%", externalTool.ParseArguments("^%NAME^%"))
|
||||
Assert.AreEqual("%-NAME%", externalTool.ParseArguments("^%-NAME^%"))
|
||||
Assert.AreEqual("\%NAME\%", externalTool.ParseArguments("\^%NAME\^%"))
|
||||
Assert.AreEqual("\%-NAME\%", externalTool.ParseArguments("\^%-NAME\^%"))
|
||||
|
||||
Assert.AreEqual("^%NAME^%", externalTool.ParseArguments("^^%NAME^^%"))
|
||||
Assert.AreEqual("^%-NAME^%", externalTool.ParseArguments("^^%-NAME^^%"))
|
||||
Assert.AreEqual("^^^^%NAME^^^^%", externalTool.ParseArguments("^^^^^%NAME^^^^^%"))
|
||||
Assert.AreEqual("^^^^%-NAME^^^^%", externalTool.ParseArguments("^^^^^%-NAME^^^^^%"))
|
||||
Assert.AreEqual("^^^^%!NAME^^^^%", externalTool.ParseArguments("^^^^^%!NAME^^^^^%"))
|
||||
|
||||
Assert.AreEqual("blah%blah", externalTool.ParseArguments("blah%blah"))
|
||||
Assert.AreEqual("blah^%blah", externalTool.ParseArguments("blah^%blah"))
|
||||
Assert.AreEqual("blah^^%blah", externalTool.ParseArguments("blah^^%blah"))
|
||||
Assert.AreEqual("blah^^^%blah", externalTool.ParseArguments("blah^^^%blah"))
|
||||
|
||||
Assert.AreEqual("^^^^%-NAME^^^^% ^(^)^%^!^^\^""^<^>^&^|\\\^""\\", externalTool.ParseArguments("^^^^^%-NAME^^^^^% %NAME%"))
|
||||
End Sub
|
||||
End Class
|
||||
37
TestProject/My Project/AssemblyInfo.vb
Normal file
37
TestProject/My Project/AssemblyInfo.vb
Normal file
@@ -0,0 +1,37 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' General Information about an assembly is controlled through the following
|
||||
' set of attributes. Change these attribute values to modify the information
|
||||
' associated with an assembly.
|
||||
|
||||
' Review the values of the assembly attributes
|
||||
|
||||
<Assembly: AssemblyTitle("TestProject")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("")>
|
||||
<Assembly: AssemblyProduct("TestProject")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2013")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: CLSCompliant(True)>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
<Assembly: Guid("8918ad54-4841-44e9-abda-e1b787b02c7c")>
|
||||
|
||||
' Version information for an assembly consists of the following four values:
|
||||
'
|
||||
' Major Version
|
||||
' Minor Version
|
||||
' Build Number
|
||||
' Revision
|
||||
'
|
||||
' You can specify all the values or you can default the Build and Revision Numbers
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
2
TestProject/Test References/mRemoteNG.accessor
Normal file
2
TestProject/Test References/mRemoteNG.accessor
Normal file
@@ -0,0 +1,2 @@
|
||||
mRemoteNG.exe
|
||||
Desktop
|
||||
181
TestProject/TestProject.vbproj
Normal file
181
TestProject/TestProject.vbproj
Normal file
@@ -0,0 +1,181 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>
|
||||
</ProductVersion>
|
||||
<SchemaVersion>
|
||||
</SchemaVersion>
|
||||
<ProjectGuid>{24E0689D-95C0-4AAB-A93F-B8D6B7F0CB97}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>TestProject</RootNamespace>
|
||||
<AssemblyName>TestProject</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>Windows</MyType>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>
|
||||
<ReferencePath>$(DevEnvDir)PublicAssemblies\</ReferencePath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>TestProject.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>TestProject.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ADTree">
|
||||
<HintPath>..\mRemoteV1\References\ADTree.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AxInterop.MSTSCLib">
|
||||
<HintPath>..\mRemoteV1\obj\Debug\AxInterop.MSTSCLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AxInterop.WFICALib">
|
||||
<HintPath>..\mRemoteV1\obj\Debug\AxInterop.WFICALib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DiffieHellman">
|
||||
<HintPath>..\mRemoteV1\References\DiffieHellman.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FilteredPropertyGrid">
|
||||
<HintPath>..\mRemoteV1\References\FilteredPropertyGrid.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Interop.EOLWTSCOM">
|
||||
<HintPath>..\mRemoteV1\obj\Debug\Interop.EOLWTSCOM.dll</HintPath>
|
||||
<EmbedInteropTypes>False</EmbedInteropTypes>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Interop.MSTSCLib">
|
||||
<HintPath>..\mRemoteV1\obj\Debug\Interop.MSTSCLib.dll</HintPath>
|
||||
<EmbedInteropTypes>False</EmbedInteropTypes>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Interop.SHDocVw">
|
||||
<HintPath>..\mRemoteV1\obj\Debug\Interop.SHDocVw.dll</HintPath>
|
||||
<EmbedInteropTypes>False</EmbedInteropTypes>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Interop.WFICALib">
|
||||
<HintPath>..\mRemoteV1\obj\Debug\Interop.WFICALib.dll</HintPath>
|
||||
<EmbedInteropTypes>False</EmbedInteropTypes>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="IPTextBox">
|
||||
<HintPath>..\mRemoteV1\References\IPTextBox.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net">
|
||||
<HintPath>..\mRemoteV1\References\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MagicLibrary, Version=1.7.4.0, Culture=neutral, PublicKeyToken=3a6eb82f876a49bc">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualBasic.PowerPacks.Vs, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
|
||||
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
|
||||
<Reference Include="MiniGeckoBrowser">
|
||||
<HintPath>..\mRemoteV1\References\MiniGeckoBrowser.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MiniTabControl">
|
||||
<HintPath>..\mRemoteV1\References\MiniTabControl.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Org.Mentalis.Security">
|
||||
<HintPath>..\mRemoteV1\References\Org.Mentalis.Security.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PSTaskDialog">
|
||||
<HintPath>..\mRemoteV1\References\PSTaskDialog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Skybound.Gecko">
|
||||
<HintPath>..\mRemoteV1\References\Skybound.Gecko.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<EmbedInteropTypes>False</EmbedInteropTypes>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.DirectoryServices" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Management" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="Tamir.SharpSSH">
|
||||
<HintPath>..\mRemoteV1\References\Tamir.SharpSSH.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="VncSharpNG">
|
||||
<HintPath>..\mRemoteV1\References\VncSharpNG.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WeifenLuo.WinFormsUI.Docking">
|
||||
<HintPath>..\mRemoteV1\References\WeifenLuo.WinFormsUI.Docking.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="Microsoft.VisualStudio.TestTools.UnitTesting" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
|
||||
<Visible>False</Visible>
|
||||
</CodeAnalysisDependentAssemblyPaths>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ExternalToolTest.vb" />
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Shadow Include="Test References\mRemoteNG.accessor" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\SharedLibraryNG\SharedLibraryNG\SharedLibraryNG.csproj">
|
||||
<Project>{0F615504-5F30-4CF2-8341-1DE7FEC95A23}</Project>
|
||||
<Name>SharedLibraryNG</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\mRemoteV1\mRemoteV1.vbproj">
|
||||
<Project>{4934A491-40BC-4E5B-9166-EA1169A220F6}</Project>
|
||||
<Name>mRemoteV1</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" />
|
||||
<!-- 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.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
BIN
Tools/SortRESX.exe
Normal file
BIN
Tools/SortRESX.exe
Normal file
Binary file not shown.
19
TraceAndTestImpact.testsettings
Normal file
19
TraceAndTestImpact.testsettings
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<TestSettings name="Trace and Test Impact" id="e062ce86-3357-43c9-b5c3-6b38a0dc3776" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
|
||||
<Description>These are test settings for Trace and Test Impact.</Description>
|
||||
<Execution>
|
||||
<TestTypeSpecific />
|
||||
<AgentRule name="Execution Agents">
|
||||
<DataCollectors>
|
||||
<DataCollector uri="datacollector://microsoft/SystemInfo/1.0" assemblyQualifiedName="Microsoft.VisualStudio.TestTools.DataCollection.SystemInfo.SystemInfoDataCollector, Microsoft.VisualStudio.TestTools.DataCollection.SystemInfo, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" friendlyName="System Information">
|
||||
</DataCollector>
|
||||
<DataCollector uri="datacollector://microsoft/HttpProxy/1.0" assemblyQualifiedName="Microsoft.VisualStudio.TraceCollector.HttpProxyCollector, Microsoft.VisualStudio.TraceCollector, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" friendlyName="ASP.NET Client Proxy for IntelliTrace and Test Impact">
|
||||
</DataCollector>
|
||||
<DataCollector uri="datacollector://microsoft/TestImpact/1.0" assemblyQualifiedName="Microsoft.VisualStudio.TraceCollector.TestImpactDataCollector, Microsoft.VisualStudio.TraceCollector, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" friendlyName="Test Impact">
|
||||
</DataCollector>
|
||||
<DataCollector uri="datacollector://microsoft/TraceDebugger/1.0" assemblyQualifiedName="Microsoft.VisualStudio.TraceCollector.TraceDebuggerDataCollector, Microsoft.VisualStudio.TraceCollector, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" friendlyName="IntelliTrace">
|
||||
</DataCollector>
|
||||
</DataCollectors>
|
||||
</AgentRule>
|
||||
</Execution>
|
||||
</TestSettings>
|
||||
55
Update Languages.cmd
Normal file
55
Update Languages.cmd
Normal file
@@ -0,0 +1,55 @@
|
||||
@echo off
|
||||
|
||||
set ZIP_FILE="%~dp0\..\mremoteng.zip"
|
||||
set TEMP_FOLDER="%TEMP%\Translations.tmp"
|
||||
set SORTRESX="%~dp0\Tools\SortRESX.exe"
|
||||
set RAR="%ProgramFiles%\WinRAR\WinRAR.exe"
|
||||
|
||||
call :expand %ZIP_FILE%
|
||||
goto :skip
|
||||
:expand
|
||||
set ZIP_FILE="%~f1"
|
||||
exit /b
|
||||
:skip
|
||||
|
||||
echo.
|
||||
echo This script updates the language files with new translations from Crowdin
|
||||
echo.
|
||||
echo Download the latest translation file from Crowdin and place it here:
|
||||
echo.
|
||||
echo %ZIP_FILE%
|
||||
echo.
|
||||
|
||||
choice /m "Would you like to continue?"
|
||||
|
||||
echo.
|
||||
|
||||
mkdir %TEMP_FOLDER%
|
||||
%RAR% x -o+ %ZIP_FILE% *.* %TEMP_FOLDER%
|
||||
|
||||
%SORTRESX% %TEMP_FOLDER%\ar\Language.ar.resx "%~dp0\mRemoteV1\Language\Language.ar.resx"
|
||||
%SORTRESX% %TEMP_FOLDER%\bg\Language.bg.resx "%~dp0\mRemoteV1\Language\Language.bg.resx"
|
||||
%SORTRESX% %TEMP_FOLDER%\de\Language.de.resx "%~dp0\mRemoteV1\Language\Language.de.resx"
|
||||
%SORTRESX% %TEMP_FOLDER%\el\Language.el.resx "%~dp0\mRemoteV1\Language\Language.el.resx"
|
||||
%SORTRESX% %TEMP_FOLDER%\en-US\Language.en.resx "%~dp0\mRemoteV1\Language\Language.en-US.resx"
|
||||
%SORTRESX% %TEMP_FOLDER%\es-AR\Language.es.resx "%~dp0\mRemoteV1\Language\Language.es-AR.resx"
|
||||
%SORTRESX% %TEMP_FOLDER%\es-ES\Language.es.resx "%~dp0\mRemoteV1\Language\Language.es.resx"
|
||||
%SORTRESX% %TEMP_FOLDER%\fr\Language.fr.resx "%~dp0\mRemoteV1\Language\Language.fr.resx"
|
||||
%SORTRESX% %TEMP_FOLDER%\he\Language.he.resx "%~dp0\mRemoteV1\Language\Language.he.resx"
|
||||
%SORTRESX% %TEMP_FOLDER%\hu\Language.hu.resx "%~dp0\mRemoteV1\Language\Language.hu.resx"
|
||||
%SORTRESX% %TEMP_FOLDER%\it\Language.it.resx "%~dp0\mRemoteV1\Language\Language.it.resx"
|
||||
%SORTRESX% %TEMP_FOLDER%\nb\Language.nb.resx "%~dp0\mRemoteV1\Language\Language.nb-NO.resx"
|
||||
%SORTRESX% %TEMP_FOLDER%\nl\Language.nl.resx "%~dp0\mRemoteV1\Language\Language.nl.resx"
|
||||
%SORTRESX% %TEMP_FOLDER%\pl\Language.pl.resx "%~dp0\mRemoteV1\Language\Language.pl.resx"
|
||||
%SORTRESX% %TEMP_FOLDER%\pt-BR\Language.pt.resx "%~dp0\mRemoteV1\Language\Language.pt-BR.resx"
|
||||
%SORTRESX% %TEMP_FOLDER%\pt-PT\Language.pt.resx "%~dp0\mRemoteV1\Language\Language.pt.resx"
|
||||
%SORTRESX% %TEMP_FOLDER%\ru\Language.ru.resx "%~dp0\mRemoteV1\Language\Language.ru.resx"
|
||||
%SORTRESX% %TEMP_FOLDER%\uk\Language.uk.resx "%~dp0\mRemoteV1\Language\Language.uk.resx"
|
||||
%SORTRESX% %TEMP_FOLDER%\zh-CN\Language.zh.resx "%~dp0\mRemoteV1\Language\Language.zh-CN.resx"
|
||||
%SORTRESX% %TEMP_FOLDER%\zh-TW\Language.zh.resx "%~dp0\mRemoteV1\Language\Language.zh-TW.resx"
|
||||
|
||||
rmdir /s /q %TEMP_FOLDER%
|
||||
|
||||
echo Done.
|
||||
echo.
|
||||
pause
|
||||
@@ -1,18 +1,54 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "mRemoteV1", "mRemoteV1\mRemoteV1.vbproj", "{4934A491-40BC-4E5B-9166-EA1169A220F6}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharedLibraryNG", "..\SharedLibraryNG\SharedLibraryNG\SharedLibraryNG.csproj", "{0F615504-5F30-4CF2-8341-1DE7FEC95A23}"
|
||||
EndProject
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "TestProject", "TestProject\TestProject.vbproj", "{24E0689D-95C0-4AAB-A93F-B8D6B7F0CB97}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{38EB1EFD-C8C8-49A2-BCA7-63F7A02B3153}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
Local.testsettings = Local.testsettings
|
||||
mRemoteV1.vsmdi = mRemoteV1.vsmdi
|
||||
TraceAndTestImpact.testsettings = TraceAndTestImpact.testsettings
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(TestCaseManagementSettings) = postSolution
|
||||
CategoryFile = mRemoteV1.vsmdi
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug Portable|Any CPU = Debug Portable|Any CPU
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release Portable|Any CPU = Release Portable|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug Portable|Any CPU.ActiveCfg = Debug Portable|Any CPU
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug Portable|Any CPU.Build.0 = Debug Portable|Any CPU
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Portable|Any CPU.ActiveCfg = Release Portable|Any CPU
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Portable|Any CPU.Build.0 = Release Portable|Any CPU
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Debug Portable|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Debug Portable|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Release Portable|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Release Portable|Any CPU.Build.0 = Release|Any CPU
|
||||
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0F615504-5F30-4CF2-8341-1DE7FEC95A23}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{24E0689D-95C0-4AAB-A93F-B8D6B7F0CB97}.Debug Portable|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{24E0689D-95C0-4AAB-A93F-B8D6B7F0CB97}.Debug Portable|Any CPU.Build.0 = Debug|Any CPU
|
||||
{24E0689D-95C0-4AAB-A93F-B8D6B7F0CB97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{24E0689D-95C0-4AAB-A93F-B8D6B7F0CB97}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{24E0689D-95C0-4AAB-A93F-B8D6B7F0CB97}.Release Portable|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{24E0689D-95C0-4AAB-A93F-B8D6B7F0CB97}.Release Portable|Any CPU.Build.0 = Release|Any CPU
|
||||
{24E0689D-95C0-4AAB-A93F-B8D6B7F0CB97}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{24E0689D-95C0-4AAB-A93F-B8D6B7F0CB97}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
7
mRemoteV1.sln.DotSettings
Normal file
7
mRemoteV1.sln.DotSettings
Normal file
@@ -0,0 +1,7 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/VBNaming/Abbreviations/=ICA/@EntryIndexedValue">ICA</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/VBNaming/Abbreviations/=ID/@EntryIndexedValue">ID</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/VBNaming/Abbreviations/=IP/@EntryIndexedValue">IP</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/VBNaming/Abbreviations/=RDP/@EntryIndexedValue">RDP</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/VBNaming/Abbreviations/=VNC/@EntryIndexedValue">VNC</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/VBNaming/Abbreviations/=XML/@EntryIndexedValue">XML</s:String></wpf:ResourceDictionary>
|
||||
6
mRemoteV1.vsmdi
Normal file
6
mRemoteV1.vsmdi
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<TestLists xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
|
||||
<TestList name="Lists of Tests" id="8c43106b-9dc1-4907-a29f-aa66a61bf5b6">
|
||||
<RunConfiguration id="2a25bb82-f5ff-4a67-b5e9-c6aaa54d1e80" name="Local" storage="local.testsettings" type="Microsoft.VisualStudio.TestTools.Common.TestRunConfiguration, Microsoft.VisualStudio.QualityTools.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
</TestList>
|
||||
</TestLists>
|
||||
@@ -1,149 +0,0 @@
|
||||
Imports System.IO
|
||||
Imports System.Net
|
||||
Imports mRemote.App.Runtime
|
||||
|
||||
Namespace App
|
||||
Public Class Announcement
|
||||
#Region "Private Properties"
|
||||
Private wCl As WebClient
|
||||
Private wPr As WebProxy
|
||||
#End Region
|
||||
|
||||
Private _curAI As Info
|
||||
Public ReadOnly Property curAI() As Info
|
||||
Get
|
||||
Return _curAI
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Function IsAnnouncementAvailable() As Boolean
|
||||
Try
|
||||
Dim aI As Info = GetAnnouncementInfo()
|
||||
|
||||
If aI.InfoOk = False Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
If aI.Name <> My.Settings.LastAnnouncement Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.WarningMsg, "IsAnnouncementAvailable failed" & vbNewLine & ex.Message, True)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function GetAnnouncementInfo() As Info
|
||||
Try
|
||||
Dim strAnnouncement As String = GetAnnouncementFile()
|
||||
|
||||
CreateWebClient()
|
||||
|
||||
Dim aI As New Info()
|
||||
|
||||
If strAnnouncement <> "" Then
|
||||
aI.InfoOk = True
|
||||
|
||||
Try
|
||||
'get Name
|
||||
Dim strName As String = strAnnouncement.Substring(strAnnouncement.IndexOf("Name: ") + 6, strAnnouncement.IndexOf(vbNewLine) - 6)
|
||||
aI.Name = strName
|
||||
|
||||
strAnnouncement = strAnnouncement.Remove(0, strAnnouncement.IndexOf(vbNewLine) + 2)
|
||||
|
||||
'get Download URL
|
||||
Dim strU As String = ""
|
||||
|
||||
strU = strAnnouncement.Substring(strAnnouncement.IndexOf("URL: ") + 5, strAnnouncement.IndexOf(vbNewLine) - 5)
|
||||
|
||||
aI.URL = strU
|
||||
Catch ex As Exception
|
||||
aI.InfoOk = False
|
||||
End Try
|
||||
Else
|
||||
aI.InfoOk = False
|
||||
End If
|
||||
|
||||
_curAI = aI
|
||||
Return aI
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.WarningMsg, "Getting Announcement info failed" & vbNewLine & ex.Message, True)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Function GetAnnouncementFile() As String
|
||||
Try
|
||||
CreateWebClient()
|
||||
|
||||
Dim strTemp As String
|
||||
|
||||
Try
|
||||
strTemp = wCl.DownloadString(App.Info.General.URLAnnouncement)
|
||||
Catch ex As Exception
|
||||
strTemp = ""
|
||||
End Try
|
||||
|
||||
Return strTemp
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.WarningMsg, "GetAnnouncementFile failed" & vbNewLine & ex.Message, True)
|
||||
Return ""
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Private Sub CreateWebClient()
|
||||
wCl = New WebClient()
|
||||
|
||||
If My.Settings.UpdateUseProxy Then
|
||||
wPr = New WebProxy(My.Settings.UpdateProxyAddress, My.Settings.UpdateProxyPort)
|
||||
|
||||
If My.Settings.UpdateProxyUseAuthentication Then
|
||||
Dim cred As ICredentials
|
||||
cred = New NetworkCredential(My.Settings.UpdateProxyAuthUser, Security.Crypt.Decrypt(My.Settings.UpdateProxyAuthPass, App.Info.General.EncryptionKey))
|
||||
|
||||
wPr.Credentials = cred
|
||||
End If
|
||||
|
||||
wCl.Proxy = wPr
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Public Class Info
|
||||
Private _Name As String
|
||||
Public Property Name() As String
|
||||
Get
|
||||
Return _Name
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
_Name = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private _URL As String
|
||||
Public Property URL() As String
|
||||
Get
|
||||
Return _URL
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
_URL = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private _InfoOk As Boolean
|
||||
Public Property InfoOk() As Boolean
|
||||
Get
|
||||
Return _InfoOk
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
_InfoOk = value
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -1,10 +0,0 @@
|
||||
Imports System.IO
|
||||
|
||||
Namespace App
|
||||
Namespace Editions
|
||||
Public Class Spanlink
|
||||
Public Shared Enabled As Boolean = True
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
End Namespace
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports System.Environment
|
||||
Imports System.Threading
|
||||
|
||||
Namespace App
|
||||
Namespace Info
|
||||
@@ -7,37 +8,63 @@ Namespace App
|
||||
Public Shared ReadOnly URLDonate As String = "http://donate.mremoteng.org/"
|
||||
Public Shared ReadOnly URLForum As String = "http://forum.mremoteng.org/"
|
||||
Public Shared ReadOnly URLBugs As String = "http://bugs.mremoteng.org/"
|
||||
Public Shared ReadOnly URLAnnouncement As String = "http://update.mremoteng.org/announcement.txt"
|
||||
Public Shared ReadOnly HomePath As String = My.Application.Info.DirectoryPath
|
||||
Public Shared EncryptionKey As String = "mR3m"
|
||||
Public Shared ReportingFilePath As String = ""
|
||||
Public Shared SmartCodeURL As String = "http://www.s-code.com/products/viewerx/"
|
||||
Public Shared FamFamFamURL As String = "http://www.famfamfam.com/"
|
||||
Public Shared ReadOnly PuttyPath As String = My.Application.Info.DirectoryPath & "\PuTTYNG.exe"
|
||||
Public Shared ReadOnly Property UserAgent As String
|
||||
Get
|
||||
Dim details As New List(Of String)
|
||||
details.Add("compatible")
|
||||
If OSVersion.Platform = PlatformID.Win32NT Then
|
||||
details.Add(String.Format("Windows NT {0}.{1}", OSVersion.Version.Major, OSVersion.Version.Minor))
|
||||
Else
|
||||
details.Add(OSVersion.VersionString)
|
||||
End If
|
||||
If Tools.EnvironmentInfo.IsWow64 Then details.Add("WOW64")
|
||||
details.Add(Thread.CurrentThread.CurrentUICulture.Name)
|
||||
details.Add(String.Format(".NET CLR {0}", Version.ToString()))
|
||||
Dim detailsString As String = String.Join("; ", details.ToArray())
|
||||
|
||||
Return String.Format("Mozilla/4.0 ({0}) {1}/{2}", detailsString, Application.ProductName, Application.ProductVersion)
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
|
||||
Public Class Settings
|
||||
'Exchange to make portable/normal
|
||||
Public Shared ReadOnly SettingsPath As String = GetFolderPath(SpecialFolder.LocalApplicationData) & "\" & My.Application.Info.ProductName
|
||||
'Public Shared ReadOnly SettingsPath As String = My.Application.Info.DirectoryPath
|
||||
|
||||
#If Not PORTABLE Then
|
||||
Public Shared ReadOnly SettingsPath As String = GetFolderPath(SpecialFolder.ApplicationData) & "\" & My.Application.Info.ProductName
|
||||
#Else
|
||||
Public Shared ReadOnly SettingsPath As String = My.Application.Info.DirectoryPath
|
||||
#End If
|
||||
Public Shared ReadOnly LayoutFileName As String = "pnlLayout.xml"
|
||||
Public Shared ReadOnly ExtAppsFilesName As String = "extApps.xml"
|
||||
Public Const ThemesFileName As String = "Themes.xml"
|
||||
End Class
|
||||
|
||||
Public Class Update
|
||||
Public Shared ReadOnly URL As String = "http://update.mremoteng.org/"
|
||||
Public Shared ReadOnly Property FileName As String
|
||||
Get
|
||||
#If DEBUG Then
|
||||
Public Shared ReadOnly File As String = "update-debug.txt"
|
||||
#Else
|
||||
Public Shared ReadOnly File As String = "update.txt"
|
||||
Return "update-debug.txt"
|
||||
#End If
|
||||
Select Case My.Settings.UpdateChannel.ToLowerInvariant()
|
||||
Case "beta"
|
||||
Return "update-beta.txt"
|
||||
Case "debug"
|
||||
Return "update-debug.txt"
|
||||
Case Else
|
||||
Return "update.txt"
|
||||
End Select
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
|
||||
Public Class Connections
|
||||
Public Shared ReadOnly DefaultConnectionsPath As String = App.Info.Settings.SettingsPath
|
||||
Public Shared ReadOnly DefaultConnectionsFile As String = "confCons.xml"
|
||||
Public Shared ReadOnly DefaultConnectionsFileNew As String = "confConsNew.xml"
|
||||
Public Shared ReadOnly ConnectionFileVersion As Double = 2.1
|
||||
Public Shared ReadOnly ConnectionFileVersion As Double = 2.5
|
||||
End Class
|
||||
|
||||
Public Class Credentials
|
||||
|
||||
@@ -2,131 +2,196 @@
|
||||
|
||||
Namespace App
|
||||
Public Class Native
|
||||
#Region "Dll Imports"
|
||||
<DllImport("user32.dll", EntryPoint:="GetWindowThreadProcessId", SetLastError:=True, CharSet:=CharSet.Unicode, ExactSpelling:=True, CallingConvention:=CallingConvention.StdCall)> _
|
||||
Public Shared Function GetWindowThreadProcessId(ByVal hWnd As Long, ByVal lpdwProcessId As Long) As Long
|
||||
End Function
|
||||
Private Sub New()
|
||||
' Fix Warning 292 CA1053 : Microsoft.Design : Because type 'Native' contains only 'static' ('Shared' in Visual Basic) members, add a default private constructor to prevent the compiler from adding a default public constructor.
|
||||
End Sub
|
||||
|
||||
<DllImport("user32.dll", SetLastError:=True)> _
|
||||
Public Shared Function FindWindow(ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr
|
||||
End Function
|
||||
|
||||
<DllImport("user32.dll", SetLastError:=True)> _
|
||||
Public Shared Function SetParent(ByVal hWndChild As IntPtr, ByVal hWndNewParent As IntPtr) As Long
|
||||
End Function
|
||||
|
||||
<DllImport("user32.dll", EntryPoint:="GetWindowLongA", SetLastError:=True)> _
|
||||
Public Shared Function GetWindowLong(ByVal hWnd As IntPtr, ByVal nIndex As Integer) As Long
|
||||
End Function
|
||||
|
||||
<DllImport("user32.dll")> _
|
||||
Public Shared Function SetWindowLong(ByVal hWnd As IntPtr, ByVal nIndex As Integer, ByVal dwNewLong As Integer) As Integer
|
||||
End Function
|
||||
|
||||
<DllImport("user32.dll", SetLastError:=True)> _
|
||||
Public Shared Function SetWindowPos(ByVal hWnd As IntPtr, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
|
||||
End Function
|
||||
|
||||
<DllImport("user32.dll", SetLastError:=True)> _
|
||||
Public Shared Function MoveWindow(ByVal hWnd As IntPtr, ByVal x As Integer, ByVal y As Integer, ByVal cx As Integer, ByVal cy As Integer, ByVal repaint As Boolean) As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport("user32.dll", EntryPoint:="PostMessageA", SetLastError:=True)> _
|
||||
Public Shared Function PostMessage(ByVal hWnd As IntPtr, ByVal Msg As UInteger, ByVal wParam As Integer, ByVal lParam As Integer) As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport("user32")> _
|
||||
Public Shared Function ShowWindow(ByVal hWnd As IntPtr, ByVal nCmdShow As Integer) As Integer
|
||||
End Function
|
||||
|
||||
<DllImport("user32.dll")> _
|
||||
Public Shared Function BringWindowToTop(ByVal hWnd As IntPtr) As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport("user32.dll")> _
|
||||
Public Shared Function SetForegroundWindow(ByVal hWnd As IntPtr) As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport("user32.dll")> _
|
||||
Public Shared Function GetForegroundWindow() As IntPtr
|
||||
End Function
|
||||
|
||||
<DllImport("user32.dll", EntryPoint:="GetWindowTextLengthA")> _
|
||||
Public Shared Function GetWindowTextLength(ByVal hWnd As IntPtr) As Long
|
||||
End Function
|
||||
|
||||
<DllImport("user32.dll")> _
|
||||
Public Shared Function IsIconic(ByVal hWnd As IntPtr) As Integer
|
||||
End Function
|
||||
|
||||
<DllImport("user32.dll")> _
|
||||
Public Shared Function GetSystemMenu(ByVal hWnd As IntPtr, ByVal bRevert As Boolean) As IntPtr
|
||||
End Function
|
||||
|
||||
<DllImport("user32.dll")> _
|
||||
#Region "Functions"
|
||||
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
|
||||
Public Shared Function AppendMenu(ByVal hMenu As IntPtr, ByVal uFlags As Int32, ByVal uIDNewItem As IntPtr, ByVal lpNewItem As String) As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport("user32")> _
|
||||
Public Shared Function InsertMenu(ByVal hMenu As IntPtr, ByVal uPosition As Integer, ByVal uFlags As Integer, ByVal uIDNewItem As IntPtr, ByVal lpNewItem As String) As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport("user32")> _
|
||||
Public Shared Function SetMenuItemBitmaps(ByVal hMenu As IntPtr, ByVal uPosition As Integer, ByVal uFlags As Integer, ByVal hBitmapUnchecked As IntPtr, ByVal hBitmapChecked As IntPtr) As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport("user32")> _
|
||||
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
|
||||
Public Shared Function CreatePopupMenu() As IntPtr
|
||||
End Function
|
||||
|
||||
<DllImport("user32")> _
|
||||
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
|
||||
Public Shared Function FindWindowEx(ByVal parentHandle As IntPtr, ByVal childAfter As IntPtr, ByVal lclassName As String, ByVal windowTitle As String) As IntPtr
|
||||
End Function
|
||||
|
||||
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
|
||||
Public Shared Function GetForegroundWindow() As IntPtr
|
||||
End Function
|
||||
|
||||
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
|
||||
Public Shared Function GetSystemMenu(ByVal hWnd As IntPtr, ByVal bRevert As Boolean) As IntPtr
|
||||
End Function
|
||||
|
||||
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
|
||||
Public Shared Function InsertMenu(ByVal hMenu As IntPtr, ByVal uPosition As Integer, ByVal uFlags As Integer, ByVal uIDNewItem As IntPtr, ByVal lpNewItem As String) As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
|
||||
Public Shared Function IsIconic(ByVal hWnd As IntPtr) As Integer
|
||||
End Function
|
||||
|
||||
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
|
||||
Public Shared Function MoveWindow(ByVal hWnd As IntPtr, ByVal x As Integer, ByVal y As Integer, ByVal cx As Integer, ByVal cy As Integer, ByVal repaint As Boolean) As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
|
||||
Public Shared Function PostMessage(ByVal hWnd As IntPtr, ByVal Msg As UInteger, ByVal wParam As Integer, ByVal lParam As Integer) As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
|
||||
Public Shared Function SendMessage(ByVal hWnd As IntPtr, ByVal msg As Integer, ByVal wparam As Integer, ByVal lparam As Integer) As Integer
|
||||
End Function
|
||||
|
||||
<DllImport("user32")> _
|
||||
Public Shared Function MapVirtualKey(ByVal wCode As Integer, ByVal wMapType As Integer) As Integer
|
||||
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
|
||||
Public Shared Function SetClipboardViewer(ByVal hWndNewViewer As IntPtr) As IntPtr
|
||||
End Function
|
||||
|
||||
<DllImport("user32")> _
|
||||
Public Shared Function PostMessage(ByVal hWnd As IntPtr, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Long
|
||||
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
|
||||
Public Shared Function SetForegroundWindow(ByVal hWnd As IntPtr) As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
|
||||
Public Shared Function SetMenuItemBitmaps(ByVal hMenu As IntPtr, ByVal uPosition As Integer, ByVal uFlags As Integer, ByVal hBitmapUnchecked As IntPtr, ByVal hBitmapChecked As IntPtr) As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
|
||||
Public Shared Function SetParent(ByVal hWndChild As IntPtr, ByVal hWndNewParent As IntPtr) As Long
|
||||
End Function
|
||||
|
||||
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
|
||||
Public Shared Function SetWindowLong(ByVal hWnd As IntPtr, ByVal nIndex As Integer, ByVal dwNewLong As Long) As Integer
|
||||
End Function
|
||||
|
||||
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
|
||||
Public Shared Function ShowWindow(ByVal hWnd As IntPtr, ByVal nCmdShow As Integer) As Integer
|
||||
End Function
|
||||
|
||||
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
|
||||
Public Shared Function WindowFromPoint(ByVal point As Point) As IntPtr
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region "Structures"
|
||||
<StructLayout(LayoutKind.Sequential)> _
|
||||
Public Structure WINDOWPOS
|
||||
Public hwnd As IntPtr
|
||||
Public hwndInsertAfter As IntPtr
|
||||
Public x As Integer
|
||||
Public y As Integer
|
||||
Public cx As Integer
|
||||
Public cy As Integer
|
||||
Public flags As Integer
|
||||
End Structure
|
||||
#End Region
|
||||
|
||||
#Region "Helpers"
|
||||
Public Shared Function MAKELONG(ByRef wLow As Int32, ByRef wHigh As Int32) As Int32
|
||||
Return wLow Or wHigh << 16
|
||||
End Function
|
||||
|
||||
Public Shared Function MAKELPARAM(ByRef wLow As Int32, ByRef wHigh As Int32) As Int32
|
||||
Return MAKELONG(wLow, wHigh)
|
||||
End Function
|
||||
|
||||
Public Shared Function LOWORD(ByRef value As Int32) As Int32
|
||||
Return value And &HFFFF
|
||||
End Function
|
||||
|
||||
Public Shared Function LOWORD(ByRef value As IntPtr) As Int32
|
||||
Return LOWORD(value.ToInt32)
|
||||
End Function
|
||||
|
||||
Public Shared Function HIWORD(ByRef value As Int32) As Int32
|
||||
Return value >> 16
|
||||
End Function
|
||||
|
||||
Public Shared Function HIWORD(ByRef value As IntPtr) As Int32
|
||||
Return HIWORD(value.ToInt32)
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Constants"
|
||||
Public Const SWP_NOOWNERZORDER As Integer = 512
|
||||
Public Const SWP_NOREDRAW As Integer = 8
|
||||
Public Const SWP_NOZORDER As Integer = 4
|
||||
Public Const SWP_SHOWWINDOW As Integer = 64
|
||||
Public Const WS_EX_MDICHILD As Integer = 64
|
||||
Public Const SWP_FRAMECHANGED As Integer = 32
|
||||
Public Const SWP_NOACTIVATE As Integer = 16
|
||||
Public Const SWP_ASYNCWINDOWPOS As Integer = 16384
|
||||
Public Const SWP_NOMOVE As Integer = 2
|
||||
Public Const SWP_NOSIZE As Integer = 1
|
||||
' GetWindowLong
|
||||
Public Const GWL_STYLE As Integer = (-16)
|
||||
Public Const WS_VISIBLE As Integer = 268435456
|
||||
Public Const WM_CLOSE As Integer = 16
|
||||
Public Const WS_CHILD As Integer = 1073741824
|
||||
Public Const WS_MAXIMIZE As Integer = 16777216
|
||||
|
||||
' AppendMenu / ModifyMenu / DeleteMenu / RemoveMenu
|
||||
Public Const MF_BYCOMMAND As Integer = &H0
|
||||
Public Const MF_BYPOSITION As Integer = &H400
|
||||
Public Const MF_STRING As Integer = &H0
|
||||
Public Const MF_POPUP As Integer = &H10
|
||||
Public Const MF_SEPARATOR As Integer = &H800
|
||||
|
||||
' WM_LBUTTONDOWN / WM_LBUTTONUP
|
||||
Public Const MK_LBUTTON As Integer = &H1
|
||||
|
||||
' ShowWindow
|
||||
Public Const SW_SHOWMAXIMIZED As Integer = 3
|
||||
Public Const SW_RESTORE As Integer = 9
|
||||
|
||||
Public Const MF_STRING As Integer = &H0
|
||||
Public Const MF_SEPARATOR As Integer = &H800&
|
||||
Public Const MF_BYCOMMAND As Integer = &H0
|
||||
Public Const MF_BYPOSITION As Integer = &H400
|
||||
Public Const MF_POPUP As Integer = &H10
|
||||
' SetWindowPos / WM_WINDOWPOSCHANGING / WM_WINDOWPOSCHANGED
|
||||
Public Const SWP_NOSIZE As Integer = &H1
|
||||
Public Const SWP_NOMOVE As Integer = &H2
|
||||
Public Const SWP_NOZORDER As Integer = &H4
|
||||
Public Const SWP_NOREDRAW As Integer = &H8
|
||||
Public Const SWP_NOACTIVATE As Integer = &H10
|
||||
Public Const SWP_DRAWFRAME As Integer = &H20
|
||||
Public Const SWP_FRAMECHANGED As Integer = &H20
|
||||
Public Const SWP_SHOWWINDOW As Integer = &H40
|
||||
Public Const SWP_HIDEWINDOW As Integer = &H80
|
||||
Public Const SWP_NOCOPYBITS As Integer = &H100
|
||||
Public Const SWP_NOOWNERZORDER As Integer = &H200
|
||||
Public Const SWP_NOSENDCHANGING As Integer = &H400
|
||||
Public Const SWP_NOCLIENTSIZE As Integer = &H800
|
||||
Public Const SWP_NOCLIENTMOVE As Integer = &H1000
|
||||
Public Const SWP_DEFERERASE As Integer = &H2000
|
||||
Public Const SWP_ASYNCWINDOWPOS As Integer = &H4000
|
||||
Public Const SWP_STATECHANGED As Integer = &H8000
|
||||
|
||||
' WM_ACTIVATE
|
||||
Public Const WA_INACTIVE As Integer = &H0
|
||||
Public Const WA_ACTIVE As Integer = &H1
|
||||
Public Const WA_CLICKACTIVE As Integer = &H2
|
||||
|
||||
' Window Messages
|
||||
Public Const WM_CREATE As Integer = &H1
|
||||
Public Const WM_DESTROY As Integer = &H2
|
||||
Public Const WM_ACTIVATE As Integer = &H6
|
||||
Public Const WM_GETTEXT As Integer = &HD
|
||||
Public Const WM_CLOSE As Integer = &H10
|
||||
Public Const WM_ACTIVATEAPP As Integer = &H1C
|
||||
Public Const WM_MOUSEACTIVATE As Integer = &H21
|
||||
Public Const WM_WINDOWPOSCHANGED As Integer = &H47
|
||||
Public Const WM_KEYDOWN As Integer = &H100
|
||||
Public Const WM_KEYUP As Integer = &H101
|
||||
Public Const WM_SYSCOMMAND As Integer = &H112
|
||||
|
||||
Public Const WM_MOUSEMOVE As Integer = &H200
|
||||
Public Const WM_LBUTTONDOWN As Integer = &H201
|
||||
Public Const WM_LBUTTONUP As Integer = &H202
|
||||
Public Const WM_RBUTTONDOWN As Integer = &H204
|
||||
Public Const WM_RBUTTONUP As Integer = &H205
|
||||
Public Const WM_MBUTTONDOWN As Integer = &H207
|
||||
Public Const WM_MBUTTONUP As Integer = &H208
|
||||
Public Const WM_XBUTTONDOWN As Integer = &H20B
|
||||
Public Const WM_XBUTTONUP As Integer = &H20C
|
||||
Public Const WM_PARENTNOTIFY As Integer = &H210
|
||||
Public Const WM_ENTERSIZEMOVE As Integer = &H231
|
||||
Public Const WM_EXITSIZEMOVE As Integer = &H232
|
||||
Public Const WM_DRAWCLIPBOARD As Integer = &H308
|
||||
Public Const WM_CHANGECBCHAIN As Integer = &H30D
|
||||
|
||||
Public Const WM_KEYDOWN As Integer = &H100
|
||||
Public Const WM_KEYUP As Integer = &H101
|
||||
' Window Styles
|
||||
Public Const WS_MAXIMIZE As Integer = &H1000000
|
||||
Public Const WS_VISIBLE As Integer = &H10000000
|
||||
Public Const WS_CHILD As Integer = &H40000000
|
||||
Public Const WS_EX_MDICHILD As Integer = &H40
|
||||
|
||||
' Virtual Key Codes
|
||||
Public Const VK_CONTROL As Integer = &H11
|
||||
Public Const VK_C As Integer = &H67
|
||||
#End Region
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
66
mRemoteV1/App/App.SupportedCultures.vb
Normal file
66
mRemoteV1/App/App.SupportedCultures.vb
Normal file
@@ -0,0 +1,66 @@
|
||||
Namespace App
|
||||
Public Class SupportedCultures
|
||||
Inherits Dictionary(Of String, String)
|
||||
|
||||
Private Sub New()
|
||||
Dim CultureInfo As Globalization.CultureInfo
|
||||
For Each CultureName As String In My.Settings.SupportedUICultures.Split(",")
|
||||
Try
|
||||
CultureInfo = New Globalization.CultureInfo(CultureName.Trim)
|
||||
Add(CultureInfo.Name, CultureInfo.TextInfo.ToTitleCase(CultureInfo.NativeName))
|
||||
Catch ex As Exception
|
||||
Debug.Print(String.Format("An exception occurred while adding the culture '{0}' to the list of supported cultures. {1}", CultureName, ex.ToString))
|
||||
End Try
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Shared _Instance As SupportedCultures = Nothing
|
||||
Public Shared Sub InstantiateSingleton()
|
||||
If _Instance Is Nothing Then
|
||||
_Instance = New SupportedCultures
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Shared Function IsNameSupported(ByVal CultureName As String) As Boolean
|
||||
Return _Instance.ContainsKey(CultureName)
|
||||
End Function
|
||||
|
||||
Public Shared Function IsNativeNameSupported(ByVal CultureNativeName As String) As Boolean
|
||||
Return _Instance.ContainsValue(CultureNativeName)
|
||||
End Function
|
||||
|
||||
Public Shared ReadOnly Property CultureName(ByVal CultureNativeName As String) As String
|
||||
Get
|
||||
Dim Names(_Instance.Count) As String
|
||||
Dim NativeNames(_Instance.Count) As String
|
||||
|
||||
_Instance.Keys.CopyTo(Names, 0)
|
||||
_Instance.Values.CopyTo(NativeNames, 0)
|
||||
|
||||
For Index As Integer = 0 To _Instance.Count
|
||||
If NativeNames(Index) = CultureNativeName Then
|
||||
Return Names(Index)
|
||||
End If
|
||||
Next
|
||||
|
||||
Throw New System.Collections.Generic.KeyNotFoundException()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Shared ReadOnly Property CultureNativeName(ByVal CultureName As String) As String
|
||||
Get
|
||||
Return _Instance.Item(CultureName)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Shared ReadOnly Property CultureNativeNames() As List(Of String)
|
||||
Get
|
||||
Dim ValueList As New List(Of String)
|
||||
For Each Value As String In _Instance.Values
|
||||
ValueList.Add(Value)
|
||||
Next
|
||||
Return ValueList
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -1,269 +1,431 @@
|
||||
Imports System.IO
|
||||
Imports System.Net
|
||||
Imports mRemote.App.Runtime
|
||||
Imports System.ComponentModel
|
||||
Imports System.Threading
|
||||
Imports mRemoteNG.Tools
|
||||
Imports System.Reflection
|
||||
|
||||
Namespace App
|
||||
Public Class Update
|
||||
Public Event DownloadProgressChanged(ByVal sender As Object, ByVal e As System.Net.DownloadProgressChangedEventArgs)
|
||||
Public Event DownloadCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs, ByVal Success As Boolean)
|
||||
#Region "Events"
|
||||
Public Event GetUpdateInfoCompletedEvent As AsyncCompletedEventHandler
|
||||
Public Event GetChangeLogCompletedEvent As AsyncCompletedEventHandler
|
||||
Public Event GetAnnouncementInfoCompletedEvent As AsyncCompletedEventHandler
|
||||
Public Event DownloadUpdateProgressChangedEvent As DownloadProgressChangedEventHandler
|
||||
Public Event DownloadUpdateCompletedEvent As AsyncCompletedEventHandler
|
||||
#End Region
|
||||
|
||||
#Region "Public Properties"
|
||||
Private _curUI As Info
|
||||
Public ReadOnly Property curUI() As Info
|
||||
Private _currentUpdateInfo As UpdateInfo
|
||||
Public ReadOnly Property CurrentUpdateInfo() As UpdateInfo
|
||||
Get
|
||||
Return _curUI
|
||||
Return _currentUpdateInfo
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private _changeLog As String
|
||||
Public ReadOnly Property ChangeLog() As String
|
||||
Get
|
||||
Return _changeLog
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private _currentAnnouncementInfo As AnnouncementInfo
|
||||
Public ReadOnly Property CurrentAnnouncementInfo() As AnnouncementInfo
|
||||
Get
|
||||
Return _currentAnnouncementInfo
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property IsGetUpdateInfoRunning() As Boolean
|
||||
Get
|
||||
If _getUpdateInfoThread IsNot Nothing Then
|
||||
If _getUpdateInfoThread.IsAlive Then Return True
|
||||
End If
|
||||
Return False
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property IsGetChangeLogRunning() As Boolean
|
||||
Get
|
||||
If _getChangeLogThread IsNot Nothing Then
|
||||
If _getChangeLogThread.IsAlive Then Return True
|
||||
End If
|
||||
Return False
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property IsGetAnnouncementInfoRunning() As Boolean
|
||||
Get
|
||||
If _getAnnouncementInfoThread IsNot Nothing Then
|
||||
If _getAnnouncementInfoThread.IsAlive Then Return True
|
||||
End If
|
||||
Return False
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property IsDownloadUpdateRunning() As Boolean
|
||||
Get
|
||||
Return (_downloadUpdateWebClient IsNot Nothing)
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region "Private Properties"
|
||||
Private wCl As WebClient
|
||||
Private wPr As WebProxy
|
||||
#End Region
|
||||
|
||||
#Region "Public Methods"
|
||||
Public Function IsProxyOK() As Boolean
|
||||
Try
|
||||
Dim uI As Info = GetUpdateInfo()
|
||||
Public Sub New()
|
||||
SetProxySettings()
|
||||
End Sub
|
||||
|
||||
Return uI.InfoOk
|
||||
Public Sub SetProxySettings()
|
||||
SetProxySettings(My.Settings.UpdateUseProxy, My.Settings.UpdateProxyAddress, My.Settings.UpdateProxyPort, My.Settings.UpdateProxyUseAuthentication, My.Settings.UpdateProxyAuthUser, Security.Crypt.Decrypt(My.Settings.UpdateProxyAuthPass, Info.General.EncryptionKey))
|
||||
End Sub
|
||||
|
||||
uI = Nothing
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.WarningMsg, "IsProxyOK (App.Update) failed" & vbNewLine & ex.Message, False)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function IsUpdateAvailable() As Boolean
|
||||
Try
|
||||
Dim uI As Info = GetUpdateInfo()
|
||||
|
||||
If uI.InfoOk = False Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
If uI.Version > My.Application.Info.Version Then
|
||||
Return True
|
||||
Public Sub SetProxySettings(ByVal useProxy As Boolean, ByVal address As String, ByVal port As Integer, ByVal useAuthentication As Boolean, ByVal username As String, ByVal password As String)
|
||||
If useProxy And Not String.IsNullOrEmpty(address) Then
|
||||
If Not port = 0 Then
|
||||
_webProxy = New WebProxy(address, port)
|
||||
Else
|
||||
Return False
|
||||
_webProxy = New WebProxy(address)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.WarningMsg, "IsUpdateAvailable failed" & vbNewLine & ex.Message, True)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function GetUpdateInfo() As Info
|
||||
Try
|
||||
Dim strUpdate As String = GetUpdateFile()
|
||||
|
||||
CreateWebClient()
|
||||
|
||||
Dim uI As New Info()
|
||||
|
||||
If strUpdate <> "" Then
|
||||
uI.InfoOk = True
|
||||
|
||||
Try
|
||||
'get Version
|
||||
Dim strV As String = strUpdate.Substring(strUpdate.IndexOf("Version: ") + 9, strUpdate.IndexOf(vbNewLine) - 9)
|
||||
uI.Version = New Version(strV)
|
||||
|
||||
strUpdate = strUpdate.Remove(0, strUpdate.IndexOf(vbNewLine) + 2)
|
||||
|
||||
'get Download URL
|
||||
Dim strU As String = ""
|
||||
|
||||
strU = strUpdate.Substring(strUpdate.IndexOf("dURL: ") + 6, strUpdate.IndexOf(vbNewLine) - 6).Replace(".exe", "_" & Language.Base.CurrentLanguage.ToString & ".exe")
|
||||
|
||||
uI.DownloadUrl = strU
|
||||
|
||||
strUpdate = strUpdate.Remove(0, strUpdate.IndexOf(vbNewLine) + 2)
|
||||
|
||||
'get Change Log
|
||||
Dim strClURL As String = strUpdate.Substring(strUpdate.IndexOf("clURL: ") + 7, strUpdate.IndexOf(vbNewLine) - 7)
|
||||
Dim strCl As String = wCl.DownloadString(strClURL)
|
||||
uI.ChangeLog = strCl
|
||||
|
||||
strUpdate = strUpdate.Remove(0, strUpdate.IndexOf(vbNewLine) + 2)
|
||||
|
||||
Try
|
||||
'get Image
|
||||
Dim strImgURL As String = strUpdate.Substring(strUpdate.IndexOf("imgURL: ") + 8, strUpdate.IndexOf(vbNewLine) - 8)
|
||||
uI.ImageURL = strImgURL
|
||||
|
||||
strUpdate = strUpdate.Remove(0, strUpdate.IndexOf(vbNewLine) + 2)
|
||||
|
||||
'get Image Link
|
||||
Dim strImgURLLink As String = strUpdate.Substring(strUpdate.IndexOf("imgURLLink: ") + 12, strUpdate.IndexOf(vbNewLine) - 12)
|
||||
uI.ImageURLLink = strImgURLLink
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.WarningMsg, "Update Image Info could not be read." & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
Catch ex As Exception
|
||||
uI.InfoOk = False
|
||||
End Try
|
||||
If useAuthentication Then
|
||||
_webProxy.Credentials = New NetworkCredential(username, password)
|
||||
Else
|
||||
uI.InfoOk = False
|
||||
_webProxy.Credentials = Nothing
|
||||
End If
|
||||
|
||||
_curUI = uI
|
||||
Return uI
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.WarningMsg, "Getting update info failed" & vbNewLine & ex.Message, True)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Function DownloadUpdate(ByVal dURL As String) As Boolean
|
||||
Try
|
||||
CreateWebClient()
|
||||
|
||||
AddHandler wCl.DownloadProgressChanged, AddressOf DLProgressChanged
|
||||
AddHandler wCl.DownloadFileCompleted, AddressOf DLCompleted
|
||||
|
||||
_curUI.UpdateLocation = My.Computer.FileSystem.SpecialDirectories.Temp & "\mRemote_Update.exe"
|
||||
wCl.DownloadFileAsync(New Uri(dURL), _curUI.UpdateLocation)
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.WarningMsg, "Update download failed" & vbNewLine & ex.Message, True)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region "Private Methods"
|
||||
Private Sub CreateWebClient()
|
||||
wCl = New WebClient()
|
||||
|
||||
If My.Settings.UpdateUseProxy Then
|
||||
wPr = New WebProxy(My.Settings.UpdateProxyAddress, My.Settings.UpdateProxyPort)
|
||||
|
||||
If My.Settings.UpdateProxyUseAuthentication Then
|
||||
Dim cred As ICredentials
|
||||
cred = New NetworkCredential(My.Settings.UpdateProxyAuthUser, Security.Crypt.Decrypt(My.Settings.UpdateProxyAuthPass, App.Info.General.EncryptionKey))
|
||||
|
||||
wPr.Credentials = cred
|
||||
End If
|
||||
|
||||
wCl.Proxy = wPr
|
||||
Else
|
||||
_webProxy = Nothing
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function GetUpdateFile() As String
|
||||
Try
|
||||
CreateWebClient()
|
||||
Public Function IsUpdateAvailable() As Boolean
|
||||
If _currentUpdateInfo Is Nothing OrElse Not _currentUpdateInfo.IsValid Then Return False
|
||||
|
||||
Dim strTemp As String
|
||||
|
||||
Try
|
||||
strTemp = wCl.DownloadString(App.Info.Update.URL & App.Info.Update.File)
|
||||
Catch ex As Exception
|
||||
strTemp = ""
|
||||
End Try
|
||||
|
||||
Return strTemp
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.WarningMsg, "GetUpdateFile failed" & vbNewLine & ex.Message, True)
|
||||
Return ""
|
||||
End Try
|
||||
Return _currentUpdateInfo.Version > My.Application.Info.Version
|
||||
End Function
|
||||
|
||||
Private Sub DLProgressChanged(ByVal sender As Object, ByVal e As System.Net.DownloadProgressChangedEventArgs)
|
||||
RaiseEvent DownloadProgressChanged(sender, e)
|
||||
Public Function IsAnnouncementAvailable() As Boolean
|
||||
If _currentAnnouncementInfo Is Nothing OrElse _
|
||||
(Not _currentAnnouncementInfo.IsValid Or _
|
||||
String.IsNullOrEmpty(_currentAnnouncementInfo.Name)) Then Return False
|
||||
|
||||
Return (Not _currentAnnouncementInfo.Name = My.Settings.LastAnnouncement)
|
||||
End Function
|
||||
|
||||
Public Sub GetUpdateInfoAsync()
|
||||
If IsGetUpdateInfoRunning Then _getUpdateInfoThread.Abort()
|
||||
|
||||
_getUpdateInfoThread = New Thread(AddressOf GetUpdateInfo)
|
||||
With _getUpdateInfoThread
|
||||
.SetApartmentState(ApartmentState.STA)
|
||||
.IsBackground = True
|
||||
.Start()
|
||||
End With
|
||||
End Sub
|
||||
|
||||
Private Sub DLCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs)
|
||||
Try
|
||||
Dim fInfo As New FileInfo(_curUI.UpdateLocation)
|
||||
Public Sub GetChangeLogAsync()
|
||||
If _currentUpdateInfo Is Nothing OrElse Not _currentUpdateInfo.IsValid Then
|
||||
Throw New InvalidOperationException("CurrentUpdateInfo is not valid. GetUpdateInfoAsync() must be called before calling GetChangeLogAsync().")
|
||||
End If
|
||||
|
||||
If fInfo.Length > 0 Then
|
||||
RaiseEvent DownloadCompleted(sender, e, True)
|
||||
Else
|
||||
fInfo.Delete()
|
||||
RaiseEvent DownloadCompleted(sender, e, False)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.WarningMsg, "DLCompleted failed" & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
If IsGetChangeLogRunning Then _getChangeLogThread.Abort()
|
||||
|
||||
_getChangeLogThread = New Thread(AddressOf GetChangeLog)
|
||||
With _getChangeLogThread
|
||||
.SetApartmentState(ApartmentState.STA)
|
||||
.IsBackground = True
|
||||
.Start()
|
||||
End With
|
||||
End Sub
|
||||
|
||||
Public Sub GetAnnouncementInfoAsync()
|
||||
If IsGetAnnouncementInfoRunning Then _getAnnouncementInfoThread.Abort()
|
||||
|
||||
_getAnnouncementInfoThread = New Thread(AddressOf GetAnnouncementInfo)
|
||||
With _getAnnouncementInfoThread
|
||||
.SetApartmentState(ApartmentState.STA)
|
||||
.IsBackground = True
|
||||
.Start()
|
||||
End With
|
||||
End Sub
|
||||
|
||||
Public Sub DownloadUpdateAsync()
|
||||
If _downloadUpdateWebClient IsNot Nothing Then
|
||||
Throw New InvalidOperationException("A previous call to DownloadUpdateAsync() is still in progress.")
|
||||
End If
|
||||
|
||||
If _currentUpdateInfo Is Nothing OrElse Not _currentUpdateInfo.IsValid Then
|
||||
Throw New InvalidOperationException("CurrentUpdateInfo is not valid. GetUpdateInfoAsync() must be called before calling DownloadUpdateAsync().")
|
||||
End If
|
||||
|
||||
_currentUpdateInfo.UpdateFilePath = Path.Combine(Path.GetTempPath(), Path.ChangeExtension(Path.GetRandomFileName, "exe"))
|
||||
DownloadUpdateWebClient.DownloadFileAsync(CurrentUpdateInfo.DownloadAddress, _currentUpdateInfo.UpdateFilePath)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Private Properties"
|
||||
Private _downloadUpdateWebClient As WebClient
|
||||
Private ReadOnly Property DownloadUpdateWebClient() As WebClient
|
||||
Get
|
||||
If _downloadUpdateWebClient IsNot Nothing Then Return _downloadUpdateWebClient
|
||||
|
||||
_downloadUpdateWebClient = CreateWebClient()
|
||||
|
||||
AddHandler _downloadUpdateWebClient.DownloadProgressChanged, AddressOf DownloadUpdateProgressChanged
|
||||
AddHandler _downloadUpdateWebClient.DownloadFileCompleted, AddressOf DownloadUpdateCompleted
|
||||
|
||||
Public Class Info
|
||||
Private _Version As Version
|
||||
Public Property Version() As Version
|
||||
Get
|
||||
Return _Version
|
||||
End Get
|
||||
Set(ByVal value As Version)
|
||||
_Version = value
|
||||
End Set
|
||||
End Property
|
||||
Return _downloadUpdateWebClient
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Private _DownloadUrl As String
|
||||
Public Property DownloadUrl() As String
|
||||
Get
|
||||
Return _DownloadUrl
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
_DownloadUrl = value
|
||||
End Set
|
||||
End Property
|
||||
#Region "Private Fields"
|
||||
Private _webProxy As WebProxy
|
||||
Private _getUpdateInfoThread As Thread
|
||||
Private _getChangeLogThread As Thread
|
||||
Private _getAnnouncementInfoThread As Thread
|
||||
#End Region
|
||||
|
||||
Private _UpdateLocation As String
|
||||
Public Property UpdateLocation() As String
|
||||
Get
|
||||
Return _UpdateLocation
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
_UpdateLocation = value
|
||||
End Set
|
||||
End Property
|
||||
#Region "Private Methods"
|
||||
Private Function CreateWebClient() As WebClient
|
||||
Dim webClient As New WebClient
|
||||
webClient.Headers.Add("user-agent", Info.General.UserAgent)
|
||||
webClient.Proxy = _webProxy
|
||||
Return webClient
|
||||
End Function
|
||||
|
||||
Private _ChangeLog As String
|
||||
Public Property ChangeLog() As String
|
||||
Get
|
||||
Return _ChangeLog
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
_ChangeLog = value
|
||||
End Set
|
||||
End Property
|
||||
Private Shared Function NewDownloadStringCompletedEventArgs(ByVal result As String, ByVal exception As Exception, ByVal cancelled As Boolean, ByVal userToken As Object) As DownloadStringCompletedEventArgs
|
||||
Dim type As Type = GetType(DownloadStringCompletedEventArgs)
|
||||
Const bindingFlags As BindingFlags = bindingFlags.NonPublic Or bindingFlags.Instance
|
||||
Dim argumentTypes() As Type = {GetType(String), GetType(Exception), GetType(Boolean), GetType(Object)}
|
||||
Dim constructor As ConstructorInfo = type.GetConstructor(bindingFlags, Nothing, argumentTypes, Nothing)
|
||||
Dim arguments() As Object = {result, exception, cancelled, userToken}
|
||||
|
||||
Private _ImageURL As String
|
||||
Public Property ImageURL() As String
|
||||
Get
|
||||
Return _ImageURL
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
_ImageURL = value
|
||||
End Set
|
||||
End Property
|
||||
Return constructor.Invoke(arguments)
|
||||
End Function
|
||||
|
||||
Private _ImageURLLink As String
|
||||
Public Property ImageURLLink() As String
|
||||
Get
|
||||
Return _ImageURLLink
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
_ImageURLLink = value
|
||||
End Set
|
||||
End Property
|
||||
Private Function DownloadString(ByVal address As Uri) As DownloadStringCompletedEventArgs
|
||||
Dim webClient As WebClient = CreateWebClient()
|
||||
Dim result As String = String.Empty
|
||||
Dim exception As Exception = Nothing
|
||||
Dim cancelled As Boolean = False
|
||||
|
||||
Private _InfoOk As Boolean
|
||||
Public Property InfoOk() As Boolean
|
||||
Get
|
||||
Return _InfoOk
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
_InfoOk = value
|
||||
End Set
|
||||
End Property
|
||||
Try
|
||||
result = webClient.DownloadString(address)
|
||||
Catch ex As ThreadAbortException
|
||||
cancelled = True
|
||||
Catch ex As Exception
|
||||
exception = ex
|
||||
End Try
|
||||
|
||||
Return NewDownloadStringCompletedEventArgs(result, exception, cancelled, Nothing)
|
||||
End Function
|
||||
|
||||
Private Sub GetUpdateInfo()
|
||||
Dim updateFileUri As New Uri(New Uri(My.Settings.UpdateAddress), New Uri(Info.Update.FileName, UriKind.Relative))
|
||||
Dim e As DownloadStringCompletedEventArgs = DownloadString(updateFileUri)
|
||||
|
||||
If Not e.Cancelled And e.Error Is Nothing Then
|
||||
_currentUpdateInfo = UpdateInfo.FromString(e.Result)
|
||||
|
||||
My.Settings.CheckForUpdatesLastCheck = Date.UtcNow
|
||||
If Not My.Settings.UpdatePending Then
|
||||
My.Settings.UpdatePending = IsUpdateAvailable()
|
||||
End If
|
||||
End If
|
||||
|
||||
RaiseEvent GetUpdateInfoCompletedEvent(Me, e)
|
||||
End Sub
|
||||
|
||||
Private Sub GetChangeLog()
|
||||
Dim e As DownloadStringCompletedEventArgs = DownloadString(_currentUpdateInfo.ChangeLogAddress)
|
||||
|
||||
If Not e.Cancelled And e.Error Is Nothing Then _changeLog = e.Result
|
||||
|
||||
RaiseEvent GetChangeLogCompletedEvent(Me, e)
|
||||
End Sub
|
||||
|
||||
Private Sub GetAnnouncementInfo()
|
||||
Dim announcementFileUri As New Uri(My.Settings.AnnouncementAddress)
|
||||
Dim e As DownloadStringCompletedEventArgs = DownloadString(announcementFileUri)
|
||||
|
||||
If Not e.Cancelled And e.Error Is Nothing Then
|
||||
_currentAnnouncementInfo = AnnouncementInfo.FromString(e.Result)
|
||||
|
||||
If Not String.IsNullOrEmpty(_currentAnnouncementInfo.Name) Then
|
||||
My.Settings.LastAnnouncement = _currentAnnouncementInfo.Name
|
||||
End If
|
||||
End If
|
||||
|
||||
RaiseEvent GetAnnouncementInfoCompletedEvent(Me, e)
|
||||
End Sub
|
||||
|
||||
Private Sub DownloadUpdateProgressChanged(ByVal sender As Object, ByVal e As DownloadProgressChangedEventArgs)
|
||||
RaiseEvent DownloadUpdateProgressChangedEvent(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub DownloadUpdateCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs)
|
||||
Dim raiseEventArgs As AsyncCompletedEventArgs = e
|
||||
|
||||
If Not e.Cancelled And e.Error Is Nothing Then
|
||||
Try
|
||||
Dim updateAuthenticode As New Authenticode(_currentUpdateInfo.UpdateFilePath)
|
||||
With updateAuthenticode
|
||||
.RequireThumbprintMatch = True
|
||||
.ThumbprintToMatch = _currentUpdateInfo.CertificateThumbprint
|
||||
|
||||
If Not .Verify() = Authenticode.StatusValue.Verified Then
|
||||
If .Status = Authenticode.StatusValue.UnhandledException Then
|
||||
Throw .Exception
|
||||
Else
|
||||
Throw New Exception(.StatusMessage)
|
||||
End If
|
||||
End If
|
||||
End With
|
||||
Catch ex As Exception
|
||||
raiseEventArgs = New AsyncCompletedEventArgs(ex, False, Nothing)
|
||||
End Try
|
||||
End If
|
||||
|
||||
If raiseEventArgs.Cancelled Or raiseEventArgs.Error IsNot Nothing Then
|
||||
File.Delete(_currentUpdateInfo.UpdateFilePath)
|
||||
End If
|
||||
|
||||
RaiseEvent DownloadUpdateCompletedEvent(Me, raiseEventArgs)
|
||||
|
||||
_downloadUpdateWebClient.Dispose()
|
||||
_downloadUpdateWebClient = Nothing
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Public Classes"
|
||||
Public Class UpdateInfo
|
||||
#Region "Public Properties"
|
||||
Public Property IsValid As Boolean
|
||||
Public Property Version As Version
|
||||
Public Property DownloadAddress As Uri
|
||||
Public Property UpdateFilePath As String
|
||||
Public Property ChangeLogAddress As Uri
|
||||
Public Property ImageAddress As Uri
|
||||
Public Property ImageLinkAddress As Uri
|
||||
Public Property CertificateThumbprint As String
|
||||
#End Region
|
||||
|
||||
#Region "Public Methods"
|
||||
Public Shared Function FromString(ByVal input As String) As UpdateInfo
|
||||
Dim newInfo As New UpdateInfo
|
||||
With newInfo
|
||||
If String.IsNullOrEmpty(input) Then
|
||||
.IsValid = False
|
||||
Else
|
||||
Dim updateFile As New UpdateFile(input)
|
||||
.Version = updateFile.GetVersion("Version")
|
||||
.DownloadAddress = updateFile.GetUri("dURL")
|
||||
.ChangeLogAddress = updateFile.GetUri("clURL")
|
||||
.ImageAddress = updateFile.GetUri("imgURL")
|
||||
.ImageLinkAddress = updateFile.GetUri("imgURLLink")
|
||||
.CertificateThumbprint = updateFile.GetThumbprint("CertificateThumbprint")
|
||||
.IsValid = True
|
||||
End If
|
||||
End With
|
||||
Return newInfo
|
||||
End Function
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
Public Class AnnouncementInfo
|
||||
#Region "Public Properties"
|
||||
Public Property IsValid As Boolean
|
||||
Public Property Name As String
|
||||
Public Property Address As Uri
|
||||
#End Region
|
||||
|
||||
#Region "Public Methods"
|
||||
Public Shared Function FromString(ByVal input As String) As AnnouncementInfo
|
||||
Dim newInfo As New AnnouncementInfo
|
||||
With newInfo
|
||||
If String.IsNullOrEmpty(input) Then
|
||||
.IsValid = False
|
||||
Else
|
||||
Dim updateFile As New UpdateFile(input)
|
||||
.Name = updateFile.GetString("Name")
|
||||
.Address = updateFile.GetUri("URL")
|
||||
.IsValid = True
|
||||
End If
|
||||
End With
|
||||
Return newInfo
|
||||
End Function
|
||||
#End Region
|
||||
End Class
|
||||
#End Region
|
||||
|
||||
#Region "Private Classes"
|
||||
Private Class UpdateFile
|
||||
#Region "Public Properties"
|
||||
Private ReadOnly _items As New Dictionary(Of String, String)(StringComparer.InvariantCultureIgnoreCase)
|
||||
' ReSharper disable MemberCanBePrivate.Local
|
||||
Public ReadOnly Property Items() As Dictionary(Of String, String)
|
||||
' ReSharper restore MemberCanBePrivate.Local
|
||||
Get
|
||||
Return _items
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region "Public Methods"
|
||||
Public Sub New(ByVal content As String)
|
||||
FromString(content)
|
||||
End Sub
|
||||
|
||||
' ReSharper disable MemberCanBePrivate.Local
|
||||
Public Sub FromString(ByVal content As String)
|
||||
' ReSharper restore MemberCanBePrivate.Local
|
||||
If String.IsNullOrEmpty(content) Then
|
||||
Else
|
||||
Dim lineSeparators() As Char = New Char() {Chr(&HA), Chr(&HD)}
|
||||
Dim keyValueSeparators() As Char = New Char() {":", "="}
|
||||
Dim commentCharacters() As Char = New Char() {"#", ";", "'"}
|
||||
|
||||
Dim lines() As String = content.Split(lineSeparators, StringSplitOptions.RemoveEmptyEntries)
|
||||
For Each line As String In lines
|
||||
line = line.Trim()
|
||||
If line.Length = 0 Then Continue For
|
||||
If Not line.Substring(0, 1).IndexOfAny(commentCharacters) = -1 Then Continue For
|
||||
|
||||
Dim parts() As String = line.Split(keyValueSeparators, 2)
|
||||
If Not parts.Length = 2 Then Continue For
|
||||
Dim key As String = parts(0).Trim()
|
||||
Dim value As String = parts(1).Trim()
|
||||
|
||||
_items.Add(key, value)
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' ReSharper disable MemberCanBePrivate.Local
|
||||
Public Function GetString(ByVal key As String) As String
|
||||
' ReSharper restore MemberCanBePrivate.Local
|
||||
If Not Items.ContainsKey(key) Then Return String.Empty
|
||||
Return Items(key)
|
||||
End Function
|
||||
|
||||
Public Function GetVersion(ByVal key As String) As Version
|
||||
Dim value As String = GetString(key)
|
||||
If String.IsNullOrEmpty(value) Then Return Nothing
|
||||
Return New Version(value)
|
||||
End Function
|
||||
|
||||
Public Function GetUri(ByVal key As String) As Uri
|
||||
Dim value As String = GetString(key)
|
||||
If String.IsNullOrEmpty(value) Then Return Nothing
|
||||
Return New Uri(value)
|
||||
End Function
|
||||
|
||||
Public Function GetThumbprint(ByVal key As String) As String
|
||||
Return GetString(key).Replace(" ", "").ToUpperInvariant()
|
||||
End Function
|
||||
#End Region
|
||||
End Class
|
||||
#End Region
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
Private Sub MyApplication_Startup(ByVal sender As Object, ByVal e As Microsoft.VisualBasic.ApplicationServices.StartupEventArgs) Handles Me.Startup
|
||||
If My.Settings.SingleInstance Then
|
||||
Dim mutexID As String = "mRemote_SingleInstanceMutex"
|
||||
Dim mutexID As String = "mRemoteNG_SingleInstanceMutex"
|
||||
|
||||
mutex = New System.Threading.Mutex(False, mutexID)
|
||||
|
||||
@@ -63,6 +63,5 @@
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
Imports System.Windows.Forms
|
||||
Imports System.Xml
|
||||
Imports mRemote.App.Runtime
|
||||
Imports System.Globalization
|
||||
Imports mRemoteNG.App.Runtime
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.IO
|
||||
Imports mRemoteNG.My
|
||||
Imports PSTaskDialog
|
||||
|
||||
Namespace Config
|
||||
Namespace Connections
|
||||
@@ -17,9 +20,7 @@ Namespace Config
|
||||
Private sqlQuery As SqlCommand
|
||||
Private sqlRd As SqlDataReader
|
||||
|
||||
Private sqlDB As String = "mRemote"
|
||||
|
||||
Private selNode As TreeNode
|
||||
Private _selectedTreeNode As TreeNode
|
||||
#End Region
|
||||
|
||||
#Region "Public Properties"
|
||||
@@ -43,6 +44,16 @@ Namespace Config
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private _SQLDatabaseName As String
|
||||
Public Property SQLDatabaseName() As String
|
||||
Get
|
||||
Return _SQLDatabaseName
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
_SQLDatabaseName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private _SQLUsername As String
|
||||
Public Property SQLUsername() As String
|
||||
Get
|
||||
@@ -83,10 +94,6 @@ Namespace Config
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Private _ConnectionFileName As String
|
||||
Public Property ConnectionFileName() As String
|
||||
Get
|
||||
@@ -97,35 +104,9 @@ Namespace Config
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private _RootTreeNode As TreeNode
|
||||
Public Property RootTreeNode() As TreeNode
|
||||
Get
|
||||
Return Me._RootTreeNode
|
||||
End Get
|
||||
Set(ByVal value As TreeNode)
|
||||
Me._RootTreeNode = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private _Import As Boolean
|
||||
Public Property Import() As Boolean
|
||||
Get
|
||||
Return Me._Import
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
Me._Import = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private _ConnectionList As Connection.List
|
||||
Public Property ConnectionList() As Connection.List
|
||||
Get
|
||||
Return Me._ConnectionList
|
||||
End Get
|
||||
Set(ByVal value As Connection.List)
|
||||
Me._ConnectionList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private _ContainerList As Container.List
|
||||
Public Property ContainerList() As Container.List
|
||||
@@ -159,30 +140,37 @@ Namespace Config
|
||||
#End Region
|
||||
|
||||
#Region "Public Methods"
|
||||
Public Sub Load()
|
||||
If _UseSQL = True Then
|
||||
Public Sub Load(ByVal import As Boolean)
|
||||
If UseSQL Then
|
||||
LoadFromSQL()
|
||||
SetMainFormText("SQL Server")
|
||||
Else
|
||||
Dim strCons As String = DecryptCompleteFile()
|
||||
LoadFromXML(strCons)
|
||||
Dim connections As String = DecryptCompleteFile()
|
||||
LoadFromXML(connections, import)
|
||||
End If
|
||||
|
||||
If Import = False Then
|
||||
SetMainFormText(ConnectionFileName)
|
||||
End If
|
||||
frmMain.UsingSqlServer = UseSQL
|
||||
frmMain.ConnectionsFileName = ConnectionFileName
|
||||
|
||||
If Not import Then Putty.Sessions.AddSessionsToTree()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "SQL"
|
||||
Private Delegate Sub LoadFromSqlDelegate()
|
||||
Private Sub LoadFromSQL()
|
||||
If Windows.treeForm Is Nothing OrElse Windows.treeForm.tvConnections Is Nothing Then Return
|
||||
If Windows.treeForm.tvConnections.InvokeRequired Then
|
||||
Windows.treeForm.tvConnections.Invoke(New LoadFromSqlDelegate(AddressOf LoadFromSQL))
|
||||
Return
|
||||
End If
|
||||
|
||||
Try
|
||||
App.Runtime.ConnectionsFileLoaded = False
|
||||
IsConnectionsFileLoaded = False
|
||||
|
||||
If _SQLUsername <> "" Then
|
||||
sqlCon = New SqlConnection("Data Source=" & _SQLHost & ";Initial Catalog=" & sqlDB & ";User Id=" & _SQLUsername & ";Password=" & _SQLPassword)
|
||||
sqlCon = New SqlConnection("Data Source=" & _SQLHost & ";Initial Catalog=" & _SQLDatabaseName & ";User Id=" & _SQLUsername & ";Password=" & _SQLPassword)
|
||||
Else
|
||||
sqlCon = New SqlConnection("Data Source=" & _SQLHost & ";Initial Catalog=" & sqlDB & ";Integrated Security=True")
|
||||
sqlCon = New SqlConnection("Data Source=" & _SQLHost & ";Initial Catalog=" & _SQLDatabaseName & ";Integrated Security=True")
|
||||
End If
|
||||
|
||||
sqlCon.Open()
|
||||
@@ -193,7 +181,7 @@ Namespace Config
|
||||
sqlRd.Read()
|
||||
|
||||
If sqlRd.HasRows = False Then
|
||||
App.Runtime.SaveConnections()
|
||||
SaveConnections()
|
||||
|
||||
sqlQuery = New SqlCommand("SELECT * FROM tblRoot", sqlCon)
|
||||
sqlRd = sqlQuery.ExecuteReader(CommandBehavior.CloseConnection)
|
||||
@@ -201,43 +189,40 @@ Namespace Config
|
||||
sqlRd.Read()
|
||||
End If
|
||||
|
||||
Dim originalCulture As System.Globalization.CultureInfo = My.Application.Culture
|
||||
My.Application.ChangeCulture("en-US")
|
||||
Me.confVersion = Convert.ToDouble(sqlRd.Item("confVersion"))
|
||||
My.Application.ChangeCulture(originalCulture.ToString)
|
||||
confVersion = Convert.ToDouble(sqlRd.Item("confVersion"), CultureInfo.InvariantCulture)
|
||||
Const maxSupportedSchemaVersion As Double = 2.5
|
||||
If confVersion > maxSupportedSchemaVersion Then
|
||||
cTaskDialog.ShowTaskDialogBox(frmMain, Application.ProductName, "Incompatible database schema", String.Format("The database schema on the server is not supported. Please upgrade to a newer version of {0}.", Application.ProductName), String.Format("Schema Version: {1}{0}Highest Supported Version: {2}", vbNewLine, confVersion.ToString(), maxSupportedSchemaVersion.ToString()), "", "", "", "", eTaskDialogButtons.OK, eSysIcons.Error, Nothing)
|
||||
Throw New Exception(String.Format("Incompatible database schema (schema version {0}).", confVersion))
|
||||
End If
|
||||
|
||||
Dim rootNode As TreeNode
|
||||
rootNode = New TreeNode(sqlRd.Item("Name"))
|
||||
RootTreeNode.Name = sqlRd.Item("Name")
|
||||
|
||||
Dim rInfo As New Root.Info(Root.Info.RootType.Connection)
|
||||
rInfo.Name = rootNode.Text
|
||||
rInfo.TreeNode = rootNode
|
||||
Dim rootInfo As New Root.Info(Root.Info.RootType.Connection)
|
||||
rootInfo.Name = RootTreeNode.Name
|
||||
rootInfo.TreeNode = RootTreeNode
|
||||
|
||||
rootNode.Tag = rInfo
|
||||
rootNode.ImageIndex = Images.Enums.TreeImage.Root
|
||||
rootNode.SelectedImageIndex = Images.Enums.TreeImage.Root
|
||||
RootTreeNode.Tag = rootInfo
|
||||
RootTreeNode.ImageIndex = Images.Enums.TreeImage.Root
|
||||
RootTreeNode.SelectedImageIndex = Images.Enums.TreeImage.Root
|
||||
|
||||
If Security.Crypt.Decrypt(sqlRd.Item("Protected"), pW) <> "ThisIsNotProtected" Then
|
||||
If Authenticate(sqlRd.Item("Protected"), False, rInfo) = False Then
|
||||
If Authenticate(sqlRd.Item("Protected"), False, rootInfo) = False Then
|
||||
My.Settings.LoadConsFromCustomLocation = False
|
||||
My.Settings.CustomConsPath = ""
|
||||
rootNode.Remove()
|
||||
RootTreeNode.Remove()
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
'Me._RootTreeNode.Text = rootNode.Text
|
||||
'Me._RootTreeNode.Tag = rootNode.Tag
|
||||
'Me._RootTreeNode.ImageIndex = Images.Enums.TreeImage.Root
|
||||
'Me._RootTreeNode.SelectedImageIndex = Images.Enums.TreeImage.Root
|
||||
|
||||
sqlRd.Close()
|
||||
|
||||
' SECTION 3. Populate the TreeView with the DOM nodes.
|
||||
AddNodesFromSQL(rootNode)
|
||||
'AddNodeFromXML(xDom.DocumentElement, Me._RootTreeNode)
|
||||
Windows.treeForm.tvConnections.BeginUpdate()
|
||||
|
||||
rootNode.Expand()
|
||||
' SECTION 3. Populate the TreeView with the DOM nodes.
|
||||
AddNodesFromSQL(RootTreeNode)
|
||||
|
||||
RootTreeNode.Expand()
|
||||
|
||||
'expand containers
|
||||
For Each contI As Container.Info In Me._ContainerList
|
||||
@@ -246,53 +231,38 @@ Namespace Config
|
||||
End If
|
||||
Next
|
||||
|
||||
Windows.treeForm.tvConnections.EndUpdate()
|
||||
|
||||
'open connections from last mremote session
|
||||
If My.Settings.OpenConsFromLastSession = True And My.Settings.NoReconnect = False Then
|
||||
For Each conI As Connection.Info In Me._ConnectionList
|
||||
For Each conI As Connection.Info In ConnectionList
|
||||
If conI.PleaseConnect = True Then
|
||||
App.Runtime.OpenConnection(conI)
|
||||
OpenConnection(conI)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
'Tree.Node.TreeView.Nodes.Clear()
|
||||
'Tree.Node.TreeView.Nodes.Add(rootNode)
|
||||
|
||||
AddNodeToTree(rootNode)
|
||||
SetSelectedNode(selNode)
|
||||
|
||||
App.Runtime.ConnectionsFileLoaded = True
|
||||
'App.Runtime.Windows.treeForm.InitialRefresh()
|
||||
|
||||
sqlCon.Close()
|
||||
IsConnectionsFileLoaded = True
|
||||
Windows.treeForm.InitialRefresh()
|
||||
SetSelectedNode(_selectedTreeNode)
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "LoadFromSQL failed (Config.Connections.Load)" & vbNewLine & ex.Message, True)
|
||||
Throw
|
||||
Finally
|
||||
If sqlCon IsNot Nothing Then
|
||||
sqlCon.Close()
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Delegate Sub AddNodeToTreeCB(ByVal TreeNode As TreeNode)
|
||||
Private Sub AddNodeToTree(ByVal TreeNode As TreeNode)
|
||||
If Tree.Node.TreeView.InvokeRequired Then
|
||||
Dim d As New AddNodeToTreeCB(AddressOf AddNodeToTree)
|
||||
App.Runtime.Windows.treeForm.Invoke(d, New Object() {TreeNode})
|
||||
Else
|
||||
App.Runtime.Windows.treeForm.tvConnections.Nodes.Clear()
|
||||
App.Runtime.Windows.treeForm.tvConnections.Nodes.Add(TreeNode)
|
||||
App.Runtime.Windows.treeForm.InitialRefresh()
|
||||
Private Delegate Sub SetSelectedNodeDelegate(ByVal treeNode As TreeNode)
|
||||
Private Shared Sub SetSelectedNode(ByVal treeNode As TreeNode)
|
||||
If Tree.Node.TreeView IsNot Nothing AndAlso Tree.Node.TreeView.InvokeRequired Then
|
||||
Windows.treeForm.Invoke(New SetSelectedNodeDelegate(AddressOf SetSelectedNode), New Object() {treeNode})
|
||||
Return
|
||||
End If
|
||||
Windows.treeForm.tvConnections.SelectedNode = treeNode
|
||||
End Sub
|
||||
|
||||
Private Delegate Sub SetSelectedNodeCB(ByVal TreeNode As TreeNode)
|
||||
Private Sub SetSelectedNode(ByVal TreeNode As TreeNode)
|
||||
If Tree.Node.TreeView.InvokeRequired Then
|
||||
Dim d As New SetSelectedNodeCB(AddressOf SetSelectedNode)
|
||||
App.Runtime.Windows.treeForm.Invoke(d, New Object() {TreeNode})
|
||||
Else
|
||||
App.Runtime.Windows.treeForm.tvConnections.SelectedNode = TreeNode
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub AddNodesFromSQL(ByVal baseNode As TreeNode)
|
||||
Try
|
||||
sqlCon.Open()
|
||||
@@ -312,7 +282,7 @@ Namespace Config
|
||||
If Tree.Node.GetNodeTypeFromString(sqlRd.Item("Type")) = Tree.Node.Type.Connection Then
|
||||
Dim conI As Connection.Info = GetConnectionInfoFromSQL()
|
||||
conI.TreeNode = tNode
|
||||
'conI.Parent = prevCont 'NEW
|
||||
'conI.Parent = _previousContainer 'NEW
|
||||
|
||||
Me._ConnectionList.Add(conI)
|
||||
|
||||
@@ -340,7 +310,7 @@ Namespace Config
|
||||
End If
|
||||
|
||||
If conI.ConstantID = _PreviousSelected Then
|
||||
selNode = tNode
|
||||
_selectedTreeNode = tNode
|
||||
End If
|
||||
Else
|
||||
tNode.ImageIndex = Images.Enums.TreeImage.ConnectionClosed
|
||||
@@ -353,7 +323,7 @@ Namespace Config
|
||||
' contI.Parent = tNode.Parent.Tag
|
||||
' End If
|
||||
'End If
|
||||
'prevCont = contI 'NEW
|
||||
'_previousContainer = contI 'NEW
|
||||
contI.TreeNode = tNode
|
||||
|
||||
contI.Name = sqlRd.Item("Name")
|
||||
@@ -373,7 +343,7 @@ Namespace Config
|
||||
End If
|
||||
|
||||
If conI.ConstantID = _PreviousSelected Then
|
||||
selNode = tNode
|
||||
_selectedTreeNode = tNode
|
||||
End If
|
||||
Else
|
||||
If sqlRd.Item("Expanded") = True Then
|
||||
@@ -391,7 +361,10 @@ Namespace Config
|
||||
tNode.SelectedImageIndex = Images.Enums.TreeImage.Container
|
||||
End If
|
||||
|
||||
If sqlRd.Item("ParentID") <> 0 Then
|
||||
Dim parentId As String = sqlRd.Item("ParentID").ToString().Trim()
|
||||
If String.IsNullOrEmpty(parentId) Or parentId = "0" Then
|
||||
baseNode.Nodes.Add(tNode)
|
||||
Else
|
||||
Dim pNode As TreeNode = Tree.Node.GetNodeFromConstantID(sqlRd.Item("ParentID"))
|
||||
|
||||
If pNode IsNot Nothing Then
|
||||
@@ -405,14 +378,12 @@ Namespace Config
|
||||
Else
|
||||
baseNode.Nodes.Add(tNode)
|
||||
End If
|
||||
Else
|
||||
baseNode.Nodes.Add(tNode)
|
||||
End If
|
||||
|
||||
'AddNodesFromSQL(tNode)
|
||||
End While
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "AddNodesFromSQL failed (Config.Connections.Load)" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strAddNodesFromSqlFailed & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@@ -536,6 +507,39 @@ Namespace Config
|
||||
conI.Inherit.ExtApp = .Item("InheritExtApp")
|
||||
End If
|
||||
|
||||
If Me.confVersion >= 2.2 Then
|
||||
conI.RDGatewayUsageMethod = Tools.Misc.StringToEnum(GetType(mRemoteNG.Connection.Protocol.RDP.RDGatewayUsageMethod), .Item("RDGatewayUsageMethod"))
|
||||
conI.RDGatewayHostname = .Item("RDGatewayHostname")
|
||||
conI.RDGatewayUseConnectionCredentials = Tools.Misc.StringToEnum(GetType(mRemoteNG.Connection.Protocol.RDP.RDGatewayUseConnectionCredentials), .Item("RDGatewayUseConnectionCredentials"))
|
||||
conI.RDGatewayUsername = .Item("RDGatewayUsername")
|
||||
conI.RDGatewayPassword = Security.Crypt.Decrypt(.Item("RDGatewayPassword"), pW)
|
||||
conI.RDGatewayDomain = .Item("RDGatewayDomain")
|
||||
conI.Inherit.RDGatewayUsageMethod = .Item("InheritRDGatewayUsageMethod")
|
||||
conI.Inherit.RDGatewayHostname = .Item("InheritRDGatewayHostname")
|
||||
conI.Inherit.RDGatewayUsername = .Item("InheritRDGatewayUsername")
|
||||
conI.Inherit.RDGatewayPassword = .Item("InheritRDGatewayPassword")
|
||||
conI.Inherit.RDGatewayDomain = .Item("InheritRDGatewayDomain")
|
||||
End If
|
||||
|
||||
If Me.confVersion >= 2.3 Then
|
||||
conI.EnableFontSmoothing = .Item("EnableFontSmoothing")
|
||||
conI.EnableDesktopComposition = .Item("EnableDesktopComposition")
|
||||
conI.Inherit.EnableFontSmoothing = .Item("InheritEnableFontSmoothing")
|
||||
conI.Inherit.EnableDesktopComposition = .Item("InheritEnableDesktopComposition")
|
||||
End If
|
||||
|
||||
If confVersion >= 2.4 Then
|
||||
conI.UseCredSsp = .Item("UseCredSsp")
|
||||
conI.Inherit.UseCredSsp = .Item("InheritUseCredSsp")
|
||||
End If
|
||||
|
||||
If confVersion >= 2.5 Then
|
||||
conI.LoadBalanceInfo = .Item("LoadBalanceInfo")
|
||||
conI.AutomaticResize = .Item("AutomaticResize")
|
||||
conI.Inherit.LoadBalanceInfo = .Item("InheritLoadBalanceInfo")
|
||||
conI.Inherit.AutomaticResize = .Item("InheritAutomaticResize")
|
||||
End If
|
||||
|
||||
If SQLUpdate = True Then
|
||||
conI.PleaseConnect = .Item("Connected")
|
||||
End If
|
||||
@@ -543,7 +547,7 @@ Namespace Config
|
||||
|
||||
Return conI
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "GetConnectionInfoFromSQL failed (Config.Connections.Load)" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strGetConnectionInfoFromSqlFailed & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
|
||||
Return Nothing
|
||||
@@ -598,9 +602,9 @@ Namespace Config
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
Private Sub LoadFromXML(Optional ByVal cons As String = "")
|
||||
Private Sub LoadFromXML(ByVal cons As String, ByVal import As Boolean)
|
||||
Try
|
||||
App.Runtime.ConnectionsFileLoaded = False
|
||||
App.Runtime.IsConnectionsFileLoaded = False
|
||||
|
||||
' SECTION 1. Create a DOM Document and load the XML data into it.
|
||||
Me.xDom = New XmlDocument()
|
||||
@@ -611,65 +615,67 @@ Namespace Config
|
||||
End If
|
||||
|
||||
If xDom.DocumentElement.HasAttribute("ConfVersion") Then
|
||||
Dim originalCulture As System.Globalization.CultureInfo = My.Application.Culture
|
||||
My.Application.ChangeCulture("en-US")
|
||||
Me.confVersion = Convert.ToDouble(xDom.DocumentElement.Attributes("ConfVersion").Value)
|
||||
My.Application.ChangeCulture(originalCulture.ToString)
|
||||
Me.confVersion = Convert.ToDouble(xDom.DocumentElement.Attributes("ConfVersion").Value.Replace(",", "."), CultureInfo.InvariantCulture)
|
||||
Else
|
||||
mC.AddMessage(Messages.MessageClass.WarningMsg, "You are trying to load a connection file that was created using an very early version of mRemote, this could result in an runtime error." & vbNewLine & "If you run into such an error, please create a new connection file!")
|
||||
MessageCollector.AddMessage(Messages.MessageClass.WarningMsg, My.Language.strOldConffile)
|
||||
End If
|
||||
|
||||
Const maxSupportedConfVersion As Double = 2.5
|
||||
If confVersion > maxSupportedConfVersion Then
|
||||
cTaskDialog.ShowTaskDialogBox(frmMain, Application.ProductName, "Incompatible connection file format", String.Format("The format of this connection file is not supported. Please upgrade to a newer version of {0}.", Application.ProductName), String.Format("{1}{0}File Format Version: {2}{0}Highest Supported Version: {3}", vbNewLine, ConnectionFileName, confVersion.ToString(), maxSupportedConfVersion.ToString()), "", "", "", "", eTaskDialogButtons.OK, eSysIcons.Error, Nothing)
|
||||
Throw New Exception(String.Format("Incompatible connection file format (file format version {0}).", confVersion))
|
||||
End If
|
||||
|
||||
' SECTION 2. Initialize the treeview control.
|
||||
Dim rootNode As TreeNode
|
||||
Dim rootNodeName As String = ""
|
||||
If xDom.DocumentElement.HasAttribute("Name") Then rootNodeName = xDom.DocumentElement.Attributes("Name").Value.Trim()
|
||||
If Not String.IsNullOrEmpty(rootNodeName) Then
|
||||
RootTreeNode.Name = rootNodeName
|
||||
Else
|
||||
RootTreeNode.Name = xDom.DocumentElement.Name
|
||||
End If
|
||||
RootTreeNode.Text = RootTreeNode.Name
|
||||
|
||||
Try
|
||||
rootNode = New TreeNode(xDom.DocumentElement.Attributes("Name").Value)
|
||||
Catch ex As Exception
|
||||
rootNode = New TreeNode(xDom.DocumentElement.Name)
|
||||
End Try
|
||||
Dim rootInfo As New Root.Info(Root.Info.RootType.Connection)
|
||||
rootInfo.Name = RootTreeNode.Name
|
||||
rootInfo.TreeNode = RootTreeNode
|
||||
|
||||
Dim rInfo As New Root.Info(Root.Info.RootType.Connection)
|
||||
rInfo.Name = rootNode.Text
|
||||
rInfo.TreeNode = rootNode
|
||||
|
||||
rootNode.Tag = rInfo
|
||||
RootTreeNode.Tag = rootInfo
|
||||
|
||||
If Me.confVersion > 1.3 Then '1.4
|
||||
If Security.Crypt.Decrypt(xDom.DocumentElement.Attributes("Protected").Value, pW) <> "ThisIsNotProtected" Then
|
||||
If Authenticate(xDom.DocumentElement.Attributes("Protected").Value, False, rInfo) = False Then
|
||||
If Authenticate(xDom.DocumentElement.Attributes("Protected").Value, False, rootInfo) = False Then
|
||||
My.Settings.LoadConsFromCustomLocation = False
|
||||
My.Settings.CustomConsPath = ""
|
||||
rootNode.Remove()
|
||||
RootTreeNode.Remove()
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim imp As Boolean = False
|
||||
|
||||
If Me.confVersion > 0.9 Then '1.0
|
||||
Dim isExportFile As Boolean = False
|
||||
If confVersion >= 1.0 Then
|
||||
If xDom.DocumentElement.Attributes("Export").Value = True Then
|
||||
imp = True
|
||||
isExportFile = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Me._Import = True And imp = False Then
|
||||
mC.AddMessage(Messages.MessageClass.InformationMsg, "You cannot import a normal connection file." & vbNewLine & "Please use File - Load Connections for normal connection files!")
|
||||
|
||||
Exit Sub
|
||||
If import And Not isExportFile Then
|
||||
MessageCollector.AddMessage(Messages.MessageClass.InformationMsg, My.Language.strCannotImportNormalSessionFile)
|
||||
Return
|
||||
End If
|
||||
|
||||
If imp = False Then
|
||||
Me._RootTreeNode.Text = rootNode.Text
|
||||
Me._RootTreeNode.Tag = rootNode.Tag
|
||||
Me._RootTreeNode.ImageIndex = Images.Enums.TreeImage.Root
|
||||
Me._RootTreeNode.SelectedImageIndex = Images.Enums.TreeImage.Root
|
||||
If Not isExportFile Then
|
||||
RootTreeNode.ImageIndex = Images.Enums.TreeImage.Root
|
||||
RootTreeNode.SelectedImageIndex = Images.Enums.TreeImage.Root
|
||||
End If
|
||||
|
||||
Windows.treeForm.tvConnections.BeginUpdate()
|
||||
|
||||
' SECTION 3. Populate the TreeView with the DOM nodes.
|
||||
AddNodeFromXML(xDom.DocumentElement, Me._RootTreeNode)
|
||||
AddNodeFromXml(xDom.DocumentElement, RootTreeNode)
|
||||
|
||||
Me._RootTreeNode.Expand()
|
||||
RootTreeNode.Expand()
|
||||
|
||||
'expand containers
|
||||
For Each contI As Container.Info In Me._ContainerList
|
||||
@@ -678,105 +684,109 @@ Namespace Config
|
||||
End If
|
||||
Next
|
||||
|
||||
Windows.treeForm.tvConnections.EndUpdate()
|
||||
|
||||
'open connections from last mremote session
|
||||
If My.Settings.OpenConsFromLastSession = True And My.Settings.NoReconnect = False Then
|
||||
For Each conI As Connection.Info In Me._ConnectionList
|
||||
For Each conI As Connection.Info In _ConnectionList
|
||||
If conI.PleaseConnect = True Then
|
||||
App.Runtime.OpenConnection(conI)
|
||||
OpenConnection(conI)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
Me._RootTreeNode.EnsureVisible()
|
||||
RootTreeNode.EnsureVisible()
|
||||
|
||||
App.Runtime.ConnectionsFileLoaded = True
|
||||
App.Runtime.Windows.treeForm.InitialRefresh()
|
||||
IsConnectionsFileLoaded = True
|
||||
Windows.treeForm.InitialRefresh()
|
||||
SetSelectedNode(RootTreeNode)
|
||||
Catch ex As Exception
|
||||
App.Runtime.ConnectionsFileLoaded = False
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "LoadFromXML failed" & vbNewLine & ex.Message, True)
|
||||
App.Runtime.IsConnectionsFileLoaded = False
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strLoadFromXmlFailed & vbNewLine & ex.Message & vbNewLine & ex.StackTrace, True)
|
||||
Throw
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private prevCont As Container.Info
|
||||
Private Sub AddNodeFromXML(ByRef inXmlNode As XmlNode, ByRef inTreeNode As TreeNode)
|
||||
Private _previousContainer As Container.Info
|
||||
Private Sub AddNodeFromXml(ByRef parentXmlNode As XmlNode, ByRef parentTreeNode As TreeNode)
|
||||
Try
|
||||
Dim i As Integer
|
||||
|
||||
Dim xNode As XmlNode
|
||||
Dim xNodeList As XmlNodeList
|
||||
Dim tNode As TreeNode
|
||||
|
||||
' Loop through the XML nodes until the leaf is reached.
|
||||
' Add the nodes to the TreeView during the looping process.
|
||||
If inXmlNode.HasChildNodes() Then
|
||||
xNodeList = inXmlNode.ChildNodes
|
||||
For i = 0 To xNodeList.Count - 1
|
||||
xNode = xNodeList(i)
|
||||
inTreeNode.Nodes.Add(New TreeNode(xNode.Attributes("Name").Value))
|
||||
tNode = inTreeNode.Nodes(i)
|
||||
If parentXmlNode.HasChildNodes() Then
|
||||
For Each xmlNode As XmlNode In parentXmlNode.ChildNodes
|
||||
Dim treeNode As TreeNode = New TreeNode(xmlNode.Attributes("Name").Value)
|
||||
parentTreeNode.Nodes.Add(treeNode)
|
||||
|
||||
If Tree.Node.GetNodeTypeFromString(xNode.Attributes("Type").Value) = Tree.Node.Type.Connection Then 'connection info
|
||||
Dim conI As Connection.Info = GetConnectionInfoFromXml(xNode)
|
||||
conI.TreeNode = tNode
|
||||
conI.Parent = prevCont 'NEW
|
||||
If Tree.Node.GetNodeTypeFromString(xmlNode.Attributes("Type").Value) = Tree.Node.Type.Connection Then 'connection info
|
||||
Dim connectionInfo As Connection.Info = GetConnectionInfoFromXml(xmlNode)
|
||||
connectionInfo.TreeNode = treeNode
|
||||
connectionInfo.Parent = _previousContainer 'NEW
|
||||
|
||||
Me._ConnectionList.Add(conI)
|
||||
ConnectionList.Add(connectionInfo)
|
||||
|
||||
tNode.Tag = conI
|
||||
tNode.ImageIndex = Images.Enums.TreeImage.ConnectionClosed
|
||||
tNode.SelectedImageIndex = Images.Enums.TreeImage.ConnectionClosed
|
||||
ElseIf Tree.Node.GetNodeTypeFromString(xNode.Attributes("Type").Value) = Tree.Node.Type.Container Then 'container info
|
||||
Dim contI As New Container.Info
|
||||
If tNode.Parent IsNot Nothing Then
|
||||
If Tree.Node.GetNodeType(tNode.Parent) = Tree.Node.Type.Container Then
|
||||
contI.Parent = tNode.Parent.Tag
|
||||
treeNode.Tag = connectionInfo
|
||||
treeNode.ImageIndex = Images.Enums.TreeImage.ConnectionClosed
|
||||
treeNode.SelectedImageIndex = Images.Enums.TreeImage.ConnectionClosed
|
||||
ElseIf Tree.Node.GetNodeTypeFromString(xmlNode.Attributes("Type").Value) = Tree.Node.Type.Container Then 'container info
|
||||
Dim containerInfo As New Container.Info
|
||||
If treeNode.Parent IsNot Nothing Then
|
||||
If Tree.Node.GetNodeType(treeNode.Parent) = Tree.Node.Type.Container Then
|
||||
containerInfo.Parent = treeNode.Parent.Tag
|
||||
End If
|
||||
End If
|
||||
prevCont = contI 'NEW
|
||||
contI.TreeNode = tNode
|
||||
_previousContainer = containerInfo 'NEW
|
||||
containerInfo.TreeNode = treeNode
|
||||
|
||||
contI.Name = xNode.Attributes("Name").Value
|
||||
containerInfo.Name = xmlNode.Attributes("Name").Value
|
||||
|
||||
If Me.confVersion > 0.7 Then '0.8
|
||||
If xNode.Attributes("Expanded").Value = "True" Then
|
||||
contI.IsExpanded = True
|
||||
If confVersion >= 0.8 Then
|
||||
If xmlNode.Attributes("Expanded").Value = "True" Then
|
||||
containerInfo.IsExpanded = True
|
||||
Else
|
||||
contI.IsExpanded = False
|
||||
containerInfo.IsExpanded = False
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim conI As Connection.Info
|
||||
If Me.confVersion > 0.8 Then '0.9
|
||||
conI = GetConnectionInfoFromXml(xNode)
|
||||
Dim connectionInfo As Connection.Info
|
||||
If confVersion >= 0.9 Then
|
||||
connectionInfo = GetConnectionInfoFromXml(xmlNode)
|
||||
Else
|
||||
conI = New Connection.Info
|
||||
connectionInfo = New Connection.Info
|
||||
End If
|
||||
|
||||
conI.Parent = contI
|
||||
conI.IsContainer = True
|
||||
contI.ConnectionInfo = conI
|
||||
connectionInfo.Parent = containerInfo
|
||||
connectionInfo.IsContainer = True
|
||||
containerInfo.ConnectionInfo = connectionInfo
|
||||
|
||||
Me._ContainerList.Add(contI)
|
||||
ContainerList.Add(containerInfo)
|
||||
|
||||
tNode.Tag = contI
|
||||
tNode.ImageIndex = Images.Enums.TreeImage.Container
|
||||
tNode.SelectedImageIndex = Images.Enums.TreeImage.Container
|
||||
treeNode.Tag = containerInfo
|
||||
treeNode.ImageIndex = Images.Enums.TreeImage.Container
|
||||
treeNode.SelectedImageIndex = Images.Enums.TreeImage.Container
|
||||
End If
|
||||
|
||||
AddNodeFromXML(xNode, tNode)
|
||||
AddNodeFromXml(xmlNode, treeNode)
|
||||
Next
|
||||
Else
|
||||
inTreeNode.Text = inXmlNode.Attributes("Name").Value.Trim
|
||||
Dim nodeName As String = ""
|
||||
Dim nameAttribute As XmlAttribute = parentXmlNode.Attributes("Name")
|
||||
If Not IsNothing(nameAttribute) Then nodeName = nameAttribute.Value.Trim()
|
||||
If Not String.IsNullOrEmpty(nodeName) Then
|
||||
parentTreeNode.Text = nodeName
|
||||
Else
|
||||
parentTreeNode.Text = parentXmlNode.Name
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "AddNodeFromXML failed" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strAddNodeFromXmlFailed & vbNewLine & ex.Message & ex.StackTrace, True)
|
||||
Throw
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Function GetConnectionInfoFromXml(ByVal xxNode As XmlNode) As Connection.Info
|
||||
Try
|
||||
Dim conI As New Connection.Info
|
||||
Dim conI As New Connection.Info
|
||||
|
||||
Try
|
||||
With xxNode
|
||||
If Me.confVersion > 0.1 Then '0.2
|
||||
conI.Name = .Attributes("Name").Value
|
||||
@@ -872,6 +882,8 @@ Namespace Config
|
||||
conI.Colors = Connection.Protocol.RDP.RDPColors.Colors24Bit
|
||||
Case 3
|
||||
conI.Colors = Connection.Protocol.RDP.RDPColors.Colors32Bit
|
||||
Case 4
|
||||
conI.Colors = Connection.Protocol.RDP.RDPColors.Colors15Bit
|
||||
End Select
|
||||
|
||||
conI.RedirectSound = .Attributes("RedirectSound").Value
|
||||
@@ -907,7 +919,7 @@ Namespace Config
|
||||
conI.Inherit = New Connection.Info.Inheritance(conI, .Attributes("Inherit").Value)
|
||||
|
||||
conI.Icon = .Attributes("Icon").Value.Replace(".ico", "")
|
||||
conI.Panel = "General"
|
||||
conI.Panel = My.Language.strGeneral
|
||||
End If
|
||||
|
||||
If Me.confVersion > 1.4 Then '1.5
|
||||
@@ -915,7 +927,7 @@ Namespace Config
|
||||
End If
|
||||
|
||||
If Me.confVersion > 1.5 Then '1.6
|
||||
conI.ICAEncryption = Tools.Misc.StringToEnum(GetType(mRemote.Connection.Protocol.ICA.EncryptionStrength), .Attributes("ICAEncryptionStrength").Value)
|
||||
conI.ICAEncryption = Tools.Misc.StringToEnum(GetType(mRemoteNG.Connection.Protocol.ICA.EncryptionStrength), .Attributes("ICAEncryptionStrength").Value)
|
||||
conI.Inherit.ICAEncryption = .Attributes("InheritICAEncryptionStrength").Value
|
||||
|
||||
conI.PreExtApp = .Attributes("PreExtApp").Value
|
||||
@@ -925,16 +937,16 @@ Namespace Config
|
||||
End If
|
||||
|
||||
If Me.confVersion > 1.6 Then '1.7
|
||||
conI.VNCCompression = Tools.Misc.StringToEnum(GetType(mRemote.Connection.Protocol.VNC.Compression), .Attributes("VNCCompression").Value)
|
||||
conI.VNCEncoding = Tools.Misc.StringToEnum(GetType(mRemote.Connection.Protocol.VNC.Encoding), .Attributes("VNCEncoding").Value)
|
||||
conI.VNCAuthMode = Tools.Misc.StringToEnum(GetType(mRemote.Connection.Protocol.VNC.AuthMode), .Attributes("VNCAuthMode").Value)
|
||||
conI.VNCProxyType = Tools.Misc.StringToEnum(GetType(mRemote.Connection.Protocol.VNC.ProxyType), .Attributes("VNCProxyType").Value)
|
||||
conI.VNCCompression = Tools.Misc.StringToEnum(GetType(mRemoteNG.Connection.Protocol.VNC.Compression), .Attributes("VNCCompression").Value)
|
||||
conI.VNCEncoding = Tools.Misc.StringToEnum(GetType(mRemoteNG.Connection.Protocol.VNC.Encoding), .Attributes("VNCEncoding").Value)
|
||||
conI.VNCAuthMode = Tools.Misc.StringToEnum(GetType(mRemoteNG.Connection.Protocol.VNC.AuthMode), .Attributes("VNCAuthMode").Value)
|
||||
conI.VNCProxyType = Tools.Misc.StringToEnum(GetType(mRemoteNG.Connection.Protocol.VNC.ProxyType), .Attributes("VNCProxyType").Value)
|
||||
conI.VNCProxyIP = .Attributes("VNCProxyIP").Value
|
||||
conI.VNCProxyPort = .Attributes("VNCProxyPort").Value
|
||||
conI.VNCProxyUsername = .Attributes("VNCProxyUsername").Value
|
||||
conI.VNCProxyPassword = Security.Crypt.Decrypt(.Attributes("VNCProxyPassword").Value, pW)
|
||||
conI.VNCColors = Tools.Misc.StringToEnum(GetType(mRemote.Connection.Protocol.VNC.Colors), .Attributes("VNCColors").Value)
|
||||
conI.VNCSmartSizeMode = Tools.Misc.StringToEnum(GetType(mRemote.Connection.Protocol.VNC.SmartSizeMode), .Attributes("VNCSmartSizeMode").Value)
|
||||
conI.VNCColors = Tools.Misc.StringToEnum(GetType(mRemoteNG.Connection.Protocol.VNC.Colors), .Attributes("VNCColors").Value)
|
||||
conI.VNCSmartSizeMode = Tools.Misc.StringToEnum(GetType(mRemoteNG.Connection.Protocol.VNC.SmartSizeMode), .Attributes("VNCSmartSizeMode").Value)
|
||||
conI.VNCViewOnly = .Attributes("VNCViewOnly").Value
|
||||
|
||||
conI.Inherit.VNCCompression = .Attributes("InheritVNCCompression").Value
|
||||
@@ -951,13 +963,13 @@ Namespace Config
|
||||
End If
|
||||
|
||||
If Me.confVersion > 1.7 Then '1.8
|
||||
conI.RDPAuthenticationLevel = Tools.Misc.StringToEnum(GetType(mRemote.Connection.Protocol.RDP.AuthenticationLevel), .Attributes("RDPAuthenticationLevel").Value)
|
||||
conI.RDPAuthenticationLevel = Tools.Misc.StringToEnum(GetType(mRemoteNG.Connection.Protocol.RDP.AuthenticationLevel), .Attributes("RDPAuthenticationLevel").Value)
|
||||
|
||||
conI.Inherit.RDPAuthenticationLevel = .Attributes("InheritRDPAuthenticationLevel").Value
|
||||
End If
|
||||
|
||||
If Me.confVersion > 1.8 Then '1.9
|
||||
conI.RenderingEngine = Tools.Misc.StringToEnum(GetType(mRemote.Connection.Protocol.HTTPBase.RenderingEngine), .Attributes("RenderingEngine").Value)
|
||||
conI.RenderingEngine = Tools.Misc.StringToEnum(GetType(mRemoteNG.Connection.Protocol.HTTPBase.RenderingEngine), .Attributes("RenderingEngine").Value)
|
||||
conI.MacAddress = .Attributes("MacAddress").Value
|
||||
|
||||
conI.Inherit.RenderingEngine = .Attributes("InheritRenderingEngine").Value
|
||||
@@ -973,19 +985,64 @@ Namespace Config
|
||||
conI.ExtApp = .Attributes("ExtApp").Value
|
||||
conI.Inherit.ExtApp = .Attributes("InheritExtApp").Value
|
||||
End If
|
||||
End With
|
||||
|
||||
Return conI
|
||||
If Me.confVersion > 2.1 Then '2.2
|
||||
' Get settings
|
||||
conI.RDGatewayUsageMethod = Tools.Misc.StringToEnum(GetType(mRemoteNG.Connection.Protocol.RDP.RDGatewayUsageMethod), .Attributes("RDGatewayUsageMethod").Value)
|
||||
conI.RDGatewayHostname = .Attributes("RDGatewayHostname").Value
|
||||
conI.RDGatewayUseConnectionCredentials = Tools.Misc.StringToEnum(GetType(mRemoteNG.Connection.Protocol.RDP.RDGatewayUseConnectionCredentials), .Attributes("RDGatewayUseConnectionCredentials").Value)
|
||||
conI.RDGatewayUsername = .Attributes("RDGatewayUsername").Value
|
||||
conI.RDGatewayPassword = Security.Crypt.Decrypt(.Attributes("RDGatewayPassword").Value, pW)
|
||||
conI.RDGatewayDomain = .Attributes("RDGatewayDomain").Value
|
||||
|
||||
' Get inheritance settings
|
||||
conI.Inherit.RDGatewayUsageMethod = .Attributes("InheritRDGatewayUsageMethod").Value
|
||||
conI.Inherit.RDGatewayHostname = .Attributes("InheritRDGatewayHostname").Value
|
||||
conI.Inherit.RDGatewayUseConnectionCredentials = .Attributes("InheritRDGatewayUseConnectionCredentials").Value
|
||||
conI.Inherit.RDGatewayUsername = .Attributes("InheritRDGatewayUsername").Value
|
||||
conI.Inherit.RDGatewayPassword = .Attributes("InheritRDGatewayPassword").Value
|
||||
conI.Inherit.RDGatewayDomain = .Attributes("InheritRDGatewayDomain").Value
|
||||
End If
|
||||
|
||||
If Me.confVersion > 2.2 Then '2.3
|
||||
' Get settings
|
||||
conI.EnableFontSmoothing = .Attributes("EnableFontSmoothing").Value
|
||||
conI.EnableDesktopComposition = .Attributes("EnableDesktopComposition").Value
|
||||
|
||||
' Get inheritance settings
|
||||
conI.Inherit.EnableFontSmoothing = .Attributes("InheritEnableFontSmoothing").Value
|
||||
conI.Inherit.EnableDesktopComposition = .Attributes("InheritEnableDesktopComposition").Value
|
||||
End If
|
||||
|
||||
If confVersion >= 2.4 Then
|
||||
conI.UseCredSsp = .Attributes("UseCredSsp").Value
|
||||
conI.Inherit.UseCredSsp = .Attributes("InheritUseCredSsp").Value
|
||||
End If
|
||||
|
||||
If confVersion >= 2.5 Then
|
||||
conI.LoadBalanceInfo = .Attributes("LoadBalanceInfo").Value
|
||||
conI.AutomaticResize = .Attributes("AutomaticResize").Value
|
||||
conI.Inherit.LoadBalanceInfo = .Attributes("InheritLoadBalanceInfo").Value
|
||||
conI.Inherit.AutomaticResize = .Attributes("InheritAutomaticResize").Value
|
||||
End If
|
||||
End With
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "GetConnectionInfoFromXml failed" & vbNewLine & ex.Message, True)
|
||||
Return Nothing
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, String.Format(My.Language.strGetConnectionInfoFromXmlFailed, conI.Name, Me.ConnectionFileName, ex.Message), False)
|
||||
End Try
|
||||
Return conI
|
||||
End Function
|
||||
|
||||
Private Function Authenticate(ByVal Value As String, ByVal CompareToOriginalValue As Boolean, Optional ByVal RootInfo As mRemote.Root.Info = Nothing) As Boolean
|
||||
Private Function Authenticate(ByVal Value As String, ByVal CompareToOriginalValue As Boolean, Optional ByVal RootInfo As mRemoteNG.Root.Info = Nothing) As Boolean
|
||||
Dim passwordName As String
|
||||
If UseSQL Then
|
||||
passwordName = Language.strSQLServer.TrimEnd(":")
|
||||
Else
|
||||
passwordName = Path.GetFileName(ConnectionFileName)
|
||||
End If
|
||||
|
||||
If CompareToOriginalValue Then
|
||||
Do Until Security.Crypt.Decrypt(Value, pW) <> Value
|
||||
pW = Tools.Misc.PasswordDialog(False)
|
||||
pW = Tools.Misc.PasswordDialog(passwordName, False)
|
||||
|
||||
If pW = "" Then
|
||||
Return False
|
||||
@@ -993,7 +1050,7 @@ Namespace Config
|
||||
Loop
|
||||
Else
|
||||
Do Until Security.Crypt.Decrypt(Value, pW) = "ThisIsProtected"
|
||||
pW = Tools.Misc.PasswordDialog(False)
|
||||
pW = Tools.Misc.PasswordDialog(passwordName, False)
|
||||
|
||||
If pW = "" Then
|
||||
Return False
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,8 @@
|
||||
Imports System.IO
|
||||
Imports WeifenLuo.WinFormsUI.Docking
|
||||
Imports mRemote.App.Runtime
|
||||
Imports mRemoteNG.App.Runtime
|
||||
Imports System.Xml
|
||||
Imports System.Environment
|
||||
|
||||
Namespace Config
|
||||
Namespace Settings
|
||||
@@ -28,7 +29,11 @@ Namespace Config
|
||||
With Me._MainForm
|
||||
' Migrate settings from previous version
|
||||
If My.Settings.DoUpgrade Then
|
||||
My.Settings.Upgrade()
|
||||
Try
|
||||
My.Settings.Upgrade()
|
||||
Catch ex As Exception
|
||||
Log.Error("My.Settings.Upgrade() failed" & vbNewLine & ex.Message)
|
||||
End Try
|
||||
My.Settings.DoUpgrade = False
|
||||
|
||||
' Clear pending update flag
|
||||
@@ -37,41 +42,60 @@ Namespace Config
|
||||
My.Settings.UpdatePending = False
|
||||
End If
|
||||
|
||||
If My.Settings.MainFormLocation <> New Point(999, 999) Then
|
||||
.Location = My.Settings.MainFormLocation
|
||||
App.SupportedCultures.InstantiateSingleton()
|
||||
If Not My.Settings.OverrideUICulture = "" And App.SupportedCultures.IsNameSupported(My.Settings.OverrideUICulture) Then
|
||||
Threading.Thread.CurrentThread.CurrentUICulture = New Globalization.CultureInfo(My.Settings.OverrideUICulture)
|
||||
log.InfoFormat("Override Culture: {0}/{1}", Threading.Thread.CurrentThread.CurrentUICulture.Name, Threading.Thread.CurrentThread.CurrentUICulture.NativeName)
|
||||
End If
|
||||
|
||||
If My.Settings.MainFormSize <> Nothing Then
|
||||
.Size = My.Settings.MainFormSize
|
||||
End If
|
||||
Themes.ThemeManager.LoadTheme(My.Settings.ThemeName)
|
||||
|
||||
'check if form is visible
|
||||
Dim curScreen As Screen = Screen.FromHandle(.Handle)
|
||||
|
||||
If .Right < curScreen.Bounds.Left Or .Left > curScreen.Bounds.Right _
|
||||
Or .Top * -1 > curScreen.Bounds.Top * -1 Or .Bottom > curScreen.Bounds.Bottom Then
|
||||
.Location = curScreen.Bounds.Location
|
||||
End If
|
||||
|
||||
|
||||
If My.Settings.MainFormState = Nothing Or My.Settings.MainFormState = FormWindowState.Minimized Then
|
||||
.WindowState = FormWindowState.Normal
|
||||
.WindowState = FormWindowState.Normal
|
||||
If My.Settings.MainFormState = FormWindowState.Normal Then
|
||||
If Not My.Settings.MainFormLocation.IsEmpty Then .Location = My.Settings.MainFormLocation
|
||||
If Not My.Settings.MainFormSize.IsEmpty Then .Size = My.Settings.MainFormSize
|
||||
Else
|
||||
.WindowState = My.Settings.MainFormState
|
||||
If Not My.Settings.MainFormRestoreLocation.IsEmpty Then .Location = My.Settings.MainFormRestoreLocation
|
||||
If Not My.Settings.MainFormRestoreSize.IsEmpty Then .Size = My.Settings.MainFormRestoreSize
|
||||
End If
|
||||
If My.Settings.MainFormState = FormWindowState.Maximized Then
|
||||
.WindowState = FormWindowState.Maximized
|
||||
End If
|
||||
|
||||
' Make sure the form is visible on the screen
|
||||
Const minHorizontal As Integer = 300
|
||||
Const minVertical As Integer = 150
|
||||
Dim screenBounds As Drawing.Rectangle = Screen.FromHandle(.Handle).Bounds
|
||||
Dim newBounds As Drawing.Rectangle = .Bounds
|
||||
|
||||
If newBounds.Right < screenBounds.Left + minHorizontal Then
|
||||
newBounds.X = screenBounds.Left + minHorizontal - newBounds.Width
|
||||
End If
|
||||
If newBounds.Left > screenBounds.Right - minHorizontal Then
|
||||
newBounds.X = screenBounds.Right - minHorizontal
|
||||
End If
|
||||
If newBounds.Bottom < screenBounds.Top + minVertical Then
|
||||
newBounds.Y = screenBounds.Top + minVertical - newBounds.Height
|
||||
End If
|
||||
If newBounds.Top > screenBounds.Bottom - minVertical Then
|
||||
newBounds.Y = screenBounds.Bottom - minVertical
|
||||
End If
|
||||
|
||||
.Location = newBounds.Location
|
||||
|
||||
If My.Settings.MainFormKiosk = True Then
|
||||
Tools.Misc.Fullscreen.EnterFullscreen()
|
||||
.Fullscreen.Value = True
|
||||
.mMenViewFullscreen.Checked = True
|
||||
End If
|
||||
|
||||
If My.Settings.UseCustomPuttyPath Then
|
||||
Connection.Protocol.PuttyBase.PuttyPath = My.Settings.CustomPuttyPath
|
||||
Else
|
||||
Connection.Protocol.PuttyBase.PuttyPath = My.Application.Info.DirectoryPath & "\Putty.exe"
|
||||
Connection.Protocol.PuttyBase.PuttyPath = App.Info.General.PuttyPath
|
||||
End If
|
||||
|
||||
If My.Settings.ShowSystemTrayIcon Then
|
||||
App.Runtime.SysTrayIcon = New Tools.Controls.SysTrayIcon()
|
||||
App.Runtime.NotificationAreaIcon = New Tools.Controls.NotificationAreaIcon()
|
||||
End If
|
||||
|
||||
If My.Settings.AutoSaveEveryMinutes > 0 Then
|
||||
@@ -84,6 +108,10 @@ Namespace Config
|
||||
Me.LoadPanelsFromXML()
|
||||
Me.LoadExternalAppsFromXML()
|
||||
|
||||
If My.Settings.AlwaysShowPanelTabs Then
|
||||
frmMain.pnlDock.DocumentStyle = DocumentStyle.DockingWindow
|
||||
End If
|
||||
|
||||
If My.Settings.ResetToolbars = False Then
|
||||
LoadToolbarsFromSettings()
|
||||
Else
|
||||
@@ -91,8 +119,7 @@ Namespace Config
|
||||
End If
|
||||
End With
|
||||
Catch ex As Exception
|
||||
App.Runtime.log.Error("Loading settings failed" & vbNewLine & ex.Message)
|
||||
'mC.AddMessage(Messages.MessageClass.ErrorMsg, "Loading settings failed" & vbNewLine & ex.Message, True)
|
||||
Log.Error("Loading settings failed" & vbNewLine & ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@@ -100,8 +127,8 @@ Namespace Config
|
||||
With MainForm
|
||||
ToolStripPanelFromString("top").Join(.tsQuickConnect, New Point(300, 0))
|
||||
.tsQuickConnect.Visible = True
|
||||
ToolStripPanelFromString("bottom").Join(.tsExtAppsToolbar, New Point(3, 0))
|
||||
.tsExtAppsToolbar.Visible = False
|
||||
ToolStripPanelFromString("bottom").Join(.tsExternalTools, New Point(3, 0))
|
||||
.tsExternalTools.Visible = False
|
||||
End With
|
||||
End Sub
|
||||
|
||||
@@ -126,8 +153,8 @@ Namespace Config
|
||||
|
||||
Private Sub AddDynamicPanels()
|
||||
With MainForm
|
||||
ToolStripPanelFromString(My.Settings.ExtAppsTBParentDock).Join(.tsExtAppsToolbar, My.Settings.ExtAppsTBLocation)
|
||||
.tsExtAppsToolbar.Visible = My.Settings.ExtAppsTBVisible
|
||||
ToolStripPanelFromString(My.Settings.ExtAppsTBParentDock).Join(.tsExternalTools, My.Settings.ExtAppsTBLocation)
|
||||
.tsExternalTools.Visible = My.Settings.ExtAppsTBVisible
|
||||
End With
|
||||
End Sub
|
||||
|
||||
@@ -158,33 +185,41 @@ Namespace Config
|
||||
dc.Close()
|
||||
Loop
|
||||
|
||||
.pnlDock.SuspendLayout(True)
|
||||
Startup.CreatePanels()
|
||||
|
||||
If File.Exists(App.Info.Settings.SettingsPath & "\" & App.Info.Settings.LayoutFileName) And My.Settings.ResetPanels = False Then
|
||||
Startup.CreatePanels()
|
||||
.pnlDock.LoadFromXml(App.Info.Settings.SettingsPath & "\" & App.Info.Settings.LayoutFileName, AddressOf GetContentFromPersistString)
|
||||
Dim oldPath As String = GetFolderPath(SpecialFolder.LocalApplicationData) & "\" & My.Application.Info.ProductName & "\" & App.Info.Settings.LayoutFileName
|
||||
Dim newPath As String = App.Info.Settings.SettingsPath & "\" & App.Info.Settings.LayoutFileName
|
||||
If File.Exists(newPath) Then
|
||||
.pnlDock.LoadFromXml(newPath, AddressOf GetContentFromPersistString)
|
||||
#If Not PORTABLE Then
|
||||
ElseIf File.Exists(oldPath) Then
|
||||
.pnlDock.LoadFromXml(oldPath, AddressOf GetContentFromPersistString)
|
||||
#End If
|
||||
Else
|
||||
Startup.CreatePanels(True)
|
||||
Startup.SetDefaultLayout()
|
||||
End If
|
||||
|
||||
.pnlDock.ResumeLayout(True, True)
|
||||
End With
|
||||
Catch ex As Exception
|
||||
App.Runtime.log.Error("LoadPanelsFromXML failed" & vbNewLine & ex.Message)
|
||||
'mC.AddMessage(Messages.MessageClass.ErrorMsg, "LoadPanelsFromXML failed" & vbNewLine & ex.Message, True)
|
||||
Log.Error("LoadPanelsFromXML failed" & vbNewLine & ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Sub LoadExternalAppsFromXML()
|
||||
If File.Exists(App.Info.Settings.SettingsPath & "\" & App.Info.Settings.ExtAppsFilesName) = False Then
|
||||
Dim oldPath As String = GetFolderPath(SpecialFolder.LocalApplicationData) & "\" & My.Application.Info.ProductName & "\" & App.Info.Settings.ExtAppsFilesName
|
||||
Dim newPath As String = App.Info.Settings.SettingsPath & "\" & App.Info.Settings.ExtAppsFilesName
|
||||
Dim xDom As New XmlDocument()
|
||||
If File.Exists(newPath) Then
|
||||
xDom.Load(newPath)
|
||||
#If Not PORTABLE Then
|
||||
ElseIf File.Exists(oldPath) Then
|
||||
xDom.Load(oldPath)
|
||||
#End If
|
||||
Else
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim xDom As New XmlDocument()
|
||||
xDom.Load(App.Info.Settings.SettingsPath & "\" & App.Info.Settings.ExtAppsFilesName)
|
||||
|
||||
For Each xEl As XmlElement In xDom.DocumentElement.ChildNodes
|
||||
Dim extA As New Tools.ExternalApp
|
||||
Dim extA As New Tools.ExternalTool
|
||||
extA.DisplayName = xEl.Attributes("DisplayName").Value
|
||||
extA.FileName = xEl.Attributes("FileName").Value
|
||||
extA.Arguments = xEl.Attributes("Arguments").Value
|
||||
@@ -197,19 +232,24 @@ Namespace Config
|
||||
extA.TryIntegrate = xEl.Attributes("TryToIntegrate").Value
|
||||
End If
|
||||
|
||||
ExtApps.Add(extA)
|
||||
ExternalTools.Add(extA)
|
||||
Next
|
||||
|
||||
MainForm.SwitchToolbarText(My.Settings.ExtAppsTBShowText)
|
||||
MainForm.SwitchToolBarText(My.Settings.ExtAppsTBShowText)
|
||||
|
||||
xDom = Nothing
|
||||
|
||||
frmMain.AddExtAppsToToolbar()
|
||||
frmMain.AddExternalToolsToToolBar()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Private Methods"
|
||||
Private Function GetContentFromPersistString(ByVal persistString As String) As IDockContent
|
||||
' pnlLayout.xml persistence XML fix for refactoring to mRemoteNG
|
||||
If (persistString.StartsWith("mRemote.")) Then
|
||||
persistString = persistString.Replace("mRemote.", "mRemoteNG.")
|
||||
End If
|
||||
|
||||
Try
|
||||
If persistString = GetType(UI.Window.Config).ToString Then
|
||||
Return Windows.configPanel
|
||||
@@ -231,8 +271,7 @@ Namespace Config
|
||||
Return Windows.screenshotPanel
|
||||
End If
|
||||
Catch ex As Exception
|
||||
App.Runtime.log.Error("GetContentFromPersistString failed" & vbNewLine & ex.Message)
|
||||
'mC.AddMessage(Messages.MessageClass.ErrorMsg, "GetContentFromPersistString failed" & vbNewLine & ex.Message, True)
|
||||
Log.Error("GetContentFromPersistString failed" & vbNewLine & ex.Message)
|
||||
End Try
|
||||
|
||||
Return Nothing
|
||||
|
||||
@@ -6,15 +6,13 @@ Namespace Config
|
||||
Namespace Settings
|
||||
Namespace Providers
|
||||
Public Class ChooseProvider
|
||||
'Exchange to make portable/normal
|
||||
#If Not PORTABLE Then
|
||||
Inherits LocalFileSettingsProvider
|
||||
'Inherits PortableSettingsProvider
|
||||
#Else
|
||||
Inherits PortableSettingsProvider
|
||||
#End If
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Public Class PortableSettingsProvider
|
||||
Inherits SettingsProvider
|
||||
|
||||
@@ -65,12 +63,12 @@ Namespace Config
|
||||
|
||||
Public Overrides Function GetPropertyValues(ByVal context As SettingsContext, ByVal props As SettingsPropertyCollection) As SettingsPropertyValueCollection
|
||||
'Create new collection of values
|
||||
Dim values As SettingsPropertyValueCollection = New SettingsPropertyValueCollection()
|
||||
Dim values As New SettingsPropertyValueCollection()
|
||||
|
||||
'Iterate through the settings to be retrieved
|
||||
For Each setting As SettingsProperty In props
|
||||
|
||||
Dim value As SettingsPropertyValue = New SettingsPropertyValue(setting)
|
||||
Dim value As New SettingsPropertyValue(setting)
|
||||
value.IsDirty = False
|
||||
value.SerializedValue = GetValue(setting)
|
||||
values.Add(value)
|
||||
@@ -145,13 +143,17 @@ Namespace Config
|
||||
End Try
|
||||
|
||||
'Check to see if the node exists, if so then set its new value
|
||||
If Not SettingNode Is Nothing Then
|
||||
SettingNode.InnerText = propVal.SerializedValue.ToString
|
||||
If SettingNode IsNot Nothing Then
|
||||
If propVal.SerializedValue IsNot Nothing Then
|
||||
SettingNode.InnerText = propVal.SerializedValue.ToString
|
||||
End If
|
||||
Else
|
||||
If IsRoaming(propVal.Property) Then
|
||||
'Store the value as an element of the Settings Root Node
|
||||
SettingNode = SettingsXML.CreateElement(propVal.Name)
|
||||
SettingNode.InnerText = propVal.SerializedValue.ToString
|
||||
If propVal.SerializedValue IsNot Nothing Then
|
||||
SettingNode.InnerText = propVal.SerializedValue.ToString
|
||||
End If
|
||||
SettingsXML.SelectSingleNode(SETTINGSROOT).AppendChild(SettingNode)
|
||||
Else
|
||||
'Its machine specific, store as an element of the machine name node,
|
||||
@@ -169,10 +171,14 @@ Namespace Config
|
||||
End If
|
||||
|
||||
SettingNode = SettingsXML.CreateElement(propVal.Name)
|
||||
SettingNode.InnerText = propVal.SerializedValue.ToString
|
||||
If propVal.SerializedValue IsNot Nothing Then
|
||||
SettingNode.InnerText = propVal.SerializedValue.ToString
|
||||
End If
|
||||
MachineNode.AppendChild(SettingNode)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function IsRoaming(ByVal prop As SettingsProperty) As Boolean
|
||||
|
||||
@@ -1,52 +1,42 @@
|
||||
Imports mRemote.App.Runtime
|
||||
Imports mRemoteNG.App.Runtime
|
||||
Imports System.Xml
|
||||
Imports System.IO
|
||||
|
||||
Namespace Config
|
||||
Namespace Settings
|
||||
Public Class Save
|
||||
#Region "Public Properties"
|
||||
Private _MainForm As frmMain
|
||||
Public Property MainForm() As frmMain
|
||||
Get
|
||||
Return Me._MainForm
|
||||
End Get
|
||||
Set(ByVal value As frmMain)
|
||||
Me._MainForm = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region "Public Methods"
|
||||
Public Sub New(ByVal MainForm As frmMain)
|
||||
Me._MainForm = MainForm
|
||||
End Sub
|
||||
|
||||
Public Sub Save()
|
||||
Public Shared Sub Save()
|
||||
Try
|
||||
With Me._MainForm
|
||||
If .WindowState = FormWindowState.Normal Then
|
||||
My.Settings.MainFormLocation = .Location
|
||||
My.Settings.MainFormSize = .Size
|
||||
Else
|
||||
My.Settings.MainFormLocation = .RestoreBounds.Location
|
||||
My.Settings.MainFormSize = .RestoreBounds.Size
|
||||
With frmMain
|
||||
Dim windowPlacement As New Tools.WindowPlacement(frmMain)
|
||||
If .WindowState = FormWindowState.Minimized And windowPlacement.RestoreToMaximized Then
|
||||
.Opacity = 0
|
||||
.WindowState = FormWindowState.Maximized
|
||||
End If
|
||||
|
||||
My.Settings.MainFormLocation = .Location
|
||||
My.Settings.MainFormSize = .Size
|
||||
|
||||
If Not .WindowState = FormWindowState.Normal Then
|
||||
My.Settings.MainFormRestoreLocation = .RestoreBounds.Location
|
||||
My.Settings.MainFormRestoreSize = .RestoreBounds.Size
|
||||
End If
|
||||
|
||||
My.Settings.MainFormState = .WindowState
|
||||
|
||||
My.Settings.MainFormKiosk = Tools.Misc.Fullscreen.FullscreenActive
|
||||
My.Settings.MainFormKiosk = .Fullscreen.Value
|
||||
|
||||
My.Settings.FirstStart = False
|
||||
My.Settings.ResetPanels = False
|
||||
My.Settings.ResetToolbars = False
|
||||
My.Settings.NoReconnect = False
|
||||
|
||||
My.Settings.ExtAppsTBLocation = .tsExtAppsToolbar.Location
|
||||
If .tsExtAppsToolbar.Parent IsNot Nothing Then
|
||||
My.Settings.ExtAppsTBParentDock = .tsExtAppsToolbar.Parent.Dock.ToString
|
||||
My.Settings.ExtAppsTBLocation = .tsExternalTools.Location
|
||||
If .tsExternalTools.Parent IsNot Nothing Then
|
||||
My.Settings.ExtAppsTBParentDock = .tsExternalTools.Parent.Dock.ToString
|
||||
End If
|
||||
My.Settings.ExtAppsTBVisible = .tsExtAppsToolbar.Visible
|
||||
My.Settings.ExtAppsTBVisible = .tsExternalTools.Visible
|
||||
My.Settings.ExtAppsTBShowText = .cMenToolbarShowText.Checked
|
||||
|
||||
My.Settings.QuickyTBLocation = .tsQuickConnect.Location
|
||||
@@ -55,64 +45,59 @@ Namespace Config
|
||||
End If
|
||||
My.Settings.QuickyTBVisible = .tsQuickConnect.Visible
|
||||
|
||||
If App.Editions.Spanlink.Enabled = False Then
|
||||
My.Settings.ConDefaultPassword = Security.Crypt.Encrypt(My.Settings.ConDefaultPassword, App.Info.General.EncryptionKey)
|
||||
Else
|
||||
My.Settings.LoadConsFromCustomLocation = False
|
||||
My.Settings.CustomConsPath = ""
|
||||
End If
|
||||
My.Settings.ConDefaultPassword = Security.Crypt.Encrypt(My.Settings.ConDefaultPassword, App.Info.General.EncryptionKey)
|
||||
|
||||
My.Settings.Save()
|
||||
End With
|
||||
|
||||
Me.SavePanelsToXML()
|
||||
Me.SaveExternalAppsToXML()
|
||||
SavePanelsToXML()
|
||||
SaveExternalAppsToXML()
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "Saving settings failed" & vbNewLine & vbNewLine & ex.Message, False)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, "Saving settings failed" & vbNewLine & vbNewLine & ex.Message, False)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Sub SavePanelsToXML()
|
||||
Public Shared Sub SavePanelsToXML()
|
||||
Try
|
||||
If Directory.Exists(App.Info.Settings.SettingsPath) = False Then
|
||||
Directory.CreateDirectory(App.Info.Settings.SettingsPath)
|
||||
End If
|
||||
|
||||
MainForm.pnlDock.SaveAsXml(App.Info.Settings.SettingsPath & "\" & App.Info.Settings.LayoutFileName)
|
||||
frmMain.pnlDock.SaveAsXml(App.Info.Settings.SettingsPath & "\" & App.Info.Settings.LayoutFileName)
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "SavePanelsToXML failed" & vbNewLine & vbNewLine & ex.Message, False)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, "SavePanelsToXML failed" & vbNewLine & vbNewLine & ex.Message, False)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Sub SaveExternalAppsToXML()
|
||||
Public Shared Sub SaveExternalAppsToXML()
|
||||
Try
|
||||
If Directory.Exists(App.Info.Settings.SettingsPath) = False Then
|
||||
Directory.CreateDirectory(App.Info.Settings.SettingsPath)
|
||||
End If
|
||||
|
||||
Dim xW As New XmlTextWriter(App.Info.Settings.SettingsPath & "\" & App.Info.Settings.ExtAppsFilesName, System.Text.Encoding.UTF8)
|
||||
xW.Formatting = Formatting.Indented
|
||||
xW.Indentation = 4
|
||||
Dim xmlTextWriter As New XmlTextWriter(App.Info.Settings.SettingsPath & "\" & App.Info.Settings.ExtAppsFilesName, System.Text.Encoding.UTF8)
|
||||
xmlTextWriter.Formatting = Formatting.Indented
|
||||
xmlTextWriter.Indentation = 4
|
||||
|
||||
xW.WriteStartDocument()
|
||||
xW.WriteStartElement("Apps")
|
||||
xmlTextWriter.WriteStartDocument()
|
||||
xmlTextWriter.WriteStartElement("Apps")
|
||||
|
||||
For Each extA As Tools.ExternalApp In ExtApps
|
||||
xW.WriteStartElement("App")
|
||||
xW.WriteAttributeString("DisplayName", "", extA.DisplayName)
|
||||
xW.WriteAttributeString("FileName", "", extA.FileName)
|
||||
xW.WriteAttributeString("Arguments", "", extA.Arguments)
|
||||
xW.WriteAttributeString("WaitForExit", "", extA.WaitForExit)
|
||||
xW.WriteAttributeString("TryToIntegrate", "", extA.TryIntegrate)
|
||||
xW.WriteEndElement()
|
||||
For Each extA As Tools.ExternalTool In ExternalTools
|
||||
xmlTextWriter.WriteStartElement("App")
|
||||
xmlTextWriter.WriteAttributeString("DisplayName", "", extA.DisplayName)
|
||||
xmlTextWriter.WriteAttributeString("FileName", "", extA.FileName)
|
||||
xmlTextWriter.WriteAttributeString("Arguments", "", extA.Arguments)
|
||||
xmlTextWriter.WriteAttributeString("WaitForExit", "", extA.WaitForExit)
|
||||
xmlTextWriter.WriteAttributeString("TryToIntegrate", "", extA.TryIntegrate)
|
||||
xmlTextWriter.WriteEndElement()
|
||||
Next
|
||||
|
||||
xW.WriteEndElement()
|
||||
xW.WriteEndDocument()
|
||||
xmlTextWriter.WriteEndElement()
|
||||
xmlTextWriter.WriteEndDocument()
|
||||
|
||||
xW.Close()
|
||||
xmlTextWriter.Close()
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "SaveExternalAppsToXML failed" & vbNewLine & vbNewLine & ex.Message, False)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, "SaveExternalAppsToXML failed" & vbNewLine & vbNewLine & ex.Message, False)
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
9
mRemoteV1/Config/ConfirmClose.vb
Normal file
9
mRemoteV1/Config/ConfirmClose.vb
Normal file
@@ -0,0 +1,9 @@
|
||||
Namespace Config
|
||||
Public Enum ConfirmClose
|
||||
Unspecified = 0
|
||||
Never = 1
|
||||
[Exit] = 2
|
||||
Multiple = 3
|
||||
All = 4
|
||||
End Enum
|
||||
End Namespace
|
||||
319
mRemoteV1/Config/Import/RemoteDesktopConnectionManager.vb
Normal file
319
mRemoteV1/Config/Import/RemoteDesktopConnectionManager.vb
Normal file
@@ -0,0 +1,319 @@
|
||||
Imports System.Xml
|
||||
Imports System.IO
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports mRemoteNG.Connection.Protocol
|
||||
Imports mRemoteNG.App.Runtime
|
||||
|
||||
Namespace Config.Import
|
||||
Public Class RemoteDesktopConnectionManager
|
||||
Public Shared Sub Import(ByVal fileName As String, ByVal rootInfo As Root.Info)
|
||||
Dim xmlDocument As New XmlDocument()
|
||||
xmlDocument.Load(fileName)
|
||||
|
||||
Dim rdcManNode As XmlNode = xmlDocument.SelectSingleNode("/RDCMan")
|
||||
Dim schemaVersion As Integer = rdcManNode.Attributes("schemaVersion").Value
|
||||
If Not schemaVersion = 1 Then
|
||||
Throw New FileFormatException(String.Format("Unsupported schema version ({0}).", schemaVersion))
|
||||
End If
|
||||
|
||||
Dim versionNode As XmlNode = rdcManNode.SelectSingleNode("./version")
|
||||
Dim version As New Version(versionNode.InnerText)
|
||||
If Not version = New Version(2.2) Then
|
||||
Throw New FileFormatException(String.Format("Unsupported file version ({0}).", version))
|
||||
End If
|
||||
|
||||
Dim fileNode As XmlNode = rdcManNode.SelectSingleNode("./file")
|
||||
ImportFileOrGroup(fileNode, rootInfo)
|
||||
End Sub
|
||||
|
||||
Private Shared Sub ImportFileOrGroup(ByVal xmlNode As XmlNode, ByVal parentInfo As Object)
|
||||
Dim parentTreeNode As TreeNode
|
||||
Dim childNodePath As String
|
||||
Select Case xmlNode.Name
|
||||
Case "file"
|
||||
Dim rootInfo As Root.Info = TryCast(parentInfo, Root.Info)
|
||||
If rootInfo Is Nothing Then
|
||||
' ReSharper disable once LocalizableElement
|
||||
Throw New ArgumentException("Argument must be a Root.Info object.", "parentInfo")
|
||||
End If
|
||||
parentTreeNode = rootInfo.TreeNode
|
||||
childNodePath = "./group"
|
||||
Case "group"
|
||||
Dim parentContainerInfo As Container.Info = TryCast(parentInfo, Container.Info)
|
||||
If parentContainerInfo Is Nothing Then
|
||||
' ReSharper disable once LocalizableElement
|
||||
Throw New ArgumentException("Argument must be a Container.Info object.", "parentInfo")
|
||||
End If
|
||||
parentTreeNode = parentContainerInfo.TreeNode
|
||||
childNodePath = "./server"
|
||||
Case Else
|
||||
' ReSharper disable once LocalizableElement
|
||||
Throw New ArgumentException("Argument must be either a file or a group node.", "xmlNode")
|
||||
End Select
|
||||
|
||||
If parentTreeNode Is Nothing Then
|
||||
Throw New InvalidOperationException("parentInfo.TreeNode must not be null.")
|
||||
End If
|
||||
|
||||
Debug.Assert(Not String.IsNullOrEmpty(childNodePath))
|
||||
|
||||
Dim propertiesNode As XmlNode = xmlNode.SelectSingleNode("./properties")
|
||||
Dim name As String = propertiesNode.SelectSingleNode("./name").InnerText
|
||||
|
||||
Dim treeNode As TreeNode = New TreeNode(name)
|
||||
parentTreeNode.Nodes.Add(treeNode)
|
||||
|
||||
Dim containerInfo As New Container.Info
|
||||
containerInfo.Parent = parentInfo
|
||||
containerInfo.TreeNode = treeNode
|
||||
containerInfo.Name = name
|
||||
|
||||
Dim connectionInfo As Connection.Info = ConnectionInfoFromXml(propertiesNode)
|
||||
connectionInfo.Parent = containerInfo
|
||||
connectionInfo.IsContainer = True
|
||||
containerInfo.ConnectionInfo = connectionInfo
|
||||
|
||||
treeNode.Tag = containerInfo
|
||||
treeNode.ImageIndex = Images.Enums.TreeImage.Container
|
||||
treeNode.SelectedImageIndex = Images.Enums.TreeImage.Container
|
||||
|
||||
For Each childNode As XmlNode In xmlNode.SelectNodes(childNodePath)
|
||||
Select Case childNode.Name
|
||||
Case "group"
|
||||
ImportFileOrGroup(childNode, containerInfo)
|
||||
Case "server"
|
||||
ImportServer(childNode, containerInfo)
|
||||
End Select
|
||||
Next
|
||||
|
||||
containerInfo.IsExpanded = propertiesNode.SelectSingleNode("./expanded").InnerText
|
||||
If containerInfo.IsExpanded Then treeNode.Expand()
|
||||
End Sub
|
||||
|
||||
Private Shared Sub ImportServer(ByVal serverNode As XmlNode, ByVal parentContainerInfo As Container.Info)
|
||||
Dim parentTreeNode As TreeNode = parentContainerInfo.TreeNode
|
||||
|
||||
Dim displayName As String = serverNode.SelectSingleNode("./displayName").InnerText
|
||||
Dim treeNode As TreeNode = New TreeNode(displayName)
|
||||
parentTreeNode.Nodes.Add(treeNode)
|
||||
|
||||
Dim connectionInfo As Connection.Info = ConnectionInfoFromXml(serverNode)
|
||||
connectionInfo.TreeNode = treeNode
|
||||
connectionInfo.Parent = parentContainerInfo
|
||||
connectionInfo.Name = displayName
|
||||
|
||||
treeNode.Tag = connectionInfo
|
||||
treeNode.ImageIndex = Images.Enums.TreeImage.ConnectionClosed
|
||||
treeNode.SelectedImageIndex = Images.Enums.TreeImage.ConnectionClosed
|
||||
End Sub
|
||||
|
||||
Private Shared Function ConnectionInfoFromXml(ByVal xmlNode As XmlNode) As Connection.Info
|
||||
Dim connectionInfo As New Connection.Info
|
||||
connectionInfo.Inherit = New Connection.Info.Inheritance(connectionInfo)
|
||||
|
||||
Dim name As String = xmlNode.SelectSingleNode("./name").InnerText
|
||||
|
||||
Dim displayName As String
|
||||
Dim displayNameNode As XmlNode = xmlNode.SelectSingleNode("./displayName")
|
||||
If displayNameNode Is Nothing Then
|
||||
displayName = name
|
||||
Else
|
||||
displayName = displayNameNode.InnerText
|
||||
End If
|
||||
|
||||
connectionInfo.Name = displayName
|
||||
connectionInfo.Description = xmlNode.SelectSingleNode("./comment").InnerText
|
||||
connectionInfo.Hostname = name
|
||||
|
||||
Dim logonCredentialsNode As XmlNode = xmlNode.SelectSingleNode("./logonCredentials")
|
||||
If logonCredentialsNode.Attributes("inherit").Value = "None" Then
|
||||
connectionInfo.Username = logonCredentialsNode.SelectSingleNode("userName").InnerText
|
||||
|
||||
Dim passwordNode As XmlNode = logonCredentialsNode.SelectSingleNode("./password")
|
||||
If passwordNode.Attributes("storeAsClearText").Value = "True" Then
|
||||
connectionInfo.Password = passwordNode.InnerText
|
||||
Else
|
||||
connectionInfo.Password = DecryptPassword(passwordNode.InnerText)
|
||||
End If
|
||||
|
||||
connectionInfo.Domain = logonCredentialsNode.SelectSingleNode("./domain").InnerText
|
||||
Else
|
||||
connectionInfo.Inherit.Username = True
|
||||
connectionInfo.Inherit.Password = True
|
||||
connectionInfo.Inherit.Domain = True
|
||||
End If
|
||||
|
||||
Dim connectionSettingsNode As XmlNode = xmlNode.SelectSingleNode("./connectionSettings")
|
||||
If connectionSettingsNode.Attributes("inherit").Value = "None" Then
|
||||
connectionInfo.UseConsoleSession = connectionSettingsNode.SelectSingleNode("./connectToConsole").InnerText
|
||||
' ./startProgram
|
||||
' ./workingDir
|
||||
connectionInfo.Port = connectionSettingsNode.SelectSingleNode("./port").InnerText
|
||||
Else
|
||||
connectionInfo.Inherit.UseConsoleSession = True
|
||||
connectionInfo.Inherit.Port = True
|
||||
End If
|
||||
|
||||
Dim gatewaySettingsNode As XmlNode = xmlNode.SelectSingleNode("./gatewaySettings")
|
||||
If gatewaySettingsNode.Attributes("inherit").Value = "None" Then
|
||||
If gatewaySettingsNode.SelectSingleNode("./enabled").InnerText = "True" Then
|
||||
connectionInfo.RDGatewayUsageMethod = RDP.RDGatewayUsageMethod.Always
|
||||
Else
|
||||
connectionInfo.RDGatewayUsageMethod = RDP.RDGatewayUsageMethod.Never
|
||||
End If
|
||||
|
||||
connectionInfo.RDGatewayHostname = gatewaySettingsNode.SelectSingleNode("./hostName").InnerText
|
||||
connectionInfo.RDGatewayUsername = gatewaySettingsNode.SelectSingleNode("./userName").InnerText
|
||||
|
||||
Dim passwordNode As XmlNode = logonCredentialsNode.SelectSingleNode("./password")
|
||||
If passwordNode.Attributes("storeAsClearText").Value = "True" Then
|
||||
connectionInfo.RDGatewayPassword = passwordNode.InnerText
|
||||
Else
|
||||
connectionInfo.Password = DecryptPassword(passwordNode.InnerText)
|
||||
End If
|
||||
|
||||
connectionInfo.RDGatewayDomain = gatewaySettingsNode.SelectSingleNode("./domain").InnerText
|
||||
' ./logonMethod
|
||||
' ./localBypass
|
||||
' ./credSharing
|
||||
Else
|
||||
connectionInfo.Inherit.RDGatewayUsageMethod = True
|
||||
connectionInfo.Inherit.RDGatewayHostname = True
|
||||
connectionInfo.Inherit.RDGatewayUsername = True
|
||||
connectionInfo.Inherit.RDGatewayPassword = True
|
||||
connectionInfo.Inherit.RDGatewayDomain = True
|
||||
End If
|
||||
|
||||
Dim remoteDesktopNode As XmlNode = xmlNode.SelectSingleNode("./remoteDesktop")
|
||||
If remoteDesktopNode.Attributes("inherit").Value = "None" Then
|
||||
Dim resolutionString As String = remoteDesktopNode.SelectSingleNode("./size").InnerText.Replace(" ", "")
|
||||
Try
|
||||
connectionInfo.Resolution = "Res" & Tools.Misc.StringToEnum(GetType(Connection.Protocol.RDP.RDPResolutions), resolutionString)
|
||||
Catch ex As ArgumentException
|
||||
connectionInfo.Resolution = RDP.RDPResolutions.FitToWindow
|
||||
End Try
|
||||
|
||||
If remoteDesktopNode.SelectSingleNode("./sameSizeAsClientArea").InnerText = "True" Then
|
||||
connectionInfo.Resolution = RDP.RDPResolutions.FitToWindow
|
||||
End If
|
||||
|
||||
If remoteDesktopNode.SelectSingleNode("./fullScreen").InnerText = "True" Then
|
||||
connectionInfo.Resolution = RDP.RDPResolutions.Fullscreen
|
||||
End If
|
||||
|
||||
connectionInfo.Colors = remoteDesktopNode.SelectSingleNode("./colorDepth").InnerText
|
||||
Else
|
||||
connectionInfo.Inherit.Resolution = True
|
||||
connectionInfo.Inherit.Colors = True
|
||||
End If
|
||||
|
||||
Dim localResourcesNode As XmlNode = xmlNode.SelectSingleNode("./localResources")
|
||||
If localResourcesNode.Attributes("inherit").Value = "None" Then
|
||||
Select Case localResourcesNode.SelectSingleNode("./audioRedirection").InnerText
|
||||
Case 0 ' Bring to this computer
|
||||
connectionInfo.RedirectSound = RDP.RDPSounds.BringToThisComputer
|
||||
Case 1 ' Leave at remote computer
|
||||
connectionInfo.RedirectSound = RDP.RDPSounds.LeaveAtRemoteComputer
|
||||
Case 2 ' Do not play
|
||||
connectionInfo.RedirectSound = RDP.RDPSounds.DoNotPlay
|
||||
End Select
|
||||
|
||||
' ./audioRedirectionQuality
|
||||
' ./audioCaptureRedirection
|
||||
|
||||
Select Case localResourcesNode.SelectSingleNode("./keyboardHook").InnerText
|
||||
Case 0 ' On the local computer
|
||||
connectionInfo.RedirectKeys = False
|
||||
Case 1 ' On the remote computer
|
||||
connectionInfo.RedirectKeys = True
|
||||
Case 2 ' In full screen mode only
|
||||
connectionInfo.RedirectKeys = False
|
||||
End Select
|
||||
|
||||
' ./redirectClipboard
|
||||
connectionInfo.RedirectDiskDrives = localResourcesNode.SelectSingleNode("./redirectDrives").InnerText
|
||||
connectionInfo.RedirectPorts = localResourcesNode.SelectSingleNode("./redirectPorts").InnerText
|
||||
connectionInfo.RedirectPrinters = localResourcesNode.SelectSingleNode("./redirectPrinters").InnerText
|
||||
connectionInfo.RedirectSmartCards = localResourcesNode.SelectSingleNode("./redirectSmartCards").InnerText
|
||||
Else
|
||||
connectionInfo.Inherit.RedirectSound = True
|
||||
connectionInfo.Inherit.RedirectKeys = True
|
||||
connectionInfo.Inherit.RedirectDiskDrives = True
|
||||
connectionInfo.Inherit.RedirectPorts = True
|
||||
connectionInfo.Inherit.RedirectPrinters = True
|
||||
connectionInfo.Inherit.RedirectSmartCards = True
|
||||
End If
|
||||
|
||||
Dim securitySettingsNode As XmlNode = xmlNode.SelectSingleNode("./securitySettings")
|
||||
If securitySettingsNode.Attributes("inherit").Value = "None" Then
|
||||
Select Case securitySettingsNode.SelectSingleNode("./authentication").InnerText
|
||||
Case 0 ' No authentication
|
||||
connectionInfo.RDPAuthenticationLevel = RDP.AuthenticationLevel.NoAuth
|
||||
Case 1 ' Do not connect if authentication fails
|
||||
connectionInfo.RDPAuthenticationLevel = RDP.AuthenticationLevel.AuthRequired
|
||||
Case 2 ' Warn if authentication fails
|
||||
connectionInfo.RDPAuthenticationLevel = RDP.AuthenticationLevel.WarnOnFailedAuth
|
||||
End Select
|
||||
Else
|
||||
connectionInfo.Inherit.RDPAuthenticationLevel = True
|
||||
End If
|
||||
|
||||
' ./displaySettings/thumbnailScale
|
||||
' ./displaySettings/liveThumbnailUpdates
|
||||
' ./displaySettings/showDisconnectedThumbnails
|
||||
|
||||
Return connectionInfo
|
||||
End Function
|
||||
|
||||
Private Shared Function DecryptPassword(ByVal ciphertext As String) As String
|
||||
If String.IsNullOrEmpty(ciphertext) Then Return Nothing
|
||||
|
||||
Dim gcHandle As GCHandle
|
||||
Dim plaintextData As Win32.DATA_BLOB
|
||||
Try
|
||||
Dim ciphertextArray As Byte() = Convert.FromBase64String(ciphertext)
|
||||
gcHandle = Runtime.InteropServices.GCHandle.Alloc(ciphertextArray, GCHandleType.Pinned)
|
||||
|
||||
Dim ciphertextData As Win32.DATA_BLOB
|
||||
ciphertextData.cbData = ciphertextArray.Length
|
||||
ciphertextData.pbData = gcHandle.AddrOfPinnedObject()
|
||||
|
||||
If Not Win32.CryptUnprotectData(ciphertextData, Nothing, Nothing, Nothing, Nothing, 0, plaintextData) Then Return Nothing
|
||||
|
||||
Dim plaintextLength As Integer = plaintextData.cbData / 2 ' Char = 2 bytes
|
||||
Dim plaintextArray(plaintextLength - 1) As Char
|
||||
Marshal.Copy(plaintextData.pbData, plaintextArray, 0, plaintextLength)
|
||||
|
||||
Return New String(plaintextArray)
|
||||
Catch ex As Exception
|
||||
MessageCollector.AddExceptionMessage("RemoteDesktopConnectionManager.DecryptPassword() failed.", ex, , True)
|
||||
Return Nothing
|
||||
Finally
|
||||
If gcHandle.IsAllocated Then gcHandle.Free()
|
||||
If Not plaintextData.pbData = IntPtr.Zero Then Win32.LocalFree(plaintextData.pbData)
|
||||
End Try
|
||||
End Function
|
||||
|
||||
' ReSharper disable once ClassNeverInstantiated.Local
|
||||
Private Class Win32
|
||||
' ReSharper disable InconsistentNaming
|
||||
' ReSharper disable IdentifierTypo
|
||||
' ReSharper disable StringLiteralTypo
|
||||
<DllImport("crypt32.dll", CharSet:=CharSet.Unicode)> _
|
||||
Public Shared Function CryptUnprotectData(ByRef dataIn As DATA_BLOB, ByVal description As String, ByRef optionalEntropy As DATA_BLOB, ByVal reserved As IntPtr, ByRef promptStruct As IntPtr, ByVal flags As Integer, ByRef dataOut As DATA_BLOB) As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport("kernel32.dll", CharSet:=CharSet.Unicode)> _
|
||||
Public Shared Sub LocalFree(ByVal ptr As IntPtr)
|
||||
End Sub
|
||||
|
||||
Public Structure DATA_BLOB
|
||||
Public cbData As Integer
|
||||
Public pbData As IntPtr
|
||||
End Structure
|
||||
' ReSharper restore StringLiteralTypo
|
||||
' ReSharper restore IdentifierTypo
|
||||
' ReSharper restore InconsistentNaming
|
||||
End Class
|
||||
End Class
|
||||
End Namespace
|
||||
324
mRemoteV1/Config/KeyboardShortcuts.vb
Normal file
324
mRemoteV1/Config/KeyboardShortcuts.vb
Normal file
@@ -0,0 +1,324 @@
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports System.ComponentModel
|
||||
Imports mRemoteNG.App.Runtime
|
||||
Imports SharedLibraryNG
|
||||
|
||||
Namespace Config
|
||||
Public Class KeyboardShortcuts
|
||||
#Region "Public Properties"
|
||||
Private Shared _defaultMap As KeyboardShortcutMap = Nothing
|
||||
Public Shared ReadOnly Property DefaultMap() As KeyboardShortcutMap
|
||||
Get
|
||||
LoadDefaultMap()
|
||||
Return _defaultMap
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Shared _map As KeyboardShortcutMap
|
||||
Public Shared Property Map() As KeyboardShortcutMap
|
||||
Get
|
||||
Load()
|
||||
Return _map
|
||||
End Get
|
||||
Set(value As KeyboardShortcutMap)
|
||||
CancelKeyNotifications()
|
||||
_map = value
|
||||
Save()
|
||||
RequestKeyNotifications(_handle)
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region "Public Methods"
|
||||
Public Shared Sub RequestKeyNotifications(ByVal handle As IntPtr)
|
||||
' ReSharper disable LocalizableElement
|
||||
If handle = IntPtr.Zero Then Throw New ArgumentException("The handle cannot be null.", "handle")
|
||||
If Not _handle = IntPtr.Zero And Not _handle = handle Then Throw New ArgumentException("The handle must match the handle that was specified the first time this function was called.", "handle")
|
||||
' ReSharper restore LocalizableElement
|
||||
_handle = handle
|
||||
For Each shortcutMapping As ShortcutMapping In Map.Mappings
|
||||
KeyboardHook.RequestKeyNotification(handle, shortcutMapping.Key.KeyCode, shortcutMapping.Key.ModifierKeys, False)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Shared Function CommandFromHookKeyMessage(ByVal m As Message) As ShortcutCommand
|
||||
Dim msgData As KeyboardHook.HookKeyMsgData = Marshal.PtrToStructure(m.LParam, GetType(KeyboardHook.HookKeyMsgData))
|
||||
Return Map.GetCommand(msgData.KeyCode, msgData.ModifierKeys)
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region "Private Fields"
|
||||
' ReSharper disable once UnusedMember.Local
|
||||
Private Shared _keyboardHook As New KeyboardHook
|
||||
Private Shared _mapLoaded As Boolean = False
|
||||
Private Shared _handle As IntPtr = IntPtr.Zero
|
||||
#End Region
|
||||
|
||||
#Region "Private Methods"
|
||||
Private Shared Sub LoadDefaultMap()
|
||||
If _defaultMap IsNot Nothing Then Return
|
||||
_defaultMap = New KeyboardShortcutMap()
|
||||
_defaultMap.AddFromConfigString(ShortcutCommand.PreviousTab, My.Settings.Properties("KeysPreviousTab").DefaultValue)
|
||||
_defaultMap.AddFromConfigString(ShortcutCommand.NextTab, My.Settings.Properties("KeysNextTab").DefaultValue)
|
||||
End Sub
|
||||
|
||||
Private Shared Sub Load()
|
||||
If _mapLoaded Then Return
|
||||
_map = New KeyboardShortcutMap()
|
||||
_map.AddFromConfigString(ShortcutCommand.PreviousTab, My.Settings.KeysPreviousTab)
|
||||
_map.AddFromConfigString(ShortcutCommand.NextTab, My.Settings.KeysNextTab)
|
||||
_mapLoaded = True
|
||||
End Sub
|
||||
|
||||
Private Shared Sub Save()
|
||||
If _map Is Nothing Then Return
|
||||
My.Settings.KeysPreviousTab = _map.GetConfigString(ShortcutCommand.PreviousTab)
|
||||
My.Settings.KeysNextTab = _map.GetConfigString(ShortcutCommand.NextTab)
|
||||
End Sub
|
||||
|
||||
Private Shared Sub CancelKeyNotifications()
|
||||
If _handle = IntPtr.Zero Then Return
|
||||
For Each shortcutMapping As ShortcutMapping In Map.Mappings
|
||||
KeyboardHook.CancelKeyNotification(_handle, shortcutMapping.Key.KeyCode, shortcutMapping.Key.ModifierKeys, False)
|
||||
Next
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
Public Class KeyboardShortcutMap
|
||||
Implements ICloneable
|
||||
|
||||
#Region "Public Properties"
|
||||
Private ReadOnly _mappings As List(Of ShortcutMapping)
|
||||
Public ReadOnly Property Mappings As List(Of ShortcutMapping)
|
||||
Get
|
||||
Return _mappings
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region "Constructors"
|
||||
Public Sub New()
|
||||
_mappings = New List(Of ShortcutMapping)()
|
||||
End Sub
|
||||
|
||||
Public Sub New(ByVal mappings As List(Of ShortcutMapping))
|
||||
_mappings = mappings
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Public Methods"
|
||||
Public Sub Add(ByVal command As ShortcutCommand, ByVal shortcutKey As ShortcutKey)
|
||||
If Mappings.Contains(New ShortcutMapping(command, shortcutKey)) Then Return
|
||||
Mappings.Add(New ShortcutMapping(command, shortcutKey))
|
||||
End Sub
|
||||
|
||||
Public Sub AddRange(ByVal command As ShortcutCommand, ByVal shortcutKeys As IEnumerable(Of ShortcutKey))
|
||||
For Each shortcutKey As ShortcutKey In shortcutKeys
|
||||
Add(command, shortcutKey)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Sub Remove(ByVal command As ShortcutCommand, ByVal shortcutKey As ShortcutKey)
|
||||
Mappings.Remove(New ShortcutMapping(command, shortcutKey))
|
||||
End Sub
|
||||
|
||||
Public Sub AddFromConfigString(ByVal command As ShortcutCommand, ByVal configString As String)
|
||||
For Each shortcutKey As ShortcutKey In ParseConfigString(configString)
|
||||
Add(command, shortcutKey)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Function GetConfigString(ByVal command As ShortcutCommand) As String
|
||||
Dim parts As New List(Of String)
|
||||
For Each shortcutKey As ShortcutKey In GetShortcutKeys(command)
|
||||
parts.Add(shortcutKey.ToConfigString())
|
||||
Next
|
||||
Return String.Join(", ", parts.ToArray())
|
||||
End Function
|
||||
|
||||
Public Function GetShortcutKeys(ByVal command As ShortcutCommand) As ShortcutKey()
|
||||
Dim shortcutKeys As New List(Of ShortcutKey)
|
||||
For Each shortcutMapping As ShortcutMapping In Mappings
|
||||
If shortcutMapping.Command = command Then shortcutKeys.Add(shortcutMapping.Key)
|
||||
Next
|
||||
Return shortcutKeys.ToArray()
|
||||
End Function
|
||||
|
||||
Public Sub SetShortcutKeys(ByVal command As ShortcutCommand, ByVal shortcutKeys As IEnumerable(Of ShortcutKey))
|
||||
ClearShortcutKeys(command)
|
||||
AddRange(command, shortcutKeys)
|
||||
End Sub
|
||||
|
||||
Public Function GetCommand(ByVal keyCode As Int32, ByVal modifierKeys As KeyboardHook.ModifierKeys) As ShortcutCommand
|
||||
Return GetCommand(New ShortcutKey(keyCode, modifierKeys))
|
||||
End Function
|
||||
|
||||
Public Function Clone() As Object Implements ICloneable.Clone
|
||||
Dim newMappings As New List(Of ShortcutMapping)()
|
||||
newMappings.AddRange(Mappings)
|
||||
Return New KeyboardShortcutMap(newMappings)
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region "Private Methods"
|
||||
Private Shared Function ParseConfigString(ByVal shortcutKeysString As String) As ShortcutKey()
|
||||
Dim shortcutKeys As New List(Of ShortcutKey)
|
||||
For Each shortcutKeyString As String In shortcutKeysString.Split(New Char() {","}, StringSplitOptions.RemoveEmptyEntries)
|
||||
Try
|
||||
shortcutKeys.Add(ShortcutKey.FromConfigString(shortcutKeyString.Trim))
|
||||
Catch ex As Exception
|
||||
MessageCollector.AddExceptionMessage(String.Format("KeyboardShortcuts.ParseShortcutKeysString({0}) failed at {1}.", shortcutKeysString, shortcutKeyString), ex, , True)
|
||||
Continue For
|
||||
End Try
|
||||
Next
|
||||
Return shortcutKeys.ToArray()
|
||||
End Function
|
||||
|
||||
Private Function GetCommand(ByVal shortcutKey As ShortcutKey) As ShortcutCommand
|
||||
For Each shortcutMapping As ShortcutMapping In Mappings
|
||||
If ShortcutKeysMatch(shortcutMapping.Key, shortcutKey) Then Return shortcutMapping.Command
|
||||
Next
|
||||
Return ShortcutCommand.None
|
||||
End Function
|
||||
|
||||
Private Shared Function ShortcutKeysMatch(ByVal wanted As ShortcutKey, ByVal pressed As ShortcutKey) As Boolean
|
||||
If Not wanted.KeyCode = pressed.KeyCode Then Return False
|
||||
Return KeyboardHook.ModifierKeysMatch(wanted.ModifierKeys, pressed.ModifierKeys)
|
||||
End Function
|
||||
|
||||
Private Sub ClearShortcutKeys(ByVal command As ShortcutCommand)
|
||||
Dim mappingsToRemove As New List(Of ShortcutMapping)
|
||||
For Each mapping As ShortcutMapping In Mappings
|
||||
If mapping.Command = command Then mappingsToRemove.Add(mapping)
|
||||
Next
|
||||
|
||||
For Each mapping As ShortcutMapping In mappingsToRemove
|
||||
Mappings.Remove(mapping)
|
||||
Next
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
<ImmutableObject(True)> _
|
||||
Public Class ShortcutMapping
|
||||
Implements IEquatable(Of ShortcutMapping)
|
||||
|
||||
#Region "Public Properties"
|
||||
Private ReadOnly _command As ShortcutCommand
|
||||
Public ReadOnly Property Command As ShortcutCommand
|
||||
Get
|
||||
Return _command
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private ReadOnly _key As ShortcutKey
|
||||
Public ReadOnly Property Key As ShortcutKey
|
||||
Get
|
||||
Return _key
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region "Constructors"
|
||||
Public Sub New(ByVal command As ShortcutCommand, ByVal key As ShortcutKey)
|
||||
_command = command
|
||||
_key = Key
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Public Methods"
|
||||
Public Overloads Function Equals(other As ShortcutMapping) As Boolean Implements IEquatable(Of ShortcutMapping).Equals
|
||||
If Not Command = other.Command Then Return False
|
||||
If Not Key = other.Key Then Return False
|
||||
Return True
|
||||
End Function
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
<ImmutableObject(True)> _
|
||||
Public Class ShortcutKey
|
||||
Implements IEquatable(Of ShortcutKey)
|
||||
|
||||
#Region "Public Properties"
|
||||
Private ReadOnly _keyCode As Int32
|
||||
Public ReadOnly Property KeyCode As Int32
|
||||
Get
|
||||
Return _keyCode
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private ReadOnly _modifierKeys As KeyboardHook.ModifierKeys
|
||||
Public ReadOnly Property ModifierKeys As KeyboardHook.ModifierKeys
|
||||
Get
|
||||
Return _modifierKeys
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region "Constructors"
|
||||
Public Sub New(ByVal keyCode As Int32, ByVal modifierKeys As KeyboardHook.ModifierKeys)
|
||||
_keyCode = keyCode
|
||||
_modifierKeys = modifierKeys
|
||||
End Sub
|
||||
|
||||
Public Sub New(ByVal keysValue As Keys)
|
||||
_keyCode = keysValue And Keys.KeyCode
|
||||
If Not (keysValue And Keys.Shift) = 0 Then _modifierKeys = _modifierKeys Or KeyboardHook.ModifierKeys.Shift
|
||||
If Not (keysValue And Keys.Control) = 0 Then _modifierKeys = _modifierKeys Or KeyboardHook.ModifierKeys.Control
|
||||
If Not (keysValue And Keys.Alt) = 0 Then _modifierKeys = _modifierKeys Or KeyboardHook.ModifierKeys.Alt
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Public Methods"
|
||||
Public Function ToConfigString() As String
|
||||
Return String.Join("/", New String() {KeyCode, Convert.ToInt32(ModifierKeys)})
|
||||
End Function
|
||||
|
||||
Public Shared Function FromConfigString(ByVal shortcutKeyString As String) As ShortcutKey
|
||||
Dim parts As String() = shortcutKeyString.Split(New Char() {"/"}, 2)
|
||||
If Not parts.Length = 2 Then Throw New ArgumentException(String.Format("ShortcutKey.FromString({0}) failed. parts.Length != 2", shortcutKeyString), shortcutKeyString)
|
||||
Return New ShortcutKey(Convert.ToInt32(parts(0)), Convert.ToInt32(parts(1)))
|
||||
End Function
|
||||
|
||||
Public Overrides Function ToString() As String
|
||||
Return HotkeyControl.KeysToString(Me)
|
||||
End Function
|
||||
|
||||
Public Overloads Function Equals(other As ShortcutKey) As Boolean Implements IEquatable(Of ShortcutKey).Equals
|
||||
If Not KeyCode = other.KeyCode Then Return False
|
||||
If Not ModifierKeys = other.ModifierKeys Then Return False
|
||||
Return True
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region "Operators"
|
||||
Public Shared Operator =(ByVal shortcutKey1 As ShortcutKey, ByVal shortcutKey2 As ShortcutKey) As Boolean
|
||||
Return shortcutKey1.Equals(shortcutKey2)
|
||||
End Operator
|
||||
|
||||
Public Shared Operator <>(ByVal shortcutKey1 As ShortcutKey, ByVal shortcutKey2 As ShortcutKey) As Boolean
|
||||
Return Not shortcutKey1.Equals(shortcutKey2)
|
||||
End Operator
|
||||
|
||||
' This is a narrowing conversion because (Keys Or Keys.Modifiers) cannot hold all possible values of KeyboardHook.ModifierKeys
|
||||
Public Shared Narrowing Operator CType(ByVal shortcutKey As ShortcutKey) As Keys
|
||||
Dim keysValue As Keys = shortcutKey.KeyCode And Keys.KeyCode
|
||||
If Not (shortcutKey.ModifierKeys And KeyboardHook.ModifierKeys.Shift) = 0 Then keysValue = keysValue Or Keys.Shift
|
||||
If Not (shortcutKey.ModifierKeys And KeyboardHook.ModifierKeys.Control) = 0 Then keysValue = keysValue Or Keys.Control
|
||||
If Not (shortcutKey.ModifierKeys And KeyboardHook.ModifierKeys.Alt) = 0 Then keysValue = keysValue Or Keys.Alt
|
||||
Return keysValue
|
||||
End Operator
|
||||
|
||||
Public Shared Widening Operator CType(ByVal keys As Keys) As ShortcutKey
|
||||
Return New ShortcutKey(keys)
|
||||
End Operator
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
Public Enum ShortcutCommand As Integer
|
||||
None = 0
|
||||
PreviousTab
|
||||
NextTab
|
||||
End Enum
|
||||
End Namespace
|
||||
99
mRemoteV1/Config/Putty/Provider.vb
Normal file
99
mRemoteV1/Config/Putty/Provider.vb
Normal file
@@ -0,0 +1,99 @@
|
||||
Imports mRemoteNG.My
|
||||
|
||||
Namespace Config.Putty
|
||||
Public MustInherit Class Provider
|
||||
#Region "Public Methods"
|
||||
Private _rootTreeNode As TreeNode
|
||||
Public ReadOnly Property RootTreeNode As TreeNode
|
||||
Get
|
||||
If _rootTreeNode Is Nothing Then _rootTreeNode = CreateRootTreeNode()
|
||||
Return _rootTreeNode
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private _rootInfo As Root.PuttySessions.Info
|
||||
Public ReadOnly Property RootInfo() As Root.PuttySessions.Info
|
||||
Get
|
||||
If _rootInfo Is Nothing Then _rootInfo = CreateRootInfo()
|
||||
Return _rootInfo
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public MustOverride Function GetSessionNames(Optional ByVal raw As Boolean = False) As String()
|
||||
Public MustOverride Function GetSession(ByVal sessionName As String) As Connection.PuttySession.Info
|
||||
|
||||
Public Overridable Function GetSessions() As Connection.PuttySession.Info()
|
||||
Dim sessionList As New List(Of Connection.PuttySession.Info)
|
||||
Dim sessionInfo As Connection.Info
|
||||
For Each sessionName As String In GetSessionNames(True)
|
||||
sessionInfo = GetSession(sessionName)
|
||||
If sessionInfo Is Nothing OrElse String.IsNullOrEmpty(sessionInfo.Hostname) Then Continue For
|
||||
sessionList.Add(sessionInfo)
|
||||
Next
|
||||
Return sessionList.ToArray()
|
||||
End Function
|
||||
|
||||
Public Overridable Sub StartWatcher()
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overridable Sub StopWatcher()
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Public Events"
|
||||
Public Event SessionChanged(ByVal sender As Object, ByVal e As SessionChangedEventArgs)
|
||||
#End Region
|
||||
|
||||
#Region "Public Classes"
|
||||
Public Class SessionChangedEventArgs
|
||||
Inherits EventArgs
|
||||
End Class
|
||||
#End Region
|
||||
|
||||
#Region "Protected Methods"
|
||||
Private Delegate Function CreateRootTreeNodeDelegate() As TreeNode
|
||||
Protected Overridable Function CreateRootTreeNode() As TreeNode
|
||||
Dim treeView As TreeView = Tree.Node.TreeView
|
||||
If treeView Is Nothing Then Return Nothing
|
||||
If treeView.InvokeRequired Then
|
||||
Return treeView.Invoke(New CreateRootTreeNodeDelegate(AddressOf CreateRootTreeNode))
|
||||
End If
|
||||
|
||||
Dim newTreeNode As New TreeNode
|
||||
RootInfo.TreeNode = newTreeNode
|
||||
|
||||
newTreeNode.Name = _rootInfo.Name
|
||||
newTreeNode.Text = _rootInfo.Name
|
||||
newTreeNode.Tag = _rootInfo
|
||||
newTreeNode.ImageIndex = Images.Enums.TreeImage.PuttySessions
|
||||
newTreeNode.SelectedImageIndex = Images.Enums.TreeImage.PuttySessions
|
||||
|
||||
Return newTreeNode
|
||||
End Function
|
||||
|
||||
Protected Overridable Function CreateRootInfo() As Root.PuttySessions.Info
|
||||
Dim newRootInfo As New Root.PuttySessions.Info
|
||||
|
||||
If String.IsNullOrEmpty(My.Settings.PuttySavedSessionsName) Then
|
||||
newRootInfo.Name = Language.strPuttySavedSessionsRootName
|
||||
Else
|
||||
newRootInfo.Name = My.Settings.PuttySavedSessionsName
|
||||
End If
|
||||
|
||||
If String.IsNullOrEmpty(My.Settings.PuttySavedSessionsPanel) Then
|
||||
newRootInfo.Panel = Language.strGeneral
|
||||
Else
|
||||
newRootInfo.Panel = My.Settings.PuttySavedSessionsPanel
|
||||
End If
|
||||
|
||||
Return newRootInfo
|
||||
End Function
|
||||
|
||||
Protected Overridable Sub OnSessionChanged(ByVal e As SessionChangedEventArgs)
|
||||
RaiseEvent SessionChanged(Me, New SessionChangedEventArgs())
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
End Namespace
|
||||
121
mRemoteV1/Config/Putty/RegistryProvider.vb
Normal file
121
mRemoteV1/Config/Putty/RegistryProvider.vb
Normal file
@@ -0,0 +1,121 @@
|
||||
Imports System.Management
|
||||
Imports mRemoteNG.App
|
||||
Imports mRemoteNG.Messages
|
||||
Imports Microsoft.Win32
|
||||
Imports mRemoteNG.Connection.Protocol
|
||||
Imports System.Security.Principal
|
||||
|
||||
Namespace Config.Putty
|
||||
Public Class RegistryProvider
|
||||
Inherits Provider
|
||||
|
||||
#Region "Public Methods"
|
||||
Public Overrides Function GetSessionNames(Optional ByVal raw As Boolean = False) As String()
|
||||
Dim sessionsKey As RegistryKey = Registry.CurrentUser.OpenSubKey(PuttySessionsKey)
|
||||
If sessionsKey Is Nothing Then Return New String() {}
|
||||
|
||||
Dim sessionNames As New List(Of String)
|
||||
For Each sessionName As String In sessionsKey.GetSubKeyNames()
|
||||
If raw Then
|
||||
sessionNames.Add(sessionName)
|
||||
Else
|
||||
sessionNames.Add(Web.HttpUtility.UrlDecode(sessionName.Replace("+", "%2B")))
|
||||
End If
|
||||
Next
|
||||
|
||||
If raw Then
|
||||
If Not sessionNames.Contains("Default%20Settings") Then ' Do not localize
|
||||
sessionNames.Insert(0, "Default%20Settings")
|
||||
End If
|
||||
Else
|
||||
If Not sessionNames.Contains("Default Settings") Then
|
||||
sessionNames.Insert(0, "Default Settings")
|
||||
End If
|
||||
End If
|
||||
|
||||
Return sessionNames.ToArray()
|
||||
End Function
|
||||
|
||||
Public Overrides Function GetSession(ByVal sessionName As String) As Connection.PuttySession.Info
|
||||
Dim sessionsKey As RegistryKey = Registry.CurrentUser.OpenSubKey(PuttySessionsKey)
|
||||
If sessionsKey Is Nothing Then Return Nothing
|
||||
|
||||
Dim sessionKey As RegistryKey = sessionsKey.OpenSubKey(sessionName)
|
||||
If sessionKey Is Nothing Then Return Nothing
|
||||
|
||||
sessionName = Web.HttpUtility.UrlDecode(sessionName.Replace("+", "%2B"))
|
||||
|
||||
Dim sessionInfo As New Connection.PuttySession.Info
|
||||
With sessionInfo
|
||||
.PuttySession = sessionName
|
||||
.Name = sessionName
|
||||
.Hostname = sessionKey.GetValue("HostName")
|
||||
.Username = sessionKey.GetValue("UserName")
|
||||
Dim protocol As String = sessionKey.GetValue("Protocol")
|
||||
If protocol Is Nothing Then protocol = "ssh"
|
||||
Select Case protocol.ToLowerInvariant()
|
||||
Case "raw"
|
||||
.Protocol = Protocols.RAW
|
||||
Case "rlogin"
|
||||
.Protocol = Protocols.Rlogin
|
||||
Case "serial"
|
||||
Return Nothing
|
||||
Case "ssh"
|
||||
Dim sshVersionObject As Object = sessionKey.GetValue("SshProt")
|
||||
If sshVersionObject IsNot Nothing Then
|
||||
Dim sshVersion As Integer = CType(sshVersionObject, Integer)
|
||||
If sshVersion >= 2 Then
|
||||
.Protocol = Protocols.SSH2
|
||||
Else
|
||||
.Protocol = Protocols.SSH1
|
||||
End If
|
||||
Else
|
||||
.Protocol = Protocols.SSH2
|
||||
End If
|
||||
Case "telnet"
|
||||
.Protocol = Protocols.Telnet
|
||||
Case Else
|
||||
Return Nothing
|
||||
End Select
|
||||
.Port = sessionKey.GetValue("PortNumber")
|
||||
End With
|
||||
|
||||
Return sessionInfo
|
||||
End Function
|
||||
|
||||
Public Overrides Sub StartWatcher()
|
||||
If _eventWatcher IsNot Nothing Then Return
|
||||
|
||||
Try
|
||||
Dim currentUserSid As String = WindowsIdentity.GetCurrent().User.Value
|
||||
Dim key As String = String.Join("\", {currentUserSid, PuttySessionsKey}).Replace("\", "\\")
|
||||
Dim query As New WqlEventQuery(String.Format("SELECT * FROM RegistryTreeChangeEvent WHERE Hive = 'HKEY_USERS' AND RootPath = '{0}'", key))
|
||||
_eventWatcher = New ManagementEventWatcher(query)
|
||||
AddHandler _eventWatcher.EventArrived, AddressOf OnManagementEventArrived
|
||||
_eventWatcher.Start()
|
||||
Catch ex As Exception
|
||||
Runtime.MessageCollector.AddExceptionMessage("PuttySessions.Watcher.StartWatching() failed.", ex, MessageClass.WarningMsg, True)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub StopWatcher()
|
||||
If _eventWatcher Is Nothing Then Return
|
||||
_eventWatcher.Stop()
|
||||
_eventWatcher.Dispose()
|
||||
_eventWatcher = Nothing
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Private Fields"
|
||||
Private Const PuttySessionsKey As String = "Software\SimonTatham\PuTTY\Sessions"
|
||||
Private Shared _eventWatcher As ManagementEventWatcher
|
||||
#End Region
|
||||
|
||||
#Region "Private Methods"
|
||||
Private Sub OnManagementEventArrived(ByVal sender As Object, ByVal e As EventArrivedEventArgs)
|
||||
OnSessionChanged(New SessionChangedEventArgs())
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
168
mRemoteV1/Config/Putty/Sessions.vb
Normal file
168
mRemoteV1/Config/Putty/Sessions.vb
Normal file
@@ -0,0 +1,168 @@
|
||||
Imports System.ComponentModel
|
||||
Imports mRemoteNG.Tools
|
||||
|
||||
Namespace Config.Putty
|
||||
Public Class Sessions
|
||||
#Region "Public Methods"
|
||||
Private Delegate Sub AddSessionsToTreeDelegate()
|
||||
Public Shared Sub AddSessionsToTree()
|
||||
Dim treeView As TreeView = Tree.Node.TreeView
|
||||
If treeView Is Nothing Then Return
|
||||
If treeView.InvokeRequired Then
|
||||
treeView.Invoke(New AddSessionsToTreeDelegate(AddressOf AddSessionsToTree))
|
||||
Return
|
||||
End If
|
||||
|
||||
For Each provider As Provider In Providers
|
||||
Dim rootTreeNode As TreeNode = provider.RootTreeNode
|
||||
Dim inUpdate As Boolean = False
|
||||
|
||||
Dim savedSessions As New List(Of Connection.Info)(provider.GetSessions())
|
||||
If Not IsProviderEnabled(provider) Or savedSessions Is Nothing OrElse savedSessions.Count = 0 Then
|
||||
If rootTreeNode IsNot Nothing AndAlso treeView.Nodes.Contains(rootTreeNode) Then
|
||||
treeView.BeginUpdate()
|
||||
treeView.Nodes.Remove(rootTreeNode)
|
||||
treeView.EndUpdate()
|
||||
End If
|
||||
Continue For
|
||||
End If
|
||||
|
||||
If Not treeView.Nodes.Contains(rootTreeNode) Then
|
||||
If Not inUpdate Then
|
||||
treeView.BeginUpdate()
|
||||
inUpdate = True
|
||||
End If
|
||||
treeView.Nodes.Add(rootTreeNode)
|
||||
End If
|
||||
|
||||
Dim newTreeNodes As New List(Of TreeNode)
|
||||
For Each sessionInfo As Connection.PuttySession.Info In savedSessions
|
||||
Dim treeNode As TreeNode
|
||||
Dim isNewNode As Boolean
|
||||
If rootTreeNode.Nodes.ContainsKey(sessionInfo.Name) Then
|
||||
treeNode = rootTreeNode.Nodes.Item(sessionInfo.Name)
|
||||
isNewNode = False
|
||||
Else
|
||||
treeNode = Tree.Node.AddNode(Tree.Node.Type.PuttySession, sessionInfo.Name)
|
||||
If treeNode Is Nothing Then Continue For
|
||||
treeNode.Name = treeNode.Text
|
||||
treeNode.ImageIndex = Images.Enums.TreeImage.ConnectionClosed
|
||||
treeNode.SelectedImageIndex = Images.Enums.TreeImage.ConnectionClosed
|
||||
isNewNode = True
|
||||
End If
|
||||
|
||||
sessionInfo.RootPuttySessionsInfo = provider.RootInfo
|
||||
sessionInfo.TreeNode = treeNode
|
||||
sessionInfo.Inherit.TurnOffInheritanceCompletely()
|
||||
|
||||
treeNode.Tag = sessionInfo
|
||||
|
||||
If isNewNode Then newTreeNodes.Add(treeNode)
|
||||
Next
|
||||
|
||||
For Each treeNode As TreeNode In rootTreeNode.Nodes
|
||||
If Not savedSessions.Contains(treeNode.Tag) Then
|
||||
If Not inUpdate Then
|
||||
treeView.BeginUpdate()
|
||||
inUpdate = True
|
||||
End If
|
||||
rootTreeNode.Nodes.Remove(treeNode)
|
||||
End If
|
||||
Next
|
||||
|
||||
If Not newTreeNodes.Count = 0 Then
|
||||
If Not inUpdate Then
|
||||
treeView.BeginUpdate()
|
||||
inUpdate = True
|
||||
End If
|
||||
rootTreeNode.Nodes.AddRange(newTreeNodes.ToArray())
|
||||
End If
|
||||
|
||||
If inUpdate Then
|
||||
Tree.Node.Sort(rootTreeNode, SortOrder.Ascending)
|
||||
rootTreeNode.Expand()
|
||||
treeView.EndUpdate()
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Shared Sub StartWatcher()
|
||||
For Each provider As Provider In Providers
|
||||
provider.StartWatcher()
|
||||
AddHandler provider.SessionChanged, AddressOf SessionChanged
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Shared Sub StopWatcher()
|
||||
For Each provider As Provider In Providers
|
||||
provider.StopWatcher()
|
||||
RemoveHandler provider.SessionChanged, AddressOf SessionChanged
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Shared Sub SessionChanged(ByVal sender As Object, ByVal e As Provider.SessionChangedEventArgs)
|
||||
AddSessionsToTree()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Private Methods"
|
||||
Private Shared _providers As List(Of Provider)
|
||||
Private Shared ReadOnly Property Providers() As List(Of Provider)
|
||||
Get
|
||||
If _providers Is Nothing OrElse _providers.Count = 0 Then AddProviders()
|
||||
Return _providers
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Shared Sub AddProviders()
|
||||
_providers = New List(Of Provider)()
|
||||
_providers.Add(New RegistryProvider())
|
||||
_providers.Add(New XmingProvider())
|
||||
End Sub
|
||||
|
||||
Private Shared Function GetSessionNames(Optional ByVal raw As Boolean = False) As String()
|
||||
Dim sessionNames As New List(Of String)
|
||||
For Each provider As Provider In Providers
|
||||
If Not IsProviderEnabled(provider) Then Continue For
|
||||
sessionNames.AddRange(provider.GetSessionNames(raw))
|
||||
Next
|
||||
Return sessionNames.ToArray()
|
||||
End Function
|
||||
|
||||
Private Shared Function IsProviderEnabled(ByVal provider As Provider) As Boolean
|
||||
Dim enabled As Boolean = True
|
||||
Select Case PuttyTypeDetector.GetPuttyType()
|
||||
Case PuttyTypeDetector.PuttyType.Xming
|
||||
If TypeOf (provider) Is RegistryProvider Then enabled = False
|
||||
Case Else
|
||||
If TypeOf (provider) Is XmingProvider Then enabled = False
|
||||
End Select
|
||||
Return enabled
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region "Public Classes"
|
||||
Public Class SessionList
|
||||
Inherits StringConverter
|
||||
|
||||
Public Shared ReadOnly Property Names() As String()
|
||||
Get
|
||||
Return GetSessionNames()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Overloads Overrides Function GetStandardValues(ByVal context As System.ComponentModel.ITypeDescriptorContext) As System.ComponentModel.TypeConverter.StandardValuesCollection
|
||||
Return New StandardValuesCollection(Names)
|
||||
End Function
|
||||
|
||||
Public Overloads Overrides Function GetStandardValuesExclusive(ByVal context As System.ComponentModel.ITypeDescriptorContext) As Boolean
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Overloads Overrides Function GetStandardValuesSupported(ByVal context As ITypeDescriptorContext) As Boolean
|
||||
Return True
|
||||
End Function
|
||||
End Class
|
||||
#End Region
|
||||
End Class
|
||||
End Namespace
|
||||
259
mRemoteV1/Config/Putty/XmingProvider.vb
Normal file
259
mRemoteV1/Config/Putty/XmingProvider.vb
Normal file
@@ -0,0 +1,259 @@
|
||||
Imports System.IO
|
||||
Imports mRemoteNG.App
|
||||
Imports mRemoteNG.Messages
|
||||
Imports mRemoteNG.Connection.Protocol
|
||||
Imports System.Text.RegularExpressions
|
||||
|
||||
Namespace Config.Putty
|
||||
Public Class XmingProvider
|
||||
Inherits Provider
|
||||
|
||||
#Region "Public Methods"
|
||||
Public Overrides Function GetSessionNames(Optional ByVal raw As Boolean = False) As String()
|
||||
Dim sessionsFolderPath As String = GetSessionsFolderPath()
|
||||
If Not Directory.Exists(sessionsFolderPath) Then Return New String() {}
|
||||
|
||||
Dim sessionNames As New List(Of String)
|
||||
For Each sessionName As String In Directory.GetFiles(sessionsFolderPath)
|
||||
sessionName = Path.GetFileName(sessionName)
|
||||
If raw Then
|
||||
sessionNames.Add(sessionName)
|
||||
Else
|
||||
sessionNames.Add(Web.HttpUtility.UrlDecode(sessionName.Replace("+", "%2B")))
|
||||
End If
|
||||
Next
|
||||
|
||||
If raw Then
|
||||
If Not sessionNames.Contains("Default%20Settings") Then ' Do not localize
|
||||
sessionNames.Insert(0, "Default%20Settings")
|
||||
End If
|
||||
Else
|
||||
If Not sessionNames.Contains("Default Settings") Then
|
||||
sessionNames.Insert(0, "Default Settings")
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim registrySessionNames As New List(Of String)
|
||||
For Each sessionName As String In RegistryProvider.GetSessionNames(raw)
|
||||
registrySessionNames.Add(String.Format(RegistrySessionNameFormat, sessionName))
|
||||
Next
|
||||
|
||||
sessionNames.AddRange(registrySessionNames)
|
||||
sessionNames.Sort()
|
||||
|
||||
Return sessionNames.ToArray()
|
||||
End Function
|
||||
|
||||
Public Overrides Function GetSession(ByVal sessionName As String) As Connection.PuttySession.Info
|
||||
Dim registrySessionName As String = GetRegistrySessionName(sessionName)
|
||||
If Not String.IsNullOrEmpty(registrySessionName) Then
|
||||
Return ModifyRegistrySessionInfo(RegistryProvider.GetSession(registrySessionName))
|
||||
End If
|
||||
|
||||
Dim sessionsFolderPath As String = GetSessionsFolderPath()
|
||||
If Not Directory.Exists(sessionsFolderPath) Then Return Nothing
|
||||
|
||||
Dim sessionFile As String = Path.Combine(sessionsFolderPath, sessionName)
|
||||
If Not File.Exists(sessionFile) Then Return Nothing
|
||||
|
||||
sessionName = Web.HttpUtility.UrlDecode(sessionName.Replace("+", "%2B"))
|
||||
|
||||
Dim sessionFileReader As New SessionFileReader(sessionFile)
|
||||
Dim sessionInfo As New Connection.PuttySession.Info
|
||||
With sessionInfo
|
||||
.PuttySession = sessionName
|
||||
.Name = sessionName
|
||||
.Hostname = sessionFileReader.GetValue("HostName")
|
||||
.Username = sessionFileReader.GetValue("UserName")
|
||||
Dim protocol As String = sessionFileReader.GetValue("Protocol")
|
||||
If protocol Is Nothing Then protocol = "ssh"
|
||||
Select Case protocol.ToLowerInvariant()
|
||||
Case "raw"
|
||||
.Protocol = Protocols.RAW
|
||||
Case "rlogin"
|
||||
.Protocol = Protocols.Rlogin
|
||||
Case "serial"
|
||||
Return Nothing
|
||||
Case "ssh"
|
||||
Dim sshVersionObject As Object = sessionFileReader.GetValue("SshProt")
|
||||
If sshVersionObject IsNot Nothing Then
|
||||
Dim sshVersion As Integer = CType(sshVersionObject, Integer)
|
||||
If sshVersion >= 2 Then
|
||||
.Protocol = Protocols.SSH2
|
||||
Else
|
||||
.Protocol = Protocols.SSH1
|
||||
End If
|
||||
Else
|
||||
.Protocol = Protocols.SSH2
|
||||
End If
|
||||
Case "telnet"
|
||||
.Protocol = Protocols.Telnet
|
||||
Case Else
|
||||
Return Nothing
|
||||
End Select
|
||||
.Port = sessionFileReader.GetValue("PortNumber")
|
||||
End With
|
||||
|
||||
Return sessionInfo
|
||||
End Function
|
||||
|
||||
Public Overrides Sub StartWatcher()
|
||||
RegistryProvider.StartWatcher()
|
||||
AddHandler RegistryProvider.SessionChanged, AddressOf OnRegistrySessionChanged
|
||||
|
||||
If _eventWatcher IsNot Nothing Then Return
|
||||
|
||||
Try
|
||||
_eventWatcher = New FileSystemWatcher(GetSessionsFolderPath())
|
||||
_eventWatcher.NotifyFilter = (NotifyFilters.FileName Or NotifyFilters.LastWrite)
|
||||
AddHandler _eventWatcher.Changed, AddressOf OnFileSystemEventArrived
|
||||
AddHandler _eventWatcher.Created, AddressOf OnFileSystemEventArrived
|
||||
AddHandler _eventWatcher.Deleted, AddressOf OnFileSystemEventArrived
|
||||
AddHandler _eventWatcher.Renamed, AddressOf OnFileSystemEventArrived
|
||||
_eventWatcher.EnableRaisingEvents = True
|
||||
Catch ex As Exception
|
||||
Runtime.MessageCollector.AddExceptionMessage("XmingPortablePuttySessions.Watcher.StartWatching() failed.", ex, MessageClass.WarningMsg, True)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub StopWatcher()
|
||||
RegistryProvider.StopWatcher()
|
||||
RemoveHandler RegistryProvider.SessionChanged, AddressOf OnRegistrySessionChanged
|
||||
|
||||
If _eventWatcher Is Nothing Then Return
|
||||
_eventWatcher.EnableRaisingEvents = False
|
||||
_eventWatcher.Dispose()
|
||||
_eventWatcher = Nothing
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Private Fields"
|
||||
Private Const RegistrySessionNameFormat As String = "{0} [registry]"
|
||||
Private Const RegistrySessionNamePattern As String = "(.*)\ \[registry\]"
|
||||
|
||||
Private Shared ReadOnly RegistryProvider As New RegistryProvider
|
||||
Private Shared _eventWatcher As FileSystemWatcher
|
||||
#End Region
|
||||
|
||||
#Region "Private Methods"
|
||||
Private Shared Function GetPuttyConfPath() As String
|
||||
Dim puttyPath As String
|
||||
If My.Settings.UseCustomPuttyPath Then
|
||||
puttyPath = My.Settings.CustomPuttyPath
|
||||
Else
|
||||
puttyPath = Info.General.PuttyPath
|
||||
End If
|
||||
Return Path.Combine(Path.GetDirectoryName(puttyPath), "putty.conf")
|
||||
End Function
|
||||
|
||||
Private Shared Function GetSessionsFolderPath() As String
|
||||
Dim puttyConfPath As String = GetPuttyConfPath()
|
||||
Dim sessionFileReader As New PuttyConfFileReader(puttyConfPath)
|
||||
Dim basePath As String = Environment.ExpandEnvironmentVariables(sessionFileReader.GetValue("sshk&sess"))
|
||||
Return Path.Combine(basePath, "sessions")
|
||||
End Function
|
||||
|
||||
Private Shared Function GetRegistrySessionName(ByVal sessionName As String) As String
|
||||
Dim regex As New Regex(RegistrySessionNamePattern)
|
||||
|
||||
Dim matches As MatchCollection = regex.Matches(sessionName)
|
||||
If matches.Count < 1 Then Return String.Empty
|
||||
|
||||
Dim groups As GroupCollection = matches(0).Groups
|
||||
If groups.Count < 1 Then Return String.Empty ' This should always include at least one item, but check anyway
|
||||
|
||||
Return groups(1).Value
|
||||
End Function
|
||||
|
||||
Private Shared Function ModifyRegistrySessionInfo(ByVal sessionInfo As Connection.PuttySession.Info) As Connection.PuttySession.Info
|
||||
sessionInfo.Name = String.Format(RegistrySessionNameFormat, sessionInfo.Name)
|
||||
sessionInfo.PuttySession = String.Format(RegistrySessionNameFormat, sessionInfo.PuttySession)
|
||||
Return sessionInfo
|
||||
End Function
|
||||
|
||||
Private Sub OnFileSystemEventArrived(ByVal sender As Object, ByVal e As FileSystemEventArgs)
|
||||
OnSessionChanged(New SessionChangedEventArgs())
|
||||
End Sub
|
||||
|
||||
Private Sub OnRegistrySessionChanged(ByVal sender As Object, ByVal e As SessionChangedEventArgs)
|
||||
OnSessionChanged(New SessionChangedEventArgs())
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Private Classes"
|
||||
Private Class PuttyConfFileReader
|
||||
Public Sub New(ByVal puttyConfFile As String)
|
||||
_puttyConfFile = puttyConfFile
|
||||
End Sub
|
||||
|
||||
Private ReadOnly _puttyConfFile As String
|
||||
Private _configurationLoaded As Boolean = False
|
||||
Private ReadOnly _configuration As New Dictionary(Of String, String)
|
||||
|
||||
Private Sub LoadConfiguration()
|
||||
_configurationLoaded = True
|
||||
Try
|
||||
If Not File.Exists(_puttyConfFile) Then Return
|
||||
Using streamReader As New StreamReader(_puttyConfFile)
|
||||
Dim line As String
|
||||
Do
|
||||
line = streamReader.ReadLine()
|
||||
If line Is Nothing Then Exit Do
|
||||
line = line.Trim()
|
||||
If line = String.Empty Then Continue Do ' Blank line
|
||||
If line.Substring(0, 1) = ";" Then Continue Do ' Comment
|
||||
Dim parts() As String = line.Split(New Char() {"="}, 2)
|
||||
If parts.Length < 2 Then Continue Do
|
||||
If _configuration.ContainsKey(parts(0)) Then Continue Do ' As per http://www.straightrunning.com/XmingNotes/portableputty.php only first entry is used
|
||||
_configuration.Add(parts(0), parts(1))
|
||||
Loop
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
Runtime.MessageCollector.AddExceptionMessage("PuttyConfFileReader.LoadConfiguration() failed.", ex, MessageClass.ErrorMsg, True)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Function GetValue(ByVal setting As String) As String
|
||||
If Not _configurationLoaded Then LoadConfiguration()
|
||||
If Not _configuration.ContainsKey(setting) Then Return String.Empty
|
||||
Return _configuration(setting)
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Private Class SessionFileReader
|
||||
Public Sub New(ByVal sessionFile As String)
|
||||
_sessionFile = sessionFile
|
||||
End Sub
|
||||
|
||||
Private ReadOnly _sessionFile As String
|
||||
Private _sessionInfoLoaded As Boolean = False
|
||||
Private ReadOnly _sessionInfo As New Dictionary(Of String, String)
|
||||
|
||||
Private Sub LoadSessionInfo()
|
||||
_sessionInfoLoaded = True
|
||||
Try
|
||||
If Not File.Exists(_sessionFile) Then Return
|
||||
Using streamReader As New StreamReader(_sessionFile)
|
||||
Dim line As String
|
||||
Do
|
||||
line = streamReader.ReadLine()
|
||||
If line Is Nothing Then Exit Do
|
||||
Dim parts() As String = line.Split(New Char() {"\"})
|
||||
If parts.Length < 2 Then Continue Do
|
||||
_sessionInfo.Add(parts(0), parts(1))
|
||||
Loop
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
Runtime.MessageCollector.AddExceptionMessage("SessionFileReader.LoadSessionInfo() failed.", ex, MessageClass.ErrorMsg, True)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Function GetValue(ByVal setting As String) As String
|
||||
If Not _sessionInfoLoaded Then LoadSessionInfo()
|
||||
If Not _sessionInfo.ContainsKey(setting) Then Return String.Empty
|
||||
Return _sessionInfo(setting)
|
||||
End Function
|
||||
End Class
|
||||
#End Region
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -1,5 +1,5 @@
|
||||
Imports System.ComponentModel
|
||||
Imports mRemote.App.Runtime
|
||||
Imports mRemoteNG.App.Runtime
|
||||
|
||||
Namespace Connection
|
||||
Public Class Icon
|
||||
@@ -29,7 +29,7 @@ Namespace Connection
|
||||
Return nI
|
||||
End If
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "Couldn't get Icon from String" & vbNewLine & ex.Message)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, "Couldn't get Icon from String" & vbNewLine & ex.Message)
|
||||
End Try
|
||||
|
||||
Return Nothing
|
||||
|
||||
449
mRemoteV1/Connection/Connection.Info.Inheritance.vb
Normal file
449
mRemoteV1/Connection/Connection.Info.Inheritance.vb
Normal file
@@ -0,0 +1,449 @@
|
||||
Imports System.ComponentModel
|
||||
Imports mRemoteNG.Tools.LocalizedAttributes
|
||||
|
||||
Namespace Connection
|
||||
Partial Public Class Info
|
||||
Public Class Inheritance
|
||||
#Region "Public Properties"
|
||||
#Region "General"
|
||||
<LocalizedCategory("strCategoryGeneral", 1), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameAll"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionAll"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property EverythingInherited() As Boolean
|
||||
Get
|
||||
If CacheBitmaps And Colors And Description And DisplayThemes And DisplayWallpaper _
|
||||
And EnableFontSmoothing And EnableDesktopComposition And Domain And Icon And Password _
|
||||
And Port And Protocol And PuttySession And RedirectDiskDrives And RedirectKeys _
|
||||
And RedirectPorts And RedirectPrinters And RedirectSmartCards And RedirectSound And Resolution _
|
||||
And AutomaticResize And UseConsoleSession And UseCredSsp And RenderingEngine And UserField _
|
||||
And ExtApp And Username And Panel And ICAEncryption And RDPAuthenticationLevel _
|
||||
And LoadBalanceInfo And PreExtApp And PostExtApp And MacAddress And VNCAuthMode _
|
||||
And VNCColors And VNCCompression And VNCEncoding And VNCProxyIP And VNCProxyPassword _
|
||||
And VNCProxyPort And VNCProxyType And VNCProxyUsername Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Get
|
||||
Set(ByVal value As Boolean)
|
||||
SetAllValues(value)
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
#Region "Display"
|
||||
<LocalizedCategory("strCategoryDisplay", 2), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameDescription"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionDescription"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property Description() As Boolean = My.Settings.InhDefaultDescription
|
||||
|
||||
<LocalizedCategory("strCategoryDisplay", 2), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameIcon"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionIcon"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property Icon() As Boolean = My.Settings.InhDefaultIcon
|
||||
|
||||
<LocalizedCategory("strCategoryDisplay", 2), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNamePanel"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionPanel"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property Panel() As Boolean = My.Settings.InhDefaultPanel
|
||||
#End Region
|
||||
#Region "Connection"
|
||||
<LocalizedCategory("strCategoryConnection", 3), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameUsername"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionUsername"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property Username() As Boolean = My.Settings.InhDefaultUsername
|
||||
|
||||
<LocalizedCategory("strCategoryConnection", 3), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNamePassword"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionPassword"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property Password() As Boolean = My.Settings.InhDefaultPassword
|
||||
|
||||
<LocalizedCategory("strCategoryConnection", 3), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameDomain"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionDomain"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property Domain() As Boolean = My.Settings.InhDefaultDomain
|
||||
#End Region
|
||||
#Region "Protocol"
|
||||
<LocalizedCategory("strCategoryProtocol", 4), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameProtocol"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionProtocol"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property Protocol() As Boolean = My.Settings.InhDefaultProtocol
|
||||
|
||||
<LocalizedCategory("strCategoryProtocol", 4), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameExternalTool"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionExternalTool"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property ExtApp() As Boolean = My.Settings.InhDefaultExtApp
|
||||
|
||||
<LocalizedCategory("strCategoryProtocol", 4), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNamePort"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionPort"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property Port() As Boolean = My.Settings.InhDefaultPort
|
||||
|
||||
<LocalizedCategory("strCategoryProtocol", 4), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNamePuttySession"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionPuttySession"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property PuttySession() As Boolean = My.Settings.InhDefaultPuttySession
|
||||
|
||||
<LocalizedCategory("strCategoryProtocol", 4), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameEncryptionStrength"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionEncryptionStrength"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property ICAEncryption() As Boolean = My.Settings.InhDefaultICAEncryptionStrength
|
||||
|
||||
<LocalizedCategory("strCategoryProtocol", 4), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameAuthenticationLevel"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionAuthenticationLevel"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property RDPAuthenticationLevel() As Boolean = My.Settings.InhDefaultRDPAuthenticationLevel
|
||||
|
||||
<LocalizedCategory("strCategoryProtocol", 4), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameLoadBalanceInfo"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionLoadBalanceInfo"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property LoadBalanceInfo() As Boolean = My.Settings.InhDefaultLoadBalanceInfo
|
||||
|
||||
<LocalizedCategory("strCategoryProtocol", 4), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameRenderingEngine"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionRenderingEngine"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property RenderingEngine() As Boolean = My.Settings.InhDefaultRenderingEngine
|
||||
|
||||
<LocalizedCategory("strCategoryProtocol", 4), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameUseConsoleSession"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionUseConsoleSession"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property UseConsoleSession() As Boolean = My.Settings.InhDefaultUseConsoleSession
|
||||
|
||||
<LocalizedCategory("strCategoryProtocol", 4), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameUseCredSsp"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionUseCredSsp"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property UseCredSsp() As Boolean = My.Settings.InhDefaultUseCredSsp
|
||||
#End Region
|
||||
#Region "RD Gateway"
|
||||
<LocalizedCategory("strCategoryGateway", 5), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameRDGatewayUsageMethod"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionRDGatewayUsageMethod"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property RDGatewayUsageMethod() As Boolean = My.Settings.InhDefaultRDGatewayUsageMethod
|
||||
|
||||
<LocalizedCategory("strCategoryGateway", 5), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameRDGatewayHostname"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionRDGatewayHostname"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property RDGatewayHostname() As Boolean = My.Settings.InhDefaultRDGatewayHostname
|
||||
|
||||
<LocalizedCategory("strCategoryGateway", 5), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameRDGatewayUseConnectionCredentials"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionRDGatewayUseConnectionCredentials"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property RDGatewayUseConnectionCredentials() As Boolean = My.Settings.InhDefaultRDGatewayUseConnectionCredentials
|
||||
|
||||
<LocalizedCategory("strCategoryGateway", 5), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameRDGatewayUsername"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionRDGatewayUsername"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property RDGatewayUsername() As Boolean = My.Settings.InhDefaultRDGatewayUsername
|
||||
|
||||
<LocalizedCategory("strCategoryGateway", 5), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameRDGatewayPassword"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionRDGatewayPassword"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property RDGatewayPassword() As Boolean = My.Settings.InhDefaultRDGatewayPassword
|
||||
|
||||
<LocalizedCategory("strCategoryGateway", 5), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameRDGatewayDomain"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionRDGatewayDomain"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property RDGatewayDomain() As Boolean = My.Settings.InhDefaultRDGatewayDomain
|
||||
#End Region
|
||||
#Region "Appearance"
|
||||
<LocalizedCategory("strCategoryAppearance", 6), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameResolution"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionResolution"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property Resolution() As Boolean = My.Settings.InhDefaultResolution
|
||||
|
||||
<LocalizedCategory("strCategoryAppearance", 6), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameAutomaticResize"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionAutomaticResize"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property AutomaticResize() As Boolean = My.Settings.InhDefaultAutomaticResize
|
||||
|
||||
<LocalizedCategory("strCategoryAppearance", 6), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameColors"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionColors"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property Colors() As Boolean = My.Settings.InhDefaultColors
|
||||
|
||||
<LocalizedCategory("strCategoryAppearance", 6), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameCacheBitmaps"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionCacheBitmaps"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property CacheBitmaps() As Boolean = My.Settings.InhDefaultCacheBitmaps
|
||||
|
||||
<LocalizedCategory("strCategoryAppearance", 6), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameDisplayWallpaper"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionDisplayWallpaper"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property DisplayWallpaper() As Boolean = My.Settings.InhDefaultDisplayWallpaper
|
||||
|
||||
<LocalizedCategory("strCategoryAppearance", 6), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameDisplayThemes"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionDisplayThemes"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property DisplayThemes() As Boolean = My.Settings.InhDefaultDisplayThemes
|
||||
|
||||
<LocalizedCategory("strCategoryAppearance", 6), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameEnableFontSmoothing"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionEnableFontSmoothing"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property EnableFontSmoothing() As Boolean = My.Settings.InhDefaultEnableFontSmoothing
|
||||
|
||||
<LocalizedCategory("strCategoryAppearance", 6), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameEnableDesktopComposition"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionEnableEnableDesktopComposition"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property EnableDesktopComposition() As Boolean = My.Settings.InhDefaultEnableDesktopComposition
|
||||
#End Region
|
||||
#Region "Redirect"
|
||||
<LocalizedCategory("strCategoryRedirect", 7), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameRedirectKeys"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionRedirectKeys"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property RedirectKeys() As Boolean = My.Settings.InhDefaultRedirectKeys
|
||||
|
||||
<LocalizedCategory("strCategoryRedirect", 7), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameRedirectDrives"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionRedirectDrives"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property RedirectDiskDrives() As Boolean = My.Settings.InhDefaultRedirectDiskDrives
|
||||
|
||||
<LocalizedCategory("strCategoryRedirect", 7), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameRedirectPrinters"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionRedirectPrinters"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property RedirectPrinters() As Boolean = My.Settings.InhDefaultRedirectPrinters
|
||||
|
||||
<LocalizedCategory("strCategoryRedirect", 7), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameRedirectPorts"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionRedirectPorts"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property RedirectPorts() As Boolean = My.Settings.InhDefaultRedirectPorts
|
||||
|
||||
<LocalizedCategory("strCategoryRedirect", 7), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameRedirectSmartCards"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionRedirectSmartCards"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property RedirectSmartCards() As Boolean = My.Settings.InhDefaultRedirectSmartCards
|
||||
|
||||
<LocalizedCategory("strCategoryRedirect", 7), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameRedirectSounds"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionRedirectSounds"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property RedirectSound() As Boolean = My.Settings.InhDefaultRedirectSound
|
||||
#End Region
|
||||
#Region "Misc"
|
||||
<LocalizedCategory("strCategoryMiscellaneous", 8), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameExternalToolBefore"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionExternalToolBefore"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property PreExtApp() As Boolean = My.Settings.InhDefaultPreExtApp
|
||||
|
||||
<LocalizedCategory("strCategoryMiscellaneous", 8), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameExternalToolAfter"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionExternalToolAfter"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property PostExtApp() As Boolean = My.Settings.InhDefaultPostExtApp
|
||||
|
||||
<LocalizedCategory("strCategoryMiscellaneous", 8), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameMACAddress"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionMACAddress"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property MacAddress() As Boolean = My.Settings.InhDefaultMacAddress
|
||||
|
||||
<LocalizedCategory("strCategoryMiscellaneous", 8), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameUser1"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionUser1"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property UserField() As Boolean = My.Settings.InhDefaultUserField
|
||||
#End Region
|
||||
#Region "VNC"
|
||||
<LocalizedCategory("strCategoryAppearance", 9), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameCompression"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionCompression"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property VNCCompression() As Boolean = My.Settings.InhDefaultVNCCompression
|
||||
|
||||
<LocalizedCategory("strCategoryAppearance", 9), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameEncoding"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionEncoding"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property VNCEncoding() As Boolean = My.Settings.InhDefaultVNCEncoding
|
||||
|
||||
<LocalizedCategory("strCategoryConnection", 9), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameAuthenticationMode"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionAuthenticationMode"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property VNCAuthMode() As Boolean = My.Settings.InhDefaultVNCAuthMode
|
||||
|
||||
<LocalizedCategory("strCategoryMiscellaneous", 9), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameVNCProxyType"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionVNCProxyType"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property VNCProxyType() As Boolean = My.Settings.InhDefaultVNCProxyType
|
||||
|
||||
<LocalizedCategory("strCategoryMiscellaneous", 9), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameVNCProxyAddress"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionVNCProxyAddress"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property VNCProxyIP() As Boolean = My.Settings.InhDefaultVNCProxyIP
|
||||
|
||||
<LocalizedCategory("strCategoryMiscellaneous", 9), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameVNCProxyPort"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionVNCProxyPort"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property VNCProxyPort() As Boolean = My.Settings.InhDefaultVNCProxyPort
|
||||
|
||||
<LocalizedCategory("strCategoryMiscellaneous", 9), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameVNCProxyUsername"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionVNCProxyUsername"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property VNCProxyUsername() As Boolean = My.Settings.InhDefaultVNCProxyUsername
|
||||
|
||||
<LocalizedCategory("strCategoryMiscellaneous", 9), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameVNCProxyPassword"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionVNCProxyPassword"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property VNCProxyPassword() As Boolean = My.Settings.InhDefaultVNCProxyPassword
|
||||
|
||||
<LocalizedCategory("strCategoryAppearance", 9), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameColors"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionColors"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property VNCColors() As Boolean = My.Settings.InhDefaultVNCColors
|
||||
|
||||
<LocalizedCategory("strCategoryAppearance", 9), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameSmartSizeMode"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionSmartSizeMode"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property VNCSmartSizeMode() As Boolean = My.Settings.InhDefaultVNCSmartSizeMode
|
||||
|
||||
<LocalizedCategory("strCategoryAppearance", 9), _
|
||||
LocalizedDisplayNameInheritAttribute("strPropertyNameViewOnly"), _
|
||||
LocalizedDescriptionInheritAttribute("strPropertyDescriptionViewOnly"), _
|
||||
TypeConverter(GetType(Tools.Misc.YesNoTypeConverter))> _
|
||||
Public Property VNCViewOnly() As Boolean = My.Settings.InhDefaultVNCViewOnly
|
||||
#End Region
|
||||
|
||||
<Browsable(False)> _
|
||||
Public Property Parent() As Object
|
||||
|
||||
<Browsable(False)> _
|
||||
Public Property IsDefault() As Boolean
|
||||
#End Region
|
||||
|
||||
#Region "Constructors"
|
||||
Public Sub New(ByVal parent As Object, Optional ByVal inheritEverything As Boolean = False)
|
||||
Me.Parent = parent
|
||||
If inheritEverything Then TurnOnInheritanceCompletely()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Public Methods"
|
||||
Public Function Copy() As Inheritance
|
||||
Return MemberwiseClone()
|
||||
End Function
|
||||
|
||||
Public Sub TurnOnInheritanceCompletely()
|
||||
SetAllValues(True)
|
||||
End Sub
|
||||
|
||||
Public Sub TurnOffInheritanceCompletely()
|
||||
SetAllValues(False)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Private Methods"
|
||||
Private Sub SetAllValues(ByVal value As Boolean)
|
||||
' Display
|
||||
Description = value
|
||||
Icon = value
|
||||
Panel = value
|
||||
|
||||
' Connection
|
||||
Username = value
|
||||
Password = value
|
||||
Domain = value
|
||||
|
||||
' Protocol
|
||||
Protocol = value
|
||||
ExtApp = value
|
||||
Port = value
|
||||
PuttySession = value
|
||||
ICAEncryption = value
|
||||
RDPAuthenticationLevel = value
|
||||
LoadBalanceInfo = value
|
||||
RenderingEngine = value
|
||||
UseConsoleSession = value
|
||||
UseCredSsp = value
|
||||
|
||||
' RD Gateway
|
||||
RDGatewayUsageMethod = value
|
||||
RDGatewayHostname = value
|
||||
RDGatewayUseConnectionCredentials = value
|
||||
RDGatewayUsername = value
|
||||
RDGatewayPassword = value
|
||||
RDGatewayDomain = value
|
||||
|
||||
' Appearance
|
||||
Resolution = value
|
||||
AutomaticResize = value
|
||||
Colors = value
|
||||
CacheBitmaps = value
|
||||
DisplayWallpaper = value
|
||||
DisplayThemes = value
|
||||
EnableFontSmoothing = value
|
||||
EnableDesktopComposition = value
|
||||
|
||||
' Redirect
|
||||
RedirectKeys = value
|
||||
RedirectDiskDrives = value
|
||||
RedirectPrinters = value
|
||||
RedirectPorts = value
|
||||
RedirectSmartCards = value
|
||||
RedirectSound = value
|
||||
|
||||
' Misc
|
||||
PreExtApp = value
|
||||
PostExtApp = value
|
||||
MacAddress = value
|
||||
UserField = value
|
||||
|
||||
' VNC
|
||||
VNCCompression = value
|
||||
VNCEncoding = value
|
||||
VNCAuthMode = value
|
||||
VNCProxyType = value
|
||||
VNCProxyIP = value
|
||||
VNCProxyPort = value
|
||||
VNCProxyUsername = value
|
||||
VNCProxyPassword = value
|
||||
VNCColors = value
|
||||
VNCSmartSizeMode = value
|
||||
VNCViewOnly = value
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
End Class
|
||||
End Namespace
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
Imports System.Windows.Forms
|
||||
Imports System.Drawing
|
||||
Imports mRemote.App.Runtime
|
||||
Imports mRemoteNG.App.Runtime
|
||||
|
||||
Namespace Connection
|
||||
Public Class InterfaceControl
|
||||
@@ -37,7 +37,7 @@ Namespace Connection
|
||||
Me.Anchor = AnchorStyles.Bottom Or AnchorStyles.Left Or AnchorStyles.Right Or AnchorStyles.Top
|
||||
InitializeComponent()
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "Couldn't create new InterfaceControl" & vbNewLine & ex.Message)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, "Couldn't create new InterfaceControl" & vbNewLine & ex.Message)
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Namespace Connection
|
||||
Public Class List
|
||||
Inherits CollectionBase
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Imports System.Windows.Forms
|
||||
Imports System.Threading
|
||||
Imports mRemote.App.Runtime
|
||||
Imports mRemoteNG.App.Runtime
|
||||
|
||||
Namespace Connection
|
||||
Namespace Protocol
|
||||
@@ -17,14 +17,24 @@ Namespace Connection
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private _InterfaceControl As Connection.InterfaceControl
|
||||
Public Property InterfaceControl() As Connection.InterfaceControl
|
||||
Private WithEvents _connectionWindow As UI.Window.Connection
|
||||
Public Property ConnectionWindow As UI.Window.Connection
|
||||
Get
|
||||
Return Me._InterfaceControl
|
||||
Return _connectionWindow
|
||||
End Get
|
||||
Set(ByVal value As Connection.InterfaceControl)
|
||||
Me._InterfaceControl = value
|
||||
Set(value As UI.Window.Connection)
|
||||
_connectionWindow = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private _interfaceControl As InterfaceControl
|
||||
Public Property InterfaceControl() As InterfaceControl
|
||||
Get
|
||||
Return _interfaceControl
|
||||
End Get
|
||||
Set(ByVal value As InterfaceControl)
|
||||
_interfaceControl = value
|
||||
ConnectionWindow = TryCast(_interfaceControl.GetContainerControl(), UI.Window.Connection)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -39,12 +49,12 @@ Namespace Connection
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Private _Force As mRemote.Connection.Info.Force
|
||||
Public Property Force() As mRemote.Connection.Info.Force
|
||||
Private _Force As mRemoteNG.Connection.Info.Force
|
||||
Public Property Force() As mRemoteNG.Connection.Info.Force
|
||||
Get
|
||||
Return Me._Force
|
||||
End Get
|
||||
Set(ByVal value As mRemote.Connection.Info.Force)
|
||||
Set(ByVal value As mRemoteNG.Connection.Info.Force)
|
||||
Me._Force = value
|
||||
End Set
|
||||
End Property
|
||||
@@ -58,26 +68,38 @@ Namespace Connection
|
||||
Try
|
||||
Me._Control.Focus()
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "Couldn't focus Control (Connection.Protocol.Base)" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, "Couldn't focus Control (Connection.Protocol.Base)" & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Overridable Sub ResizeBegin(ByVal sender As System.Object, ByVal e As EventArgs) Handles _connectionWindow.ResizeBegin
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overridable Sub Resize(ByVal sender As System.Object, ByVal e As EventArgs) Handles _connectionWindow.Resize
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overridable Sub ResizeEnd(ByVal sender As System.Object, ByVal e As EventArgs) Handles _connectionWindow.ResizeEnd
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overridable Function SetProps() As Boolean
|
||||
Try
|
||||
Me._InterfaceControl.Parent.Tag = Me._InterfaceControl
|
||||
Me._InterfaceControl.Show()
|
||||
Me._interfaceControl.Parent.Tag = Me._interfaceControl
|
||||
Me._interfaceControl.Show()
|
||||
|
||||
If Me._Control IsNot Nothing Then
|
||||
Me._Control.Name = Me._Name
|
||||
Me._Control.Parent = Me._InterfaceControl
|
||||
Me._Control.Location = Me._InterfaceControl.Location
|
||||
Me._Control.Parent = Me._interfaceControl
|
||||
Me._Control.Location = Me._interfaceControl.Location
|
||||
Me._Control.Size = Me.InterfaceControl.Size
|
||||
Me._Control.Anchor = Me._InterfaceControl.Anchor
|
||||
Me._Control.Anchor = Me._interfaceControl.Anchor
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "Couldn't SetProps (Connection.Protocol.Base)" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, "Couldn't SetProps (Connection.Protocol.Base)" & vbNewLine & ex.Message, True)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
@@ -92,12 +114,9 @@ Namespace Connection
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Public Overridable Sub Resize()
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overridable Sub Close()
|
||||
Dim t As New Thread(AddressOf CloseBG)
|
||||
t.SetApartmentState(Threading.ApartmentState.STA)
|
||||
t.IsBackground = True
|
||||
t.Start()
|
||||
End Sub
|
||||
@@ -112,7 +131,7 @@ Namespace Connection
|
||||
Try
|
||||
Me.DisposeControl()
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.WarningMsg, "Could not dispose control, probably form is already closed (Connection.Protocol.Base)" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.WarningMsg, "Could not dispose control, probably form is already closed (Connection.Protocol.Base)" & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
End If
|
||||
|
||||
@@ -126,11 +145,11 @@ Namespace Connection
|
||||
Me.DisposeInterface()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.WarningMsg, "Could not set InterfaceControl.Parent.Tag or Dispose Interface, probably form is already closed (Connection.Protocol.Base)" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.WarningMsg, "Could not set InterfaceControl.Parent.Tag or Dispose Interface, probably form is already closed (Connection.Protocol.Base)" & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
End If
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "Couldn't Close InterfaceControl BG (Connection.Protocol.Base)" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, "Couldn't Close InterfaceControl BG (Connection.Protocol.Base)" & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
Imports System.Windows.Forms
|
||||
Imports mRemote.App.Runtime
|
||||
|
||||
Namespace Connection
|
||||
Namespace Protocol
|
||||
Public Class HTTP
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
Imports System.Windows.Forms
|
||||
Imports mRemote.App.Runtime
|
||||
Imports Skybound.Gecko
|
||||
Imports System.ComponentModel
|
||||
Imports mRemoteNG.App.Runtime
|
||||
Imports mRemoteNG.Tools.LocalizedAttributes
|
||||
|
||||
Namespace Connection
|
||||
Namespace Protocol
|
||||
@@ -19,7 +18,6 @@ Namespace Connection
|
||||
Public Sub New(ByVal RenderingEngine As RenderingEngine)
|
||||
Try
|
||||
If RenderingEngine = RenderingEngine.Gecko Then
|
||||
'Skybound.Gecko.Xpcom.Initialize(My.Settings.XULRunnerPath)
|
||||
Me.Control = New MiniGeckoBrowser.MiniGeckoBrowser
|
||||
TryCast(Me.Control, MiniGeckoBrowser.MiniGeckoBrowser).XULrunnerPath = My.Settings.XULRunnerPath
|
||||
Else
|
||||
@@ -28,7 +26,7 @@ Namespace Connection
|
||||
|
||||
NewExtended()
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "Couldn't create new Connection.Protocol.HTTPBase" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strHttpConnectionFailed & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@@ -39,24 +37,34 @@ Namespace Connection
|
||||
MyBase.SetProps()
|
||||
|
||||
Try
|
||||
wBrowser = Me.Control
|
||||
Dim objTabPage As Crownwood.Magic.Controls.TabPage = TryCast(Me.InterfaceControl.Parent, Crownwood.Magic.Controls.TabPage)
|
||||
Me.tabTitle = objTabPage.Title
|
||||
Catch ex As Exception
|
||||
Me.tabTitle = ""
|
||||
End Try
|
||||
|
||||
Try
|
||||
Me.wBrowser = Me.Control
|
||||
|
||||
If InterfaceControl.Info.RenderingEngine = RenderingEngine.Gecko Then
|
||||
'AddHandler TryCast(wBrowser, GeckoWebBrowser).CreateWindow, AddressOf gex_CreateWindow
|
||||
AddHandler TryCast(wBrowser, MiniGeckoBrowser.MiniGeckoBrowser).TitleChanged, AddressOf wBrowser_DocumentTitleChanged
|
||||
AddHandler TryCast(wBrowser, MiniGeckoBrowser.MiniGeckoBrowser).LastTabRemoved, AddressOf wBrowser_LastTabRemoved
|
||||
'wBrowser.Width = wBrowser.Width
|
||||
Else
|
||||
TryCast(wBrowser, WebBrowser).AllowWebBrowserDrop = False
|
||||
TryCast(wBrowser, WebBrowser).ScrollBarsEnabled = True
|
||||
Dim objMiniGeckoBrowser As MiniGeckoBrowser.MiniGeckoBrowser = TryCast(wBrowser, MiniGeckoBrowser.MiniGeckoBrowser)
|
||||
|
||||
AddHandler TryCast(wBrowser, WebBrowser).DocumentTitleChanged, AddressOf wBrowser_DocumentTitleChanged
|
||||
AddHandler TryCast(wBrowser, WebBrowser).NewWindow, AddressOf wBrowser_NewWindow
|
||||
AddHandler objMiniGeckoBrowser.TitleChanged, AddressOf wBrowser_DocumentTitleChanged
|
||||
AddHandler objMiniGeckoBrowser.LastTabRemoved, AddressOf wBrowser_LastTabRemoved
|
||||
Else
|
||||
Dim objWebBrowser As WebBrowser = TryCast(wBrowser, WebBrowser)
|
||||
Dim objAxWebBrowser As SHDocVw.WebBrowser = DirectCast(objWebBrowser.ActiveXInstance, SHDocVw.WebBrowser)
|
||||
|
||||
objWebBrowser.ScrollBarsEnabled = True
|
||||
|
||||
AddHandler objWebBrowser.Navigated, AddressOf wBrowser_Navigated
|
||||
AddHandler objWebBrowser.DocumentTitleChanged, AddressOf wBrowser_DocumentTitleChanged
|
||||
AddHandler objAxWebBrowser.NewWindow3, AddressOf wBrowser_NewWindow3
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "Couldn't SetProps (Connection.Protocol.HTTPBase)" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strHttpSetPropsFailed & vbNewLine & ex.Message, True)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
@@ -66,7 +74,7 @@ Namespace Connection
|
||||
Dim strHost As String = Me.InterfaceControl.Info.Hostname
|
||||
Dim strAuth As String = ""
|
||||
|
||||
If Me.InterfaceControl.Info.Username <> "" And Me.InterfaceControl.Info.Password <> "" Then
|
||||
If Not ((Force And Info.Force.NoCredentials) = Info.Force.NoCredentials) And Not String.IsNullOrEmpty(InterfaceControl.Info.Username) And Not String.IsNullOrEmpty(InterfaceControl.Info.Password) Then
|
||||
strAuth = "Authorization: Basic " + Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes(Me.InterfaceControl.Info.Username & ":" & Me.InterfaceControl.Info.Password)) & vbNewLine
|
||||
End If
|
||||
|
||||
@@ -99,7 +107,7 @@ Namespace Connection
|
||||
MyBase.Connect()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "Couldn't Connect (Connection.Protocol.HTTPBase)" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strHttpConnectFailed & vbNewLine & ex.Message, True)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
@@ -110,15 +118,22 @@ Namespace Connection
|
||||
#End Region
|
||||
|
||||
#Region "Events"
|
||||
Private Sub gex_CreateWindow(ByVal sender As Object, ByVal e As Skybound.Gecko.GeckoCreateWindowEventArgs)
|
||||
'Dim tP As TabPage = AddTab()
|
||||
'e.WebBrowser = tP.Controls(0)
|
||||
e.WebBrowser = Me.wBrowser
|
||||
Private Sub wBrowser_Navigated(sender As Object, e As System.Windows.Forms.WebBrowserNavigatedEventArgs)
|
||||
Dim objWebBrowser As WebBrowser = TryCast(wBrowser, WebBrowser)
|
||||
If objWebBrowser Is Nothing Then Return
|
||||
|
||||
' This can only be set once the WebBrowser control is shown, it will throw a COM exception otherwise.
|
||||
objWebBrowser.AllowWebBrowserDrop = False
|
||||
|
||||
RemoveHandler objWebBrowser.Navigated, AddressOf wBrowser_Navigated
|
||||
End Sub
|
||||
|
||||
Private Sub wBrowser_NewWindow(ByVal sender As Object, ByVal e As CancelEventArgs)
|
||||
e.Cancel = True
|
||||
TryCast(wBrowser, WebBrowser).Navigate(TryCast(wBrowser, WebBrowser).StatusText)
|
||||
Private Sub wBrowser_NewWindow3(ByRef ppDisp As Object, ByRef Cancel As Boolean, ByVal dwFlags As Long, ByVal bstrUrlContext As String, ByVal bstrUrl As String)
|
||||
If (dwFlags And NWMF.NWMF_OVERRIDEKEY) Then
|
||||
Cancel = False
|
||||
Else
|
||||
Cancel = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub wBrowser_LastTabRemoved(ByVal sender As Object)
|
||||
@@ -131,10 +146,6 @@ Namespace Connection
|
||||
tabP = TryCast(InterfaceControl.Parent, Crownwood.Magic.Controls.TabPage)
|
||||
|
||||
If tabP IsNot Nothing Then
|
||||
If tabTitle = "" Then
|
||||
tabTitle = tabP.Title
|
||||
End If
|
||||
|
||||
Dim shortTitle As String = ""
|
||||
|
||||
If Me.InterfaceControl.Info.RenderingEngine = RenderingEngine.Gecko Then
|
||||
@@ -151,20 +162,45 @@ Namespace Connection
|
||||
End If
|
||||
End If
|
||||
|
||||
tabP.Title = tabTitle & " - " & shortTitle
|
||||
If Me.tabTitle <> "" Then
|
||||
tabP.Title = tabTitle & " - " & shortTitle
|
||||
Else
|
||||
tabP.Title = shortTitle
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.WarningMsg, "wBrowser_DocumentTitleChanged (Connection.Protocol.HTTPBase) failed" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.WarningMsg, My.Language.strHttpDocumentTileChangeFailed & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Enums"
|
||||
Public Enum RenderingEngine
|
||||
<Description("Internet Explorer")> _
|
||||
<LocalizedDescription("strHttpInternetExplorer")> _
|
||||
IE = 1
|
||||
<Description("Gecko (Firefox)")> _
|
||||
<LocalizedDescription("strHttpGecko")> _
|
||||
Gecko = 2
|
||||
End Enum
|
||||
|
||||
Private Enum NWMF
|
||||
' ReSharper disable InconsistentNaming
|
||||
NWMF_UNLOADING = &H1
|
||||
NWMF_USERINITED = &H2
|
||||
NWMF_FIRST = &H4
|
||||
NWMF_OVERRIDEKEY = &H8
|
||||
NWMF_SHOWHELP = &H10
|
||||
NWMF_HTMLDIALOG = &H20
|
||||
NWMF_FROMDIALOGCHILD = &H40
|
||||
NWMF_USERREQUESTED = &H80
|
||||
NWMF_USERALLOWED = &H100
|
||||
NWMF_FORCEWINDOW = &H10000
|
||||
NWMF_FORCETAB = &H20000
|
||||
NWMF_SUGGESTWINDOW = &H40000
|
||||
NWMF_SUGGESTTAB = &H80000
|
||||
NWMF_INACTIVETAB = &H100000
|
||||
' ReSharper restore InconsistentNaming
|
||||
End Enum
|
||||
#End Region
|
||||
End Class
|
||||
End Namespace
|
||||
End Namespace
|
||||
@@ -1,7 +1,4 @@
|
||||
Imports System.Windows.Forms
|
||||
Imports mRemote.App.Runtime
|
||||
|
||||
Namespace Connection
|
||||
Namespace Connection
|
||||
Namespace Protocol
|
||||
Public Class HTTPS
|
||||
Inherits Connection.Protocol.HTTPBase
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Imports mRemote.App.Runtime
|
||||
Imports mRemoteNG.App.Runtime
|
||||
Imports System.Threading
|
||||
Imports AxWFICALib
|
||||
Imports System.ComponentModel
|
||||
Imports mRemoteNG.Tools.LocalizedAttributes
|
||||
|
||||
Namespace Connection
|
||||
Namespace Protocol
|
||||
@@ -18,7 +18,7 @@ Namespace Connection
|
||||
Try
|
||||
Me.Control = New AxICAClient
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "Couldn't create new Connection.Protocol.ICA" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strIcaControlFailed & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@@ -45,13 +45,37 @@ Namespace Connection
|
||||
|
||||
Me.SetSecurity()
|
||||
|
||||
'Disable hotkeys for international users
|
||||
ICA.Hotkey1Shift = Nothing
|
||||
ICA.Hotkey1Char = Nothing
|
||||
ICA.Hotkey2Shift = Nothing
|
||||
ICA.Hotkey2Char = Nothing
|
||||
ICA.Hotkey3Shift = Nothing
|
||||
ICA.Hotkey3Char = Nothing
|
||||
ICA.Hotkey4Shift = Nothing
|
||||
ICA.Hotkey4Char = Nothing
|
||||
ICA.Hotkey5Shift = Nothing
|
||||
ICA.Hotkey5Char = Nothing
|
||||
ICA.Hotkey6Shift = Nothing
|
||||
ICA.Hotkey6Char = Nothing
|
||||
ICA.Hotkey7Shift = Nothing
|
||||
ICA.Hotkey7Char = Nothing
|
||||
ICA.Hotkey8Shift = Nothing
|
||||
ICA.Hotkey8Char = Nothing
|
||||
ICA.Hotkey9Shift = Nothing
|
||||
ICA.Hotkey9Char = Nothing
|
||||
ICA.Hotkey10Shift = Nothing
|
||||
ICA.Hotkey10Char = Nothing
|
||||
ICA.Hotkey11Shift = Nothing
|
||||
ICA.Hotkey11Char = Nothing
|
||||
|
||||
ICA.PersistentCacheEnabled = Info.CacheBitmaps
|
||||
|
||||
ICA.Title = Info.Name
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "Couldn't SetProps (Connection.Protocol.ICA)" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strIcaSetPropsFailed & vbNewLine & ex.Message, True)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
@@ -64,7 +88,7 @@ Namespace Connection
|
||||
MyBase.Connect()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "Opening connection failed!" & vbNewLine & ex.Message)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strIcaConnectionFailed & vbNewLine & ex.Message)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
@@ -73,6 +97,8 @@ Namespace Connection
|
||||
#Region "Private Methods"
|
||||
Private Sub SetCredentials()
|
||||
Try
|
||||
If (Force And Info.Force.NoCredentials) = Info.Force.NoCredentials Then Return
|
||||
|
||||
Dim _user As String = Me.Info.Username
|
||||
Dim _pass As String = Me.Info.Password
|
||||
Dim _dom As String = Me.Info.Domain
|
||||
@@ -110,7 +136,7 @@ Namespace Connection
|
||||
ICA.Domain = _dom
|
||||
End If
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "ICA SetCredentials failed" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strIcaSetCredentialsFailed & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@@ -132,10 +158,11 @@ Namespace Connection
|
||||
ICA.SetWindowSize(WFICALib.ICAWindowType.WindowTypeClient, Screen.FromControl(frmMain).Bounds.Width, Screen.FromControl(frmMain).Bounds.Height, 0)
|
||||
ICA.FullScreenWindow()
|
||||
Case Else
|
||||
ICA.SetWindowSize(WFICALib.ICAWindowType.WindowTypeClient, RDP.Resolutions.Items(Int(Info.Resolution)).Width, RDP.Resolutions.Items(Int(Info.Resolution)).Height, 0)
|
||||
Dim resolution As Rectangle = RDP.GetResolutionRectangle(Info.Resolution)
|
||||
ICA.SetWindowSize(WFICALib.ICAWindowType.WindowTypeClient, resolution.Width, resolution.Height, 0)
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "ICA SetResolution failed" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strIcaSetResolutionFailed & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@@ -143,6 +170,8 @@ Namespace Connection
|
||||
Select Case Info.Colors
|
||||
Case RDP.RDPColors.Colors256
|
||||
ICA.SetProp("DesiredColor", 2)
|
||||
Case RDP.RDPColors.Colors15Bit
|
||||
ICA.SetProp("DesiredColor", 4)
|
||||
Case RDP.RDPColors.Colors16Bit
|
||||
ICA.SetProp("DesiredColor", 4)
|
||||
Case Else
|
||||
@@ -174,7 +203,7 @@ Namespace Connection
|
||||
AddHandler ICA.OnConnectFailed, AddressOf ICAEvent_OnConnectFailed
|
||||
AddHandler ICA.OnDisconnect, AddressOf ICAEvent_OnDisconnect
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "ICA SetEventHandlers failed" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strIcaSetEventHandlersFailed & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
@@ -229,15 +258,15 @@ Namespace Connection
|
||||
End Enum
|
||||
|
||||
Public Enum EncryptionStrength
|
||||
<Description("Basic")> _
|
||||
<LocalizedDescription("strEncBasic")> _
|
||||
EncrBasic = 1
|
||||
<Description("128 Bit (logon only)")> _
|
||||
<LocalizedDescription("strEnc128BitLogonOnly")> _
|
||||
Encr128BitLogonOnly = 127
|
||||
<Description("40 Bit")> _
|
||||
<LocalizedDescription("strEnc40Bit")> _
|
||||
Encr40Bit = 40
|
||||
<Description("56 Bit")> _
|
||||
<LocalizedDescription("strEnc56Bit")> _
|
||||
Encr56Bit = 56
|
||||
<Description("128 Bit")> _
|
||||
<LocalizedDescription("strEnc128Bit")> _
|
||||
Encr128Bit = 128
|
||||
End Enum
|
||||
#End Region
|
||||
|
||||
@@ -1,186 +0,0 @@
|
||||
Imports mRemote.App.Native
|
||||
Imports System.Threading
|
||||
Imports Microsoft.Win32
|
||||
Imports System.Drawing
|
||||
Imports mRemote.App.Runtime
|
||||
|
||||
Namespace Connection
|
||||
Namespace Protocol
|
||||
Public Class IntApp
|
||||
Inherits Connection.Protocol.Base
|
||||
|
||||
#Region "Private Properties"
|
||||
Private IntAppProcessStartInfo As New ProcessStartInfo()
|
||||
Private Arguments As String
|
||||
Private ExtApp As Tools.ExternalApp
|
||||
#End Region
|
||||
|
||||
#Region "Public Properties"
|
||||
Private _IntAppHandle As IntPtr
|
||||
Public Property IntAppHandle() As IntPtr
|
||||
Get
|
||||
Return Me._IntAppHandle
|
||||
End Get
|
||||
Set(ByVal value As IntPtr)
|
||||
Me._IntAppHandle = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private _IntAppProcess As Process
|
||||
Public Property IntAppProcess() As Process
|
||||
Get
|
||||
Return Me._IntAppProcess
|
||||
End Get
|
||||
Set(ByVal value As Process)
|
||||
Me._IntAppProcess = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private _IntAppPath As String
|
||||
Public Property IntAppPath() As String
|
||||
Get
|
||||
Return _IntAppPath
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
_IntAppPath = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Focused() As Boolean
|
||||
Get
|
||||
If GetForegroundWindow() = IntAppHandle Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
#Region "Private Events & Handlers"
|
||||
Private Sub ProcessExited(ByVal sender As Object, ByVal e As System.EventArgs)
|
||||
MyBase.Event_Closed(Me)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Public Methods"
|
||||
Public Sub New()
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Function SetProps() As Boolean
|
||||
ExtApp = App.Runtime.GetExtAppByName(InterfaceControl.Info.ExtApp)
|
||||
If InterfaceControl.Info IsNot Nothing Then
|
||||
ExtApp.ConnectionInfo = InterfaceControl.Info
|
||||
End If
|
||||
|
||||
_IntAppPath = ExtApp.ParseText(ExtApp.FileName)
|
||||
Arguments = ExtApp.ParseText(ExtApp.Arguments)
|
||||
|
||||
Return MyBase.SetProps()
|
||||
End Function
|
||||
|
||||
Public Overrides Function Connect() As Boolean
|
||||
Try
|
||||
If ExtApp.TryIntegrate = False Then
|
||||
ExtApp.Start(Me.InterfaceControl.Info)
|
||||
Me.Close()
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
IntAppProcessStartInfo.FileName = _IntAppPath
|
||||
IntAppProcessStartInfo.Arguments = Arguments
|
||||
|
||||
IntAppProcess = Process.Start(IntAppProcessStartInfo)
|
||||
IntAppProcess.EnableRaisingEvents = True
|
||||
IntAppProcess.WaitForInputIdle()
|
||||
|
||||
AddHandler IntAppProcess.Exited, AddressOf ProcessExited
|
||||
|
||||
Dim TryCount As Integer = 0
|
||||
Do Until IntAppProcess.MainWindowHandle <> IntPtr.Zero And Me.InterfaceControl.Handle <> IntPtr.Zero And Me.IntAppProcess.MainWindowTitle <> "Default IME"
|
||||
If TryCount >= My.Settings.MaxPuttyWaitTime * 2 Then
|
||||
Exit Do
|
||||
End If
|
||||
|
||||
IntAppProcess.Refresh()
|
||||
|
||||
Thread.Sleep(500)
|
||||
|
||||
TryCount += 1
|
||||
Loop
|
||||
|
||||
IntAppHandle = IntAppProcess.MainWindowHandle
|
||||
|
||||
|
||||
mC.AddMessage(Messages.MessageClass.InformationMsg, "--- IntApp Stuff ---", True)
|
||||
|
||||
mC.AddMessage(Messages.MessageClass.InformationMsg, "IntApp Handle: " & IntAppHandle.ToString, True)
|
||||
mC.AddMessage(Messages.MessageClass.InformationMsg, "IntApp Title: " & IntAppProcess.MainWindowTitle, True)
|
||||
mC.AddMessage(Messages.MessageClass.InformationMsg, "IntApp Handle: " & Me.InterfaceControl.Parent.Handle.ToString, True)
|
||||
|
||||
SetParent(Me.IntAppHandle, Me.InterfaceControl.Parent.Handle)
|
||||
SetWindowLong(Me.IntAppHandle, 0, WS_VISIBLE)
|
||||
ShowWindow(Me.IntAppHandle, SW_SHOWMAXIMIZED)
|
||||
|
||||
Resize()
|
||||
|
||||
MyBase.Connect()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "Couldn't Connect" & vbNewLine & ex.Message)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
Public Overrides Sub Focus()
|
||||
Try
|
||||
SetForegroundWindow(IntAppHandle)
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "Couldn't Focus (Connection.Protocol.IntApp)" & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Resize()
|
||||
Try
|
||||
MoveWindow(IntAppHandle, -SystemInformation.FrameBorderSize.Width, -(SystemInformation.CaptionHeight + SystemInformation.FrameBorderSize.Height), Me.InterfaceControl.Width + (SystemInformation.FrameBorderSize.Width * 2), Me.InterfaceControl.Height + SystemInformation.CaptionHeight + (SystemInformation.FrameBorderSize.Height * 2), True)
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "Couldn't Resize (Connection.Protocol.IntApp)" & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Close()
|
||||
Try
|
||||
If IntAppProcess.HasExited = False Then
|
||||
IntAppProcess.Kill()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "Killing IntApp Process failed (Connection.Protocol.IntApp)" & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
|
||||
Try
|
||||
If IntAppProcess.HasExited = False Then
|
||||
IntAppProcess.Dispose()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "Dispose of IntApp process failed (Connection.Protocol.IntApp)" & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
|
||||
MyBase.Close()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Public Shared Methods"
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Enums"
|
||||
Public Enum Defaults
|
||||
Port = 0
|
||||
End Enum
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
End Namespace
|
||||
121
mRemoteV1/Connection/Connection.Protocol.IntegratedProgram.vb
Normal file
121
mRemoteV1/Connection/Connection.Protocol.IntegratedProgram.vb
Normal file
@@ -0,0 +1,121 @@
|
||||
Imports mRemoteNG.App.Native
|
||||
Imports System.Threading
|
||||
Imports mRemoteNG.App.Runtime
|
||||
Imports mRemoteNG.Tools
|
||||
|
||||
Namespace Connection
|
||||
Namespace Protocol
|
||||
Public Class IntegratedProgram
|
||||
Inherits Base
|
||||
#Region "Public Methods"
|
||||
Public Overrides Function SetProps() As Boolean
|
||||
If InterfaceControl.Info IsNot Nothing Then
|
||||
_externalTool = GetExtAppByName(InterfaceControl.Info.ExtApp)
|
||||
_externalTool.ConnectionInfo = InterfaceControl.Info
|
||||
End If
|
||||
|
||||
Return MyBase.SetProps()
|
||||
End Function
|
||||
|
||||
Public Overrides Function Connect() As Boolean
|
||||
Try
|
||||
If _externalTool.TryIntegrate = False Then
|
||||
_externalTool.Start(InterfaceControl.Info)
|
||||
Close()
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
_process = New Process()
|
||||
|
||||
With _process.StartInfo
|
||||
.UseShellExecute = True
|
||||
.FileName = _externalTool.ParseArguments(_externalTool.FileName)
|
||||
.Arguments = _externalTool.ParseArguments(_externalTool.Arguments)
|
||||
End With
|
||||
|
||||
_process.EnableRaisingEvents = True
|
||||
AddHandler _process.Exited, AddressOf ProcessExited
|
||||
|
||||
_process.Start()
|
||||
_process.WaitForInputIdle(My.Settings.MaxPuttyWaitTime * 1000)
|
||||
|
||||
Dim startTicks As Integer = Environment.TickCount
|
||||
While _handle.ToInt32 = 0 And Environment.TickCount < startTicks + (My.Settings.MaxPuttyWaitTime * 1000)
|
||||
_process.Refresh()
|
||||
If Not _process.MainWindowTitle = "Default IME" Then _handle = _process.MainWindowHandle
|
||||
If _handle.ToInt32 = 0 Then Thread.Sleep(0)
|
||||
End While
|
||||
|
||||
SetParent(_handle, InterfaceControl.Handle)
|
||||
|
||||
MessageCollector.AddMessage(Messages.MessageClass.InformationMsg, My.Language.strIntAppStuff, True)
|
||||
|
||||
MessageCollector.AddMessage(Messages.MessageClass.InformationMsg, String.Format(My.Language.strIntAppHandle, _handle.ToString), True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.InformationMsg, String.Format(My.Language.strIntAppTitle, _process.MainWindowTitle), True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.InformationMsg, String.Format(My.Language.strIntAppParentHandle, InterfaceControl.Parent.Handle.ToString), True)
|
||||
|
||||
Resize(Me, New EventArgs)
|
||||
|
||||
MyBase.Connect()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
MessageCollector.AddExceptionMessage(My.Language.strIntAppConnectionFailed, ex)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Overrides Sub Focus()
|
||||
Try
|
||||
If ConnectionWindow.InTabDrag Then Return
|
||||
SetForegroundWindow(_handle)
|
||||
Catch ex As Exception
|
||||
MessageCollector.AddExceptionMessage(My.Language.strIntAppFocusFailed, ex, , True)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Resize(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Try
|
||||
If InterfaceControl.Size = Size.Empty Then Return
|
||||
MoveWindow(_handle, -SystemInformation.FrameBorderSize.Width, -(SystemInformation.CaptionHeight + SystemInformation.FrameBorderSize.Height), InterfaceControl.Width + (SystemInformation.FrameBorderSize.Width * 2), InterfaceControl.Height + SystemInformation.CaptionHeight + (SystemInformation.FrameBorderSize.Height * 2), True)
|
||||
Catch ex As Exception
|
||||
MessageCollector.AddExceptionMessage(My.Language.strIntAppResizeFailed, ex, , True)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Close()
|
||||
Try
|
||||
If Not _process.HasExited Then _process.Kill()
|
||||
Catch ex As Exception
|
||||
MessageCollector.AddExceptionMessage(My.Language.strIntAppKillFailed, ex, , True)
|
||||
End Try
|
||||
|
||||
Try
|
||||
If Not _process.HasExited Then _process.Dispose()
|
||||
Catch ex As Exception
|
||||
MessageCollector.AddExceptionMessage(My.Language.strIntAppDisposeFailed, ex, , True)
|
||||
End Try
|
||||
|
||||
MyBase.Close()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Private Fields"
|
||||
Private _externalTool As ExternalTool
|
||||
Private _handle As IntPtr
|
||||
Private _process As Process
|
||||
#End Region
|
||||
|
||||
#Region "Private Methods"
|
||||
Private Sub ProcessExited(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Event_Closed(Me)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Enumerations"
|
||||
Public Enum Defaults
|
||||
Port = 0
|
||||
End Enum
|
||||
#End Region
|
||||
End Class
|
||||
End Namespace
|
||||
End Namespace
|
||||
@@ -1,32 +1,44 @@
|
||||
Imports System.ComponentModel
|
||||
Imports mRemoteNG.Tools.LocalizedAttributes
|
||||
|
||||
Namespace Connection
|
||||
Namespace Protocol
|
||||
Public Class Converter
|
||||
Public Shared Function ProtocolToString(ByVal protocol As Protocols) As String
|
||||
Return protocol.ToString()
|
||||
End Function
|
||||
|
||||
Public Shared Function StringToProtocol(ByVal protocol As String) As Protocols
|
||||
Try
|
||||
Return [Enum].Parse(GetType(Protocols), protocol, True)
|
||||
Catch ex As Exception
|
||||
Return Protocols.RDP
|
||||
End Try
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Public Enum Protocols
|
||||
<Description("RDP")> _
|
||||
<LocalizedDescription("strRDP")> _
|
||||
RDP = 0
|
||||
<Description("VNC")> _
|
||||
<LocalizedDescription("strVnc")> _
|
||||
VNC = 1
|
||||
<Description("SSH1")> _
|
||||
<LocalizedDescription("strSsh1")> _
|
||||
SSH1 = 2
|
||||
<Description("SSH2")> _
|
||||
<LocalizedDescription("strSsh2")> _
|
||||
SSH2 = 3
|
||||
<Description("Telnet")> _
|
||||
<LocalizedDescription("strTelnet")> _
|
||||
Telnet = 4
|
||||
<Description("Rlogin")> _
|
||||
<LocalizedDescription("strRlogin")> _
|
||||
Rlogin = 5
|
||||
<Description("RAW")> _
|
||||
<LocalizedDescription("strRAW")> _
|
||||
RAW = 6
|
||||
<Description("HTTP")> _
|
||||
<LocalizedDescription("strHttp")> _
|
||||
HTTP = 7
|
||||
<Description("HTTPS")> _
|
||||
<LocalizedDescription("strHttps")> _
|
||||
HTTPS = 8
|
||||
<Description("ICA")> _
|
||||
<LocalizedDescription("strICA")> _
|
||||
ICA = 9
|
||||
<Description("Ext. App")> _
|
||||
<LocalizedDescription("strExtApp")> _
|
||||
IntApp = 20
|
||||
<Browsable(False)> _
|
||||
NONE = 999
|
||||
End Enum
|
||||
End Namespace
|
||||
End Namespace
|
||||
|
||||
@@ -1,17 +1,25 @@
|
||||
Imports mRemote.App.Native
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports System.ComponentModel
|
||||
Imports mRemoteNG.Messages
|
||||
Imports mRemoteNG.App.Native
|
||||
Imports System.Threading
|
||||
Imports Microsoft.Win32
|
||||
Imports System.Drawing
|
||||
Imports mRemote.App.Runtime
|
||||
Imports mRemoteNG.App.Runtime
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports mRemoteNG.Tools
|
||||
|
||||
Namespace Connection
|
||||
Namespace Protocol
|
||||
Public Class PuttyBase
|
||||
Inherits Connection.Protocol.Base
|
||||
|
||||
#Region "Constants"
|
||||
Private Const IDM_RECONF As Int32 = &H50 ' PuTTY Settings Menu ID
|
||||
#End Region
|
||||
|
||||
#Region "Private Properties"
|
||||
Private PuttyProcessStartInfo As New ProcessStartInfo()
|
||||
Private Arguments As String
|
||||
Dim _isPuttyNg As Boolean
|
||||
#End Region
|
||||
|
||||
#Region "Public Properties"
|
||||
@@ -65,18 +73,6 @@ Namespace Connection
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'Private borderWidth As Integer = frmMain.Size.Width - frmMain.ClientSize.Width
|
||||
'Private borderHeight As Integer = frmMain.Size.Height - frmMain.ClientSize.Height
|
||||
Private Shared _BorderSize As Size
|
||||
Public Shared Property BorderSize() As Size
|
||||
Get
|
||||
Return _BorderSize
|
||||
End Get
|
||||
Set(ByVal value As Size)
|
||||
_BorderSize = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Focused() As Boolean
|
||||
Get
|
||||
If GetForegroundWindow() = PuttyHandle Then
|
||||
@@ -101,99 +97,118 @@ Namespace Connection
|
||||
|
||||
Public Overrides Function Connect() As Boolean
|
||||
Try
|
||||
PuttyProcessStartInfo.FileName = _PuttyPath
|
||||
_isPuttyNg = (PuttyTypeDetector.GetPuttyType() = PuttyTypeDetector.PuttyType.PuttyNg)
|
||||
|
||||
Select Case Me._PuttyProtocol
|
||||
Case Putty_Protocol.raw
|
||||
Arguments = "-load " & """" & Me.InterfaceControl.Info.PuttySession & """" & " -" & Me._PuttyProtocol.ToString & " -P " & Me.InterfaceControl.Info.Port & " """ & Me.InterfaceControl.Info.Hostname & """"
|
||||
Case Putty_Protocol.rlogin
|
||||
Arguments = "-load " & """" & Me.InterfaceControl.Info.PuttySession & """" & " -" & Me._PuttyProtocol.ToString & " -P " & Me.InterfaceControl.Info.Port & " """ & Me.InterfaceControl.Info.Hostname & """"
|
||||
Case Putty_Protocol.ssh
|
||||
Dim UserArg As String = ""
|
||||
Dim PassArg As String = ""
|
||||
PuttyProcess = New Process
|
||||
With PuttyProcess.StartInfo
|
||||
.UseShellExecute = False
|
||||
.FileName = _PuttyPath
|
||||
|
||||
If My.Settings.EmptyCredentials = "windows" Then
|
||||
UserArg = " -l """ & Environment.UserName & """"
|
||||
ElseIf My.Settings.EmptyCredentials = "custom" Then
|
||||
UserArg = " -l """ & My.Settings.DefaultUsername & """"
|
||||
PassArg = " -pw """ & Security.Crypt.Decrypt(My.Settings.DefaultPassword, App.Info.General.EncryptionKey) & """"
|
||||
Dim arguments As New CommandLineArguments
|
||||
arguments.EscapeForShell = False
|
||||
|
||||
arguments.Add("-load", InterfaceControl.Info.PuttySession)
|
||||
|
||||
If Not TypeOf InterfaceControl.Info Is PuttySession.Info Then
|
||||
arguments.Add("-" & _PuttyProtocol.ToString)
|
||||
|
||||
If _PuttyProtocol = Putty_Protocol.ssh Then
|
||||
Dim username As String = ""
|
||||
Dim password As String = ""
|
||||
|
||||
If Not String.IsNullOrEmpty(InterfaceControl.Info.Username) Then
|
||||
username = InterfaceControl.Info.Username
|
||||
Else
|
||||
If My.Settings.EmptyCredentials = "windows" Then
|
||||
username = Environment.UserName
|
||||
ElseIf My.Settings.EmptyCredentials = "custom" Then
|
||||
username = My.Settings.DefaultUsername
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrEmpty(InterfaceControl.Info.Password) Then
|
||||
password = InterfaceControl.Info.Password
|
||||
Else
|
||||
If My.Settings.EmptyCredentials = "custom" Then
|
||||
password = Security.Crypt.Decrypt(My.Settings.DefaultPassword, App.Info.General.EncryptionKey)
|
||||
End If
|
||||
End If
|
||||
|
||||
arguments.Add("-" & _PuttySSHVersion)
|
||||
|
||||
If Not ((Force And Info.Force.NoCredentials) = Info.Force.NoCredentials) Then
|
||||
If Not String.IsNullOrEmpty(username) Then
|
||||
arguments.Add("-l", username)
|
||||
End If
|
||||
If Not String.IsNullOrEmpty(password) Then
|
||||
arguments.Add("-pw", password)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Me.InterfaceControl.Info.Username <> "" Then
|
||||
UserArg = " -l """ & Me.InterfaceControl.Info.Username & """"
|
||||
End If
|
||||
|
||||
If Me.InterfaceControl.Info.Password <> "" Then
|
||||
PassArg = " -pw """ & Me.InterfaceControl.Info.Password & """"
|
||||
End If
|
||||
|
||||
Arguments = "-load " & """" & Me.InterfaceControl.Info.PuttySession & """" & " -" & Me._PuttyProtocol.ToString & " -" & Me._PuttySSHVersion & UserArg & PassArg & " -P " & Me.InterfaceControl.Info.Port & " """ & Me.InterfaceControl.Info.Hostname & """"
|
||||
Case Putty_Protocol.telnet
|
||||
Arguments = "-load " & """" & Me.InterfaceControl.Info.PuttySession & """" & " -" & Me._PuttyProtocol.ToString & " -P " & Me.InterfaceControl.Info.Port & " """ & Me.InterfaceControl.Info.Hostname & """"
|
||||
Case Putty_Protocol.serial
|
||||
Arguments = "-load " & """" & Me.InterfaceControl.Info.PuttySession & """" & " -" & Me._PuttyProtocol.ToString & " -P " & Me.InterfaceControl.Info.Port & " """ & Me.InterfaceControl.Info.Hostname & """"
|
||||
End Select
|
||||
|
||||
'REMOVE IN RELEASE!
|
||||
'mC.AddMessage(Messages.MessageClass.InformationMsg, "PuTTY Arguments: " & Arguments, True)
|
||||
|
||||
PuttyProcessStartInfo.Arguments = Arguments
|
||||
|
||||
PuttyProcess = Process.Start(PuttyProcessStartInfo)
|
||||
PuttyProcess.EnableRaisingEvents = True
|
||||
PuttyProcess.WaitForInputIdle()
|
||||
|
||||
AddHandler PuttyProcess.Exited, AddressOf ProcessExited
|
||||
|
||||
Dim TryCount As Integer = 0
|
||||
Do Until PuttyProcess.MainWindowHandle <> IntPtr.Zero And Me.InterfaceControl.Handle <> IntPtr.Zero And Me.PuttyProcess.MainWindowTitle <> "Default IME"
|
||||
If TryCount >= My.Settings.MaxPuttyWaitTime * 2 Then
|
||||
Exit Do
|
||||
arguments.Add("-P", InterfaceControl.Info.Port.ToString)
|
||||
arguments.Add(InterfaceControl.Info.Hostname)
|
||||
End If
|
||||
|
||||
PuttyProcess.Refresh()
|
||||
If _isPuttyNg Then
|
||||
arguments.Add("-hwndparent", InterfaceControl.Handle.ToString())
|
||||
End If
|
||||
|
||||
Thread.Sleep(500)
|
||||
.Arguments = arguments.ToString
|
||||
End With
|
||||
|
||||
TryCount += 1
|
||||
Loop
|
||||
PuttyProcess.EnableRaisingEvents = True
|
||||
AddHandler PuttyProcess.Exited, AddressOf ProcessExited
|
||||
|
||||
PuttyHandle = PuttyProcess.MainWindowHandle
|
||||
PuttyProcess.Start()
|
||||
PuttyProcess.WaitForInputIdle(My.Settings.MaxPuttyWaitTime * 1000)
|
||||
|
||||
Dim startTicks As Integer = Environment.TickCount
|
||||
While PuttyHandle.ToInt32 = 0 And Environment.TickCount < startTicks + (My.Settings.MaxPuttyWaitTime * 1000)
|
||||
If _isPuttyNg Then
|
||||
PuttyHandle = FindWindowEx(InterfaceControl.Handle, 0, vbNullString, vbNullString)
|
||||
Else
|
||||
PuttyProcess.Refresh()
|
||||
PuttyHandle = PuttyProcess.MainWindowHandle
|
||||
End If
|
||||
If PuttyHandle.ToInt32 = 0 Then Thread.Sleep(0)
|
||||
End While
|
||||
|
||||
mC.AddMessage(Messages.MessageClass.InformationMsg, "--- PuTTY Stuff ---", True)
|
||||
If Not _isPuttyNg Then
|
||||
SetParent(PuttyHandle, InterfaceControl.Handle)
|
||||
End If
|
||||
|
||||
mC.AddMessage(Messages.MessageClass.InformationMsg, "PuTTY Handle: " & PuttyHandle.ToString, True)
|
||||
mC.AddMessage(Messages.MessageClass.InformationMsg, "PuTTY Title: " & PuttyProcess.MainWindowTitle, True)
|
||||
mC.AddMessage(Messages.MessageClass.InformationMsg, "Panel Handle: " & Me.InterfaceControl.Parent.Handle.ToString, True)
|
||||
MessageCollector.AddMessage(MessageClass.InformationMsg, My.Language.strPuttyStuff, True)
|
||||
|
||||
SetParent(Me.PuttyHandle, Me.InterfaceControl.Parent.Handle)
|
||||
SetWindowLong(Me.PuttyHandle, 0, WS_VISIBLE)
|
||||
ShowWindow(Me.PuttyHandle, SW_SHOWMAXIMIZED)
|
||||
Resize()
|
||||
MessageCollector.AddMessage(MessageClass.InformationMsg, String.Format(My.Language.strPuttyHandle, PuttyHandle.ToString), True)
|
||||
MessageCollector.AddMessage(MessageClass.InformationMsg, String.Format(My.Language.strPuttyTitle, PuttyProcess.MainWindowTitle), True)
|
||||
MessageCollector.AddMessage(MessageClass.InformationMsg, String.Format(My.Language.strPuttyParentHandle, InterfaceControl.Parent.Handle.ToString), True)
|
||||
|
||||
Resize(Me, New EventArgs)
|
||||
|
||||
MyBase.Connect()
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "Couldn't Connect" & vbNewLine & ex.Message)
|
||||
MessageCollector.AddMessage(MessageClass.ErrorMsg, My.Language.strPuttyConnectionFailed & vbNewLine & ex.Message)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
Public Overrides Sub Focus()
|
||||
Try
|
||||
If ConnectionWindow.InTabDrag Then Return
|
||||
SetForegroundWindow(PuttyHandle)
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "Couldn't Focus (Connection.Protocol.PuttyBase)" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strPuttyFocusFailed & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Resize()
|
||||
Public Overrides Sub Resize(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Try
|
||||
MoveWindow(PuttyHandle, -SystemInformation.FrameBorderSize.Width, -(SystemInformation.CaptionHeight + SystemInformation.FrameBorderSize.Height), Me.InterfaceControl.Width + (SystemInformation.FrameBorderSize.Width * 2), Me.InterfaceControl.Height + SystemInformation.CaptionHeight + (SystemInformation.FrameBorderSize.Height * 2), True)
|
||||
If InterfaceControl.Size = Size.Empty Then Return
|
||||
MoveWindow(PuttyHandle, -SystemInformation.FrameBorderSize.Width, -(SystemInformation.CaptionHeight + SystemInformation.FrameBorderSize.Height), InterfaceControl.Width + (SystemInformation.FrameBorderSize.Width * 2), InterfaceControl.Height + SystemInformation.CaptionHeight + (SystemInformation.FrameBorderSize.Height * 2), True)
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "Couldn't Resize (Connection.Protocol.PuttyBase)" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strPuttyResizeFailed & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@@ -203,53 +218,24 @@ Namespace Connection
|
||||
PuttyProcess.Kill()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "Killing Putty Process failed (Connection.Protocol.PuttyBase)" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strPuttyKillFailed & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
|
||||
Try
|
||||
PuttyProcess.Dispose()
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "Dispose of Putty process failed (Connection.Protocol.PuttyBase)" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strPuttyDisposeFailed & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
|
||||
MyBase.Close()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Public Shared Methods"
|
||||
Public Shared Function GetSessions() As Array
|
||||
Public Sub ShowSettingsDialog()
|
||||
Try
|
||||
Dim regKey As RegistryKey
|
||||
regKey = Registry.CurrentUser.OpenSubKey("Software\SimonTatham\PuTTY\Sessions")
|
||||
|
||||
Dim arrKeys() As String
|
||||
arrKeys = regKey.GetSubKeyNames()
|
||||
Array.Resize(arrKeys, arrKeys.Length + 1)
|
||||
arrKeys(arrKeys.Length - 1) = "Default Settings"
|
||||
|
||||
For i As Integer = 0 To arrKeys.Length - 1
|
||||
arrKeys(i) = System.Web.HttpUtility.UrlDecode(arrKeys(i))
|
||||
Next
|
||||
|
||||
Return arrKeys
|
||||
PostMessage(Me.PuttyHandle, WM_SYSCOMMAND, IDM_RECONF, 0)
|
||||
SetForegroundWindow(Me.PuttyHandle)
|
||||
Catch ex As Exception
|
||||
App.Runtime.mC.AddMessage(Messages.MessageClass.WarningMsg, "Couldn't get Putty sessions" & vbNewLine & ex.Message, True)
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
|
||||
Public Shared Sub StartPutty()
|
||||
Try
|
||||
Dim p As Process
|
||||
Dim pSI As New ProcessStartInfo
|
||||
pSI.FileName = PuttyPath
|
||||
|
||||
p = Process.Start(pSI)
|
||||
p.WaitForExit()
|
||||
|
||||
mRemote.Connection.PuttySession.PuttySessions = GetSessions()
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "Couldn't Start Putty (Connection.Protocol.PuttyBase)" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strPuttyShowSettingsDialogFailed & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
@@ -268,7 +254,6 @@ Namespace Connection
|
||||
ssh2 = 2
|
||||
End Enum
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
End Namespace
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
Imports mRemote.App.Runtime
|
||||
Imports VncSharp
|
||||
Imports mRemoteNG.App.Runtime
|
||||
Imports System.ComponentModel
|
||||
Imports mRemoteNG.Tools.LocalizedAttributes
|
||||
|
||||
Namespace Connection
|
||||
Namespace Protocol
|
||||
@@ -105,14 +105,14 @@ Namespace Connection
|
||||
' VNC.RestrictPixel = False
|
||||
'End If
|
||||
|
||||
'VNC.ConnectingText = Language.Base.Connecting & " (SmartCode VNC viewer)"
|
||||
'VNC.DisconnectedText = Language.Base.Disconnected
|
||||
'VNC.ConnectingText = My.Language.strInheritConnecting & " (SmartCode VNC viewer)"
|
||||
'VNC.DisconnectedText = My.Language.strInheritDisconnected
|
||||
'VNC.MessageBoxes = False
|
||||
'VNC.EndInit()
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "VNC SetProps failed" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strVncSetPropsFailed & vbNewLine & ex.Message, True)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
@@ -123,7 +123,7 @@ Namespace Connection
|
||||
Try
|
||||
VNC.Connect(Me.Info.Hostname, Me.Info.VNCViewOnly, Info.VNCSmartSizeMode <> SmartSizeMode.SmartSNo)
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "Opening connection failed" & vbNewLine & ex.Message)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strVncConnectionOpenFailed & vbNewLine & ex.Message)
|
||||
Return False
|
||||
End Try
|
||||
|
||||
@@ -134,7 +134,7 @@ Namespace Connection
|
||||
Try
|
||||
VNC.Disconnect()
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "VNC Disconnect failed" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strVncConnectionDisconnectFailed & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@@ -147,7 +147,7 @@ Namespace Connection
|
||||
VNC.SendSpecialKeys(SpecialKeys.CtrlEsc)
|
||||
End Select
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "VNC SendSpecialKeys failed" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strVncSendSpecialKeysFailed & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@@ -156,7 +156,7 @@ Namespace Connection
|
||||
SmartSize = Not SmartSize
|
||||
RefreshScreen()
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "VNC ToggleSmartSize failed" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strVncToggleSmartSizeFailed & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@@ -164,7 +164,7 @@ Namespace Connection
|
||||
Try
|
||||
ViewOnly = Not ViewOnly
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "VNC ToggleViewOnly failed" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strVncToggleViewOnlyFailed & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@@ -177,7 +177,7 @@ Namespace Connection
|
||||
' mC.AddMessage(Messages.MessageClass.InformationMsg, "VNC Server doesn't support chat")
|
||||
'End If
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "VNC StartChat failed" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strVncStartChatFailed & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
@@ -197,7 +197,7 @@ Namespace Connection
|
||||
Try
|
||||
VNC.FullScreenUpdate()
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "VNC RefreshScreen failed" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strVncRefreshFailed & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
@@ -207,11 +207,12 @@ Namespace Connection
|
||||
Try
|
||||
AddHandler VNC.ConnectComplete, AddressOf VNCEvent_Connected
|
||||
AddHandler VNC.ConnectionLost, AddressOf VNCEvent_Disconnected
|
||||
If Not String.IsNullOrEmpty(Info.Password) Then
|
||||
AddHandler mRemoteNG.frmMain.clipboardchange, AddressOf VNCEvent_ClipboardChanged
|
||||
If Not ((Force And Info.Force.NoCredentials) = Info.Force.NoCredentials) And Not String.IsNullOrEmpty(Info.Password) Then
|
||||
VNC.GetPassword = AddressOf VNCEvent_Authenticate
|
||||
End If
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "VNC SetEventHandlers failed" & vbNewLine & ex.Message, True)
|
||||
MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, My.Language.strVncSetEventHandlersFailed & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
@@ -227,6 +228,10 @@ Namespace Connection
|
||||
MyBase.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub VNCEvent_ClipboardChanged()
|
||||
Me.VNC.FillServerClipboard()
|
||||
End Sub
|
||||
|
||||
Private Function VNCEvent_Authenticate() As String
|
||||
Return Info.Password
|
||||
End Function
|
||||
@@ -243,7 +248,7 @@ Namespace Connection
|
||||
End Enum
|
||||
|
||||
Public Enum Compression
|
||||
<Description(Language.Base.NoCompression)> _
|
||||
<LocalizedDescription("strNoCompression")> _
|
||||
CompNone = 99
|
||||
<Description("0")> _
|
||||
Comp0 = 0
|
||||
@@ -287,36 +292,36 @@ Namespace Connection
|
||||
End Enum
|
||||
|
||||
Public Enum AuthMode
|
||||
<Description("VNC")> _
|
||||
<LocalizedDescription("VNC")> _
|
||||
AuthVNC
|
||||
<Description("Windows")> _
|
||||
<LocalizedDescription("Windows")> _
|
||||
AuthWin
|
||||
End Enum
|
||||
|
||||
Public Enum ProxyType
|
||||
<Description(Language.Base.None)> _
|
||||
<LocalizedDescription("strNone")> _
|
||||
ProxyNone
|
||||
<Description("HTTP")> _
|
||||
<LocalizedDescription("strHttp")> _
|
||||
ProxyHTTP
|
||||
<Description("Socks 5")> _
|
||||
<LocalizedDescription("strSocks5")> _
|
||||
ProxySocks5
|
||||
<Description("Ultra VNC Repeater")> _
|
||||
<LocalizedDescription("strUltraVncRepeater")> _
|
||||
ProxyUltra
|
||||
End Enum
|
||||
|
||||
Public Enum Colors
|
||||
<Description(Language.Base.Normal)> _
|
||||
<LocalizedDescription("strNormal")> _
|
||||
ColNormal
|
||||
<Description("8-bit")> _
|
||||
Col8Bit
|
||||
End Enum
|
||||
|
||||
Public Enum SmartSizeMode
|
||||
<Description(Language.Base.NoSmartSize)> _
|
||||
<LocalizedDescription("strNoSmartSize")> _
|
||||
SmartSNo
|
||||
<Description(Language.Base.Free)> _
|
||||
<LocalizedDescription("strFree")> _
|
||||
SmartSFree
|
||||
<Description(Language.Base.Aspect)> _
|
||||
<LocalizedDescription("strAspect")> _
|
||||
SmartSAspect
|
||||
End Enum
|
||||
#End Region
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
Imports System.ComponentModel
|
||||
|
||||
Namespace Connection
|
||||
Public Class PuttySession
|
||||
Inherits StringConverter
|
||||
|
||||
Public Shared PuttySessions As String() = New String() {}
|
||||
|
||||
Public Overloads Overrides Function GetStandardValues(ByVal context As System.ComponentModel.ITypeDescriptorContext) As System.ComponentModel.TypeConverter.StandardValuesCollection
|
||||
Return New StandardValuesCollection(PuttySessions)
|
||||
End Function
|
||||
|
||||
Public Overloads Overrides Function GetStandardValuesExclusive(ByVal context As System.ComponentModel.ITypeDescriptorContext) As Boolean
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Overloads Overrides Function GetStandardValuesSupported(ByVal context As ITypeDescriptorContext) As Boolean
|
||||
Return True
|
||||
End Function
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -1,31 +0,0 @@
|
||||
Imports mRemote.App.Runtime
|
||||
|
||||
Namespace Connection
|
||||
Public Class QuickConnect
|
||||
Private Shared qBox As ToolStripComboBox = frmMain.cmbQuickConnect
|
||||
|
||||
Public Class History
|
||||
Public Shared Function Exists(ByVal Text As String) As Boolean
|
||||
Try
|
||||
For i As Integer = 0 To qBox.Items.Count - 1
|
||||
If qBox.Items(i) = Text Then
|
||||
Return True
|
||||
End If
|
||||
Next
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "QuickConnect History Exists failed" & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Shared Sub Add(ByVal Text As String)
|
||||
Try
|
||||
qBox.Items.Insert(0, Text)
|
||||
Catch ex As Exception
|
||||
mC.AddMessage(Messages.MessageClass.ErrorMsg, "QuickConnect History Add failed" & vbNewLine & ex.Message, True)
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
End Class
|
||||
End Namespace
|
||||
122
mRemoteV1/Connection/PuttySession.Info.vb
Normal file
122
mRemoteV1/Connection/PuttySession.Info.vb
Normal file
@@ -0,0 +1,122 @@
|
||||
Imports System.ComponentModel
|
||||
Imports mRemoteNG.Messages
|
||||
Imports mRemoteNG.Tools.LocalizedAttributes
|
||||
Imports mRemoteNG.My
|
||||
Imports mRemoteNG.App.Runtime
|
||||
Imports mRemoteNG.Tools
|
||||
|
||||
Namespace Connection
|
||||
Namespace PuttySession
|
||||
Public Class Info
|
||||
Inherits Connection.Info
|
||||
Implements IComponent
|
||||
|
||||
#Region "Commands"
|
||||
<Command(),
|
||||
LocalizedDisplayName("strPuttySessionSettings")> _
|
||||
Public Sub SessionSettings()
|
||||
Try
|
||||
Dim puttyProcess As New PuttyProcessController
|
||||
If Not puttyProcess.Start() Then Return
|
||||
If puttyProcess.SelectListBoxItem(PuttySession) Then
|
||||
puttyProcess.ClickButton("&Load")
|
||||
End If
|
||||
puttyProcess.SetControlText("Button", "&Cancel", "&Close")
|
||||
puttyProcess.SetControlVisible("Button", "&Open", False)
|
||||
puttyProcess.WaitForExit()
|
||||
Catch ex As Exception
|
||||
MessageCollector.AddMessage(MessageClass.ErrorMsg, Language.strErrorCouldNotLaunchPutty & vbNewLine & ex.Message, False)
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Properties"
|
||||
<Browsable(False)> _
|
||||
Public Property RootPuttySessionsInfo() As Root.PuttySessions.Info
|
||||
|
||||
<[ReadOnly](True)> _
|
||||
Public Overrides Property PuttySession() As String
|
||||
|
||||
<[ReadOnly](True)> _
|
||||
Public Overrides Property Name() As String
|
||||
|
||||
<[ReadOnly](True), _
|
||||
Browsable(False)> _
|
||||
Public Overrides Property Description() As String
|
||||
|
||||
<[ReadOnly](True), _
|
||||
Browsable(False)> _
|
||||
Public Overrides Property Icon() As String
|
||||
Get
|
||||
Return "PuTTY"
|
||||
End Get
|
||||
Set(value As String)
|
||||
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<[ReadOnly](True), _
|
||||
Browsable(False)> _
|
||||
Public Overrides Property Panel() As String
|
||||
Get
|
||||
Return RootPuttySessionsInfo.Panel
|
||||
End Get
|
||||
Set(value As String)
|
||||
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<[ReadOnly](True)> _
|
||||
Public Overrides Property Hostname() As String
|
||||
|
||||
<[ReadOnly](True)> _
|
||||
Public Overrides Property Username() As String
|
||||
|
||||
<[ReadOnly](True), _
|
||||
Browsable(False)> _
|
||||
Public Overrides Property Password() As String
|
||||
|
||||
<[ReadOnly](True)> _
|
||||
Public Overrides Property Protocol() As Protocol.Protocols
|
||||
|
||||
<[ReadOnly](True)> _
|
||||
Public Overrides Property Port() As Integer
|
||||
|
||||
<[ReadOnly](True), _
|
||||
Browsable(False)> _
|
||||
Public Overrides Property PreExtApp() As String
|
||||
|
||||
<[ReadOnly](True), _
|
||||
Browsable(False)> _
|
||||
Public Overrides Property PostExtApp() As String
|
||||
|
||||
<[ReadOnly](True), _
|
||||
Browsable(False)> _
|
||||
Public Overrides Property MacAddress() As String
|
||||
|
||||
<[ReadOnly](True), _
|
||||
Browsable(False)> _
|
||||
Public Overrides Property UserField() As String
|
||||
#End Region
|
||||
|
||||
#Region "IComponent"
|
||||
<Browsable(False)> _
|
||||
Public Property Site() As ISite Implements IComponent.Site
|
||||
Get
|
||||
Return New PropertyGridCommandSite(Me)
|
||||
End Get
|
||||
Set(value As ISite)
|
||||
Throw New NotImplementedException()
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Sub Dispose() Implements IDisposable.Dispose
|
||||
RaiseEvent Disposed(Me, EventArgs.Empty)
|
||||
End Sub
|
||||
|
||||
Public Event Disposed As EventHandler Implements IComponent.Disposed
|
||||
#End Region
|
||||
End Class
|
||||
End Namespace
|
||||
End Namespace
|
||||
|
||||
@@ -1,27 +1,26 @@
|
||||
Imports System.Windows.Forms
|
||||
Imports System.ComponentModel
|
||||
Imports mRemote.Tools.Misc.PropertyGridCategory
|
||||
Imports mRemoteNG.Tools.LocalizedAttributes
|
||||
|
||||
Namespace Container
|
||||
<DefaultProperty("Name")> _
|
||||
Public Class Info
|
||||
#Region "Properties"
|
||||
Private _Name As String = "New Container"
|
||||
<Category(Category1 & "Display"), _
|
||||
Browsable(True), _
|
||||
[ReadOnly](False), _
|
||||
Bindable(False), _
|
||||
DefaultValue(""), _
|
||||
DesignOnly(False), _
|
||||
DisplayName(Language.Base.Props_Name), _
|
||||
Description("Enter a name"), _
|
||||
Attributes.Container()> _
|
||||
<LocalizedCategory("strCategoryDisplay", 1), _
|
||||
Browsable(True), _
|
||||
[ReadOnly](False), _
|
||||
Bindable(False), _
|
||||
DefaultValue(""), _
|
||||
DesignOnly(False), _
|
||||
LocalizedDisplayName("strPropertyNameName"), _
|
||||
LocalizedDescription("strPropertyDescriptionName"), _
|
||||
Attributes.Container()> _
|
||||
Public Property Name() As String
|
||||
Get
|
||||
Return Me._ConnectionInfo.Name
|
||||
Return ConnectionInfo.Name
|
||||
End Get
|
||||
Set(ByVal value As String)
|
||||
Me._ConnectionInfo.Name = value
|
||||
ConnectionInfo.Name = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -81,7 +80,7 @@ Namespace Container
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private _ConnectionInfo As Connection.Info = New Connection.Info
|
||||
Private _ConnectionInfo As New Connection.Info
|
||||
Public Property ConnectionInfo() As Connection.Info
|
||||
Get
|
||||
Return Me._ConnectionInfo
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Namespace Container
|
||||
Public Class List
|
||||
Inherits CollectionBase
|
||||
|
||||
180
mRemoteV1/Controls/ListView.vb
Normal file
180
mRemoteV1/Controls/ListView.vb
Normal file
@@ -0,0 +1,180 @@
|
||||
Imports System.ComponentModel
|
||||
|
||||
Namespace Controls
|
||||
Public Class ListView
|
||||
Inherits Windows.Forms.ListView
|
||||
|
||||
#Region "Public Properties"
|
||||
<Category("Appearance"),
|
||||
DefaultValue(GetType(Color), "HighlightText")> _
|
||||
Public Property HighlightForeColor As Color = SystemColors.HighlightText
|
||||
|
||||
<Category("Appearance"),
|
||||
DefaultValue(GetType(Color), "Highlight")> _
|
||||
Public Property HighlightBackColor As Color = SystemColors.Highlight
|
||||
|
||||
<Category("Appearance"),
|
||||
DefaultValue(GetType(Color), "HotTrack")> _
|
||||
Public Property HighlightBorderColor As Color = SystemColors.HotTrack
|
||||
|
||||
<Category("Appearance"),
|
||||
DefaultValue(GetType(Color), "ControlText")> _
|
||||
Public Property InactiveHighlightForeColor As Color = SystemColors.ControlText
|
||||
|
||||
<Category("Appearance"),
|
||||
DefaultValue(GetType(Color), "Control")> _
|
||||
Public Property InactiveHighlightBackColor As Color = SystemColors.Control
|
||||
|
||||
<Category("Appearance"),
|
||||
DefaultValue(GetType(Color), "ControlDark")> _
|
||||
Public Property InactiveHighlightBorderColor As Color = SystemColors.ControlDark
|
||||
|
||||
<Category("Appearance"),
|
||||
DefaultValue(True)> _
|
||||
Public Overloads Property ShowFocusCues As Boolean = True
|
||||
|
||||
<Category("Appearance")> _
|
||||
Public Property LabelAlignment As New Alignment(VerticalAlignment.Top, HorizontalAlignment.Left)
|
||||
#End Region
|
||||
|
||||
#Region "Constructors"
|
||||
Public Sub New()
|
||||
OwnerDraw = True
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Protected Methods"
|
||||
Protected Overrides Sub OnDrawItem(e As DrawListViewItemEventArgs)
|
||||
If Not View = View.Tile Then MyBase.OnDrawItem(e)
|
||||
If e.ItemIndex < 0 Then MyBase.OnDrawItem(e)
|
||||
|
||||
Dim foreColorBrush As Brush = Nothing
|
||||
Dim backColorBrush As Brush = Nothing
|
||||
Dim borderPen As Pen = Nothing
|
||||
Try
|
||||
If Focused Then
|
||||
borderPen = New Pen(HighlightBorderColor)
|
||||
Else
|
||||
borderPen = New Pen(InactiveHighlightBorderColor)
|
||||
End If
|
||||
|
||||
If e.Item.Selected Then
|
||||
If Focused Then
|
||||
foreColorBrush = New SolidBrush(HighlightForeColor)
|
||||
backColorBrush = New SolidBrush(HighlightBackColor)
|
||||
Else
|
||||
foreColorBrush = New SolidBrush(InactiveHighlightForeColor)
|
||||
backColorBrush = New SolidBrush(InactiveHighlightBackColor)
|
||||
End If
|
||||
Else
|
||||
foreColorBrush = New SolidBrush(e.Item.ForeColor)
|
||||
backColorBrush = New SolidBrush(BackColor)
|
||||
End If
|
||||
|
||||
e.Graphics.FillRectangle(backColorBrush, e.Bounds)
|
||||
|
||||
If Focused And ShowFocusCues Then
|
||||
e.DrawFocusRectangle()
|
||||
ElseIf e.Item.Selected Then
|
||||
e.Graphics.DrawRectangle(borderPen, e.Bounds.X, e.Bounds.Y, e.Bounds.Width - 1, e.Bounds.Height - 1)
|
||||
End If
|
||||
|
||||
Dim imageBounds As New Rectangle(e.Bounds.X + 2, e.Bounds.Y + 6, 16, 16)
|
||||
Dim textBounds As Rectangle = e.Bounds
|
||||
|
||||
If e.Item.ImageList IsNot Nothing Then
|
||||
Dim image As Image = Nothing
|
||||
If Not String.IsNullOrEmpty(e.Item.ImageKey) And e.Item.ImageList.Images.ContainsKey(e.Item.ImageKey) Then
|
||||
image = e.Item.ImageList.Images.Item(e.Item.ImageKey)
|
||||
ElseIf Not e.Item.ImageIndex < 0 And e.Item.ImageList.Images.Count > e.Item.ImageIndex Then
|
||||
image = e.Item.ImageList.Images(e.Item.ImageIndex)
|
||||
End If
|
||||
If image IsNot Nothing Then
|
||||
e.Graphics.DrawImageUnscaledAndClipped(image, imageBounds)
|
||||
textBounds.X = textBounds.Left + 20
|
||||
textBounds.Width = textBounds.Width - 20
|
||||
End If
|
||||
End If
|
||||
|
||||
e.Graphics.DrawString(e.Item.Text, e.Item.Font, foreColorBrush, textBounds, GetStringFormat())
|
||||
Finally
|
||||
If foreColorBrush IsNot Nothing Then foreColorBrush.Dispose()
|
||||
If backColorBrush IsNot Nothing Then backColorBrush.Dispose()
|
||||
If borderPen IsNot Nothing Then borderPen.Dispose()
|
||||
End Try
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Private Methods"
|
||||
Private Function GetStringFormat() As StringFormat
|
||||
Dim format As StringFormat = StringFormat.GenericDefault
|
||||
|
||||
Select Case LabelAlignment.Vertical
|
||||
Case VerticalAlignment.Top
|
||||
format.LineAlignment = StringAlignment.Near
|
||||
Case VerticalAlignment.Middle
|
||||
format.LineAlignment = StringAlignment.Center
|
||||
Case VerticalAlignment.Bottom
|
||||
format.LineAlignment = StringAlignment.Far
|
||||
End Select
|
||||
|
||||
Select Case LabelAlignment.Horizontal
|
||||
Case HorizontalAlignment.Left
|
||||
format.Alignment = StringAlignment.Near
|
||||
Case HorizontalAlignment.Center
|
||||
format.Alignment = StringAlignment.Center
|
||||
Case HorizontalAlignment.Right
|
||||
format.Alignment = StringAlignment.Far
|
||||
End Select
|
||||
|
||||
If RightToLeft Then
|
||||
format.FormatFlags = format.FormatFlags Or StringFormatFlags.DirectionRightToLeft
|
||||
End If
|
||||
|
||||
If LabelWrap Then
|
||||
format.FormatFlags = format.FormatFlags And Not StringFormatFlags.NoWrap
|
||||
Else
|
||||
format.FormatFlags = format.FormatFlags Or StringFormatFlags.NoWrap
|
||||
End If
|
||||
|
||||
Return format
|
||||
End Function
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
<TypeConverter(GetType(ExpandableObjectConverter))> _
|
||||
Public Class Alignment
|
||||
Public Sub New()
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub New(ByVal verticalAlignment As VerticalAlignment, ByVal horizontalAlignment As HorizontalAlignment)
|
||||
Vertical = verticalAlignment
|
||||
Horizontal = horizontalAlignment
|
||||
End Sub
|
||||
|
||||
<NotifyParentProperty(True),
|
||||
DefaultValue(VerticalAlignment.Top)> _
|
||||
Public Property Vertical As VerticalAlignment = VerticalAlignment.Top
|
||||
|
||||
<NotifyParentProperty(True),
|
||||
DefaultValue(HorizontalAlignment.Left)> _
|
||||
Public Property Horizontal As HorizontalAlignment = HorizontalAlignment.Left
|
||||
|
||||
Public Overrides Function ToString() As String
|
||||
Return String.Format("{0}, {1}", Vertical, Horizontal)
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Public Enum VerticalAlignment As Integer
|
||||
Top
|
||||
Middle
|
||||
Bottom
|
||||
End Enum
|
||||
|
||||
Public Enum HorizontalAlignment As Integer
|
||||
Left
|
||||
Center
|
||||
Right
|
||||
End Enum
|
||||
End Namespace
|
||||
165
mRemoteV1/Controls/QuickConnectComboBox.vb
Normal file
165
mRemoteV1/Controls/QuickConnectComboBox.vb
Normal file
@@ -0,0 +1,165 @@
|
||||
Imports mRemoteNG.App.Runtime
|
||||
|
||||
Namespace Controls
|
||||
Public Class QuickConnectComboBox
|
||||
Inherits ToolStripComboBox
|
||||
|
||||
Private WithEvents _comboBox As ComboBox
|
||||
Private _ignoreEnter As Boolean = False
|
||||
|
||||
Public Sub New()
|
||||
_comboBox = ComboBox
|
||||
_comboBox.DrawMode = DrawMode.OwnerDrawFixed
|
||||
|
||||
' This makes it so that _ignoreEnter works correctly before any items are added to the combo box
|
||||
_comboBox.Items.Clear()
|
||||
End Sub
|
||||
|
||||
Private Sub ComboBox_PreviewKeyDown(ByVal sender As Object, ByVal e As PreviewKeyDownEventArgs) Handles _comboBox.PreviewKeyDown
|
||||
If e.KeyCode = Keys.Enter And _comboBox.DroppedDown Then _ignoreEnter = True
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnKeyDown(ByVal e As KeyEventArgs)
|
||||
MyBase.OnKeyDown(e)
|
||||
If e.KeyCode = Keys.Enter Then
|
||||
' Only connect if Enter was not pressed while the combo box was dropped down
|
||||
If Not _ignoreEnter Then OnConnectRequested(New ConnectRequestedEventArgs(_comboBox.Text))
|
||||
_ignoreEnter = False
|
||||
e.Handled = True
|
||||
ElseIf e.KeyCode = Keys.Delete And _comboBox.DroppedDown Then
|
||||
If Not _comboBox.SelectedIndex = -1 Then
|
||||
' Items can't be removed from the ComboBox while it is dropped down without possibly causing
|
||||
' an exception so we must close it, delete the item, and then drop it down again. When we
|
||||
' close it programmatically, the SelectedItem may revert to Nothing, so we must save it first.
|
||||
Dim item As Object = _comboBox.SelectedItem
|
||||
_comboBox.DroppedDown = False
|
||||
_comboBox.Items.Remove(item)
|
||||
_comboBox.SelectedIndex = -1
|
||||
If Not _comboBox.Items.Count = 0 Then
|
||||
_comboBox.DroppedDown = True
|
||||
End If
|
||||
End If
|
||||
e.Handled = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ComboBox_SelectedIndexChanged(sender As System.Object, e As EventArgs) Handles _comboBox.SelectedIndexChanged
|
||||
If Not TypeOf _comboBox.SelectedItem Is HistoryItem Then Return
|
||||
Dim historyItem As HistoryItem = CType(_comboBox.SelectedItem, HistoryItem)
|
||||
OnProtocolChanged(New ProtocolChangedEventArgs(historyItem.ConnectionInfo.Protocol))
|
||||
End Sub
|
||||
|
||||
Private Shared Sub ComboBox_DrawItem(ByVal sender As Object, ByVal e As DrawItemEventArgs) Handles _comboBox.DrawItem
|
||||
Dim comboBox As ComboBox = TryCast(sender, ComboBox)
|
||||
If comboBox Is Nothing Then Return
|
||||
Dim drawItem As Object = comboBox.Items(e.Index)
|
||||
|
||||
Dim drawString As String
|
||||
If TypeOf drawItem Is HistoryItem Then
|
||||
Dim historyItem As HistoryItem = CType(drawItem, HistoryItem)
|
||||
drawString = historyItem.ToString(includeProtocol:=True)
|
||||
Else
|
||||
drawString = drawItem.ToString()
|
||||
End If
|
||||
|
||||
e.DrawBackground()
|
||||
e.Graphics.DrawString(drawString, e.Font, New SolidBrush(e.ForeColor), New RectangleF(e.Bounds.X, e.Bounds.Y, e.Bounds.Width, e.Bounds.Height))
|
||||
e.DrawFocusRectangle()
|
||||
End Sub
|
||||
|
||||
Private Structure HistoryItem
|
||||
Implements IEquatable(Of HistoryItem)
|
||||
|
||||
Public Property ConnectionInfo As Connection.Info
|
||||
|
||||
Public Overloads Function Equals(other As HistoryItem) As Boolean Implements IEquatable(Of HistoryItem).Equals
|
||||
If Not ConnectionInfo.Hostname = other.ConnectionInfo.Hostname Then Return False
|
||||
If Not ConnectionInfo.Port = other.ConnectionInfo.Port Then Return False
|
||||
If Not ConnectionInfo.Protocol = other.ConnectionInfo.Protocol Then Return False
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Overrides Function ToString() As String
|
||||
Return ToString(False)
|
||||
End Function
|
||||
|
||||
Public Overloads Function ToString(ByVal includeProtocol As Boolean) As String
|
||||
Dim port As String = String.Empty
|
||||
If Not ConnectionInfo.Port = ConnectionInfo.GetDefaultPort() Then
|
||||
port = String.Format(":{0}", ConnectionInfo.Port)
|
||||
End If
|
||||
If includeProtocol Then
|
||||
Return String.Format("{0}{1} ({2})", ConnectionInfo.Hostname, port, ConnectionInfo.Protocol)
|
||||
Else
|
||||
Return String.Format("{0}{1}", ConnectionInfo.Hostname, port)
|
||||
End If
|
||||
End Function
|
||||
End Structure
|
||||
|
||||
Private Function Exists(ByVal searchItem As HistoryItem) As Boolean
|
||||
For Each item As Object In _comboBox.Items
|
||||
If Not TypeOf item Is HistoryItem Then Continue For
|
||||
Dim historyItem As HistoryItem = CType(item, HistoryItem)
|
||||
If historyItem.Equals(searchItem) Then Return True
|
||||
Next
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Sub Add(ByVal connectionInfo As Connection.Info)
|
||||
Try
|
||||
Dim historyItem As New HistoryItem
|
||||
historyItem.ConnectionInfo = connectionInfo
|
||||
If Not Exists(historyItem) Then _comboBox.Items.Insert(0, historyItem)
|
||||
Catch ex As Exception
|
||||
MessageCollector.AddExceptionMessage(My.Language.strQuickConnectAddFailed, ex, Messages.MessageClass.ErrorMsg, True)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
#Region "Events"
|
||||
Public Class ConnectRequestedEventArgs
|
||||
Inherits EventArgs
|
||||
|
||||
Public Sub New(ByVal connectionString As String)
|
||||
_connectionString = connectionString
|
||||
End Sub
|
||||
|
||||
Private ReadOnly _connectionString As String
|
||||
|
||||
Public ReadOnly Property ConnectionString As String
|
||||
Get
|
||||
Return _connectionString
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
|
||||
Public Event ConnectRequested(ByVal sender As Object, ByVal e As ConnectRequestedEventArgs)
|
||||
|
||||
Protected Overridable Sub OnConnectRequested(ByVal e As ConnectRequestedEventArgs)
|
||||
RaiseEvent ConnectRequested(Me, New ConnectRequestedEventArgs(e.ConnectionString))
|
||||
End Sub
|
||||
|
||||
Public Class ProtocolChangedEventArgs
|
||||
Inherits EventArgs
|
||||
|
||||
Public Sub New(ByVal protocol As Connection.Protocol.Protocols)
|
||||
_protocol = protocol
|
||||
End Sub
|
||||
|
||||
Private ReadOnly _protocol As Connection.Protocol.Protocols
|
||||
|
||||
Public ReadOnly Property Protocol As Connection.Protocol.Protocols
|
||||
Get
|
||||
Return _protocol
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
|
||||
Public Event ProtocolChanged(ByVal sender As Object, ByVal e As ProtocolChangedEventArgs)
|
||||
|
||||
Protected Overridable Sub OnProtocolChanged(ByVal e As ProtocolChangedEventArgs)
|
||||
RaiseEvent ProtocolChanged(Me, New ProtocolChangedEventArgs(e.Protocol))
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
45
mRemoteV1/Controls/TextBox.vb
Normal file
45
mRemoteV1/Controls/TextBox.vb
Normal file
@@ -0,0 +1,45 @@
|
||||
Imports System.ComponentModel
|
||||
|
||||
' Adapted from http://stackoverflow.com/a/3678888/2101395
|
||||
|
||||
Namespace Controls
|
||||
Public Class TextBox
|
||||
Inherits Windows.Forms.TextBox
|
||||
|
||||
#Region "Public Properties"
|
||||
<Category("Behavior"),
|
||||
DefaultValue(False)> _
|
||||
Public Property SelectAllOnFocus As Boolean = False
|
||||
#End Region
|
||||
|
||||
#Region "Protected Methods"
|
||||
Protected Overrides Sub OnEnter(ByVal e As EventArgs)
|
||||
MyBase.OnEnter(e)
|
||||
|
||||
If MouseButtons = MouseButtons.None Then
|
||||
SelectAll()
|
||||
_focusHandled = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnLeave(ByVal e As EventArgs)
|
||||
MyBase.OnLeave(e)
|
||||
|
||||
_focusHandled = False
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnMouseUp(ByVal e As MouseEventArgs)
|
||||
MyBase.OnMouseUp(e)
|
||||
|
||||
If Not _focusHandled Then
|
||||
If SelectionLength = 0 Then SelectAll()
|
||||
_focusHandled = True
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Private Fields"
|
||||
Private _focusHandled As Boolean = False
|
||||
#End Region
|
||||
End Class
|
||||
End Namespace
|
||||
42
mRemoteV1/Controls/ToolStripSplitButton.vb
Normal file
42
mRemoteV1/Controls/ToolStripSplitButton.vb
Normal file
@@ -0,0 +1,42 @@
|
||||
Namespace Controls
|
||||
Public Class ToolStripSplitButton
|
||||
Inherits Windows.Forms.ToolStripSplitButton
|
||||
|
||||
Public Overloads Property DropDown As ToolStripDropDown
|
||||
Get
|
||||
Return MyBase.DropDown
|
||||
End Get
|
||||
Set(value As ToolStripDropDown)
|
||||
If MyBase.DropDown IsNot value Then
|
||||
MyBase.DropDown = value
|
||||
AddHandler MyBase.DropDown.Closing, AddressOf DropDown_Closing
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Sub DropDown_Closing(ByVal sender As Object, e As ToolStripDropDownClosingEventArgs)
|
||||
If Not e.CloseReason = ToolStripDropDownCloseReason.AppClicked Then Return
|
||||
|
||||
Dim dropDownButtonBoundsClient As Rectangle = DropDownButtonBounds ' Relative to the ToolStripSplitButton
|
||||
dropDownButtonBoundsClient.Offset(Bounds.Location) ' Relative to the parent of the ToolStripSplitButton
|
||||
Dim dropDownButtonBoundsScreen As Rectangle = GetCurrentParent().RectangleToScreen(dropDownButtonBoundsClient) ' Relative to the screen
|
||||
|
||||
If dropDownButtonBoundsScreen.Contains(Control.MousePosition) Then e.Cancel = True
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnMouseDown(e As MouseEventArgs)
|
||||
_dropDownVisibleOnMouseDown = DropDown.Visible
|
||||
MyBase.OnMouseDown(e)
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnMouseUp(e As MouseEventArgs)
|
||||
If _dropDownVisibleOnMouseDown Then
|
||||
DropDown.Close()
|
||||
Else
|
||||
MyBase.OnMouseUp(e)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private _dropDownVisibleOnMouseDown As Boolean = False
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -1,15 +1,14 @@
|
||||
Imports System.ComponentModel
|
||||
Imports mRemote.Tools.Misc.PropertyGridCategory
|
||||
Imports mRemote.Tools.Misc.PropertyGridValue
|
||||
Imports mRemoteNG.Tools.LocalizedAttributes
|
||||
|
||||
Namespace Credential
|
||||
Public Class Info
|
||||
#Region "1 Display"
|
||||
Private _Name As String
|
||||
<Category(Category1 & "Display"), _
|
||||
Browsable(True), _
|
||||
DisplayName(Language.Base.Props_Name), _
|
||||
Description("Enter a name")> _
|
||||
<LocalizedCategory("strCategoryDisplay", 1), _
|
||||
Browsable(True), _
|
||||
LocalizedDisplayName("strPropertyNameName"), _
|
||||
LocalizedDescription("strPropertyDescriptionName")> _
|
||||
Public Property Name() As String
|
||||
Get
|
||||
Return _Name
|
||||
@@ -20,10 +19,10 @@ Namespace Credential
|
||||
End Property
|
||||
|
||||
Private _Description As String
|
||||
<Category(Category1 & "Description"), _
|
||||
Browsable(True), _
|
||||
DisplayName(Language.Base.Props_Description), _
|
||||
Description("Enter a description")> _
|
||||
<LocalizedCategory("strCategoryDisplay", 1), _
|
||||
Browsable(True), _
|
||||
LocalizedDisplayName("strPropertyNameDescription"), _
|
||||
LocalizedDescription("strPropertyDescriptionDescription")> _
|
||||
Public Property Description() As String
|
||||
Get
|
||||
Return _Description
|
||||
@@ -35,10 +34,10 @@ Namespace Credential
|
||||
#End Region
|
||||
#Region "2 Credentials"
|
||||
Private _Username As String
|
||||
<Category(Category2 & "Credentials"), _
|
||||
<LocalizedCategory("strCategoryCredentials", 2), _
|
||||
Browsable(True), _
|
||||
DisplayName(Language.Base.Props_Username), _
|
||||
Description("Enter a username")> _
|
||||
LocalizedDisplayName("strPropertyNameUsername"), _
|
||||
LocalizedDescription("strPropertyDescriptionUsername")> _
|
||||
Public Property Username() As String
|
||||
Get
|
||||
Return _Username
|
||||
@@ -49,10 +48,10 @@ Namespace Credential
|
||||
End Property
|
||||
|
||||
Private _Password As String
|
||||
<Category(Category2 & "Credentials"), _
|
||||
<LocalizedCategory("strCategoryCredentials", 2), _
|
||||
Browsable(True), _
|
||||
DisplayName(Language.Base.Props_Password), _
|
||||
Description("Enter a password"), _
|
||||
LocalizedDisplayName("strPropertyNamePassword"), _
|
||||
LocalizedDescription("strPropertyDescriptionPassword"), _
|
||||
PasswordPropertyText(True)> _
|
||||
Public Property Password() As String
|
||||
Get
|
||||
@@ -64,10 +63,10 @@ Namespace Credential
|
||||
End Property
|
||||
|
||||
Private _Domain As String
|
||||
<Category(Category2 & "Credentials"), _
|
||||
<LocalizedCategory("strCategoryCredentials", 2), _
|
||||
Browsable(True), _
|
||||
DisplayName(Language.Base.Props_Domain), _
|
||||
Description("Enter a domain")> _
|
||||
LocalizedDisplayName("strPropertyNameDomain"), _
|
||||
LocalizedDescription("strPropertyDescriptionDomain")> _
|
||||
Public Property Domain() As String
|
||||
Get
|
||||
Return _Domain
|
||||
|
||||
92
mRemoteV1/Forms/OptionsForm.Designer.vb
generated
Normal file
92
mRemoteV1/Forms/OptionsForm.Designer.vb
generated
Normal file
@@ -0,0 +1,92 @@
|
||||
Namespace Forms
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class OptionsForm
|
||||
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()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(OptionsForm))
|
||||
Dim Alignment2 As mRemoteNG.Controls.Alignment = New mRemoteNG.Controls.Alignment()
|
||||
Me.PagePanel = New System.Windows.Forms.Panel()
|
||||
Me.OkButton = New System.Windows.Forms.Button()
|
||||
Me.CancelButtonControl = New System.Windows.Forms.Button()
|
||||
Me.PageListView = New mRemoteNG.Controls.ListView()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'PagePanel
|
||||
'
|
||||
resources.ApplyResources(Me.PagePanel, "PagePanel")
|
||||
Me.PagePanel.Name = "PagePanel"
|
||||
'
|
||||
'OkButton
|
||||
'
|
||||
resources.ApplyResources(Me.OkButton, "OkButton")
|
||||
Me.OkButton.Name = "OkButton"
|
||||
Me.OkButton.UseVisualStyleBackColor = True
|
||||
'
|
||||
'CancelButtonControl
|
||||
'
|
||||
Me.CancelButtonControl.DialogResult = System.Windows.Forms.DialogResult.Cancel
|
||||
resources.ApplyResources(Me.CancelButtonControl, "CancelButtonControl")
|
||||
Me.CancelButtonControl.Name = "CancelButtonControl"
|
||||
Me.CancelButtonControl.UseVisualStyleBackColor = True
|
||||
'
|
||||
'PageListView
|
||||
'
|
||||
Me.PageListView.InactiveHighlightBackColor = System.Drawing.SystemColors.Highlight
|
||||
Me.PageListView.InactiveHighlightBorderColor = System.Drawing.SystemColors.HotTrack
|
||||
Me.PageListView.InactiveHighlightForeColor = System.Drawing.SystemColors.HighlightText
|
||||
Alignment2.Horizontal = mRemoteNG.Controls.HorizontalAlignment.Left
|
||||
Alignment2.Vertical = mRemoteNG.Controls.VerticalAlignment.Middle
|
||||
Me.PageListView.LabelAlignment = Alignment2
|
||||
resources.ApplyResources(Me.PageListView, "PageListView")
|
||||
Me.PageListView.MultiSelect = False
|
||||
Me.PageListView.Name = "PageListView"
|
||||
Me.PageListView.OwnerDraw = True
|
||||
Me.PageListView.ShowFocusCues = False
|
||||
Me.PageListView.TileSize = New System.Drawing.Size(150, 30)
|
||||
Me.PageListView.UseCompatibleStateImageBehavior = False
|
||||
Me.PageListView.View = System.Windows.Forms.View.Tile
|
||||
'
|
||||
'OptionsForm
|
||||
'
|
||||
Me.AcceptButton = Me.OkButton
|
||||
resources.ApplyResources(Me, "$this")
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.CancelButton = Me.CancelButtonControl
|
||||
Me.Controls.Add(Me.CancelButtonControl)
|
||||
Me.Controls.Add(Me.OkButton)
|
||||
Me.Controls.Add(Me.PagePanel)
|
||||
Me.Controls.Add(Me.PageListView)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
|
||||
Me.MaximizeBox = False
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "OptionsForm"
|
||||
Me.ShowInTaskbar = False
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents PageListView As mRemoteNG.Controls.ListView
|
||||
Friend WithEvents PagePanel As System.Windows.Forms.Panel
|
||||
Friend WithEvents OkButton As System.Windows.Forms.Button
|
||||
Friend WithEvents CancelButtonControl As System.Windows.Forms.Button
|
||||
End Class
|
||||
End Namespace
|
||||
264
mRemoteV1/Forms/OptionsForm.resx
Normal file
264
mRemoteV1/Forms/OptionsForm.resx
Normal file
@@ -0,0 +1,264 @@
|
||||
<?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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="PagePanel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>172, 12</value>
|
||||
</data>
|
||||
<data name="PagePanel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>610, 489</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="PagePanel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>PagePanel.Name" xml:space="preserve">
|
||||
<value>PagePanel</value>
|
||||
</data>
|
||||
<data name=">>PagePanel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>PagePanel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>PagePanel.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="OkButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="OkButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>626, 507</value>
|
||||
</data>
|
||||
<data name="OkButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
</data>
|
||||
<data name="OkButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="OkButton.Text" xml:space="preserve">
|
||||
<value>&OK</value>
|
||||
</data>
|
||||
<data name=">>OkButton.Name" xml:space="preserve">
|
||||
<value>OkButton</value>
|
||||
</data>
|
||||
<data name=">>OkButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>OkButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>OkButton.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="CancelButtonControl.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="CancelButtonControl.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>707, 507</value>
|
||||
</data>
|
||||
<data name="CancelButtonControl.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
</data>
|
||||
<data name="CancelButtonControl.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="CancelButtonControl.Text" xml:space="preserve">
|
||||
<value>&Cancel</value>
|
||||
</data>
|
||||
<data name=">>CancelButtonControl.Name" xml:space="preserve">
|
||||
<value>CancelButtonControl</value>
|
||||
</data>
|
||||
<data name=">>CancelButtonControl.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>CancelButtonControl.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>CancelButtonControl.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="PageListView.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 12</value>
|
||||
</data>
|
||||
<data name="PageListView.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>154, 489</value>
|
||||
</data>
|
||||
<data name="PageListView.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>PageListView.Name" xml:space="preserve">
|
||||
<value>PageListView</value>
|
||||
</data>
|
||||
<data name=">>PageListView.Type" xml:space="preserve">
|
||||
<value>mRemoteNG.Controls.ListView, mRemoteNG, Version=1.72.5056.42837, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>PageListView.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>PageListView.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>794, 542</value>
|
||||
</data>
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAA1YZW1dWCUP/RfEr/0XhErwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAA2ZBkzN+jgP/qwar/6r+n/9yYcP/RekavAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAANuWbv/tyLL/57ea/+azl//qwqr/3pty/9F8SK8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAADdnnj/7cy2/+i8ov/ksJH/5rWZ/+rCq//em3P/035MrAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAA36R+kuayk//uzLf/6b2k/+Wyk//mtpr/6sOs/96dd//TgE6sAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADfpIKS5rOX/+7Nuf/pvqT/5bOV/+e4nP/rxa3/3p54/9WC
|
||||
UKoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOGmhJLmtpj/7s66/+m/pv/ovKL/7Miy/9+j
|
||||
gP/SiFzJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4aiGkua2m//vz7v/7s65/+Kt
|
||||
i//Smnr/h4eH94WFhSMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADhqIiS57ib/+a1
|
||||
l//YqIv/0tLS/7S0tP+IiIj+hoaG+4SEhPuCgoLWgICAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOOs
|
||||
ipLapofPkZGR+8fHx//MzMz/x8fH/8XFxf/CwsL/v7+//4ODg/WBgYFwAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAJSUlEiSkpL+1NTU/8jIyP+7u7v/ubm5/8HBwf/Dw8P/hISE1gAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAlZWV/N3d3f/ExMT/jo6OwYyMjMOrq6v/19fX/4aGhvsAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAJeXl/vk5OT/z8/P/5GRkcIAAAAAjY2N/4uLi/+JiYn7AAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACamprW4uLi/+fn5/+4uLj/kpKS/wAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnJyccJqamvXk5OT/7u7u/5WVlf8AAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACdnZ1wm5ub1pqamvuYmJj7AAAAAAAA
|
||||
AAAAAAAAh/+cQQP/nEEB/5xBAP+cQQB/nEGAP5xBwD+cQeAfnEHwAZxB+ACcQf4AnEH/AJxB/wicQf8H
|
||||
nEH/B5xB/4ecQQ==
|
||||
</value>
|
||||
</data>
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterParent</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Options</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>OptionsForm</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
||||
195
mRemoteV1/Forms/OptionsForm.vb
Normal file
195
mRemoteV1/Forms/OptionsForm.vb
Normal file
@@ -0,0 +1,195 @@
|
||||
Imports mRemoteNG.Forms.OptionsPages
|
||||
Imports mRemoteNG.App.Runtime
|
||||
Imports mRemoteNG.My
|
||||
|
||||
Namespace Forms
|
||||
Public Class OptionsForm
|
||||
#Region "Constructors"
|
||||
Public Sub New()
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
' Add any initialization after the InitializeComponent() call.
|
||||
|
||||
FontOverride(Me)
|
||||
|
||||
_pages.Add(New StartupExitPage, New PageInfo)
|
||||
_pages.Add(New AppearancePage, New PageInfo)
|
||||
_pages.Add(New TabsPanelsPage, New PageInfo)
|
||||
_pages.Add(New ConnectionsPage, New PageInfo)
|
||||
_pages.Add(New SqlServerPage, New PageInfo)
|
||||
_pages.Add(New UpdatesPage, New PageInfo)
|
||||
_pages.Add(New ThemePage, New PageInfo)
|
||||
_pages.Add(New KeyboardPage, New PageInfo)
|
||||
_pages.Add(New AdvancedPage, New PageInfo)
|
||||
|
||||
_startPage = GetPageFromType(GetType(StartupExitPage))
|
||||
|
||||
_pageIconImageList.ColorDepth = ColorDepth.Depth32Bit
|
||||
PageListView.LargeImageList = _pageIconImageList
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Public Methods"
|
||||
Public Overloads Function ShowDialog(ByVal ownerWindow As IWin32Window, ByVal pageType As Type) As DialogResult
|
||||
_startPage = GetPageFromType(pageType)
|
||||
Return ShowDialog(ownerWindow)
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
#Region "Private Fields"
|
||||
Private ReadOnly _pages As New Dictionary(Of OptionsPage, PageInfo)
|
||||
Private ReadOnly _pageIconImageList As New ImageList
|
||||
|
||||
Private _startPage As OptionsPage
|
||||
Private _selectedPage As OptionsPage = Nothing
|
||||
#End Region
|
||||
|
||||
#Region "Private Methods"
|
||||
#Region "Event Handlers"
|
||||
Private Sub OptionsForm_Load(sender As System.Object, e As EventArgs) Handles MyBase.Load
|
||||
For Each keyValuePair As KeyValuePair(Of OptionsPage, PageInfo) In _pages
|
||||
Dim page As OptionsPage = keyValuePair.Key
|
||||
Dim pageInfo As PageInfo = keyValuePair.Value
|
||||
_pageIconImageList.Images.Add(pageInfo.IconKey, page.PageIcon)
|
||||
pageInfo.ListViewItem = PageListView.Items.Add(page.PageName, pageInfo.IconKey)
|
||||
Next
|
||||
|
||||
ApplyLanguage()
|
||||
LoadSettings()
|
||||
|
||||
ShowPage(_startPage)
|
||||
End Sub
|
||||
|
||||
Private Sub OptionsForm_FormClosing(sender As System.Object, e As FormClosingEventArgs) Handles MyBase.FormClosing
|
||||
If DialogResult = DialogResult.OK Then
|
||||
SaveSettings()
|
||||
Else
|
||||
RevertSettings()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub PageListView_ItemSelectionChanged(sender As System.Object, e As ListViewItemSelectionChangedEventArgs) Handles PageListView.ItemSelectionChanged
|
||||
If Not e.IsSelected Then Return
|
||||
If _pages.Count < 1 Then Return
|
||||
Dim page As OptionsPage = GetPageFromListViewItem(e.Item)
|
||||
If _selectedPage IsNot page Then
|
||||
ShowPage(page)
|
||||
End If
|
||||
SelectNextControl(PageListView, True, True, True, True)
|
||||
End Sub
|
||||
|
||||
Private Sub PageListView_MouseUp(sender As System.Object, e As MouseEventArgs) Handles PageListView.MouseUp
|
||||
If PageListView.SelectedIndices.Count = 0 Then
|
||||
Dim pageInfo As PageInfo = _pages(_selectedPage)
|
||||
pageInfo.ListViewItem.Selected = True
|
||||
End If
|
||||
SelectNextControl(PageListView, True, True, True, True)
|
||||
End Sub
|
||||
|
||||
Private Sub OkButton_Click(sender As System.Object, e As EventArgs) Handles OkButton.Click
|
||||
DialogResult = DialogResult.OK
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
Private Sub CancelButtonControl_Click(sender As System.Object, e As EventArgs) Handles CancelButtonControl.Click
|
||||
DialogResult = DialogResult.Cancel
|
||||
Close()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Private Sub ApplyLanguage()
|
||||
Text = Language.strMenuOptions
|
||||
OkButton.Text = Language.strButtonOK
|
||||
CancelButtonControl.Text = Language.strButtonCancel
|
||||
|
||||
For Each page As OptionsPage In _pages.Keys
|
||||
Try
|
||||
page.ApplyLanguage()
|
||||
Catch ex As Exception
|
||||
MessageCollector.AddExceptionMessage(String.Format("OptionsPage.ApplyLanguage() failed for page {0}.", page.PageName), ex, , True)
|
||||
End Try
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub LoadSettings()
|
||||
For Each page As OptionsPage In _pages.Keys
|
||||
Try
|
||||
page.LoadSettings()
|
||||
Catch ex As Exception
|
||||
MessageCollector.AddExceptionMessage(String.Format("OptionsPage.LoadSettings() failed for page {0}.", page.PageName), ex, , True)
|
||||
End Try
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub SaveSettings()
|
||||
For Each page As OptionsPage In _pages.Keys
|
||||
Try
|
||||
page.SaveSettings()
|
||||
Catch ex As Exception
|
||||
MessageCollector.AddExceptionMessage(String.Format("OptionsPage.SaveSettings() failed for page {0}.", page.PageName), ex, , True)
|
||||
End Try
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub RevertSettings()
|
||||
For Each page As OptionsPage In _pages.Keys
|
||||
Try
|
||||
page.RevertSettings()
|
||||
Catch ex As Exception
|
||||
MessageCollector.AddExceptionMessage(String.Format("OptionsPage.RevertSettings() failed for page {0}.", page.PageName), ex, , True)
|
||||
End Try
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Function GetPageFromType(ByVal pageType As Type) As OptionsPage
|
||||
For Each page As OptionsPage In _pages.Keys
|
||||
If page.GetType() Is pageType Then Return page
|
||||
Next
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
Private Function GetPageFromListViewItem(ByVal listViewItem As ListViewItem) As OptionsPage
|
||||
For Each keyValuePair As KeyValuePair(Of OptionsPage, PageInfo) In _pages
|
||||
Dim page As OptionsPage = keyValuePair.Key
|
||||
Dim pageInfo As PageInfo = keyValuePair.Value
|
||||
If pageInfo.ListViewItem Is listViewItem Then Return page
|
||||
Next
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
Private Sub ShowPage(ByVal newPage As OptionsPage)
|
||||
If _selectedPage IsNot Nothing Then
|
||||
Dim oldPage As OptionsPage = _selectedPage
|
||||
oldPage.Visible = False
|
||||
If _pages.ContainsKey(oldPage) Then
|
||||
Dim oldPageInfo As PageInfo = _pages(oldPage)
|
||||
oldPageInfo.ListViewItem.Selected = False
|
||||
End If
|
||||
End If
|
||||
|
||||
_selectedPage = newPage
|
||||
|
||||
If newPage IsNot Nothing Then
|
||||
newPage.Parent = PagePanel
|
||||
newPage.Dock = DockStyle.Fill
|
||||
newPage.Visible = True
|
||||
If _pages.ContainsKey(newPage) Then
|
||||
Dim newPageInfo As PageInfo = _pages(newPage)
|
||||
newPageInfo.ListViewItem.Selected = True
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Private Classes"
|
||||
Private Class PageInfo
|
||||
Public Property IconKey As String
|
||||
Public Property ListViewItem As ListViewItem
|
||||
|
||||
Public Sub New()
|
||||
IconKey = Guid.NewGuid.ToString()
|
||||
End Sub
|
||||
End Class
|
||||
#End Region
|
||||
End Class
|
||||
End Namespace
|
||||
262
mRemoteV1/Forms/OptionsPages/AdvancedPage.Designer.vb
generated
Normal file
262
mRemoteV1/Forms/OptionsPages/AdvancedPage.Designer.vb
generated
Normal file
@@ -0,0 +1,262 @@
|
||||
Namespace Forms.OptionsPages
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class AdvancedPage
|
||||
Inherits OptionsPage
|
||||
|
||||
'UserControl 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()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(AdvancedPage))
|
||||
Me.chkWriteLogFile = New System.Windows.Forms.CheckBox()
|
||||
Me.chkAutomaticallyGetSessionInfo = New System.Windows.Forms.CheckBox()
|
||||
Me.lblXulRunnerPath = New System.Windows.Forms.Label()
|
||||
Me.lblMaximumPuttyWaitTime = New System.Windows.Forms.Label()
|
||||
Me.chkEncryptCompleteFile = New System.Windows.Forms.CheckBox()
|
||||
Me.chkAutomaticReconnect = New System.Windows.Forms.CheckBox()
|
||||
Me.btnBrowseXulRunnerPath = New System.Windows.Forms.Button()
|
||||
Me.numPuttyWaitTime = New System.Windows.Forms.NumericUpDown()
|
||||
Me.chkUseCustomPuttyPath = New System.Windows.Forms.CheckBox()
|
||||
Me.lblConfigurePuttySessions = New System.Windows.Forms.Label()
|
||||
Me.txtXULrunnerPath = New System.Windows.Forms.TextBox()
|
||||
Me.numUVNCSCPort = New System.Windows.Forms.NumericUpDown()
|
||||
Me.txtCustomPuttyPath = New System.Windows.Forms.TextBox()
|
||||
Me.btnLaunchPutty = New System.Windows.Forms.Button()
|
||||
Me.lblUVNCSCPort = New System.Windows.Forms.Label()
|
||||
Me.lblSeconds = New System.Windows.Forms.Label()
|
||||
Me.btnBrowseCustomPuttyPath = New System.Windows.Forms.Button()
|
||||
CType(Me.numPuttyWaitTime, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.numUVNCSCPort, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'chkWriteLogFile
|
||||
'
|
||||
Me.chkWriteLogFile.AutoSize = True
|
||||
Me.chkWriteLogFile.Location = New System.Drawing.Point(3, 0)
|
||||
Me.chkWriteLogFile.Name = "chkWriteLogFile"
|
||||
Me.chkWriteLogFile.Size = New System.Drawing.Size(171, 17)
|
||||
Me.chkWriteLogFile.TabIndex = 17
|
||||
Me.chkWriteLogFile.Text = "Write log file (mRemoteNG.log)"
|
||||
Me.chkWriteLogFile.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkAutomaticallyGetSessionInfo
|
||||
'
|
||||
Me.chkAutomaticallyGetSessionInfo.AutoSize = True
|
||||
Me.chkAutomaticallyGetSessionInfo.Location = New System.Drawing.Point(3, 46)
|
||||
Me.chkAutomaticallyGetSessionInfo.Name = "chkAutomaticallyGetSessionInfo"
|
||||
Me.chkAutomaticallyGetSessionInfo.Size = New System.Drawing.Size(198, 17)
|
||||
Me.chkAutomaticallyGetSessionInfo.TabIndex = 19
|
||||
Me.chkAutomaticallyGetSessionInfo.Text = "Automatically get session information"
|
||||
Me.chkAutomaticallyGetSessionInfo.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblXulRunnerPath
|
||||
'
|
||||
Me.lblXulRunnerPath.AutoSize = True
|
||||
Me.lblXulRunnerPath.Location = New System.Drawing.Point(3, 217)
|
||||
Me.lblXulRunnerPath.Name = "lblXulRunnerPath"
|
||||
Me.lblXulRunnerPath.Size = New System.Drawing.Size(85, 13)
|
||||
Me.lblXulRunnerPath.TabIndex = 29
|
||||
Me.lblXulRunnerPath.Text = "XULrunner path:"
|
||||
'
|
||||
'lblMaximumPuttyWaitTime
|
||||
'
|
||||
Me.lblMaximumPuttyWaitTime.Location = New System.Drawing.Point(3, 185)
|
||||
Me.lblMaximumPuttyWaitTime.Name = "lblMaximumPuttyWaitTime"
|
||||
Me.lblMaximumPuttyWaitTime.Size = New System.Drawing.Size(364, 13)
|
||||
Me.lblMaximumPuttyWaitTime.TabIndex = 26
|
||||
Me.lblMaximumPuttyWaitTime.Text = "Maximum PuTTY wait time:"
|
||||
Me.lblMaximumPuttyWaitTime.TextAlign = System.Drawing.ContentAlignment.TopRight
|
||||
'
|
||||
'chkEncryptCompleteFile
|
||||
'
|
||||
Me.chkEncryptCompleteFile.AutoSize = True
|
||||
Me.chkEncryptCompleteFile.Location = New System.Drawing.Point(3, 23)
|
||||
Me.chkEncryptCompleteFile.Name = "chkEncryptCompleteFile"
|
||||
Me.chkEncryptCompleteFile.Size = New System.Drawing.Size(180, 17)
|
||||
Me.chkEncryptCompleteFile.TabIndex = 18
|
||||
Me.chkEncryptCompleteFile.Text = "Encrypt complete connection file"
|
||||
Me.chkEncryptCompleteFile.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkAutomaticReconnect
|
||||
'
|
||||
Me.chkAutomaticReconnect.AutoSize = True
|
||||
Me.chkAutomaticReconnect.Location = New System.Drawing.Point(3, 69)
|
||||
Me.chkAutomaticReconnect.Name = "chkAutomaticReconnect"
|
||||
Me.chkAutomaticReconnect.Size = New System.Drawing.Size(399, 17)
|
||||
Me.chkAutomaticReconnect.TabIndex = 20
|
||||
Me.chkAutomaticReconnect.Text = "Automatically try to reconnect when disconnected from server (RDP && ICA only)"
|
||||
Me.chkAutomaticReconnect.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnBrowseXulRunnerPath
|
||||
'
|
||||
Me.btnBrowseXulRunnerPath.Location = New System.Drawing.Point(373, 233)
|
||||
Me.btnBrowseXulRunnerPath.Name = "btnBrowseXulRunnerPath"
|
||||
Me.btnBrowseXulRunnerPath.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnBrowseXulRunnerPath.TabIndex = 31
|
||||
Me.btnBrowseXulRunnerPath.Text = "Browse..."
|
||||
Me.btnBrowseXulRunnerPath.UseVisualStyleBackColor = True
|
||||
'
|
||||
'numPuttyWaitTime
|
||||
'
|
||||
Me.numPuttyWaitTime.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.numPuttyWaitTime.Location = New System.Drawing.Point(373, 183)
|
||||
Me.numPuttyWaitTime.Maximum = New Decimal(New Integer() {999, 0, 0, 0})
|
||||
Me.numPuttyWaitTime.Name = "numPuttyWaitTime"
|
||||
Me.numPuttyWaitTime.Size = New System.Drawing.Size(49, 20)
|
||||
Me.numPuttyWaitTime.TabIndex = 27
|
||||
Me.numPuttyWaitTime.Value = New Decimal(New Integer() {5, 0, 0, 0})
|
||||
'
|
||||
'chkUseCustomPuttyPath
|
||||
'
|
||||
Me.chkUseCustomPuttyPath.AutoSize = True
|
||||
Me.chkUseCustomPuttyPath.Location = New System.Drawing.Point(3, 92)
|
||||
Me.chkUseCustomPuttyPath.Name = "chkUseCustomPuttyPath"
|
||||
Me.chkUseCustomPuttyPath.Size = New System.Drawing.Size(146, 17)
|
||||
Me.chkUseCustomPuttyPath.TabIndex = 21
|
||||
Me.chkUseCustomPuttyPath.Text = "Use custom PuTTY path:"
|
||||
Me.chkUseCustomPuttyPath.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblConfigurePuttySessions
|
||||
'
|
||||
Me.lblConfigurePuttySessions.Location = New System.Drawing.Point(3, 154)
|
||||
Me.lblConfigurePuttySessions.Name = "lblConfigurePuttySessions"
|
||||
Me.lblConfigurePuttySessions.Size = New System.Drawing.Size(364, 13)
|
||||
Me.lblConfigurePuttySessions.TabIndex = 24
|
||||
Me.lblConfigurePuttySessions.Text = "To configure PuTTY sessions click this button:"
|
||||
Me.lblConfigurePuttySessions.TextAlign = System.Drawing.ContentAlignment.TopRight
|
||||
'
|
||||
'txtXULrunnerPath
|
||||
'
|
||||
Me.txtXULrunnerPath.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.txtXULrunnerPath.Location = New System.Drawing.Point(21, 235)
|
||||
Me.txtXULrunnerPath.Name = "txtXULrunnerPath"
|
||||
Me.txtXULrunnerPath.Size = New System.Drawing.Size(346, 20)
|
||||
Me.txtXULrunnerPath.TabIndex = 30
|
||||
'
|
||||
'numUVNCSCPort
|
||||
'
|
||||
Me.numUVNCSCPort.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.numUVNCSCPort.Location = New System.Drawing.Point(373, 276)
|
||||
Me.numUVNCSCPort.Maximum = New Decimal(New Integer() {65535, 0, 0, 0})
|
||||
Me.numUVNCSCPort.Name = "numUVNCSCPort"
|
||||
Me.numUVNCSCPort.Size = New System.Drawing.Size(72, 20)
|
||||
Me.numUVNCSCPort.TabIndex = 33
|
||||
Me.numUVNCSCPort.Value = New Decimal(New Integer() {5500, 0, 0, 0})
|
||||
Me.numUVNCSCPort.Visible = False
|
||||
'
|
||||
'txtCustomPuttyPath
|
||||
'
|
||||
Me.txtCustomPuttyPath.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.txtCustomPuttyPath.Enabled = False
|
||||
Me.txtCustomPuttyPath.Location = New System.Drawing.Point(21, 115)
|
||||
Me.txtCustomPuttyPath.Name = "txtCustomPuttyPath"
|
||||
Me.txtCustomPuttyPath.Size = New System.Drawing.Size(346, 20)
|
||||
Me.txtCustomPuttyPath.TabIndex = 22
|
||||
'
|
||||
'btnLaunchPutty
|
||||
'
|
||||
Me.btnLaunchPutty.Image = Global.mRemoteNG.My.Resources.Resources.PuttyConfig
|
||||
Me.btnLaunchPutty.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
Me.btnLaunchPutty.Location = New System.Drawing.Point(373, 149)
|
||||
Me.btnLaunchPutty.Name = "btnLaunchPutty"
|
||||
Me.btnLaunchPutty.Size = New System.Drawing.Size(110, 23)
|
||||
Me.btnLaunchPutty.TabIndex = 25
|
||||
Me.btnLaunchPutty.Text = "Launch PuTTY"
|
||||
Me.btnLaunchPutty.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
Me.btnLaunchPutty.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblUVNCSCPort
|
||||
'
|
||||
Me.lblUVNCSCPort.Location = New System.Drawing.Point(3, 278)
|
||||
Me.lblUVNCSCPort.Name = "lblUVNCSCPort"
|
||||
Me.lblUVNCSCPort.Size = New System.Drawing.Size(364, 13)
|
||||
Me.lblUVNCSCPort.TabIndex = 32
|
||||
Me.lblUVNCSCPort.Text = "UltraVNC SingleClick Listening Port:"
|
||||
Me.lblUVNCSCPort.TextAlign = System.Drawing.ContentAlignment.TopRight
|
||||
Me.lblUVNCSCPort.Visible = False
|
||||
'
|
||||
'lblSeconds
|
||||
'
|
||||
Me.lblSeconds.AutoSize = True
|
||||
Me.lblSeconds.Location = New System.Drawing.Point(428, 185)
|
||||
Me.lblSeconds.Name = "lblSeconds"
|
||||
Me.lblSeconds.Size = New System.Drawing.Size(47, 13)
|
||||
Me.lblSeconds.TabIndex = 28
|
||||
Me.lblSeconds.Text = "seconds"
|
||||
'
|
||||
'btnBrowseCustomPuttyPath
|
||||
'
|
||||
Me.btnBrowseCustomPuttyPath.Enabled = False
|
||||
Me.btnBrowseCustomPuttyPath.Location = New System.Drawing.Point(373, 113)
|
||||
Me.btnBrowseCustomPuttyPath.Name = "btnBrowseCustomPuttyPath"
|
||||
Me.btnBrowseCustomPuttyPath.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnBrowseCustomPuttyPath.TabIndex = 23
|
||||
Me.btnBrowseCustomPuttyPath.Text = "Browse..."
|
||||
Me.btnBrowseCustomPuttyPath.UseVisualStyleBackColor = True
|
||||
'
|
||||
'AdvancedPage
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.Controls.Add(Me.chkWriteLogFile)
|
||||
Me.Controls.Add(Me.chkAutomaticallyGetSessionInfo)
|
||||
Me.Controls.Add(Me.lblXulRunnerPath)
|
||||
Me.Controls.Add(Me.lblMaximumPuttyWaitTime)
|
||||
Me.Controls.Add(Me.chkEncryptCompleteFile)
|
||||
Me.Controls.Add(Me.chkAutomaticReconnect)
|
||||
Me.Controls.Add(Me.btnBrowseXulRunnerPath)
|
||||
Me.Controls.Add(Me.numPuttyWaitTime)
|
||||
Me.Controls.Add(Me.chkUseCustomPuttyPath)
|
||||
Me.Controls.Add(Me.lblConfigurePuttySessions)
|
||||
Me.Controls.Add(Me.txtXULrunnerPath)
|
||||
Me.Controls.Add(Me.numUVNCSCPort)
|
||||
Me.Controls.Add(Me.txtCustomPuttyPath)
|
||||
Me.Controls.Add(Me.btnLaunchPutty)
|
||||
Me.Controls.Add(Me.lblUVNCSCPort)
|
||||
Me.Controls.Add(Me.lblSeconds)
|
||||
Me.Controls.Add(Me.btnBrowseCustomPuttyPath)
|
||||
Me.Name = "AdvancedPage"
|
||||
Me.PageIcon = CType(resources.GetObject("$this.PageIcon"), System.Drawing.Icon)
|
||||
Me.Size = New System.Drawing.Size(610, 489)
|
||||
CType(Me.numPuttyWaitTime, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.numUVNCSCPort, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents chkWriteLogFile As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkAutomaticallyGetSessionInfo As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents lblXulRunnerPath As System.Windows.Forms.Label
|
||||
Friend WithEvents lblMaximumPuttyWaitTime As System.Windows.Forms.Label
|
||||
Friend WithEvents chkEncryptCompleteFile As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkAutomaticReconnect As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents btnBrowseXulRunnerPath As System.Windows.Forms.Button
|
||||
Friend WithEvents numPuttyWaitTime As System.Windows.Forms.NumericUpDown
|
||||
Friend WithEvents chkUseCustomPuttyPath As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents lblConfigurePuttySessions As System.Windows.Forms.Label
|
||||
Friend WithEvents txtXULrunnerPath As System.Windows.Forms.TextBox
|
||||
Friend WithEvents numUVNCSCPort As System.Windows.Forms.NumericUpDown
|
||||
Friend WithEvents txtCustomPuttyPath As System.Windows.Forms.TextBox
|
||||
Friend WithEvents btnLaunchPutty As System.Windows.Forms.Button
|
||||
Friend WithEvents lblUVNCSCPort As System.Windows.Forms.Label
|
||||
Friend WithEvents lblSeconds As System.Windows.Forms.Label
|
||||
Friend WithEvents btnBrowseCustomPuttyPath As System.Windows.Forms.Button
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
@@ -117,4 +117,29 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.PageIcon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABsbGxjWFhYv1FRUb9SUlJjAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAb29vKW1tbQ5/f38CgICA6r29vf+ysrL/W1tb6n9/fwJbW1sOUFBQKQAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAgICAm25ubv1kZGTnenp6GYODg+fLy8v/x8fH/2JiYudbW1sZWFhY501N
|
||||
Tf1ISEibAAAAAAAAAAAAAAAAo6Oje7y8vP/e3t7/pqam/4KCgvSEhIT+xMTE/8LCwv9tbW3+bW1t9Kam
|
||||
pv/S0tL/gICA/1JSUnsAAAAAAAAAAKurq32lpaX+1dXV/8XFxf/Ly8v/0dHR/8nJyf/Hx8f/zMzM/8XF
|
||||
xf+9vb3/y8vL/25ubv5lZWV9AAAAAAAAAAAAAAAArKyshcXFxf/BwcH/xcXF/8fHx/+qqqr/p6en/8HB
|
||||
wf++vr7/tbW1/6qqqv9paWmFAAAAAAAAAACioqLNjo6O45+fn+7Pz8//xsbG/8zMzP+enp7GmZmZRJKS
|
||||
kkSOjo7GwcHB/7y8vP+5ubn/Y2Nj7ldXV+NTU1PNv7+//eLi4v/S0tL/xsbG/83Nzf+xsbH/kpKSRAAA
|
||||
AAAAAAAAlpaWRKioqP/CwsL/t7e3/8DAwP/S0tL/YGBg/cPDw/3p6en/1tbW/8nJyf/Ozs7/paWl/4OD
|
||||
g0QAAAAAAAAAAJmZmUSsrKz/xMTE/7q6uv/Gxsb/3d3d/2pqav3IyMjNw8PD47+/v+7Y2Nj/zc3N/7y8
|
||||
vP+CgoLGeHh4RH9/f0SOjo7Gw8PD/8LCwv/Nzc3/jIyM7oaGhuOCgoLNAAAAAAAAAADFxcWF1NTU/8zM
|
||||
zP/Jycn/urq6/5ycnP+hoaH/wsLC/8bGxv/BwcH/t7e3/4iIiIUAAAAAAAAAAAAAAADJycl9w8PD/tzc
|
||||
3P/U1NT/2dnZ/9vb2//W1tb/1NTU/9nZ2f/S0tL/y8vL/8jIyP95eXn+cHBwfQAAAAAAAAAAz8/Pe9zc
|
||||
3P/t7e3/29vb/8LCwvS9vb3+1tbW/9TU1P+vr6/+rKys9MvLy//n5+f/t7e3/4qKinsAAAAAAAAAAAAA
|
||||
AADQ0NCbzc3N/crKyufBwcEZwsLC597e3v/d3d3/sbGx562trRmsrKznp6en/aKiopsAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAANPT0ynIyMgO////AsfHx+rl5eX/5OTk/6ysrOp/f38Ctra2Dq6urikAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADLy8tjxsbGv8TExL++vr5jAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAA/n8AAPw/AADEIwAAwAMAAMADAADAAwAAAYAAAAPAAAADwAAAAYAAAMADAADAAwAAwAMAAMQj
|
||||
AAD8PwAA/n8AAA==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
171
mRemoteV1/Forms/OptionsPages/AdvancedPage.vb
Normal file
171
mRemoteV1/Forms/OptionsPages/AdvancedPage.vb
Normal file
@@ -0,0 +1,171 @@
|
||||
Imports System.IO
|
||||
Imports mRemoteNG.App.Info
|
||||
Imports mRemoteNG.My
|
||||
Imports mRemoteNG.Connection.Protocol
|
||||
Imports mRemoteNG.Tools
|
||||
Imports PSTaskDialog
|
||||
|
||||
Namespace Forms.OptionsPages
|
||||
Public Class AdvancedPage
|
||||
#Region "Public Methods"
|
||||
Public Overrides Property PageName() As String
|
||||
Get
|
||||
Return Language.strTabAdvanced
|
||||
End Get
|
||||
Set(value As String)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Overrides Sub ApplyLanguage()
|
||||
MyBase.ApplyLanguage()
|
||||
|
||||
lblSeconds.Text = Language.strLabelSeconds
|
||||
lblMaximumPuttyWaitTime.Text = Language.strLabelPuttyTimeout
|
||||
chkAutomaticReconnect.Text = Language.strCheckboxAutomaticReconnect
|
||||
lblConfigurePuttySessions.Text = Language.strLabelPuttySessionsConfig
|
||||
btnLaunchPutty.Text = Language.strButtonLaunchPutty
|
||||
btnBrowseCustomPuttyPath.Text = Language.strButtonBrowse
|
||||
chkUseCustomPuttyPath.Text = Language.strCheckboxPuttyPath
|
||||
chkAutomaticallyGetSessionInfo.Text = Language.strAutomaticallyGetSessionInfo
|
||||
chkWriteLogFile.Text = Language.strWriteLogFile
|
||||
lblUVNCSCPort.Text = Language.strUltraVNCSCListeningPort
|
||||
lblXulRunnerPath.Text = Language.strXULrunnerPath
|
||||
btnBrowseXulRunnerPath.Text = Language.strButtonBrowse
|
||||
chkEncryptCompleteFile.Text = Language.strEncryptCompleteConnectionFile
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub LoadSettings()
|
||||
MyBase.SaveSettings()
|
||||
|
||||
chkWriteLogFile.Checked = My.Settings.WriteLogFile
|
||||
chkEncryptCompleteFile.Checked = My.Settings.EncryptCompleteConnectionsFile
|
||||
chkAutomaticallyGetSessionInfo.Checked = My.Settings.AutomaticallyGetSessionInfo
|
||||
chkAutomaticReconnect.Checked = My.Settings.ReconnectOnDisconnect
|
||||
numPuttyWaitTime.Value = My.Settings.MaxPuttyWaitTime
|
||||
|
||||
chkUseCustomPuttyPath.Checked = MySettingsProperty.Settings.UseCustomPuttyPath
|
||||
txtCustomPuttyPath.Text = MySettingsProperty.Settings.CustomPuttyPath
|
||||
SetPuttyLaunchButtonEnabled()
|
||||
|
||||
numUVNCSCPort.Value = My.Settings.UVNCSCPort
|
||||
|
||||
txtXULrunnerPath.Text = My.Settings.XULRunnerPath
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub SaveSettings()
|
||||
MyBase.SaveSettings()
|
||||
|
||||
My.Settings.WriteLogFile = chkWriteLogFile.Checked
|
||||
My.Settings.EncryptCompleteConnectionsFile = chkEncryptCompleteFile.Checked
|
||||
My.Settings.AutomaticallyGetSessionInfo = chkAutomaticallyGetSessionInfo.Checked
|
||||
My.Settings.ReconnectOnDisconnect = chkAutomaticReconnect.Checked
|
||||
|
||||
Dim puttyPathChanged As Boolean = False
|
||||
If Not MySettingsProperty.Settings.CustomPuttyPath = txtCustomPuttyPath.Text Then
|
||||
puttyPathChanged = True
|
||||
MySettingsProperty.Settings.CustomPuttyPath = txtCustomPuttyPath.Text
|
||||
End If
|
||||
If Not MySettingsProperty.Settings.UseCustomPuttyPath = chkUseCustomPuttyPath.Checked Then
|
||||
puttyPathChanged = True
|
||||
MySettingsProperty.Settings.UseCustomPuttyPath = chkUseCustomPuttyPath.Checked
|
||||
End If
|
||||
If puttyPathChanged Then
|
||||
If MySettingsProperty.Settings.UseCustomPuttyPath Then
|
||||
PuttyBase.PuttyPath = MySettingsProperty.Settings.CustomPuttyPath
|
||||
Else
|
||||
PuttyBase.PuttyPath = General.PuttyPath
|
||||
End If
|
||||
Config.Putty.Sessions.AddSessionsToTree()
|
||||
End If
|
||||
|
||||
My.Settings.MaxPuttyWaitTime = numPuttyWaitTime.Value
|
||||
|
||||
My.Settings.UVNCSCPort = numUVNCSCPort.Value
|
||||
|
||||
My.Settings.XULRunnerPath = txtXULrunnerPath.Text
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "Private Methods"
|
||||
#Region "Event Handlers"
|
||||
Private Sub chkUseCustomPuttyPath_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) Handles chkUseCustomPuttyPath.CheckedChanged
|
||||
txtCustomPuttyPath.Enabled = chkUseCustomPuttyPath.Checked
|
||||
btnBrowseCustomPuttyPath.Enabled = chkUseCustomPuttyPath.Checked
|
||||
SetPuttyLaunchButtonEnabled()
|
||||
End Sub
|
||||
|
||||
Private Sub txtCustomPuttyPath_TextChanged(sender As Object, e As EventArgs) Handles txtCustomPuttyPath.TextChanged
|
||||
SetPuttyLaunchButtonEnabled()
|
||||
End Sub
|
||||
|
||||
Private Sub btnBrowseCustomPuttyPath_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnBrowseCustomPuttyPath.Click
|
||||
Using openFileDialog As New OpenFileDialog()
|
||||
With openFileDialog
|
||||
.Filter = String.Format("{0}|*.exe|{1}|*.*", Language.strFilterApplication, Language.strFilterAll)
|
||||
.FileName = Path.GetFileName(General.PuttyPath)
|
||||
.CheckFileExists = True
|
||||
.Multiselect = False
|
||||
|
||||
If .ShowDialog = DialogResult.OK Then
|
||||
txtCustomPuttyPath.Text = .FileName
|
||||
SetPuttyLaunchButtonEnabled()
|
||||
End If
|
||||
End With
|
||||
End Using
|
||||
End Sub
|
||||
|
||||
Private Sub btnLaunchPutty_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnLaunchPutty.Click
|
||||
Try
|
||||
Dim puttyProcess As New PuttyProcessController
|
||||
Dim fileName As String
|
||||
If chkUseCustomPuttyPath.Checked Then
|
||||
fileName = txtCustomPuttyPath.Text
|
||||
Else
|
||||
fileName = General.PuttyPath
|
||||
End If
|
||||
puttyProcess.Start(fileName)
|
||||
puttyProcess.SetControlText("Button", "&Cancel", "&Close")
|
||||
puttyProcess.SetControlVisible("Button", "&Open", False)
|
||||
puttyProcess.WaitForExit()
|
||||
Catch ex As Exception
|
||||
cTaskDialog.MessageBox(Application.Info.ProductName, Language.strErrorCouldNotLaunchPutty, "", ex.Message, "", "", eTaskDialogButtons.OK, eSysIcons.Error, Nothing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub btnBrowseXulRunnerPath_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnBrowseXulRunnerPath.Click
|
||||
Dim oDlg As New FolderBrowserDialog
|
||||
oDlg.ShowNewFolderButton = False
|
||||
|
||||
If oDlg.ShowDialog = DialogResult.OK Then
|
||||
txtXULrunnerPath.Text = oDlg.SelectedPath
|
||||
End If
|
||||
|
||||
oDlg.Dispose()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Private Sub SetPuttyLaunchButtonEnabled()
|
||||
Dim puttyPath As String
|
||||
If chkUseCustomPuttyPath.Checked Then
|
||||
puttyPath = txtCustomPuttyPath.Text
|
||||
Else
|
||||
puttyPath = General.PuttyPath
|
||||
End If
|
||||
|
||||
Dim exists As Boolean = False
|
||||
Try
|
||||
exists = File.Exists(puttyPath)
|
||||
Catch
|
||||
End Try
|
||||
|
||||
If exists Then
|
||||
lblConfigurePuttySessions.Enabled = True
|
||||
btnLaunchPutty.Enabled = True
|
||||
Else
|
||||
lblConfigurePuttySessions.Enabled = False
|
||||
btnLaunchPutty.Enabled = False
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
End Namespace
|
||||
130
mRemoteV1/Forms/OptionsPages/AppearancePage.Designer.vb
generated
Normal file
130
mRemoteV1/Forms/OptionsPages/AppearancePage.Designer.vb
generated
Normal file
@@ -0,0 +1,130 @@
|
||||
Namespace Forms.OptionsPages
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class AppearancePage
|
||||
Inherits OptionsPage
|
||||
|
||||
'UserControl 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()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(AppearancePage))
|
||||
Me.lblLanguageRestartRequired = New System.Windows.Forms.Label()
|
||||
Me.cboLanguage = New System.Windows.Forms.ComboBox()
|
||||
Me.lblLanguage = New System.Windows.Forms.Label()
|
||||
Me.chkShowFullConnectionsFilePathInTitle = New System.Windows.Forms.CheckBox()
|
||||
Me.chkShowDescriptionTooltipsInTree = New System.Windows.Forms.CheckBox()
|
||||
Me.chkShowSystemTrayIcon = New System.Windows.Forms.CheckBox()
|
||||
Me.chkMinimizeToSystemTray = New System.Windows.Forms.CheckBox()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'lblLanguageRestartRequired
|
||||
'
|
||||
Me.lblLanguageRestartRequired.AutoSize = True
|
||||
Me.lblLanguageRestartRequired.Location = New System.Drawing.Point(3, 56)
|
||||
Me.lblLanguageRestartRequired.Name = "lblLanguageRestartRequired"
|
||||
Me.lblLanguageRestartRequired.Size = New System.Drawing.Size(380, 13)
|
||||
Me.lblLanguageRestartRequired.TabIndex = 9
|
||||
Me.lblLanguageRestartRequired.Text = "mRemoteNG must be restarted before changes to the language will take effect."
|
||||
'
|
||||
'cboLanguage
|
||||
'
|
||||
Me.cboLanguage.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.cboLanguage.FormattingEnabled = True
|
||||
Me.cboLanguage.Location = New System.Drawing.Point(3, 24)
|
||||
Me.cboLanguage.Name = "cboLanguage"
|
||||
Me.cboLanguage.Size = New System.Drawing.Size(304, 21)
|
||||
Me.cboLanguage.Sorted = True
|
||||
Me.cboLanguage.TabIndex = 8
|
||||
'
|
||||
'lblLanguage
|
||||
'
|
||||
Me.lblLanguage.AutoSize = True
|
||||
Me.lblLanguage.Location = New System.Drawing.Point(3, 0)
|
||||
Me.lblLanguage.Name = "lblLanguage"
|
||||
Me.lblLanguage.Size = New System.Drawing.Size(55, 13)
|
||||
Me.lblLanguage.TabIndex = 7
|
||||
Me.lblLanguage.Text = "Language"
|
||||
'
|
||||
'chkShowFullConnectionsFilePathInTitle
|
||||
'
|
||||
Me.chkShowFullConnectionsFilePathInTitle.AutoSize = True
|
||||
Me.chkShowFullConnectionsFilePathInTitle.Location = New System.Drawing.Point(3, 141)
|
||||
Me.chkShowFullConnectionsFilePathInTitle.Name = "chkShowFullConnectionsFilePathInTitle"
|
||||
Me.chkShowFullConnectionsFilePathInTitle.Size = New System.Drawing.Size(239, 17)
|
||||
Me.chkShowFullConnectionsFilePathInTitle.TabIndex = 11
|
||||
Me.chkShowFullConnectionsFilePathInTitle.Text = "Show full connections file path in window title"
|
||||
Me.chkShowFullConnectionsFilePathInTitle.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkShowDescriptionTooltipsInTree
|
||||
'
|
||||
Me.chkShowDescriptionTooltipsInTree.AutoSize = True
|
||||
Me.chkShowDescriptionTooltipsInTree.Location = New System.Drawing.Point(3, 118)
|
||||
Me.chkShowDescriptionTooltipsInTree.Name = "chkShowDescriptionTooltipsInTree"
|
||||
Me.chkShowDescriptionTooltipsInTree.Size = New System.Drawing.Size(231, 17)
|
||||
Me.chkShowDescriptionTooltipsInTree.TabIndex = 10
|
||||
Me.chkShowDescriptionTooltipsInTree.Text = "Show description tooltips in connection tree"
|
||||
Me.chkShowDescriptionTooltipsInTree.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkShowSystemTrayIcon
|
||||
'
|
||||
Me.chkShowSystemTrayIcon.AutoSize = True
|
||||
Me.chkShowSystemTrayIcon.Location = New System.Drawing.Point(3, 187)
|
||||
Me.chkShowSystemTrayIcon.Name = "chkShowSystemTrayIcon"
|
||||
Me.chkShowSystemTrayIcon.Size = New System.Drawing.Size(172, 17)
|
||||
Me.chkShowSystemTrayIcon.TabIndex = 12
|
||||
Me.chkShowSystemTrayIcon.Text = "Always show System Tray Icon"
|
||||
Me.chkShowSystemTrayIcon.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkMinimizeToSystemTray
|
||||
'
|
||||
Me.chkMinimizeToSystemTray.AutoSize = True
|
||||
Me.chkMinimizeToSystemTray.Location = New System.Drawing.Point(3, 210)
|
||||
Me.chkMinimizeToSystemTray.Name = "chkMinimizeToSystemTray"
|
||||
Me.chkMinimizeToSystemTray.Size = New System.Drawing.Size(139, 17)
|
||||
Me.chkMinimizeToSystemTray.TabIndex = 13
|
||||
Me.chkMinimizeToSystemTray.Text = "Minimize to System Tray"
|
||||
Me.chkMinimizeToSystemTray.UseVisualStyleBackColor = True
|
||||
'
|
||||
'AppearancePage
|
||||
'
|
||||
Me.Controls.Add(Me.lblLanguageRestartRequired)
|
||||
Me.Controls.Add(Me.cboLanguage)
|
||||
Me.Controls.Add(Me.lblLanguage)
|
||||
Me.Controls.Add(Me.chkShowFullConnectionsFilePathInTitle)
|
||||
Me.Controls.Add(Me.chkShowDescriptionTooltipsInTree)
|
||||
Me.Controls.Add(Me.chkShowSystemTrayIcon)
|
||||
Me.Controls.Add(Me.chkMinimizeToSystemTray)
|
||||
Me.Name = "AppearancePage"
|
||||
Me.PageIcon = CType(resources.GetObject("$this.PageIcon"), System.Drawing.Icon)
|
||||
Me.Size = New System.Drawing.Size(610, 489)
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents Label1 As System.Windows.Forms.Label
|
||||
Friend WithEvents lblLanguageRestartRequired As System.Windows.Forms.Label
|
||||
Friend WithEvents cboLanguage As System.Windows.Forms.ComboBox
|
||||
Friend WithEvents lblLanguage As System.Windows.Forms.Label
|
||||
Friend WithEvents chkShowFullConnectionsFilePathInTitle As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkShowDescriptionTooltipsInTree As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkShowSystemTrayIcon As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkMinimizeToSystemTray As System.Windows.Forms.CheckBox
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
188
mRemoteV1/Forms/OptionsPages/AppearancePage.resx
Normal file
188
mRemoteV1/Forms/OptionsPages/AppearancePage.resx
Normal file
@@ -0,0 +1,188 @@
|
||||
<?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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.PageIcon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAQAEBAQAAEABAAoAQAARgAAABAQAAABAAgAaAUAAG4BAAAQEAAAAQAYAGgDAADWBgAAEBAAAAEA
|
||||
IABoBAAAPgoAACgAAAAQAAAAIAAAAAEABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAr2guAK90
|
||||
TwA+kkMASp9QAHDJegC+gVkAuY51AMiKWgDLlGcA1KR7ANSpiQDhvJ0A7MKaAP369wD///8AAAAAAAAA
|
||||
AAAMpiIiIiIicAn///////8gBvER9ERDPyAG8aH0VVU/IAjxofRVVT8gCPGh9FVVPyAI8qH0VVVPIAj2
|
||||
IvRERE9gCP///////2AJ/d3d3d3fYAn93d3d3d9gCv3d3d3d35AM////////sADKmZiZmbuwAAAAAAAA
|
||||
AAD//wAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAMAB
|
||||
AAD//wAAKAAAABAAAAAgAAAAAQAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACsYyoArmYrALFr
|
||||
LQCzbTIAtXI3ALZ1PwCmbUwAp3BOAKpwTgCscU4AsHNPALl7SQC5fEsAqHVVAKt3WACydVAAtXZRALh5
|
||||
UgC7flMAu31UAD2SQgA/k0QAQJRFAEOXSABDmEgARZpLAEabTABJnk8AS6BRAEyhUgBOo1QAT6RVAFCl
|
||||
VgBRp1gAVapcAG3HdwBuyHkAcMl7AHLKfAC9gFYAv4JdALmOdQDAglcAw4VZAMWGWQDJiloAy41cAMyP
|
||||
XgDNkV4Axo5kAMePagDLkGAAzZFgAM+WZwDOlGgAzZ5zAM2fdADVonYA0KR9ANenfgDPoYQA0aWCANSn
|
||||
ggDWqokA2K2KANm1nwDhvJ0A7cOaAOPBpAD02sAA////ABH/WwAx/3EAUf+HAHH/nQCR/7IAsf/JANH/
|
||||
3wD///8AAAAAAAIvAAAEUAAABnAAAAiQAAAKsAAAC88AAA7wAAAg/xIAPf8xAFv/UQB5/3EAmP+RALX/
|
||||
sQDU/9EA////AAAAAAAULwAAIlAAADBwAAA9kAAATLAAAFnPAABn8AAAeP8RAIr/MQCc/1EArv9xAMD/
|
||||
kQDS/7EA5P/RAP///wAAAAAAJi8AAEBQAABacAAAdJAAAI6wAACpzwAAwvAAANH/EQDY/zEA3v9RAOP/
|
||||
cQDp/5EA7/+xAPb/0QD///8AAAAAAC8mAABQQQAAcFsAAJB0AACwjgAAz6kAAPDDAAD/0hEA/9gxAP/d
|
||||
UQD/5HEA/+qRAP/wsQD/9tEA////AAAAAAAvFAAAUCIAAHAwAACQPgAAsE0AAM9bAADwaQAA/3kRAP+K
|
||||
MQD/nVEA/69xAP/BkQD/0rEA/+XRAP///wAAAAAALwMAAFAEAABwBgAAkAkAALAKAADPDAAA8A4AAP8g
|
||||
EgD/PjEA/1xRAP96cQD/l5EA/7axAP/U0QD///8AAAAAAC8ADgBQABcAcAAhAJAAKwCwADYAzwBAAPAA
|
||||
SQD/EVoA/zFwAP9RhgD/cZwA/5GyAP+xyAD/0d8A////AAAAAAAvACAAUAA2AHAATACQAGIAsAB4AM8A
|
||||
jgDwAKQA/xGzAP8xvgD/UccA/3HRAP+R3AD/seUA/9HwAP///wAAAAAALAAvAEsAUABpAHAAhwCQAKUA
|
||||
sADEAM8A4QDwAPAR/wDyMf8A9FH/APZx/wD3kf8A+bH/APvR/wD///8AAAAAABsALwAtAFAAPwBwAFIA
|
||||
kABjALAAdgDPAIgA8ACZEf8ApjH/ALRR/wDCcf8Az5H/ANyx/wDr0f8A////AAAAAAAIAC8ADgBQABUA
|
||||
cAAbAJAAIQCwACYAzwAsAPAAPhH/AFgx/wBxUf8AjHH/AKaR/wC/sf8A2tH/AP///wAAAAAAAAAAAAAA
|
||||
AAAAAAAAAEI9KRIREAsKCQcHBw4qAAAzR0dHR0dHR0dHR0dHDwAAK0cCAQFHIyEdGxgWRwcAACxHAjgB
|
||||
RxwmJiUkFUcIAAAsRwI5AUceJycmJRdHCgAALUcEOwNHICcnJiYZRxAAAC5HBj4FRyInJyYmG0cRAAAu
|
||||
RxMNDEcaIiEfHhxHEgAAL0dHR0dHR0dHR0dHRxQAADVHREREREREREREREcoAAA2R0RGRkZGRkZGRkRH
|
||||
KwAAOkdERERERERERERERzIAAENHR0dHR0dHR0dHR0dAAAAARTwxMTEwNTU0Nz9BQAAAAAAAAAAAAAAA
|
||||
AAAAAAAA//8AAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIAB
|
||||
AADAAQAA//8AACgAAAAQAAAAIAAAAAEAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADZtZ/PoYS/gl25eFK1dlCzdVCw
|
||||
c0+scU6pcE6nbk2mbUylbUyodVW5jnUAAAAAAADHj2r/////////////////////////////////////
|
||||
//////////+rd1gAAAAAAADBgVf///+uZiusYyqsYyr///9VqlxQpVZLoFFGm0tDl0g/k0T///+mbk0A
|
||||
AAAAAADDhVn///+uZivNnnOsYyr///9Knk9vyXpvyXpuyHltx3c9kkL///+ncE4AAAAAAADEhVr///+u
|
||||
ZivNn3SsYyr///9NolNyynxxynxwyXtuyHlAlEX///+rcU8AAAAAAADHh1n///+zbTLQpH2xay3///9P
|
||||
pFVzy31yy3xxyntvyXpDmEj///+xdVAAAAAAAADIiVr///+2dT/RpYK1cjf///9Rp1hyy3xyy3xxyntv
|
||||
yXpGm0z///+1d1IAAAAAAADKi1v///+7flO5fEu5e0n///9FmktSp1hQpVZOo1RMoVJJnk////+4e1MA
|
||||
AAAAAADLjVz///////////////////////////////////////////////+7fVQAAAAAAADNkWD////t
|
||||
w5rtw5rtw5rtw5rtw5rtw5rtw5rtw5rtw5rtw5r///+9gFYAAAAAAADPlmf////tw5v02sD02sD028H0
|
||||
28H028H028H028H028Htw5r////Ag1cAAAAAAADVonb////tw5vtw5vtw5vtw5rtw5rtw5rtw5rtw5rt
|
||||
w5rtw5r////GjmQAAAAAAADhvJ3////////////////////////////////////////////////WqYgA
|
||||
AAAAAAAAAADjwaTXp37Okl7Nkl7NkV7Mj17NkWDNkmLLkGDOlGjUp4LYrYrXq4oAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//5xBgAGcQYABnEGAAZxBgAGcQYAB
|
||||
nEGAAZxBgAGcQYABnEGAAZxBgAGcQYABnEGAAZxBgAGcQcABnEH//5xBKAAAABAAAAAgAAAAAQAgAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAvXxUj7x7U7W7elLuuXhS/7V2UP+zdVD/sHNP/6xx
|
||||
Tv+pcE7/p25N/6ZtTP+lbUz+o21M8aVtTMQAAAAAAAAAAL9/VN7/////////////////////////////
|
||||
//////////////////////////////////+lbUztAAAAAAAAAADBgVf+/////65mK/+sYyr/rGMq////
|
||||
//9Vqlz/UKVW/0ugUf9Gm0v/Q5dI/z+TRP//////pm5N/gAAAAAAAAAAw4VZ//////+uZiv/zZ5z/6xj
|
||||
Kv//////Sp5P/2/Jev9vyXr/bsh5/23Hd/89kkL//////6dwTv8AAAAAAAAAAMSFWv//////rmYr/82f
|
||||
dP+sYyr//////02iU/9yynz/ccp8/3DJe/9uyHn/QJRF//////+rcU//AAAAAAAAAADHh1n//////7Nt
|
||||
Mv/QpH3/sWst//////9PpFX/c8t9/3LLfP9xynv/b8l6/0OYSP//////sXVQ/wAAAAAAAAAAyIla////
|
||||
//+2dT//0aWC/7VyN///////UadY/3LLfP9yy3z/ccp7/2/Jev9Gm0z//////7V3Uv8AAAAAAAAAAMqL
|
||||
W///////u35T/7l8S/+5e0n//////0WaS/9Sp1j/UKVW/06jVP9MoVL/SZ5P//////+4e1P/AAAAAAAA
|
||||
AADLjVz+////////////////////////////////////////////////////////////////u31U/wAA
|
||||
AAAAAAAAzI9d+v/////tw5r/7cOa/+3Dmv/tw5r/7cOa/+3Dmv/tw5r/7cOa/+3Dmv/tw5r//////72A
|
||||
Vv8AAAAAAAAAAM2QXvD/////7cOb//TawP/02sD/9NvB//Tbwf/028H/9NvB//Tbwf/028H/7cOa////
|
||||
///Ag1f+AAAAAAAAAADOkl7Y/////+3Dm//tw5v/7cOb/+3Dmv/tw5r/7cOa/+3Dmv/tw5r/7cOa/+3D
|
||||
mv//////xYtg+AAAAAAAAAAAzpJem///////////////////////////////////////////////////
|
||||
/////////////9apiP8AAAAAAAAAAM6SXnHOkl6QzpJezM6SXv/Nkl7+zZFe/8yPXv/NkWD/zZJi/8uQ
|
||||
YP/LjV7vypFjy9itiv/Xq4r/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//5xBgAGcQYABnEGAAZxBgAGcQYABnEGAAZxBgAGcQYAB
|
||||
nEGAAZxBgAGcQYABnEGAAZxBgAGcQYABnEH//5xB
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
75
mRemoteV1/Forms/OptionsPages/AppearancePage.vb
Normal file
75
mRemoteV1/Forms/OptionsPages/AppearancePage.vb
Normal file
@@ -0,0 +1,75 @@
|
||||
Imports mRemoteNG.App
|
||||
Imports mRemoteNG.My
|
||||
|
||||
Namespace Forms.OptionsPages
|
||||
Public Class AppearancePage
|
||||
Public Overrides Property PageName() As String
|
||||
Get
|
||||
Return Language.strTabAppearance
|
||||
End Get
|
||||
Set(value As String)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Overrides Sub ApplyLanguage()
|
||||
MyBase.ApplyLanguage()
|
||||
|
||||
lblLanguage.Text = Language.strLanguage
|
||||
lblLanguageRestartRequired.Text = String.Format(Language.strLanguageRestartRequired, Application.Info.ProductName)
|
||||
chkShowDescriptionTooltipsInTree.Text = Language.strShowDescriptionTooltips
|
||||
chkShowFullConnectionsFilePathInTitle.Text = Language.strShowFullConsFilePath
|
||||
chkShowSystemTrayIcon.Text = Language.strAlwaysShowSysTrayIcon
|
||||
chkMinimizeToSystemTray.Text = Language.strMinimizeToSysTray
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub LoadSettings()
|
||||
MyBase.SaveSettings()
|
||||
|
||||
cboLanguage.Items.Clear()
|
||||
cboLanguage.Items.Add(Language.strLanguageDefault)
|
||||
|
||||
For Each nativeName As String In SupportedCultures.CultureNativeNames
|
||||
cboLanguage.Items.Add(nativeName)
|
||||
Next
|
||||
If Not String.IsNullOrEmpty(Settings.OverrideUICulture) AndAlso SupportedCultures.IsNameSupported(Settings.OverrideUICulture) Then
|
||||
cboLanguage.SelectedItem = SupportedCultures.CultureNativeName(Settings.OverrideUICulture)
|
||||
End If
|
||||
If cboLanguage.SelectedIndex = -1 Then
|
||||
cboLanguage.SelectedIndex = 0
|
||||
End If
|
||||
|
||||
chkShowDescriptionTooltipsInTree.Checked = Settings.ShowDescriptionTooltipsInTree
|
||||
chkShowFullConnectionsFilePathInTitle.Checked = Settings.ShowCompleteConsPathInTitle
|
||||
chkShowSystemTrayIcon.Checked = Settings.ShowSystemTrayIcon
|
||||
chkMinimizeToSystemTray.Checked = Settings.MinimizeToTray
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub SaveSettings()
|
||||
MyBase.SaveSettings()
|
||||
|
||||
If cboLanguage.SelectedIndex > 0 And SupportedCultures.IsNativeNameSupported(cboLanguage.SelectedItem) Then
|
||||
Settings.OverrideUICulture = SupportedCultures.CultureName(cboLanguage.SelectedItem)
|
||||
Else
|
||||
Settings.OverrideUICulture = String.Empty
|
||||
End If
|
||||
|
||||
Settings.ShowDescriptionTooltipsInTree = chkShowDescriptionTooltipsInTree.Checked
|
||||
Settings.ShowCompleteConsPathInTitle = chkShowFullConnectionsFilePathInTitle.Checked
|
||||
frmMain.ShowFullPathInTitle = chkShowFullConnectionsFilePathInTitle.Checked
|
||||
|
||||
Settings.ShowSystemTrayIcon = chkShowSystemTrayIcon.Checked
|
||||
If Settings.ShowSystemTrayIcon Then
|
||||
If Runtime.NotificationAreaIcon Is Nothing Then
|
||||
Runtime.NotificationAreaIcon = New Tools.Controls.NotificationAreaIcon
|
||||
End If
|
||||
Else
|
||||
If Runtime.NotificationAreaIcon IsNot Nothing Then
|
||||
Runtime.NotificationAreaIcon.Dispose()
|
||||
Runtime.NotificationAreaIcon = Nothing
|
||||
End If
|
||||
End If
|
||||
|
||||
Settings.MinimizeToTray = chkMinimizeToSystemTray.Checked
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
394
mRemoteV1/Forms/OptionsPages/ConnectionsPage.Designer.vb
generated
Normal file
394
mRemoteV1/Forms/OptionsPages/ConnectionsPage.Designer.vb
generated
Normal file
@@ -0,0 +1,394 @@
|
||||
Namespace Forms.OptionsPages
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class ConnectionsPage
|
||||
Inherits OptionsPage
|
||||
|
||||
'UserControl 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()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(ConnectionsPage))
|
||||
Me.pnlRdpReconnectionCount = New System.Windows.Forms.Panel()
|
||||
Me.lblRdpReconnectionCount = New System.Windows.Forms.Label()
|
||||
Me.numRdpReconnectionCount = New System.Windows.Forms.NumericUpDown()
|
||||
Me.chkSingleClickOnConnectionOpensIt = New System.Windows.Forms.CheckBox()
|
||||
Me.chkHostnameLikeDisplayName = New System.Windows.Forms.CheckBox()
|
||||
Me.pnlDefaultCredentials = New System.Windows.Forms.Panel()
|
||||
Me.radCredentialsCustom = New System.Windows.Forms.RadioButton()
|
||||
Me.lblDefaultCredentials = New System.Windows.Forms.Label()
|
||||
Me.radCredentialsNoInfo = New System.Windows.Forms.RadioButton()
|
||||
Me.radCredentialsWindows = New System.Windows.Forms.RadioButton()
|
||||
Me.txtCredentialsDomain = New System.Windows.Forms.TextBox()
|
||||
Me.lblCredentialsUsername = New System.Windows.Forms.Label()
|
||||
Me.txtCredentialsPassword = New System.Windows.Forms.TextBox()
|
||||
Me.lblCredentialsPassword = New System.Windows.Forms.Label()
|
||||
Me.txtCredentialsUsername = New System.Windows.Forms.TextBox()
|
||||
Me.lblCredentialsDomain = New System.Windows.Forms.Label()
|
||||
Me.chkSingleClickOnOpenedConnectionSwitchesToIt = New System.Windows.Forms.CheckBox()
|
||||
Me.pnlAutoSave = New System.Windows.Forms.Panel()
|
||||
Me.lblAutoSave1 = New System.Windows.Forms.Label()
|
||||
Me.numAutoSave = New System.Windows.Forms.NumericUpDown()
|
||||
Me.lblAutoSave2 = New System.Windows.Forms.Label()
|
||||
Me.pnlConfirmCloseConnection = New System.Windows.Forms.Panel()
|
||||
Me.lblClosingConnections = New System.Windows.Forms.Label()
|
||||
Me.radCloseWarnAll = New System.Windows.Forms.RadioButton()
|
||||
Me.radCloseWarnMultiple = New System.Windows.Forms.RadioButton()
|
||||
Me.radCloseWarnExit = New System.Windows.Forms.RadioButton()
|
||||
Me.radCloseWarnNever = New System.Windows.Forms.RadioButton()
|
||||
Me.pnlRdpReconnectionCount.SuspendLayout()
|
||||
CType(Me.numRdpReconnectionCount, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.pnlDefaultCredentials.SuspendLayout()
|
||||
Me.pnlAutoSave.SuspendLayout()
|
||||
CType(Me.numAutoSave, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.pnlConfirmCloseConnection.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'pnlRdpReconnectionCount
|
||||
'
|
||||
Me.pnlRdpReconnectionCount.Controls.Add(Me.lblRdpReconnectionCount)
|
||||
Me.pnlRdpReconnectionCount.Controls.Add(Me.numRdpReconnectionCount)
|
||||
Me.pnlRdpReconnectionCount.Location = New System.Drawing.Point(3, 69)
|
||||
Me.pnlRdpReconnectionCount.Name = "pnlRdpReconnectionCount"
|
||||
Me.pnlRdpReconnectionCount.Size = New System.Drawing.Size(596, 29)
|
||||
Me.pnlRdpReconnectionCount.TabIndex = 10
|
||||
'
|
||||
'lblRdpReconnectionCount
|
||||
'
|
||||
Me.lblRdpReconnectionCount.Location = New System.Drawing.Point(6, 9)
|
||||
Me.lblRdpReconnectionCount.Name = "lblRdpReconnectionCount"
|
||||
Me.lblRdpReconnectionCount.Size = New System.Drawing.Size(288, 13)
|
||||
Me.lblRdpReconnectionCount.TabIndex = 0
|
||||
Me.lblRdpReconnectionCount.Text = "RDP Reconnection Count"
|
||||
Me.lblRdpReconnectionCount.TextAlign = System.Drawing.ContentAlignment.TopRight
|
||||
'
|
||||
'numRdpReconnectionCount
|
||||
'
|
||||
Me.numRdpReconnectionCount.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.numRdpReconnectionCount.Location = New System.Drawing.Point(300, 7)
|
||||
Me.numRdpReconnectionCount.Maximum = New Decimal(New Integer() {20, 0, 0, 0})
|
||||
Me.numRdpReconnectionCount.Name = "numRdpReconnectionCount"
|
||||
Me.numRdpReconnectionCount.Size = New System.Drawing.Size(53, 20)
|
||||
Me.numRdpReconnectionCount.TabIndex = 1
|
||||
Me.numRdpReconnectionCount.Value = New Decimal(New Integer() {5, 0, 0, 0})
|
||||
'
|
||||
'chkSingleClickOnConnectionOpensIt
|
||||
'
|
||||
Me.chkSingleClickOnConnectionOpensIt.AutoSize = True
|
||||
Me.chkSingleClickOnConnectionOpensIt.Location = New System.Drawing.Point(3, 0)
|
||||
Me.chkSingleClickOnConnectionOpensIt.Name = "chkSingleClickOnConnectionOpensIt"
|
||||
Me.chkSingleClickOnConnectionOpensIt.Size = New System.Drawing.Size(191, 17)
|
||||
Me.chkSingleClickOnConnectionOpensIt.TabIndex = 7
|
||||
Me.chkSingleClickOnConnectionOpensIt.Text = "Single click on connection opens it"
|
||||
Me.chkSingleClickOnConnectionOpensIt.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkHostnameLikeDisplayName
|
||||
'
|
||||
Me.chkHostnameLikeDisplayName.AutoSize = True
|
||||
Me.chkHostnameLikeDisplayName.Location = New System.Drawing.Point(3, 46)
|
||||
Me.chkHostnameLikeDisplayName.Name = "chkHostnameLikeDisplayName"
|
||||
Me.chkHostnameLikeDisplayName.Size = New System.Drawing.Size(328, 17)
|
||||
Me.chkHostnameLikeDisplayName.TabIndex = 9
|
||||
Me.chkHostnameLikeDisplayName.Text = "Set hostname like display name when creating new connections"
|
||||
Me.chkHostnameLikeDisplayName.UseVisualStyleBackColor = True
|
||||
'
|
||||
'pnlDefaultCredentials
|
||||
'
|
||||
Me.pnlDefaultCredentials.Controls.Add(Me.radCredentialsCustom)
|
||||
Me.pnlDefaultCredentials.Controls.Add(Me.lblDefaultCredentials)
|
||||
Me.pnlDefaultCredentials.Controls.Add(Me.radCredentialsNoInfo)
|
||||
Me.pnlDefaultCredentials.Controls.Add(Me.radCredentialsWindows)
|
||||
Me.pnlDefaultCredentials.Controls.Add(Me.txtCredentialsDomain)
|
||||
Me.pnlDefaultCredentials.Controls.Add(Me.lblCredentialsUsername)
|
||||
Me.pnlDefaultCredentials.Controls.Add(Me.txtCredentialsPassword)
|
||||
Me.pnlDefaultCredentials.Controls.Add(Me.lblCredentialsPassword)
|
||||
Me.pnlDefaultCredentials.Controls.Add(Me.txtCredentialsUsername)
|
||||
Me.pnlDefaultCredentials.Controls.Add(Me.lblCredentialsDomain)
|
||||
Me.pnlDefaultCredentials.Location = New System.Drawing.Point(3, 139)
|
||||
Me.pnlDefaultCredentials.Name = "pnlDefaultCredentials"
|
||||
Me.pnlDefaultCredentials.Size = New System.Drawing.Size(596, 175)
|
||||
Me.pnlDefaultCredentials.TabIndex = 12
|
||||
'
|
||||
'radCredentialsCustom
|
||||
'
|
||||
Me.radCredentialsCustom.AutoSize = True
|
||||
Me.radCredentialsCustom.Location = New System.Drawing.Point(16, 69)
|
||||
Me.radCredentialsCustom.Name = "radCredentialsCustom"
|
||||
Me.radCredentialsCustom.Size = New System.Drawing.Size(87, 17)
|
||||
Me.radCredentialsCustom.TabIndex = 3
|
||||
Me.radCredentialsCustom.Text = "the following:"
|
||||
Me.radCredentialsCustom.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblDefaultCredentials
|
||||
'
|
||||
Me.lblDefaultCredentials.AutoSize = True
|
||||
Me.lblDefaultCredentials.Location = New System.Drawing.Point(3, 9)
|
||||
Me.lblDefaultCredentials.Name = "lblDefaultCredentials"
|
||||
Me.lblDefaultCredentials.Size = New System.Drawing.Size(257, 13)
|
||||
Me.lblDefaultCredentials.TabIndex = 0
|
||||
Me.lblDefaultCredentials.Text = "For empty Username, Password or Domain fields use:"
|
||||
'
|
||||
'radCredentialsNoInfo
|
||||
'
|
||||
Me.radCredentialsNoInfo.AutoSize = True
|
||||
Me.radCredentialsNoInfo.Checked = True
|
||||
Me.radCredentialsNoInfo.Location = New System.Drawing.Point(16, 31)
|
||||
Me.radCredentialsNoInfo.Name = "radCredentialsNoInfo"
|
||||
Me.radCredentialsNoInfo.Size = New System.Drawing.Size(91, 17)
|
||||
Me.radCredentialsNoInfo.TabIndex = 1
|
||||
Me.radCredentialsNoInfo.TabStop = True
|
||||
Me.radCredentialsNoInfo.Text = "no information"
|
||||
Me.radCredentialsNoInfo.UseVisualStyleBackColor = True
|
||||
'
|
||||
'radCredentialsWindows
|
||||
'
|
||||
Me.radCredentialsWindows.AutoSize = True
|
||||
Me.radCredentialsWindows.Location = New System.Drawing.Point(16, 50)
|
||||
Me.radCredentialsWindows.Name = "radCredentialsWindows"
|
||||
Me.radCredentialsWindows.Size = New System.Drawing.Size(227, 17)
|
||||
Me.radCredentialsWindows.TabIndex = 2
|
||||
Me.radCredentialsWindows.Text = "my current credentials (windows logon info)"
|
||||
Me.radCredentialsWindows.UseVisualStyleBackColor = True
|
||||
'
|
||||
'txtCredentialsDomain
|
||||
'
|
||||
Me.txtCredentialsDomain.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.txtCredentialsDomain.Enabled = False
|
||||
Me.txtCredentialsDomain.Location = New System.Drawing.Point(140, 147)
|
||||
Me.txtCredentialsDomain.Name = "txtCredentialsDomain"
|
||||
Me.txtCredentialsDomain.Size = New System.Drawing.Size(150, 20)
|
||||
Me.txtCredentialsDomain.TabIndex = 9
|
||||
'
|
||||
'lblCredentialsUsername
|
||||
'
|
||||
Me.lblCredentialsUsername.Enabled = False
|
||||
Me.lblCredentialsUsername.Location = New System.Drawing.Point(37, 95)
|
||||
Me.lblCredentialsUsername.Name = "lblCredentialsUsername"
|
||||
Me.lblCredentialsUsername.Size = New System.Drawing.Size(97, 13)
|
||||
Me.lblCredentialsUsername.TabIndex = 4
|
||||
Me.lblCredentialsUsername.Text = "Username:"
|
||||
Me.lblCredentialsUsername.TextAlign = System.Drawing.ContentAlignment.TopRight
|
||||
'
|
||||
'txtCredentialsPassword
|
||||
'
|
||||
Me.txtCredentialsPassword.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.txtCredentialsPassword.Enabled = False
|
||||
Me.txtCredentialsPassword.Location = New System.Drawing.Point(140, 120)
|
||||
Me.txtCredentialsPassword.Name = "txtCredentialsPassword"
|
||||
Me.txtCredentialsPassword.Size = New System.Drawing.Size(150, 20)
|
||||
Me.txtCredentialsPassword.TabIndex = 7
|
||||
Me.txtCredentialsPassword.UseSystemPasswordChar = True
|
||||
'
|
||||
'lblCredentialsPassword
|
||||
'
|
||||
Me.lblCredentialsPassword.Enabled = False
|
||||
Me.lblCredentialsPassword.Location = New System.Drawing.Point(34, 123)
|
||||
Me.lblCredentialsPassword.Name = "lblCredentialsPassword"
|
||||
Me.lblCredentialsPassword.Size = New System.Drawing.Size(100, 13)
|
||||
Me.lblCredentialsPassword.TabIndex = 6
|
||||
Me.lblCredentialsPassword.Text = "Password:"
|
||||
Me.lblCredentialsPassword.TextAlign = System.Drawing.ContentAlignment.TopRight
|
||||
'
|
||||
'txtCredentialsUsername
|
||||
'
|
||||
Me.txtCredentialsUsername.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.txtCredentialsUsername.Enabled = False
|
||||
Me.txtCredentialsUsername.Location = New System.Drawing.Point(140, 93)
|
||||
Me.txtCredentialsUsername.Name = "txtCredentialsUsername"
|
||||
Me.txtCredentialsUsername.Size = New System.Drawing.Size(150, 20)
|
||||
Me.txtCredentialsUsername.TabIndex = 5
|
||||
'
|
||||
'lblCredentialsDomain
|
||||
'
|
||||
Me.lblCredentialsDomain.Enabled = False
|
||||
Me.lblCredentialsDomain.Location = New System.Drawing.Point(34, 150)
|
||||
Me.lblCredentialsDomain.Name = "lblCredentialsDomain"
|
||||
Me.lblCredentialsDomain.Size = New System.Drawing.Size(100, 13)
|
||||
Me.lblCredentialsDomain.TabIndex = 8
|
||||
Me.lblCredentialsDomain.Text = "Domain:"
|
||||
Me.lblCredentialsDomain.TextAlign = System.Drawing.ContentAlignment.TopRight
|
||||
'
|
||||
'chkSingleClickOnOpenedConnectionSwitchesToIt
|
||||
'
|
||||
Me.chkSingleClickOnOpenedConnectionSwitchesToIt.AutoSize = True
|
||||
Me.chkSingleClickOnOpenedConnectionSwitchesToIt.Location = New System.Drawing.Point(3, 23)
|
||||
Me.chkSingleClickOnOpenedConnectionSwitchesToIt.Name = "chkSingleClickOnOpenedConnectionSwitchesToIt"
|
||||
Me.chkSingleClickOnOpenedConnectionSwitchesToIt.Size = New System.Drawing.Size(254, 17)
|
||||
Me.chkSingleClickOnOpenedConnectionSwitchesToIt.TabIndex = 8
|
||||
Me.chkSingleClickOnOpenedConnectionSwitchesToIt.Text = "Single click on opened connection switches to it"
|
||||
Me.chkSingleClickOnOpenedConnectionSwitchesToIt.UseVisualStyleBackColor = True
|
||||
'
|
||||
'pnlAutoSave
|
||||
'
|
||||
Me.pnlAutoSave.Controls.Add(Me.lblAutoSave1)
|
||||
Me.pnlAutoSave.Controls.Add(Me.numAutoSave)
|
||||
Me.pnlAutoSave.Controls.Add(Me.lblAutoSave2)
|
||||
Me.pnlAutoSave.Location = New System.Drawing.Point(3, 104)
|
||||
Me.pnlAutoSave.Name = "pnlAutoSave"
|
||||
Me.pnlAutoSave.Size = New System.Drawing.Size(596, 29)
|
||||
Me.pnlAutoSave.TabIndex = 11
|
||||
'
|
||||
'lblAutoSave1
|
||||
'
|
||||
Me.lblAutoSave1.Location = New System.Drawing.Point(6, 9)
|
||||
Me.lblAutoSave1.Name = "lblAutoSave1"
|
||||
Me.lblAutoSave1.Size = New System.Drawing.Size(288, 13)
|
||||
Me.lblAutoSave1.TabIndex = 0
|
||||
Me.lblAutoSave1.Text = "Auto Save every:"
|
||||
Me.lblAutoSave1.TextAlign = System.Drawing.ContentAlignment.TopRight
|
||||
'
|
||||
'numAutoSave
|
||||
'
|
||||
Me.numAutoSave.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.numAutoSave.Location = New System.Drawing.Point(300, 7)
|
||||
Me.numAutoSave.Maximum = New Decimal(New Integer() {9999, 0, 0, 0})
|
||||
Me.numAutoSave.Name = "numAutoSave"
|
||||
Me.numAutoSave.Size = New System.Drawing.Size(53, 20)
|
||||
Me.numAutoSave.TabIndex = 1
|
||||
'
|
||||
'lblAutoSave2
|
||||
'
|
||||
Me.lblAutoSave2.AutoSize = True
|
||||
Me.lblAutoSave2.Location = New System.Drawing.Point(359, 9)
|
||||
Me.lblAutoSave2.Name = "lblAutoSave2"
|
||||
Me.lblAutoSave2.Size = New System.Drawing.Size(135, 13)
|
||||
Me.lblAutoSave2.TabIndex = 2
|
||||
Me.lblAutoSave2.Text = "Minutes (0 means disabled)"
|
||||
'
|
||||
'pnlConfirmCloseConnection
|
||||
'
|
||||
Me.pnlConfirmCloseConnection.Controls.Add(Me.lblClosingConnections)
|
||||
Me.pnlConfirmCloseConnection.Controls.Add(Me.radCloseWarnAll)
|
||||
Me.pnlConfirmCloseConnection.Controls.Add(Me.radCloseWarnMultiple)
|
||||
Me.pnlConfirmCloseConnection.Controls.Add(Me.radCloseWarnExit)
|
||||
Me.pnlConfirmCloseConnection.Controls.Add(Me.radCloseWarnNever)
|
||||
Me.pnlConfirmCloseConnection.Location = New System.Drawing.Point(3, 320)
|
||||
Me.pnlConfirmCloseConnection.Name = "pnlConfirmCloseConnection"
|
||||
Me.pnlConfirmCloseConnection.Size = New System.Drawing.Size(596, 137)
|
||||
Me.pnlConfirmCloseConnection.TabIndex = 13
|
||||
'
|
||||
'lblClosingConnections
|
||||
'
|
||||
Me.lblClosingConnections.AutoSize = True
|
||||
Me.lblClosingConnections.Location = New System.Drawing.Point(3, 9)
|
||||
Me.lblClosingConnections.Name = "lblClosingConnections"
|
||||
Me.lblClosingConnections.Size = New System.Drawing.Size(136, 13)
|
||||
Me.lblClosingConnections.TabIndex = 0
|
||||
Me.lblClosingConnections.Text = "When closing connections:"
|
||||
'
|
||||
'radCloseWarnAll
|
||||
'
|
||||
Me.radCloseWarnAll.AutoSize = True
|
||||
Me.radCloseWarnAll.Location = New System.Drawing.Point(16, 31)
|
||||
Me.radCloseWarnAll.Name = "radCloseWarnAll"
|
||||
Me.radCloseWarnAll.Size = New System.Drawing.Size(194, 17)
|
||||
Me.radCloseWarnAll.TabIndex = 1
|
||||
Me.radCloseWarnAll.TabStop = True
|
||||
Me.radCloseWarnAll.Text = "Warn me when closing connections"
|
||||
Me.radCloseWarnAll.UseVisualStyleBackColor = True
|
||||
'
|
||||
'radCloseWarnMultiple
|
||||
'
|
||||
Me.radCloseWarnMultiple.AutoSize = True
|
||||
Me.radCloseWarnMultiple.Location = New System.Drawing.Point(16, 54)
|
||||
Me.radCloseWarnMultiple.Name = "radCloseWarnMultiple"
|
||||
Me.radCloseWarnMultiple.Size = New System.Drawing.Size(254, 17)
|
||||
Me.radCloseWarnMultiple.TabIndex = 2
|
||||
Me.radCloseWarnMultiple.TabStop = True
|
||||
Me.radCloseWarnMultiple.Text = "Warn me only when closing multiple connections"
|
||||
Me.radCloseWarnMultiple.UseVisualStyleBackColor = True
|
||||
'
|
||||
'radCloseWarnExit
|
||||
'
|
||||
Me.radCloseWarnExit.AutoSize = True
|
||||
Me.radCloseWarnExit.Location = New System.Drawing.Point(16, 77)
|
||||
Me.radCloseWarnExit.Name = "radCloseWarnExit"
|
||||
Me.radCloseWarnExit.Size = New System.Drawing.Size(216, 17)
|
||||
Me.radCloseWarnExit.TabIndex = 3
|
||||
Me.radCloseWarnExit.TabStop = True
|
||||
Me.radCloseWarnExit.Text = "Warn me only when exiting mRemoteNG"
|
||||
Me.radCloseWarnExit.UseVisualStyleBackColor = True
|
||||
'
|
||||
'radCloseWarnNever
|
||||
'
|
||||
Me.radCloseWarnNever.AutoSize = True
|
||||
Me.radCloseWarnNever.Location = New System.Drawing.Point(16, 100)
|
||||
Me.radCloseWarnNever.Name = "radCloseWarnNever"
|
||||
Me.radCloseWarnNever.Size = New System.Drawing.Size(226, 17)
|
||||
Me.radCloseWarnNever.TabIndex = 4
|
||||
Me.radCloseWarnNever.TabStop = True
|
||||
Me.radCloseWarnNever.Text = "Do not warn me when closing connections"
|
||||
Me.radCloseWarnNever.UseVisualStyleBackColor = True
|
||||
'
|
||||
'ConnectionsPage
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.Controls.Add(Me.pnlRdpReconnectionCount)
|
||||
Me.Controls.Add(Me.chkSingleClickOnConnectionOpensIt)
|
||||
Me.Controls.Add(Me.chkHostnameLikeDisplayName)
|
||||
Me.Controls.Add(Me.pnlDefaultCredentials)
|
||||
Me.Controls.Add(Me.chkSingleClickOnOpenedConnectionSwitchesToIt)
|
||||
Me.Controls.Add(Me.pnlAutoSave)
|
||||
Me.Controls.Add(Me.pnlConfirmCloseConnection)
|
||||
Me.Name = "ConnectionsPage"
|
||||
Me.PageIcon = CType(resources.GetObject("$this.PageIcon"), System.Drawing.Icon)
|
||||
Me.Size = New System.Drawing.Size(610, 489)
|
||||
Me.pnlRdpReconnectionCount.ResumeLayout(False)
|
||||
CType(Me.numRdpReconnectionCount, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.pnlDefaultCredentials.ResumeLayout(False)
|
||||
Me.pnlDefaultCredentials.PerformLayout()
|
||||
Me.pnlAutoSave.ResumeLayout(False)
|
||||
Me.pnlAutoSave.PerformLayout()
|
||||
CType(Me.numAutoSave, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.pnlConfirmCloseConnection.ResumeLayout(False)
|
||||
Me.pnlConfirmCloseConnection.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents pnlRdpReconnectionCount As System.Windows.Forms.Panel
|
||||
Friend WithEvents lblRdpReconnectionCount As System.Windows.Forms.Label
|
||||
Friend WithEvents numRdpReconnectionCount As System.Windows.Forms.NumericUpDown
|
||||
Friend WithEvents chkSingleClickOnConnectionOpensIt As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkHostnameLikeDisplayName As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents pnlDefaultCredentials As System.Windows.Forms.Panel
|
||||
Friend WithEvents radCredentialsCustom As System.Windows.Forms.RadioButton
|
||||
Friend WithEvents lblDefaultCredentials As System.Windows.Forms.Label
|
||||
Friend WithEvents radCredentialsNoInfo As System.Windows.Forms.RadioButton
|
||||
Friend WithEvents radCredentialsWindows As System.Windows.Forms.RadioButton
|
||||
Friend WithEvents txtCredentialsDomain As System.Windows.Forms.TextBox
|
||||
Friend WithEvents lblCredentialsUsername As System.Windows.Forms.Label
|
||||
Friend WithEvents txtCredentialsPassword As System.Windows.Forms.TextBox
|
||||
Friend WithEvents lblCredentialsPassword As System.Windows.Forms.Label
|
||||
Friend WithEvents txtCredentialsUsername As System.Windows.Forms.TextBox
|
||||
Friend WithEvents lblCredentialsDomain As System.Windows.Forms.Label
|
||||
Friend WithEvents chkSingleClickOnOpenedConnectionSwitchesToIt As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents pnlAutoSave As System.Windows.Forms.Panel
|
||||
Friend WithEvents lblAutoSave1 As System.Windows.Forms.Label
|
||||
Friend WithEvents numAutoSave As System.Windows.Forms.NumericUpDown
|
||||
Friend WithEvents lblAutoSave2 As System.Windows.Forms.Label
|
||||
Friend WithEvents pnlConfirmCloseConnection As System.Windows.Forms.Panel
|
||||
Friend WithEvents lblClosingConnections As System.Windows.Forms.Label
|
||||
Friend WithEvents radCloseWarnAll As System.Windows.Forms.RadioButton
|
||||
Friend WithEvents radCloseWarnMultiple As System.Windows.Forms.RadioButton
|
||||
Friend WithEvents radCloseWarnExit As System.Windows.Forms.RadioButton
|
||||
Friend WithEvents radCloseWarnNever As System.Windows.Forms.RadioButton
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
@@ -117,4 +117,29 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.PageIcon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAABMLAAATCwAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAADVYQEFyk4AFcdXAC3JWAA/xVIAScNPAUi+TAA9v0sAK75KABTQTwAEAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAADGXQAHv1YALMhbAGrAVgCjrUsAxKRHBNOoRgjTqUcEw7RKAKHBUgBmwV4AKM9X
|
||||
AAYAAAAAAAAAAAAAAADCWgABuEcAGLFEAGuCOQHXejoP/KxNJP/hbUH/5H9V/9NrOf+jSxb9o00H2r9X
|
||||
AGrKZAAUAAAAAAAAAAAAAAAAAAAAAKc/BSZPIwHSPScX/4pcRP/Khmb/9ryc//nMt//joHj/sXdd/3lT
|
||||
NP+GRQjdv1sAKAAAAAAAAAAAAAAAAAAAAABvRSSlVDkh/3lkT/+PdmH/rIhr/8KjiP/BpY7/s5iB/5F2
|
||||
YP90W0b/YzwZ/4U+ALEAAAAAAAAAAAAAAACqZztfdVU6/8Oxov+2nIP/pnlM/6h3Sf/DpIf/2Maw/72p
|
||||
i/9/Xz//XDwd/1IuDP9ZMgr/eTYAUwAAAACuXisxYjYYsWc7Fv+qhV//snIw/61PAP+6bCT/6tW///38
|
||||
+v/Wvqb/kF8s/2IwAP9jQB//XDwe/1QsBMVUKAAnYiQAR1YhAexiMAb/mU8G/7hnE//CYwL/yXUj/+a/
|
||||
lP/s1Lb/zZxi/6hsLP+ZbUH/o4xy/39mT/9aNhT3UigCVX0vAV9qLgP9dDsG/65ZBf/AYQX/55ZG/+iy
|
||||
ev/ksXr/0ok5/71mBv+oVAD/uI1d/9TDsv+YhG7/Wz0f/0olBmqWQARafTwH+oNGDP/LcBv/5Ys9//62
|
||||
cv//48L/9LyF/9Z3Kf/FbhL/umMH/693Of+uiF3/lHZd/1w+Iv9CIwVms1oVOZFJEN6OThn/7J5T//6/
|
||||
hf//zKH//9+7//7Cf//ijkn/04Q6/8p5LP+1cCr/l2En/4FeOf9YOx/sPyEESMlsHwypUxSOwG4t//+8
|
||||
f//6zqf/+Nu+///ixv//vob/9Kx1/+zCmv/itYv/uHUz/51kLP+IZED/QSMHpTcZABUAAAAAx1wUGu5v
|
||||
JPHYnnL/59PA//z17v//+Ov//+XC//a5gv/y0rj/7tK2/8KGTv+ndkf/bUYj+jcaACkAAAAAAAAAAAAA
|
||||
AADrZRdXqWI0/8q4qP////////78///24v/7xaD/5LmV/9usff/Djlz/k2Q4/0wkAWoAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAOqsdVG0e1Hs0LKV/+zg2f/m1cT/07CU/9Omd//Lj1X/omUt8mUwBGAAAAAAAAAAAAAA
|
||||
AAAAAAAAAAAAAAAAAAAAAAAA/u/cF8aBSHqyayrFp2815aBnLeahXhvJpVkKg4A8Ah0AAAAAAAAAAAAA
|
||||
AAAAAAAA4AcAAMADAACAAwAAwAMAAMADAACAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAEAAMAD
|
||||
AADgBwAA8A8AAA==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
125
mRemoteV1/Forms/OptionsPages/ConnectionsPage.vb
Normal file
125
mRemoteV1/Forms/OptionsPages/ConnectionsPage.vb
Normal file
@@ -0,0 +1,125 @@
|
||||
Imports mRemoteNG.My
|
||||
Imports mRemoteNG.Config
|
||||
Imports mRemoteNG.App.Info
|
||||
Imports mRemoteNG.Security
|
||||
|
||||
Namespace Forms.OptionsPages
|
||||
Public Class ConnectionsPage
|
||||
Public Overrides Property PageName() As String
|
||||
Get
|
||||
Return Language.strConnections
|
||||
End Get
|
||||
Set(value As String)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Overrides Sub ApplyLanguage()
|
||||
MyBase.ApplyLanguage()
|
||||
|
||||
chkSingleClickOnConnectionOpensIt.Text = Language.strSingleClickOnConnectionOpensIt
|
||||
chkSingleClickOnOpenedConnectionSwitchesToIt.Text = Language.strSingleClickOnOpenConnectionSwitchesToIt
|
||||
chkHostnameLikeDisplayName.Text = Language.strSetHostnameLikeDisplayName
|
||||
|
||||
lblRdpReconnectionCount.Text = Language.strRdpReconnectCount
|
||||
|
||||
lblAutoSave1.Text = Language.strAutoSaveEvery
|
||||
lblAutoSave2.Text = Language.strAutoSaveMins
|
||||
|
||||
lblDefaultCredentials.Text = Language.strEmptyUsernamePasswordDomainFields
|
||||
radCredentialsNoInfo.Text = Language.strNoInformation
|
||||
radCredentialsWindows.Text = Language.strMyCurrentWindowsCreds
|
||||
radCredentialsCustom.Text = Language.strTheFollowing
|
||||
lblCredentialsUsername.Text = Language.strLabelUsername
|
||||
lblCredentialsPassword.Text = Language.strLabelPassword
|
||||
lblCredentialsDomain.Text = Language.strLabelDomain
|
||||
|
||||
lblClosingConnections.Text = Language.strLabelClosingConnections
|
||||
radCloseWarnAll.Text = Language.strRadioCloseWarnAll
|
||||
radCloseWarnMultiple.Text = Language.strRadioCloseWarnMultiple
|
||||
radCloseWarnExit.Text = Language.strRadioCloseWarnExit
|
||||
radCloseWarnNever.Text = Language.strRadioCloseWarnNever
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub LoadSettings()
|
||||
MyBase.SaveSettings()
|
||||
|
||||
chkSingleClickOnConnectionOpensIt.Checked = My.Settings.SingleClickOnConnectionOpensIt
|
||||
chkSingleClickOnOpenedConnectionSwitchesToIt.Checked = My.Settings.SingleClickSwitchesToOpenConnection
|
||||
chkHostnameLikeDisplayName.Checked = My.Settings.SetHostnameLikeDisplayName
|
||||
|
||||
numRdpReconnectionCount.Value = My.Settings.RdpReconnectionCount
|
||||
|
||||
numAutoSave.Value = My.Settings.AutoSaveEveryMinutes
|
||||
|
||||
Select Case My.Settings.EmptyCredentials
|
||||
' ReSharper disable once StringLiteralTypo
|
||||
Case "noinfo"
|
||||
radCredentialsNoInfo.Checked = True
|
||||
Case "windows"
|
||||
radCredentialsWindows.Checked = True
|
||||
Case "custom"
|
||||
radCredentialsCustom.Checked = True
|
||||
End Select
|
||||
|
||||
txtCredentialsUsername.Text = My.Settings.DefaultUsername
|
||||
txtCredentialsPassword.Text = Crypt.Decrypt(My.Settings.DefaultPassword, General.EncryptionKey)
|
||||
txtCredentialsDomain.Text = My.Settings.DefaultDomain
|
||||
|
||||
Select Case My.Settings.ConfirmCloseConnection
|
||||
Case ConfirmClose.Never
|
||||
radCloseWarnNever.Checked = True
|
||||
Case ConfirmClose.Exit
|
||||
radCloseWarnExit.Checked = True
|
||||
Case ConfirmClose.Multiple
|
||||
radCloseWarnMultiple.Checked = True
|
||||
Case Else
|
||||
radCloseWarnAll.Checked = True
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub SaveSettings()
|
||||
MyBase.SaveSettings()
|
||||
|
||||
My.Settings.SingleClickOnConnectionOpensIt = chkSingleClickOnConnectionOpensIt.Checked
|
||||
My.Settings.SingleClickSwitchesToOpenConnection = chkSingleClickOnOpenedConnectionSwitchesToIt.Checked
|
||||
My.Settings.SetHostnameLikeDisplayName = chkHostnameLikeDisplayName.Checked
|
||||
|
||||
My.Settings.RdpReconnectionCount = numRdpReconnectionCount.Value
|
||||
|
||||
My.Settings.AutoSaveEveryMinutes = numAutoSave.Value
|
||||
If My.Settings.AutoSaveEveryMinutes > 0 Then
|
||||
frmMain.tmrAutoSave.Interval = My.Settings.AutoSaveEveryMinutes * 60000
|
||||
frmMain.tmrAutoSave.Enabled = True
|
||||
Else
|
||||
frmMain.tmrAutoSave.Enabled = False
|
||||
End If
|
||||
|
||||
If radCredentialsNoInfo.Checked Then
|
||||
' ReSharper disable once StringLiteralTypo
|
||||
My.Settings.EmptyCredentials = "noinfo"
|
||||
ElseIf radCredentialsWindows.Checked Then
|
||||
My.Settings.EmptyCredentials = "windows"
|
||||
ElseIf radCredentialsCustom.Checked Then
|
||||
My.Settings.EmptyCredentials = "custom"
|
||||
End If
|
||||
|
||||
My.Settings.DefaultUsername = txtCredentialsUsername.Text
|
||||
My.Settings.DefaultPassword = Crypt.Encrypt(txtCredentialsPassword.Text, General.EncryptionKey)
|
||||
My.Settings.DefaultDomain = txtCredentialsDomain.Text
|
||||
|
||||
If radCloseWarnAll.Checked Then My.Settings.ConfirmCloseConnection = ConfirmClose.All
|
||||
If radCloseWarnMultiple.Checked Then My.Settings.ConfirmCloseConnection = ConfirmClose.Multiple
|
||||
If radCloseWarnExit.Checked Then My.Settings.ConfirmCloseConnection = ConfirmClose.Exit
|
||||
If radCloseWarnNever.Checked Then My.Settings.ConfirmCloseConnection = ConfirmClose.Never
|
||||
End Sub
|
||||
|
||||
Private Sub radCredentialsCustom_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) Handles radCredentialsCustom.CheckedChanged
|
||||
lblCredentialsUsername.Enabled = radCredentialsCustom.Checked
|
||||
lblCredentialsPassword.Enabled = radCredentialsCustom.Checked
|
||||
lblCredentialsDomain.Enabled = radCredentialsCustom.Checked
|
||||
txtCredentialsUsername.Enabled = radCredentialsCustom.Checked
|
||||
txtCredentialsPassword.Enabled = radCredentialsCustom.Checked
|
||||
txtCredentialsDomain.Enabled = radCredentialsCustom.Checked
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
190
mRemoteV1/Forms/OptionsPages/KeyboardPage.Designer.vb
generated
Normal file
190
mRemoteV1/Forms/OptionsPages/KeyboardPage.Designer.vb
generated
Normal file
@@ -0,0 +1,190 @@
|
||||
Namespace Forms.OptionsPages
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class KeyboardPage
|
||||
Inherits OptionsPage
|
||||
|
||||
'UserControl 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()
|
||||
Dim LineGroupBox As System.Windows.Forms.GroupBox
|
||||
Dim Alignment1 As mRemoteNG.Controls.Alignment = New mRemoteNG.Controls.Alignment()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(KeyboardPage))
|
||||
Me.btnDeleteKeyboardShortcut = New System.Windows.Forms.Button()
|
||||
Me.btnNewKeyboardShortcut = New System.Windows.Forms.Button()
|
||||
Me.grpModifyKeyboardShortcut = New System.Windows.Forms.GroupBox()
|
||||
Me.hotModifyKeyboardShortcut = New SharedLibraryNG.HotkeyControl()
|
||||
Me.btnResetAllKeyboardShortcuts = New System.Windows.Forms.Button()
|
||||
Me.btnResetKeyboardShortcuts = New System.Windows.Forms.Button()
|
||||
Me.lblKeyboardCommand = New System.Windows.Forms.Label()
|
||||
Me.lstKeyboardShortcuts = New System.Windows.Forms.ListBox()
|
||||
Me.lblKeyboardShortcuts = New System.Windows.Forms.Label()
|
||||
Me.lvKeyboardCommands = New mRemoteNG.Controls.ListView()
|
||||
LineGroupBox = New System.Windows.Forms.GroupBox()
|
||||
Me.grpModifyKeyboardShortcut.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'LineGroupBox
|
||||
'
|
||||
LineGroupBox.Location = New System.Drawing.Point(212, 20)
|
||||
LineGroupBox.Name = "LineGroupBox"
|
||||
LineGroupBox.Size = New System.Drawing.Size(398, 3)
|
||||
LineGroupBox.TabIndex = 19
|
||||
LineGroupBox.TabStop = False
|
||||
'
|
||||
'btnDeleteKeyboardShortcut
|
||||
'
|
||||
Me.btnDeleteKeyboardShortcut.Location = New System.Drawing.Point(293, 151)
|
||||
Me.btnDeleteKeyboardShortcut.Name = "btnDeleteKeyboardShortcut"
|
||||
Me.btnDeleteKeyboardShortcut.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnDeleteKeyboardShortcut.TabIndex = 15
|
||||
Me.btnDeleteKeyboardShortcut.Text = "&Delete"
|
||||
Me.btnDeleteKeyboardShortcut.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnNewKeyboardShortcut
|
||||
'
|
||||
Me.btnNewKeyboardShortcut.Location = New System.Drawing.Point(212, 151)
|
||||
Me.btnNewKeyboardShortcut.Name = "btnNewKeyboardShortcut"
|
||||
Me.btnNewKeyboardShortcut.Size = New System.Drawing.Size(75, 23)
|
||||
Me.btnNewKeyboardShortcut.TabIndex = 14
|
||||
Me.btnNewKeyboardShortcut.Text = "&New"
|
||||
Me.btnNewKeyboardShortcut.UseVisualStyleBackColor = True
|
||||
'
|
||||
'grpModifyKeyboardShortcut
|
||||
'
|
||||
Me.grpModifyKeyboardShortcut.Controls.Add(Me.hotModifyKeyboardShortcut)
|
||||
Me.grpModifyKeyboardShortcut.Location = New System.Drawing.Point(212, 180)
|
||||
Me.grpModifyKeyboardShortcut.Name = "grpModifyKeyboardShortcut"
|
||||
Me.grpModifyKeyboardShortcut.Size = New System.Drawing.Size(398, 103)
|
||||
Me.grpModifyKeyboardShortcut.TabIndex = 17
|
||||
Me.grpModifyKeyboardShortcut.TabStop = False
|
||||
Me.grpModifyKeyboardShortcut.Text = "Modify Shortcut"
|
||||
'
|
||||
'hotModifyKeyboardShortcut
|
||||
'
|
||||
Me.hotModifyKeyboardShortcut.HotkeyModifiers = System.Windows.Forms.Keys.None
|
||||
Me.hotModifyKeyboardShortcut.KeyCode = System.Windows.Forms.Keys.None
|
||||
Me.hotModifyKeyboardShortcut.Location = New System.Drawing.Point(27, 41)
|
||||
Me.hotModifyKeyboardShortcut.Name = "hotModifyKeyboardShortcut"
|
||||
Me.hotModifyKeyboardShortcut.Size = New System.Drawing.Size(344, 20)
|
||||
Me.hotModifyKeyboardShortcut.TabIndex = 0
|
||||
Me.hotModifyKeyboardShortcut.Text = "None"
|
||||
'
|
||||
'btnResetAllKeyboardShortcuts
|
||||
'
|
||||
Me.btnResetAllKeyboardShortcuts.Location = New System.Drawing.Point(3, 466)
|
||||
Me.btnResetAllKeyboardShortcuts.Name = "btnResetAllKeyboardShortcuts"
|
||||
Me.btnResetAllKeyboardShortcuts.Size = New System.Drawing.Size(120, 23)
|
||||
Me.btnResetAllKeyboardShortcuts.TabIndex = 18
|
||||
Me.btnResetAllKeyboardShortcuts.Text = "Reset &All to Default"
|
||||
Me.btnResetAllKeyboardShortcuts.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnResetKeyboardShortcuts
|
||||
'
|
||||
Me.btnResetKeyboardShortcuts.Location = New System.Drawing.Point(490, 151)
|
||||
Me.btnResetKeyboardShortcuts.Name = "btnResetKeyboardShortcuts"
|
||||
Me.btnResetKeyboardShortcuts.Size = New System.Drawing.Size(120, 23)
|
||||
Me.btnResetKeyboardShortcuts.TabIndex = 16
|
||||
Me.btnResetKeyboardShortcuts.Text = "&Reset to Default"
|
||||
Me.btnResetKeyboardShortcuts.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblKeyboardCommand
|
||||
'
|
||||
Me.lblKeyboardCommand.AutoSize = True
|
||||
Me.lblKeyboardCommand.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.lblKeyboardCommand.Location = New System.Drawing.Point(209, 0)
|
||||
Me.lblKeyboardCommand.Name = "lblKeyboardCommand"
|
||||
Me.lblKeyboardCommand.Size = New System.Drawing.Size(71, 17)
|
||||
Me.lblKeyboardCommand.TabIndex = 11
|
||||
Me.lblKeyboardCommand.Text = "Command"
|
||||
'
|
||||
'lstKeyboardShortcuts
|
||||
'
|
||||
Me.lstKeyboardShortcuts.FormattingEnabled = True
|
||||
Me.lstKeyboardShortcuts.Location = New System.Drawing.Point(212, 50)
|
||||
Me.lstKeyboardShortcuts.Name = "lstKeyboardShortcuts"
|
||||
Me.lstKeyboardShortcuts.Size = New System.Drawing.Size(398, 95)
|
||||
Me.lstKeyboardShortcuts.TabIndex = 13
|
||||
'
|
||||
'lblKeyboardShortcuts
|
||||
'
|
||||
Me.lblKeyboardShortcuts.AutoSize = True
|
||||
Me.lblKeyboardShortcuts.Location = New System.Drawing.Point(209, 34)
|
||||
Me.lblKeyboardShortcuts.Name = "lblKeyboardShortcuts"
|
||||
Me.lblKeyboardShortcuts.Size = New System.Drawing.Size(100, 13)
|
||||
Me.lblKeyboardShortcuts.TabIndex = 12
|
||||
Me.lblKeyboardShortcuts.Text = "Keyboard Shortcuts"
|
||||
'
|
||||
'lvKeyboardCommands
|
||||
'
|
||||
Me.lvKeyboardCommands.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable
|
||||
Me.lvKeyboardCommands.HideSelection = False
|
||||
Me.lvKeyboardCommands.InactiveHighlightBackColor = System.Drawing.SystemColors.Highlight
|
||||
Me.lvKeyboardCommands.InactiveHighlightBorderColor = System.Drawing.SystemColors.HotTrack
|
||||
Me.lvKeyboardCommands.InactiveHighlightForeColor = System.Drawing.SystemColors.HighlightText
|
||||
Alignment1.Horizontal = mRemoteNG.Controls.HorizontalAlignment.Left
|
||||
Alignment1.Vertical = mRemoteNG.Controls.VerticalAlignment.Middle
|
||||
Me.lvKeyboardCommands.LabelAlignment = Alignment1
|
||||
Me.lvKeyboardCommands.LabelWrap = False
|
||||
Me.lvKeyboardCommands.Location = New System.Drawing.Point(3, 0)
|
||||
Me.lvKeyboardCommands.MultiSelect = False
|
||||
Me.lvKeyboardCommands.Name = "lvKeyboardCommands"
|
||||
Me.lvKeyboardCommands.OwnerDraw = True
|
||||
Me.lvKeyboardCommands.Size = New System.Drawing.Size(200, 460)
|
||||
Me.lvKeyboardCommands.TabIndex = 10
|
||||
Me.lvKeyboardCommands.TileSize = New System.Drawing.Size(196, 20)
|
||||
Me.lvKeyboardCommands.UseCompatibleStateImageBehavior = False
|
||||
Me.lvKeyboardCommands.View = System.Windows.Forms.View.Tile
|
||||
'
|
||||
'KeyboardPage
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.Controls.Add(LineGroupBox)
|
||||
Me.Controls.Add(Me.btnDeleteKeyboardShortcut)
|
||||
Me.Controls.Add(Me.btnNewKeyboardShortcut)
|
||||
Me.Controls.Add(Me.grpModifyKeyboardShortcut)
|
||||
Me.Controls.Add(Me.btnResetAllKeyboardShortcuts)
|
||||
Me.Controls.Add(Me.btnResetKeyboardShortcuts)
|
||||
Me.Controls.Add(Me.lblKeyboardCommand)
|
||||
Me.Controls.Add(Me.lstKeyboardShortcuts)
|
||||
Me.Controls.Add(Me.lblKeyboardShortcuts)
|
||||
Me.Controls.Add(Me.lvKeyboardCommands)
|
||||
Me.Name = "KeyboardPage"
|
||||
Me.PageIcon = CType(resources.GetObject("$this.PageIcon"), System.Drawing.Icon)
|
||||
Me.Size = New System.Drawing.Size(610, 489)
|
||||
Me.grpModifyKeyboardShortcut.ResumeLayout(False)
|
||||
Me.grpModifyKeyboardShortcut.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents btnDeleteKeyboardShortcut As System.Windows.Forms.Button
|
||||
Friend WithEvents btnNewKeyboardShortcut As System.Windows.Forms.Button
|
||||
Friend WithEvents grpModifyKeyboardShortcut As System.Windows.Forms.GroupBox
|
||||
Friend WithEvents hotModifyKeyboardShortcut As SharedLibraryNG.HotkeyControl
|
||||
Friend WithEvents btnResetAllKeyboardShortcuts As System.Windows.Forms.Button
|
||||
Friend WithEvents btnResetKeyboardShortcuts As System.Windows.Forms.Button
|
||||
Friend WithEvents lblKeyboardCommand As System.Windows.Forms.Label
|
||||
Friend WithEvents lstKeyboardShortcuts As System.Windows.Forms.ListBox
|
||||
Friend WithEvents lblKeyboardShortcuts As System.Windows.Forms.Label
|
||||
Friend WithEvents lvKeyboardCommands As mRemoteNG.Controls.ListView
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
148
mRemoteV1/Forms/OptionsPages/KeyboardPage.resx
Normal file
148
mRemoteV1/Forms/OptionsPages/KeyboardPage.resx
Normal file
@@ -0,0 +1,148 @@
|
||||
<?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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="LineGroupBox.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.PageIcon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
|
||||
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
|
||||
/wD///8A////AOrFpOvnwJ//47ya/+C3lf/dso//2a6K/9aphf/TpX//0KB7/82cdv/KmXL/yJZu/8aT
|
||||
a//EkGn/xJBo/8SQaOvuy6v/6NXI/+jUxf/n0sP/5dDB/+XOvv/jzLz/48q5/+LJt//hx7X/4MWz/9/E
|
||||
sf/fxLD/3sKv/97Crv/EkGj/8tCx/+rYzP/8/Pz/2rqk//z8/P/8/Pz//Pz8//z8/P/8/Pz//Pz8//z8
|
||||
/P/8/Pz/zKGC//z8/P/fw7D/xZJq//XUtv/s3ND/3sOv/92/q//bvaf/2bqj/9i3n//WtJz/1bGX/9Ou
|
||||
lP/Rq4//0KiM/8+miP/No4X/4MWz/8eVbv/42Lv/7d7U//z8/P/8/Pz/3sKu//z8/P/bvKb//Pz8/9i2
|
||||
nv/8/Pz/1bCX//z8/P/8/Pz//Pz8/+HItv/KmXL/+ty//+7g1v/jy7r/4sm4/+DGtP/fxLH/3sKt/9y/
|
||||
qv/avKb/2bmi/9e2nv/Ws5r/6dbK//z8/P/jy7r/zp13//zewf/v4tj//Pz8/+TMvP/8/Pz/4cm3//z8
|
||||
/P/fw7D//Pz8/9y+qf/8/Pz/2bih//z8/P/38/D/5c6+/9Giff/83sH/7+LY/+/i2P/v4tj/7uHX/+7g
|
||||
1v/u39T/7d3S/+zc0f/r2s7/6tjM/+rXyv/o1cf/59PF/+fRwv/VqIP//N7B4/zewf+7ubb/s7Gu//rb
|
||||
vv/42Lv/9tW3//PSs//wzq7/7cmq/+rFpP/nwJ//47ya/+C3lf/dso//2a6K4////wD///8AxMTE/by8
|
||||
vLSzs7MQ////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////ANDQ
|
||||
0PjJycn4wsLCZ////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
|
||||
/wDZ2dln1NTU9s/Pz+/IyMjlwMDA2Le3t8Ourq6TpKSkfZubm26RkZFJh4eHBP///wD///8A////AP//
|
||||
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
|
||||
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
|
||||
/wD///8A//+sQf//rEEAAKxBAACsQQAArEEAAKxBAACsQQAArEEAAKxBAACsQQAArEHH/6xBx/+sQcAH
|
||||
rEH//6xB//+sQQ==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
198
mRemoteV1/Forms/OptionsPages/KeyboardPage.vb
Normal file
198
mRemoteV1/Forms/OptionsPages/KeyboardPage.vb
Normal file
@@ -0,0 +1,198 @@
|
||||
Imports mRemoteNG.Config
|
||||
Imports mRemoteNG.My
|
||||
|
||||
Namespace Forms.OptionsPages
|
||||
Public Class KeyboardPage
|
||||
Public Overrides Property PageName() As String
|
||||
Get
|
||||
Return Language.strOptionsTabKeyboard
|
||||
End Get
|
||||
Set(value As String)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Overrides Sub ApplyLanguage()
|
||||
MyBase.ApplyLanguage()
|
||||
|
||||
lblKeyboardShortcuts.Text = Language.strOptionsKeyboardLabelKeyboardShortcuts
|
||||
btnNewKeyboardShortcut.Text = Language.strOptionsKeyboardButtonNew
|
||||
btnDeleteKeyboardShortcut.Text = Language.strOptionsKeyboardButtonDelete
|
||||
btnResetKeyboardShortcuts.Text = Language.strOptionsKeyboardButtonReset
|
||||
grpModifyKeyboardShortcut.Text = Language.strOptionsKeyboardGroupModifyShortcut
|
||||
btnResetAllKeyboardShortcuts.Text = Language.strOptionsKeyboardButtonResetAll
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub LoadSettings()
|
||||
_tabsListViewGroup = New ListViewGroup(Language.strOptionsKeyboardCommandsGroupTabs)
|
||||
_previousTabListViewItem = New ListViewItem(Language.strOptionsKeyboardCommandsPreviousTab, _tabsListViewGroup)
|
||||
_nextTabListViewItem = New ListViewItem(Language.strOptionsKeyboardCommandsNextTab, _tabsListViewGroup)
|
||||
|
||||
_keyboardShortcutMap = KeyboardShortcuts.Map.Clone()
|
||||
|
||||
lvKeyboardCommands.Groups.Add(_tabsListViewGroup)
|
||||
lvKeyboardCommands.Items.Add(_previousTabListViewItem)
|
||||
lvKeyboardCommands.Items.Add(_nextTabListViewItem)
|
||||
_previousTabListViewItem.Selected = True
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub SaveSettings()
|
||||
MyBase.SaveSettings()
|
||||
|
||||
If _keyboardShortcutMap IsNot Nothing Then
|
||||
KeyboardShortcuts.Map = _keyboardShortcutMap
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "Private Fields"
|
||||
Private _keyboardShortcutMap As KeyboardShortcutMap
|
||||
Private _tabsListViewGroup As ListViewGroup
|
||||
Private _previousTabListViewItem As ListViewItem
|
||||
Private _nextTabListViewItem As ListViewItem
|
||||
Private _ignoreKeyboardShortcutTextChanged As Boolean = False
|
||||
#End Region
|
||||
|
||||
#Region "Private Methods"
|
||||
#Region "Event Handlers"
|
||||
Private Sub lvKeyboardCommands_SelectedIndexChanged(sender As System.Object, e As EventArgs) Handles lvKeyboardCommands.SelectedIndexChanged
|
||||
Dim isItemSelected As Boolean = (lvKeyboardCommands.SelectedItems.Count = 1)
|
||||
EnableKeyboardShortcutControls(isItemSelected)
|
||||
|
||||
If Not isItemSelected Then Return
|
||||
|
||||
Dim selectedItem As ListViewItem = lvKeyboardCommands.SelectedItems(0)
|
||||
|
||||
lblKeyboardCommand.Text = selectedItem.Text
|
||||
lstKeyboardShortcuts.Items.Clear()
|
||||
|
||||
lstKeyboardShortcuts.Items.AddRange(_keyboardShortcutMap.GetShortcutKeys(GetSelectedShortcutCommand()))
|
||||
|
||||
If lstKeyboardShortcuts.Items.Count > 0 Then lstKeyboardShortcuts.SelectedIndex = 0
|
||||
End Sub
|
||||
|
||||
Private Sub lstKeyboardShortcuts_SelectedIndexChanged(sender As System.Object, e As EventArgs) Handles lstKeyboardShortcuts.SelectedIndexChanged
|
||||
Dim isItemSelected As Boolean = (lstKeyboardShortcuts.SelectedItems.Count = 1)
|
||||
|
||||
btnDeleteKeyboardShortcut.Enabled = isItemSelected
|
||||
grpModifyKeyboardShortcut.Enabled = isItemSelected
|
||||
hotModifyKeyboardShortcut.Enabled = isItemSelected
|
||||
|
||||
If Not isItemSelected Then
|
||||
hotModifyKeyboardShortcut.Text = String.Empty
|
||||
Return
|
||||
End If
|
||||
|
||||
Dim selectedItem As Object = lstKeyboardShortcuts.SelectedItems(0)
|
||||
Dim shortcutKey As ShortcutKey = TryCast(selectedItem, ShortcutKey)
|
||||
If shortcutKey Is Nothing Then Return
|
||||
|
||||
Dim keysValue As Keys = shortcutKey
|
||||
Dim keyCode As Keys = keysValue And Keys.KeyCode
|
||||
Dim modifiers As Keys = keysValue And Keys.Modifiers
|
||||
|
||||
_ignoreKeyboardShortcutTextChanged = True
|
||||
hotModifyKeyboardShortcut.KeyCode = keyCode
|
||||
hotModifyKeyboardShortcut.HotkeyModifiers = modifiers
|
||||
_ignoreKeyboardShortcutTextChanged = False
|
||||
End Sub
|
||||
|
||||
Private Sub btnNewKeyboardShortcut_Click(sender As System.Object, e As EventArgs) Handles btnNewKeyboardShortcut.Click
|
||||
For Each item As Object In lstKeyboardShortcuts.Items
|
||||
Dim shortcutKey As ShortcutKey = TryCast(item, ShortcutKey)
|
||||
If shortcutKey Is Nothing Then Continue For
|
||||
If shortcutKey = 0 Then
|
||||
lstKeyboardShortcuts.SelectedItem = item
|
||||
Return
|
||||
End If
|
||||
Next
|
||||
|
||||
lstKeyboardShortcuts.SelectedIndex = lstKeyboardShortcuts.Items.Add(New ShortcutKey(Keys.None))
|
||||
hotModifyKeyboardShortcut.Focus()
|
||||
End Sub
|
||||
|
||||
Private Sub btnDeleteKeyboardShortcut_Click(sender As System.Object, e As EventArgs) Handles btnDeleteKeyboardShortcut.Click
|
||||
Dim selectedIndex As Integer = lstKeyboardShortcuts.SelectedIndex
|
||||
|
||||
Dim command As ShortcutCommand = GetSelectedShortcutCommand()
|
||||
Dim key As ShortcutKey = TryCast(lstKeyboardShortcuts.SelectedItem, ShortcutKey)
|
||||
If Not command = ShortcutCommand.None And key IsNot Nothing Then
|
||||
_keyboardShortcutMap.Remove(GetSelectedShortcutCommand(), key)
|
||||
End If
|
||||
|
||||
lstKeyboardShortcuts.Items.Remove(lstKeyboardShortcuts.SelectedItem)
|
||||
|
||||
If selectedIndex >= lstKeyboardShortcuts.Items.Count Then selectedIndex = lstKeyboardShortcuts.Items.Count - 1
|
||||
lstKeyboardShortcuts.SelectedIndex = selectedIndex
|
||||
End Sub
|
||||
|
||||
Private Sub btnResetAllKeyboardShortcuts_Click(sender As System.Object, e As EventArgs) Handles btnResetAllKeyboardShortcuts.Click
|
||||
_keyboardShortcutMap = KeyboardShortcuts.DefaultMap.Clone()
|
||||
lvKeyboardCommands_SelectedIndexChanged(Me, New EventArgs())
|
||||
End Sub
|
||||
|
||||
Private Sub btnResetKeyboardShortcuts_Click(sender As System.Object, e As EventArgs) Handles btnResetKeyboardShortcuts.Click
|
||||
Dim command As ShortcutCommand = GetSelectedShortcutCommand()
|
||||
If command = ShortcutCommand.None Then Return
|
||||
_keyboardShortcutMap.SetShortcutKeys(command, KeyboardShortcuts.DefaultMap.GetShortcutKeys(command))
|
||||
lvKeyboardCommands_SelectedIndexChanged(Me, New EventArgs())
|
||||
End Sub
|
||||
|
||||
Private Sub hotModifyKeyboardShortcut_TextChanged(sender As System.Object, e As EventArgs) Handles hotModifyKeyboardShortcut.TextChanged
|
||||
If _ignoreKeyboardShortcutTextChanged Or _
|
||||
lstKeyboardShortcuts.SelectedIndex < 0 Or _
|
||||
lstKeyboardShortcuts.SelectedIndex >= lstKeyboardShortcuts.Items.Count Then Return
|
||||
|
||||
Dim keysValue As Keys = (hotModifyKeyboardShortcut.KeyCode And Keys.KeyCode) Or _
|
||||
(hotModifyKeyboardShortcut.HotkeyModifiers And Keys.Modifiers)
|
||||
|
||||
Dim hadFocus As Boolean = hotModifyKeyboardShortcut.ContainsFocus
|
||||
|
||||
Dim command As ShortcutCommand = GetSelectedShortcutCommand()
|
||||
Dim newShortcutKey As New ShortcutKey(keysValue)
|
||||
|
||||
If Not command = ShortcutCommand.None Then
|
||||
Dim oldShortcutKey As ShortcutKey = TryCast(lstKeyboardShortcuts.SelectedItem, ShortcutKey)
|
||||
If oldShortcutKey IsNot Nothing Then
|
||||
_keyboardShortcutMap.Remove(command, oldShortcutKey)
|
||||
End If
|
||||
_keyboardShortcutMap.Add(command, newShortcutKey)
|
||||
End If
|
||||
|
||||
lstKeyboardShortcuts.Items(lstKeyboardShortcuts.SelectedIndex) = newShortcutKey
|
||||
|
||||
If hadFocus Then
|
||||
hotModifyKeyboardShortcut.Focus()
|
||||
hotModifyKeyboardShortcut.Select(hotModifyKeyboardShortcut.TextLength, 0)
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Private Function GetSelectedShortcutCommand() As ShortcutCommand
|
||||
If Not (lvKeyboardCommands.SelectedItems.Count = 1) Then Return ShortcutCommand.None
|
||||
|
||||
Dim selectedItem As ListViewItem = lvKeyboardCommands.SelectedItems(0)
|
||||
If selectedItem Is _previousTabListViewItem Then
|
||||
Return ShortcutCommand.PreviousTab
|
||||
ElseIf selectedItem Is _nextTabListViewItem Then
|
||||
Return ShortcutCommand.NextTab
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Sub EnableKeyboardShortcutControls(Optional ByVal enable As Boolean = True)
|
||||
lblKeyboardCommand.Visible = enable
|
||||
lblKeyboardShortcuts.Enabled = enable
|
||||
lstKeyboardShortcuts.Enabled = enable
|
||||
btnNewKeyboardShortcut.Enabled = enable
|
||||
btnResetKeyboardShortcuts.Enabled = enable
|
||||
|
||||
If Not enable Then
|
||||
btnDeleteKeyboardShortcut.Enabled = False
|
||||
grpModifyKeyboardShortcut.Enabled = False
|
||||
hotModifyKeyboardShortcut.Enabled = False
|
||||
|
||||
lstKeyboardShortcuts.Items.Clear()
|
||||
hotModifyKeyboardShortcut.Text = String.Empty
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
End Namespace
|
||||
32
mRemoteV1/Forms/OptionsPages/OptionsPage.vb
Normal file
32
mRemoteV1/Forms/OptionsPages/OptionsPage.vb
Normal file
@@ -0,0 +1,32 @@
|
||||
Imports System.ComponentModel
|
||||
|
||||
Namespace Forms.OptionsPages
|
||||
Public Class OptionsPage
|
||||
Inherits UserControl
|
||||
|
||||
#Region "Public Properties"
|
||||
<Browsable(False)> _
|
||||
Public Overridable Property PageName() As String
|
||||
|
||||
Public Overridable Property PageIcon() As Icon
|
||||
#End Region
|
||||
|
||||
#Region "Public Methods"
|
||||
Public Overridable Sub ApplyLanguage()
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overridable Sub LoadSettings()
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overridable Sub SaveSettings()
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overridable Sub RevertSettings()
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
End Namespace
|
||||
191
mRemoteV1/Forms/OptionsPages/SqlServerPage.Designer.vb
generated
Normal file
191
mRemoteV1/Forms/OptionsPages/SqlServerPage.Designer.vb
generated
Normal file
@@ -0,0 +1,191 @@
|
||||
Namespace Forms.OptionsPages
|
||||
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class SqlServerPage
|
||||
Inherits OptionsPage
|
||||
|
||||
'UserControl 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()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(SqlServerPage))
|
||||
Me.lblSQLDatabaseName = New System.Windows.Forms.Label()
|
||||
Me.txtSQLDatabaseName = New System.Windows.Forms.TextBox()
|
||||
Me.lblExperimental = New System.Windows.Forms.Label()
|
||||
Me.chkUseSQLServer = New System.Windows.Forms.CheckBox()
|
||||
Me.lblSQLUsername = New System.Windows.Forms.Label()
|
||||
Me.txtSQLPassword = New System.Windows.Forms.TextBox()
|
||||
Me.lblSQLInfo = New System.Windows.Forms.Label()
|
||||
Me.lblSQLServer = New System.Windows.Forms.Label()
|
||||
Me.txtSQLUsername = New System.Windows.Forms.TextBox()
|
||||
Me.txtSQLServer = New System.Windows.Forms.TextBox()
|
||||
Me.lblSQLPassword = New System.Windows.Forms.Label()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'lblSQLDatabaseName
|
||||
'
|
||||
Me.lblSQLDatabaseName.Enabled = False
|
||||
Me.lblSQLDatabaseName.Location = New System.Drawing.Point(23, 132)
|
||||
Me.lblSQLDatabaseName.Name = "lblSQLDatabaseName"
|
||||
Me.lblSQLDatabaseName.Size = New System.Drawing.Size(111, 13)
|
||||
Me.lblSQLDatabaseName.TabIndex = 16
|
||||
Me.lblSQLDatabaseName.Text = "Database:"
|
||||
Me.lblSQLDatabaseName.TextAlign = System.Drawing.ContentAlignment.TopRight
|
||||
'
|
||||
'txtSQLDatabaseName
|
||||
'
|
||||
Me.txtSQLDatabaseName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.txtSQLDatabaseName.Enabled = False
|
||||
Me.txtSQLDatabaseName.Location = New System.Drawing.Point(140, 130)
|
||||
Me.txtSQLDatabaseName.Name = "txtSQLDatabaseName"
|
||||
Me.txtSQLDatabaseName.Size = New System.Drawing.Size(153, 20)
|
||||
Me.txtSQLDatabaseName.TabIndex = 17
|
||||
'
|
||||
'lblExperimental
|
||||
'
|
||||
Me.lblExperimental.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.lblExperimental.Font = New System.Drawing.Font("Segoe UI", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.World)
|
||||
Me.lblExperimental.ForeColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
|
||||
Me.lblExperimental.Location = New System.Drawing.Point(3, 0)
|
||||
Me.lblExperimental.Name = "lblExperimental"
|
||||
Me.lblExperimental.Size = New System.Drawing.Size(596, 25)
|
||||
Me.lblExperimental.TabIndex = 11
|
||||
Me.lblExperimental.Text = "EXPERIMENTAL"
|
||||
Me.lblExperimental.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'chkUseSQLServer
|
||||
'
|
||||
Me.chkUseSQLServer.AutoSize = True
|
||||
Me.chkUseSQLServer.Location = New System.Drawing.Point(3, 76)
|
||||
Me.chkUseSQLServer.Name = "chkUseSQLServer"
|
||||
Me.chkUseSQLServer.Size = New System.Drawing.Size(234, 17)
|
||||
Me.chkUseSQLServer.TabIndex = 13
|
||||
Me.chkUseSQLServer.Text = "Use SQL Server to load && save connections"
|
||||
Me.chkUseSQLServer.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblSQLUsername
|
||||
'
|
||||
Me.lblSQLUsername.Enabled = False
|
||||
Me.lblSQLUsername.Location = New System.Drawing.Point(23, 158)
|
||||
Me.lblSQLUsername.Name = "lblSQLUsername"
|
||||
Me.lblSQLUsername.Size = New System.Drawing.Size(111, 13)
|
||||
Me.lblSQLUsername.TabIndex = 18
|
||||
Me.lblSQLUsername.Text = "Username:"
|
||||
Me.lblSQLUsername.TextAlign = System.Drawing.ContentAlignment.TopRight
|
||||
'
|
||||
'txtSQLPassword
|
||||
'
|
||||
Me.txtSQLPassword.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.txtSQLPassword.Enabled = False
|
||||
Me.txtSQLPassword.Location = New System.Drawing.Point(140, 182)
|
||||
Me.txtSQLPassword.Name = "txtSQLPassword"
|
||||
Me.txtSQLPassword.Size = New System.Drawing.Size(153, 20)
|
||||
Me.txtSQLPassword.TabIndex = 21
|
||||
Me.txtSQLPassword.UseSystemPasswordChar = True
|
||||
'
|
||||
'lblSQLInfo
|
||||
'
|
||||
Me.lblSQLInfo.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.lblSQLInfo.Font = New System.Drawing.Font("Segoe UI", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.World)
|
||||
Me.lblSQLInfo.ForeColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
|
||||
Me.lblSQLInfo.Location = New System.Drawing.Point(3, 25)
|
||||
Me.lblSQLInfo.Name = "lblSQLInfo"
|
||||
Me.lblSQLInfo.Size = New System.Drawing.Size(596, 25)
|
||||
Me.lblSQLInfo.TabIndex = 12
|
||||
Me.lblSQLInfo.Text = "Please see Help - Getting started - SQL Configuration for more Info!"
|
||||
Me.lblSQLInfo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'lblSQLServer
|
||||
'
|
||||
Me.lblSQLServer.Enabled = False
|
||||
Me.lblSQLServer.Location = New System.Drawing.Point(23, 106)
|
||||
Me.lblSQLServer.Name = "lblSQLServer"
|
||||
Me.lblSQLServer.Size = New System.Drawing.Size(111, 13)
|
||||
Me.lblSQLServer.TabIndex = 14
|
||||
Me.lblSQLServer.Text = "SQL Server:"
|
||||
Me.lblSQLServer.TextAlign = System.Drawing.ContentAlignment.TopRight
|
||||
'
|
||||
'txtSQLUsername
|
||||
'
|
||||
Me.txtSQLUsername.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.txtSQLUsername.Enabled = False
|
||||
Me.txtSQLUsername.Location = New System.Drawing.Point(140, 156)
|
||||
Me.txtSQLUsername.Name = "txtSQLUsername"
|
||||
Me.txtSQLUsername.Size = New System.Drawing.Size(153, 20)
|
||||
Me.txtSQLUsername.TabIndex = 19
|
||||
'
|
||||
'txtSQLServer
|
||||
'
|
||||
Me.txtSQLServer.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.txtSQLServer.Enabled = False
|
||||
Me.txtSQLServer.Location = New System.Drawing.Point(140, 103)
|
||||
Me.txtSQLServer.Name = "txtSQLServer"
|
||||
Me.txtSQLServer.Size = New System.Drawing.Size(153, 20)
|
||||
Me.txtSQLServer.TabIndex = 15
|
||||
'
|
||||
'lblSQLPassword
|
||||
'
|
||||
Me.lblSQLPassword.Enabled = False
|
||||
Me.lblSQLPassword.Location = New System.Drawing.Point(23, 184)
|
||||
Me.lblSQLPassword.Name = "lblSQLPassword"
|
||||
Me.lblSQLPassword.Size = New System.Drawing.Size(111, 13)
|
||||
Me.lblSQLPassword.TabIndex = 20
|
||||
Me.lblSQLPassword.Text = "Password:"
|
||||
Me.lblSQLPassword.TextAlign = System.Drawing.ContentAlignment.TopRight
|
||||
'
|
||||
'SqlServerPage
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.Controls.Add(Me.lblSQLDatabaseName)
|
||||
Me.Controls.Add(Me.txtSQLDatabaseName)
|
||||
Me.Controls.Add(Me.lblExperimental)
|
||||
Me.Controls.Add(Me.chkUseSQLServer)
|
||||
Me.Controls.Add(Me.lblSQLUsername)
|
||||
Me.Controls.Add(Me.txtSQLPassword)
|
||||
Me.Controls.Add(Me.lblSQLInfo)
|
||||
Me.Controls.Add(Me.lblSQLServer)
|
||||
Me.Controls.Add(Me.txtSQLUsername)
|
||||
Me.Controls.Add(Me.txtSQLServer)
|
||||
Me.Controls.Add(Me.lblSQLPassword)
|
||||
Me.Name = "SqlServerPage"
|
||||
Me.PageIcon = CType(resources.GetObject("$this.PageIcon"), System.Drawing.Icon)
|
||||
Me.Size = New System.Drawing.Size(610, 489)
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents lblSQLDatabaseName As System.Windows.Forms.Label
|
||||
Friend WithEvents txtSQLDatabaseName As System.Windows.Forms.TextBox
|
||||
Friend WithEvents lblExperimental As System.Windows.Forms.Label
|
||||
Friend WithEvents chkUseSQLServer As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents lblSQLUsername As System.Windows.Forms.Label
|
||||
Friend WithEvents txtSQLPassword As System.Windows.Forms.TextBox
|
||||
Friend WithEvents lblSQLInfo As System.Windows.Forms.Label
|
||||
Friend WithEvents lblSQLServer As System.Windows.Forms.Label
|
||||
Friend WithEvents txtSQLUsername As System.Windows.Forms.TextBox
|
||||
Friend WithEvents txtSQLServer As System.Windows.Forms.TextBox
|
||||
Friend WithEvents lblSQLPassword As System.Windows.Forms.Label
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
145
mRemoteV1/Forms/OptionsPages/SqlServerPage.resx
Normal file
145
mRemoteV1/Forms/OptionsPages/SqlServerPage.resx
Normal file
@@ -0,0 +1,145 @@
|
||||
<?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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.PageIcon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
AAD///8A////AP///wD///8A////AP///wCZmZkNlZWVMZGRkS+MjIwH////AP///wD///8A////AP//
|
||||
/wD///8A////AP///wD///8Ao6OjIaGhoZ2fn5/woaGh/6urq/+np6f/lZWV/42NjeeJiYmKhoaGFv//
|
||||
/wD///8A////AP///wD///8Ap6enSqWlpfTOzs7/7e3t//T09P/19fX/9PT0/+/v7//i4uL/urq6/4qK
|
||||
iueGhoY1////AP///wD///8A////AKmpqere3t7/8/Pz/9vb2//S0tL/29vb/9bW1v/AwMD/ycnJ/+bm
|
||||
5v/ExMT/i4uL6v///wD///8A////AP///wCsrKzq8PDw/97e3v/U1NT/0tLS/9vb2//W1tb/v7+//7Cw
|
||||
sP+zs7P/3t7e/5CQkOr///8A////AP///wD///8Arq6u6vLy8v/i4uL/2NjY/9XV1f/c3Nz/2NjY/8DA
|
||||
wP+zs7P/t7e3/+Dg4P+Wlpbq////AP///wD///8A////ALCwsOrz8/P/5+fn/93d3f/Z2dn/4ODg/9vb
|
||||
2//ExMT/uLi4/7u7u//h4eH/m5ub6v///wD///8A////AP///wCysrLq9PT0/+rq6v/h4eH/3d3d/+Pj
|
||||
4//e3t7/ycnJ/729vf+/v7//4uLi/56enur///8A////AP///wD///8AtLS06vX19f/u7u7/5ubm/+Li
|
||||
4v/m5ub/4eHh/83Nzf/CwsL/wsLC/+Pj4/+goKDq////AP///wD///8A////ALW1ter29vb/6+vr/97e
|
||||
3v/W1tb/1dXV/9HR0f/Dw8P/vLy8/8DAwP/l5eX/o6Oj6v///wD///8A////AP///wC3t7fq9/f3/+fn
|
||||
5//v7+//9vb2//v7+//6+vr/8PDw/97e3v/Dw8P/5ubm/6Wlper///8A////AP///wD///8Aubm56vj4
|
||||
+P/+/v7/////////////////////////////////+/v7/+rq6v+np6fq////AP///wD///8A////ALq6
|
||||
ur/h4eH//v7+//////////////////////////////////v7+//Pz8//qampof///wD///8A////AP//
|
||||
/wC8vLwqu7u70dDQ0P/o6Oj/8/Pz//39/f/8/Pz/7e3t/+Dg4P/CwsL/ra2tw6ysrBv///8A////AP//
|
||||
/wD///8A////ALy8vAe7u7tVurq6rri4uNa3t7f7tra2+bS0tM2zs7OpsbGxRq+vrwP///8A////AP//
|
||||
/wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
|
||||
/wD///8A/D+sQeAHrEHAA6xBwAOsQcADrEHAA6xBwAOsQcADrEHAA6xBwAOsQcADrEHAA6xBwAOsQcAD
|
||||
rEHgB6xB//+sQQ==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
66
mRemoteV1/Forms/OptionsPages/SqlServerPage.vb
Normal file
66
mRemoteV1/Forms/OptionsPages/SqlServerPage.vb
Normal file
@@ -0,0 +1,66 @@
|
||||
Imports mRemoteNG.My
|
||||
Imports mRemoteNG.App
|
||||
Imports mRemoteNG.App.Info
|
||||
Imports mRemoteNG.Security
|
||||
|
||||
Namespace Forms.OptionsPages
|
||||
Public Class SqlServerPage
|
||||
Public Overrides Property PageName() As String
|
||||
Get
|
||||
Return Language.strSQLServer.TrimEnd(":")
|
||||
End Get
|
||||
Set(value As String)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Overrides Sub ApplyLanguage()
|
||||
MyBase.ApplyLanguage()
|
||||
|
||||
lblExperimental.Text = Language.strExperimental.ToUpper
|
||||
lblSQLInfo.Text = Language.strSQLInfo
|
||||
|
||||
chkUseSQLServer.Text = Language.strUseSQLServer
|
||||
lblSQLServer.Text = Language.strLabelHostname
|
||||
lblSQLDatabaseName.Text = Language.strLabelSQLServerDatabaseName
|
||||
lblSQLUsername.Text = Language.strLabelUsername
|
||||
lblSQLPassword.Text = Language.strLabelPassword
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub LoadSettings()
|
||||
MyBase.SaveSettings()
|
||||
|
||||
chkUseSQLServer.Checked = My.Settings.UseSQLServer
|
||||
txtSQLServer.Text = My.Settings.SQLHost
|
||||
txtSQLDatabaseName.Text = My.Settings.SQLDatabaseName
|
||||
txtSQLUsername.Text = My.Settings.SQLUser
|
||||
txtSQLPassword.Text = Crypt.Decrypt(My.Settings.SQLPass, General.EncryptionKey)
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub SaveSettings()
|
||||
MyBase.SaveSettings()
|
||||
|
||||
My.Settings.UseSQLServer = chkUseSQLServer.Checked
|
||||
My.Settings.SQLHost = txtSQLServer.Text
|
||||
My.Settings.SQLDatabaseName = txtSQLDatabaseName.Text
|
||||
My.Settings.SQLUser = txtSQLUsername.Text
|
||||
My.Settings.SQLPass = Crypt.Encrypt(txtSQLPassword.Text, General.EncryptionKey)
|
||||
|
||||
Runtime.Startup.DestroySQLUpdateHandlerAndStopTimer()
|
||||
frmMain.UsingSqlServer = My.Settings.UseSQLServer
|
||||
If My.Settings.UseSQLServer Then
|
||||
Runtime.Startup.CreateSQLUpdateHandlerAndStartTimer()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub chkUseSQLServer_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) Handles chkUseSQLServer.CheckedChanged
|
||||
lblSQLServer.Enabled = chkUseSQLServer.Checked
|
||||
lblSQLDatabaseName.Enabled = chkUseSQLServer.Checked
|
||||
lblSQLUsername.Enabled = chkUseSQLServer.Checked
|
||||
lblSQLPassword.Enabled = chkUseSQLServer.Checked
|
||||
txtSQLServer.Enabled = chkUseSQLServer.Checked
|
||||
txtSQLDatabaseName.Enabled = chkUseSQLServer.Checked
|
||||
txtSQLUsername.Enabled = chkUseSQLServer.Checked
|
||||
txtSQLPassword.Enabled = chkUseSQLServer.Checked
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
94
mRemoteV1/Forms/OptionsPages/StartupExitPage.Designer.vb
generated
Normal file
94
mRemoteV1/Forms/OptionsPages/StartupExitPage.Designer.vb
generated
Normal file
@@ -0,0 +1,94 @@
|
||||
Namespace Forms.OptionsPages
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class StartupExitPage
|
||||
Inherits OptionsPage
|
||||
|
||||
'UserControl 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()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(StartupExitPage))
|
||||
Me.chkReconnectOnStart = New System.Windows.Forms.CheckBox()
|
||||
Me.chkSaveConsOnExit = New System.Windows.Forms.CheckBox()
|
||||
Me.chkSingleInstance = New System.Windows.Forms.CheckBox()
|
||||
Me.chkProperInstallationOfComponentsAtStartup = New System.Windows.Forms.CheckBox()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'chkReconnectOnStart
|
||||
'
|
||||
Me.chkReconnectOnStart.AutoSize = True
|
||||
Me.chkReconnectOnStart.Location = New System.Drawing.Point(3, 24)
|
||||
Me.chkReconnectOnStart.Name = "chkReconnectOnStart"
|
||||
Me.chkReconnectOnStart.Size = New System.Drawing.Size(273, 17)
|
||||
Me.chkReconnectOnStart.TabIndex = 7
|
||||
Me.chkReconnectOnStart.Text = "Reconnect to previously opened sessions on startup"
|
||||
Me.chkReconnectOnStart.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkSaveConsOnExit
|
||||
'
|
||||
Me.chkSaveConsOnExit.AutoSize = True
|
||||
Me.chkSaveConsOnExit.Location = New System.Drawing.Point(3, 0)
|
||||
Me.chkSaveConsOnExit.Name = "chkSaveConsOnExit"
|
||||
Me.chkSaveConsOnExit.Size = New System.Drawing.Size(146, 17)
|
||||
Me.chkSaveConsOnExit.TabIndex = 6
|
||||
Me.chkSaveConsOnExit.Text = "Save connections on exit"
|
||||
Me.chkSaveConsOnExit.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkSingleInstance
|
||||
'
|
||||
Me.chkSingleInstance.AutoSize = True
|
||||
Me.chkSingleInstance.Location = New System.Drawing.Point(3, 48)
|
||||
Me.chkSingleInstance.Name = "chkSingleInstance"
|
||||
Me.chkSingleInstance.Size = New System.Drawing.Size(366, 17)
|
||||
Me.chkSingleInstance.TabIndex = 8
|
||||
Me.chkSingleInstance.Text = "Allow only a single instance of the application (mRemote restart required)"
|
||||
Me.chkSingleInstance.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkProperInstallationOfComponentsAtStartup
|
||||
'
|
||||
Me.chkProperInstallationOfComponentsAtStartup.AutoSize = True
|
||||
Me.chkProperInstallationOfComponentsAtStartup.Location = New System.Drawing.Point(3, 72)
|
||||
Me.chkProperInstallationOfComponentsAtStartup.Name = "chkProperInstallationOfComponentsAtStartup"
|
||||
Me.chkProperInstallationOfComponentsAtStartup.Size = New System.Drawing.Size(262, 17)
|
||||
Me.chkProperInstallationOfComponentsAtStartup.TabIndex = 9
|
||||
Me.chkProperInstallationOfComponentsAtStartup.Text = "Check proper installation of components at startup"
|
||||
Me.chkProperInstallationOfComponentsAtStartup.UseVisualStyleBackColor = True
|
||||
'
|
||||
'StartupExitPage
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.Controls.Add(Me.chkReconnectOnStart)
|
||||
Me.Controls.Add(Me.chkSaveConsOnExit)
|
||||
Me.Controls.Add(Me.chkSingleInstance)
|
||||
Me.Controls.Add(Me.chkProperInstallationOfComponentsAtStartup)
|
||||
Me.Name = "StartupExitPage"
|
||||
Me.PageIcon = CType(resources.GetObject("$this.PageIcon"), System.Drawing.Icon)
|
||||
Me.Size = New System.Drawing.Size(610, 489)
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents chkReconnectOnStart As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkSaveConsOnExit As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkSingleInstance As System.Windows.Forms.CheckBox
|
||||
Friend WithEvents chkProperInstallationOfComponentsAtStartup As System.Windows.Forms.CheckBox
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user