mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-18 22:59:41 +08:00
Compare commits
348 Commits
v1.77Alpha
...
feature/rd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
756950ff4e | ||
|
|
11ea575898 | ||
|
|
9257b7ac52 | ||
|
|
28d131f74d | ||
|
|
76e1ae3596 | ||
|
|
8357cfc9b5 | ||
|
|
1250f389af | ||
|
|
d0ae6ee21a | ||
|
|
40f5bd9444 | ||
|
|
c3ea05b862 | ||
|
|
488c6f5f64 | ||
|
|
a1940e3ab9 | ||
|
|
eda873911a | ||
|
|
048f890dcb | ||
|
|
28c31fc101 | ||
|
|
852c6576cf | ||
|
|
00a5fc0142 | ||
|
|
48cca34055 | ||
|
|
b2c5298400 | ||
|
|
cf5d5e6974 | ||
|
|
3266485307 | ||
|
|
d27ae45512 | ||
|
|
c9f0ea47b7 | ||
|
|
d5100660fb | ||
|
|
5c07327467 | ||
|
|
1e374d3a25 | ||
|
|
d68c419bab | ||
|
|
a9c4d0dee5 | ||
|
|
75a453e598 | ||
|
|
404f23e7e6 | ||
|
|
104be16061 | ||
|
|
742301edf8 | ||
|
|
c3734f2e09 | ||
|
|
e0cd4f2e0a | ||
|
|
db6042a30e | ||
|
|
0e233e7027 | ||
|
|
8e5d41bfea | ||
|
|
8bb03195b5 | ||
|
|
de2bafd5a0 | ||
|
|
4c08d06e93 | ||
|
|
ab5b58f3ae | ||
|
|
31f637bc51 | ||
|
|
fbcfdb3fea | ||
|
|
b1c650bb72 | ||
|
|
209a3fb381 | ||
|
|
772a11cb1d | ||
|
|
758f7770a1 | ||
|
|
b319eb188a | ||
|
|
8ad7547640 | ||
|
|
8b060745ef | ||
|
|
baf2037ca1 | ||
|
|
7bf00e30e6 | ||
|
|
55c983c565 | ||
|
|
6a4cd70811 | ||
|
|
652a580ec6 | ||
|
|
0d2a2134b9 | ||
|
|
a330d3e943 | ||
|
|
0034f78edc | ||
|
|
27e71ebfc7 | ||
|
|
f0f3ddef87 | ||
|
|
f65478ee36 | ||
|
|
4bd7d63d9c | ||
|
|
0343254cad | ||
|
|
9aaafa5015 | ||
|
|
04bd78e91a | ||
|
|
7ce17c7fb3 | ||
|
|
2a796d3bf5 | ||
|
|
944aa6b13e | ||
|
|
58add600d6 | ||
|
|
b1089de1ad | ||
|
|
69c1e2ccc2 | ||
|
|
6ec23d9d69 | ||
|
|
de3072c67e | ||
|
|
35f6d3eb90 | ||
|
|
f0ffcc6944 | ||
|
|
5ab3f71551 | ||
|
|
cef3b9294d | ||
|
|
0008631771 | ||
|
|
8e5caaca55 | ||
|
|
8c962e8b60 | ||
|
|
7ebcba3c21 | ||
|
|
7ac45dbd32 | ||
|
|
b83488d08a | ||
|
|
5528b701fb | ||
|
|
8767d103f0 | ||
|
|
ca66656a8e | ||
|
|
41e299aaaf | ||
|
|
c3f44ef70a | ||
|
|
fa44e66bd9 | ||
|
|
0b944c4222 | ||
|
|
11abc789a0 | ||
|
|
15e2cdaad0 | ||
|
|
10b6973f0d | ||
|
|
24cd9f257c | ||
|
|
8ecb49709e | ||
|
|
e12d20ab85 | ||
|
|
8b7f7b16a8 | ||
|
|
117e57d7b0 | ||
|
|
56b3f9355a | ||
|
|
70af08616f | ||
|
|
6066cb708e | ||
|
|
c1b6bd4679 | ||
|
|
88617759f6 | ||
|
|
3df98602ee | ||
|
|
3da989e37f | ||
|
|
f735237b3a | ||
|
|
125330b695 | ||
|
|
11199eabf3 | ||
|
|
12b4eb64ba | ||
|
|
d62fd25db5 | ||
|
|
58851aadb0 | ||
|
|
322049196c | ||
|
|
ce85801dcf | ||
|
|
04ad29d7c9 | ||
|
|
92f532c694 | ||
|
|
9188979367 | ||
|
|
b21379952b | ||
|
|
900c5c8351 | ||
|
|
5cab342c8c | ||
|
|
69e4bc2650 | ||
|
|
cabd712b75 | ||
|
|
fe4266a41e | ||
|
|
07fa8232e4 | ||
|
|
d02ec9bec6 | ||
|
|
47a508b9ea | ||
|
|
6c620b09c9 | ||
|
|
cb822c44ce | ||
|
|
aa9d5ce04e | ||
|
|
8876cb91c9 | ||
|
|
91b1007083 | ||
|
|
17e227236f | ||
|
|
22ba4c86bb | ||
|
|
017d9c8290 | ||
|
|
2f7c930859 | ||
|
|
983637973b | ||
|
|
bb2e0f0b7d | ||
|
|
0d8a3b84fe | ||
|
|
3503652df3 | ||
|
|
1a82e48b3d | ||
|
|
f5a86814a9 | ||
|
|
bde3b691ff | ||
|
|
ed53db1bdc | ||
|
|
ecbd62676b | ||
|
|
b343ebec15 | ||
|
|
99e1de2503 | ||
|
|
f7700b9279 | ||
|
|
4007568d93 | ||
|
|
208134e970 | ||
|
|
bda5d481b2 | ||
|
|
00609f5a5d | ||
|
|
09f52a32a6 | ||
|
|
73c14a9ad0 | ||
|
|
8cc826a57b | ||
|
|
02e17f9845 | ||
|
|
3e18a25ed3 | ||
|
|
4c31106839 | ||
|
|
2b8ff1d090 | ||
|
|
9e7690054d | ||
|
|
2e6fdce592 | ||
|
|
eee40c2130 | ||
|
|
818fe3adfc | ||
|
|
f6bfaf415f | ||
|
|
35a3190b28 | ||
|
|
65edebca2e | ||
|
|
aef9be8d9b | ||
|
|
3acb9f1842 | ||
|
|
9f7271178f | ||
|
|
5038deaf97 | ||
|
|
d6e04156f1 | ||
|
|
07d7f10622 | ||
|
|
78a1058aa1 | ||
|
|
f16894869a | ||
|
|
31240fa50d | ||
|
|
0f7c2c83b3 | ||
|
|
22e43c84fc | ||
|
|
f9160677c3 | ||
|
|
0b1f04abe3 | ||
|
|
c28b4d39ad | ||
|
|
519efe633f | ||
|
|
cf680eba4a | ||
|
|
63c78f986d | ||
|
|
57d8b0c803 | ||
|
|
cae906d226 | ||
|
|
1ebe773b6e | ||
|
|
594f005476 | ||
|
|
027e37545b | ||
|
|
4fc82ab7c1 | ||
|
|
565e163b3e | ||
|
|
e6c26dde7b | ||
|
|
6e8acc0f4c | ||
|
|
b7fff50d31 | ||
|
|
a2d240ee4a | ||
|
|
a69f6925e9 | ||
|
|
c4544832d2 | ||
|
|
e9dcb986f9 | ||
|
|
93b6fe7aab | ||
|
|
d6aadef2b8 | ||
|
|
4e0fb6bf65 | ||
|
|
93c4f99619 | ||
|
|
7c489cb9aa | ||
|
|
1d74cc8225 | ||
|
|
8021529a41 | ||
|
|
2791f60a58 | ||
|
|
88e88be756 | ||
|
|
13d42ae288 | ||
|
|
5408cc6015 | ||
|
|
c97fbba173 | ||
|
|
79d9e806d5 | ||
|
|
12589ffbe0 | ||
|
|
f21b62241a | ||
|
|
b6cd10b51e | ||
|
|
e7344cdc24 | ||
|
|
4e118493d2 | ||
|
|
590b526079 | ||
|
|
b051e8cc46 | ||
|
|
952c2e570e | ||
|
|
d9834eae6d | ||
|
|
1901686a2a | ||
|
|
9efe4f41bf | ||
|
|
3fad296e3f | ||
|
|
100b101e60 | ||
|
|
b66022fb64 | ||
|
|
3e354868ea | ||
|
|
a6fda6c76a | ||
|
|
7ea08a0f6b | ||
|
|
dda6726a43 | ||
|
|
70deb278e5 | ||
|
|
017934ab8e | ||
|
|
c8c98ebc02 | ||
|
|
939d49db57 | ||
|
|
9994a214b5 | ||
|
|
5d44ff8ca5 | ||
|
|
60cef9fa49 | ||
|
|
dda98b2902 | ||
|
|
19ddc9de97 | ||
|
|
7985344042 | ||
|
|
259768f92f | ||
|
|
e61716e25c | ||
|
|
99d747aabe | ||
|
|
d789e0d5a4 | ||
|
|
6524bbed43 | ||
|
|
9b9dfbe46a | ||
|
|
12c67f4244 | ||
|
|
cd66d335e8 | ||
|
|
20a33eb69f | ||
|
|
ee0fabca8e | ||
|
|
527d0b85ad | ||
|
|
4a72a0535b | ||
|
|
361d2246ed | ||
|
|
ffd8a9e87b | ||
|
|
be347da9f2 | ||
|
|
c01b2ca4be | ||
|
|
12ad4d2a22 | ||
|
|
18d992b96d | ||
|
|
59c74c6101 | ||
|
|
cf4f552595 | ||
|
|
c6a16823b0 | ||
|
|
0eb6185b6c | ||
|
|
d11e99b918 | ||
|
|
ff721ae820 | ||
|
|
dab605f50d | ||
|
|
cd40f04443 | ||
|
|
160e5696fe | ||
|
|
e98cd4ef55 | ||
|
|
79fddf1395 | ||
|
|
753e8bc049 | ||
|
|
2ae59b049c | ||
|
|
140429c931 | ||
|
|
ad756617dd | ||
|
|
8812cd18ad | ||
|
|
ce71fe2b06 | ||
|
|
360366b9f5 | ||
|
|
29f4123ab8 | ||
|
|
9fdcffda2f | ||
|
|
52d1b9a270 | ||
|
|
068f5942e7 | ||
|
|
703cefaf19 | ||
|
|
b9d326e9de | ||
|
|
06917327d8 | ||
|
|
df92aaae56 | ||
|
|
cafb03393c | ||
|
|
3d32557177 | ||
|
|
ea1f72b8b7 | ||
|
|
993b6759cc | ||
|
|
b89ff616f0 | ||
|
|
9e37959a50 | ||
|
|
40f740de59 | ||
|
|
500608b383 | ||
|
|
02c05a6c63 | ||
|
|
4b4444e8d7 | ||
|
|
bbeaf76a68 | ||
|
|
82c289b2f5 | ||
|
|
fd461b8e9e | ||
|
|
edda670b4f | ||
|
|
ccfac74cc3 | ||
|
|
0359e75de7 | ||
|
|
f709ea2a95 | ||
|
|
1cd7e27911 | ||
|
|
e17d0e990d | ||
|
|
43169bc512 | ||
|
|
0015300b19 | ||
|
|
a52c59a36b | ||
|
|
6ce89a9f57 | ||
|
|
78d2c42bdd | ||
|
|
fce7fdbee5 | ||
|
|
0ce8eafe6c | ||
|
|
c0b07307f5 | ||
|
|
8751bd75da | ||
|
|
15f23769d6 | ||
|
|
2d175fd575 | ||
|
|
01bfdf52ff | ||
|
|
bdeb4b4dcc | ||
|
|
bdfbb57504 | ||
|
|
c0eebdf74b | ||
|
|
5a317c5d3e | ||
|
|
af7c14b2f2 | ||
|
|
d151524ed9 | ||
|
|
175acc86e2 | ||
|
|
bb07acf45e | ||
|
|
38d1c756f3 | ||
|
|
6c89913bc6 | ||
|
|
efa72cb697 | ||
|
|
a31fec5fb9 | ||
|
|
2349d2320f | ||
|
|
166e5b73fa | ||
|
|
a39b87f9fd | ||
|
|
162f945a9e | ||
|
|
5be5f54351 | ||
|
|
dfe9f5b05c | ||
|
|
4c1e28fe39 | ||
|
|
bf67168c7a | ||
|
|
b30ed702d3 | ||
|
|
9c33caf74e | ||
|
|
65e1ab616b | ||
|
|
13c5dd7b72 | ||
|
|
b37dc9900c | ||
|
|
b27cd0c914 | ||
|
|
446b40d8a6 | ||
|
|
6ba1d28f13 | ||
|
|
01f4af6876 | ||
|
|
0ee173475e | ||
|
|
ae5abbd039 | ||
|
|
4f95722915 | ||
|
|
fb7095f2d3 | ||
|
|
c16689d936 | ||
|
|
9f3bf545bf | ||
|
|
09c8c97b4e | ||
|
|
4cb6c9e2e8 |
64
.github/CONTRIBUTING.md
vendored
64
.github/CONTRIBUTING.md
vendored
@@ -1,58 +1,24 @@
|
||||
# Welcome!
|
||||
**Hello, and welcome to the mRemoteNG project!**
|
||||
|
||||
We are really glad you are interested in contributing to mRemoteNG!
|
||||
Open source software is best when shared with others. This also applies to the work that goes into the software. Your ideas and passion are what make this software great!
|
||||
There are many ways that you can help improve mRemoteNG, even if you don't know how to program:
|
||||
|
||||
Open source software is best when shared with others. This also applies to the work that goes into the software. Your ideas and passion are what make this software great.
|
||||
- add documentation or "how-to" articles on the Wiki
|
||||
- answer support questions on the forum
|
||||
- add or improve a translation
|
||||
- submit a pull request for a bug or feature ticket
|
||||
|
||||
|
||||
### Ways you can contribute
|
||||
There are many ways that you can help improve mRemoteNG, even if you don't know how to program.
|
||||
|
||||
For example, you might:
|
||||
- add documentation or "how-to" articles on the [Wiki](https://github.com/mRemoteNG/mRemoteNG/wiki)
|
||||
- answer support questions on the [forum](http://forum.mremoteng.org)
|
||||
- [add or improve a translation](https://github.com/mRemoteNG/mRemoteNG/wiki/How-to-Help-Translating-mRemoteNG)
|
||||
- submit a [pull request](https://github.com/mRemoteNG/mRemoteNG/pulls) for a [bug or feature ticket](https://github.com/mRemoteNG/mRemoteNG/issues)
|
||||
|
||||
|
||||
# Submitting GitHub Issues
|
||||
The GitHub Issue tracker is our preferred channel for bug reports and feature requests.
|
||||
- For questions or general discussion, please use [our public Gitter chat](https://gitter.im/mRemoteNG/PublicChat) or the [forum](http://forum.mremoteng.org).
|
||||
- If you find a security vulnerability, do **NOT** open an issue. Email support@mremoteng.org instead.
|
||||
For questions or general discussion, please use [our public Gitter chat](https://gitter.im/mRemoteNG/PublicChat) or the [forum](http://forum.mremoteng.org).
|
||||
|
||||
### Bug reports
|
||||
A bug is any behavior that does not consistently produce the expected result.
|
||||
If you find a security vulnerability, do **NOT** open an issue. Email security@mremoteng.org instead.
|
||||
|
||||
Guidelines for bug reports:
|
||||
1. Do not open bug reports for questions.
|
||||
1. Use the GitHub Issue search to make sure your bug hasn't already been reported.
|
||||
1. Include as much detailed information as possible. We've included a default template when opening an issue to make this easier.
|
||||
You'll find all information on our GitHub workflow in our [Wiki](https://github.com/mRemoteNG/mRemoteNG/wiki), or you can use these links:
|
||||
|
||||
### Feature requests
|
||||
Feature requests are great! Take some time to compose a well thought out proposal. It's up to you to convince the project maintainers that your feature is a good idea. To ensure your request receives the consideration that it deserves, include as much detail as possible. For example:
|
||||
- What is the purpose of the new feature?
|
||||
- What situation led you to want this feature?
|
||||
- How does the application perform now and how would the new feature change this?
|
||||
- If applicable, consider including visual mock-ups to show us what you mean.
|
||||
- [Branches](https://github.com/mRemoteNG/mRemoteNG/wiki/Branches)
|
||||
- [Bug Repots](https://github.com/mRemoteNG/mRemoteNG/wiki/Bug-Reports)
|
||||
- [Feature Requests](https://github.com/mRemoteNG/mRemoteNG/wiki/Feature-Requests)
|
||||
- [Pull Requests](https://github.com/mRemoteNG/mRemoteNG/wiki/Pull-Requests)
|
||||
|
||||
# Pull requests
|
||||
Good pull requests are a huge help! If you haven't already, please consider reading [GitHub's guide to contributing to open source](https://guides.github.com/activities/contributing-to-open-source/)
|
||||
|
||||
Our requests when it comes to pull requests:
|
||||
- Be clear about what your PR seeks to do.
|
||||
- Keep your PR focused. It should be clear what code changed to achieve your stated goal.
|
||||
- Add or update tests when possible. Some of the code base is still very hard to effectively test. If you can, please try to create or update tests that relate to your PR.
|
||||
- Please talk with one of the project maintainers before starting work on large pull requests. Otherwise, you run the risk of putting a lot of time into a feature or refactor that gets denied.
|
||||
- If you have access to Static Code Analysis tools (like ReSharper), please don't analyze/fix everything in one giant PR. As great as these tools are, they can sometimes cause unintended problems.
|
||||
|
||||
# Code Style
|
||||
- Please make use of simple types and var where possible
|
||||
- Prefer "using" over .Dispose()
|
||||
- Avoid nesting "using"
|
||||
|
||||
# Your first contributions
|
||||
Want to help but don't know where to start? Check out the issues that we've labeled with [`Help Wanted`](https://github.com/mRemoteNG/mRemoteNG/issues?q=is%3Aissue+is%3Aopen+label%3A%22Help+Wanted%22) or [`ready`](https://github.com/mRemoteNG/mRemoteNG/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen%20label%3A%22ready%22). These will vary in difficulty, but should be possible for new contributors.
|
||||
|
||||
Want to help but don't know C#? Check out the issues that we've labeled with [`Documentation`](https://github.com/mRemoteNG/mRemoteNG/labels/Documentation).
|
||||
|
||||
Sorry, we currently do not have any tags for truly beginner-friendly issues :(
|
||||
Even if you don't know C# you can heck out the issues that we've labeled with [`Documentation`](https://github.com/mRemoteNG/mRemoteNG/labels/Documentation).
|
||||
|
||||
20
.github/PULL_REQUEST_TEMPLATE.md
vendored
20
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -15,15 +15,19 @@
|
||||
## Screenshots (if appropriate):
|
||||
|
||||
## Types of changes
|
||||
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
|
||||
- [ ] Bug fix (non-breaking change which fixes an issue)
|
||||
- [ ] New feature (non-breaking change which adds functionality)
|
||||
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
|
||||
<!--- What types of changes does your code introduce? -->
|
||||
<!--- Uncomment the line(s) that apply(s) to you pull request -->
|
||||
<!--- - Bug fix (non-breaking change which fixes an issue) -->
|
||||
<!--- - New feature (non-breaking change which adds functionality) -->
|
||||
<!--- - Breaking change (fix or feature that would cause existing functionality to change) -->
|
||||
<!--- - Updated translation -->
|
||||
|
||||
## Checklist:
|
||||
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
|
||||
<!--- Go over all the following points. All of them must apply to your pull request to be merged. -->
|
||||
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
|
||||
- [ ] My code follows the code style of this project.
|
||||
- [ ] My change requires a change to the documentation.
|
||||
- [ ] I have updated the documentation accordingly.
|
||||
- [ ] I have read the **CONTRIBUTING** document.
|
||||
- [ ] My code follows the code style of this project.
|
||||
- [ ] All Tests within VisualStudio are passing
|
||||
- [ ] This pull request does not target the master branch.
|
||||
- [ ] I have updated the changelog file accordingly, if necessary.
|
||||
- [ ] I have updated the documentation accordingly, if necessary.
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -285,4 +285,4 @@ InstallerProjects/Installer/Resources/License.rtf
|
||||
|
||||
# gh-pages info
|
||||
runlocal.bat
|
||||
/_site
|
||||
/_site
|
||||
|
||||
1487
CHANGELOG.TXT
1487
CHANGELOG.TXT
File diff suppressed because it is too large
Load Diff
1612
CHANGELOG.md
Normal file
1612
CHANGELOG.md
Normal file
File diff suppressed because it is too large
Load Diff
150
CREDITS.TXT
150
CREDITS.TXT
@@ -1,150 +0,0 @@
|
||||
Contributors
|
||||
============
|
||||
|
||||
Current mRemoteNG dev team:
|
||||
David Sparer (github.com/sparerd)
|
||||
Sean Kaim (github.com/kmscode)
|
||||
|
||||
Thanks for the awesome new website!
|
||||
Bennett Blodinger (github.com/benwa)
|
||||
|
||||
Joe Cefoli (github.com/jcefoli)
|
||||
countchappy (github.com/countchappy)
|
||||
Tony Lambert
|
||||
Julien Roncaglia (github.com/vbfox)
|
||||
github.com/peterchenadded
|
||||
Brandon Wulf (github.com/mrwulf)
|
||||
Pedro Rodrigues (github.com/pedro2555)
|
||||
github.com/dekelMP
|
||||
Faryan Rezagholi (github.com/farosch)
|
||||
Bruce (github.com/brucetp)
|
||||
Camilo Alvarez (github.com/jotatsu)
|
||||
github.com/DamianBis
|
||||
github.com/pfjason
|
||||
github.com/sirLoaf
|
||||
github.com/Fyers
|
||||
Vladimir Semenov (github.com/sli-pro)
|
||||
Stephan (github.com/st-schuler)
|
||||
Aleksey Reytsman (github.com/areytsman)
|
||||
Cristian Abelleira (github.com/CrAbelleira)
|
||||
github.com/MitchellBot
|
||||
|
||||
|
||||
Past Contributors
|
||||
=================
|
||||
|
||||
Felix Deimel - mRemote original developer
|
||||
Riley McArdle - mRemoteNG original developer
|
||||
|
||||
Hayato Iriumi (github.com/hiriumi)
|
||||
Jason Barbier
|
||||
Wiktor Beryt
|
||||
Lionel Caignec
|
||||
Ruben d'Arco
|
||||
Holger Henke
|
||||
Tom Hiller
|
||||
Apisitt Rattana
|
||||
Andreas Rehm
|
||||
David Vidmar
|
||||
github.com/Brandhor
|
||||
github.com/Kvarkas
|
||||
|
||||
|
||||
Translators
|
||||
===========
|
||||
|
||||
Eugenio "Ryo567" Mart<72>nez
|
||||
Mathieu Pape
|
||||
Emanuel Silva
|
||||
Robert Siwiec
|
||||
Hayato Iriumi
|
||||
Sebastien Thieury (github.com/SebThieu)
|
||||
Riza Emet
|
||||
Lukas Plachy (github.com/rheingold)
|
||||
Gyuha Shin
|
||||
Stefan (github.com/polluks)
|
||||
github.com/emazv72
|
||||
Vladimir Semenov (github.com/sli-pro)
|
||||
Marco Sousa (github.com/marcomsousa)
|
||||
github.com/wwj402
|
||||
github.com/Fyers
|
||||
github.com/pablomh
|
||||
|
||||
|
||||
Included Source Code
|
||||
====================
|
||||
|
||||
Command Line Arguments Parser
|
||||
Copyright <20> 2002 Richard Lopes
|
||||
MIT License
|
||||
http://www.codeproject.com/KB/recipes/command_line.aspx
|
||||
|
||||
FilteredPropertyGrid
|
||||
Copyright <20> 2006 Azuria
|
||||
http://www.codeproject.com/KB/cs/FilteredPropertyGrid.aspx
|
||||
|
||||
InputBox
|
||||
Copyright <20> 2016 Jan Slama
|
||||
http://www.csharp-examples.net/inputbox/
|
||||
|
||||
IP TextBox
|
||||
Copyright <20> 2005 mawnkay
|
||||
http://www.codeproject.com/Articles/11576/IP-TextBox
|
||||
|
||||
PortableSettingsProvider
|
||||
Copyright <20> 2014 crdx
|
||||
https://github.com/crdx/PortableSettingsProvider
|
||||
|
||||
|
||||
Included Components
|
||||
===================
|
||||
|
||||
ADTree
|
||||
Copyright <20> 2004 Marc Merritt
|
||||
Copyright <20> 2008 Felix Deimel
|
||||
http://www.codeproject.com/KB/selection/ADPickerCtrl.aspx
|
||||
|
||||
DockPanel Suite
|
||||
Copyright <20> 2018 @roken and @lextm (formerly Weifen Luo)
|
||||
MIT License
|
||||
https://github.com/dockpanelsuite/dockpanelsuite
|
||||
|
||||
GeckoFX
|
||||
Copyright <20> 2016 Tom Hindle
|
||||
Mozilla Public License
|
||||
https://bitbucket.org/geckofx/
|
||||
|
||||
log4net
|
||||
Copyright <20> 2001-2015 The Apache Software Foundation
|
||||
Apache License Version 2.0
|
||||
http://logging.apache.org/log4net/
|
||||
|
||||
Magic Library
|
||||
Copyright <20> 2002-2003 Crownwood Consulting, Ltd.
|
||||
Freely redistributable with attribution
|
||||
http://www.dotnetmagic.com/magic_download.html
|
||||
|
||||
PuTTY
|
||||
Copyright <20> 1997-2017 Simon Tatham
|
||||
MIT License
|
||||
http://www.chiark.greenend.org.uk/~sgtatham/putty/
|
||||
|
||||
Silk Icon Set
|
||||
Copyright <20> 2005-2008 FAMFAMFAM
|
||||
Creative Commons Attribution 2.5 License
|
||||
http://www.famfamfam.com/
|
||||
|
||||
SSH.NET
|
||||
Copyright <20> 2016
|
||||
MIT License
|
||||
https://github.com/sshnet/SSH.NET
|
||||
|
||||
VncSharp
|
||||
Copyright <20> 2004-2009 David Humphrey
|
||||
GNU General Public License (GPL) Version 2
|
||||
https://github.com/humphd/VncSharp
|
||||
|
||||
ObjectListView
|
||||
Copyright <20> 2006-2016 Phillip Piper
|
||||
GNU General Public License (GPL) Version 3
|
||||
https://sourceforge.net/projects/objectlistview/
|
||||
150
CREDITS.md
Normal file
150
CREDITS.md
Normal file
@@ -0,0 +1,150 @@
|
||||
# Contributors
|
||||
## Current mRemoteNG dev team
|
||||
David Sparer (http://github.com/sparerd)
|
||||
Sean Kaim (http://github.com/kmscode)
|
||||
Faryan Rezagholi (http://github.com/farosch)
|
||||
|
||||
Thanks for the awesome new website!
|
||||
Bennett Blodinger (http://github.com/benwa)
|
||||
|
||||
Joe Cefoli (http://github.com/jcefoli)
|
||||
countchappy (http://github.com/countchappy)
|
||||
Tony Lambert
|
||||
Julien Roncaglia (http://github.com/vbfox)
|
||||
http://github.com/peterchenadded
|
||||
Brandon Wulf (http://github.com/mrwulf)
|
||||
Pedro Rodrigues (http://github.com/pedro2555)
|
||||
http://github.com/dekelMP
|
||||
Bruce (http://github.com/brucetp)
|
||||
Camilo Alvarez (http://github.com/jotatsu)
|
||||
http://github.com/DamianBis
|
||||
http://github.com/pfjason
|
||||
http://github.com/sirLoaf
|
||||
http://github.com/Fyers
|
||||
Vladimir Semenov (http://github.com/sli-pro)
|
||||
Stephan (http://github.com/st-schuler)
|
||||
Aleksey Reytsman (http://github.com/areytsman)
|
||||
Cristian Abelleira (http://github.com/CrAbelleira)
|
||||
http://github.com/MitchellBot
|
||||
Filippo Ferrazini (http://github.com/Filippo125)
|
||||
|
||||
## Past Contributors
|
||||
Felix Deimel - mRemote original developer
|
||||
Riley McArdle - mRemoteNG original developer
|
||||
|
||||
Hayato Iriumi (http://github.com/hiriumi)
|
||||
Jason Barbier
|
||||
Wiktor Beryt
|
||||
Lionel Caignec
|
||||
Ruben d'Arco
|
||||
Holger Henke
|
||||
Tom Hiller
|
||||
Apisitt Rattana
|
||||
Andreas Rehm
|
||||
David Vidmar
|
||||
http://github.com/Brandhor
|
||||
Dimitrij (http://github.com/Kvarkas)
|
||||
|
||||
## Translators
|
||||
Eugenio "Ryo567" Martínez
|
||||
Mathieu Pape
|
||||
Emanuel Silva
|
||||
Robert Siwiec
|
||||
Hayato Iriumi
|
||||
Sebastien Thieury (http://github.com/SebThieu)
|
||||
Riza Emet
|
||||
Lukas Plachy (http://github.com/rheingold)
|
||||
Gyuha Shin
|
||||
Stefan (http://github.com/polluks)
|
||||
http://github.com/emazv72
|
||||
Vladimir Semenov (http://github.com/sli-pro)
|
||||
Marco Sousa (http://github.com/marcomsousa)
|
||||
http://github.com/wwj402
|
||||
http://github.com/Fyers
|
||||
http://github.com/pablomh
|
||||
Damian Szczepanik (http://github.com/damianszczepanik)
|
||||
Mant1kor (http://github.com/Mant1kor)
|
||||
|
||||
## Included Source Code
|
||||
Command Line Arguments Parser
|
||||
Copyright © 2002 Richard Lopes
|
||||
MIT License
|
||||
http://www.codeproject.com/KB/recipes/command_line.aspx
|
||||
|
||||
FilteredPropertyGrid
|
||||
Copyright © 2006 Azuria
|
||||
http://www.codeproject.com/KB/cs/FilteredPropertyGrid.aspx
|
||||
|
||||
InputBox
|
||||
Copyright © 2016 Jan Slama
|
||||
http://www.csharp-examples.net/inputbox/
|
||||
|
||||
IP TextBox
|
||||
Copyright © 2005 mawnkay
|
||||
http://www.codeproject.com/Articles/11576/IP-TextBox
|
||||
|
||||
PortableSettingsProvider
|
||||
Copyright © 2014 crdx
|
||||
https://github.com/crdx/PortableSettingsProvider
|
||||
|
||||
|
||||
## Included Components
|
||||
ADTree
|
||||
Copyright © 2004 Marc Merritt
|
||||
Copyright © 2008 Felix Deimel
|
||||
http://www.codeproject.com/KB/selection/ADPickerCtrl.aspx
|
||||
|
||||
DockPanel Suite
|
||||
Copyright © 2018 @roken and @lextm (formerly Weifen Luo)
|
||||
MIT License
|
||||
https://github.com/dockpanelsuite/dockpanelsuite
|
||||
|
||||
GeckoFX
|
||||
Copyright © 2016 Tom Hindle
|
||||
Mozilla Public License
|
||||
https://bitbucket.org/geckofx/
|
||||
|
||||
log4net
|
||||
Copyright © 2001-2015 The Apache Software Foundation
|
||||
Apache License Version 2.0
|
||||
http://logging.apache.org/log4net/
|
||||
|
||||
Magic Library
|
||||
Copyright © 2002-2003 Crownwood Consulting, Ltd.
|
||||
Freely redistributable with attribution
|
||||
http://www.dotnetmagic.com/magic_download.html
|
||||
|
||||
PuTTY
|
||||
Copyright © 1997-2017 Simon Tatham
|
||||
MIT License
|
||||
http://www.chiark.greenend.org.uk/~sgtatham/putty/
|
||||
|
||||
Silk Icon Set
|
||||
Copyright © 2005-2008 FAMFAMFAM
|
||||
Creative Commons Attribution 2.5 License
|
||||
http://www.famfamfam.com/
|
||||
|
||||
SSH.NET
|
||||
Copyright © 2016
|
||||
MIT License
|
||||
https://github.com/sshnet/SSH.NET
|
||||
|
||||
VncSharp
|
||||
Copyright © 2004-2009 David Humphrey
|
||||
GNU General Public License (GPL) Version 2
|
||||
https://github.com/humphd/VncSharp [Archived]
|
||||
|
||||
ObjectListView
|
||||
Copyright © 2006-2016 Phillip Piper
|
||||
GNU General Public License (GPL) Version 3
|
||||
https://sourceforge.net/projects/objectlistview/
|
||||
|
||||
Markdig
|
||||
Copyright © 2016-2019 Alexandre Mutel
|
||||
BSD 2-Clause "Simplified"
|
||||
https://github.com/lunet-io/markdig
|
||||
|
||||
ConsoleControl
|
||||
Copyright © 2015 Dave Kerr
|
||||
MIT License
|
||||
https://github.com/dwmkerr/consolecontrol
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
<Fragment>
|
||||
<ComponentGroup Id="CG.ProjectInfoFiles" Directory="INSTALLDIR">
|
||||
<Component Id="C.Changelog" Guid="*">
|
||||
<File Id="ChangelogFile" Name="Changelog.txt" Source="$(var.SolutionDir)CHANGELOG.TXT" KeyPath="yes" />
|
||||
<File Id="ChangelogFile" Name="Changelog.txt" Source="$(var.SolutionDir)CHANGELOG.md" KeyPath="yes" />
|
||||
</Component>
|
||||
<Component Id="C.Credits" Guid="*">
|
||||
<File Id="CreditsFile" Name="Credits.txt" Source="$(var.SolutionDir)CREDITS.TXT" KeyPath="yes" />
|
||||
<File Id="CreditsFile" Name="Credits.txt" Source="$(var.SolutionDir)CREDITS.md" KeyPath="yes" />
|
||||
</Component>
|
||||
<Component Id="C.License" Guid="*">
|
||||
<File Id="LicenseFile" Name="License.txt" Source="$(var.SolutionDir)COPYING.TXT" KeyPath="yes" />
|
||||
</Component>
|
||||
<Component Id="C.Readme" Guid="*">
|
||||
<File Id="ReadmeFile" Name="Readme.txt" Source="$(var.SolutionDir)README.TXT" KeyPath="yes" />
|
||||
<File Id="ReadmeFile" Name="Readme.txt" Source="$(var.SolutionDir)README.md" KeyPath="yes" />
|
||||
</Component>
|
||||
<Component Id="C.TileManifest" Guid="*">
|
||||
<File Id="TileManifest" Name="mRemoteNG.VisualElementsManifest.xml" Source="$(var.SolutionDir)mRemoteV1\bin\Release\mRemoteNG.VisualElementsManifest.xml" KeyPath="yes" />
|
||||
|
||||
@@ -44,7 +44,6 @@
|
||||
<Content Include="Resources\AppIcon.ico" />
|
||||
<Content Include="Resources\Installer_Header.png" />
|
||||
<Content Include="Resources\Installer_Side.png" />
|
||||
<Content Include="Resources\License.rtf" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="CustomActions" />
|
||||
@@ -110,18 +109,6 @@
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release Portable|x86' ">
|
||||
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteV1\bin\Release Portable;HelpFilesHarvestPath=$(SolutionDir)mRemoteV1\Resources\Help</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>REM Clean the TargetDir
|
||||
rmdir /S /Q "$(TargetDir)"
|
||||
|
||||
echo $(ConfigurationName) > buildenv.tmp
|
||||
|
||||
REM Harvest bin directory of the mRemoteV1 project
|
||||
"$(WIX)bin\heat.exe" dir "$(SolutionDir)mRemoteV1\bin\$(Configuration)" -ag -nologo -dr INSTALLDIR -var var.HarvestPath -srd -cg MandatoryComponents -template fragment -out "$(ProjectDir)Fragments\FilesFragment.wxs" -t "$(ProjectDir)Filters\Harvest_Filter.xslt"
|
||||
|
||||
REM Convert the license file "COPYING.TXT" to "License.rtf" to be shown in the installer GUI
|
||||
"$(ProjectDir)Resources\Pandoc\pandoc.exe" -s -t rtf -o "$(ProjectDir)\Resources\License.rtf" "$(SolutionDir)COPYING.TXT"</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>:: When passing paths to powershell scripts, check if the path ends with a backslash "\"
|
||||
:: If it does, then the backslash may be interpreted as an escape character. Add another backslash to cancel the first one.
|
||||
@@ -134,6 +121,18 @@ set /p buildenv=<buildenv.tmp
|
||||
:: IF "%25APPVEYOR_BUILD_FOLDER"=="" ( set cert_pwd= )
|
||||
|
||||
:: Call the post build powershell script
|
||||
powershell.exe -ExecutionPolicy Bypass -File "$(SolutionDir)Tools\postbuild_installer.ps1" -SolutionDir "$(SolutionDir)\" -TargetDir "%25cd%25" -TargetFileName "mRemoteNG.exe" -ConfigurationName "%25buildenv%25" -CertificatePath "$(CertPath)" -CertificatePassword "%25cert_pwd%25" -ExcludeFromSigning "PuTTYNG.exe"</PostBuildEvent>
|
||||
powershell.exe -ExecutionPolicy Bypass -File "$(SolutionDir)Tools\postbuild_installer.ps1" -SolutionDir "$(SolutionDir)\" -TargetDir "%25cd%25" -TargetFileName "mRemoteNG.exe" -ConfigurationName "%25buildenv%25" -CertificatePath "$(CertPath)" -CertificatePassword "$(CertPassword)" -ExcludeFromSigning "PuTTYNG.exe"</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>REM Clean the TargetDir
|
||||
rmdir /S /Q "$(TargetDir)"
|
||||
|
||||
echo $(ConfigurationName) > buildenv.tmp
|
||||
|
||||
REM Harvest bin directory of the mRemoteV1 project
|
||||
"$(WIX)bin\heat.exe" dir "$(SolutionDir)mRemoteV1\bin\$(Configuration)" -ag -nologo -dr INSTALLDIR -var var.HarvestPath -srd -scom -sreg -cg MandatoryComponents -template fragment -out "$(ProjectDir)Fragments\FilesFragment.wxs" -t "$(ProjectDir)Filters\Harvest_Filter.xslt"
|
||||
|
||||
REM Convert the license file "COPYING.TXT" to "License.rtf" to be shown in the installer GUI
|
||||
"$(ProjectDir)Resources\Pandoc\pandoc.exe" -s -t rtf -o "$(ProjectDir)\Resources\License.rtf" "$(SolutionDir)COPYING.TXT"</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -32,8 +32,6 @@
|
||||
|
||||
|
||||
<InstallUISequence>
|
||||
<Custom Action="CheckIfRdpDtlsUpdateInstalled" After="AppSearch">(NOT Installed) AND (VersionNT = 601 OR VersionNT64 = 601)</Custom>
|
||||
<Custom Action="CheckIfMinimumRdpInstalled" After="CheckIfRdpDtlsUpdateInstalled">(NOT Installed) AND (VersionNT = 601 OR VersionNT64 = 601)</Custom>
|
||||
<LaunchConditions After="SetWIX_IS_NETFRAMEWORK_40_OR_LATER_INSTALLED" />
|
||||
<Custom Action="CheckIfLegacyVersionInstalled" After="LaunchConditions" />
|
||||
<Custom Action="UninstallLegacyVersion" After="CheckIfLegacyVersionInstalled">(NOT Installed) AND (LEGACYVERSIONINSTALLED = 1)</Custom>
|
||||
|
||||
@@ -2,7 +2,7 @@ node('windows') {
|
||||
def jobDir = pwd()
|
||||
def solutionFilePath = "\"${jobDir}\\mRemoteV1.sln\""
|
||||
def msBuild = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\MSBuild\\15.0\\Bin\\msbuild.exe"
|
||||
def nunitConsolePath = "${jobDir}\\packages\\NUnit.ConsoleRunner.3.7.0\\tools\\nunit3-console.exe"
|
||||
def nunitConsolePath = "${jobDir}\\packages\\NUnit.ConsoleRunner.3.10.0\\tools\\nunit3-console.exe"
|
||||
def openCoverPath = "${jobDir}\\packages\\OpenCover.4.6.519\\tools\\OpenCover.Console.exe"
|
||||
def testResultFilePrefix = "TestResult"
|
||||
def testResultFileNormal = "${testResultFilePrefix}_UnitTests_normal.xml"
|
||||
|
||||
12
README.MD
12
README.MD
@@ -7,12 +7,13 @@
|
||||
[](https://github.com/mRemoteNG/mRemoteNG/releases/)
|
||||
|
||||
[](https://bestpractices.coreinfrastructure.org/projects/529)
|
||||
[](https://mremoteng.readthedocs.io/en/latest/?badge=latest)
|
||||
|
||||
| Update Channel | Build Status | Downloads |
|
||||
| ---------------|--------------|-----------|
|
||||
| Stable | [](https://ci.appveyor.com/project/mremoteng/mremoteng/branch/master) | [](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.76.15) |
|
||||
| Beta | | [](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.76.15) |
|
||||
| Development | [](https://ci.appveyor.com/project/mremoteng/mremoteng/branch/develop) | [](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.76.15) |
|
||||
| Development | [](https://ci.appveyor.com/project/mremoteng/mremoteng/branch/develop) | [](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.77.1) |
|
||||
|
||||
mRemoteNG is the next generation of mRemote, a full-featured, multi-tab remote connections manager.
|
||||
|
||||
@@ -37,23 +38,20 @@ For a detailed feature list and general usage support, refer to the [User Manual
|
||||
|
||||
## Installation
|
||||
|
||||
Before installing make sure you have all the required [prerequisites](https://github.com/mRemoteNG/mRemoteNG/wiki/Prerequisites).
|
||||
mRemoteNG is supported on Windows 7 or later. Before installing make sure you fullfill all the [minimum requirements](https://mremoteng.readthedocs.io/en/latest/installation/minimum_requirements.html).
|
||||
|
||||
mRemoteNG is available as a redistributable msi package, and can be downloaded from the following locations:
|
||||
* [GitHub](https://github.com/mRemoteNG/mRemoteNG/releases)
|
||||
* [Project Website](https://mremoteng.org/download)
|
||||
|
||||
mRemoteNG is supported on Windows 7 or later.
|
||||
Windows 7 and Windows Server 2008 installations must ensure the [listed required updates](https://github.com/mRemoteNG/mRemoteNG/wiki/Prerequisites#full-list-of-required-windows-updates-for-windows-7--server-2008-clients) are installed and active.
|
||||
|
||||
## Contribute
|
||||
|
||||
If you find mRemoteNG useful and would like to contribute, it would be greatly appreciated. When you contribute, you make it possible for the team to cover the costs of producing mRemoteNG.
|
||||
|
||||
### Submit Code
|
||||
Check out the [Wiki page](https://github.com/mRemoteNG/mRemoteNG/wiki/Development) on how to configure your development environment and submit a pull request.
|
||||
Check out the [Wiki page](https://github.com/mRemoteNG/mRemoteNG/wiki) on how to configure your development environment and submit a pull request.
|
||||
|
||||
### Translate
|
||||
Check out the [Wiki page](https://github.com/mRemoteNG/mRemoteNG/wiki/How%20to%20Help%20Translating%20mRemoteNG) on how to help make mRemoteNG a polyglot
|
||||
Check out the [Wiki page](https://github.com/mRemoteNG/mRemoteNG/wiki) on how to help make mRemoteNG a polyglot
|
||||
|
||||
[](https://www.jetbrains.com/resharper/)
|
||||
|
||||
25
Readme.txt
25
Readme.txt
@@ -1,25 +0,0 @@
|
||||
mRemoteNG is the next generation of mRemote, a full-featured, multi-tab remote connections manager.
|
||||
|
||||
It allows you to store all your remote connections in a simple yet powerful interface.
|
||||
|
||||
Currently these protocols are supported:
|
||||
|
||||
* RDP (Remote Desktop)
|
||||
* VNC (Virtual Network Computing)
|
||||
* ICA (Independent Computing Architecture)
|
||||
* SSH (Secure Shell)
|
||||
* Telnet (TELecommunication NETwork)
|
||||
* HTTP/S (Hypertext Transfer Protocol)
|
||||
* Rlogin (Rlogin)
|
||||
* RAW
|
||||
|
||||
mRemoteNG can be installed on Windows 7 or later.
|
||||
|
||||
Windows 7 systems require RDP version 8:
|
||||
https://support.microsoft.com/en-us/kb/2592687
|
||||
OR
|
||||
https://support.microsoft.com/en-us/kb/2923545
|
||||
|
||||
Windows 8+ support RDP version 8+ out of the box.
|
||||
|
||||
RDP versions are backwards compatible, so an mRemoteNG client running on Windows 10 can connection successfully to a Windows 2003 host (for example).
|
||||
@@ -12,8 +12,6 @@ Write-Output "===== Beginning $($PSCmdlet.MyInvocation.MyCommand) ====="
|
||||
Write-Output "Copying TILES folder to output"
|
||||
|
||||
$sourceFiles = [io.path]::combine($SolutionDir , 'mRemoteV1\Resources\Tiles' )
|
||||
$DestinationDir = $TargetDir
|
||||
|
||||
robocopy $sourceFiles $DestinationDir *.*
|
||||
robocopy $sourceFiles $TargetDir *.*
|
||||
|
||||
Write-Output ""
|
||||
@@ -30,7 +30,7 @@ function New-MsiUpdateFileContent {
|
||||
$fileContents = `
|
||||
"Version: $version
|
||||
dURL: https://github.com/mRemoteNG/mRemoteNG/releases/download/$TagName/$($MsiFile.Name)
|
||||
clURL: https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/$TagName/CHANGELOG.TXT
|
||||
clURL: https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/$TagName/CHANGELOG.md
|
||||
CertificateThumbprint: $certThumbprint
|
||||
Checksum: $hash"
|
||||
Write-Output $fileContents
|
||||
|
||||
@@ -42,7 +42,7 @@ Format-Table -AutoSize -Wrap -InputObject @{
|
||||
& "$PSScriptRoot\copy_puttyng.ps1" -SolutionDir $SolutionDir -TargetDir $TargetDir
|
||||
& "$PSScriptRoot\copy_themes.ps1" -SolutionDir $SolutionDir -TargetDir $TargetDir
|
||||
& "$PSScriptRoot\copy_tiles.ps1" -SolutionDir $SolutionDir -TargetDir $TargetDir
|
||||
& "$PSScriptRoot\move_help_files.ps1" -TargetDir $TargetDir
|
||||
& "$PSScriptRoot\sphinx_docs.ps1" -SolutionDir $SolutionDir -TargetDir $TargetDir
|
||||
& "$PSScriptRoot\set_LargeAddressAware.ps1" -TargetDir $TargetDir -TargetFileName $TargetFileName
|
||||
& "$PSScriptRoot\verify_LargeAddressAware.ps1" -TargetDir $TargetDir -TargetFileName $TargetFileName
|
||||
& "$PSScriptRoot\tidy_files_for_release.ps1" -TargetDir $TargetDir -ConfigurationName $ConfigurationName
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
param (
|
||||
[string]
|
||||
param (
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$SolutionDir,
|
||||
|
||||
[string]
|
||||
[Parameter(Mandatory=$true)]
|
||||
$TargetDir
|
||||
)
|
||||
|
||||
Write-Output "===== Beginning $($PSCmdlet.MyInvocation.MyCommand) ====="
|
||||
|
||||
Write-Output "Building HTML-Documentation with Sphinx"
|
||||
|
||||
$path_HelpFilesDir = Join-Path -Path $TargetDir -ChildPath "Help"
|
||||
|
||||
Write-Output "Moving Help files to correct directory"
|
||||
|
||||
$path_SphinxSourceDir = Join-Path -Path $SolutionDir -ChildPath "mremoteV1\Documentation"
|
||||
# Remove stale Help files, if they exist
|
||||
if (Test-Path -Path $path_HelpFilesDir) {
|
||||
Remove-Item -Path $path_HelpFilesDir -Recurse -Force
|
||||
}
|
||||
|
||||
# Move Help files
|
||||
Move-Item -Path (Join-Path -Path $TargetDir -ChildPath "Resources\Help") -Destination $path_HelpFilesDir -Force
|
||||
Start-Sleep -Seconds 2
|
||||
Remove-Item -Path (Join-Path -Path $TargetDir -ChildPath "Resources") -Recurse -Force
|
||||
sphinx-build $path_SphinxSourceDir $path_HelpFilesDir
|
||||
|
||||
Write-Output ""
|
||||
@@ -13,7 +13,12 @@ Write-Output "===== Beginning $($PSCmdlet.MyInvocation.MyCommand) ====="
|
||||
# Remove unnecessary files from Release versions
|
||||
if ($ConfigurationName -match "Release") {
|
||||
Write-Output "Removing unnecessary files from Release versions"
|
||||
Remove-Item -Path (Join-Path -Path $TargetDir -ChildPath "app.publish") -Recurse -Force
|
||||
|
||||
$test = Join-Path -Path $TargetDir -ChildPath "app.publish"
|
||||
if (Test-Path $test -PathType Container) {
|
||||
Remove-Item -Path (Join-Path -Path $TargetDir -ChildPath "app.publish") -Recurse -Force
|
||||
}
|
||||
|
||||
$filesToDelete = Get-ChildItem -Path $TargetDir -Recurse -Include @(
|
||||
"*.publish",
|
||||
"*.xml",
|
||||
|
||||
46
appveyor.yml
46
appveyor.yml
@@ -1,46 +0,0 @@
|
||||
version: 1.76.{build}
|
||||
pull_requests:
|
||||
do_not_increment_build_number: true
|
||||
skip_tags: true
|
||||
skip_branch_with_pr: true
|
||||
image: Visual Studio 2017
|
||||
configuration:
|
||||
- Release
|
||||
- Release Portable
|
||||
- Release Installer
|
||||
platform: x86
|
||||
shallow_clone: true
|
||||
clone_depth: 1
|
||||
install:
|
||||
- ps: >-
|
||||
date
|
||||
|
||||
mRemoteV1\Resources\CitrixReceiver.exe ENABLE_SSON="No" /silent /noreboot /EnableCEIP=false /AutoUpdateCheck=disabled /EnableTracing=false | out-null
|
||||
|
||||
date
|
||||
before_build:
|
||||
- cmd: >-
|
||||
echo %TIME%
|
||||
|
||||
nuget restore
|
||||
|
||||
echo %TIME%
|
||||
build:
|
||||
project: mRemoteV1.sln
|
||||
parallel: true
|
||||
verbosity: normal
|
||||
after_build:
|
||||
- ps: "if([string]::IsNullOrEmpty($Env:APPVEYOR_BUILD_FOLDER)) {\n Write-Output \"NOT running via Appveyor - Exiting\"\n Exit\n}\n\n$appvDir = $Env:APPVEYOR_BUILD_FOLDER\n\nWrite-Output \"Appveyor Build Dir: '$($appvDir)'\"\n$ConfigurationName = $Env:CONFIGURATION.Trim()\nWrite-Output \"Config Name (tirmmed): '$($ConfigurationName)'\"\n\n\n$SIGCHECK=\"Tools\\exes\\sigcheck.exe\"\n$SEVENZIP=\"Tools\\7zip\\7za.exe\"\n\nif ($ConfigurationName -eq \"Release Portable\") {\n Write-Output \"Packaging Release Portable ZIP\"\n \n $version = & $SIGCHECK /accepteula -q -n \"mRemoteV1\\bin\\$($ConfigurationName)\\mRemoteNG.exe\"\n\n Write-Output \"Version is $($version)\"\n\n $PortableZip=\"Release\\mRemoteNG-Portable-$($version).zip\"\n\n Remove-Item -Recurse \"mRemoteV1\\bin\\package\" -ErrorAction SilentlyContinue | Out-Null\n New-Item \"mRemoteV1\\bin\\package\" -ItemType \"directory\" | Out-Null\n \n Copy-Item \"mRemoteV1\\Resources\\PuTTYNG.exe\" -Destination \"mRemoteV1\\bin\\package\"\n\n Copy-Item \"mRemoteV1\\bin\\$ConfigurationName\\*\" -Destination \"mRemoteV1\\bin\\package\" -Recurse -Force -Exclude *.pdb\n Copy-Item \"*.txt\" -Destination \"mRemoteV1\\bin\\package\"\n\n Write-Output \"Creating portable ZIP file $($PortableZip)\"\n Remove-Item -Force $PortableZip -ErrorAction SilentlyContinue\n & $SEVENZIP a -bt -bd -bb1 -mx=9 -tzip -y -r $PortableZip \".\\mRemoteV1\\bin\\package\\*.*\"\n}\nelse {\n Write-Output \"We will not zip anything - this isnt a portable release build.\"\n}\n\nWrite-Output \"\"\nWrite-Output \"\"\n\nif ($ConfigurationName -match \"Release\" -And $ConfigurationName -ne \"Release Installer\") {\n Write-Output \"Packaging debug symbols\"\n \n $version = & $SIGCHECK /accepteula -q -n \"mRemoteV1\\bin\\$($ConfigurationName)\\mRemoteNG.exe\"\n\n Write-Output \"Version is $($version)\"\n\n if ($ConfigurationName -match \"Portable\") {\n $zipFilePrefix = \"mRemoteNG-Portable-symbols\"\n } else {\n $zipFilePrefix = \"mRemoteNG-symbols\"\n }\n\n $outputZipPath=\"Release\\$zipFilePrefix-$($version).zip\"\n\n Write-Output \"Creating debug symbols ZIP file $($outputZipPath)\"\n Remove-Item -Force $outputZipPath -ErrorAction SilentlyContinue\n $SymPath = (Join-Path -Path mRemoteV1\\bin\\$($ConfigurationName) -ChildPath \"*.pdb\")\n if(Test-Path \"$SymPath\") {\n & $SEVENZIP a -bt -bd -bb1 -mx=9 -tzip -y -r $outputZipPath \"$SymPath\"\n } else {\n Write-Output \"No Debugging Symbols Found...\"\n }\n \n}\nelse {\n Write-Output \"We will not package debug symbols for this configuration $($ConfigurationName)\"\n}\n\nWrite-Output \"\""
|
||||
test:
|
||||
assemblies:
|
||||
only:
|
||||
- mRemoteNGTests\bin\$(configuration)\mRemoteNGTests.dll
|
||||
artifacts:
|
||||
- path: Release\*.msi
|
||||
name: mRemoteNG-installer.msi
|
||||
- path: Release\mRemoteNG-Portable-1.*.zip
|
||||
name: mRemoteNG-portable.zip
|
||||
- path: Release\mRemoteNG-Portable-symbols*.zip
|
||||
name: mRemoteNG-Portable-symbols.zip
|
||||
- path: Release\mRemoteNG-symbols*.zip
|
||||
name: mRemoteNG-symbols.zip
|
||||
@@ -1,8 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow" />
|
||||
</configSections>
|
||||
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
@@ -13,14 +11,30 @@
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="BouncyCastle.Crypto" publicKeyToken="0e99375e54769942" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.8.5.0" newVersion="1.8.5.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Google.Protobuf" publicKeyToken="a7d26565bac4d604" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.9.2.0" newVersion="3.9.2.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
<specFlow>
|
||||
<!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config -->
|
||||
<!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config -->
|
||||
<unitTestProvider name="NUnit" />
|
||||
</specFlow>
|
||||
</configuration>
|
||||
|
||||
</configuration>
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace mRemoteNG.Specs.Features
|
||||
|
||||
public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo)
|
||||
{
|
||||
testRunner.OnScenarioStart(scenarioInfo);
|
||||
testRunner.OnScenarioStart();
|
||||
}
|
||||
|
||||
public virtual void ScenarioCleanup()
|
||||
@@ -73,7 +73,7 @@ namespace mRemoteNG.Specs.Features
|
||||
[Ignore("Cred Repo not implmented currently.")]
|
||||
public virtual void LoadCredentialRepository()
|
||||
{
|
||||
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Load credential repository", new string[] {
|
||||
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Load credential repository", "", new string[] {
|
||||
"credentials"});
|
||||
#line 7
|
||||
this.ScenarioSetup(scenarioInfo);
|
||||
@@ -94,7 +94,7 @@ this.ScenarioSetup(scenarioInfo);
|
||||
[Ignore("Cred Repo not implmented currently.")]
|
||||
public virtual void AddCredentialRecord()
|
||||
{
|
||||
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add credential record", ((string[])(null)));
|
||||
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add credential record", "", ((string[])(null)));
|
||||
#line 13
|
||||
this.ScenarioSetup(scenarioInfo);
|
||||
#line 14
|
||||
@@ -116,7 +116,7 @@ this.ScenarioSetup(scenarioInfo);
|
||||
[Ignore("Cred Repo not implmented currently.")]
|
||||
public virtual void UnloadCredentialRepository()
|
||||
{
|
||||
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Unload credential repository", ((string[])(null)));
|
||||
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Unload credential repository", "", ((string[])(null)));
|
||||
#line 20
|
||||
this.ScenarioSetup(scenarioInfo);
|
||||
#line 21
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace mRemoteNG.Specs.Features
|
||||
|
||||
public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo)
|
||||
{
|
||||
testRunner.OnScenarioStart(scenarioInfo);
|
||||
testRunner.OnScenarioStart();
|
||||
}
|
||||
|
||||
public virtual void ScenarioCleanup()
|
||||
@@ -74,7 +74,7 @@ namespace mRemoteNG.Specs.Features
|
||||
[Ignore("Cred Repo not implmented currently.")]
|
||||
public virtual void AddANewCredentialRepository()
|
||||
{
|
||||
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add a new credential repository", new string[] {
|
||||
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add a new credential repository", "", new string[] {
|
||||
"credentials"});
|
||||
#line 7
|
||||
this.ScenarioSetup(scenarioInfo);
|
||||
@@ -95,7 +95,7 @@ this.ScenarioSetup(scenarioInfo);
|
||||
[Ignore("Cred Repo not implmented currently.")]
|
||||
public virtual void RemoveACredentialRepository()
|
||||
{
|
||||
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Remove a credential repository", ((string[])(null)));
|
||||
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Remove a credential repository", "", ((string[])(null)));
|
||||
#line 13
|
||||
this.ScenarioSetup(scenarioInfo);
|
||||
#line 14
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\NUnit.3.11.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" />
|
||||
<Import Project="..\packages\SpecFlow.NUnit.3.0.225\build\SpecFlow.NUnit.props" Condition="Exists('..\packages\SpecFlow.NUnit.3.0.225\build\SpecFlow.NUnit.props')" />
|
||||
<Import Project="..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props')" />
|
||||
<Import Project="..\packages\NUnit.3.12.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -10,13 +12,13 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>mRemoteNG.Specs</RootNamespace>
|
||||
<AssemblyName>mRemoteNG.Specs</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
@@ -24,8 +26,9 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
@@ -34,22 +37,43 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Reference Include="BoDi, Version=1.4.1.0, Culture=neutral, PublicKeyToken=ff7cd5ea2744b496, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\BoDi.1.4.1\lib\net45\BoDi.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=3.11.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll</HintPath>
|
||||
<Reference Include="Gherkin, Version=6.0.0.0, Culture=neutral, PublicKeyToken=86496cfa5b4a5851, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Gherkin.6.0.0\lib\net45\Gherkin.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=3.12.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NUnit.3.12.0\lib\net45\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.6.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="TechTalk.SpecFlow, Version=2.2.0.0, Culture=neutral, PublicKeyToken=0778194805d6db41, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SpecFlow.2.2.1\lib\net45\TechTalk.SpecFlow.dll</HintPath>
|
||||
<Reference Include="TechTalk.SpecFlow, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0778194805d6db41, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SpecFlow.3.0.225\lib\net45\TechTalk.SpecFlow.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="TechTalk.SpecFlow.NUnit.SpecFlowPlugin, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0778194805d6db41, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SpecFlow.NUnit.3.0.225\lib\net45\TechTalk.SpecFlow.NUnit.SpecFlowPlugin.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Utf8Json, Version=1.3.7.0, Culture=neutral, PublicKeyToken=8a73d3ba7e392e27, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Utf8Json.1.3.7\lib\net45\Utf8Json.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -96,8 +120,12 @@
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.11.0\build\NUnit.props'))" />
|
||||
<Error Condition="!Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.12.0\build\NUnit.props'))" />
|
||||
<Error Condition="!Exists('..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props'))" />
|
||||
<Error Condition="!Exists('..\packages\SpecFlow.NUnit.3.0.225\build\SpecFlow.NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SpecFlow.NUnit.3.0.225\build\SpecFlow.NUnit.props'))" />
|
||||
<Error Condition="!Exists('..\packages\SpecFlow.NUnit.3.0.225\build\SpecFlow.NUnit.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SpecFlow.NUnit.3.0.225\build\SpecFlow.NUnit.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\SpecFlow.NUnit.3.0.225\build\SpecFlow.NUnit.targets" Condition="Exists('..\packages\SpecFlow.NUnit.3.0.225\build\SpecFlow.NUnit.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">
|
||||
|
||||
@@ -1,16 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net46" />
|
||||
<package id="NUnit" version="3.11.0" targetFramework="net46" />
|
||||
<package id="NUnit.Console" version="3.9.0" targetFramework="net46" />
|
||||
<package id="NUnit.ConsoleRunner" version="3.9.0" targetFramework="net46" />
|
||||
<package id="BoDi" version="1.4.1" targetFramework="net46" />
|
||||
<package id="Gherkin" version="6.0.0" targetFramework="net46" />
|
||||
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net46" />
|
||||
<package id="NUnit" version="3.12.0" targetFramework="net46" />
|
||||
<package id="NUnit.Console" version="3.10.0" targetFramework="net46" />
|
||||
<package id="NUnit.ConsoleRunner" version="3.10.0" targetFramework="net46" />
|
||||
<package id="NUnit.Extension.NUnitProjectLoader" version="3.6.0" targetFramework="net46" />
|
||||
<package id="NUnit.Extension.NUnitV2Driver" version="3.7.0" targetFramework="net46" />
|
||||
<package id="NUnit.Extension.NUnitV2ResultWriter" version="3.6.0" targetFramework="net46" />
|
||||
<package id="NUnit.Extension.TeamCityEventListener" version="1.0.5" targetFramework="net46" />
|
||||
<package id="NUnit.Extension.TeamCityEventListener" version="1.0.7" targetFramework="net472" />
|
||||
<package id="NUnit.Extension.VSProjectLoader" version="3.8.0" targetFramework="net46" />
|
||||
<package id="NUnit.Runners" version="3.9.0" targetFramework="net46" />
|
||||
<package id="SpecFlow" version="2.2.1" targetFramework="net46" />
|
||||
<package id="SpecFlow.NUnit" version="2.2.1" targetFramework="net46" />
|
||||
<package id="SpecFlow.NUnit.Runners" version="2.2.1" targetFramework="net46" />
|
||||
<package id="NUnit.Runners" version="3.10.0" targetFramework="net46" />
|
||||
<package id="NUnit3TestAdapter" version="3.15.1" targetFramework="net472" />
|
||||
<package id="SpecFlow" version="3.0.225" targetFramework="net472" />
|
||||
<package id="SpecFlow.NUnit" version="3.0.225" targetFramework="net472" />
|
||||
<package id="SpecFlow.NUnit.Runners" version="3.0.225" targetFramework="net472" />
|
||||
<package id="System.Reflection.Emit" version="4.6.0" targetFramework="net472" />
|
||||
<package id="System.Reflection.Emit.Lightweight" version="4.6.0" targetFramework="net472" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.6.0" targetFramework="net472" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.3" targetFramework="net472" />
|
||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net46" requireReinstallation="true" />
|
||||
<package id="Utf8Json" version="1.3.7" targetFramework="net46" requireReinstallation="true" />
|
||||
</packages>
|
||||
@@ -83,7 +83,7 @@ namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Csv
|
||||
PostExtApp = "SomePostExtApp",
|
||||
MacAddress = "SomeMacAddress",
|
||||
UserField = "SomeUserField",
|
||||
Favorite = true,
|
||||
VmId = "SomeVmId",
|
||||
ExtApp = "SomeExtApp",
|
||||
VNCProxyUsername = "SomeVNCProxyUsername",
|
||||
VNCProxyPassword = "SomeVNCProxyPassword",
|
||||
@@ -94,13 +94,16 @@ namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Csv
|
||||
RDGatewayHostname = "SomeRDGatewayHostname",
|
||||
Protocol = ProtocolType.ICA,
|
||||
Port = 999,
|
||||
Favorite = true,
|
||||
UseConsoleSession = true,
|
||||
UseCredSsp = true,
|
||||
UseVmId = false,
|
||||
UseEnhancedMode = false,
|
||||
RenderingEngine = HTTPBase.RenderingEngine.Gecko,
|
||||
ICAEncryptionStrength = IcaProtocol.EncryptionStrength.Encr40Bit,
|
||||
RDPAuthenticationLevel = RdpProtocol.AuthenticationLevel.WarnOnFailedAuth,
|
||||
Colors = RdpProtocol.RDPColors.Colors16Bit,
|
||||
Resolution = RdpProtocol.RDPResolutions.Res1366x768,
|
||||
RDPAuthenticationLevel = AuthenticationLevel.WarnOnFailedAuth,
|
||||
Colors = RDPColors.Colors16Bit,
|
||||
Resolution = RDPResolutions.Res1366x768,
|
||||
AutomaticResize = true,
|
||||
DisplayWallpaper = true,
|
||||
DisplayThemes = true,
|
||||
@@ -111,7 +114,8 @@ namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Csv
|
||||
RedirectPorts = true,
|
||||
RedirectPrinters = true,
|
||||
RedirectSmartCards = true,
|
||||
RedirectSound = RdpProtocol.RDPSounds.LeaveAtRemoteComputer,
|
||||
RedirectSound = RDPSounds.LeaveAtRemoteComputer,
|
||||
RedirectAudioCapture = true,
|
||||
RedirectKeys = true,
|
||||
VNCCompression = ProtocolVNC.Compression.Comp4,
|
||||
VNCEncoding = ProtocolVNC.Encoding.EncRRE,
|
||||
@@ -121,8 +125,8 @@ namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Csv
|
||||
VNCColors = ProtocolVNC.Colors.Col8Bit,
|
||||
VNCSmartSizeMode = ProtocolVNC.SmartSizeMode.SmartSAspect,
|
||||
VNCViewOnly = true,
|
||||
RDGatewayUsageMethod = RdpProtocol.RDGatewayUsageMethod.Detect,
|
||||
RDGatewayUseConnectionCredentials = RdpProtocol.RDGatewayUseConnectionCredentials.SmartCard
|
||||
RDGatewayUsageMethod = RDGatewayUsageMethod.Detect,
|
||||
RDGatewayUseConnectionCredentials = RDGatewayUseConnectionCredentials.SmartCard
|
||||
};
|
||||
}
|
||||
|
||||
@@ -161,25 +165,14 @@ namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Csv
|
||||
|
||||
public static IEnumerable InheritanceTestCases()
|
||||
{
|
||||
var ignoreProperties = new[]
|
||||
{
|
||||
nameof(ConnectionInfoInheritance.EverythingInherited),
|
||||
nameof(ConnectionInfoInheritance.Parent)
|
||||
};
|
||||
var properties = typeof(ConnectionInfoInheritance)
|
||||
.GetProperties()
|
||||
.Where(property => !ignoreProperties.Contains(property.Name));
|
||||
var testCases = new List<TestCaseData>();
|
||||
var testInheritance = GetTestConnectionWithAllInherited().Inheritance;
|
||||
var testInheritance = GetTestConnectionWithAllInherited().Inheritance;
|
||||
var properties = testInheritance.GetProperties();
|
||||
|
||||
foreach (var property in properties)
|
||||
{
|
||||
testCases.Add(
|
||||
new TestCaseData(property.Name)
|
||||
.Returns(property.GetValue(testInheritance)));
|
||||
}
|
||||
|
||||
return testCases;
|
||||
return properties
|
||||
.Select(property =>
|
||||
new TestCaseData(property.Name)
|
||||
.Returns(property.GetValue(testInheritance)))
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using mRemoteNG.Config.Serializers;
|
||||
using mRemoteNG.Config.Serializers.Csv;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Container;
|
||||
|
||||
@@ -6,7 +6,6 @@ using mRemoteNG.Security;
|
||||
using mRemoteNG.Security.SymmetricEncryption;
|
||||
using mRemoteNG.Tree;
|
||||
using mRemoteNGTests.TestHelpers;
|
||||
using NSubstitute;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace mRemoteNGTests.Config.Serializers
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
using System.Linq;
|
||||
using System.Security;
|
||||
using mRemoteNG.Config.Serializers;
|
||||
using mRemoteNG.Config.Serializers.MsSql;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Container;
|
||||
using mRemoteNG.Security;
|
||||
using mRemoteNG.Security.SymmetricEncryption;
|
||||
using mRemoteNG.Tree;
|
||||
using mRemoteNG.Tree.Root;
|
||||
using mRemoteNGTests.TestHelpers;
|
||||
using NSubstitute;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace mRemoteNGTests.Config.Serializers
|
||||
|
||||
@@ -19,9 +19,9 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers
|
||||
private const string ExpectedGatewayHostname = "gatewayhostname.domain.com";
|
||||
private const string ExpectedLoadBalanceInfo = "tsv://MS Terminal Services Plugin.1.RDS-NAME";
|
||||
private const int ExpectedPort = 9933;
|
||||
private const RdpProtocol.RDPColors ExpectedColors = RdpProtocol.RDPColors.Colors24Bit;
|
||||
private const RDPColors ExpectedColors = RDPColors.Colors24Bit;
|
||||
private const bool ExpectedBitmapCaching = false;
|
||||
private const RdpProtocol.RDPResolutions ExpectedResolutionMode = RdpProtocol.RDPResolutions.FitToWindow;
|
||||
private const RDPResolutions ExpectedResolutionMode = RDPResolutions.FitToWindow;
|
||||
private const bool ExpectedWallpaperDisplay = true;
|
||||
private const bool ExpectedThemesDisplay = true;
|
||||
private const bool ExpectedFontSmoothing = true;
|
||||
@@ -30,7 +30,7 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers
|
||||
private const bool ExpectedDriveRedirection = true;
|
||||
private const bool ExpectedPortRedirection = true;
|
||||
private const bool ExpectedPrinterRedirection = true;
|
||||
private const RdpProtocol.RDPSounds ExpectedSoundRedirection = RdpProtocol.RDPSounds.BringToThisComputer;
|
||||
private const RDPSounds ExpectedSoundRedirection = RDPSounds.BringToThisComputer;
|
||||
|
||||
|
||||
[OneTimeSetUp]
|
||||
|
||||
@@ -24,20 +24,20 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers
|
||||
private const string ExpectedPassword = "passwordHere!";
|
||||
private const bool ExpectedUseConsoleSession = true;
|
||||
private const int ExpectedPort = 9933;
|
||||
private const RdpProtocol.RDGatewayUsageMethod ExpectedGatewayUsageMethod = RdpProtocol.RDGatewayUsageMethod.Always;
|
||||
private const RDGatewayUsageMethod ExpectedGatewayUsageMethod = RDGatewayUsageMethod.Always;
|
||||
private const string ExpectedGatewayHostname = "gatewayserverhost.innerdomain.net";
|
||||
private const string ExpectedGatewayUsername = "gatewayusername";
|
||||
private const string ExpectedGatewayDomain = "innerdomain";
|
||||
private const string ExpectedGatewayPassword = "gatewayPassword123";
|
||||
private const RdpProtocol.RDPResolutions ExpectedRdpResolution = RdpProtocol.RDPResolutions.FitToWindow;
|
||||
private const RdpProtocol.RDPColors ExpectedRdpColorDepth = RdpProtocol.RDPColors.Colors24Bit;
|
||||
private const RdpProtocol.RDPSounds ExpectedAudioRedirection = RdpProtocol.RDPSounds.DoNotPlay;
|
||||
private const RDPResolutions ExpectedRdpResolution = RDPResolutions.FitToWindow;
|
||||
private const RDPColors ExpectedRdpColorDepth = RDPColors.Colors24Bit;
|
||||
private const RDPSounds ExpectedAudioRedirection = RDPSounds.DoNotPlay;
|
||||
private const bool ExpectedKeyRedirection = true;
|
||||
private const bool ExpectedSmartcardRedirection = true;
|
||||
private const bool ExpectedDriveRedirection = true;
|
||||
private const bool ExpectedPortRedirection = true;
|
||||
private const bool ExpectedPrinterRedirection = true;
|
||||
private const RdpProtocol.AuthenticationLevel ExpectedAuthLevel = RdpProtocol.AuthenticationLevel.WarnOnFailedAuth;
|
||||
private const AuthenticationLevel ExpectedAuthLevel = AuthenticationLevel.WarnOnFailedAuth;
|
||||
|
||||
|
||||
[OneTimeSetUp]
|
||||
@@ -91,7 +91,7 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers
|
||||
[TestCaseSource(nameof(NullPropertyValues))]
|
||||
public void PropertiesWithoutValuesAreIgnored(Func<ConnectionInfo, object> propSelector)
|
||||
{
|
||||
var connectionTreeModel = _deserializer.Deserialize(Resources.test_rdcman_v2_7_schema3_null_values);
|
||||
var connectionTreeModel = _deserializer.Deserialize(Resources.test_rdcman_v2_7_schema3_empty_values);
|
||||
|
||||
var importedConnection = connectionTreeModel
|
||||
.GetRecursiveChildList()
|
||||
@@ -103,7 +103,22 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers
|
||||
Assert.That(propSelector(importedConnection), Is.EqualTo(propSelector(new ConnectionInfo())));
|
||||
}
|
||||
|
||||
[Test]
|
||||
[TestCaseSource(nameof(NullPropertyValues))]
|
||||
public void NonExistantPropertiesAreIgnored(Func<ConnectionInfo, object> propSelector)
|
||||
{
|
||||
var connectionTreeModel = _deserializer.Deserialize(Resources.test_rdcman_v2_7_schema3_null_values);
|
||||
|
||||
var importedConnection = connectionTreeModel
|
||||
.GetRecursiveChildList()
|
||||
.OfType<ContainerInfo>()
|
||||
.First(node => node.Name == "Group1")
|
||||
.Children
|
||||
.First();
|
||||
|
||||
Assert.That(propSelector(importedConnection), Is.EqualTo(propSelector(new ConnectionInfo())));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ExceptionThrownOnBadSchemaVersion()
|
||||
{
|
||||
var badFileContents = Resources.test_rdcman_v2_2_badschemaversion;
|
||||
|
||||
@@ -23,20 +23,20 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers
|
||||
private const string ExpectedPassword = "passwordHere!";
|
||||
private const bool ExpectedUseConsoleSession = true;
|
||||
private const int ExpectedPort = 9933;
|
||||
private const RdpProtocol.RDGatewayUsageMethod ExpectedGatewayUsageMethod = RdpProtocol.RDGatewayUsageMethod.Always;
|
||||
private const RDGatewayUsageMethod ExpectedGatewayUsageMethod = RDGatewayUsageMethod.Always;
|
||||
private const string ExpectedGatewayHostname = "gatewayserverhost.innerdomain.net";
|
||||
private const string ExpectedGatewayUsername = "gatewayusername";
|
||||
private const string ExpectedGatewayDomain = "innerdomain";
|
||||
private const string ExpectedGatewayPassword = "gatewayPassword123";
|
||||
private const RdpProtocol.RDPResolutions ExpectedRdpResolution = RdpProtocol.RDPResolutions.FitToWindow;
|
||||
private const RdpProtocol.RDPColors ExpectedRdpColorDepth = RdpProtocol.RDPColors.Colors24Bit;
|
||||
private const RdpProtocol.RDPSounds ExpectedAudioRedirection = RdpProtocol.RDPSounds.DoNotPlay;
|
||||
private const RDPResolutions ExpectedRdpResolution = RDPResolutions.FitToWindow;
|
||||
private const RDPColors ExpectedRdpColorDepth = RDPColors.Colors24Bit;
|
||||
private const RDPSounds ExpectedAudioRedirection = RDPSounds.DoNotPlay;
|
||||
private const bool ExpectedKeyRedirection = true;
|
||||
private const bool ExpectedSmartcardRedirection = true;
|
||||
private const bool ExpectedDriveRedirection = true;
|
||||
private const bool ExpectedPortRedirection = true;
|
||||
private const bool ExpectedPrinterRedirection = true;
|
||||
private const RdpProtocol.AuthenticationLevel ExpectedAuthLevel = RdpProtocol.AuthenticationLevel.AuthRequired;
|
||||
private const AuthenticationLevel ExpectedAuthLevel = AuthenticationLevel.AuthRequired;
|
||||
|
||||
|
||||
[OneTimeSetUp]
|
||||
|
||||
@@ -0,0 +1,200 @@
|
||||
using mRemoteNG.Config.Serializers.MiscSerializers;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.Connection.Protocol.Http;
|
||||
using mRemoteNG.Connection.Protocol.RDP;
|
||||
using mRemoteNG.Connection.Protocol.VNC;
|
||||
using mRemoteNGTests.Properties;
|
||||
using NUnit.Framework;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace mRemoteNGTests.Config.Serializers.MiscSerializers
|
||||
{
|
||||
public class RemoteDesktopManagerDeserializerTests
|
||||
{
|
||||
private readonly RemoteDesktopManagerDeserializer _sut = new RemoteDesktopManagerDeserializer();
|
||||
private readonly Dictionary<ProtocolType, string> _rdmExports = new Dictionary<ProtocolType, string>
|
||||
{
|
||||
{ProtocolType.RDP, Resources.rdp_rdm_export},
|
||||
{ProtocolType.SSH2, Resources.ssh_rdm_export},
|
||||
{ProtocolType.VNC, Resources.vnc_rdm_export},
|
||||
{ProtocolType.Telnet, Resources.telnet_rdm_export},
|
||||
{ProtocolType.HTTPS, Resources.website_rdm_export},
|
||||
};
|
||||
|
||||
[TestCaseSource(nameof(RdpPropertiesAndValues))]
|
||||
public void CorrectlyImportsRdpProperties(string propertyName, object expectedValue)
|
||||
{
|
||||
var rootContainer = _sut.Deserialize(_rdmExports[ProtocolType.RDP]);
|
||||
var node = rootContainer.RootNodes[0].Children.FirstOrDefault(i => i.Protocol == ProtocolType.RDP);
|
||||
Assert.That(node, Is.Not.Null);
|
||||
|
||||
var actualValue = node.GetType().GetProperty(propertyName)?.GetValue(node);
|
||||
Assert.That(actualValue, Is.EqualTo(expectedValue));
|
||||
}
|
||||
|
||||
[TestCaseSource(nameof(SshPropertiesAndValues))]
|
||||
public void CorrectlyImportsSshProperties(string propertyName, object expectedValue)
|
||||
{
|
||||
var rootContainer = _sut.Deserialize(_rdmExports[ProtocolType.SSH2]);
|
||||
var node = rootContainer.RootNodes[0].Children.FirstOrDefault(i => i.Protocol == ProtocolType.SSH2);
|
||||
Assert.That(node, Is.Not.Null);
|
||||
|
||||
var actualValue = node.GetType().GetProperty(propertyName)?.GetValue(node);
|
||||
Assert.That(actualValue, Is.EqualTo(expectedValue));
|
||||
}
|
||||
|
||||
[TestCaseSource(nameof(VncPropertiesAndValues))]
|
||||
public void CorrectlyImportsVncProperties(string propertyName, object expectedValue)
|
||||
{
|
||||
var rootContainer = _sut.Deserialize(_rdmExports[ProtocolType.VNC]);
|
||||
var node = rootContainer.RootNodes[0].Children.FirstOrDefault(i => i.Protocol == ProtocolType.VNC);
|
||||
Assert.That(node, Is.Not.Null);
|
||||
|
||||
var actualValue = node.GetType().GetProperty(propertyName)?.GetValue(node);
|
||||
Assert.That(actualValue, Is.EqualTo(expectedValue));
|
||||
}
|
||||
|
||||
[TestCaseSource(nameof(TelnetPropertiesAndValues))]
|
||||
public void CorrectlyImportsTelnetProperties(string propertyName, object expectedValue)
|
||||
{
|
||||
var rootContainer = _sut.Deserialize(_rdmExports[ProtocolType.Telnet]);
|
||||
var node = rootContainer.RootNodes[0].Children.FirstOrDefault(i => i.Protocol == ProtocolType.Telnet);
|
||||
Assert.That(node, Is.Not.Null);
|
||||
|
||||
var actualValue = node.GetType().GetProperty(propertyName)?.GetValue(node);
|
||||
Assert.That(actualValue, Is.EqualTo(expectedValue));
|
||||
}
|
||||
|
||||
[TestCaseSource(nameof(WebsitePropertiesAndValues))]
|
||||
public void CorrectlyImportsWebsiteProperties(string propertyName, object expectedValue)
|
||||
{
|
||||
var rootContainer = _sut.Deserialize(_rdmExports[ProtocolType.HTTPS]);
|
||||
var node = rootContainer.RootNodes[0].Children.FirstOrDefault(i => i.Protocol == ProtocolType.HTTPS);
|
||||
Assert.That(node, Is.Not.Null);
|
||||
|
||||
var actualValue = node.GetType().GetProperty(propertyName)?.GetValue(node);
|
||||
Assert.That(actualValue, Is.EqualTo(expectedValue));
|
||||
}
|
||||
|
||||
private static IEnumerable<TestCaseData> RdpPropertiesAndValues()
|
||||
{
|
||||
return new[]
|
||||
{
|
||||
new TestCaseData(nameof(ConnectionInfo.ConstantID), "1f36e6f0-90ca-4607-b6ec-86227738486d"),
|
||||
new TestCaseData(nameof(ConnectionInfo.Name), "rdp connection"),
|
||||
new TestCaseData(nameof(ConnectionInfo.Protocol), ProtocolType.RDP),
|
||||
new TestCaseData(nameof(ConnectionInfo.Hostname), "my.rdp.host.com"),
|
||||
new TestCaseData(nameof(ConnectionInfo.Description), "This is a general description"),
|
||||
new TestCaseData(nameof(ConnectionInfo.Username), "user1"),
|
||||
new TestCaseData(nameof(ConnectionInfo.Domain), "domain1"),
|
||||
//new TestCaseData(nameof(ConnectionInfo.Password), "password1"),
|
||||
new TestCaseData(nameof(ConnectionInfo.Resolution), RDPResolutions.FitToWindow),
|
||||
new TestCaseData(nameof(ConnectionInfo.AutomaticResize), true),
|
||||
new TestCaseData(nameof(ConnectionInfo.CacheBitmaps), false),
|
||||
new TestCaseData(nameof(ConnectionInfo.DisplayThemes), false),
|
||||
new TestCaseData(nameof(ConnectionInfo.DisplayWallpaper), false),
|
||||
new TestCaseData(nameof(ConnectionInfo.EnableDesktopComposition), true),
|
||||
new TestCaseData(nameof(ConnectionInfo.EnableFontSmoothing), true),
|
||||
new TestCaseData(nameof(ConnectionInfo.RedirectSound), RDPSounds.DoNotPlay),
|
||||
new TestCaseData(nameof(ConnectionInfo.RedirectAudioCapture), true),
|
||||
new TestCaseData(nameof(ConnectionInfo.RedirectClipboard), false),
|
||||
new TestCaseData(nameof(ConnectionInfo.RedirectDiskDrives), false),
|
||||
new TestCaseData(nameof(ConnectionInfo.RedirectPrinters), true),
|
||||
new TestCaseData(nameof(ConnectionInfo.RedirectPorts), false),
|
||||
new TestCaseData(nameof(ConnectionInfo.RedirectSmartCards), true),
|
||||
new TestCaseData(nameof(ConnectionInfo.RDPMinutesToIdleTimeout), 17),
|
||||
new TestCaseData(nameof(ConnectionInfo.MacAddress), "mac-add-goes-here"),
|
||||
new TestCaseData(nameof(ConnectionInfo.UseCredSsp), true),
|
||||
new TestCaseData(nameof(ConnectionInfo.Port), 1234),
|
||||
new TestCaseData(nameof(ConnectionInfo.RdpVersion), RdpVersion.Rdc7),
|
||||
new TestCaseData(nameof(ConnectionInfo.RedirectKeys), true),
|
||||
new TestCaseData(nameof(ConnectionInfo.UseConsoleSession), true),
|
||||
new TestCaseData(nameof(ConnectionInfo.RDPAuthenticationLevel), AuthenticationLevel.WarnOnFailedAuth),
|
||||
new TestCaseData(nameof(ConnectionInfo.RDGatewayUsageMethod), RDGatewayUsageMethod.Always),
|
||||
new TestCaseData(nameof(ConnectionInfo.RDGatewayUseConnectionCredentials), RDGatewayUseConnectionCredentials.Yes),
|
||||
new TestCaseData(nameof(ConnectionInfo.RDGatewayHostname), "rdhost1"),
|
||||
new TestCaseData(nameof(ConnectionInfo.RDGatewayUsername), "rduser1"),
|
||||
new TestCaseData(nameof(ConnectionInfo.RDGatewayDomain), "rddomain1"),
|
||||
//new TestCaseData(nameof(ConnectionInfo.RDGatewayPassword), "rdpassword1"),
|
||||
new TestCaseData(nameof(ConnectionInfo.UseEnhancedMode), true),
|
||||
new TestCaseData(nameof(ConnectionInfo.UseVmId), true),
|
||||
new TestCaseData(nameof(ConnectionInfo.VmId), "instance-id-here"),
|
||||
};
|
||||
}
|
||||
|
||||
private static IEnumerable<TestCaseData> SshPropertiesAndValues()
|
||||
{
|
||||
return new[]
|
||||
{
|
||||
new TestCaseData(nameof(ConnectionInfo.ConstantID), "44ae261f-0094-48a2-93cb-bc5abcfcc394"),
|
||||
new TestCaseData(nameof(ConnectionInfo.Name), "ssh connection"),
|
||||
new TestCaseData(nameof(ConnectionInfo.Protocol), ProtocolType.SSH2),
|
||||
new TestCaseData(nameof(ConnectionInfo.Hostname), "mysshhost"),
|
||||
new TestCaseData(nameof(ConnectionInfo.Description), "This is a linux host description"),
|
||||
new TestCaseData(nameof(ConnectionInfo.Username), "linuxuser1"),
|
||||
//new TestCaseData(nameof(ConnectionInfo.Password), "linuxpassword1"),
|
||||
new TestCaseData(nameof(ConnectionInfo.MacAddress), "some-mac-here"),
|
||||
new TestCaseData(nameof(ConnectionInfo.Port), 4321),
|
||||
};
|
||||
}
|
||||
|
||||
private static IEnumerable<TestCaseData> VncPropertiesAndValues()
|
||||
{
|
||||
return new[]
|
||||
{
|
||||
new TestCaseData(nameof(ConnectionInfo.ConstantID), "16ff7dd6-2ac3-4e27-96cf-435b5bfe5a00"),
|
||||
new TestCaseData(nameof(ConnectionInfo.Name), "vnc connection"),
|
||||
new TestCaseData(nameof(ConnectionInfo.Protocol), ProtocolType.VNC),
|
||||
new TestCaseData(nameof(ConnectionInfo.Hostname), "vnchost1"),
|
||||
new TestCaseData(nameof(ConnectionInfo.Port), 9987),
|
||||
new TestCaseData(nameof(ConnectionInfo.Description), "This is a VNC description"),
|
||||
new TestCaseData(nameof(ConnectionInfo.Username), "winuser1"),
|
||||
new TestCaseData(nameof(ConnectionInfo.Domain), "windomain1"),
|
||||
//new TestCaseData(nameof(ConnectionInfo.Password), "vncpassword1"),
|
||||
new TestCaseData(nameof(ConnectionInfo.MacAddress), "some-mac-here"),
|
||||
|
||||
new TestCaseData(nameof(ConnectionInfo.VNCEncoding), ProtocolVNC.Encoding.EncTight),
|
||||
new TestCaseData(nameof(ConnectionInfo.VNCAuthMode), ProtocolVNC.AuthMode.AuthWin),
|
||||
new TestCaseData(nameof(ConnectionInfo.VNCCompression), ProtocolVNC.Compression.Comp4),
|
||||
new TestCaseData(nameof(ConnectionInfo.VNCViewOnly), true),
|
||||
new TestCaseData(nameof(ConnectionInfo.VNCProxyIP), "proxyhost"),
|
||||
new TestCaseData(nameof(ConnectionInfo.VNCProxyPort), 7777),
|
||||
};
|
||||
}
|
||||
|
||||
private static IEnumerable<TestCaseData> TelnetPropertiesAndValues()
|
||||
{
|
||||
return new[]
|
||||
{
|
||||
new TestCaseData(nameof(ConnectionInfo.ConstantID), "8d77d3ac-b414-4b51-ac10-60304d63cc6f"),
|
||||
new TestCaseData(nameof(ConnectionInfo.Name), "telnet connection"),
|
||||
new TestCaseData(nameof(ConnectionInfo.Protocol), ProtocolType.Telnet),
|
||||
new TestCaseData(nameof(ConnectionInfo.Hostname), "telnethost1"),
|
||||
new TestCaseData(nameof(ConnectionInfo.Description), "Telnet description"),
|
||||
new TestCaseData(nameof(ConnectionInfo.Username), "user1"),
|
||||
//new TestCaseData(nameof(ConnectionInfo.Password), "password1"),
|
||||
new TestCaseData(nameof(ConnectionInfo.MacAddress), "some-mac-here"),
|
||||
new TestCaseData(nameof(ConnectionInfo.Port), 7648),
|
||||
};
|
||||
}
|
||||
|
||||
private static IEnumerable<TestCaseData> WebsitePropertiesAndValues()
|
||||
{
|
||||
return new[]
|
||||
{
|
||||
new TestCaseData(nameof(ConnectionInfo.ConstantID), "65092747-6870-42c9-b8bc-35ec9fb5b3fb"),
|
||||
new TestCaseData(nameof(ConnectionInfo.Name), "website connection"),
|
||||
new TestCaseData(nameof(ConnectionInfo.Protocol), ProtocolType.HTTPS),
|
||||
new TestCaseData(nameof(ConnectionInfo.Hostname), "www.google.com"),
|
||||
new TestCaseData(nameof(ConnectionInfo.Description), "Website description"),
|
||||
new TestCaseData(nameof(ConnectionInfo.Username), "user1"),
|
||||
new TestCaseData(nameof(ConnectionInfo.Domain), "domain1"),
|
||||
//new TestCaseData(nameof(ConnectionInfo.Password), "password1"),
|
||||
new TestCaseData(nameof(ConnectionInfo.Port), 8080),
|
||||
new TestCaseData(nameof(ConnectionInfo.RenderingEngine), HTTPBase.RenderingEngine.Gecko),
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ namespace mRemoteNGTests.Config.Serializers.Versioning
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
var sqlConnector = Substitute.For<SqlDatabaseConnector>("", "", "", "");
|
||||
var sqlConnector = Substitute.For<MSSqlDatabaseConnector>("", "", "", "");
|
||||
_versionUpgrader = new SqlVersion22To23Upgrader(sqlConnector);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace mRemoteNGTests.Config.Serializers.Versioning
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
var sqlConnector = Substitute.For<SqlDatabaseConnector>("", "", "", "");
|
||||
var sqlConnector = Substitute.For<MSSqlDatabaseConnector>("", "", "", "");
|
||||
_versionUpgrader = new SqlVersion23To24Upgrader(sqlConnector);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace mRemoteNGTests.Config.Serializers.Versioning
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
var sqlConnector = Substitute.For<SqlDatabaseConnector>("", "", "", "");
|
||||
var sqlConnector = Substitute.For<MSSqlDatabaseConnector>("", "", "", "");
|
||||
_versionUpgrader = new SqlVersion24To25Upgrader(sqlConnector);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace mRemoteNGTests.Config.Serializers.Versioning
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
var sqlConnector = Substitute.For<SqlDatabaseConnector>("", "", "", "");
|
||||
var sqlConnector = Substitute.For<MSSqlDatabaseConnector>("", "", "", "");
|
||||
_versionUpgrader = new SqlVersion25To26Upgrader(sqlConnector);
|
||||
}
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ namespace mRemoteNGTests.Connection
|
||||
{
|
||||
var wasCalled = false;
|
||||
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
|
||||
_testAbstractConnectionInfoData.RDPAuthenticationLevel = RdpProtocol.AuthenticationLevel.AuthRequired;
|
||||
_testAbstractConnectionInfoData.RDPAuthenticationLevel = AuthenticationLevel.AuthRequired;
|
||||
Assert.That(wasCalled, Is.True);
|
||||
}
|
||||
|
||||
@@ -201,7 +201,7 @@ namespace mRemoteNGTests.Connection
|
||||
{
|
||||
var wasCalled = false;
|
||||
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
|
||||
_testAbstractConnectionInfoData.RDGatewayUsageMethod = RdpProtocol.RDGatewayUsageMethod.Always;
|
||||
_testAbstractConnectionInfoData.RDGatewayUsageMethod = RDGatewayUsageMethod.Always;
|
||||
Assert.That(wasCalled, Is.True);
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ namespace mRemoteNGTests.Connection
|
||||
{
|
||||
var wasCalled = false;
|
||||
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
|
||||
_testAbstractConnectionInfoData.RDGatewayUseConnectionCredentials = RdpProtocol.RDGatewayUseConnectionCredentials.SmartCard;
|
||||
_testAbstractConnectionInfoData.RDGatewayUseConnectionCredentials = RDGatewayUseConnectionCredentials.SmartCard;
|
||||
Assert.That(wasCalled, Is.True);
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ namespace mRemoteNGTests.Connection
|
||||
{
|
||||
var wasCalled = false;
|
||||
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
|
||||
_testAbstractConnectionInfoData.Resolution = RdpProtocol.RDPResolutions.Res1366x768;
|
||||
_testAbstractConnectionInfoData.Resolution = RDPResolutions.Res1366x768;
|
||||
Assert.That(wasCalled, Is.True);
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ namespace mRemoteNGTests.Connection
|
||||
{
|
||||
var wasCalled = false;
|
||||
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
|
||||
_testAbstractConnectionInfoData.Colors = RdpProtocol.RDPColors.Colors16Bit;
|
||||
_testAbstractConnectionInfoData.Colors = RDPColors.Colors16Bit;
|
||||
Assert.That(wasCalled, Is.True);
|
||||
}
|
||||
|
||||
@@ -372,7 +372,7 @@ namespace mRemoteNGTests.Connection
|
||||
{
|
||||
var wasCalled = false;
|
||||
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
|
||||
_testAbstractConnectionInfoData.RedirectSound = RdpProtocol.RDPSounds.DoNotPlay;
|
||||
_testAbstractConnectionInfoData.RedirectSound = RDPSounds.DoNotPlay;
|
||||
Assert.That(wasCalled, Is.True);
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,8 @@ namespace mRemoteNGTests.Connection
|
||||
[Test]
|
||||
public void CloneCorrectlySetsParentOfInheritanceObject()
|
||||
{
|
||||
var clonedConnection = _connectionInfo.Clone();
|
||||
var originalConnection = new ConnectionInfo();
|
||||
var clonedConnection = originalConnection.Clone();
|
||||
Assert.That(clonedConnection.Inheritance.Parent, Is.EqualTo(clonedConnection));
|
||||
}
|
||||
|
||||
@@ -135,7 +136,7 @@ namespace mRemoteNGTests.Connection
|
||||
{
|
||||
public static IEnumerable<PropertyInfo> GetProperties()
|
||||
{
|
||||
return new ConnectionInfoInheritance(new object()).GetProperties();
|
||||
return new ConnectionInfoInheritance(new ConnectionInfo()).GetProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace mRemoteNGTests.Connection
|
||||
DefaultConnectionInfo.Instance.SaveTo(saveTarget);
|
||||
|
||||
var valueInSource = property.GetValue(DefaultConnectionInfo.Instance).ToString();
|
||||
var valueInDestination = saveTarget.GetType().GetProperty(property.Name).GetValue(saveTarget).ToString();
|
||||
var valueInDestination = saveTarget.GetType().GetProperty(property.Name)?.GetValue(saveTarget)?.ToString();
|
||||
Assert.That(valueInDestination, Is.EqualTo(valueInSource));
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace mRemoteNGTests.Connection
|
||||
[TestCaseSource(nameof(GetInheritanceProperties))]
|
||||
public void LoadingDefaultInheritanceUpdatesAllProperties(PropertyInfo property)
|
||||
{
|
||||
var inheritanceSource = new ConnectionInfoInheritance(new object(), true);
|
||||
var inheritanceSource = new ConnectionInfoInheritance(new ConnectionInfo(), true);
|
||||
inheritanceSource.TurnOnInheritanceCompletely();
|
||||
DefaultConnectionInheritance.Instance.TurnOffInheritanceCompletely();
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace mRemoteNGTests.Connection
|
||||
[TestCaseSource(nameof(GetInheritanceProperties))]
|
||||
public void SavingDefaultInheritanceExportsAllProperties(PropertyInfo property)
|
||||
{
|
||||
var saveTarget = new ConnectionInfoInheritance(new object(), true);
|
||||
var saveTarget = new ConnectionInfoInheritance(new ConnectionInfo(), true);
|
||||
saveTarget.TurnOffInheritanceCompletely();
|
||||
DefaultConnectionInheritance.Instance.TurnOnInheritanceCompletely();
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace mRemoteNGTests.Connection
|
||||
public void NewInheritanceInstancesCreatedWithDefaultInheritanceValues()
|
||||
{
|
||||
DefaultConnectionInheritance.Instance.Domain = true;
|
||||
var inheritanceInstance = new ConnectionInfoInheritance(new object());
|
||||
var inheritanceInstance = new ConnectionInfoInheritance(new ConnectionInfo());
|
||||
Assert.That(inheritanceInstance.Domain, Is.True);
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace mRemoteNGTests.Connection
|
||||
public void NewInheritanceInstancesCreatedWithAllDefaultInheritanceValues(PropertyInfo property)
|
||||
{
|
||||
DefaultConnectionInheritance.Instance.TurnOnInheritanceCompletely();
|
||||
var inheritanceInstance = new ConnectionInfoInheritance(new object());
|
||||
var inheritanceInstance = new ConnectionInfoInheritance(new ConnectionInfo());
|
||||
|
||||
var valueInDestination = property.GetValue(inheritanceInstance);
|
||||
var valueInSource = property.GetValue(DefaultConnectionInheritance.Instance);
|
||||
@@ -57,7 +57,7 @@ namespace mRemoteNGTests.Connection
|
||||
|
||||
private static IEnumerable<PropertyInfo> GetInheritanceProperties()
|
||||
{
|
||||
return new ConnectionInfoInheritance(new object(), true).GetProperties();
|
||||
return new ConnectionInfoInheritance(new ConnectionInfo(), true).GetProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.Tools;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
|
||||
136
mRemoteNGTests/Properties/Resources.Designer.cs
generated
136
mRemoteNGTests/Properties/Resources.Designer.cs
generated
@@ -19,7 +19,7 @@ namespace mRemoteNGTests.Properties {
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
@@ -194,6 +194,71 @@ namespace mRemoteNGTests.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <?xml version="1.0"?>
|
||||
///<ArrayOfConnection>
|
||||
/// <Connection>
|
||||
/// <AuthentificationLevel>WarnMe</AuthentificationLevel>
|
||||
/// <AutomaticallyClose>true</AutomaticallyClose>
|
||||
/// <AutomaticallyCloseInterval>17</AutomaticallyCloseInterval>
|
||||
/// <ConnectionType>RDPConfigured</ConnectionType>
|
||||
/// <Console>true</Console>
|
||||
/// <Description>This is a general description</Description>
|
||||
/// <DesktopComposition>true</DesktopComposition>
|
||||
/// <DisableBitmapCache>true</DisableBitmapCache>
|
||||
/// <DisableThemes>true</Disable [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string rdp_rdm_export {
|
||||
get {
|
||||
return ResourceManager.GetString("rdp_rdm_export", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <?xml version="1.0"?>
|
||||
///<ArrayOfConnection>
|
||||
/// <Connection>
|
||||
/// <ConnectionType>SSHShell</ConnectionType>
|
||||
/// <Description>This is a linux host description</Description>
|
||||
/// <ID>44ae261f-0094-48a2-93cb-bc5abcfcc394</ID>
|
||||
/// <Name>ssh connection</Name>
|
||||
/// <OpenEmbedded>true</OpenEmbedded>
|
||||
/// <Stamp>ab007011-2836-426f-a8e0-9fef1ff88865</Stamp>
|
||||
/// <MetaInformation>
|
||||
/// <MAC>some-mac-here</MAC>
|
||||
/// <PasswordHistory>
|
||||
/// <PasswordHistory>
|
||||
/// <LoggedModifiedBy>LEVIATHAN\David</LoggedMo [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string ssh_rdm_export {
|
||||
get {
|
||||
return ResourceManager.GetString("ssh_rdm_export", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <?xml version="1.0"?>
|
||||
///<ArrayOfConnection>
|
||||
/// <Connection>
|
||||
/// <ConnectionType>Telnet</ConnectionType>
|
||||
/// <Description>Telnet description</Description>
|
||||
/// <ID>8d77d3ac-b414-4b51-ac10-60304d63cc6f</ID>
|
||||
/// <Name>telnet connection</Name>
|
||||
/// <OpenEmbedded>true</OpenEmbedded>
|
||||
/// <Stamp>08aaa9ff-3583-4dc0-8622-3a0f4d37a7c4</Stamp>
|
||||
/// <MetaInformation>
|
||||
/// <MAC>some-mac-here</MAC>
|
||||
/// <PasswordHistory>
|
||||
/// <PasswordHistory>
|
||||
/// <LoggedModifiedBy>LEVIATHAN\David</LoggedModifiedBy>
|
||||
/// [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string telnet_rdm_export {
|
||||
get {
|
||||
return ResourceManager.GetString("telnet_rdm_export", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <?xml version="1.0" encoding="utf-16"?>
|
||||
///<!-- ****************************************************************-->
|
||||
@@ -298,6 +363,32 @@ namespace mRemoteNGTests.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?>
|
||||
///<RDCMan programVersion="2.7" schemaVersion="3">
|
||||
/// <file>
|
||||
/// <credentialsProfiles />
|
||||
/// <properties>
|
||||
/// <expanded>True</expanded>
|
||||
/// <name>test_RDCMan_connections</name>
|
||||
/// </properties>
|
||||
/// <smartGroup>
|
||||
/// <properties>
|
||||
/// <expanded>False</expanded>
|
||||
/// <name>AllServers</name>
|
||||
/// </properties>
|
||||
/// <ruleGroup operator="All">
|
||||
/// <rule>
|
||||
/// <property>DisplayName</property>
|
||||
/// <operator>Matches</operator>
|
||||
/// [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string test_rdcman_v2_7_schema3_empty_values {
|
||||
get {
|
||||
return ResourceManager.GetString("test_rdcman_v2_7_schema3_empty_values", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <?xml version="1.0" encoding="utf-8"?>
|
||||
///<RDCMan programVersion="2.7" schemaVersion="3">
|
||||
@@ -390,5 +481,48 @@ namespace mRemoteNGTests.Properties {
|
||||
return ResourceManager.GetString("update_portable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <?xml version="1.0"?>
|
||||
///<ArrayOfConnection>
|
||||
/// <Connection>
|
||||
/// <ConnectionSubType>UltraVNC</ConnectionSubType>
|
||||
/// <ConnectionType>VNC</ConnectionType>
|
||||
/// <Description>This is a VNC description</Description>
|
||||
/// <ID>16ff7dd6-2ac3-4e27-96cf-435b5bfe5a00</ID>
|
||||
/// <Name>vnc connection</Name>
|
||||
/// <OpenEmbedded>true</OpenEmbedded>
|
||||
/// <Stamp>a44e3b58-2e14-47bf-8a79-0646b1e4ba46</Stamp>
|
||||
/// <MetaInformation>
|
||||
/// <MAC>some-mac-here</MAC>
|
||||
/// <PasswordHistory>
|
||||
/// <PasswordHistory>
|
||||
/// <L [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string vnc_rdm_export {
|
||||
get {
|
||||
return ResourceManager.GetString("vnc_rdm_export", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to <?xml version="1.0"?>
|
||||
///<ArrayOfConnection>
|
||||
/// <Connection>
|
||||
/// <ConnectionSubType>FireFox</ConnectionSubType>
|
||||
/// <ConnectionType>WebBrowser</ConnectionType>
|
||||
/// <Description>Website description</Description>
|
||||
/// <ID>65092747-6870-42c9-b8bc-35ec9fb5b3fb</ID>
|
||||
/// <Name>website connection</Name>
|
||||
/// <OpenEmbedded>true</OpenEmbedded>
|
||||
/// <Stamp>d04a9abb-4d4c-4ba5-8ef8-1699bd84b734</Stamp>
|
||||
/// <WebBrowserApplication>FireFox</WebBrowserApplication>
|
||||
/// <WebBrowserUrl>https://www.google.com:8080</WebBrow [rest of string was truncated]";.
|
||||
/// </summary>
|
||||
internal static string website_rdm_export {
|
||||
get {
|
||||
return ResourceManager.GetString("website_rdm_export", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,6 +175,9 @@
|
||||
<data name="test_rdcman_v2_7_schema3" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\test_RDCMan_v2_7_schema3.rdg;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="test_rdcman_v2_7_schema3_empty_values" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\test_rdcman_v2_7_schema3_empty_values.rdg;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
<data name="test_rdcman_v2_7_schema3_null_values" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\test_rdcman_v2_7_schema3_null_values.rdg;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
|
||||
</data>
|
||||
@@ -187,4 +190,19 @@
|
||||
<data name="update_portable" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\update-portable.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="rdp_rdm_export" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\rdp.rdm;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="ssh_rdm_export" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\ssh.rdm;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;iso-8859-1</value>
|
||||
</data>
|
||||
<data name="telnet_rdm_export" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\telnet.rdm;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="vnc_rdm_export" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\vnc.rdm;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="website_rdm_export" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\website.rdm;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
</root>
|
||||
65
mRemoteNGTests/Resources/rdp.rdm
Normal file
65
mRemoteNGTests/Resources/rdp.rdm
Normal file
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0"?>
|
||||
<ArrayOfConnection>
|
||||
<Connection>
|
||||
<AuthentificationLevel>WarnMe</AuthentificationLevel>
|
||||
<AutomaticallyClose>true</AutomaticallyClose>
|
||||
<AutomaticallyCloseInterval>17</AutomaticallyCloseInterval>
|
||||
<ConnectionType>RDPConfigured</ConnectionType>
|
||||
<Console>true</Console>
|
||||
<Description>This is a general description</Description>
|
||||
<DesktopComposition>true</DesktopComposition>
|
||||
<DisableBitmapCache>true</DisableBitmapCache>
|
||||
<DisableThemes>true</DisableThemes>
|
||||
<DisableWallpaper>true</DisableWallpaper>
|
||||
<FontSmoothing>true</FontSmoothing>
|
||||
<ID>1f36e6f0-90ca-4607-b6ec-86227738486d</ID>
|
||||
<KeyboardHook>OnTheRemoteComputer</KeyboardHook>
|
||||
<Name>rdp connection</Name>
|
||||
<OpenEmbedded>true</OpenEmbedded>
|
||||
<ScreenColor>C256</ScreenColor>
|
||||
<ScreenSize>CurrentScreenSize</ScreenSize>
|
||||
<SoundHook>DoNotPlay</SoundHook>
|
||||
<Stamp>22400949-a0b8-46c1-8f27-49232ac1fb27</Stamp>
|
||||
<Url>my.rdp.host.com:1234</Url>
|
||||
<UsesClipboard>false</UsesClipboard>
|
||||
<UsesHardDrives>false</UsesHardDrives>
|
||||
<UsesPrinters>true</UsesPrinters>
|
||||
<UsesSerialPorts>false</UsesSerialPorts>
|
||||
<UsesSmartDevices>true</UsesSmartDevices>
|
||||
<MetaInformation>
|
||||
<MAC>mac-add-goes-here</MAC>
|
||||
<PasswordHistory>
|
||||
<PasswordHistory>
|
||||
<LoggedModifiedBy>LEVIATHAN\David</LoggedModifiedBy>
|
||||
<ModifiedBy>LEVIATHAN\David</ModifiedBy>
|
||||
<ModifiedDateTime>2020-01-26T14:40:54</ModifiedDateTime>
|
||||
<SafePassword>T2/JO7Aps+GMZG0vk5Jo8A==</SafePassword>
|
||||
</PasswordHistory>
|
||||
</PasswordHistory>
|
||||
</MetaInformation>
|
||||
<RDP>
|
||||
<AudioCaptureRedirectionMode>true</AudioCaptureRedirectionMode>
|
||||
<Domain>domain1</Domain>
|
||||
<EnableCredSSPSupport>True</EnableCredSSPSupport>
|
||||
<GatewayCredentialsSource>UserPassword</GatewayCredentialsSource>
|
||||
<GatewayDomain>rddomain1</GatewayDomain>
|
||||
<GatewayHostname>rdhost1</GatewayHostname>
|
||||
<GatewayProfileUsageMethod>Explicit</GatewayProfileUsageMethod>
|
||||
<GatewaySafePassword>kLaEwH4EDrZEaaK21HgqHg==</GatewaySafePassword>
|
||||
<GatewayUsageMethod>ModeDirect</GatewayUsageMethod>
|
||||
<GatewayUserName>rduser1</GatewayUserName>
|
||||
<HyperVInstanceID>instance-id-here</HyperVInstanceID>
|
||||
<KeepAliveInterval>6</KeepAliveInterval>
|
||||
<KeyboardLayoutText>Default</KeyboardLayoutText>
|
||||
<NetworkLevelAuthentication>true</NetworkLevelAuthentication>
|
||||
<PromptCredentialOnce>true</PromptCredentialOnce>
|
||||
<RDPType>HyperV</RDPType>
|
||||
<SafePassword>tW7TUhUf1KUzuzuAdANJvg==</SafePassword>
|
||||
<ScreenSizingMode>AutoScale</ScreenSizingMode>
|
||||
<ShadowSessionConsentPrompt>false</ShadowSessionConsentPrompt>
|
||||
<UseEnhancedSessionMode>true</UseEnhancedSessionMode>
|
||||
<UserName>user1</UserName>
|
||||
<Version>RDP70</Version>
|
||||
</RDP>
|
||||
</Connection>
|
||||
</ArrayOfConnection>
|
||||
36
mRemoteNGTests/Resources/ssh.rdm
Normal file
36
mRemoteNGTests/Resources/ssh.rdm
Normal file
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0"?>
|
||||
<ArrayOfConnection>
|
||||
<Connection>
|
||||
<ConnectionType>SSHShell</ConnectionType>
|
||||
<Description>This is a linux host description</Description>
|
||||
<ID>44ae261f-0094-48a2-93cb-bc5abcfcc394</ID>
|
||||
<Name>ssh connection</Name>
|
||||
<OpenEmbedded>true</OpenEmbedded>
|
||||
<Stamp>ab007011-2836-426f-a8e0-9fef1ff88865</Stamp>
|
||||
<MetaInformation>
|
||||
<MAC>some-mac-here</MAC>
|
||||
<PasswordHistory>
|
||||
<PasswordHistory>
|
||||
<LoggedModifiedBy>LEVIATHAN\David</LoggedModifiedBy>
|
||||
<ModifiedBy>LEVIATHAN\David</ModifiedBy>
|
||||
<ModifiedDateTime>2020-01-26T20:46:26</ModifiedDateTime>
|
||||
<SafePassword>rV4oZM9LrfZ6SYHIlwTwvA==</SafePassword>
|
||||
</PasswordHistory>
|
||||
<PasswordHistory>
|
||||
<LoggedModifiedBy>LEVIATHAN\David</LoggedModifiedBy>
|
||||
<ModifiedBy>LEVIATHAN\David</ModifiedBy>
|
||||
<ModifiedDateTime>2020-01-26T14:42:38</ModifiedDateTime>
|
||||
<SafePassword>rV4oZM9LrfbUvSh5Y2lNDw==</SafePassword>
|
||||
</PasswordHistory>
|
||||
</PasswordHistory>
|
||||
</MetaInformation>
|
||||
<Terminal>
|
||||
<Host>mysshhost</Host>
|
||||
<HostPort>4321</HostPort>
|
||||
<PrivateKeyPromptForPassPhrase>false</PrivateKeyPromptForPassPhrase>
|
||||
<SafePassword>/et4Enc7v6HUQXJP6chuhA==</SafePassword>
|
||||
<Username>linuxuser1</Username>
|
||||
</Terminal>
|
||||
<TerminalMac />
|
||||
</Connection>
|
||||
</ArrayOfConnection>
|
||||
30
mRemoteNGTests/Resources/telnet.rdm
Normal file
30
mRemoteNGTests/Resources/telnet.rdm
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0"?>
|
||||
<ArrayOfConnection>
|
||||
<Connection>
|
||||
<ConnectionType>Telnet</ConnectionType>
|
||||
<Description>Telnet description</Description>
|
||||
<ID>8d77d3ac-b414-4b51-ac10-60304d63cc6f</ID>
|
||||
<Name>telnet connection</Name>
|
||||
<OpenEmbedded>true</OpenEmbedded>
|
||||
<Stamp>08aaa9ff-3583-4dc0-8622-3a0f4d37a7c4</Stamp>
|
||||
<MetaInformation>
|
||||
<MAC>some-mac-here</MAC>
|
||||
<PasswordHistory>
|
||||
<PasswordHistory>
|
||||
<LoggedModifiedBy>LEVIATHAN\David</LoggedModifiedBy>
|
||||
<ModifiedBy>LEVIATHAN\David</ModifiedBy>
|
||||
<ModifiedDateTime>2020-01-26T21:50:48</ModifiedDateTime>
|
||||
<SafePassword>T2/JO7Aps+GMZG0vk5Jo8A==</SafePassword>
|
||||
</PasswordHistory>
|
||||
</PasswordHistory>
|
||||
</MetaInformation>
|
||||
<Terminal>
|
||||
<Host>telnethost1</Host>
|
||||
<HostPort>7648</HostPort>
|
||||
<ProxyMode>Custom</ProxyMode>
|
||||
<SafePassword>yLHh9AVRl8TilluPKnidMw==</SafePassword>
|
||||
<Username>user1</Username>
|
||||
</Terminal>
|
||||
<TerminalMac />
|
||||
</Connection>
|
||||
</ArrayOfConnection>
|
||||
@@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RDCMan programVersion="2.7" schemaVersion="3">
|
||||
<file>
|
||||
<credentialsProfiles />
|
||||
<properties>
|
||||
<expanded>True</expanded>
|
||||
<name>test_RDCMan_connections</name>
|
||||
</properties>
|
||||
<smartGroup>
|
||||
<properties>
|
||||
<expanded>False</expanded>
|
||||
<name>AllServers</name>
|
||||
</properties>
|
||||
<ruleGroup operator="All">
|
||||
<rule>
|
||||
<property>DisplayName</property>
|
||||
<operator>Matches</operator>
|
||||
<value>server</value>
|
||||
</rule>
|
||||
</ruleGroup>
|
||||
</smartGroup>
|
||||
<group>
|
||||
<properties>
|
||||
<expanded>True</expanded>
|
||||
<name>Group1</name>
|
||||
</properties>
|
||||
<server>
|
||||
<properties>
|
||||
<displayName></displayName>
|
||||
<name></name>
|
||||
<comment></comment>
|
||||
</properties>
|
||||
<logonCredentials inherit="None">
|
||||
<profileName scope="Local"></profileName>
|
||||
<userName></userName>
|
||||
<password></password>
|
||||
<domain></domain>
|
||||
</logonCredentials>
|
||||
<connectionSettings inherit="None">
|
||||
<connectToConsole></connectToConsole>
|
||||
<startProgram />
|
||||
<workingDir />
|
||||
<port></port>
|
||||
<loadBalanceInfo />
|
||||
</connectionSettings>
|
||||
<gatewaySettings inherit="None">
|
||||
<enabled></enabled>
|
||||
<hostName></hostName>
|
||||
<logonMethod></logonMethod>
|
||||
<localBypass></localBypass>
|
||||
<credSharing></credSharing>
|
||||
<profileName scope="Local"></profileName>
|
||||
<userName></userName>
|
||||
<password />
|
||||
<domain></domain>
|
||||
</gatewaySettings>
|
||||
<remoteDesktop inherit="None">
|
||||
<sameSizeAsClientArea></sameSizeAsClientArea>
|
||||
<fullScreen></fullScreen>
|
||||
<colorDepth></colorDepth>
|
||||
</remoteDesktop>
|
||||
<localResources inherit="None">
|
||||
<audioRedirection></audioRedirection>
|
||||
<audioRedirectionQuality></audioRedirectionQuality>
|
||||
<audioCaptureRedirection></audioCaptureRedirection>
|
||||
<keyboardHook></keyboardHook>
|
||||
<redirectClipboard></redirectClipboard>
|
||||
<redirectDrives></redirectDrives>
|
||||
<redirectDrivesList>
|
||||
<item></item>
|
||||
<item></item>
|
||||
<item></item>
|
||||
<item></item>
|
||||
<item></item>
|
||||
</redirectDrivesList>
|
||||
<redirectPrinters></redirectPrinters>
|
||||
<redirectPorts></redirectPorts>
|
||||
<redirectSmartCards></redirectSmartCards>
|
||||
<redirectPnpDevices></redirectPnpDevices>
|
||||
</localResources>
|
||||
<displaySettings inherit="None">
|
||||
<thumbnailScale></thumbnailScale>
|
||||
<smartSizeDockedWindows></smartSizeDockedWindows>
|
||||
<smartSizeUndockedWindows></smartSizeUndockedWindows>
|
||||
</displaySettings>
|
||||
<securitySettings inherit="None">
|
||||
<authentication></authentication>
|
||||
</securitySettings>
|
||||
</server>
|
||||
</group>
|
||||
</file>
|
||||
<connected />
|
||||
<favorites />
|
||||
<recentlyUsed />
|
||||
</RDCMan>
|
||||
@@ -26,65 +26,20 @@
|
||||
</properties>
|
||||
<server>
|
||||
<properties>
|
||||
<displayName></displayName>
|
||||
<name></name>
|
||||
<comment></comment>
|
||||
</properties>
|
||||
<logonCredentials inherit="None">
|
||||
<profileName scope="Local"></profileName>
|
||||
<userName></userName>
|
||||
<password></password>
|
||||
<domain></domain>
|
||||
</logonCredentials>
|
||||
<connectionSettings inherit="None">
|
||||
<connectToConsole></connectToConsole>
|
||||
<startProgram />
|
||||
<workingDir />
|
||||
<port></port>
|
||||
<loadBalanceInfo />
|
||||
</connectionSettings>
|
||||
<gatewaySettings inherit="None">
|
||||
<enabled></enabled>
|
||||
<hostName></hostName>
|
||||
<logonMethod></logonMethod>
|
||||
<localBypass></localBypass>
|
||||
<credSharing></credSharing>
|
||||
<profileName scope="Local"></profileName>
|
||||
<userName></userName>
|
||||
<password />
|
||||
<domain></domain>
|
||||
</gatewaySettings>
|
||||
<remoteDesktop inherit="None">
|
||||
<sameSizeAsClientArea></sameSizeAsClientArea>
|
||||
<fullScreen></fullScreen>
|
||||
<colorDepth></colorDepth>
|
||||
</remoteDesktop>
|
||||
<localResources inherit="None">
|
||||
<audioRedirection></audioRedirection>
|
||||
<audioRedirectionQuality></audioRedirectionQuality>
|
||||
<audioCaptureRedirection></audioCaptureRedirection>
|
||||
<keyboardHook></keyboardHook>
|
||||
<redirectClipboard></redirectClipboard>
|
||||
<redirectDrives></redirectDrives>
|
||||
<redirectDrivesList>
|
||||
<item></item>
|
||||
<item></item>
|
||||
<item></item>
|
||||
<item></item>
|
||||
<item></item>
|
||||
</redirectDrivesList>
|
||||
<redirectPrinters></redirectPrinters>
|
||||
<redirectPorts></redirectPorts>
|
||||
<redirectSmartCards></redirectSmartCards>
|
||||
<redirectPnpDevices></redirectPnpDevices>
|
||||
</localResources>
|
||||
<displaySettings inherit="None">
|
||||
<thumbnailScale></thumbnailScale>
|
||||
<smartSizeDockedWindows></smartSizeDockedWindows>
|
||||
<smartSizeUndockedWindows></smartSizeUndockedWindows>
|
||||
</displaySettings>
|
||||
<securitySettings inherit="None">
|
||||
<authentication></authentication>
|
||||
</securitySettings>
|
||||
</server>
|
||||
</group>
|
||||
|
||||
45
mRemoteNGTests/Resources/vnc.rdm
Normal file
45
mRemoteNGTests/Resources/vnc.rdm
Normal file
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0"?>
|
||||
<ArrayOfConnection>
|
||||
<Connection>
|
||||
<ConnectionSubType>UltraVNC</ConnectionSubType>
|
||||
<ConnectionType>VNC</ConnectionType>
|
||||
<Description>This is a VNC description</Description>
|
||||
<ID>16ff7dd6-2ac3-4e27-96cf-435b5bfe5a00</ID>
|
||||
<Name>vnc connection</Name>
|
||||
<OpenEmbedded>true</OpenEmbedded>
|
||||
<Stamp>a44e3b58-2e14-47bf-8a79-0646b1e4ba46</Stamp>
|
||||
<MetaInformation>
|
||||
<MAC>some-mac-here</MAC>
|
||||
<PasswordHistory>
|
||||
<PasswordHistory>
|
||||
<LoggedModifiedBy>LEVIATHAN\David</LoggedModifiedBy>
|
||||
<ModifiedBy>LEVIATHAN\David</ModifiedBy>
|
||||
<ModifiedDateTime>2020-01-26T21:12:44</ModifiedDateTime>
|
||||
<SafePassword>aHjuKKmVmbivKM+wovI3aA==</SafePassword>
|
||||
</PasswordHistory>
|
||||
<PasswordHistory>
|
||||
<LoggedModifiedBy>LEVIATHAN\David</LoggedModifiedBy>
|
||||
<ModifiedBy>LEVIATHAN\David</ModifiedBy>
|
||||
<ModifiedDateTime>2020-01-26T21:08:16</ModifiedDateTime>
|
||||
<SafePassword>uEGtwH/QfjSvKM+wovI3aA==</SafePassword>
|
||||
</PasswordHistory>
|
||||
</PasswordHistory>
|
||||
</MetaInformation>
|
||||
<VNC>
|
||||
<CustomCompressionLevel>4</CustomCompressionLevel>
|
||||
<DisableClipboard>true</DisableClipboard>
|
||||
<Host>vnchost1</Host>
|
||||
<JPEGCompressionLevel>3</JPEGCompressionLevel>
|
||||
<MsDomain>windomain1</MsDomain>
|
||||
<MsSafePassword>bUWiWCi7qod7YQ5XXK5LFQ==</MsSafePassword>
|
||||
<MsUser>winuser1</MsUser>
|
||||
<Port>9987</Port>
|
||||
<PreferredEncoding>Tight</PreferredEncoding>
|
||||
<ProxyHost>proxyhost:7777</ProxyHost>
|
||||
<SafePassword>oGzaL3q/dK17YQ5XXK5LFQ==</SafePassword>
|
||||
<ScreenColorDepth>C8</ScreenColorDepth>
|
||||
<ViewOnly>true</ViewOnly>
|
||||
<VNCEmbeddedType>UltraVNC</VNCEmbeddedType>
|
||||
</VNC>
|
||||
</Connection>
|
||||
</ArrayOfConnection>
|
||||
29
mRemoteNGTests/Resources/website.rdm
Normal file
29
mRemoteNGTests/Resources/website.rdm
Normal file
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0"?>
|
||||
<ArrayOfConnection>
|
||||
<Connection>
|
||||
<ConnectionSubType>FireFox</ConnectionSubType>
|
||||
<ConnectionType>WebBrowser</ConnectionType>
|
||||
<Description>Website description</Description>
|
||||
<ID>65092747-6870-42c9-b8bc-35ec9fb5b3fb</ID>
|
||||
<Name>website connection</Name>
|
||||
<OpenEmbedded>true</OpenEmbedded>
|
||||
<Stamp>d04a9abb-4d4c-4ba5-8ef8-1699bd84b734</Stamp>
|
||||
<WebBrowserApplication>FireFox</WebBrowserApplication>
|
||||
<WebBrowserUrl>https://www.google.com:8080</WebBrowserUrl>
|
||||
<MetaInformation>
|
||||
<PasswordHistory>
|
||||
<PasswordHistory>
|
||||
<LoggedModifiedBy>LEVIATHAN\David</LoggedModifiedBy>
|
||||
<ModifiedBy>LEVIATHAN\David</ModifiedBy>
|
||||
<ModifiedDateTime>2020-01-26T22:01:26</ModifiedDateTime>
|
||||
<SafePassword>T2/JO7Aps+GMZG0vk5Jo8A==</SafePassword>
|
||||
</PasswordHistory>
|
||||
</PasswordHistory>
|
||||
</MetaInformation>
|
||||
<Web>
|
||||
<Domain>domain1</Domain>
|
||||
<SafePassword>24ifhl01e7Le3Aj8NxM4ww==</SafePassword>
|
||||
<UserName>user1</UserName>
|
||||
</Web>
|
||||
</Connection>
|
||||
</ArrayOfConnection>
|
||||
@@ -1,94 +1,17 @@
|
||||
using System;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.Connection.Protocol.Http;
|
||||
using mRemoteNG.Connection.Protocol.ICA;
|
||||
using mRemoteNG.Connection.Protocol.RDP;
|
||||
using mRemoteNG.Connection.Protocol.VNC;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Container;
|
||||
|
||||
namespace mRemoteNGTests.TestHelpers
|
||||
{
|
||||
internal static class ConnectionInfoHelpers
|
||||
internal static class ConnectionInfoHelpers
|
||||
{
|
||||
private static readonly Random _random = new Random();
|
||||
|
||||
/// <summary>
|
||||
/// Returns a <see cref="ConnectionInfo"/> object with randomized
|
||||
/// values in all fields.
|
||||
/// </summary>
|
||||
internal static ConnectionInfo GetRandomizedConnectionInfo(bool randomizeInheritance = false)
|
||||
{
|
||||
var connectionInfo = new ConnectionInfo
|
||||
{
|
||||
// string types
|
||||
Name = RandomString(),
|
||||
Hostname = RandomString(),
|
||||
Description = RandomString(),
|
||||
Domain = RandomString(),
|
||||
ExtApp = RandomString(),
|
||||
Icon = RandomString(),
|
||||
LoadBalanceInfo = RandomString(),
|
||||
MacAddress = RandomString(),
|
||||
Panel = RandomString(),
|
||||
Password = RandomString(),
|
||||
PostExtApp = RandomString(),
|
||||
PreExtApp = RandomString(),
|
||||
PuttySession = RandomString(),
|
||||
RDGatewayHostname = RandomString(),
|
||||
RDGatewayUsername = RandomString(),
|
||||
RDGatewayDomain = RandomString(),
|
||||
RDGatewayPassword = RandomString(),
|
||||
UserField = RandomString(),
|
||||
Username = RandomString(),
|
||||
VNCProxyIP = RandomString(),
|
||||
VNCProxyPassword = RandomString(),
|
||||
VNCProxyUsername = RandomString(),
|
||||
|
||||
// bool types
|
||||
AutomaticResize = RandomBool(),
|
||||
CacheBitmaps = RandomBool(),
|
||||
DisplayThemes = RandomBool(),
|
||||
DisplayWallpaper = RandomBool(),
|
||||
EnableDesktopComposition = RandomBool(),
|
||||
EnableFontSmoothing = RandomBool(),
|
||||
IsContainer = RandomBool(),
|
||||
IsDefault = RandomBool(),
|
||||
IsQuickConnect = RandomBool(),
|
||||
PleaseConnect = RandomBool(),
|
||||
RDPAlertIdleTimeout = RandomBool(),
|
||||
RedirectDiskDrives = RandomBool(),
|
||||
RedirectKeys = RandomBool(),
|
||||
RedirectPorts = RandomBool(),
|
||||
RedirectPrinters = RandomBool(),
|
||||
RedirectSmartCards = RandomBool(),
|
||||
UseConsoleSession = RandomBool(),
|
||||
UseCredSsp = RandomBool(),
|
||||
VNCViewOnly = RandomBool(),
|
||||
Favorite = RandomBool(),
|
||||
|
||||
// ints
|
||||
Port = RandomInt(),
|
||||
RDPMinutesToIdleTimeout = RandomInt(),
|
||||
VNCProxyPort = RandomInt(),
|
||||
|
||||
// enums
|
||||
Colors = RandomEnum<RdpProtocol.RDPColors>(),
|
||||
ICAEncryptionStrength = RandomEnum<IcaProtocol.EncryptionStrength> (),
|
||||
Protocol = RandomEnum<ProtocolType>(),
|
||||
RDGatewayUsageMethod = RandomEnum<RdpProtocol.RDGatewayUsageMethod>(),
|
||||
RDGatewayUseConnectionCredentials = RandomEnum<RdpProtocol.RDGatewayUseConnectionCredentials>(),
|
||||
RDPAuthenticationLevel = RandomEnum<RdpProtocol.AuthenticationLevel>(),
|
||||
RedirectSound = RandomEnum<RdpProtocol.RDPSounds>(),
|
||||
RenderingEngine = RandomEnum<HTTPBase.RenderingEngine>(),
|
||||
Resolution = RandomEnum<RdpProtocol.RDPResolutions>(),
|
||||
SoundQuality = RandomEnum<RdpProtocol.RDPSoundQuality>(),
|
||||
VNCAuthMode = RandomEnum<ProtocolVNC.AuthMode>(),
|
||||
VNCColors = RandomEnum<ProtocolVNC.Colors>(),
|
||||
VNCCompression = RandomEnum<ProtocolVNC.Compression>(),
|
||||
VNCEncoding = RandomEnum<ProtocolVNC.Encoding>(),
|
||||
VNCProxyType = RandomEnum<ProtocolVNC.ProxyType>(),
|
||||
VNCSmartSizeMode = RandomEnum<ProtocolVNC.SmartSizeMode>(),
|
||||
};
|
||||
var connectionInfo = new ConnectionInfo().RandomizeValues();
|
||||
|
||||
if (randomizeInheritance)
|
||||
connectionInfo.Inheritance = GetRandomizedInheritance(connectionInfo);
|
||||
@@ -96,38 +19,24 @@ namespace mRemoteNGTests.TestHelpers
|
||||
return connectionInfo;
|
||||
}
|
||||
|
||||
internal static ContainerInfo GetRandomizedContainerInfo(bool randomizeInheritance = false)
|
||||
{
|
||||
var containerInfo = new ContainerInfo().RandomizeValues();
|
||||
|
||||
if (randomizeInheritance)
|
||||
containerInfo.Inheritance = GetRandomizedInheritance(containerInfo);
|
||||
|
||||
return containerInfo;
|
||||
}
|
||||
|
||||
internal static ConnectionInfoInheritance GetRandomizedInheritance(ConnectionInfo parent)
|
||||
{
|
||||
var inheritance = new ConnectionInfoInheritance(parent, true);
|
||||
foreach (var property in inheritance.GetProperties())
|
||||
{
|
||||
property.SetValue(inheritance, RandomBool());
|
||||
property.SetValue(inheritance, Randomizer.RandomBool());
|
||||
}
|
||||
return inheritance;
|
||||
}
|
||||
|
||||
internal static string RandomString()
|
||||
{
|
||||
return Guid.NewGuid().ToString("N");
|
||||
}
|
||||
|
||||
internal static bool RandomBool()
|
||||
{
|
||||
return _random.Next() % 2 == 0;
|
||||
}
|
||||
|
||||
internal static int RandomInt()
|
||||
{
|
||||
return _random.Next();
|
||||
}
|
||||
|
||||
internal static T RandomEnum<T>() where T : struct, IConvertible
|
||||
{
|
||||
if (!typeof(T).IsEnum)
|
||||
throw new ArgumentException("T must be an enum");
|
||||
|
||||
var values = Enum.GetValues(typeof(T));
|
||||
return (T)values.GetValue(_random.Next(values.Length));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ using Enum = System.Enum;
|
||||
|
||||
namespace mRemoteNGTests.TestHelpers
|
||||
{
|
||||
internal static class Randomizer
|
||||
internal static class Randomizer
|
||||
{
|
||||
private static readonly Random Random = new Random();
|
||||
|
||||
@@ -98,7 +98,8 @@ namespace mRemoteNGTests.TestHelpers
|
||||
if (opByType.TryGetValue(property.PropertyType, out var mutator))
|
||||
mutator(property, con);
|
||||
|
||||
else if (opByType.TryGetValue(property.PropertyType.BaseType, out var mutator2))
|
||||
else if (property.PropertyType.BaseType != null &&
|
||||
opByType.TryGetValue(property.PropertyType.BaseType, out var mutator2))
|
||||
mutator2(property, con);
|
||||
}
|
||||
|
||||
|
||||
@@ -45,11 +45,14 @@
|
||||
public TType RedirectSmartCards { get; set; }
|
||||
public TType RedirectSound { get; set; }
|
||||
public TType SoundQuality { get; set; }
|
||||
public TType RedirectAudioCapture { get; set; }
|
||||
public TType PreExtApp { get; set; }
|
||||
public TType PostExtApp { get; set; }
|
||||
public TType MacAddress { get; set; }
|
||||
public TType UserField { get; set; }
|
||||
public TType Favorite { get; set; }
|
||||
public TType VmId { get; set; }
|
||||
public TType UseVmId { get; set; }
|
||||
public TType VNCCompression { get; set; }
|
||||
public TType VNCEncoding { get; set; }
|
||||
public TType VNCAuthMode { get; set; }
|
||||
@@ -61,5 +64,7 @@
|
||||
public TType VNCColors { get; set; }
|
||||
public TType VNCSmartSizeMode { get; set; }
|
||||
public TType VNCViewOnly { get; set; }
|
||||
}
|
||||
public TType RdpVersion { get; set; }
|
||||
public TType UseEnhancedMode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
133
mRemoteNGTests/UI/Controls/FilteredPropertyGridTests.cs
Normal file
133
mRemoteNGTests/UI/Controls/FilteredPropertyGridTests.cs
Normal file
@@ -0,0 +1,133 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using mRemoteNG.UI.Controls.FilteredPropertyGrid;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace mRemoteNGTests.UI.Controls
|
||||
{
|
||||
public class FilteredPropertyGridTests
|
||||
{
|
||||
[Test]
|
||||
public void AllPropertiesVisibleByDefault()
|
||||
{
|
||||
var grid = new FilteredPropertyGrid();
|
||||
var obj = new {Prop1 = "hello"};
|
||||
grid.SelectedObject = obj;
|
||||
|
||||
Assert.That(grid.VisibleProperties, Is.EquivalentTo(new []{ nameof(obj.Prop1) }));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void PropertiesOnTheHiddenPropertiesListAreNotShown()
|
||||
{
|
||||
var grid = new FilteredPropertyGrid();
|
||||
var obj = new { Prop1 = "hello", Prop2 = "world" };
|
||||
grid.HiddenProperties = new[] { nameof(obj.Prop1) };
|
||||
grid.SelectedObject = obj;
|
||||
|
||||
Assert.That(grid.VisibleProperties, Is.EquivalentTo(new[] { nameof(obj.Prop2) }));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void OnlyPropertiesOnTheBrowsablePropertiesListAreShown()
|
||||
{
|
||||
var grid = new FilteredPropertyGrid();
|
||||
var obj = new { Prop1 = "hello", Prop2 = "world" };
|
||||
grid.BrowsableProperties = new[] { nameof(obj.Prop1) };
|
||||
grid.SelectedObject = obj;
|
||||
|
||||
Assert.That(grid.VisibleProperties, Is.EquivalentTo(new[] { nameof(obj.Prop1) }));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void APropertyOnBothTheBrowsableAndHiddenListWillNotBeShown()
|
||||
{
|
||||
var grid = new FilteredPropertyGrid();
|
||||
var obj = new { Prop1 = "hello", Prop2 = "world", Prop3 = "!" };
|
||||
grid.BrowsableProperties = new[] { nameof(obj.Prop1), nameof(obj.Prop2) };
|
||||
grid.HiddenProperties = new[] { nameof(obj.Prop1) };
|
||||
grid.SelectedObject = obj;
|
||||
|
||||
Assert.That(grid.VisibleProperties, Is.EquivalentTo(new[] { nameof(obj.Prop2) }));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ExceptionThrownWhenNonExistantPropertyFoundInBrowsablePropertiesList()
|
||||
{
|
||||
var grid = new FilteredPropertyGrid();
|
||||
var obj = new { Prop1 = "hello" };
|
||||
grid.SelectedObject = obj;
|
||||
|
||||
Assert.Throws<InvalidOperationException>(() =>
|
||||
grid.BrowsableProperties = new[] {"NonExistantProperty"});
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void HiddenPropertiesListCanHandleNonExistentProperties()
|
||||
{
|
||||
var grid = new FilteredPropertyGrid();
|
||||
var obj = new { Prop1 = "hello" };
|
||||
grid.SelectedObject = obj;
|
||||
|
||||
Assert.DoesNotThrow(() => grid.HiddenProperties = new[] { "NonExistantProperty" });
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetVisibleGridItemsReturnsAllExpandedItems()
|
||||
{
|
||||
var grid = new FilteredPropertyGrid();
|
||||
var obj = new { Prop1 = "hello", Prop2 = new{Prop3 = "world"} };
|
||||
grid.SelectedObject = obj;
|
||||
|
||||
var visibleGridItems = grid.GetVisibleGridItems();
|
||||
|
||||
Assert.That(visibleGridItems.Select(i => i.Label),
|
||||
Is.EquivalentTo(new[]
|
||||
{
|
||||
nameof(obj.Prop1),
|
||||
nameof(obj.Prop2)
|
||||
}));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CanSelectGridItem()
|
||||
{
|
||||
var grid = new FilteredPropertyGrid();
|
||||
var obj = new { Prop1 = "hello", Prop2 = "world" };
|
||||
grid.SelectedObject = obj;
|
||||
|
||||
grid.SelectGridItem(nameof(obj.Prop2));
|
||||
|
||||
Assert.That(grid.SelectedGridItem.PropertyDescriptor?.Name,
|
||||
Is.EqualTo(nameof(obj.Prop2)));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void FindNextGridItemPropertyReturnsTheCorrectItem()
|
||||
{
|
||||
var grid = new FilteredPropertyGrid();
|
||||
var obj = new { Prop1 = "hello", Prop2 = "world" };
|
||||
grid.SelectedObject = obj;
|
||||
|
||||
grid.SelectGridItem(nameof(obj.Prop1));
|
||||
var nextGridItem = grid.FindNextGridItemProperty(grid.SelectedGridItem);
|
||||
|
||||
Assert.That(nextGridItem?.PropertyDescriptor?.Name,
|
||||
Is.EqualTo(nameof(obj.Prop2)));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void FindPreviousGridItemPropertyReturnsTheCorrectItem()
|
||||
{
|
||||
var grid = new FilteredPropertyGrid();
|
||||
var obj = new { Prop1 = "hello", Prop2 = "world", Prop3 = "!" };
|
||||
grid.SelectedObject = obj;
|
||||
|
||||
grid.SelectGridItem(nameof(obj.Prop3));
|
||||
var nextGridItem = grid.FindPreviousGridItemProperty(grid.SelectedGridItem);
|
||||
|
||||
Assert.That(nextGridItem?.PropertyDescriptor?.Name,
|
||||
Is.EqualTo(nameof(obj.Prop2)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.UI.Controls.PageSequence;
|
||||
using NSubstitute;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace mRemoteNGTests.UI.Controls
|
||||
|
||||
@@ -1,11 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace mRemoteNGTests.UI.Controls
|
||||
|
||||
@@ -30,8 +30,8 @@ namespace mRemoteNGTests.UI.Forms
|
||||
[SetUICulture("en-US")]
|
||||
public void PasswordFormText()
|
||||
{
|
||||
FormTester formTester = new FormTester("PasswordForm");
|
||||
Assert.That(formTester.Text, Does.Match("Password"));
|
||||
var formTester = new FormTester("PasswordForm");
|
||||
Assert.That(formTester.Text, Does.Match("mRemoteNG password"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -12,17 +12,14 @@ using NUnit.Framework;
|
||||
|
||||
namespace mRemoteNGTests.UI.Window.ConfigWindowTests
|
||||
{
|
||||
public class ConfigWindowGeneralTests
|
||||
public class ConfigWindowGeneralTests
|
||||
{
|
||||
private ConfigWindow _configWindow;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
_configWindow = new ConfigWindow
|
||||
{
|
||||
PropertiesVisible = true
|
||||
};
|
||||
_configWindow = new ConfigWindow();
|
||||
}
|
||||
|
||||
[TestCaseSource(nameof(ConnectionInfoGeneralTestCases))]
|
||||
@@ -57,7 +54,92 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
|
||||
Assert.That(_configWindow.VisibleObjectProperties, Is.EquivalentTo(expectedVisibleProperties));
|
||||
}
|
||||
|
||||
private static IEnumerable<TestCaseData> ConnectionInfoGeneralTestCases()
|
||||
[Test]
|
||||
public void SwitchFromInheritanceToConnectionPropertiesWhenClickingRootNode()
|
||||
{
|
||||
// connection with a normal parent container
|
||||
var connection = new ConnectionInfo();
|
||||
connection.SetParent(new ContainerInfo());
|
||||
|
||||
_configWindow.SelectedTreeNode = connection;
|
||||
_configWindow.ShowInheritanceProperties();
|
||||
|
||||
_configWindow.SelectedTreeNode = new RootNodeInfo(RootNodeType.Connection);
|
||||
Assert.That(_configWindow.PropertiesVisible, Is.True,
|
||||
() => "The property mode should switch from inheritance to connection properties when clicking on the root node.");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SwitchFromInheritanceToConnectionPropertiesWhenClickingRootPuttyNode()
|
||||
{
|
||||
// connection with a normal parent container
|
||||
var connection = new ConnectionInfo();
|
||||
connection.SetParent(new ContainerInfo());
|
||||
|
||||
_configWindow.SelectedTreeNode = connection;
|
||||
_configWindow.ShowInheritanceProperties();
|
||||
|
||||
_configWindow.SelectedTreeNode = new RootPuttySessionsNodeInfo();
|
||||
Assert.That(_configWindow.PropertiesVisible, Is.True,
|
||||
() => "The property mode should switch from inheritance to connection properties when clicking on the root node.");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SwitchFromInheritanceToConnectionPropertiesWhenClickingChildOfRootNode()
|
||||
{
|
||||
// connection with a normal parent container
|
||||
var root = new RootNodeInfo(RootNodeType.Connection);
|
||||
var containerWhoseParentIsRoot = new ContainerInfo();
|
||||
var connection = new ConnectionInfo();
|
||||
root.AddChild(containerWhoseParentIsRoot);
|
||||
containerWhoseParentIsRoot.AddChild(connection);
|
||||
|
||||
_configWindow.SelectedTreeNode = connection;
|
||||
_configWindow.ShowInheritanceProperties();
|
||||
|
||||
_configWindow.SelectedTreeNode = containerWhoseParentIsRoot;
|
||||
Assert.That(_configWindow.PropertiesVisible, Is.True,
|
||||
() => "The property mode should switch from inheritance to connection properties " +
|
||||
"when clicking on a container whose parent is the root node.");
|
||||
}
|
||||
|
||||
[TestCaseSource(nameof(EveryNodeType))]
|
||||
public void DefaultConnectionPropertiesCanBeShownRegardlessOfWhichNodeIsSelected(ConnectionInfo selectedObject)
|
||||
{
|
||||
_configWindow.SelectedTreeNode = selectedObject;
|
||||
Assert.That(_configWindow.CanShowDefaultProperties, Is.True);
|
||||
}
|
||||
|
||||
[TestCaseSource(nameof(EveryNodeType))]
|
||||
public void DefaultInheritancePropertiesCanBeShownRegardlessOfWhichNodeIsSelected(ConnectionInfo selectedObject)
|
||||
{
|
||||
_configWindow.SelectedTreeNode = selectedObject;
|
||||
Assert.That(_configWindow.CanShowDefaultInheritance, Is.True);
|
||||
}
|
||||
|
||||
[TestCaseSource(nameof(EveryNodeType))]
|
||||
public void ConnectionPropertiesCanAlwaysBeShownUnlessNothingIsSelected(ConnectionInfo selectedObject)
|
||||
{
|
||||
_configWindow.SelectedTreeNode = selectedObject;
|
||||
|
||||
var selectedObjectNotNull = selectedObject != null;
|
||||
Assert.That(_configWindow.CanShowProperties, Is.EqualTo(selectedObjectNotNull));
|
||||
}
|
||||
|
||||
[TestCaseSource(nameof(EveryNodeType))]
|
||||
public void InheritancePropertiesAreVisibleInCertainCases(ConnectionInfo selectedObject)
|
||||
{
|
||||
_configWindow.SelectedTreeNode = selectedObject;
|
||||
|
||||
var shouldBeAvailable = selectedObject != null &&
|
||||
!(selectedObject is RootNodeInfo) &&
|
||||
!(selectedObject is PuttySessionInfo) &&
|
||||
!(selectedObject.Parent is RootNodeInfo);
|
||||
|
||||
Assert.That(_configWindow.CanShowInheritance, Is.EqualTo(shouldBeAvailable));
|
||||
}
|
||||
|
||||
private static IEnumerable<TestCaseData> ConnectionInfoGeneralTestCases()
|
||||
{
|
||||
var protocolTypes = typeof(ProtocolType).GetEnumValues().OfType<ProtocolType>();
|
||||
var testCases = new List<TestCaseData>();
|
||||
@@ -80,6 +162,56 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
|
||||
return testCases;
|
||||
}
|
||||
|
||||
private static IEnumerable<TestCaseData> EveryNodeType()
|
||||
{
|
||||
var protocolTypes = typeof(ProtocolType).GetEnumValues().OfType<ProtocolType>().ToList();
|
||||
var root = new RootNodeInfo(RootNodeType.Connection);
|
||||
var container = new ContainerInfo();
|
||||
var connectionsWithNormalParent = protocolTypes
|
||||
.Select(protocolType =>
|
||||
{
|
||||
var c = new ConnectionInfo {Protocol = protocolType};
|
||||
c.SetParent(container);
|
||||
return new TestCaseData(c).SetName(protocolType + ", Connection, NormalParent");
|
||||
});
|
||||
|
||||
var connectionsWithRootParent = protocolTypes
|
||||
.Select(protocolType =>
|
||||
{
|
||||
var c = new ConnectionInfo { Protocol = protocolType };
|
||||
c.SetParent(root);
|
||||
return new TestCaseData(c).SetName(protocolType + ", Connection, RootParent");
|
||||
});
|
||||
|
||||
var contianersWithNormalParent = protocolTypes
|
||||
.Select(protocolType =>
|
||||
{
|
||||
var c = new ContainerInfo { Protocol = protocolType };
|
||||
c.SetParent(container);
|
||||
return new TestCaseData(c).SetName(protocolType + ", Connection, NormalParent");
|
||||
});
|
||||
|
||||
var containersWithRootParent = protocolTypes
|
||||
.Select(protocolType =>
|
||||
{
|
||||
var c = new ContainerInfo { Protocol = protocolType };
|
||||
c.SetParent(root);
|
||||
return new TestCaseData(c).SetName(protocolType + ", Connection, RootParent");
|
||||
});
|
||||
|
||||
return connectionsWithNormalParent
|
||||
.Concat(connectionsWithRootParent)
|
||||
.Concat(contianersWithNormalParent)
|
||||
.Concat(containersWithRootParent)
|
||||
.Concat(new[]
|
||||
{
|
||||
new TestCaseData(root).SetName("RootNode"),
|
||||
new TestCaseData(new RootPuttySessionsNodeInfo()).SetName("RootPuttyNode"),
|
||||
new TestCaseData(new PuttySessionInfo()).SetName("PuttyNode"),
|
||||
new TestCaseData(null).SetName("Null"),
|
||||
});
|
||||
}
|
||||
|
||||
internal static ConnectionInfo ConstructConnectionInfo(ProtocolType protocol, bool isContainer)
|
||||
{
|
||||
// build connection info. set certain connection properties so
|
||||
@@ -90,12 +222,13 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
|
||||
: new ConnectionInfo();
|
||||
|
||||
node.Protocol = protocol;
|
||||
node.Resolution = RdpProtocol.RDPResolutions.Res800x600;
|
||||
node.RDGatewayUsageMethod = RdpProtocol.RDGatewayUsageMethod.Never;
|
||||
node.RDGatewayUseConnectionCredentials = RdpProtocol.RDGatewayUseConnectionCredentials.Yes;
|
||||
node.RedirectSound = RdpProtocol.RDPSounds.DoNotPlay;
|
||||
node.Resolution = RDPResolutions.Res800x600;
|
||||
node.RDGatewayUsageMethod = RDGatewayUsageMethod.Never;
|
||||
node.RDGatewayUseConnectionCredentials = RDGatewayUseConnectionCredentials.Yes;
|
||||
node.RedirectSound = RDPSounds.DoNotPlay;
|
||||
node.VNCAuthMode = ProtocolVNC.AuthMode.AuthVNC;
|
||||
node.VNCProxyType = ProtocolVNC.ProxyType.ProxyNone;
|
||||
node.UseVmId = false;
|
||||
node.Inheritance.TurnOffInheritanceCompletely();
|
||||
|
||||
return node;
|
||||
@@ -134,6 +267,7 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
|
||||
nameof(ConnectionInfo.Password),
|
||||
nameof(ConnectionInfo.Domain),
|
||||
nameof(ConnectionInfo.Port),
|
||||
nameof(ConnectionInfo.UseVmId),
|
||||
nameof(ConnectionInfo.UseConsoleSession),
|
||||
nameof(ConnectionInfo.RDPAuthenticationLevel),
|
||||
nameof(ConnectionInfo.RDPMinutesToIdleTimeout),
|
||||
@@ -154,6 +288,8 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
|
||||
nameof(ConnectionInfo.RedirectPorts),
|
||||
nameof(ConnectionInfo.RedirectSmartCards),
|
||||
nameof(ConnectionInfo.RedirectSound),
|
||||
nameof(ConnectionInfo.RedirectAudioCapture),
|
||||
nameof(ConnectionInfo.RdpVersion)
|
||||
});
|
||||
break;
|
||||
case ProtocolType.VNC:
|
||||
@@ -206,6 +342,15 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
|
||||
nameof(ConnectionInfo.CacheBitmaps),
|
||||
});
|
||||
break;
|
||||
case ProtocolType.PowerShell:
|
||||
expectedProperties.AddRange(new[]
|
||||
{
|
||||
nameof(ConnectionInfo.Username),
|
||||
nameof(ConnectionInfo.Password),
|
||||
nameof(ConnectionInfo.Domain),
|
||||
nameof(ConnectionInfo.Port),
|
||||
});
|
||||
break;
|
||||
case ProtocolType.IntApp:
|
||||
expectedProperties.AddRange(new[]
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.Connection.Protocol.RDP;
|
||||
using NUnit.Framework;
|
||||
|
||||
@@ -18,12 +17,12 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
|
||||
RunVerification();
|
||||
}
|
||||
|
||||
[TestCase(RdpProtocol.RDGatewayUsageMethod.Always)]
|
||||
[TestCase(RdpProtocol.RDGatewayUsageMethod.Detect)]
|
||||
public void RdGatewayPropertiesShown_WhenRdGatewayUsageMethodIsNotNever(RdpProtocol.RDGatewayUsageMethod gatewayUsageMethod)
|
||||
[TestCase(RDGatewayUsageMethod.Always)]
|
||||
[TestCase(RDGatewayUsageMethod.Detect)]
|
||||
public void RdGatewayPropertiesShown_WhenRdGatewayUsageMethodIsNotNever(RDGatewayUsageMethod gatewayUsageMethod)
|
||||
{
|
||||
ConnectionInfo.RDGatewayUsageMethod = gatewayUsageMethod;
|
||||
ConnectionInfo.RDGatewayUseConnectionCredentials = RdpProtocol.RDGatewayUseConnectionCredentials.Yes;
|
||||
ConnectionInfo.RDGatewayUseConnectionCredentials = RDGatewayUseConnectionCredentials.Yes;
|
||||
ExpectedPropertyList.AddRange(new []
|
||||
{
|
||||
nameof(mRemoteNG.Connection.ConnectionInfo.RDGatewayHostname),
|
||||
@@ -33,11 +32,11 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
|
||||
RunVerification();
|
||||
}
|
||||
|
||||
[TestCase(RdpProtocol.RDGatewayUseConnectionCredentials.No)]
|
||||
[TestCase(RdpProtocol.RDGatewayUseConnectionCredentials.SmartCard)]
|
||||
public void RdGatewayPropertiesShown_WhenRDGatewayUseConnectionCredentialsIsNotYes(RdpProtocol.RDGatewayUseConnectionCredentials useConnectionCredentials)
|
||||
[TestCase(RDGatewayUseConnectionCredentials.No)]
|
||||
[TestCase(RDGatewayUseConnectionCredentials.SmartCard)]
|
||||
public void RdGatewayPropertiesShown_WhenRDGatewayUseConnectionCredentialsIsNotYes(RDGatewayUseConnectionCredentials useConnectionCredentials)
|
||||
{
|
||||
ConnectionInfo.RDGatewayUsageMethod = RdpProtocol.RDGatewayUsageMethod.Always;
|
||||
ConnectionInfo.RDGatewayUsageMethod = RDGatewayUsageMethod.Always;
|
||||
ConnectionInfo.RDGatewayUseConnectionCredentials = useConnectionCredentials;
|
||||
ExpectedPropertyList.AddRange(new []
|
||||
{
|
||||
@@ -54,15 +53,15 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
|
||||
[Test]
|
||||
public void SoundQualityPropertyShown_WhenRdpSoundsSetToBringToThisComputer()
|
||||
{
|
||||
ConnectionInfo.RedirectSound = RdpProtocol.RDPSounds.BringToThisComputer;
|
||||
ConnectionInfo.RedirectSound = RDPSounds.BringToThisComputer;
|
||||
ExpectedPropertyList.Add(nameof(mRemoteNG.Connection.ConnectionInfo.SoundQuality));
|
||||
|
||||
RunVerification();
|
||||
}
|
||||
|
||||
[TestCase(RdpProtocol.RDPResolutions.FitToWindow)]
|
||||
[TestCase(RdpProtocol.RDPResolutions.Fullscreen)]
|
||||
public void AutomaticResizePropertyShown_WhenResolutionIsDynamic(RdpProtocol.RDPResolutions resolution)
|
||||
[TestCase(RDPResolutions.FitToWindow)]
|
||||
[TestCase(RDPResolutions.Fullscreen)]
|
||||
public void AutomaticResizePropertyShown_WhenResolutionIsDynamic(RDPResolutions resolution)
|
||||
{
|
||||
ConnectionInfo.Resolution = resolution;
|
||||
ExpectedPropertyList.Add(nameof(mRemoteNG.Connection.ConnectionInfo.AutomaticResize));
|
||||
|
||||
@@ -6,7 +6,7 @@ using NUnit.Framework;
|
||||
|
||||
namespace mRemoteNGTests.UI.Window.ConfigWindowTests
|
||||
{
|
||||
public abstract class ConfigWindowSpecialTestsBase
|
||||
public abstract class ConfigWindowSpecialTestsBase
|
||||
{
|
||||
protected abstract ProtocolType Protocol { get; }
|
||||
protected bool TestAgainstContainerInfo { get; set; } = false;
|
||||
@@ -20,10 +20,7 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
|
||||
ConnectionInfo = ConfigWindowGeneralTests.ConstructConnectionInfo(Protocol, TestAgainstContainerInfo);
|
||||
ExpectedPropertyList = ConfigWindowGeneralTests.BuildExpectedConnectionInfoPropertyList(Protocol, TestAgainstContainerInfo);
|
||||
|
||||
ConfigWindow = new ConfigWindow
|
||||
{
|
||||
PropertiesVisible = true,
|
||||
};
|
||||
ConfigWindow = new ConfigWindow();
|
||||
}
|
||||
|
||||
public void RunVerification()
|
||||
|
||||
@@ -8,8 +8,20 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="BouncyCastle.Crypto" publicKeyToken="0e99375e54769942" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.8.5.0" newVersion="1.8.5.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Google.Protobuf" publicKeyToken="a7d26565bac4d604" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.9.2.0" newVersion="3.9.2.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" /></startup></configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /></startup></configuration>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\NUnit.3.11.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" />
|
||||
<Import Project="..\packages\ReportGenerator.4.3.0\build\netstandard2.0\ReportGenerator.props" Condition="Exists('..\packages\ReportGenerator.4.3.0\build\netstandard2.0\ReportGenerator.props')" />
|
||||
<Import Project="..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props')" />
|
||||
<Import Project="..\packages\NUnit.3.12.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
@@ -9,7 +11,7 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>mRemoteNGTests</RootNamespace>
|
||||
<AssemblyName>mRemoteNGTests</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
@@ -58,21 +60,21 @@
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="BouncyCastle.Crypto, Version=1.8.4.0, Culture=neutral, PublicKeyToken=0e99375e54769942">
|
||||
<HintPath>..\packages\BouncyCastle.1.8.4\lib\BouncyCastle.Crypto.dll</HintPath>
|
||||
<Reference Include="BouncyCastle.Crypto, Version=1.8.5.0, Culture=neutral, PublicKeyToken=0e99375e54769942">
|
||||
<HintPath>..\packages\BouncyCastle.1.8.5\lib\BouncyCastle.Crypto.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Castle.Core.4.3.1\lib\net45\Castle.Core.dll</HintPath>
|
||||
<HintPath>..\packages\Castle.Core.4.4.0\lib\net45\Castle.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="NSubstitute, Version=4.0.0.0, Culture=neutral, PublicKeyToken=92dd2e9066daa5ca, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NSubstitute.4.0.0\lib\net46\NSubstitute.dll</HintPath>
|
||||
<Reference Include="NSubstitute, Version=4.2.0.0, Culture=neutral, PublicKeyToken=92dd2e9066daa5ca, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NSubstitute.4.2.1\lib\net46\NSubstitute.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework, Version=3.11.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll</HintPath>
|
||||
<Reference Include="nunit.framework, Version=3.12.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NUnit.3.12.0\lib\net45\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NUnitForms">
|
||||
<HintPath>nUnitForms\bin\NUnitForms.dll</HintPath>
|
||||
@@ -85,11 +87,11 @@
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.DirectoryServices" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.6.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.2\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
@@ -121,6 +123,7 @@
|
||||
<Compile Include="Config\DataProviders\FileBackupCreatorTests.cs" />
|
||||
<Compile Include="Config\DataProviders\FileDataProviderTests.cs" />
|
||||
<Compile Include="Config\DataProviders\FileDataProviderWithRollingBackupTests.cs" />
|
||||
<Compile Include="Config\Serializers\MiscSerializers\RemoteDesktopManagerDeserializerTests.cs" />
|
||||
<Compile Include="Config\Serializers\ConnectionSerializers\Xml\ValidateXmlSchemas.cs" />
|
||||
<Compile Include="Config\Serializers\DataTableDeserializerTests.cs" />
|
||||
<Compile Include="Config\CredentialHarvesterTests.cs" />
|
||||
@@ -218,6 +221,7 @@
|
||||
<Compile Include="Tree\ClickHandlers\SwitchToConnectionClickHandlerTests.cs" />
|
||||
<Compile Include="Tree\SelectedConnectionDeletionConfirmerTests.cs" />
|
||||
<Compile Include="UI\Controls\ConnectionTreeTests.cs" />
|
||||
<Compile Include="UI\Controls\FilteredPropertyGridTests.cs" />
|
||||
<Compile Include="UI\Controls\PageSequenceTests.cs" />
|
||||
<Compile Include="UI\Controls\SecureTextBoxTestForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
@@ -251,6 +255,10 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="Resources\rdp.rdm" />
|
||||
<None Include="Resources\ssh.rdm" />
|
||||
<None Include="Resources\vnc.rdm" />
|
||||
<None Include="Resources\website.rdm" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
@@ -270,12 +278,14 @@
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Resources\confCons_v2_5.xml" />
|
||||
<None Include="Resources\telnet.rdm" />
|
||||
<None Include="Resources\test_puttyConnectionManager_database.dat" />
|
||||
<None Include="Resources\test_rdcman_badVersionNumber.rdg" />
|
||||
<None Include="Resources\test_rdcman_noversion.rdg" />
|
||||
<None Include="Resources\test_rdcman_v2_2_badschemaversion.rdg" />
|
||||
<None Include="Resources\test_rdcman_v2_2_schema1.rdg" />
|
||||
<None Include="Resources\test_RDCMan_v2_7_schema3.rdg" />
|
||||
<None Include="Resources\test_rdcman_v2_7_schema3_empty_values.rdg" />
|
||||
<None Include="Resources\test_rdcman_v2_7_schema3_null_values.rdg" />
|
||||
<None Include="Resources\test_remotedesktopconnection.rdp" />
|
||||
</ItemGroup>
|
||||
@@ -339,7 +349,9 @@
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.11.0\build\NUnit.props'))" />
|
||||
<Error Condition="!Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.12.0\build\NUnit.props'))" />
|
||||
<Error Condition="!Exists('..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props'))" />
|
||||
<Error Condition="!Exists('..\packages\ReportGenerator.4.3.0\build\netstandard2.0\ReportGenerator.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ReportGenerator.4.3.0\build\netstandard2.0\ReportGenerator.props'))" />
|
||||
</Target>
|
||||
<!-- 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.
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="BouncyCastle" version="1.8.4" targetFramework="net46" />
|
||||
<package id="Castle.Core" version="4.3.1" targetFramework="net46" />
|
||||
<package id="BouncyCastle" version="1.8.5" targetFramework="net46" />
|
||||
<package id="Castle.Core" version="4.4.0" targetFramework="net46" />
|
||||
<package id="DockPanelSuite" version="3.0.6" targetFramework="net46" />
|
||||
<package id="log4net" version="2.0.8" targetFramework="net46" />
|
||||
<package id="NSubstitute" version="4.0.0" targetFramework="net46" />
|
||||
<package id="NUnit" version="3.11.0" targetFramework="net46" />
|
||||
<package id="NUnit.Console" version="3.9.0" targetFramework="net46" />
|
||||
<package id="NUnit.ConsoleRunner" version="3.9.0" targetFramework="net46" />
|
||||
<package id="NSubstitute" version="4.2.1" targetFramework="net472" />
|
||||
<package id="NUnit" version="3.12.0" targetFramework="net46" />
|
||||
<package id="NUnit.Console" version="3.10.0" targetFramework="net46" />
|
||||
<package id="NUnit.ConsoleRunner" version="3.10.0" targetFramework="net46" />
|
||||
<package id="NUnit.Extension.NUnitProjectLoader" version="3.6.0" targetFramework="net46" />
|
||||
<package id="NUnit.Extension.NUnitV2Driver" version="3.7.0" targetFramework="net46" />
|
||||
<package id="NUnit.Extension.NUnitV2ResultWriter" version="3.6.0" targetFramework="net46" />
|
||||
<package id="NUnit.Extension.TeamCityEventListener" version="1.0.5" targetFramework="net46" />
|
||||
<package id="NUnit.Extension.TeamCityEventListener" version="1.0.7" targetFramework="net472" />
|
||||
<package id="NUnit.Extension.VSProjectLoader" version="3.8.0" targetFramework="net46" />
|
||||
<package id="NUnit3TestAdapter" version="3.15.1" targetFramework="net472" />
|
||||
<package id="ObjectListView.Official" version="2.9.1" targetFramework="net46" />
|
||||
<package id="OpenCover" version="4.6.519" targetFramework="net46" />
|
||||
<package id="ReportGenerator" version="3.0.2" targetFramework="net46" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net46" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.2" targetFramework="net46" />
|
||||
<package id="OpenCover" version="4.7.922" targetFramework="net46" />
|
||||
<package id="ReportGenerator" version="4.3.0" targetFramework="net472" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.6.0" targetFramework="net472" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.3" targetFramework="net472" />
|
||||
</packages>
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.27130.2010
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.28803.352
|
||||
MinimumVisualStudioVersion = 14.0.25420.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mRemoteV1", "mRemoteV1\mRemoteV1.csproj", "{4934A491-40BC-4E5B-9166-EA1169A220F6}"
|
||||
EndProject
|
||||
@@ -100,25 +100,24 @@ Global
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release Portable|x86.ActiveCfg = Release Portable|x86
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release|x86.ActiveCfg = Release|x86
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug Portable|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug Portable|Any CPU.Build.0 = Debug|Any CPU
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug Portable|x86.ActiveCfg = Debug|Any CPU
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug Portable|x86.Build.0 = Debug|Any CPU
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Installer|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Installer|Any CPU.Build.0 = Release|Any CPU
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Installer|x86.ActiveCfg = Release|Any CPU
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Installer|x86.Build.0 = Release|Any CPU
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Portable|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Portable|Any CPU.Build.0 = Release|Any CPU
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Portable|x86.ActiveCfg = Release|Any CPU
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Portable|x86.Build.0 = Release|Any CPU
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release|x86.Build.0 = Release|Any CPU
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug Portable|Any CPU.ActiveCfg = Release|x86
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug Portable|Any CPU.Build.0 = Release|x86
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug Portable|x86.ActiveCfg = Debug|x86
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug Portable|x86.Build.0 = Debug|x86
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug|x86.Build.0 = Debug|x86
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Installer|Any CPU.ActiveCfg = Release|x86
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Installer|Any CPU.Build.0 = Release|x86
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Installer|x86.ActiveCfg = Release|x86
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Installer|x86.Build.0 = Release|x86
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Portable|Any CPU.ActiveCfg = Release|x86
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Portable|Any CPU.Build.0 = Release|x86
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Portable|x86.ActiveCfg = Release|x86
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Portable|x86.Build.0 = Release|x86
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release|x86.ActiveCfg = Release|x86
|
||||
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -13,6 +13,15 @@ indent_size = 4
|
||||
trim_trailing_whitespace = true
|
||||
charset = utf-8-bom
|
||||
|
||||
# reStructuredText
|
||||
[*.rst]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
indent_size = 3
|
||||
max_line_length = 120
|
||||
|
||||
# Organize usings
|
||||
dotnet_sort_system_directives_first = true
|
||||
|
||||
@@ -41,4 +50,4 @@ csharp_space_after_colon_in_inheritance_clause = true
|
||||
csharp_space_around_binary_operators = before_and_after
|
||||
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
|
||||
csharp_space_between_method_call_name_and_opening_parenthesis = false
|
||||
csharp_space_between_method_call_empty_parameter_list_parentheses = false
|
||||
csharp_space_between_method_call_empty_parameter_list_parentheses = false
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
using Microsoft.Win32;
|
||||
using mRemoteNG.App.Info;
|
||||
using mRemoteNG.UI.TaskDialog;
|
||||
using System;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows.Forms;
|
||||
using Microsoft.Win32;
|
||||
using mRemoteNG.App.Info;
|
||||
using mRemoteNG.Messages;
|
||||
using mRemoteNG.UI.Forms;
|
||||
using mRemoteNG.UI.TaskDialog;
|
||||
|
||||
namespace mRemoteNG.App
|
||||
{
|
||||
@@ -55,21 +55,18 @@ namespace mRemoteNG.App
|
||||
|
||||
private static bool FipsPolicyEnabledForServer2003()
|
||||
{
|
||||
var regKey = Registry.LocalMachine.OpenSubKey("System\\CurrentControlSet\\Control\\Lsa");
|
||||
var fipsPolicy = regKey?.GetValue("FIPSAlgorithmPolicy");
|
||||
if (fipsPolicy == null) return false;
|
||||
fipsPolicy = Convert.ToInt32(fipsPolicy);
|
||||
return (int)fipsPolicy != 0;
|
||||
var regKey = Registry.LocalMachine.OpenSubKey(@"System\CurrentControlSet\Control\Lsa");
|
||||
if (!(regKey?.GetValue("FIPSAlgorithmPolicy") is int fipsPolicy))
|
||||
return false;
|
||||
return fipsPolicy != 0;
|
||||
}
|
||||
|
||||
private static bool FipsPolicyEnabledForServer2008AndNewer()
|
||||
{
|
||||
var regKey =
|
||||
Registry.LocalMachine.OpenSubKey("System\\CurrentControlSet\\Control\\Lsa\\FIPSAlgorithmPolicy");
|
||||
var fipsPolicy = regKey?.GetValue("Enabled");
|
||||
if (fipsPolicy == null) return false;
|
||||
fipsPolicy = Convert.ToInt32(fipsPolicy);
|
||||
return (int)fipsPolicy != 0;
|
||||
var regKey = Registry.LocalMachine.OpenSubKey(@"System\CurrentControlSet\Control\Lsa\FIPSAlgorithmPolicy");
|
||||
if (!(regKey?.GetValue("Enabled") is int fipsPolicy))
|
||||
return false;
|
||||
return fipsPolicy != 0;
|
||||
}
|
||||
|
||||
private static void CheckLenovoAutoScrollUtility(MessageCollector messageCollector)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
@@ -23,11 +23,12 @@ namespace mRemoteNG.App
|
||||
openFileDialog.Multiselect = true;
|
||||
|
||||
var fileTypes = new List<string>();
|
||||
fileTypes.AddRange(new[] {Language.strFilterAllImportable, "*.xml;*.rdp;*.rdg;*.dat;*.csv"});
|
||||
fileTypes.AddRange(new[] {Language.strFilterAllImportable, "*.xml;*.rdp;*.rdg;*.dat;*.csv;*.rdm"});
|
||||
fileTypes.AddRange(new[] {Language.strFiltermRemoteXML, "*.xml"});
|
||||
fileTypes.AddRange(new[] {Language.strFiltermRemoteCSV, "*.csv"});
|
||||
fileTypes.AddRange(new[] {Language.strFilterRDP, "*.rdp"});
|
||||
fileTypes.AddRange(new[] {Language.strFilterRdgFiles, "*.rdg"});
|
||||
fileTypes.AddRange(new[] {Language.RemoteDesktopManagerFiles, "*.rdm"});
|
||||
fileTypes.AddRange(new[] {Language.strFilterPuttyConnectionManager, "*.dat"});
|
||||
fileTypes.AddRange(new[] {Language.strFilterAll, "*.*"});
|
||||
|
||||
@@ -125,6 +126,8 @@ namespace mRemoteNG.App
|
||||
return new RemoteDesktopConnectionManagerImporter();
|
||||
case ".dat":
|
||||
return new PuttyConnectionManagerImporter();
|
||||
case ".rdm":
|
||||
return new RemoteDesktopManagerImporter();
|
||||
default:
|
||||
throw new FileFormatException("Unrecognized file format.");
|
||||
}
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
public static readonly string DefaultConnectionsPath = SettingsFileInfo.SettingsPath;
|
||||
public static readonly string DefaultConnectionsFile = "confCons.xml";
|
||||
public static readonly string DefaultConnectionsFileNew = "confConsNew.xml";
|
||||
public static readonly double ConnectionFileVersion = 2.6;
|
||||
public static readonly double ConnectionFileVersion = 2.7;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
@@ -11,10 +11,10 @@ namespace mRemoteNG.App.Info
|
||||
{
|
||||
public static class GeneralAppInfo
|
||||
{
|
||||
public const string UrlHome = "https://www.mremoteng.org/";
|
||||
public const string UrlDonate = "https://mremoteng.org/contribute/";
|
||||
public const string UrlForum = "https://www.reddit.com/r/mRemoteNG/";
|
||||
public const string UrlBugs = "https://bugs.mremoteng.org/";
|
||||
public const string UrlHome = "https://www.mremoteng.org";
|
||||
public const string UrlDonate = "https://mremoteng.org/contribute";
|
||||
public const string UrlForum = "https://www.reddit.com/r/mRemoteNG";
|
||||
public const string UrlBugs = "https://bugs.mremoteng.org";
|
||||
public static string ApplicationVersion = Application.ProductVersion;
|
||||
public static readonly string ProductName = Application.ProductName;
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace mRemoteNG.App.Initialization
|
||||
var architecture = string.Empty;
|
||||
try
|
||||
{
|
||||
foreach (var o in new ManagementObjectSearcher("SELECT * FROM Win32_Processor WHERE DeviceID=\'CPU0\'")
|
||||
foreach (var o in new ManagementObjectSearcher("SELECT AddressWidth FROM Win32_Processor WHERE DeviceID=\'CPU0\'")
|
||||
.Get())
|
||||
{
|
||||
var managementObject = (ManagementObject)o;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using mRemoteNG.UI.Forms;
|
||||
using System;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.UI.Forms;
|
||||
|
||||
namespace mRemoteNG.App
|
||||
{
|
||||
@@ -27,7 +27,7 @@ namespace mRemoteNG.App
|
||||
CatchAllUnhandledExceptions();
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
FrmSplashScreen frmSplashScreen = FrmSplashScreen.getInstance();
|
||||
var frmSplashScreen = FrmSplashScreen.getInstance();
|
||||
frmSplashScreen.Show();
|
||||
Application.Run(FrmMain.Default);
|
||||
}
|
||||
@@ -85,12 +85,21 @@ namespace mRemoteNG.App
|
||||
|
||||
private static void ApplicationOnThreadException(object sender, ThreadExceptionEventArgs e)
|
||||
{
|
||||
if (!FrmSplashScreen.getInstance().IsDisposed)
|
||||
FrmSplashScreen.getInstance().Close();
|
||||
|
||||
if (FrmMain.Default.IsDisposed) return;
|
||||
|
||||
var window = new UnhandledExceptionWindow(e.Exception, false);
|
||||
window.ShowDialog(FrmMain.Default);
|
||||
|
||||
}
|
||||
|
||||
private static void CurrentDomainOnUnhandledException(object sender, UnhandledExceptionEventArgs e)
|
||||
{
|
||||
if (!FrmSplashScreen.getInstance().IsDisposed)
|
||||
FrmSplashScreen.getInstance().Close();
|
||||
|
||||
var window = new UnhandledExceptionWindow(e.ExceptionObject as Exception, e.IsTerminating);
|
||||
window.ShowDialog(FrmMain.Default);
|
||||
}
|
||||
|
||||
@@ -1,309 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
||||
<Class Name="mRemoteNG.Connection.Info" Collapsed="true">
|
||||
<Position X="29.5" Y="0.5" Width="1.5" />
|
||||
<Compartments>
|
||||
<Compartment Name="Fields" Collapsed="true" />
|
||||
<Compartment Name="Properties" Collapsed="true" />
|
||||
<Compartment Name="Methods" Collapsed="true" />
|
||||
<Compartment Name="Nested Types" Collapsed="false" />
|
||||
</Compartments>
|
||||
<NestedTypes>
|
||||
<Enum Name="mRemoteNG.Connection.Info.Force" Collapsed="true">
|
||||
<TypeIdentifier>
|
||||
<NewMemberFileName>Connection\Connection.Info.cs</NewMemberFileName>
|
||||
</TypeIdentifier>
|
||||
</Enum>
|
||||
<Class Name="mRemoteNG.Connection.Info.Inheritance">
|
||||
<Compartments>
|
||||
<Compartment Name="Properties" Collapsed="true" />
|
||||
<Compartment Name="Methods" Collapsed="true" />
|
||||
</Compartments>
|
||||
<TypeIdentifier>
|
||||
<NewMemberFileName>Connection\Connection.Info.Inheritance.cs</NewMemberFileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
</NestedTypes>
|
||||
<TypeIdentifier>
|
||||
<HashCode>nsdT4YQ80AjyrN6+C3B3TRVBrwEyVASPjA5epmmggHg=</HashCode>
|
||||
<FileName>Connection\Connection.Info.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="mRemoteNG.Connection.List" Collapsed="true" BaseTypeListCollapsed="true">
|
||||
<Position X="27.75" Y="1.5" Width="1.5" />
|
||||
<Compartments>
|
||||
<Compartment Name="Properties" Collapsed="true" />
|
||||
<Compartment Name="Methods" Collapsed="true" />
|
||||
</Compartments>
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAIAAAAAAAAAAAAACAAAAAQAAkAAAAAAAAAAAABEAAA=</HashCode>
|
||||
<FileName>Connection\Connection.List.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Position="0.2" Collapsed="true" />
|
||||
</Class>
|
||||
<Class Name="mRemoteNG.Connection.Protocol.PuttyBase">
|
||||
<Position X="17.25" Y="3.25" Width="2.75" />
|
||||
<Compartments>
|
||||
<Compartment Name="Fields" Collapsed="true" />
|
||||
<Compartment Name="Properties" Collapsed="true" />
|
||||
<Compartment Name="Methods" Collapsed="true" />
|
||||
</Compartments>
|
||||
<NestedTypes>
|
||||
<Enum Name="mRemoteNG.Connection.Protocol.PuttyBase.Putty_Protocol" Collapsed="true">
|
||||
<TypeIdentifier>
|
||||
<NewMemberFileName>Connection\Connection.Protocol.PuttyBase.cs</NewMemberFileName>
|
||||
</TypeIdentifier>
|
||||
</Enum>
|
||||
<Enum Name="mRemoteNG.Connection.Protocol.PuttyBase.Putty_SSHVersion" Collapsed="true">
|
||||
<TypeIdentifier>
|
||||
<NewMemberFileName>Connection\Connection.Protocol.PuttyBase.cs</NewMemberFileName>
|
||||
</TypeIdentifier>
|
||||
</Enum>
|
||||
</NestedTypes>
|
||||
<TypeIdentifier>
|
||||
<HashCode>BjAAQAAAQBAAgAAAgAAAAIAAAAAADoAAAAQAAAGAQgA=</HashCode>
|
||||
<FileName>Connection\Connection.Protocol.PuttyBase.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="mRemoteNG.Connection.Protocol.Converter" Collapsed="true">
|
||||
<Position X="26" Y="0.5" Width="1.5" />
|
||||
<Compartments>
|
||||
<Compartment Name="Methods" Collapsed="true" />
|
||||
</Compartments>
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQAAAAAAAAAA=</HashCode>
|
||||
<FileName>Connection\Connection.Protocol.Protocols.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="mRemoteNG.Connection.Protocol.Base">
|
||||
<Position X="12.25" Y="0.5" Width="1.5" />
|
||||
<Compartments>
|
||||
<Compartment Name="Fields" Collapsed="true" />
|
||||
<Compartment Name="Properties" Collapsed="true" />
|
||||
<Compartment Name="Methods" Collapsed="true" />
|
||||
<Compartment Name="Events" Collapsed="true" />
|
||||
</Compartments>
|
||||
<NestedTypes>
|
||||
<Delegate Name="mRemoteNG.Connection.Protocol.Base.SetTagToNothingCB" Collapsed="true">
|
||||
<TypeIdentifier>
|
||||
<NewMemberFileName>Connection\Connection.Protocol.Base.cs</NewMemberFileName>
|
||||
</TypeIdentifier>
|
||||
</Delegate>
|
||||
<Delegate Name="mRemoteNG.Connection.Protocol.Base.ErrorOccuredEventHandler" Collapsed="true">
|
||||
<TypeIdentifier>
|
||||
<NewMemberFileName>Connection\Connection.Protocol.Base.cs</NewMemberFileName>
|
||||
</TypeIdentifier>
|
||||
</Delegate>
|
||||
<Delegate Name="mRemoteNG.Connection.Protocol.Base.ClosingEventHandler" Collapsed="true">
|
||||
<TypeIdentifier>
|
||||
<NewMemberFileName>Connection\Connection.Protocol.Base.cs</NewMemberFileName>
|
||||
</TypeIdentifier>
|
||||
</Delegate>
|
||||
<Delegate Name="mRemoteNG.Connection.Protocol.Base.ConnectedEventHandler" Collapsed="true">
|
||||
<TypeIdentifier>
|
||||
<NewMemberFileName>Connection\Connection.Protocol.Base.cs</NewMemberFileName>
|
||||
</TypeIdentifier>
|
||||
</Delegate>
|
||||
<Delegate Name="mRemoteNG.Connection.Protocol.Base.DisconnectedEventHandler" Collapsed="true">
|
||||
<TypeIdentifier>
|
||||
<NewMemberFileName>Connection\Connection.Protocol.Base.cs</NewMemberFileName>
|
||||
</TypeIdentifier>
|
||||
</Delegate>
|
||||
<Delegate Name="mRemoteNG.Connection.Protocol.Base.DisposeControlCB" Collapsed="true">
|
||||
<TypeIdentifier>
|
||||
<NewMemberFileName>Connection\Connection.Protocol.Base.cs</NewMemberFileName>
|
||||
</TypeIdentifier>
|
||||
</Delegate>
|
||||
<Delegate Name="mRemoteNG.Connection.Protocol.Base.ConnectingEventHandler" Collapsed="true">
|
||||
<TypeIdentifier>
|
||||
<NewMemberFileName>Connection\Connection.Protocol.Base.cs</NewMemberFileName>
|
||||
</TypeIdentifier>
|
||||
</Delegate>
|
||||
<Delegate Name="mRemoteNG.Connection.Protocol.Base.ClosedEventHandler" Collapsed="true">
|
||||
<TypeIdentifier>
|
||||
<NewMemberFileName>Connection\Connection.Protocol.Base.cs</NewMemberFileName>
|
||||
</TypeIdentifier>
|
||||
</Delegate>
|
||||
<Delegate Name="mRemoteNG.Connection.Protocol.Base.DisposeInterfaceCB" Collapsed="true">
|
||||
<TypeIdentifier>
|
||||
<NewMemberFileName>Connection\Connection.Protocol.Base.cs</NewMemberFileName>
|
||||
</TypeIdentifier>
|
||||
</Delegate>
|
||||
</NestedTypes>
|
||||
<TypeIdentifier>
|
||||
<HashCode>ACSAAQAMAABAQQADAgBUoMSAlIAQAAgAAAAAkwGoABA=</HashCode>
|
||||
<FileName>Connection\Connection.Protocol.Base.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="mRemoteNG.Connection.InterfaceControl" Collapsed="true">
|
||||
<Position X="26" Y="1.5" Width="1.5" />
|
||||
<Compartments>
|
||||
<Compartment Name="Fields" Collapsed="true" />
|
||||
<Compartment Name="Properties" Collapsed="true" />
|
||||
<Compartment Name="Methods" Collapsed="true" />
|
||||
</Compartments>
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAACAAAAAAAACAAABKAAAAAAAAAAAAAEAAABA=</HashCode>
|
||||
<FileName>Connection\Connection.InterfaceControl.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="mRemoteNG.Connection.Icon" Collapsed="true">
|
||||
<Position X="27.75" Y="0.5" Width="1.5" />
|
||||
<Compartments>
|
||||
<Compartment Name="Fields" Collapsed="true" />
|
||||
<Compartment Name="Methods" Collapsed="true" />
|
||||
</Compartments>
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAIAAAAAAAABACAAEAAAAAAAAAAAAAAAAAAAAAAAAAE=</HashCode>
|
||||
<FileName>Connection\Connection.Icon.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="mRemoteNG.Connection.Protocol.VNC.ProtocolVNC" Collapsed="true">
|
||||
<Position X="10" Y="3.25" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AxQAAAAAIAgAAQABAAAAAYAQAQAAAAAAAAAAAEAAwAA=</HashCode>
|
||||
<FileName>Connection\Protocol\VNC\Connection.Protocol.VNC.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="mRemoteNG.Connection.Protocol.Telnet.ProtocolTelnet" Collapsed="true">
|
||||
<Position X="16.75" Y="5.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Connection\Protocol\Telnet\Connection.Protocol.Telnet.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="mRemoteNG.Connection.Protocol.SSH.ProtocolSSH1" Collapsed="true">
|
||||
<Position X="21.25" Y="5.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Connection\Protocol\SSH\Connection.Protocol.SSH1.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="mRemoteNG.Connection.Protocol.SSH.ProtocolSSH2" Collapsed="true">
|
||||
<Position X="23.5" Y="5.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Connection\Protocol\SSH\Connection.Protocol.SSH2.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="mRemoteNG.Connection.Protocol.Serial.ProtocolSerial" Collapsed="true">
|
||||
<Position X="19" Y="5.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Connection\Protocol\Serial\Connection.Protocol.Serial.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="mRemoteNG.Connection.Protocol.Rlogin.ProtocolRlogin" Collapsed="true">
|
||||
<Position X="14.5" Y="5.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Connection\Protocol\Rlogin\Connection.Protocol.Rlogin.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="mRemoteNG.Connection.Protocol.RDP.ProtocolRDP" Collapsed="true">
|
||||
<Position X="3.25" Y="3.25" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>ACQRAAAFIAQgIQACAIBACIAAQaAABIIbAIgUYgEAgAE=</HashCode>
|
||||
<FileName>Connection\Protocol\RDP\Connection.Protocol.RDP.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="mRemoteNG.Connection.Protocol.RAW.ProtocolRAW" Collapsed="true">
|
||||
<Position X="12.25" Y="5.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Connection\Protocol\RAW\Connection.Protocol.RAW.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="mRemoteNG.Connection.Protocol.ICA.ProtocolICA" Collapsed="true">
|
||||
<Position X="1" Y="3.25" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAEAABAAAAAQADAABAIIAIAQABBAAAAIiAAAAEAgA=</HashCode>
|
||||
<FileName>Connection\Protocol\ICA\Connection.Protocol.ICA.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="mRemoteNG.Connection.Protocol.Http.ProtocolHTTP" Collapsed="true">
|
||||
<Position X="5.5" Y="4.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Connection\Protocol\Http\Connection.Protocol.HTTP.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="mRemoteNG.Connection.Protocol.Http.HTTPBase" Collapsed="true">
|
||||
<Position X="6.75" Y="3.25" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AQAAAQAAABAAAQAIAAAAAKCAAAAAAAEAAAAAABAAAUA=</HashCode>
|
||||
<FileName>Connection\Protocol\Http\Connection.Protocol.HTTPBase.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Class Name="mRemoteNG.Connection.Protocol.Http.ProtocolHTTPS" Collapsed="true">
|
||||
<Position X="7.75" Y="4.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Connection\Protocol\Http\Connection.Protocol.HTTPS.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Class>
|
||||
<Enum Name="mRemoteNG.Connection.Protocol.Protocols" Collapsed="true">
|
||||
<Position X="29.5" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AEAwAgAAAQAQAEAAAAAAAAAAJAEABAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Connection\Connection.Protocol.Protocols.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Enum>
|
||||
<Enum Name="mRemoteNG.Connection.Protocol.VNC.Defaults" Collapsed="true">
|
||||
<Position X="26" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Connection\Protocol\VNC\VNCEnum.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Enum>
|
||||
<Enum Name="mRemoteNG.Connection.Protocol.VNC.SpecialKeys" Collapsed="true">
|
||||
<Position X="29.5" Y="4.25" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Connection\Protocol\VNC\VNCEnum.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Enum>
|
||||
<Enum Name="mRemoteNG.Connection.Protocol.VNC.Compression" Collapsed="true">
|
||||
<Position X="29.5" Y="2.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAIAAAAAAAkAAAAAAAQAgAAQAAIAABAAAAAIBAIAA=</HashCode>
|
||||
<FileName>Connection\Protocol\VNC\VNCEnum.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Enum>
|
||||
<Enum Name="mRemoteNG.Connection.Protocol.VNC.Encoding" Collapsed="true">
|
||||
<Position X="27.75" Y="3.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAQAEBAAIAAAAAAAIAAAEAAAQgAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Connection\Protocol\VNC\VNCEnum.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Enum>
|
||||
<Enum Name="mRemoteNG.Connection.Protocol.VNC.AuthMode" Collapsed="true">
|
||||
<Position X="26" Y="2.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAACAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Connection\Protocol\VNC\VNCEnum.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Enum>
|
||||
<Enum Name="mRemoteNG.Connection.Protocol.VNC.ProxyType" Collapsed="true">
|
||||
<Position X="26" Y="4.25" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>BAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAACAACAAA=</HashCode>
|
||||
<FileName>Connection\Protocol\VNC\VNCEnum.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Enum>
|
||||
<Enum Name="mRemoteNG.Connection.Protocol.VNC.Colors" Collapsed="true">
|
||||
<Position X="27.75" Y="2.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAI=</HashCode>
|
||||
<FileName>Connection\Protocol\VNC\VNCEnum.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Enum>
|
||||
<Enum Name="mRemoteNG.Connection.Protocol.VNC.SmartSizeMode" Collapsed="true">
|
||||
<Position X="27.75" Y="4.25" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAIAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAA=</HashCode>
|
||||
<FileName>Connection\Protocol\VNC\VNCEnum.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Enum>
|
||||
<Font Name="Segoe UI" Size="9" />
|
||||
</ClassDiagram>
|
||||
@@ -1,54 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram MajorVersion="1" MinorVersion="1">
|
||||
<Class Name="mRemoteNG.Connection.New.ConnectionRecordImp" Collapsed="true" BaseTypeListCollapsed="true">
|
||||
<Position X="7.75" Y="0.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAQAAAAAIAAAAAAAAAAAIIVAAAAAAAAAAAAAAAAAABA=</HashCode>
|
||||
<FileName>Connection\New\ConnectionRecordImp.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
<Lollipop Orientation="Left" Position="0.1" />
|
||||
</Class>
|
||||
<Interface Name="mRemoteNG.Connection.New.Connectable">
|
||||
<Position X="2.75" Y="0.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAQAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Connection\New\Connectable.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Interface Name="mRemoteNG.Connection.New.ConnectionRecord">
|
||||
<Position X="5" Y="2.5" Width="1.75" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAIAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Connection\New\ConnectionRecord.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Interface Name="mRemoteNG.Connection.New.Protocol">
|
||||
<Position X="1.5" Y="2.5" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAIAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Connection\New\Protocol.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Interface Name="mRemoteNG.Connection.New.ProtocolRDP">
|
||||
<Position X="0.5" Y="4.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Connection\New\ProtocolRDP.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Interface Name="mRemoteNG.Connection.New.ProtocolSSH">
|
||||
<Position X="2.75" Y="4.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
|
||||
<FileName>Connection\New\ProtocolSSH.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Interface Name="mRemoteNG.Connection.RecordList" Collapsed="true">
|
||||
<Position X="7.75" Y="1.75" Width="1.5" />
|
||||
<TypeIdentifier>
|
||||
<HashCode>AAIAAAAAAAAAAAAACAAAAAQAAkAAAAAAAAAAAABEAAA=</HashCode>
|
||||
<FileName>Connection\New\RecordList.cs</FileName>
|
||||
</TypeIdentifier>
|
||||
</Interface>
|
||||
<Font Name="Segoe UI" Size="9" />
|
||||
</ClassDiagram>
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Config.DataProviders;
|
||||
using mRemoteNG.Config.Serializers;
|
||||
using mRemoteNG.Config.Serializers.Csv;
|
||||
using mRemoteNG.Security;
|
||||
using mRemoteNG.Tree;
|
||||
|
||||
@@ -4,23 +4,23 @@ using mRemoteNG.Config.DatabaseConnectors;
|
||||
using mRemoteNG.Messages;
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Data.Common;
|
||||
using System.Threading;
|
||||
|
||||
namespace mRemoteNG.Config.Connections
|
||||
{
|
||||
public class SqlConnectionsUpdateChecker : IConnectionsUpdateChecker
|
||||
{
|
||||
private readonly SqlDatabaseConnector _sqlConnector;
|
||||
private readonly SqlCommand _sqlQuery;
|
||||
private readonly IDatabaseConnector _dbConnector;
|
||||
private readonly DbCommand _dbQuery;
|
||||
private DateTime LastUpdateTime => Runtime.ConnectionsService.LastSqlUpdate;
|
||||
private DateTime _lastDatabaseUpdateTime;
|
||||
|
||||
|
||||
public SqlConnectionsUpdateChecker()
|
||||
{
|
||||
_sqlConnector = DatabaseConnectorFactory.SqlDatabaseConnectorFromSettings();
|
||||
_sqlQuery = new SqlCommand("SELECT * FROM tblUpdate", _sqlConnector.SqlConnection);
|
||||
_dbConnector = DatabaseConnectorFactory.DatabaseConnectorFromSettings();
|
||||
_dbQuery = _dbConnector.DbCommand("SELECT * FROM tblUpdate");
|
||||
_lastDatabaseUpdateTime = default(DateTime);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace mRemoteNG.Config.Connections
|
||||
{
|
||||
try
|
||||
{
|
||||
_sqlConnector.Connect();
|
||||
_dbConnector.Connect();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -76,7 +76,7 @@ namespace mRemoteNG.Config.Connections
|
||||
var lastUpdateInDb = default(DateTime);
|
||||
try
|
||||
{
|
||||
var sqlReader = _sqlQuery.ExecuteReader(CommandBehavior.CloseConnection);
|
||||
var sqlReader = _dbQuery.ExecuteReader(CommandBehavior.CloseConnection);
|
||||
sqlReader.Read();
|
||||
if (sqlReader.HasRows)
|
||||
lastUpdateInDb = Convert.ToDateTime(sqlReader["LastUpdate"]);
|
||||
@@ -114,7 +114,7 @@ namespace mRemoteNG.Config.Connections
|
||||
private void RaiseConnectionsUpdateAvailableEvent()
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, "Remote connection update is available");
|
||||
var args = new ConnectionsUpdateAvailableEventArgs(_sqlConnector, _lastDatabaseUpdateTime);
|
||||
var args = new ConnectionsUpdateAvailableEventArgs(_dbConnector, _lastDatabaseUpdateTime);
|
||||
ConnectionsUpdateAvailable?.Invoke(this, args);
|
||||
}
|
||||
|
||||
@@ -126,9 +126,9 @@ namespace mRemoteNG.Config.Connections
|
||||
private void Dispose(bool itIsSafeToDisposeManagedObjects)
|
||||
{
|
||||
if (!itIsSafeToDisposeManagedObjects) return;
|
||||
_sqlConnector.Disconnect();
|
||||
_sqlConnector.Dispose();
|
||||
_sqlQuery.Dispose();
|
||||
_dbConnector.Disconnect();
|
||||
_dbConnector.Dispose();
|
||||
_dbQuery.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ using mRemoteNG.Tree.Root;
|
||||
|
||||
namespace mRemoteNG.Config.Connections
|
||||
{
|
||||
public class SqlConnectionsLoader : IConnectionsLoader
|
||||
public class SqlConnectionsLoader : IConnectionsLoader
|
||||
{
|
||||
private readonly IDeserializer<string, IEnumerable<LocalConnectionPropertiesModel>>
|
||||
_localConnectionPropertiesDeserializer;
|
||||
@@ -38,7 +38,7 @@ namespace mRemoteNG.Config.Connections
|
||||
|
||||
public ConnectionTreeModel Load()
|
||||
{
|
||||
var connector = DatabaseConnectorFactory.SqlDatabaseConnectorFromSettings();
|
||||
var connector = DatabaseConnectorFactory.DatabaseConnectorFromSettings();
|
||||
var dataProvider = new SqlDataProvider(connector);
|
||||
var metaDataRetriever = new SqlDatabaseMetaDataRetriever();
|
||||
var databaseVersionVerifier = new SqlDatabaseVersionVerifier(connector);
|
||||
@@ -93,7 +93,7 @@ namespace mRemoteNG.Config.Connections
|
||||
});
|
||||
}
|
||||
|
||||
private SqlConnectionListMetaData HandleFirstRun(SqlDatabaseMetaDataRetriever metaDataRetriever, SqlDatabaseConnector connector)
|
||||
private SqlConnectionListMetaData HandleFirstRun(SqlDatabaseMetaDataRetriever metaDataRetriever, IDatabaseConnector connector)
|
||||
{
|
||||
metaDataRetriever.WriteDatabaseMetaData(new RootNodeInfo(RootNodeType.Connection), connector);
|
||||
return metaDataRetriever.GetDatabaseMetaData(connector);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using mRemoteNG.App;
|
||||
@@ -59,12 +58,12 @@ namespace mRemoteNG.Config.Connections
|
||||
return;
|
||||
}
|
||||
|
||||
using (var sqlConnector = DatabaseConnectorFactory.SqlDatabaseConnectorFromSettings())
|
||||
using (var dbConnector = DatabaseConnectorFactory.DatabaseConnectorFromSettings())
|
||||
{
|
||||
sqlConnector.Connect();
|
||||
var databaseVersionVerifier = new SqlDatabaseVersionVerifier(sqlConnector);
|
||||
dbConnector.Connect();
|
||||
var databaseVersionVerifier = new SqlDatabaseVersionVerifier(dbConnector);
|
||||
var metaDataRetriever = new SqlDatabaseMetaDataRetriever();
|
||||
var metaData = metaDataRetriever.GetDatabaseMetaData(sqlConnector);
|
||||
var metaData = metaDataRetriever.GetDatabaseMetaData(dbConnector);
|
||||
|
||||
if (!databaseVersionVerifier.VerifyDatabaseVersion(metaData.ConfVersion))
|
||||
{
|
||||
@@ -73,9 +72,10 @@ namespace mRemoteNG.Config.Connections
|
||||
return;
|
||||
}
|
||||
|
||||
metaDataRetriever.WriteDatabaseMetaData(rootTreeNode, sqlConnector);
|
||||
UpdateConnectionsTable(rootTreeNode, sqlConnector);
|
||||
UpdateUpdatesTable(sqlConnector);
|
||||
metaDataRetriever.WriteDatabaseMetaData(rootTreeNode, dbConnector);
|
||||
UpdateConnectionsTable(rootTreeNode, dbConnector);
|
||||
UpdateUpdatesTable(dbConnector);
|
||||
|
||||
}
|
||||
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, "Saved connections to database");
|
||||
@@ -111,7 +111,7 @@ namespace mRemoteNG.Config.Connections
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, "Saved local connection properties");
|
||||
}
|
||||
|
||||
private void UpdateRootNodeTable(RootNodeInfo rootTreeNode, SqlDatabaseConnector sqlDatabaseConnector)
|
||||
private void UpdateRootNodeTable(RootNodeInfo rootTreeNode, IDatabaseConnector databaseConnector)
|
||||
{
|
||||
var cryptographyProvider = new LegacyRijndaelCryptographyProvider();
|
||||
string strProtected;
|
||||
@@ -132,19 +132,17 @@ namespace mRemoteNG.Config.Connections
|
||||
strProtected = cryptographyProvider.Encrypt("ThisIsNotProtected", Runtime.EncryptionKey);
|
||||
}
|
||||
|
||||
var sqlQuery = new SqlCommand("DELETE FROM tblRoot", sqlDatabaseConnector.SqlConnection);
|
||||
sqlQuery.ExecuteNonQuery();
|
||||
var dbQuery = databaseConnector.DbCommand("DELETE FROM tblRoot");
|
||||
dbQuery.ExecuteNonQuery();
|
||||
|
||||
if (rootTreeNode != null)
|
||||
{
|
||||
sqlQuery =
|
||||
new SqlCommand(
|
||||
"INSERT INTO tblRoot (Name, Export, Protected, ConfVersion) VALUES(\'" +
|
||||
MiscTools.PrepareValueForDB(rootTreeNode.Name) + "\', 0, \'" + strProtected + "\'," +
|
||||
ConnectionsFileInfo.ConnectionFileVersion.ToString(CultureInfo.InvariantCulture) +
|
||||
")",
|
||||
sqlDatabaseConnector.SqlConnection);
|
||||
sqlQuery.ExecuteNonQuery();
|
||||
dbQuery =
|
||||
databaseConnector.DbCommand(
|
||||
"INSERT INTO tblRoot (Name, Export, Protected, ConfVersion) VALUES(\'" +
|
||||
MiscTools.PrepareValueForDB(rootTreeNode.Name) + "\', 0, \'" + strProtected + "\'," +
|
||||
ConnectionsFileInfo.ConnectionFileVersion.ToString(CultureInfo.InvariantCulture) + ")");
|
||||
dbQuery.ExecuteNonQuery();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -153,28 +151,28 @@ namespace mRemoteNG.Config.Connections
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateConnectionsTable(RootNodeInfo rootTreeNode, SqlDatabaseConnector sqlDatabaseConnector)
|
||||
private void UpdateConnectionsTable(RootNodeInfo rootTreeNode, IDatabaseConnector databaseConnector)
|
||||
{
|
||||
var dataProvider = new SqlDataProvider(databaseConnector);
|
||||
var currentDataTable = dataProvider.Load();
|
||||
|
||||
var cryptoProvider = new LegacyRijndaelCryptographyProvider();
|
||||
var serializer = new DataTableSerializer(_saveFilter, cryptoProvider,
|
||||
rootTreeNode.PasswordString.ConvertToSecureString());
|
||||
serializer.SetSourceDataTable(currentDataTable);
|
||||
var dataTable = serializer.Serialize(rootTreeNode);
|
||||
var dataProvider = new SqlDataProvider(sqlDatabaseConnector);
|
||||
//var dbQuery = databaseConnector.DbCommand("DELETE FROM tblCons");
|
||||
//dbQuery.ExecuteNonQuery();
|
||||
|
||||
var sqlQuery = new SqlCommand("DELETE FROM tblCons", sqlDatabaseConnector.SqlConnection);
|
||||
sqlQuery.ExecuteNonQuery();
|
||||
dataProvider.Save(dataTable);
|
||||
}
|
||||
|
||||
private void UpdateUpdatesTable(SqlDatabaseConnector sqlDatabaseConnector)
|
||||
private void UpdateUpdatesTable(IDatabaseConnector databaseConnector)
|
||||
{
|
||||
var sqlQuery = new SqlCommand("DELETE FROM tblUpdate", sqlDatabaseConnector.SqlConnection);
|
||||
sqlQuery.ExecuteNonQuery();
|
||||
sqlQuery = new SqlCommand(
|
||||
"INSERT INTO tblUpdate (LastUpdate) VALUES(\'" + MiscTools.DBDate(DateTime.Now) +
|
||||
"\')",
|
||||
sqlDatabaseConnector.SqlConnection);
|
||||
sqlQuery.ExecuteNonQuery();
|
||||
var dbQuery = databaseConnector.DbCommand("DELETE FROM tblUpdate");
|
||||
dbQuery.ExecuteNonQuery();
|
||||
dbQuery = databaseConnector.DbCommand("INSERT INTO tblUpdate (LastUpdate) VALUES(\'" + MiscTools.DBDate(DateTime.Now) + "\')");
|
||||
dbQuery.ExecuteNonQuery();
|
||||
}
|
||||
|
||||
private bool SqlUserIsReadOnly()
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
using System.Linq;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Config.DataProviders;
|
||||
using mRemoteNG.Config.Serializers;
|
||||
using mRemoteNG.Config.Serializers.Xml;
|
||||
using mRemoteNG.Security;
|
||||
using mRemoteNG.Security.Factories;
|
||||
@@ -32,19 +31,16 @@ namespace mRemoteNG.Config.Connections
|
||||
try
|
||||
{
|
||||
var cryptographyProvider = new CryptoProviderFactoryFromSettings().Build();
|
||||
var connectionNodeSerializer = new XmlConnectionNodeSerializer27(
|
||||
cryptographyProvider,
|
||||
connectionTreeModel
|
||||
.RootNodes.OfType<RootNodeInfo>()
|
||||
.First().PasswordString
|
||||
.ConvertToSecureString(),
|
||||
_saveFilter);
|
||||
var xmlConnectionsSerializer =
|
||||
new XmlConnectionsSerializer(cryptographyProvider, connectionNodeSerializer)
|
||||
{
|
||||
UseFullEncryption = mRemoteNG.Settings.Default.EncryptCompleteConnectionsFile
|
||||
};
|
||||
var xml = xmlConnectionsSerializer.Serialize(connectionTreeModel);
|
||||
var serializerFactory = new XmlConnectionSerializerFactory();
|
||||
|
||||
var xmlConnectionsSerializer = serializerFactory.Build(
|
||||
cryptographyProvider,
|
||||
connectionTreeModel,
|
||||
_saveFilter,
|
||||
mRemoteNG.Settings.Default.EncryptCompleteConnectionsFile);
|
||||
|
||||
var rootNode = connectionTreeModel.RootNodes.OfType<RootNodeInfo>().First();
|
||||
var xml = xmlConnectionsSerializer.Serialize(rootNode);
|
||||
|
||||
var fileDataProvider = new FileDataProviderWithRollingBackup(_connectionFileName);
|
||||
fileDataProvider.Save(xml);
|
||||
|
||||
@@ -1,66 +1,112 @@
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using mRemoteNG.Config.DatabaseConnectors;
|
||||
using mRemoteNG.Messages;
|
||||
using mRemoteNG.App;
|
||||
using MySql.Data.MySqlClient;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace mRemoteNG.Config.DataProviders
|
||||
{
|
||||
public class SqlDataProvider : IDataProvider<DataTable>
|
||||
{
|
||||
public SqlDatabaseConnector SqlDatabaseConnector { get; }
|
||||
public IDatabaseConnector DatabaseConnector { get; }
|
||||
|
||||
public SqlDataProvider(SqlDatabaseConnector sqlDatabaseConnector)
|
||||
public SqlDataProvider(IDatabaseConnector databaseConnector)
|
||||
{
|
||||
SqlDatabaseConnector = sqlDatabaseConnector;
|
||||
DatabaseConnector = databaseConnector;
|
||||
}
|
||||
|
||||
public DataTable Load()
|
||||
{
|
||||
var dataTable = new DataTable();
|
||||
var sqlQuery = new SqlCommand("SELECT * FROM tblCons ORDER BY PositionID ASC");
|
||||
SqlDatabaseConnector.AssociateItemToThisConnector(sqlQuery);
|
||||
if (!SqlDatabaseConnector.IsConnected)
|
||||
var dbQuery = DatabaseConnector.DbCommand("SELECT * FROM tblCons ORDER BY PositionID ASC");
|
||||
DatabaseConnector.AssociateItemToThisConnector(dbQuery);
|
||||
if (!DatabaseConnector.IsConnected)
|
||||
OpenConnection();
|
||||
var sqlDataReader = sqlQuery.ExecuteReader(CommandBehavior.CloseConnection);
|
||||
var dbDataReader = dbQuery.ExecuteReader(CommandBehavior.CloseConnection);
|
||||
|
||||
if (sqlDataReader.HasRows)
|
||||
dataTable.Load(sqlDataReader);
|
||||
sqlDataReader.Close();
|
||||
if (dbDataReader.HasRows)
|
||||
dataTable.Load(dbDataReader);
|
||||
dbDataReader.Close();
|
||||
return dataTable;
|
||||
}
|
||||
|
||||
public void Save(DataTable dataTable)
|
||||
{
|
||||
if (SqlUserIsReadOnly())
|
||||
if (DbUserIsReadOnly())
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg,
|
||||
"Trying to save connections but the SQL read only checkbox is checked, aborting!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!SqlDatabaseConnector.IsConnected)
|
||||
if (!DatabaseConnector.IsConnected)
|
||||
OpenConnection();
|
||||
using (var sqlBulkCopy = new SqlBulkCopy(SqlDatabaseConnector.SqlConnection))
|
||||
if (DatabaseConnector.GetType() == typeof(MSSqlDatabaseConnector))
|
||||
{
|
||||
foreach (DataColumn col in dataTable.Columns)
|
||||
sqlBulkCopy.ColumnMappings.Add(col.ColumnName, col.ColumnName);
|
||||
sqlBulkCopy.DestinationTableName = "dbo.tblCons";
|
||||
sqlBulkCopy.WriteToServer(dataTable);
|
||||
SqlConnection sqlConnection = (SqlConnection)DatabaseConnector.DbConnection();
|
||||
using (SqlTransaction transaction = sqlConnection.BeginTransaction(System.Data.IsolationLevel.Serializable))
|
||||
{
|
||||
using (SqlCommand sqlCommand = new SqlCommand())
|
||||
{
|
||||
sqlCommand.Connection = sqlConnection;
|
||||
sqlCommand.Transaction = transaction;
|
||||
sqlCommand.CommandText = "SELECT * FROM tblCons";
|
||||
using (SqlDataAdapter dataAdpater = new SqlDataAdapter())
|
||||
{
|
||||
dataAdpater.SelectCommand = sqlCommand;
|
||||
|
||||
SqlCommandBuilder builder = new SqlCommandBuilder(dataAdpater);
|
||||
// Avoid optimistic concurrency, check if it is necessary.
|
||||
builder.ConflictOption = ConflictOption.OverwriteChanges;
|
||||
|
||||
dataAdpater.UpdateCommand = builder.GetUpdateCommand();
|
||||
|
||||
dataAdpater.DeleteCommand = builder.GetDeleteCommand();
|
||||
dataAdpater.InsertCommand = builder.GetInsertCommand();
|
||||
|
||||
dataAdpater.Update(dataTable);
|
||||
transaction.Commit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else if (DatabaseConnector.GetType() == typeof(MySqlDatabaseConnector))
|
||||
{
|
||||
var dbConnection = (MySqlConnection) DatabaseConnector.DbConnection();
|
||||
using (MySqlTransaction transaction = dbConnection.BeginTransaction(System.Data.IsolationLevel.Serializable))
|
||||
{
|
||||
using (MySqlCommand sqlCommand = new MySqlCommand())
|
||||
{
|
||||
sqlCommand.Connection = dbConnection;
|
||||
sqlCommand.Transaction = transaction;
|
||||
sqlCommand.CommandText = "SELECT * FROM tblCons";
|
||||
using (MySqlDataAdapter dataAdapter = new MySqlDataAdapter(sqlCommand))
|
||||
{
|
||||
dataAdapter.UpdateBatchSize = 1000;
|
||||
using (MySqlCommandBuilder cb = new MySqlCommandBuilder(dataAdapter))
|
||||
{
|
||||
dataAdapter.Update(dataTable);
|
||||
transaction.Commit();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void OpenConnection()
|
||||
{
|
||||
SqlDatabaseConnector.Connect();
|
||||
DatabaseConnector.Connect();
|
||||
}
|
||||
|
||||
public void CloseConnection()
|
||||
{
|
||||
SqlDatabaseConnector.Disconnect();
|
||||
DatabaseConnector.Disconnect();
|
||||
}
|
||||
|
||||
private bool SqlUserIsReadOnly()
|
||||
private bool DbUserIsReadOnly()
|
||||
{
|
||||
return mRemoteNG.Settings.Default.SQLReadOnly;
|
||||
}
|
||||
|
||||
@@ -7,18 +7,19 @@ namespace mRemoteNG.Config.DatabaseConnectors
|
||||
/// <summary>
|
||||
/// A helper class for testing database connectivity
|
||||
/// </summary>
|
||||
public class SqlDatabaseConnectionTester
|
||||
public class DatabaseConnectionTester
|
||||
{
|
||||
public async Task<ConnectionTestResult> TestConnectivity(string server,
|
||||
public async Task<ConnectionTestResult> TestConnectivity(string type,
|
||||
string server,
|
||||
string database,
|
||||
string username,
|
||||
string password)
|
||||
{
|
||||
using (var sqlConnector = new SqlDatabaseConnector(server, database, username, password))
|
||||
using (var dbConnector = DatabaseConnectorFactory.DatabaseConnector(type, server, database, username, password))
|
||||
{
|
||||
try
|
||||
{
|
||||
await sqlConnector.ConnectAsync();
|
||||
await dbConnector.ConnectAsync();
|
||||
return ConnectionTestResult.ConnectionSucceded;
|
||||
}
|
||||
catch (SqlException sqlException)
|
||||
@@ -5,14 +5,28 @@ namespace mRemoteNG.Config.DatabaseConnectors
|
||||
{
|
||||
public class DatabaseConnectorFactory
|
||||
{
|
||||
public static SqlDatabaseConnector SqlDatabaseConnectorFromSettings()
|
||||
public static IDatabaseConnector DatabaseConnectorFromSettings()
|
||||
{
|
||||
var sqlType = mRemoteNG.Settings.Default.SQLServerType;
|
||||
var sqlHost = mRemoteNG.Settings.Default.SQLHost;
|
||||
var sqlCatalog = mRemoteNG.Settings.Default.SQLDatabaseName;
|
||||
var sqlUsername = mRemoteNG.Settings.Default.SQLUser;
|
||||
var cryptographyProvider = new LegacyRijndaelCryptographyProvider();
|
||||
var sqlPassword = cryptographyProvider.Decrypt(mRemoteNG.Settings.Default.SQLPass, Runtime.EncryptionKey);
|
||||
return new SqlDatabaseConnector(sqlHost, sqlCatalog, sqlUsername, sqlPassword);
|
||||
|
||||
return DatabaseConnector(sqlType, sqlHost, sqlCatalog, sqlUsername, sqlPassword);
|
||||
}
|
||||
|
||||
public static IDatabaseConnector DatabaseConnector(string type, string server, string database, string username, string password)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case "mysql":
|
||||
return new MySqlDatabaseConnector(server, database, username, password);
|
||||
case "mssql":
|
||||
default:
|
||||
return new MSSqlDatabaseConnector(server, database, username, password);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,17 @@
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
using System.Data.Common;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace mRemoteNG.Config.DatabaseConnectors
|
||||
{
|
||||
public interface IDatabaseConnector : IDisposable
|
||||
{
|
||||
DbConnection DbConnection();
|
||||
DbCommand DbCommand(string dbCommand);
|
||||
bool IsConnected { get; }
|
||||
void Connect();
|
||||
Task ConnectAsync();
|
||||
void Disconnect();
|
||||
void AssociateItemToThisConnector(SqlCommand sqlCommand);
|
||||
void AssociateItemToThisConnector(DbCommand dbCommand);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Data.SqlClient;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
// ReSharper disable ArrangeAccessorOwnerBody
|
||||
|
||||
namespace mRemoteNG.Config.DatabaseConnectors
|
||||
{
|
||||
public class MSSqlDatabaseConnector : IDatabaseConnector
|
||||
{
|
||||
private DbConnection _dbConnection { get; set; } = default(SqlConnection);
|
||||
private string _dbConnectionString = "";
|
||||
private readonly string _dbHost;
|
||||
private readonly string _dbCatalog;
|
||||
private readonly string _dbUsername;
|
||||
private readonly string _dbPassword;
|
||||
|
||||
public DbConnection DbConnection()
|
||||
{
|
||||
return _dbConnection;
|
||||
}
|
||||
|
||||
public DbCommand DbCommand(string dbCommand)
|
||||
{
|
||||
return new SqlCommand(dbCommand, (SqlConnection) _dbConnection);
|
||||
}
|
||||
|
||||
public bool IsConnected
|
||||
{
|
||||
get { return (_dbConnection.State == ConnectionState.Open); }
|
||||
}
|
||||
|
||||
public MSSqlDatabaseConnector(string sqlServer, string catalog, string username, string password)
|
||||
{
|
||||
_dbHost = sqlServer;
|
||||
_dbCatalog = catalog;
|
||||
_dbUsername = username;
|
||||
_dbPassword = password;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
private void Initialize()
|
||||
{
|
||||
BuildSqlConnectionString();
|
||||
_dbConnection = new SqlConnection(_dbConnectionString);
|
||||
}
|
||||
|
||||
private void BuildSqlConnectionString()
|
||||
{
|
||||
if (_dbUsername != "")
|
||||
BuildDbConnectionStringWithCustomCredentials();
|
||||
else
|
||||
BuildDbConnectionStringWithDefaultCredentials();
|
||||
}
|
||||
|
||||
private void BuildDbConnectionStringWithCustomCredentials()
|
||||
{
|
||||
_dbConnectionString = $"Data Source={_dbHost};Initial Catalog={_dbCatalog};User Id={_dbUsername};Password={_dbPassword}";
|
||||
}
|
||||
|
||||
private void BuildDbConnectionStringWithDefaultCredentials()
|
||||
{
|
||||
_dbConnectionString = $"Data Source={_dbHost};Initial Catalog={_dbCatalog};Integrated Security=True";
|
||||
}
|
||||
|
||||
public void Connect()
|
||||
{
|
||||
_dbConnection.Open();
|
||||
}
|
||||
|
||||
public async Task ConnectAsync()
|
||||
{
|
||||
await _dbConnection.OpenAsync();
|
||||
}
|
||||
|
||||
public void Disconnect()
|
||||
{
|
||||
_dbConnection.Close();
|
||||
}
|
||||
|
||||
public void AssociateItemToThisConnector(DbCommand dbCommand)
|
||||
{
|
||||
dbCommand.Connection = (SqlConnection) _dbConnection;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
}
|
||||
|
||||
private void Dispose(bool itIsSafeToFreeManagedObjects)
|
||||
{
|
||||
if (!itIsSafeToFreeManagedObjects) return;
|
||||
_dbConnection.Close();
|
||||
_dbConnection.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Threading.Tasks;
|
||||
using MySql.Data.MySqlClient;
|
||||
|
||||
// ReSharper disable ArrangeAccessorOwnerBody
|
||||
|
||||
namespace mRemoteNG.Config.DatabaseConnectors
|
||||
{
|
||||
public class MySqlDatabaseConnector : IDatabaseConnector
|
||||
{
|
||||
private DbConnection _dbConnection { get; set; } = default(MySqlConnection);
|
||||
private string _dbConnectionString = "";
|
||||
private readonly string _dbHost;
|
||||
private readonly string _dbPort;
|
||||
private readonly string _dbName;
|
||||
private readonly string _dbUsername;
|
||||
private readonly string _dbPassword;
|
||||
|
||||
public DbConnection DbConnection()
|
||||
{
|
||||
return _dbConnection;
|
||||
}
|
||||
|
||||
public DbCommand DbCommand(string dbCommand)
|
||||
{
|
||||
return new MySqlCommand(dbCommand, (MySqlConnection) _dbConnection);
|
||||
}
|
||||
|
||||
public bool IsConnected
|
||||
{
|
||||
get { return (_dbConnection.State == ConnectionState.Open); }
|
||||
}
|
||||
|
||||
public MySqlDatabaseConnector(string host, string database, string username, string password)
|
||||
{
|
||||
string[] hostParts = host.Split(new char[]{':'}, 2);
|
||||
_dbHost = hostParts[0];
|
||||
_dbPort = (hostParts.Length == 2)?hostParts[1]:"3306";
|
||||
_dbName = database;
|
||||
_dbUsername = username;
|
||||
_dbPassword = password;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
private void Initialize()
|
||||
{
|
||||
BuildSqlConnectionString();
|
||||
_dbConnection = new MySqlConnection(_dbConnectionString);
|
||||
}
|
||||
|
||||
private void BuildSqlConnectionString()
|
||||
{
|
||||
_dbConnectionString = $"server={_dbHost};user={_dbUsername};database={_dbName};port={_dbPort};password={_dbPassword}";
|
||||
}
|
||||
|
||||
public void Connect()
|
||||
{
|
||||
_dbConnection.Open();
|
||||
}
|
||||
|
||||
public async Task ConnectAsync()
|
||||
{
|
||||
await _dbConnection.OpenAsync();
|
||||
}
|
||||
|
||||
public void Disconnect()
|
||||
{
|
||||
_dbConnection.Close();
|
||||
}
|
||||
|
||||
public void AssociateItemToThisConnector(DbCommand dbCommand)
|
||||
{
|
||||
dbCommand.Connection = (MySqlConnection) _dbConnection;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
}
|
||||
private void Dispose(bool itIsSafeToFreeManagedObjects)
|
||||
{
|
||||
if (!itIsSafeToFreeManagedObjects) return;
|
||||
_dbConnection.Close();
|
||||
_dbConnection.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
// ReSharper disable ArrangeAccessorOwnerBody
|
||||
|
||||
namespace mRemoteNG.Config.DatabaseConnectors
|
||||
{
|
||||
public class SqlDatabaseConnector : IDatabaseConnector
|
||||
{
|
||||
public SqlConnection SqlConnection { get; private set; } = default(SqlConnection);
|
||||
private string _sqlConnectionString = "";
|
||||
private readonly string _sqlHost;
|
||||
private readonly string _sqlCatalog;
|
||||
private readonly string _sqlUsername;
|
||||
private readonly string _sqlPassword;
|
||||
|
||||
public bool IsConnected
|
||||
{
|
||||
get { return (SqlConnection.State == ConnectionState.Open); }
|
||||
}
|
||||
|
||||
public SqlDatabaseConnector(string sqlServer, string catalog, string username, string password)
|
||||
{
|
||||
_sqlHost = sqlServer;
|
||||
_sqlCatalog = catalog;
|
||||
_sqlUsername = username;
|
||||
_sqlPassword = password;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
private void Initialize()
|
||||
{
|
||||
BuildSqlConnectionString();
|
||||
SqlConnection = new SqlConnection(_sqlConnectionString);
|
||||
}
|
||||
|
||||
private void BuildSqlConnectionString()
|
||||
{
|
||||
if (_sqlUsername != "")
|
||||
BuildSqlConnectionStringWithCustomCredentials();
|
||||
else
|
||||
BuildSqlConnectionStringWithDefaultCredentials();
|
||||
}
|
||||
|
||||
private void BuildSqlConnectionStringWithCustomCredentials()
|
||||
{
|
||||
_sqlConnectionString =
|
||||
$"Data Source={_sqlHost};Initial Catalog={_sqlCatalog};User Id={_sqlUsername};Password={_sqlPassword}";
|
||||
}
|
||||
|
||||
private void BuildSqlConnectionStringWithDefaultCredentials()
|
||||
{
|
||||
_sqlConnectionString = $"Data Source={_sqlHost};Initial Catalog={_sqlCatalog};Integrated Security=True";
|
||||
}
|
||||
|
||||
public void Connect()
|
||||
{
|
||||
SqlConnection.Open();
|
||||
}
|
||||
|
||||
public async Task ConnectAsync()
|
||||
{
|
||||
await SqlConnection.OpenAsync();
|
||||
}
|
||||
|
||||
public void Disconnect()
|
||||
{
|
||||
SqlConnection.Close();
|
||||
}
|
||||
|
||||
public void AssociateItemToThisConnector(SqlCommand sqlCommand)
|
||||
{
|
||||
sqlCommand.Connection = SqlConnection;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(true);
|
||||
}
|
||||
|
||||
private void Dispose(bool itIsSafeToFreeManagedObjects)
|
||||
{
|
||||
if (!itIsSafeToFreeManagedObjects) return;
|
||||
SqlConnection.Close();
|
||||
SqlConnection.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
using System.IO;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Config.DataProviders;
|
||||
using mRemoteNG.Config.Serializers;
|
||||
using mRemoteNG.Config.Serializers.Xml;
|
||||
using mRemoteNG.Container;
|
||||
using mRemoteNG.Messages;
|
||||
|
||||
18
mRemoteV1/Config/Import/RemoteDesktopManagerImporter.cs
Normal file
18
mRemoteV1/Config/Import/RemoteDesktopManagerImporter.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using mRemoteNG.Config.Serializers.MiscSerializers;
|
||||
using mRemoteNG.Container;
|
||||
|
||||
namespace mRemoteNG.Config.Import
|
||||
{
|
||||
/// <summary>
|
||||
/// Imports connections from Devolutions *.rdm files.
|
||||
/// </summary>
|
||||
public class RemoteDesktopManagerImporter : IConnectionImporter<string>
|
||||
{
|
||||
public void Import(string source, ContainerInfo destinationContainer)
|
||||
{
|
||||
var deserializer = new RemoteDesktopManagerDeserializer();
|
||||
var tree = deserializer.Deserialize(source);
|
||||
destinationContainer.AddChildRange(tree.RootNodes[0].Children);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -95,13 +95,12 @@ namespace mRemoteNG.Config.Serializers.Csv
|
||||
connectionRecord.Password = headers.Contains("Password") ? connectionCsv[headers.IndexOf("Password")] : "";
|
||||
connectionRecord.Domain = headers.Contains("Domain") ? connectionCsv[headers.IndexOf("Domain")] : "";
|
||||
connectionRecord.Hostname = headers.Contains("Hostname") ? connectionCsv[headers.IndexOf("Hostname")] : "";
|
||||
connectionRecord.PuttySession =
|
||||
headers.Contains("PuttySession") ? connectionCsv[headers.IndexOf("PuttySession")] : "";
|
||||
connectionRecord.VmId = headers.Contains("VmId") ? connectionCsv[headers.IndexOf("VmId")] : "";
|
||||
connectionRecord.PuttySession = headers.Contains("PuttySession") ? connectionCsv[headers.IndexOf("PuttySession")] : "";
|
||||
connectionRecord.LoadBalanceInfo = headers.Contains("LoadBalanceInfo")
|
||||
? connectionCsv[headers.IndexOf("LoadBalanceInfo")]
|
||||
: "";
|
||||
connectionRecord.PreExtApp =
|
||||
headers.Contains("PreExtApp") ? connectionCsv[headers.IndexOf("PreExtApp")] : "";
|
||||
connectionRecord.PreExtApp = headers.Contains("PreExtApp") ? connectionCsv[headers.IndexOf("PreExtApp")] : "";
|
||||
connectionRecord.PostExtApp =
|
||||
headers.Contains("PostExtApp") ? connectionCsv[headers.IndexOf("PostExtApp")] : "";
|
||||
connectionRecord.MacAddress =
|
||||
@@ -158,6 +157,20 @@ namespace mRemoteNG.Config.Serializers.Csv
|
||||
connectionRecord.UseCredSsp = value;
|
||||
}
|
||||
|
||||
if (headers.Contains("UseVmId"))
|
||||
{
|
||||
bool value;
|
||||
if (bool.TryParse(connectionCsv[headers.IndexOf("UseVmId")], out value))
|
||||
connectionRecord.UseVmId = value;
|
||||
}
|
||||
|
||||
if (headers.Contains("UseEnhancedMode"))
|
||||
{
|
||||
bool value;
|
||||
if (bool.TryParse(connectionCsv[headers.IndexOf("UseEnhancedMode")], out value))
|
||||
connectionRecord.UseEnhancedMode = value;
|
||||
}
|
||||
|
||||
if (headers.Contains("RenderingEngine"))
|
||||
{
|
||||
HTTPBase.RenderingEngine value;
|
||||
@@ -174,21 +187,21 @@ namespace mRemoteNG.Config.Serializers.Csv
|
||||
|
||||
if (headers.Contains("RDPAuthenticationLevel"))
|
||||
{
|
||||
RdpProtocol.AuthenticationLevel value;
|
||||
AuthenticationLevel value;
|
||||
if (Enum.TryParse(connectionCsv[headers.IndexOf("RDPAuthenticationLevel")], out value))
|
||||
connectionRecord.RDPAuthenticationLevel = value;
|
||||
}
|
||||
|
||||
if (headers.Contains("Colors"))
|
||||
{
|
||||
RdpProtocol.RDPColors value;
|
||||
RDPColors value;
|
||||
if (Enum.TryParse(connectionCsv[headers.IndexOf("Colors")], out value))
|
||||
connectionRecord.Colors = value;
|
||||
}
|
||||
|
||||
if (headers.Contains("Resolution"))
|
||||
{
|
||||
RdpProtocol.RDPResolutions value;
|
||||
RDPResolutions value;
|
||||
if (Enum.TryParse(connectionCsv[headers.IndexOf("Resolution")], out value))
|
||||
connectionRecord.Resolution = value;
|
||||
}
|
||||
@@ -272,11 +285,18 @@ namespace mRemoteNG.Config.Serializers.Csv
|
||||
|
||||
if (headers.Contains("RedirectSound"))
|
||||
{
|
||||
RdpProtocol.RDPSounds value;
|
||||
RDPSounds value;
|
||||
if (Enum.TryParse(connectionCsv[headers.IndexOf("RedirectSound")], out value))
|
||||
connectionRecord.RedirectSound = value;
|
||||
}
|
||||
|
||||
if (headers.Contains("RedirectAudioCapture"))
|
||||
{
|
||||
bool value;
|
||||
if (bool.TryParse(connectionCsv[headers.IndexOf("RedirectAudioCapture")], out value))
|
||||
connectionRecord.RedirectAudioCapture = value;
|
||||
}
|
||||
|
||||
if (headers.Contains("RedirectKeys"))
|
||||
{
|
||||
bool value;
|
||||
@@ -342,14 +362,14 @@ namespace mRemoteNG.Config.Serializers.Csv
|
||||
|
||||
if (headers.Contains("RDGatewayUsageMethod"))
|
||||
{
|
||||
RdpProtocol.RDGatewayUsageMethod value;
|
||||
RDGatewayUsageMethod value;
|
||||
if (Enum.TryParse(connectionCsv[headers.IndexOf("RDGatewayUsageMethod")], out value))
|
||||
connectionRecord.RDGatewayUsageMethod = value;
|
||||
}
|
||||
|
||||
if (headers.Contains("RDGatewayUseConnectionCredentials"))
|
||||
{
|
||||
RdpProtocol.RDGatewayUseConnectionCredentials value;
|
||||
RDGatewayUseConnectionCredentials value;
|
||||
if (Enum.TryParse(connectionCsv[headers.IndexOf("RDGatewayUseConnectionCredentials")], out value))
|
||||
connectionRecord.RDGatewayUseConnectionCredentials = value;
|
||||
}
|
||||
@@ -361,6 +381,12 @@ namespace mRemoteNG.Config.Serializers.Csv
|
||||
connectionRecord.Favorite = value;
|
||||
}
|
||||
|
||||
if (headers.Contains("RdpVersion"))
|
||||
{
|
||||
if (Enum.TryParse(connectionCsv[headers.IndexOf("RdpVersion")], true, out RdpVersion version))
|
||||
connectionRecord.RdpVersion = version;
|
||||
}
|
||||
|
||||
#region Inheritance
|
||||
|
||||
if (headers.Contains("InheritCacheBitmaps"))
|
||||
@@ -538,6 +564,20 @@ namespace mRemoteNG.Config.Serializers.Csv
|
||||
connectionRecord.Inheritance.UseCredSsp = value;
|
||||
}
|
||||
|
||||
if (headers.Contains("InheritUseVmId"))
|
||||
{
|
||||
bool value;
|
||||
if (bool.TryParse(connectionCsv[headers.IndexOf("InheritUseVmId")], out value))
|
||||
connectionRecord.Inheritance.UseVmId = value;
|
||||
}
|
||||
|
||||
if (headers.Contains("InheritUseEnhancedMode"))
|
||||
{
|
||||
bool value;
|
||||
if (bool.TryParse(connectionCsv[headers.IndexOf("InheritUseEnhancedMode")], out value))
|
||||
connectionRecord.Inheritance.UseEnhancedMode = value;
|
||||
}
|
||||
|
||||
if (headers.Contains("InheritRenderingEngine"))
|
||||
{
|
||||
bool value;
|
||||
@@ -552,6 +592,13 @@ namespace mRemoteNG.Config.Serializers.Csv
|
||||
connectionRecord.Inheritance.Username = value;
|
||||
}
|
||||
|
||||
if (headers.Contains("InheritVmId"))
|
||||
{
|
||||
bool value;
|
||||
if (bool.TryParse(connectionCsv[headers.IndexOf("InheritVmId")], out value))
|
||||
connectionRecord.Inheritance.VmId = value;
|
||||
}
|
||||
|
||||
if (headers.Contains("InheritICAEncryptionStrength"))
|
||||
{
|
||||
bool value;
|
||||
@@ -756,6 +803,20 @@ namespace mRemoteNG.Config.Serializers.Csv
|
||||
connectionRecord.Inheritance.SoundQuality = value;
|
||||
}
|
||||
|
||||
if (headers.Contains("InheritRedirectAudioCapture"))
|
||||
{
|
||||
bool value;
|
||||
if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRedirectAudioCapture")], out value))
|
||||
connectionRecord.Inheritance.RedirectAudioCapture = value;
|
||||
}
|
||||
|
||||
if (headers.Contains("InheritRdpVersion"))
|
||||
{
|
||||
bool value;
|
||||
if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRdpVersion")], out value))
|
||||
connectionRecord.Inheritance.RdpVersion = value;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
return connectionRecord;
|
||||
|
||||
@@ -55,11 +55,26 @@ namespace mRemoteNG.Config.Serializers.Csv
|
||||
sb.Append("Password;");
|
||||
if (_saveFilter.SaveDomain)
|
||||
sb.Append("Domain;");
|
||||
sb.Append(
|
||||
"Hostname;Protocol;PuttySession;Port;ConnectToConsole;UseCredSsp;RenderingEngine;ICAEncryptionStrength;RDPAuthenticationLevel;LoadBalanceInfo;Colors;Resolution;AutomaticResize;DisplayWallpaper;DisplayThemes;EnableFontSmoothing;EnableDesktopComposition;CacheBitmaps;RedirectDiskDrives;RedirectPorts;RedirectPrinters;RedirectClipboard;RedirectSmartCards;RedirectSound;RedirectKeys;PreExtApp;PostExtApp;MacAddress;UserField;ExtApp;Favorite;VNCCompression;VNCEncoding;VNCAuthMode;VNCProxyType;VNCProxyIP;VNCProxyPort;VNCProxyUsername;VNCProxyPassword;VNCColors;VNCSmartSizeMode;VNCViewOnly;RDGatewayUsageMethod;RDGatewayHostname;RDGatewayUseConnectionCredentials;RDGatewayUsername;RDGatewayPassword;RDGatewayDomain;");
|
||||
|
||||
sb.Append("Hostname;Port;VmId;Protocol;PuttySession;ConnectToConsole;UseCredSsp;UseVmId;UseEnhancedMode;RenderingEngine;ICAEncryptionStrength;RDPAuthenticationLevel;" +
|
||||
"LoadBalanceInfo;Colors;Resolution;AutomaticResize;DisplayWallpaper;DisplayThemes;EnableFontSmoothing;EnableDesktopComposition;" +
|
||||
"CacheBitmaps;RedirectDiskDrives;RedirectPorts;RedirectPrinters;RedirectClipboard;RedirectSmartCards;RedirectSound;RedirectKeys;" +
|
||||
"PreExtApp;PostExtApp;MacAddress;UserField;ExtApp;Favorite;VNCCompression;VNCEncoding;VNCAuthMode;VNCProxyType;VNCProxyIP;" +
|
||||
"VNCProxyPort;VNCProxyUsername;VNCProxyPassword;VNCColors;VNCSmartSizeMode;VNCViewOnly;RDGatewayUsageMethod;RDGatewayHostname;" +
|
||||
"RDGatewayUseConnectionCredentials;RDGatewayUsername;RDGatewayPassword;RDGatewayDomain;RedirectAudioCapture;RdpVersion;");
|
||||
|
||||
if (_saveFilter.SaveInheritance)
|
||||
sb.Append(
|
||||
"InheritCacheBitmaps;InheritColors;InheritDescription;InheritDisplayThemes;InheritDisplayWallpaper;InheritEnableFontSmoothing;InheritEnableDesktopComposition;InheritDomain;InheritIcon;InheritPanel;InheritPassword;InheritPort;InheritProtocol;InheritPuttySession;InheritRedirectDiskDrives;InheritRedirectKeys;InheritRedirectPorts;InheritRedirectPrinters;InheritRedirectClipboard;InheritRedirectSmartCards;InheritRedirectSound;InheritResolution;InheritAutomaticResize;InheritUseConsoleSession;InheritUseCredSsp;InheritRenderingEngine;InheritUsername;InheritICAEncryptionStrength;InheritRDPAuthenticationLevel;InheritLoadBalanceInfo;InheritPreExtApp;InheritPostExtApp;InheritMacAddress;InheritUserField;InheritFavorite;InheritExtApp;InheritVNCCompression;InheritVNCEncoding;InheritVNCAuthMode;InheritVNCProxyType;InheritVNCProxyIP;InheritVNCProxyPort;InheritVNCProxyUsername;InheritVNCProxyPassword;InheritVNCColors;InheritVNCSmartSizeMode;InheritVNCViewOnly;InheritRDGatewayUsageMethod;InheritRDGatewayHostname;InheritRDGatewayUseConnectionCredentials;InheritRDGatewayUsername;InheritRDGatewayPassword;InheritRDGatewayDomain;InheritRDPAlertIdleTimeout;InheritRDPMinutesToIdleTimeout;InheritSoundQuality");
|
||||
sb.Append("InheritCacheBitmaps;InheritColors;InheritDescription;InheritDisplayThemes;InheritDisplayWallpaper;" +
|
||||
"InheritEnableFontSmoothing;InheritEnableDesktopComposition;InheritDomain;InheritIcon;InheritPanel;InheritPassword;InheritPort;" +
|
||||
"InheritProtocol;InheritPuttySession;InheritRedirectDiskDrives;InheritRedirectKeys;InheritRedirectPorts;InheritRedirectPrinters;" +
|
||||
"InheritRedirectClipboard;InheritRedirectSmartCards;InheritRedirectSound;InheritResolution;InheritAutomaticResize;" +
|
||||
"InheritUseConsoleSession;InheritUseCredSsp;InheritUseVmId;InheritUseEnhancedMode;InheritVmId;InheritRenderingEngine;InheritUsername;InheritICAEncryptionStrength;" +
|
||||
"InheritRDPAuthenticationLevel;InheritLoadBalanceInfo;InheritPreExtApp;InheritPostExtApp;InheritMacAddress;InheritUserField;" +
|
||||
"InheritFavorite;InheritExtApp;InheritVNCCompression;InheritVNCEncoding;InheritVNCAuthMode;InheritVNCProxyType;InheritVNCProxyIP;" +
|
||||
"InheritVNCProxyPort;InheritVNCProxyUsername;InheritVNCProxyPassword;InheritVNCColors;InheritVNCSmartSizeMode;InheritVNCViewOnly;" +
|
||||
"InheritRDGatewayUsageMethod;InheritRDGatewayHostname;InheritRDGatewayUseConnectionCredentials;InheritRDGatewayUsername;" +
|
||||
"InheritRDGatewayPassword;InheritRDGatewayDomain;InheritRDPAlertIdleTimeout;InheritRDPMinutesToIdleTimeout;InheritSoundQuality;" +
|
||||
"InheritRedirectAudioCapture;InheritRdpVersion");
|
||||
}
|
||||
|
||||
private void SerializeNodesRecursive(ConnectionInfo node, StringBuilder sb)
|
||||
@@ -101,11 +116,14 @@ namespace mRemoteNG.Config.Serializers.Csv
|
||||
sb.Append(FormatForCsv(con.Domain));
|
||||
|
||||
sb.Append(FormatForCsv(con.Hostname))
|
||||
.Append(FormatForCsv(con.Port))
|
||||
.Append(FormatForCsv(con.VmId))
|
||||
.Append(FormatForCsv(con.Protocol))
|
||||
.Append(FormatForCsv(con.PuttySession))
|
||||
.Append(FormatForCsv(con.Port))
|
||||
.Append(FormatForCsv(con.UseConsoleSession))
|
||||
.Append(FormatForCsv(con.UseCredSsp))
|
||||
.Append(FormatForCsv(con.UseVmId))
|
||||
.Append(FormatForCsv(con.UseEnhancedMode))
|
||||
.Append(FormatForCsv(con.RenderingEngine))
|
||||
.Append(FormatForCsv(con.ICAEncryptionStrength))
|
||||
.Append(FormatForCsv(con.RDPAuthenticationLevel))
|
||||
@@ -147,7 +165,9 @@ namespace mRemoteNG.Config.Serializers.Csv
|
||||
.Append(FormatForCsv(con.RDGatewayUseConnectionCredentials))
|
||||
.Append(FormatForCsv(con.RDGatewayUsername))
|
||||
.Append(FormatForCsv(con.RDGatewayPassword))
|
||||
.Append(FormatForCsv(con.RDGatewayDomain));
|
||||
.Append(FormatForCsv(con.RDGatewayDomain))
|
||||
.Append(FormatForCsv(con.RedirectAudioCapture))
|
||||
.Append(FormatForCsv(con.RdpVersion));
|
||||
|
||||
|
||||
if (!_saveFilter.SaveInheritance)
|
||||
@@ -178,6 +198,9 @@ namespace mRemoteNG.Config.Serializers.Csv
|
||||
.Append(FormatForCsv(con.Inheritance.AutomaticResize))
|
||||
.Append(FormatForCsv(con.Inheritance.UseConsoleSession))
|
||||
.Append(FormatForCsv(con.Inheritance.UseCredSsp))
|
||||
.Append(FormatForCsv(con.Inheritance.UseVmId))
|
||||
.Append(FormatForCsv(con.Inheritance.UseEnhancedMode))
|
||||
.Append(FormatForCsv(con.Inheritance.VmId))
|
||||
.Append(FormatForCsv(con.Inheritance.RenderingEngine))
|
||||
.Append(FormatForCsv(con.Inheritance.Username))
|
||||
.Append(FormatForCsv(con.Inheritance.ICAEncryptionStrength))
|
||||
@@ -208,7 +231,9 @@ namespace mRemoteNG.Config.Serializers.Csv
|
||||
.Append(FormatForCsv(con.Inheritance.RDGatewayDomain))
|
||||
.Append(FormatForCsv(con.Inheritance.RDPAlertIdleTimeout))
|
||||
.Append(FormatForCsv(con.Inheritance.RDPMinutesToIdleTimeout))
|
||||
.Append(FormatForCsv(con.Inheritance.SoundQuality));
|
||||
.Append(FormatForCsv(con.Inheritance.SoundQuality))
|
||||
.Append(FormatForCsv(con.Inheritance.RedirectAudioCapture))
|
||||
.Append(FormatForCsv(con.Inheritance.RdpVersion));
|
||||
}
|
||||
|
||||
private string FormatForCsv(object value)
|
||||
|
||||
@@ -14,7 +14,6 @@ using System.Data;
|
||||
using System.Linq;
|
||||
using System.Security;
|
||||
using mRemoteNG.Security;
|
||||
using mRemoteNG.Security.SymmetricEncryption;
|
||||
using mRemoteNG.Tools;
|
||||
|
||||
namespace mRemoteNG.Config.Serializers.MsSql
|
||||
@@ -89,26 +88,29 @@ namespace mRemoteNG.Config.Serializers.MsSql
|
||||
connectionInfo.Domain = (string)dataRow["DomainName"];
|
||||
connectionInfo.Password = DecryptValue((string)dataRow["Password"]);
|
||||
connectionInfo.Hostname = (string)dataRow["Hostname"];
|
||||
connectionInfo.VmId = (string)dataRow["VmId"];
|
||||
connectionInfo.UseEnhancedMode = (bool)dataRow["UseEnhancedMode"];
|
||||
connectionInfo.Protocol = (ProtocolType)Enum.Parse(typeof(ProtocolType), (string)dataRow["Protocol"]);
|
||||
connectionInfo.PuttySession = (string)dataRow["PuttySession"];
|
||||
connectionInfo.Port = (int)dataRow["Port"];
|
||||
connectionInfo.UseConsoleSession = (bool)dataRow["ConnectToConsole"];
|
||||
connectionInfo.UseCredSsp = (bool)dataRow["UseCredSsp"];
|
||||
connectionInfo.UseVmId = (bool)dataRow["UseVmId"];
|
||||
connectionInfo.RenderingEngine = (HTTPBase.RenderingEngine)Enum.Parse(typeof(HTTPBase.RenderingEngine),
|
||||
(string)dataRow["RenderingEngine"]);
|
||||
connectionInfo.ICAEncryptionStrength =
|
||||
(IcaProtocol.EncryptionStrength)Enum.Parse(typeof(IcaProtocol.EncryptionStrength),
|
||||
(string)dataRow["ICAEncryptionStrength"]);
|
||||
connectionInfo.RDPAuthenticationLevel =
|
||||
(RdpProtocol.AuthenticationLevel)Enum.Parse(typeof(RdpProtocol.AuthenticationLevel),
|
||||
(AuthenticationLevel)Enum.Parse(typeof(AuthenticationLevel),
|
||||
(string)dataRow["RDPAuthenticationLevel"]);
|
||||
connectionInfo.RDPMinutesToIdleTimeout = (int)dataRow["RDPMinutesToIdleTimeout"];
|
||||
connectionInfo.RDPAlertIdleTimeout = (bool)dataRow["RDPAlertIdleTimeout"];
|
||||
connectionInfo.LoadBalanceInfo = (string)dataRow["LoadBalanceInfo"];
|
||||
connectionInfo.Colors =
|
||||
(RdpProtocol.RDPColors)Enum.Parse(typeof(RdpProtocol.RDPColors), (string)dataRow["Colors"]);
|
||||
(RDPColors)Enum.Parse(typeof(RDPColors), (string)dataRow["Colors"]);
|
||||
connectionInfo.Resolution =
|
||||
(RdpProtocol.RDPResolutions)Enum.Parse(typeof(RdpProtocol.RDPResolutions),
|
||||
(RDPResolutions)Enum.Parse(typeof(RDPResolutions),
|
||||
(string)dataRow["Resolution"]);
|
||||
connectionInfo.AutomaticResize = (bool)dataRow["AutomaticResize"];
|
||||
connectionInfo.DisplayWallpaper = (bool)dataRow["DisplayWallpaper"];
|
||||
@@ -122,9 +124,11 @@ namespace mRemoteNG.Config.Serializers.MsSql
|
||||
connectionInfo.RedirectClipboard = (bool)dataRow["RedirectClipboard"];
|
||||
connectionInfo.RedirectSmartCards = (bool)dataRow["RedirectSmartCards"];
|
||||
connectionInfo.RedirectSound =
|
||||
(RdpProtocol.RDPSounds)Enum.Parse(typeof(RdpProtocol.RDPSounds), (string)dataRow["RedirectSound"]);
|
||||
connectionInfo.SoundQuality = (RdpProtocol.RDPSoundQuality)Enum.Parse(typeof(RdpProtocol.RDPSoundQuality),
|
||||
(RDPSounds)Enum.Parse(typeof(RDPSounds), (string)dataRow["RedirectSound"]);
|
||||
connectionInfo.SoundQuality = (RDPSoundQuality)Enum.Parse(typeof(RDPSoundQuality),
|
||||
(string)dataRow["SoundQuality"]);
|
||||
connectionInfo.RedirectAudioCapture = (bool)dataRow["RedirectAudioCapture"];
|
||||
|
||||
connectionInfo.RedirectKeys = (bool)dataRow["RedirectKeys"];
|
||||
connectionInfo.PreExtApp = (string)dataRow["PreExtApp"];
|
||||
connectionInfo.PostExtApp = (string)dataRow["PostExtApp"];
|
||||
@@ -150,19 +154,20 @@ namespace mRemoteNG.Config.Serializers.MsSql
|
||||
["VNCSmartSizeMode"]);
|
||||
connectionInfo.VNCViewOnly = (bool)dataRow["VNCViewOnly"];
|
||||
connectionInfo.RDGatewayUsageMethod =
|
||||
(RdpProtocol.RDGatewayUsageMethod)Enum.Parse(typeof(RdpProtocol.RDGatewayUsageMethod),
|
||||
(RDGatewayUsageMethod)Enum.Parse(typeof(RDGatewayUsageMethod),
|
||||
(string)dataRow["RDGatewayUsageMethod"]);
|
||||
connectionInfo.RDGatewayHostname = (string)dataRow["RDGatewayHostname"];
|
||||
connectionInfo.RDGatewayUseConnectionCredentials =
|
||||
(RdpProtocol.RDGatewayUseConnectionCredentials)Enum.Parse(
|
||||
typeof(RdpProtocol.
|
||||
RDGatewayUseConnectionCredentials),
|
||||
(string)dataRow
|
||||
["RDGatewayUseConnectionCredentials"]);
|
||||
(RDGatewayUseConnectionCredentials)Enum.Parse(typeof(RDGatewayUseConnectionCredentials),
|
||||
(string)dataRow["RDGatewayUseConnectionCredentials"]);
|
||||
connectionInfo.RDGatewayUsername = (string)dataRow["RDGatewayUsername"];
|
||||
connectionInfo.RDGatewayPassword = DecryptValue((string)dataRow["RDGatewayPassword"]);
|
||||
connectionInfo.RDGatewayDomain = (string)dataRow["RDGatewayDomain"];
|
||||
|
||||
if (!dataRow.IsNull("RdpVersion")) // table allows null values which must be handled
|
||||
if (Enum.TryParse((string)dataRow["RdpVersion"], true, out RdpVersion rdpVersion))
|
||||
connectionInfo.RdpVersion = rdpVersion;
|
||||
|
||||
connectionInfo.Inheritance.CacheBitmaps = (bool)dataRow["InheritCacheBitmaps"];
|
||||
connectionInfo.Inheritance.Colors = (bool)dataRow["InheritColors"];
|
||||
connectionInfo.Inheritance.Description = (bool)dataRow["InheritDescription"];
|
||||
@@ -185,10 +190,14 @@ namespace mRemoteNG.Config.Serializers.MsSql
|
||||
connectionInfo.Inheritance.RedirectSmartCards = (bool)dataRow["InheritRedirectSmartCards"];
|
||||
connectionInfo.Inheritance.RedirectSound = (bool)dataRow["InheritRedirectSound"];
|
||||
connectionInfo.Inheritance.SoundQuality = (bool)dataRow["InheritSoundQuality"];
|
||||
connectionInfo.Inheritance.RedirectAudioCapture = (bool)dataRow["InheritRedirectAudioCapture"];
|
||||
connectionInfo.Inheritance.Resolution = (bool)dataRow["InheritResolution"];
|
||||
connectionInfo.Inheritance.AutomaticResize = (bool)dataRow["InheritAutomaticResize"];
|
||||
connectionInfo.Inheritance.UseConsoleSession = (bool)dataRow["InheritUseConsoleSession"];
|
||||
connectionInfo.Inheritance.UseCredSsp = (bool)dataRow["InheritUseCredSsp"];
|
||||
connectionInfo.Inheritance.UseVmId = (bool)dataRow["InheritUseVmId"];
|
||||
connectionInfo.Inheritance.UseEnhancedMode = (bool)dataRow["InheritUseEnhancedMode"];
|
||||
connectionInfo.Inheritance.VmId = (bool)dataRow["InheritVmId"];
|
||||
connectionInfo.Inheritance.RenderingEngine = (bool)dataRow["InheritRenderingEngine"];
|
||||
connectionInfo.Inheritance.Username = (bool)dataRow["InheritUsername"];
|
||||
connectionInfo.Inheritance.ICAEncryptionStrength = (bool)dataRow["InheritICAEncryptionStrength"];
|
||||
@@ -219,6 +228,7 @@ namespace mRemoteNG.Config.Serializers.MsSql
|
||||
connectionInfo.Inheritance.RDGatewayUsername = (bool)dataRow["InheritRDGatewayUsername"];
|
||||
connectionInfo.Inheritance.RDGatewayPassword = (bool)dataRow["InheritRDGatewayPassword"];
|
||||
connectionInfo.Inheritance.RDGatewayDomain = (bool)dataRow["InheritRDGatewayDomain"];
|
||||
connectionInfo.Inheritance.RdpVersion = (bool)dataRow["InheritRdpVersion"];
|
||||
}
|
||||
|
||||
private string DecryptValue(string cipherText)
|
||||
|
||||
@@ -5,8 +5,8 @@ using mRemoteNG.Tools;
|
||||
using mRemoteNG.Tree;
|
||||
using mRemoteNG.Tree.Root;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlTypes;
|
||||
using System.Linq;
|
||||
using System.Security;
|
||||
|
||||
@@ -14,14 +14,17 @@ namespace mRemoteNG.Config.Serializers.MsSql
|
||||
{
|
||||
public class DataTableSerializer : ISerializer<ConnectionInfo, DataTable>
|
||||
{
|
||||
public readonly int DELETE = 0;
|
||||
private readonly ICryptographyProvider _cryptographyProvider;
|
||||
private readonly SecureString _encryptionKey;
|
||||
private DataTable _dataTable;
|
||||
private DataTable _sourceDataTable;
|
||||
private Dictionary<string, int> sourcePrimaryKeyDict = new Dictionary<string, int>();
|
||||
private const string TableName = "tblCons";
|
||||
private readonly SaveFilter _saveFilter;
|
||||
private int _currentNodeIndex;
|
||||
|
||||
public Version Version { get; } = new Version(2, 7);
|
||||
public Version Version { get; } = new Version(2, 8);
|
||||
|
||||
public DataTableSerializer(SaveFilter saveFilter,
|
||||
ICryptographyProvider cryptographyProvider,
|
||||
@@ -32,6 +35,11 @@ namespace mRemoteNG.Config.Serializers.MsSql
|
||||
_encryptionKey = encryptionKey.ThrowIfNull(nameof(encryptionKey));
|
||||
}
|
||||
|
||||
public void SetSourceDataTable(DataTable sourceDataTable)
|
||||
{
|
||||
_sourceDataTable = sourceDataTable;
|
||||
}
|
||||
|
||||
|
||||
public DataTable Serialize(ConnectionTreeModel connectionTreeModel)
|
||||
{
|
||||
@@ -52,15 +60,33 @@ namespace mRemoteNG.Config.Serializers.MsSql
|
||||
{
|
||||
_dataTable = BuildTable();
|
||||
_currentNodeIndex = 0;
|
||||
// Register add or update row
|
||||
SerializeNodesRecursive(serializationTarget);
|
||||
var entryToDelete = sourcePrimaryKeyDict.Keys.ToList();
|
||||
foreach( var entry in entryToDelete)
|
||||
{
|
||||
_dataTable.Rows.Find(entry).Delete();
|
||||
}
|
||||
return _dataTable;
|
||||
}
|
||||
|
||||
private DataTable BuildTable()
|
||||
{
|
||||
var dataTable = new DataTable(TableName);
|
||||
CreateSchema(dataTable);
|
||||
SetPrimaryKey(dataTable);
|
||||
DataTable dataTable;
|
||||
if (_sourceDataTable != null)
|
||||
{
|
||||
dataTable = _sourceDataTable;
|
||||
}else
|
||||
{
|
||||
dataTable = new DataTable(TableName);
|
||||
|
||||
}
|
||||
if (dataTable.Columns.Count == 0) CreateSchema(dataTable);
|
||||
if (dataTable.PrimaryKey.Length == 0 ) SetPrimaryKey(dataTable);
|
||||
foreach(DataRow row in dataTable.Rows)
|
||||
{
|
||||
sourcePrimaryKeyDict.Add((string)row["ConstantID"], DELETE);
|
||||
}
|
||||
return dataTable;
|
||||
}
|
||||
|
||||
@@ -72,7 +98,7 @@ namespace mRemoteNG.Config.Serializers.MsSql
|
||||
dataTable.Columns.Add("ConstantID", typeof(string));
|
||||
dataTable.Columns.Add("PositionID", typeof(int));
|
||||
dataTable.Columns.Add("ParentID", typeof(string));
|
||||
dataTable.Columns.Add("LastChange", typeof(SqlDateTime));
|
||||
dataTable.Columns.Add("LastChange", MiscTools.DBTimeStampType());
|
||||
dataTable.Columns.Add("Name", typeof(string));
|
||||
dataTable.Columns.Add("Type", typeof(string));
|
||||
dataTable.Columns.Add("Expanded", typeof(bool));
|
||||
@@ -104,6 +130,7 @@ namespace mRemoteNG.Config.Serializers.MsSql
|
||||
dataTable.Columns.Add("RedirectClipboard", typeof(bool));
|
||||
dataTable.Columns.Add("RedirectSmartCards", typeof(bool));
|
||||
dataTable.Columns.Add("RedirectSound", typeof(string));
|
||||
dataTable.Columns.Add("RedirectAudioCapture", typeof(bool));
|
||||
dataTable.Columns.Add("RedirectKeys", typeof(bool));
|
||||
dataTable.Columns.Add("Connected", typeof(bool));
|
||||
dataTable.Columns.Add("PreExtApp", typeof(string));
|
||||
@@ -149,6 +176,7 @@ namespace mRemoteNG.Config.Serializers.MsSql
|
||||
dataTable.Columns.Add("InheritRedirectClipboard", typeof(bool));
|
||||
dataTable.Columns.Add("InheritRedirectSmartCards", typeof(bool));
|
||||
dataTable.Columns.Add("InheritRedirectSound", typeof(bool));
|
||||
dataTable.Columns.Add("InheritRedirectAudioCapture", typeof(bool));
|
||||
dataTable.Columns.Add("InheritResolution", typeof(bool));
|
||||
dataTable.Columns.Add("InheritUseConsoleSession", typeof(bool));
|
||||
dataTable.Columns.Add("InheritUseCredSsp", typeof(bool));
|
||||
@@ -188,6 +216,16 @@ namespace mRemoteNG.Config.Serializers.MsSql
|
||||
dataTable.Columns.Add("InheritRDPMinutesToIdleTimeout", typeof(bool));
|
||||
dataTable.Columns.Add("InheritRDPAlertIdleTimeout", typeof(bool));
|
||||
dataTable.Columns.Add("InheritSoundQuality", typeof(bool));
|
||||
dataTable.Columns.Add("VmId", typeof(string));
|
||||
dataTable.Columns.Add("UseVmId", typeof(bool));
|
||||
dataTable.Columns.Add("UseEnhancedMode", typeof(bool));
|
||||
dataTable.Columns.Add("InheritVmId", typeof(bool));
|
||||
dataTable.Columns.Add("InheritUseVmId", typeof(bool));
|
||||
dataTable.Columns.Add("InheritUseEnhancedMode", typeof(bool));
|
||||
dataTable.Columns.Add("RdpVersion", typeof(string));
|
||||
dataTable.Columns.Add("InheritRdpVersion", typeof(bool));
|
||||
dataTable.Columns.Add("EnhancedMode", typeof(bool));
|
||||
dataTable.Columns.Add("InheritEnhancedMode", typeof(bool));
|
||||
}
|
||||
|
||||
private void SetPrimaryKey(DataTable dataTable)
|
||||
@@ -205,17 +243,247 @@ namespace mRemoteNG.Config.Serializers.MsSql
|
||||
SerializeNodesRecursive(child);
|
||||
}
|
||||
|
||||
public bool isRowUpdated(ConnectionInfo connectionInfo, DataRow dataRow)
|
||||
{
|
||||
var isFieldNotChange = dataRow["Name"].Equals(connectionInfo.Name) &&
|
||||
dataRow["Type"].Equals(connectionInfo.GetTreeNodeType().ToString()) &&
|
||||
dataRow["ParentID"].Equals(connectionInfo.Parent?.ConstantID ?? "") &&
|
||||
dataRow["PositionID"].Equals(_currentNodeIndex) &&
|
||||
dataRow["Expanded"].Equals(false) &&
|
||||
dataRow["Description"].Equals(connectionInfo.Description) &&
|
||||
dataRow["Icon"].Equals(connectionInfo.Icon) &&
|
||||
dataRow["Panel"].Equals(connectionInfo.Panel) &&
|
||||
dataRow["Username"].Equals(_saveFilter.SaveUsername ? connectionInfo.Username : "") &&
|
||||
dataRow["DomainName"].Equals(_saveFilter.SaveDomain ? connectionInfo.Domain : "");
|
||||
|
||||
isFieldNotChange = isFieldNotChange && dataRow["Hostname"].Equals(connectionInfo.Hostname);
|
||||
isFieldNotChange = isFieldNotChange && dataRow["VmId"].Equals(connectionInfo.VmId);
|
||||
isFieldNotChange = isFieldNotChange && dataRow["Protocol"].Equals(connectionInfo.Protocol.ToString());
|
||||
isFieldNotChange = isFieldNotChange && dataRow["PuttySession"].Equals(connectionInfo.PuttySession);
|
||||
isFieldNotChange = isFieldNotChange &&
|
||||
dataRow["Port"].Equals(connectionInfo.Port);
|
||||
isFieldNotChange = isFieldNotChange &&
|
||||
dataRow["ConnectToConsole"].Equals(connectionInfo.UseConsoleSession);
|
||||
isFieldNotChange = isFieldNotChange &&
|
||||
dataRow["UseCredSsp"].Equals(connectionInfo.UseCredSsp);
|
||||
isFieldNotChange = isFieldNotChange &&
|
||||
dataRow["UseVmId"].Equals(connectionInfo.UseVmId);
|
||||
isFieldNotChange = isFieldNotChange &&
|
||||
dataRow["UseEnhancedMode"].Equals(connectionInfo.UseEnhancedMode);
|
||||
isFieldNotChange = isFieldNotChange &&
|
||||
dataRow["RenderingEngine"].Equals(connectionInfo.RenderingEngine.ToString());
|
||||
isFieldNotChange = isFieldNotChange &&
|
||||
dataRow["ICAEncryptionStrength"].Equals(connectionInfo.ICAEncryptionStrength.ToString());
|
||||
isFieldNotChange = isFieldNotChange &&
|
||||
dataRow["RDPAuthenticationLevel"].Equals(connectionInfo.RDPAuthenticationLevel.ToString());
|
||||
isFieldNotChange = isFieldNotChange &&
|
||||
dataRow["RDPMinutesToIdleTimeout"].Equals(connectionInfo.RDPMinutesToIdleTimeout);
|
||||
isFieldNotChange = isFieldNotChange &&
|
||||
dataRow["RDPAlertIdleTimeout"].Equals(connectionInfo.RDPAlertIdleTimeout);
|
||||
isFieldNotChange = isFieldNotChange &&
|
||||
dataRow["LoadBalanceInfo"].Equals(connectionInfo.LoadBalanceInfo);
|
||||
isFieldNotChange = isFieldNotChange &&
|
||||
dataRow["Colors"].Equals(connectionInfo.Colors.ToString());
|
||||
isFieldNotChange = isFieldNotChange &&
|
||||
dataRow["Resolution"].Equals(connectionInfo.Resolution.ToString());
|
||||
isFieldNotChange = isFieldNotChange &&
|
||||
dataRow["AutomaticResize"].Equals(connectionInfo.AutomaticResize);
|
||||
isFieldNotChange = isFieldNotChange &&
|
||||
dataRow["DisplayWallpaper"].Equals(connectionInfo.DisplayWallpaper) &&
|
||||
dataRow["DisplayThemes"].Equals(connectionInfo.DisplayThemes) &&
|
||||
dataRow["EnableFontSmoothing"].Equals(connectionInfo.EnableFontSmoothing) &&
|
||||
dataRow["EnableDesktopComposition"].Equals(connectionInfo.EnableDesktopComposition) &&
|
||||
dataRow["CacheBitmaps"].Equals(connectionInfo.CacheBitmaps) &&
|
||||
dataRow["RedirectDiskDrives"].Equals(connectionInfo.RedirectDiskDrives) &&
|
||||
dataRow["RedirectPorts"].Equals(connectionInfo.RedirectPorts) &&
|
||||
dataRow["RedirectPrinters"].Equals(connectionInfo.RedirectPrinters) &&
|
||||
dataRow["RedirectClipboard"].Equals(connectionInfo.RedirectClipboard) &&
|
||||
dataRow["RedirectSmartCards"].Equals(connectionInfo.RedirectSmartCards) &&
|
||||
dataRow["RedirectSound"].Equals(connectionInfo.RedirectSound.ToString()) &&
|
||||
dataRow["SoundQuality"].Equals(connectionInfo.SoundQuality.ToString()) &&
|
||||
dataRow["RedirectAudioCapture"].Equals(connectionInfo.RedirectAudioCapture) &&
|
||||
dataRow["RedirectKeys"].Equals(connectionInfo.RedirectKeys);
|
||||
|
||||
isFieldNotChange = isFieldNotChange &&
|
||||
dataRow["Connected"].Equals(false) && // TODO: this column can eventually be removed. we now save this property locally
|
||||
dataRow["PreExtApp"].Equals(connectionInfo.PreExtApp) &&
|
||||
dataRow["PostExtApp"].Equals(connectionInfo.PostExtApp) &&
|
||||
dataRow["MacAddress"].Equals(connectionInfo.MacAddress) &&
|
||||
dataRow["UserField"].Equals(connectionInfo.UserField) &&
|
||||
dataRow["ExtApp"].Equals(connectionInfo.ExtApp) &&
|
||||
dataRow["VNCCompression"].Equals(connectionInfo.VNCCompression.ToString()) &&
|
||||
dataRow["VNCEncoding"].Equals(connectionInfo.VNCEncoding.ToString()) &&
|
||||
dataRow["VNCAuthMode"].Equals(connectionInfo.VNCAuthMode.ToString()) &&
|
||||
dataRow["VNCProxyType"].Equals(connectionInfo.VNCProxyType.ToString()) &&
|
||||
dataRow["VNCProxyIP"].Equals(connectionInfo.VNCProxyIP) &&
|
||||
dataRow["VNCProxyPort"].Equals(connectionInfo.VNCProxyPort) &&
|
||||
dataRow["VNCProxyUsername"].Equals(connectionInfo.VNCProxyUsername) &&
|
||||
dataRow["VNCColors"].Equals(connectionInfo.VNCColors.ToString()) &&
|
||||
dataRow["VNCSmartSizeMode"].Equals(connectionInfo.VNCSmartSizeMode.ToString()) &&
|
||||
dataRow["VNCViewOnly"].Equals(connectionInfo.VNCViewOnly) &&
|
||||
dataRow["RDGatewayUsageMethod"].Equals(connectionInfo.RDGatewayUsageMethod.ToString()) &&
|
||||
dataRow["RDGatewayHostname"].Equals(connectionInfo.RDGatewayHostname) &&
|
||||
dataRow["RDGatewayUseConnectionCredentials"].Equals(connectionInfo.RDGatewayUseConnectionCredentials.ToString()) &&
|
||||
dataRow["RDGatewayUsername"].Equals(connectionInfo.RDGatewayUsername) &&
|
||||
|
||||
dataRow["RDGatewayDomain"].Equals(connectionInfo.RDGatewayDomain) &&
|
||||
dataRow["RdpVersion"].Equals(connectionInfo.RdpVersion.ToString());
|
||||
|
||||
var isInheritanceFieldNotChange = false;
|
||||
if (_saveFilter.SaveInheritance)
|
||||
{
|
||||
isInheritanceFieldNotChange = (dataRow["InheritCacheBitmaps"].Equals(connectionInfo.Inheritance.CacheBitmaps) &&
|
||||
dataRow["InheritColors"].Equals(connectionInfo.Inheritance.Colors) &&
|
||||
dataRow["InheritDescription"].Equals(connectionInfo.Inheritance.Description) &&
|
||||
dataRow["InheritDisplayThemes"].Equals(connectionInfo.Inheritance.DisplayThemes) &&
|
||||
dataRow["InheritDisplayWallpaper"].Equals(connectionInfo.Inheritance.DisplayWallpaper) &&
|
||||
dataRow["InheritEnableFontSmoothing"].Equals(connectionInfo.Inheritance.EnableFontSmoothing) &&
|
||||
dataRow["InheritEnableDesktopComposition"].Equals(connectionInfo.Inheritance.EnableDesktopComposition) &&
|
||||
dataRow["InheritDomain"].Equals(connectionInfo.Inheritance.Domain) &&
|
||||
dataRow["InheritIcon"].Equals(connectionInfo.Inheritance.Icon) &&
|
||||
dataRow["InheritPanel"].Equals(connectionInfo.Inheritance.Panel) &&
|
||||
dataRow["InheritPassword"].Equals(connectionInfo.Inheritance.Password) &&
|
||||
dataRow["InheritPort"].Equals(connectionInfo.Inheritance.Port) &&
|
||||
dataRow["InheritProtocol"].Equals(connectionInfo.Inheritance.Protocol) &&
|
||||
dataRow["InheritPuttySession"].Equals(connectionInfo.Inheritance.PuttySession) &&
|
||||
dataRow["InheritRedirectDiskDrives"].Equals(connectionInfo.Inheritance.RedirectDiskDrives) &&
|
||||
dataRow["InheritRedirectKeys"].Equals(connectionInfo.Inheritance.RedirectKeys) &&
|
||||
dataRow["InheritRedirectPorts"].Equals(connectionInfo.Inheritance.RedirectPorts) &&
|
||||
dataRow["InheritRedirectPrinters"].Equals(connectionInfo.Inheritance.RedirectPrinters) &&
|
||||
dataRow["InheritRedirectClipboard"].Equals(connectionInfo.Inheritance.RedirectClipboard) &&
|
||||
dataRow["InheritRedirectSmartCards"].Equals(connectionInfo.Inheritance.RedirectSmartCards) &&
|
||||
dataRow["InheritRedirectSound"].Equals(connectionInfo.Inheritance.RedirectSound) &&
|
||||
dataRow["InheritSoundQuality"].Equals(connectionInfo.Inheritance.SoundQuality) &&
|
||||
dataRow["InheritRedirectAudioCapture"].Equals(connectionInfo.Inheritance.RedirectAudioCapture) &&
|
||||
dataRow["InheritResolution"].Equals(connectionInfo.Inheritance.Resolution) &&
|
||||
dataRow["InheritAutomaticResize"].Equals(connectionInfo.Inheritance.AutomaticResize) &&
|
||||
dataRow["InheritUseConsoleSession"].Equals(connectionInfo.Inheritance.UseConsoleSession) &&
|
||||
dataRow["InheritUseCredSsp"].Equals(connectionInfo.Inheritance.UseCredSsp) &&
|
||||
dataRow["InheritRenderingEngine"].Equals(connectionInfo.Inheritance.RenderingEngine) &&
|
||||
dataRow["InheritUsername"].Equals(connectionInfo.Inheritance.Username) &&
|
||||
dataRow["InheritVmId"].Equals(connectionInfo.Inheritance.VmId) &&
|
||||
dataRow["InheritUseVmId"].Equals(connectionInfo.Inheritance.UseVmId) &&
|
||||
dataRow["InheritUseEnhancedMode"].Equals(connectionInfo.Inheritance.UseEnhancedMode) &&
|
||||
dataRow["InheritICAEncryptionStrength"].Equals(connectionInfo.Inheritance.ICAEncryptionStrength) &&
|
||||
dataRow["InheritRDPAuthenticationLevel"].Equals(connectionInfo.Inheritance.RDPAuthenticationLevel) &&
|
||||
dataRow["InheritRDPMinutesToIdleTimeout"].Equals(connectionInfo.Inheritance.RDPMinutesToIdleTimeout) &&
|
||||
dataRow["InheritRDPAlertIdleTimeout"].Equals(connectionInfo.Inheritance.RDPAlertIdleTimeout) &&
|
||||
dataRow["InheritLoadBalanceInfo"].Equals(connectionInfo.Inheritance.LoadBalanceInfo) &&
|
||||
dataRow["InheritPreExtApp"].Equals(connectionInfo.Inheritance.PreExtApp) &&
|
||||
dataRow["InheritPostExtApp"].Equals(connectionInfo.Inheritance.PostExtApp) &&
|
||||
dataRow["InheritMacAddress"].Equals(connectionInfo.Inheritance.MacAddress) &&
|
||||
dataRow["InheritUserField"].Equals(connectionInfo.Inheritance.UserField) &&
|
||||
dataRow["InheritExtApp"].Equals(connectionInfo.Inheritance.ExtApp) &&
|
||||
dataRow["InheritVNCCompression"].Equals(connectionInfo.Inheritance.VNCCompression) &&
|
||||
dataRow["InheritVNCEncoding"].Equals(connectionInfo.Inheritance.VNCEncoding) &&
|
||||
dataRow["InheritVNCAuthMode"].Equals(connectionInfo.Inheritance.VNCAuthMode) &&
|
||||
dataRow["InheritVNCProxyType"].Equals(connectionInfo.Inheritance.VNCProxyType) &&
|
||||
dataRow["InheritVNCProxyIP"].Equals(connectionInfo.Inheritance.VNCProxyIP) &&
|
||||
dataRow["InheritVNCProxyPort"].Equals(connectionInfo.Inheritance.VNCProxyPort) &&
|
||||
dataRow["InheritVNCProxyUsername"].Equals(connectionInfo.Inheritance.VNCProxyUsername) &&
|
||||
dataRow["InheritVNCProxyPassword"].Equals(connectionInfo.Inheritance.VNCProxyPassword) &&
|
||||
dataRow["InheritVNCColors"].Equals(connectionInfo.Inheritance.VNCColors) &&
|
||||
dataRow["InheritVNCSmartSizeMode"].Equals(connectionInfo.Inheritance.VNCSmartSizeMode) &&
|
||||
dataRow["InheritVNCViewOnly"].Equals(connectionInfo.Inheritance.VNCViewOnly) &&
|
||||
dataRow["InheritRDGatewayUsageMethod"].Equals(connectionInfo.Inheritance.RDGatewayUsageMethod) &&
|
||||
dataRow["InheritRDGatewayHostname"].Equals(connectionInfo.Inheritance.RDGatewayHostname) &&
|
||||
dataRow["InheritRDGatewayUseConnectionCredentials"].Equals(connectionInfo.Inheritance.RDGatewayUseConnectionCredentials) &&
|
||||
dataRow["InheritRDGatewayUsername"].Equals(connectionInfo.Inheritance.RDGatewayUsername) &&
|
||||
dataRow["InheritRDGatewayPassword"].Equals(connectionInfo.Inheritance.RDGatewayPassword) &&
|
||||
dataRow["InheritRDGatewayDomain"].Equals(connectionInfo.Inheritance.RDGatewayDomain) &&
|
||||
dataRow["InheritRdpVersion"].Equals(connectionInfo.Inheritance.RdpVersion));
|
||||
}
|
||||
else
|
||||
{
|
||||
isInheritanceFieldNotChange = (dataRow["InheritCacheBitmaps"].Equals(false) &&
|
||||
dataRow["InheritColors"].Equals(false) &&
|
||||
dataRow["InheritDescription"].Equals(false) &&
|
||||
dataRow["InheritDisplayThemes"].Equals(false) &&
|
||||
dataRow["InheritDisplayWallpaper"].Equals(false) &&
|
||||
dataRow["InheritEnableFontSmoothing"].Equals(false) &&
|
||||
dataRow["InheritEnableDesktopComposition"].Equals(false) &&
|
||||
dataRow["InheritDomain"].Equals(false) &&
|
||||
dataRow["InheritIcon"].Equals(false) &&
|
||||
dataRow["InheritPanel"].Equals(false) &&
|
||||
dataRow["InheritPassword"].Equals(false) &&
|
||||
dataRow["InheritPort"].Equals(false) &&
|
||||
dataRow["InheritProtocol"].Equals(false) &&
|
||||
dataRow["InheritPuttySession"].Equals(false) &&
|
||||
dataRow["InheritRedirectDiskDrives"].Equals(false) &&
|
||||
dataRow["InheritRedirectKeys"].Equals(false) &&
|
||||
dataRow["InheritRedirectPorts"].Equals(false) &&
|
||||
dataRow["InheritRedirectPrinters"].Equals(false) &&
|
||||
dataRow["InheritRedirectClipboard"].Equals(false) &&
|
||||
dataRow["InheritRedirectSmartCards"].Equals(false) &&
|
||||
dataRow["InheritRedirectSound"].Equals(false) &&
|
||||
dataRow["InheritSoundQuality"].Equals(false) &&
|
||||
dataRow["InheritRedirectAudioCapture"].Equals(false) &&
|
||||
dataRow["InheritResolution"].Equals(false) &&
|
||||
dataRow["InheritAutomaticResize"].Equals(false) &&
|
||||
dataRow["InheritUseConsoleSession"].Equals(false) &&
|
||||
dataRow["InheritUseCredSsp"].Equals(false) &&
|
||||
dataRow["InheritRenderingEngine"].Equals(false) &&
|
||||
dataRow["InheritUsername"].Equals(false) &&
|
||||
dataRow["InheritICAEncryptionStrength"].Equals(false) &&
|
||||
dataRow["InheritRDPAuthenticationLevel"].Equals(false) &&
|
||||
dataRow["InheritRDPMinutesToIdleTimeout"].Equals(false) &&
|
||||
dataRow["InheritRDPAlertIdleTimeout"].Equals(false) &&
|
||||
dataRow["InheritLoadBalanceInfo"].Equals(false) &&
|
||||
dataRow["InheritPreExtApp"].Equals(false) &&
|
||||
dataRow["InheritPostExtApp"].Equals(false) &&
|
||||
dataRow["InheritMacAddress"].Equals(false) &&
|
||||
dataRow["InheritUserField"].Equals(false) &&
|
||||
dataRow["InheritExtApp"].Equals(false) &&
|
||||
dataRow["InheritVNCCompression"].Equals(false) &&
|
||||
dataRow["InheritVNCEncoding"].Equals(false) &&
|
||||
dataRow["InheritVNCAuthMode"].Equals(false) &&
|
||||
dataRow["InheritVNCProxyType"].Equals(false) &&
|
||||
dataRow["InheritVNCProxyIP"].Equals(false) &&
|
||||
dataRow["InheritVNCProxyPort"].Equals(false) &&
|
||||
dataRow["InheritVNCProxyUsername"].Equals(false) &&
|
||||
dataRow["InheritVNCProxyPassword"].Equals(false) &&
|
||||
dataRow["InheritVNCColors"].Equals(false) &&
|
||||
dataRow["InheritVNCSmartSizeMode"].Equals(false) &&
|
||||
dataRow["InheritVNCViewOnly"].Equals(false) &&
|
||||
dataRow["InheritRDGatewayUsageMethod"].Equals(false) &&
|
||||
dataRow["InheritRDGatewayHostname"].Equals(false) &&
|
||||
dataRow["InheritRDGatewayUseConnectionCredentials"].Equals(false) &&
|
||||
dataRow["InheritRDGatewayUsername"].Equals(false) &&
|
||||
dataRow["InheritRDGatewayPassword"].Equals(false) &&
|
||||
dataRow["InheritRDGatewayDomain"].Equals(false) &&
|
||||
dataRow["InheritRdpVersion"].Equals(false));
|
||||
}
|
||||
|
||||
var pwd = dataRow["Password"].Equals(_saveFilter.SavePassword ? _cryptographyProvider.Encrypt(connectionInfo.Password, _encryptionKey) : "") &&
|
||||
dataRow["VNCProxyPassword"].Equals(_cryptographyProvider.Encrypt(connectionInfo.VNCProxyPassword, _encryptionKey)) &&
|
||||
dataRow["RDGatewayPassword"].Equals(_cryptographyProvider.Encrypt(connectionInfo.RDGatewayPassword, _encryptionKey));
|
||||
return !(pwd && isFieldNotChange && isInheritanceFieldNotChange);
|
||||
}
|
||||
|
||||
private void SerializeConnectionInfo(ConnectionInfo connectionInfo)
|
||||
{
|
||||
_currentNodeIndex++;
|
||||
var dataRow = _dataTable.NewRow();
|
||||
dataRow["ID"] = DBNull.Value;
|
||||
var isNewRow = false;
|
||||
DataRow dataRow = _dataTable.Rows.Find(connectionInfo.ConstantID);
|
||||
if (dataRow == null)
|
||||
{
|
||||
dataRow = _dataTable.NewRow();
|
||||
dataRow["ConstantID"] = connectionInfo.ConstantID;
|
||||
isNewRow = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
sourcePrimaryKeyDict.Remove(connectionInfo.ConstantID);
|
||||
}
|
||||
var tmp = isRowUpdated(connectionInfo, dataRow);
|
||||
if (!tmp){
|
||||
return;
|
||||
}
|
||||
dataRow["Name"] = connectionInfo.Name;
|
||||
dataRow["Type"] = connectionInfo.GetTreeNodeType().ToString();
|
||||
dataRow["ConstantID"] = connectionInfo.ConstantID;
|
||||
dataRow["ParentID"] = connectionInfo.Parent?.ConstantID ?? "";
|
||||
dataRow["PositionID"] = _currentNodeIndex;
|
||||
dataRow["LastChange"] = (SqlDateTime)DateTime.Now;
|
||||
dataRow["LastChange"] = MiscTools.DBTimeStampNow();
|
||||
dataRow["Expanded"] =
|
||||
false; // TODO: this column can eventually be removed. we now save this property locally
|
||||
dataRow["Description"] = connectionInfo.Description;
|
||||
@@ -227,11 +495,14 @@ namespace mRemoteNG.Config.Serializers.MsSql
|
||||
? _cryptographyProvider.Encrypt(connectionInfo.Password, _encryptionKey)
|
||||
: "";
|
||||
dataRow["Hostname"] = connectionInfo.Hostname;
|
||||
dataRow["VmId"] = connectionInfo.VmId;
|
||||
dataRow["Protocol"] = connectionInfo.Protocol;
|
||||
dataRow["PuttySession"] = connectionInfo.PuttySession;
|
||||
dataRow["Port"] = connectionInfo.Port;
|
||||
dataRow["ConnectToConsole"] = connectionInfo.UseConsoleSession;
|
||||
dataRow["UseCredSsp"] = connectionInfo.UseCredSsp;
|
||||
dataRow["UseVmId"] = connectionInfo.UseVmId;
|
||||
dataRow["UseEnhancedMode"] = connectionInfo.UseEnhancedMode;
|
||||
dataRow["RenderingEngine"] = connectionInfo.RenderingEngine;
|
||||
dataRow["ICAEncryptionStrength"] = connectionInfo.ICAEncryptionStrength;
|
||||
dataRow["RDPAuthenticationLevel"] = connectionInfo.RDPAuthenticationLevel;
|
||||
@@ -253,9 +524,9 @@ namespace mRemoteNG.Config.Serializers.MsSql
|
||||
dataRow["RedirectSmartCards"] = connectionInfo.RedirectSmartCards;
|
||||
dataRow["RedirectSound"] = connectionInfo.RedirectSound;
|
||||
dataRow["SoundQuality"] = connectionInfo.SoundQuality;
|
||||
dataRow["RedirectAudioCapture"] = connectionInfo.RedirectAudioCapture;
|
||||
dataRow["RedirectKeys"] = connectionInfo.RedirectKeys;
|
||||
dataRow["Connected"] =
|
||||
false; // TODO: this column can eventually be removed. we now save this property locally
|
||||
dataRow["Connected"] = false; // TODO: this column can eventually be removed. we now save this property locally
|
||||
dataRow["PreExtApp"] = connectionInfo.PreExtApp;
|
||||
dataRow["PostExtApp"] = connectionInfo.PostExtApp;
|
||||
dataRow["MacAddress"] = connectionInfo.MacAddress;
|
||||
@@ -276,10 +547,12 @@ namespace mRemoteNG.Config.Serializers.MsSql
|
||||
dataRow["RDGatewayUsageMethod"] = connectionInfo.RDGatewayUsageMethod;
|
||||
dataRow["RDGatewayHostname"] = connectionInfo.RDGatewayHostname;
|
||||
dataRow["RDGatewayUseConnectionCredentials"] = connectionInfo.RDGatewayUseConnectionCredentials;
|
||||
dataRow["RDGatewayUsername"] =
|
||||
_cryptographyProvider.Encrypt(connectionInfo.RDGatewayUsername, _encryptionKey);
|
||||
dataRow["RDGatewayPassword"] = connectionInfo.RDGatewayPassword;
|
||||
dataRow["RDGatewayUsername"] = connectionInfo.RDGatewayUsername;
|
||||
dataRow["RDGatewayPassword"] = _cryptographyProvider.Encrypt(connectionInfo.RDGatewayPassword, _encryptionKey);
|
||||
dataRow["RDGatewayDomain"] = connectionInfo.RDGatewayDomain;
|
||||
dataRow["RdpVersion"] = connectionInfo.RdpVersion;
|
||||
|
||||
|
||||
if (_saveFilter.SaveInheritance)
|
||||
{
|
||||
dataRow["InheritCacheBitmaps"] = connectionInfo.Inheritance.CacheBitmaps;
|
||||
@@ -304,12 +577,16 @@ namespace mRemoteNG.Config.Serializers.MsSql
|
||||
dataRow["InheritRedirectSmartCards"] = connectionInfo.Inheritance.RedirectSmartCards;
|
||||
dataRow["InheritRedirectSound"] = connectionInfo.Inheritance.RedirectSound;
|
||||
dataRow["InheritSoundQuality"] = connectionInfo.Inheritance.SoundQuality;
|
||||
dataRow["InheritRedirectAudioCapture"] = connectionInfo.Inheritance.RedirectAudioCapture;
|
||||
dataRow["InheritResolution"] = connectionInfo.Inheritance.Resolution;
|
||||
dataRow["InheritAutomaticResize"] = connectionInfo.Inheritance.AutomaticResize;
|
||||
dataRow["InheritUseConsoleSession"] = connectionInfo.Inheritance.UseConsoleSession;
|
||||
dataRow["InheritUseCredSsp"] = connectionInfo.Inheritance.UseCredSsp;
|
||||
dataRow["InheritRenderingEngine"] = connectionInfo.Inheritance.RenderingEngine;
|
||||
dataRow["InheritUsername"] = connectionInfo.Inheritance.Username;
|
||||
dataRow["InheritVmId"] = connectionInfo.Inheritance.VmId;
|
||||
dataRow["InheritUseVmId"] = connectionInfo.Inheritance.UseVmId;
|
||||
dataRow["InheritUseEnhancedMode"] = connectionInfo.Inheritance.UseEnhancedMode;
|
||||
dataRow["InheritICAEncryptionStrength"] = connectionInfo.Inheritance.ICAEncryptionStrength;
|
||||
dataRow["InheritRDPAuthenticationLevel"] = connectionInfo.Inheritance.RDPAuthenticationLevel;
|
||||
dataRow["InheritRDPMinutesToIdleTimeout"] = connectionInfo.Inheritance.RDPMinutesToIdleTimeout;
|
||||
@@ -333,11 +610,11 @@ namespace mRemoteNG.Config.Serializers.MsSql
|
||||
dataRow["InheritVNCViewOnly"] = connectionInfo.Inheritance.VNCViewOnly;
|
||||
dataRow["InheritRDGatewayUsageMethod"] = connectionInfo.Inheritance.RDGatewayUsageMethod;
|
||||
dataRow["InheritRDGatewayHostname"] = connectionInfo.Inheritance.RDGatewayHostname;
|
||||
dataRow["InheritRDGatewayUseConnectionCredentials"] =
|
||||
connectionInfo.Inheritance.RDGatewayUseConnectionCredentials;
|
||||
dataRow["InheritRDGatewayUseConnectionCredentials"] = connectionInfo.Inheritance.RDGatewayUseConnectionCredentials;
|
||||
dataRow["InheritRDGatewayUsername"] = connectionInfo.Inheritance.RDGatewayUsername;
|
||||
dataRow["InheritRDGatewayPassword"] = connectionInfo.Inheritance.RDGatewayPassword;
|
||||
dataRow["InheritRDGatewayDomain"] = connectionInfo.Inheritance.RDGatewayDomain;
|
||||
dataRow["InheritRdpVersion"] = connectionInfo.Inheritance.RdpVersion;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -363,6 +640,7 @@ namespace mRemoteNG.Config.Serializers.MsSql
|
||||
dataRow["InheritRedirectSmartCards"] = false;
|
||||
dataRow["InheritRedirectSound"] = false;
|
||||
dataRow["InheritSoundQuality"] = false;
|
||||
dataRow["InheritRedirectAudioCapture"] = false;
|
||||
dataRow["InheritResolution"] = false;
|
||||
dataRow["InheritAutomaticResize"] = false;
|
||||
dataRow["InheritUseConsoleSession"] = false;
|
||||
@@ -396,9 +674,9 @@ namespace mRemoteNG.Config.Serializers.MsSql
|
||||
dataRow["InheritRDGatewayUsername"] = false;
|
||||
dataRow["InheritRDGatewayPassword"] = false;
|
||||
dataRow["InheritRDGatewayDomain"] = false;
|
||||
dataRow["InheritRdpVersion"] = false;
|
||||
}
|
||||
|
||||
_dataTable.Rows.Add(dataRow);
|
||||
if (isNewRow)_dataTable.Rows.Add(dataRow);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,8 @@ namespace mRemoteNG.Config.Serializers.MsSql
|
||||
.Select(m => new XElement("Node",
|
||||
new XAttribute("ConnectionId", m.ConnectionId),
|
||||
new XAttribute("Connected", m.Connected),
|
||||
new XAttribute("Expanded", m.Expanded)));
|
||||
new XAttribute("Expanded", m.Expanded),
|
||||
new XAttribute("Favorite", m.Favorite)));
|
||||
|
||||
var root = new XElement("LocalConnections", localConnections);
|
||||
var xdoc = new XDocument(new XDeclaration("1.0", "utf-8", null), root);
|
||||
@@ -40,7 +41,8 @@ namespace mRemoteNG.Config.Serializers.MsSql
|
||||
{
|
||||
ConnectionId = e.Attribute("ConnectionId")?.Value,
|
||||
Connected = bool.Parse(e.Attribute("Connected")?.Value ?? "False"),
|
||||
Expanded = bool.Parse(e.Attribute("Expanded")?.Value ?? "False")
|
||||
Expanded = bool.Parse(e.Attribute("Expanded")?.Value ?? "False"),
|
||||
Favorite = bool.Parse(e.Attribute("Favorite")?.Value ?? "False")
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Security;
|
||||
|
||||
namespace mRemoteNG.Config.Serializers.MsSql
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
using System.Data.Common;
|
||||
using System.Globalization;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.App.Info;
|
||||
@@ -12,30 +12,31 @@ using mRemoteNG.Tree.Root;
|
||||
|
||||
namespace mRemoteNG.Config.Serializers.MsSql
|
||||
{
|
||||
public class SqlDatabaseMetaDataRetriever
|
||||
public class SqlDatabaseMetaDataRetriever
|
||||
{
|
||||
public SqlConnectionListMetaData GetDatabaseMetaData(SqlDatabaseConnector sqlDatabaseConnector)
|
||||
public SqlConnectionListMetaData GetDatabaseMetaData(IDatabaseConnector databaseConnector)
|
||||
{
|
||||
SqlConnectionListMetaData metaData;
|
||||
SqlDataReader sqlDataReader = null;
|
||||
DbDataReader dbDataReader = null;
|
||||
|
||||
try
|
||||
{
|
||||
var sqlCommand = new SqlCommand("SELECT * FROM tblRoot", sqlDatabaseConnector.SqlConnection);
|
||||
if (!sqlDatabaseConnector.IsConnected)
|
||||
sqlDatabaseConnector.Connect();
|
||||
sqlDataReader = sqlCommand.ExecuteReader();
|
||||
if (!sqlDataReader.HasRows)
|
||||
var dbCommand = databaseConnector.DbCommand("SELECT * FROM tblRoot");
|
||||
if (!databaseConnector.IsConnected)
|
||||
databaseConnector.Connect();
|
||||
dbDataReader = dbCommand.ExecuteReader();
|
||||
if (!dbDataReader.HasRows)
|
||||
return null; // assume new empty database
|
||||
else
|
||||
sqlDataReader.Read();
|
||||
dbDataReader.Read();
|
||||
|
||||
metaData = new SqlConnectionListMetaData
|
||||
{
|
||||
Name = sqlDataReader["Name"] as string ?? "",
|
||||
Protected = sqlDataReader["Protected"] as string ?? "",
|
||||
Export = (bool)sqlDataReader["Export"],
|
||||
Name = dbDataReader["Name"] as string ?? "",
|
||||
Protected = dbDataReader["Protected"] as string ?? "",
|
||||
Export = (bool)dbDataReader["Export"],
|
||||
ConfVersion =
|
||||
new Version(Convert.ToString(sqlDataReader["confVersion"], CultureInfo.InvariantCulture))
|
||||
new Version(Convert.ToString(dbDataReader["confVersion"], CultureInfo.InvariantCulture))
|
||||
};
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -45,14 +46,14 @@ namespace mRemoteNG.Config.Serializers.MsSql
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (sqlDataReader != null && !sqlDataReader.IsClosed)
|
||||
sqlDataReader.Close();
|
||||
if (dbDataReader != null && !dbDataReader.IsClosed)
|
||||
dbDataReader.Close();
|
||||
}
|
||||
|
||||
return metaData;
|
||||
}
|
||||
|
||||
public void WriteDatabaseMetaData(RootNodeInfo rootTreeNode, SqlDatabaseConnector sqlDatabaseConnector)
|
||||
public void WriteDatabaseMetaData(RootNodeInfo rootTreeNode, IDatabaseConnector databaseConnector)
|
||||
{
|
||||
var cryptographyProvider = new LegacyRijndaelCryptographyProvider();
|
||||
string strProtected;
|
||||
@@ -73,18 +74,16 @@ namespace mRemoteNG.Config.Serializers.MsSql
|
||||
strProtected = cryptographyProvider.Encrypt("ThisIsNotProtected", Runtime.EncryptionKey);
|
||||
}
|
||||
|
||||
var sqlQuery = new SqlCommand("DELETE FROM tblRoot", sqlDatabaseConnector.SqlConnection);
|
||||
sqlQuery.ExecuteNonQuery();
|
||||
var cmd = databaseConnector.DbCommand("DELETE FROM tblRoot");
|
||||
cmd.ExecuteNonQuery();
|
||||
|
||||
if (rootTreeNode != null)
|
||||
{
|
||||
sqlQuery =
|
||||
new SqlCommand(
|
||||
"INSERT INTO tblRoot (Name, Export, Protected, ConfVersion) VALUES(\'" +
|
||||
cmd = databaseConnector.DbCommand(
|
||||
"INSERT INTO tblRoot (Name, Export, Protected, ConfVersion) VALUES(\'" +
|
||||
MiscTools.PrepareValueForDB(rootTreeNode.Name) + "\', 0, \'" + strProtected + "\'," +
|
||||
ConnectionsFileInfo.ConnectionFileVersion.ToString(CultureInfo.InvariantCulture) + ")",
|
||||
sqlDatabaseConnector.SqlConnection);
|
||||
sqlQuery.ExecuteNonQuery();
|
||||
ConnectionsFileInfo.ConnectionFileVersion.ToString(CultureInfo.InvariantCulture) + ")");
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -45,6 +45,9 @@ namespace mRemoteNG.Config.Serializers.Xml
|
||||
{
|
||||
var nodeAsContainer = connectionInfo as ContainerInfo;
|
||||
element.Add(new XAttribute("Name", connectionInfo.Name));
|
||||
element.Add(new XAttribute("VmId", connectionInfo.VmId));
|
||||
element.Add(new XAttribute("UseVmId", connectionInfo.UseVmId));
|
||||
element.Add(new XAttribute("UseEnhancedMode", connectionInfo.UseVmId));
|
||||
element.Add(new XAttribute("Type", connectionInfo.GetTreeNodeType().ToString()));
|
||||
if (nodeAsContainer != null)
|
||||
element.Add(new XAttribute("Expanded", nodeAsContainer.IsExpanded.ToString().ToLowerInvariant()));
|
||||
@@ -72,6 +75,7 @@ namespace mRemoteNG.Config.Serializers.Xml
|
||||
|
||||
element.Add(new XAttribute("Hostname", connectionInfo.Hostname));
|
||||
element.Add(new XAttribute("Protocol", connectionInfo.Protocol));
|
||||
element.Add(new XAttribute("RdpVersion", connectionInfo.RdpVersion.ToString().ToLowerInvariant()));
|
||||
element.Add(new XAttribute("PuttySession", connectionInfo.PuttySession));
|
||||
element.Add(new XAttribute("Port", connectionInfo.Port));
|
||||
element.Add(new XAttribute("ConnectToConsole",
|
||||
@@ -107,6 +111,7 @@ namespace mRemoteNG.Config.Serializers.Xml
|
||||
connectionInfo.RedirectSmartCards.ToString().ToLowerInvariant()));
|
||||
element.Add(new XAttribute("RedirectSound", connectionInfo.RedirectSound.ToString()));
|
||||
element.Add(new XAttribute("SoundQuality", connectionInfo.SoundQuality.ToString()));
|
||||
element.Add(new XAttribute("RedirectAudioCapture", connectionInfo.RedirectAudioCapture.ToString().ToLowerInvariant()));
|
||||
element.Add(new XAttribute("RedirectKeys", connectionInfo.RedirectKeys.ToString().ToLowerInvariant()));
|
||||
element.Add(new XAttribute("Connected",
|
||||
(connectionInfo.OpenConnections.Count > 0).ToString().ToLowerInvariant()));
|
||||
@@ -190,6 +195,8 @@ namespace mRemoteNG.Config.Serializers.Xml
|
||||
connectionInfo.Inheritance.Port.ToString().ToLowerInvariant()));
|
||||
element.Add(new XAttribute("InheritProtocol",
|
||||
connectionInfo.Inheritance.Protocol.ToString().ToLowerInvariant()));
|
||||
element.Add(new XAttribute("InheritRdpVersion",
|
||||
connectionInfo.Inheritance.RdpVersion.ToString().ToLowerInvariant()));
|
||||
element.Add(new XAttribute("InheritPuttySession",
|
||||
connectionInfo.Inheritance.PuttySession.ToString().ToLowerInvariant()));
|
||||
element.Add(new XAttribute("InheritRedirectDiskDrives",
|
||||
@@ -204,12 +211,13 @@ namespace mRemoteNG.Config.Serializers.Xml
|
||||
element.Add(new XAttribute("InheritRedirectClipboard",
|
||||
connectionInfo.Inheritance.RedirectClipboard.ToString().ToLowerInvariant()));
|
||||
element.Add(new XAttribute("InheritRedirectSmartCards",
|
||||
connectionInfo
|
||||
.Inheritance.RedirectSmartCards.ToString().ToLowerInvariant()));
|
||||
connectionInfo.Inheritance.RedirectSmartCards.ToString().ToLowerInvariant()));
|
||||
element.Add(new XAttribute("InheritRedirectSound",
|
||||
connectionInfo.Inheritance.RedirectSound.ToString().ToLowerInvariant()));
|
||||
element.Add(new XAttribute("InheritSoundQuality",
|
||||
connectionInfo.Inheritance.SoundQuality.ToString().ToLowerInvariant()));
|
||||
element.Add(new XAttribute("InheritRedirectAudioCapture",
|
||||
connectionInfo.Inheritance.RedirectAudioCapture.ToString().ToLowerInvariant()));
|
||||
element.Add(new XAttribute("InheritResolution",
|
||||
connectionInfo.Inheritance.Resolution.ToString().ToLowerInvariant()));
|
||||
element.Add(new XAttribute("InheritAutomaticResize",
|
||||
@@ -284,7 +292,13 @@ namespace mRemoteNG.Config.Serializers.Xml
|
||||
element.Add(new XAttribute("InheritRDGatewayPassword",
|
||||
connectionInfo.Inheritance.RDGatewayPassword.ToString().ToLowerInvariant()));
|
||||
element.Add(new XAttribute("InheritRDGatewayDomain",
|
||||
connectionInfo.Inheritance.RDGatewayDomain.ToString().ToLowerInvariant()));
|
||||
connectionInfo.Inheritance.RDGatewayDomain.ToString().ToLowerInvariant()));
|
||||
element.Add(new XAttribute("InheritVmId",
|
||||
connectionInfo.Inheritance.VmId.ToString().ToLowerInvariant()));
|
||||
element.Add(new XAttribute("InheritUseVmId",
|
||||
connectionInfo.Inheritance.UseVmId.ToString().ToLowerInvariant()));
|
||||
element.Add(new XAttribute("InheritUseEnhancedMode",
|
||||
connectionInfo.Inheritance.UseEnhancedMode.ToString().ToLowerInvariant()));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -311,6 +325,7 @@ namespace mRemoteNG.Config.Serializers.Xml
|
||||
element.Add(new XAttribute("InheritRedirectSmartCards", falseString));
|
||||
element.Add(new XAttribute("InheritRedirectSound", falseString));
|
||||
element.Add(new XAttribute("InheritSoundQuality", falseString));
|
||||
element.Add(new XAttribute("InheritRedirectAudioCapture", falseString));
|
||||
element.Add(new XAttribute("InheritResolution", falseString));
|
||||
element.Add(new XAttribute("InheritAutomaticResize", falseString));
|
||||
element.Add(new XAttribute("InheritUseConsoleSession", falseString));
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
using System.Linq;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Security;
|
||||
using mRemoteNG.Tree;
|
||||
using mRemoteNG.Tree.Root;
|
||||
|
||||
namespace mRemoteNG.Config.Serializers.Xml
|
||||
{
|
||||
public class XmlConnectionSerializerFactory
|
||||
{
|
||||
public ISerializer<ConnectionInfo, string> Build(
|
||||
ICryptographyProvider cryptographyProvider,
|
||||
ConnectionTreeModel connectionTreeModel,
|
||||
SaveFilter saveFilter = null,
|
||||
bool useFullEncryption = false)
|
||||
{
|
||||
var encryptionKey = connectionTreeModel
|
||||
.RootNodes.OfType<RootNodeInfo>()
|
||||
.First().PasswordString
|
||||
.ConvertToSecureString();
|
||||
|
||||
var connectionNodeSerializer = new XmlConnectionNodeSerializer27(
|
||||
cryptographyProvider,
|
||||
encryptionKey,
|
||||
saveFilter ?? new SaveFilter());
|
||||
|
||||
return new XmlConnectionsSerializer(cryptographyProvider, connectionNodeSerializer)
|
||||
{
|
||||
UseFullEncryption = useFullEncryption
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -226,8 +226,8 @@ namespace mRemoteNG.Config.Serializers.Xml
|
||||
if (_confVersion < 1.1) //1.0 - 0.1
|
||||
{
|
||||
connectionInfo.Resolution = xmlnode.GetAttributeAsBool("Fullscreen")
|
||||
? RdpProtocol.RDPResolutions.Fullscreen
|
||||
: RdpProtocol.RDPResolutions.FitToWindow;
|
||||
? RDPResolutions.Fullscreen
|
||||
: RDPResolutions.FitToWindow;
|
||||
}
|
||||
|
||||
if (!Runtime.UseCredentialManager || _confVersion <= 2.6) // 0.2 - 2.6
|
||||
@@ -257,7 +257,7 @@ namespace mRemoteNG.Config.Serializers.Xml
|
||||
}
|
||||
else
|
||||
{
|
||||
connectionInfo.Port = (int)RdpProtocol.Defaults.Port;
|
||||
connectionInfo.Port = (int)RdpProtocol6.Defaults.Port;
|
||||
connectionInfo.Protocol = ProtocolType.RDP;
|
||||
}
|
||||
|
||||
@@ -279,7 +279,7 @@ namespace mRemoteNG.Config.Serializers.Xml
|
||||
if (xmlnode.GetAttributeAsBool("UseVNC"))
|
||||
connectionInfo.Port = (int)ProtocolVNC.Defaults.Port;
|
||||
else
|
||||
connectionInfo.Port = (int)RdpProtocol.Defaults.Port;
|
||||
connectionInfo.Port = (int)RdpProtocol6.Defaults.Port;
|
||||
}
|
||||
|
||||
connectionInfo.UseConsoleSession = false;
|
||||
@@ -318,34 +318,36 @@ namespace mRemoteNG.Config.Serializers.Xml
|
||||
|
||||
if (_confVersion >= 1.3)
|
||||
{
|
||||
connectionInfo.Colors = xmlnode.GetAttributeAsEnum<RdpProtocol.RDPColors>("Colors");
|
||||
connectionInfo.Resolution = xmlnode.GetAttributeAsEnum<RdpProtocol.RDPResolutions>("Resolution");
|
||||
connectionInfo.RedirectSound = xmlnode.GetAttributeAsEnum<RdpProtocol.RDPSounds>("RedirectSound");
|
||||
connectionInfo.Colors = xmlnode.GetAttributeAsEnum<RDPColors>("Colors");
|
||||
connectionInfo.Resolution = xmlnode.GetAttributeAsEnum<RDPResolutions>("Resolution");
|
||||
connectionInfo.RedirectSound = xmlnode.GetAttributeAsEnum<RDPSounds>("RedirectSound");
|
||||
connectionInfo.RedirectAudioCapture = xmlnode.GetAttributeAsBool("RedirectAudioCapture");
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (xmlnode.GetAttributeAsInt("Colors"))
|
||||
{
|
||||
case 0:
|
||||
connectionInfo.Colors = RdpProtocol.RDPColors.Colors256;
|
||||
connectionInfo.Colors = RDPColors.Colors256;
|
||||
break;
|
||||
case 1:
|
||||
connectionInfo.Colors = RdpProtocol.RDPColors.Colors16Bit;
|
||||
connectionInfo.Colors = RDPColors.Colors16Bit;
|
||||
break;
|
||||
case 2:
|
||||
connectionInfo.Colors = RdpProtocol.RDPColors.Colors24Bit;
|
||||
connectionInfo.Colors = RDPColors.Colors24Bit;
|
||||
break;
|
||||
case 3:
|
||||
connectionInfo.Colors = RdpProtocol.RDPColors.Colors32Bit;
|
||||
connectionInfo.Colors = RDPColors.Colors32Bit;
|
||||
break;
|
||||
// ReSharper disable once RedundantCaseLabel
|
||||
case 4:
|
||||
default:
|
||||
connectionInfo.Colors = RdpProtocol.RDPColors.Colors15Bit;
|
||||
connectionInfo.Colors = RDPColors.Colors15Bit;
|
||||
break;
|
||||
}
|
||||
|
||||
connectionInfo.RedirectSound = xmlnode.GetAttributeAsEnum<RdpProtocol.RDPSounds>("RedirectSound");
|
||||
connectionInfo.RedirectSound = xmlnode.GetAttributeAsEnum<RDPSounds>("RedirectSound");
|
||||
connectionInfo.RedirectAudioCapture = xmlnode.GetAttributeAsBool("RedirectAudioCapture");
|
||||
}
|
||||
|
||||
if (_confVersion >= 1.3)
|
||||
@@ -368,6 +370,7 @@ namespace mRemoteNG.Config.Serializers.Xml
|
||||
connectionInfo.Inheritance.RedirectSmartCards =
|
||||
xmlnode.GetAttributeAsBool("InheritRedirectSmartCards");
|
||||
connectionInfo.Inheritance.RedirectSound = xmlnode.GetAttributeAsBool("InheritRedirectSound");
|
||||
connectionInfo.Inheritance.RedirectAudioCapture = xmlnode.GetAttributeAsBool("RedirectAudioCapture");
|
||||
connectionInfo.Inheritance.Resolution = xmlnode.GetAttributeAsBool("InheritResolution");
|
||||
connectionInfo.Inheritance.UseConsoleSession =
|
||||
xmlnode.GetAttributeAsBool("InheritUseConsoleSession");
|
||||
@@ -439,7 +442,7 @@ namespace mRemoteNG.Config.Serializers.Xml
|
||||
if (_confVersion >= 1.8)
|
||||
{
|
||||
connectionInfo.RDPAuthenticationLevel =
|
||||
xmlnode.GetAttributeAsEnum<RdpProtocol.AuthenticationLevel>("RDPAuthenticationLevel");
|
||||
xmlnode.GetAttributeAsEnum<AuthenticationLevel>("RDPAuthenticationLevel");
|
||||
connectionInfo.Inheritance.RDPAuthenticationLevel =
|
||||
xmlnode.GetAttributeAsBool("InheritRDPAuthenticationLevel");
|
||||
}
|
||||
@@ -469,10 +472,10 @@ namespace mRemoteNG.Config.Serializers.Xml
|
||||
{
|
||||
// Get settings
|
||||
connectionInfo.RDGatewayUsageMethod =
|
||||
xmlnode.GetAttributeAsEnum<RdpProtocol.RDGatewayUsageMethod>("RDGatewayUsageMethod");
|
||||
xmlnode.GetAttributeAsEnum<RDGatewayUsageMethod>("RDGatewayUsageMethod");
|
||||
connectionInfo.RDGatewayHostname = xmlnode.GetAttributeAsString("RDGatewayHostname");
|
||||
connectionInfo.RDGatewayUseConnectionCredentials =
|
||||
xmlnode.GetAttributeAsEnum<RdpProtocol.RDGatewayUseConnectionCredentials>(
|
||||
xmlnode.GetAttributeAsEnum<RDGatewayUseConnectionCredentials>(
|
||||
"RDGatewayUseConnectionCredentials");
|
||||
connectionInfo.RDGatewayUsername = xmlnode.GetAttributeAsString("RDGatewayUsername");
|
||||
connectionInfo.RDGatewayPassword =
|
||||
@@ -523,7 +526,7 @@ namespace mRemoteNG.Config.Serializers.Xml
|
||||
if (_confVersion >= 2.6)
|
||||
{
|
||||
connectionInfo.SoundQuality =
|
||||
xmlnode.GetAttributeAsEnum<RdpProtocol.RDPSoundQuality>("SoundQuality");
|
||||
xmlnode.GetAttributeAsEnum<RDPSoundQuality>("SoundQuality");
|
||||
connectionInfo.Inheritance.SoundQuality = xmlnode.GetAttributeAsBool("InheritSoundQuality");
|
||||
connectionInfo.RDPMinutesToIdleTimeout = xmlnode.GetAttributeAsInt("RDPMinutesToIdleTimeout");
|
||||
connectionInfo.Inheritance.RDPMinutesToIdleTimeout =
|
||||
@@ -536,17 +539,24 @@ namespace mRemoteNG.Config.Serializers.Xml
|
||||
if (_confVersion >= 2.7)
|
||||
{
|
||||
connectionInfo.RedirectClipboard = xmlnode.GetAttributeAsBool("RedirectClipboard");
|
||||
connectionInfo.Inheritance.RedirectClipboard = xmlnode.GetAttributeAsBool("InheritRedirectClipboard");
|
||||
connectionInfo.Favorite = xmlnode.GetAttributeAsBool("Favorite");
|
||||
connectionInfo.UseVmId = xmlnode.GetAttributeAsBool("UseVmId");
|
||||
connectionInfo.VmId = xmlnode.GetAttributeAsString("VmId");
|
||||
connectionInfo.UseEnhancedMode = xmlnode.GetAttributeAsBool("UseEnhancedMode");
|
||||
connectionInfo.Inheritance.RedirectClipboard = xmlnode.GetAttributeAsBool("InheritRedirectClipboard");
|
||||
connectionInfo.Inheritance.Favorite = xmlnode.GetAttributeAsBool("InheritFavorite");
|
||||
connectionInfo.RdpVersion = xmlnode.GetAttributeAsEnum("RdpVersion", RdpVersion.Highest);
|
||||
connectionInfo.Inheritance.RdpVersion = xmlnode.GetAttributeAsBool("InheritRdpVersion");
|
||||
connectionInfo.Inheritance.UseVmId = xmlnode.GetAttributeAsBool("InheritUseVmId");
|
||||
connectionInfo.Inheritance.VmId = xmlnode.GetAttributeAsBool("InheritVmId");
|
||||
connectionInfo.Inheritance.UseEnhancedMode = xmlnode.GetAttributeAsBool("InheritUseEnhancedMode");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg,
|
||||
string.Format(Language.strGetConnectionInfoFromXmlFailed,
|
||||
connectionInfo.Name, ConnectionFileName,
|
||||
ex.Message));
|
||||
string.Format(Language.strGetConnectionInfoFromXmlFailed,
|
||||
connectionInfo.Name, ConnectionFileName, ex.Message));
|
||||
}
|
||||
|
||||
return connectionInfo;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user