mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Compare commits
269 Commits
v1.77Alpha
...
bug/ssh_fo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7305bc4441 | ||
|
|
2c47c857ec | ||
|
|
19f1770eda | ||
|
|
40e878a517 | ||
|
|
d09e9b10a0 | ||
|
|
0d727338f0 | ||
|
|
e9838960fa | ||
|
|
24cd9f257c | ||
|
|
8ecb49709e | ||
|
|
e12d20ab85 | ||
|
|
8b7f7b16a8 | ||
|
|
117e57d7b0 | ||
|
|
56b3f9355a | ||
|
|
70af08616f | ||
|
|
6066cb708e | ||
|
|
c1b6bd4679 | ||
|
|
88617759f6 | ||
|
|
3df98602ee | ||
|
|
3da989e37f | ||
|
|
f735237b3a | ||
|
|
125330b695 | ||
|
|
11199eabf3 | ||
|
|
12b4eb64ba | ||
|
|
74611e9db6 | ||
|
|
f7dc0918eb | ||
|
|
26d9e3c2ff | ||
|
|
53c534aa93 | ||
|
|
dfd02e7b9a | ||
|
|
65eac21471 | ||
|
|
5f776a3525 | ||
|
|
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).
|
||||
|
||||
5
.github/PULL_REQUEST_TEMPLATE.md
vendored
5
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -19,11 +19,14 @@
|
||||
- [ ] 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. -->
|
||||
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
|
||||
- [ ] I have read the **CONTRIBUTING** document.
|
||||
- [ ] My code follows the code style of this project.
|
||||
- [ ] This pull request does not target the master branch.
|
||||
- [ ] I have updated the changelog file accordingly.
|
||||
- [ ] My change requires a change to the documentation.
|
||||
- [ ] I have updated the documentation accordingly.
|
||||
- [ ] I have read the **CONTRIBUTING** document.
|
||||
|
||||
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
1592
CHANGELOG.md
Normal file
1592
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/
|
||||
142
CREDITS.md
Normal file
142
CREDITS.md
Normal file
@@ -0,0 +1,142 @@
|
||||
# Contributors
|
||||
## Current mRemoteNG dev team
|
||||
David Sparer (github.com/sparerd)
|
||||
Sean Kaim (github.com/kmscode)
|
||||
Faryan Rezagholi (github.com/farosch)
|
||||
|
||||
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
|
||||
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
|
||||
Dimitrij (github.com/Kvarkas)
|
||||
|
||||
## Translators
|
||||
Eugenio "Ryo567" Martí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 © 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
|
||||
|
||||
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
|
||||
@@ -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" />
|
||||
@@ -134,6 +133,6 @@ 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>
|
||||
</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>
|
||||
|
||||
10
README.MD
10
README.MD
@@ -7,6 +7,7 @@
|
||||
[](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 |
|
||||
| ---------------|--------------|-----------|
|
||||
@@ -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,26 @@
|
||||
<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.0" newVersion="4.2.0.0" />
|
||||
</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.8.0.0" newVersion="3.8.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
|
||||
</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>
|
||||
@@ -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,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.224\build\SpecFlow.NUnit.props" Condition="Exists('..\packages\SpecFlow.NUnit.3.0.224\build\SpecFlow.NUnit.props')" />
|
||||
<Import Project="..\packages\NUnit.3.12.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" />
|
||||
<Import Project="..\packages\NUnit3TestAdapter.3.13.0\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\packages\NUnit3TestAdapter.3.13.0\build\net35\NUnit3TestAdapter.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -16,7 +18,7 @@
|
||||
<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.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>
|
||||
<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>
|
||||
<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.224\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.224\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\NUnit3TestAdapter.3.13.0\build\net35\NUnit3TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit3TestAdapter.3.13.0\build\net35\NUnit3TestAdapter.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\SpecFlow.NUnit.3.0.224\build\SpecFlow.NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SpecFlow.NUnit.3.0.224\build\SpecFlow.NUnit.props'))" />
|
||||
<Error Condition="!Exists('..\packages\SpecFlow.NUnit.3.0.224\build\SpecFlow.NUnit.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SpecFlow.NUnit.3.0.224\build\SpecFlow.NUnit.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\SpecFlow.NUnit.3.0.224\build\SpecFlow.NUnit.targets" Condition="Exists('..\packages\SpecFlow.NUnit.3.0.224\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.6" targetFramework="net46" />
|
||||
<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.13.0" targetFramework="net46" />
|
||||
<package id="SpecFlow" version="3.0.224" targetFramework="net46" />
|
||||
<package id="SpecFlow.NUnit" version="3.0.224" targetFramework="net46" />
|
||||
<package id="SpecFlow.NUnit.Runners" version="3.0.224" targetFramework="net46" />
|
||||
<package id="System.Reflection.Emit" version="4.3.0" targetFramework="net46" />
|
||||
<package id="System.Reflection.Emit.Lightweight" version="4.3.0" 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="System.ValueTuple" version="4.5.0" targetFramework="net46" />
|
||||
<package id="Utf8Json" version="1.3.7" targetFramework="net46" />
|
||||
</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,15 @@ namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Csv
|
||||
RDGatewayHostname = "SomeRDGatewayHostname",
|
||||
Protocol = ProtocolType.ICA,
|
||||
Port = 999,
|
||||
Favorite = true,
|
||||
UseConsoleSession = true,
|
||||
UseCredSsp = true,
|
||||
UseVmId = 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 +113,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 +124,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 +164,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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ namespace mRemoteNGTests.Connection.Protocol
|
||||
{
|
||||
public class IntegratedProgramTests
|
||||
{
|
||||
private readonly ExternalTool _extTool = new ExternalTool
|
||||
private readonly ExternalTool _extTool = new ExternalTool(new ConnectionInitiator(new ProtocolFactory()))
|
||||
{
|
||||
DisplayName = "notepad",
|
||||
FileName = @"%windir%\system32\notepad.exe",
|
||||
@@ -50,7 +50,7 @@ namespace mRemoteNGTests.Connection.Protocol
|
||||
|
||||
private InterfaceControl BuildInterfaceControl(string extAppName, ProtocolBase sut)
|
||||
{
|
||||
var connectionWindow = new ConnectionWindow(new DockContent());
|
||||
var connectionWindow = new ConnectionWindow(new DockContent(), new ConnectionInitiator(new ProtocolFactory()));
|
||||
var connectionInfo = new ConnectionInfo {ExtApp = extAppName, Protocol = ProtocolType.IntApp};
|
||||
return new InterfaceControl(connectionWindow, sut, connectionInfo);
|
||||
}
|
||||
|
||||
26
mRemoteNGTests/Properties/Resources.Designer.cs
generated
26
mRemoteNGTests/Properties/Resources.Designer.cs
generated
@@ -298,6 +298,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">
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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,6 @@
|
||||
public TType VNCColors { get; set; }
|
||||
public TType VNCSmartSizeMode { get; set; }
|
||||
public TType VNCViewOnly { get; set; }
|
||||
public TType RdpVersion { 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,4 +1,6 @@
|
||||
using NUnit.Framework;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Connection.Protocol;
|
||||
using NUnit.Framework;
|
||||
using mRemoteNG.UI.Forms;
|
||||
|
||||
namespace mRemoteNGTests.UI.Forms
|
||||
@@ -15,7 +17,7 @@ namespace mRemoteNGTests.UI.Forms
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
_optionsForm = new FrmOptions();
|
||||
_optionsForm = new FrmOptions(new ConnectionInitiator(new ProtocolFactory()));
|
||||
_optionsForm.Show();
|
||||
}
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -18,12 +18,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 +33,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 +54,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()
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System.Threading;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.UI.Window;
|
||||
using NUnit.Framework;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
@@ -13,7 +15,7 @@ namespace mRemoteNGTests.UI.Window
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
_connectionTreeWindow = new ConnectionTreeWindow(new DockContent());
|
||||
_connectionTreeWindow = new ConnectionTreeWindow(new DockContent(), new ConnectionInitiator(new ProtocolFactory()));
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
|
||||
@@ -10,6 +10,14 @@
|
||||
<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" />
|
||||
</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.8.0.0" newVersion="3.8.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" /></startup></configuration>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?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\NUnit.3.12.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" />
|
||||
<Import Project="..\packages\NUnit3TestAdapter.3.13.0\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\packages\NUnit3TestAdapter.3.13.0\build\net35\NUnit3TestAdapter.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
@@ -58,21 +59,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.0\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>
|
||||
@@ -218,6 +219,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>
|
||||
@@ -276,6 +278,7 @@
|
||||
<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 +342,8 @@
|
||||
<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\NUnit3TestAdapter.3.13.0\build\net35\NUnit3TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit3TestAdapter.3.13.0\build\net35\NUnit3TestAdapter.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'))" />
|
||||
</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,20 +1,21 @@
|
||||
<?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.0" 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.6" targetFramework="net46" />
|
||||
<package id="NUnit.Extension.VSProjectLoader" version="3.8.0" targetFramework="net46" />
|
||||
<package id="NUnit3TestAdapter" version="3.13.0" targetFramework="net46" />
|
||||
<package id="ObjectListView.Official" version="2.9.1" targetFramework="net46" />
|
||||
<package id="OpenCover" version="4.6.519" targetFramework="net46" />
|
||||
<package id="OpenCover" version="4.7.922" 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" />
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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,4 +1,4 @@
|
||||
using mRemoteNG.App.Info;
|
||||
using mRemoteNG.App.Info;
|
||||
using mRemoteNG.Config.Putty;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Credential;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Messages;
|
||||
using mRemoteNG.UI;
|
||||
using mRemoteNG.UI.Forms;
|
||||
@@ -20,7 +21,7 @@ namespace mRemoteNG.App
|
||||
|
||||
internal static ConnectionTreeWindow TreeForm
|
||||
{
|
||||
get => _treeForm ?? (_treeForm = new ConnectionTreeWindow());
|
||||
get => _treeForm ?? (_treeForm = new ConnectionTreeWindow(ConnectionInitiator));
|
||||
set => _treeForm = value;
|
||||
}
|
||||
|
||||
@@ -29,6 +30,7 @@ namespace mRemoteNG.App
|
||||
internal static ScreenshotManagerWindow ScreenshotForm { get; set; } = new ScreenshotManagerWindow();
|
||||
private static UpdateWindow UpdateForm { get; set; } = new UpdateWindow();
|
||||
internal static SSHTransferWindow SshtransferForm { get; private set; } = new SSHTransferWindow();
|
||||
internal static IConnectionInitiator ConnectionInitiator { get; set; }
|
||||
|
||||
|
||||
public static void Show(WindowType windowType)
|
||||
@@ -50,7 +52,7 @@ namespace mRemoteNG.App
|
||||
_adimportForm.Show(dockPanel);
|
||||
break;
|
||||
case WindowType.Options:
|
||||
using (var optionsForm = new FrmOptions())
|
||||
using (var optionsForm = new FrmOptions(ConnectionInitiator))
|
||||
{
|
||||
optionsForm.ShowDialog(dockPanel);
|
||||
}
|
||||
@@ -73,7 +75,7 @@ namespace mRemoteNG.App
|
||||
break;
|
||||
case WindowType.ExternalApps:
|
||||
if (_externalappsForm == null || _externalappsForm.IsDisposed)
|
||||
_externalappsForm = new ExternalToolsWindow();
|
||||
_externalappsForm = new ExternalToolsWindow(ConnectionInitiator);
|
||||
_externalappsForm.Show(dockPanel);
|
||||
break;
|
||||
case WindowType.PortScan:
|
||||
|
||||
@@ -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>
|
||||
@@ -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);
|
||||
|
||||
@@ -59,12 +59,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 +73,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 +112,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 +133,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 +152,26 @@ namespace mRemoteNG.Config.Connections
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateConnectionsTable(RootNodeInfo rootTreeNode, SqlDatabaseConnector sqlDatabaseConnector)
|
||||
private void UpdateConnectionsTable(RootNodeInfo rootTreeNode, IDatabaseConnector databaseConnector)
|
||||
{
|
||||
var cryptoProvider = new LegacyRijndaelCryptographyProvider();
|
||||
var serializer = new DataTableSerializer(_saveFilter, cryptoProvider,
|
||||
rootTreeNode.PasswordString.ConvertToSecureString());
|
||||
var dataTable = serializer.Serialize(rootTreeNode);
|
||||
var dataProvider = new SqlDataProvider(sqlDatabaseConnector);
|
||||
var dataProvider = new SqlDataProvider(databaseConnector);
|
||||
|
||||
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()
|
||||
|
||||
@@ -32,19 +32,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,93 @@
|
||||
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);
|
||||
using (var sqlBulkCopy = new SqlBulkCopy((SqlConnection)DatabaseConnector.DbConnection()))
|
||||
{
|
||||
foreach (DataColumn col in dataTable.Columns)
|
||||
sqlBulkCopy.ColumnMappings.Add(col.ColumnName, col.ColumnName);
|
||||
sqlBulkCopy.DestinationTableName = "dbo.tblCons";
|
||||
sqlBulkCopy.WriteToServer(dataTable);
|
||||
}
|
||||
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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,13 @@ 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("RenderingEngine"))
|
||||
{
|
||||
HTTPBase.RenderingEngine value;
|
||||
@@ -174,21 +180,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 +278,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 +355,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 +374,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 +557,13 @@ 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("InheritRenderingEngine"))
|
||||
{
|
||||
bool value;
|
||||
@@ -552,6 +578,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 +789,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;VmId;Protocol;PuttySession;Port;ConnectToConsole;UseCredSsp;UseVmId;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;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,13 @@ namespace mRemoteNG.Config.Serializers.Csv
|
||||
sb.Append(FormatForCsv(con.Domain));
|
||||
|
||||
sb.Append(FormatForCsv(con.Hostname))
|
||||
.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.RenderingEngine))
|
||||
.Append(FormatForCsv(con.ICAEncryptionStrength))
|
||||
.Append(FormatForCsv(con.RDPAuthenticationLevel))
|
||||
@@ -147,7 +164,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 +197,8 @@ 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.VmId))
|
||||
.Append(FormatForCsv(con.Inheritance.RenderingEngine))
|
||||
.Append(FormatForCsv(con.Inheritance.Username))
|
||||
.Append(FormatForCsv(con.Inheritance.ICAEncryptionStrength))
|
||||
@@ -208,7 +229,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)
|
||||
|
||||
@@ -89,26 +89,28 @@ 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.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,13 @@ 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.VmId = (bool)dataRow["InheritVmId"];
|
||||
connectionInfo.Inheritance.RenderingEngine = (bool)dataRow["InheritRenderingEngine"];
|
||||
connectionInfo.Inheritance.Username = (bool)dataRow["InheritUsername"];
|
||||
connectionInfo.Inheritance.ICAEncryptionStrength = (bool)dataRow["InheritICAEncryptionStrength"];
|
||||
@@ -219,6 +227,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)
|
||||
|
||||
@@ -6,7 +6,6 @@ using mRemoteNG.Tree;
|
||||
using mRemoteNG.Tree.Root;
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Data.SqlTypes;
|
||||
using System.Linq;
|
||||
using System.Security;
|
||||
|
||||
@@ -72,7 +71,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 +103,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 +149,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 +189,12 @@ 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("InheritVmId", typeof(bool));
|
||||
dataTable.Columns.Add("InheritUseVmId", typeof(bool));
|
||||
dataTable.Columns.Add("RdpVersion", typeof(string));
|
||||
dataTable.Columns.Add("InheritRdpVersion", typeof(bool));
|
||||
}
|
||||
|
||||
private void SetPrimaryKey(DataTable dataTable)
|
||||
@@ -215,7 +222,7 @@ namespace mRemoteNG.Config.Serializers.MsSql
|
||||
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 +234,13 @@ 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["RenderingEngine"] = connectionInfo.RenderingEngine;
|
||||
dataRow["ICAEncryptionStrength"] = connectionInfo.ICAEncryptionStrength;
|
||||
dataRow["RDPAuthenticationLevel"] = connectionInfo.RDPAuthenticationLevel;
|
||||
@@ -253,9 +262,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 +285,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 +315,15 @@ 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["InheritICAEncryptionStrength"] = connectionInfo.Inheritance.ICAEncryptionStrength;
|
||||
dataRow["InheritRDPAuthenticationLevel"] = connectionInfo.Inheritance.RDPAuthenticationLevel;
|
||||
dataRow["InheritRDPMinutesToIdleTimeout"] = connectionInfo.Inheritance.RDPMinutesToIdleTimeout;
|
||||
@@ -333,11 +347,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 +377,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,6 +411,7 @@ namespace mRemoteNG.Config.Serializers.MsSql
|
||||
dataRow["InheritRDGatewayUsername"] = false;
|
||||
dataRow["InheritRDGatewayPassword"] = false;
|
||||
dataRow["InheritRDGatewayDomain"] = false;
|
||||
dataRow["InheritRdpVersion"] = false;
|
||||
}
|
||||
|
||||
_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,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,8 @@ 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("Type", connectionInfo.GetTreeNodeType().ToString()));
|
||||
if (nodeAsContainer != null)
|
||||
element.Add(new XAttribute("Expanded", nodeAsContainer.IsExpanded.ToString().ToLowerInvariant()));
|
||||
@@ -72,6 +74,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 +110,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 +194,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 +210,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 +291,11 @@ 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()));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -311,6 +322,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,22 @@ 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.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");
|
||||
}
|
||||
}
|
||||
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;
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace mRemoteNG.Config.Serializers.Xml
|
||||
|
||||
var serializationTargetAsContainer = serializationTarget as ContainerInfo;
|
||||
if (serializationTargetAsContainer == null) return;
|
||||
foreach (var child in serializationTargetAsContainer.Children)
|
||||
foreach (var child in serializationTargetAsContainer.Children.ToArray())
|
||||
CompileRecursive(child, newElement);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ using System.Text.RegularExpressions;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Config.Import;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.Container;
|
||||
using mRemoteNG.Tools;
|
||||
using mRemoteNG.Tree;
|
||||
@@ -79,8 +80,7 @@ namespace mRemoteNG.Config.Serializers
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage("Config.Import.ActiveDirectory.ImportComputers() failed.",
|
||||
ex);
|
||||
Runtime.MessageCollector.AddExceptionMessage("Config.Import.ActiveDirectory.ImportComputers() failed.", ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,10 +94,9 @@ namespace mRemoteNG.Config.Serializers
|
||||
{
|
||||
Name = displayName,
|
||||
Hostname = hostName,
|
||||
Description = description
|
||||
Description = description,
|
||||
Protocol = ProtocolType.RDP
|
||||
};
|
||||
newConnectionInfo.Inheritance.TurnOnInheritanceCompletely();
|
||||
newConnectionInfo.Inheritance.Description = false;
|
||||
|
||||
parentContainer.AddChild(newConnectionInfo);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace mRemoteNG.Config.Serializers
|
||||
var connectionInfo = new ConnectionInfo();
|
||||
foreach (var line in rdcFileContent.Split(Environment.NewLine.ToCharArray()))
|
||||
{
|
||||
var parts = line.Split(new[] {':'}, 3);
|
||||
var parts = line.Split(new[] { ':' }, 3);
|
||||
if (parts.Length < 3)
|
||||
{
|
||||
continue;
|
||||
@@ -60,30 +60,29 @@ namespace mRemoteNG.Config.Serializers
|
||||
switch (value)
|
||||
{
|
||||
case "8":
|
||||
connectionInfo.Colors = RdpProtocol.RDPColors.Colors256;
|
||||
connectionInfo.Colors = RDPColors.Colors256;
|
||||
break;
|
||||
case "15":
|
||||
connectionInfo.Colors = RdpProtocol.RDPColors.Colors15Bit;
|
||||
connectionInfo.Colors = RDPColors.Colors15Bit;
|
||||
break;
|
||||
case "16":
|
||||
connectionInfo.Colors = RdpProtocol.RDPColors.Colors16Bit;
|
||||
connectionInfo.Colors = RDPColors.Colors16Bit;
|
||||
break;
|
||||
case "24":
|
||||
connectionInfo.Colors = RdpProtocol.RDPColors.Colors24Bit;
|
||||
connectionInfo.Colors = RDPColors.Colors24Bit;
|
||||
break;
|
||||
case "32":
|
||||
connectionInfo.Colors = RdpProtocol.RDPColors.Colors32Bit;
|
||||
connectionInfo.Colors = RDPColors.Colors32Bit;
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
case "bitmapcachepersistenable":
|
||||
connectionInfo.CacheBitmaps = value == "1";
|
||||
break;
|
||||
case "screen mode id":
|
||||
connectionInfo.Resolution = value == "2"
|
||||
? RdpProtocol.RDPResolutions.Fullscreen
|
||||
: RdpProtocol.RDPResolutions.FitToWindow;
|
||||
? RDPResolutions.Fullscreen
|
||||
: RDPResolutions.FitToWindow;
|
||||
break;
|
||||
case "connect to console":
|
||||
connectionInfo.UseConsoleSession = value == "1";
|
||||
@@ -119,20 +118,39 @@ namespace mRemoteNG.Config.Serializers
|
||||
switch (value)
|
||||
{
|
||||
case "0":
|
||||
connectionInfo.RedirectSound = RdpProtocol.RDPSounds.BringToThisComputer;
|
||||
connectionInfo.RedirectSound = RDPSounds.BringToThisComputer;
|
||||
break;
|
||||
case "1":
|
||||
connectionInfo.RedirectSound = RdpProtocol.RDPSounds.LeaveAtRemoteComputer;
|
||||
connectionInfo.RedirectSound = RDPSounds.LeaveAtRemoteComputer;
|
||||
break;
|
||||
case "2":
|
||||
connectionInfo.RedirectSound = RdpProtocol.RDPSounds.DoNotPlay;
|
||||
connectionInfo.RedirectSound = RDPSounds.DoNotPlay;
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
case "redirectaudiocapture":
|
||||
connectionInfo.RedirectAudioCapture = value == "1";
|
||||
break;
|
||||
case "loadbalanceinfo":
|
||||
connectionInfo.LoadBalanceInfo = value;
|
||||
break;
|
||||
case "gatewayusagemethod":
|
||||
switch (value)
|
||||
{
|
||||
case "0":
|
||||
connectionInfo.RDGatewayUsageMethod = RDGatewayUsageMethod.Never;
|
||||
break;
|
||||
case "1":
|
||||
connectionInfo.RDGatewayUsageMethod = RDGatewayUsageMethod.Always;
|
||||
break;
|
||||
case "2":
|
||||
connectionInfo.RDGatewayUsageMethod = RDGatewayUsageMethod.Detect;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "gatewayhostname":
|
||||
connectionInfo.RDGatewayHostname = value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,6 +139,8 @@ namespace mRemoteNG.Config.Serializers
|
||||
if (_schemaVersion == 1)
|
||||
propertiesNode = xmlNode; // Version 2.2 defines the container name at the root instead
|
||||
|
||||
connectionInfo.VmId = propertiesNode?.SelectSingleNode("./vmid")?.InnerText ?? "";
|
||||
|
||||
connectionInfo.Hostname = propertiesNode?.SelectSingleNode("./name")?.InnerText ?? "";
|
||||
|
||||
var connectionDisplayName = propertiesNode?.SelectSingleNode("./displayName")?.InnerText;
|
||||
@@ -153,7 +155,7 @@ namespace mRemoteNG.Config.Serializers
|
||||
var logonCredentialsNode = xmlNode.SelectSingleNode("./logonCredentials");
|
||||
if (logonCredentialsNode?.Attributes?["inherit"]?.Value == "None")
|
||||
{
|
||||
connectionInfo.Username = logonCredentialsNode.SelectSingleNode("userName")?.InnerText;
|
||||
connectionInfo.Username = logonCredentialsNode.SelectSingleNode("userName")?.InnerText ?? string.Empty;
|
||||
|
||||
var passwordNode = logonCredentialsNode.SelectSingleNode("./password");
|
||||
if (_schemaVersion == 1) // Version 2.2 allows clear text passwords
|
||||
@@ -167,7 +169,7 @@ namespace mRemoteNG.Config.Serializers
|
||||
connectionInfo.Password = DecryptRdcManPassword(passwordNode?.InnerText);
|
||||
}
|
||||
|
||||
connectionInfo.Domain = logonCredentialsNode.SelectSingleNode("./domain")?.InnerText;
|
||||
connectionInfo.Domain = logonCredentialsNode.SelectSingleNode("./domain")?.InnerText ?? string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -197,17 +199,17 @@ namespace mRemoteNG.Config.Serializers
|
||||
{
|
||||
connectionInfo.RDGatewayUsageMethod =
|
||||
gatewaySettingsNode.SelectSingleNode("./enabled")?.InnerText == "True"
|
||||
? RdpProtocol.RDGatewayUsageMethod.Always
|
||||
: RdpProtocol.RDGatewayUsageMethod.Never;
|
||||
connectionInfo.RDGatewayHostname = gatewaySettingsNode.SelectSingleNode("./hostName")?.InnerText;
|
||||
connectionInfo.RDGatewayUsername = gatewaySettingsNode.SelectSingleNode("./userName")?.InnerText;
|
||||
? RDGatewayUsageMethod.Always
|
||||
: RDGatewayUsageMethod.Never;
|
||||
connectionInfo.RDGatewayHostname = gatewaySettingsNode.SelectSingleNode("./hostName")?.InnerText ?? string.Empty;
|
||||
connectionInfo.RDGatewayUsername = gatewaySettingsNode.SelectSingleNode("./userName")?.InnerText ?? string.Empty;
|
||||
|
||||
var passwordNode = gatewaySettingsNode.SelectSingleNode("./password");
|
||||
connectionInfo.RDGatewayPassword = passwordNode?.Attributes?["storeAsClearText"]?.Value == "True"
|
||||
? passwordNode.InnerText
|
||||
: DecryptRdcManPassword(passwordNode?.InnerText);
|
||||
|
||||
connectionInfo.RDGatewayDomain = gatewaySettingsNode.SelectSingleNode("./domain")?.InnerText;
|
||||
connectionInfo.RDGatewayDomain = gatewaySettingsNode.SelectSingleNode("./domain")?.InnerText ?? string.Empty;
|
||||
// ./logonMethod
|
||||
// ./localBypass
|
||||
// ./credSharing
|
||||
@@ -225,21 +227,21 @@ namespace mRemoteNG.Config.Serializers
|
||||
if (remoteDesktopNode?.Attributes?["inherit"]?.Value == "None")
|
||||
{
|
||||
connectionInfo.Resolution =
|
||||
Enum.TryParse<RdpProtocol.RDPResolutions>(remoteDesktopNode.SelectSingleNode("./size")?.InnerText.Replace(" ", ""), true, out var rdpResolution)
|
||||
Enum.TryParse<RDPResolutions>(remoteDesktopNode.SelectSingleNode("./size")?.InnerText.Replace(" ", ""), true, out var rdpResolution)
|
||||
? rdpResolution
|
||||
: RdpProtocol.RDPResolutions.FitToWindow;
|
||||
: RDPResolutions.FitToWindow;
|
||||
|
||||
if (remoteDesktopNode.SelectSingleNode("./sameSizeAsClientArea")?.InnerText == "True")
|
||||
{
|
||||
connectionInfo.Resolution = RdpProtocol.RDPResolutions.FitToWindow;
|
||||
connectionInfo.Resolution = RDPResolutions.FitToWindow;
|
||||
}
|
||||
|
||||
if (remoteDesktopNode.SelectSingleNode("./fullScreen")?.InnerText == "True")
|
||||
{
|
||||
connectionInfo.Resolution = RdpProtocol.RDPResolutions.Fullscreen;
|
||||
connectionInfo.Resolution = RDPResolutions.Fullscreen;
|
||||
}
|
||||
|
||||
if (Enum.TryParse<RdpProtocol.RDPColors>(remoteDesktopNode.SelectSingleNode("./colorDepth")?.InnerText, true, out var rdpColors))
|
||||
if (Enum.TryParse<RDPColors>(remoteDesktopNode.SelectSingleNode("./colorDepth")?.InnerText, true, out var rdpColors))
|
||||
connectionInfo.Colors = rdpColors;
|
||||
}
|
||||
else
|
||||
@@ -256,15 +258,15 @@ namespace mRemoteNG.Config.Serializers
|
||||
{
|
||||
case "0": // Bring to this computer
|
||||
case "Client":
|
||||
connectionInfo.RedirectSound = RdpProtocol.RDPSounds.BringToThisComputer;
|
||||
connectionInfo.RedirectSound = RDPSounds.BringToThisComputer;
|
||||
break;
|
||||
case "1": // Leave at remote computer
|
||||
case "Remote":
|
||||
connectionInfo.RedirectSound = RdpProtocol.RDPSounds.LeaveAtRemoteComputer;
|
||||
connectionInfo.RedirectSound = RDPSounds.LeaveAtRemoteComputer;
|
||||
break;
|
||||
case "2": // Do not play
|
||||
case "NoSound":
|
||||
connectionInfo.RedirectSound = RdpProtocol.RDPSounds.DoNotPlay;
|
||||
connectionInfo.RedirectSound = RDPSounds.DoNotPlay;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -323,15 +325,15 @@ namespace mRemoteNG.Config.Serializers
|
||||
{
|
||||
case "0": // No authentication
|
||||
case "None":
|
||||
connectionInfo.RDPAuthenticationLevel = RdpProtocol.AuthenticationLevel.NoAuth;
|
||||
connectionInfo.RDPAuthenticationLevel = AuthenticationLevel.NoAuth;
|
||||
break;
|
||||
case "1": // Do not connect if authentication fails
|
||||
case "Required":
|
||||
connectionInfo.RDPAuthenticationLevel = RdpProtocol.AuthenticationLevel.AuthRequired;
|
||||
connectionInfo.RDPAuthenticationLevel = AuthenticationLevel.AuthRequired;
|
||||
break;
|
||||
case "2": // Warn if authentication fails
|
||||
case "Warn":
|
||||
connectionInfo.RDPAuthenticationLevel = RdpProtocol.AuthenticationLevel.WarnOnFailedAuth;
|
||||
connectionInfo.RDPAuthenticationLevel = AuthenticationLevel.WarnOnFailedAuth;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,14 +8,14 @@ namespace mRemoteNG.Config.Serializers.Versioning
|
||||
{
|
||||
public class SqlDatabaseVersionVerifier
|
||||
{
|
||||
private readonly SqlDatabaseConnector _sqlDatabaseConnector;
|
||||
private readonly IDatabaseConnector _databaseConnector;
|
||||
|
||||
public SqlDatabaseVersionVerifier(SqlDatabaseConnector sqlDatabaseConnector)
|
||||
public SqlDatabaseVersionVerifier(IDatabaseConnector DatabaseConnector)
|
||||
{
|
||||
if (sqlDatabaseConnector == null)
|
||||
throw new ArgumentNullException(nameof(sqlDatabaseConnector));
|
||||
if (DatabaseConnector == null)
|
||||
throw new ArgumentNullException(nameof(DatabaseConnector));
|
||||
|
||||
_sqlDatabaseConnector = sqlDatabaseConnector;
|
||||
_databaseConnector = DatabaseConnector;
|
||||
}
|
||||
|
||||
public bool VerifyDatabaseVersion(Version dbVersion)
|
||||
@@ -32,11 +32,11 @@ namespace mRemoteNG.Config.Serializers.Versioning
|
||||
|
||||
var dbUpgraders = new IVersionUpgrader[]
|
||||
{
|
||||
new SqlVersion22To23Upgrader(_sqlDatabaseConnector),
|
||||
new SqlVersion23To24Upgrader(_sqlDatabaseConnector),
|
||||
new SqlVersion24To25Upgrader(_sqlDatabaseConnector),
|
||||
new SqlVersion25To26Upgrader(_sqlDatabaseConnector),
|
||||
new SqlVersion26To27Upgrader(_sqlDatabaseConnector),
|
||||
new SqlVersion22To23Upgrader(_databaseConnector),
|
||||
new SqlVersion23To24Upgrader(_databaseConnector),
|
||||
new SqlVersion24To25Upgrader(_databaseConnector),
|
||||
new SqlVersion25To26Upgrader(_databaseConnector),
|
||||
new SqlVersion26To27Upgrader(_databaseConnector),
|
||||
};
|
||||
|
||||
foreach (var upgrader in dbUpgraders)
|
||||
|
||||
@@ -2,20 +2,19 @@
|
||||
using mRemoteNG.Config.DatabaseConnectors;
|
||||
using mRemoteNG.Messages;
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace mRemoteNG.Config.Serializers.Versioning
|
||||
{
|
||||
public class SqlVersion22To23Upgrader : IVersionUpgrader
|
||||
{
|
||||
private readonly SqlDatabaseConnector _sqlDatabaseConnector;
|
||||
private readonly IDatabaseConnector _databaseConnector;
|
||||
|
||||
public SqlVersion22To23Upgrader(SqlDatabaseConnector sqlDatabaseConnector)
|
||||
public SqlVersion22To23Upgrader(IDatabaseConnector databaseConnector)
|
||||
{
|
||||
if (sqlDatabaseConnector == null)
|
||||
throw new ArgumentNullException(nameof(sqlDatabaseConnector));
|
||||
if (databaseConnector == null)
|
||||
throw new ArgumentNullException(nameof(databaseConnector));
|
||||
|
||||
_sqlDatabaseConnector = sqlDatabaseConnector;
|
||||
_databaseConnector = databaseConnector;
|
||||
}
|
||||
|
||||
public bool CanUpgrade(Version currentVersion)
|
||||
@@ -33,8 +32,8 @@ ADD EnableFontSmoothing bit NOT NULL DEFAULT 0,
|
||||
EnableDesktopComposition bit NOT NULL DEFAULT 0,
|
||||
InheritEnableFontSmoothing bit NOT NULL DEFAULT 0,
|
||||
InheritEnableDesktopComposition bit NOT NULL DEFAULT 0;";
|
||||
var sqlCommand = new SqlCommand(sqlText, _sqlDatabaseConnector.SqlConnection);
|
||||
sqlCommand.ExecuteNonQuery();
|
||||
var dbCommand = _databaseConnector.DbCommand(sqlText);
|
||||
dbCommand.ExecuteNonQuery();
|
||||
|
||||
return new Version(2, 3);
|
||||
}
|
||||
|
||||
@@ -2,20 +2,19 @@
|
||||
using mRemoteNG.Config.DatabaseConnectors;
|
||||
using mRemoteNG.Messages;
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace mRemoteNG.Config.Serializers.Versioning
|
||||
{
|
||||
public class SqlVersion23To24Upgrader : IVersionUpgrader
|
||||
{
|
||||
private readonly SqlDatabaseConnector _sqlDatabaseConnector;
|
||||
private readonly IDatabaseConnector _databaseConnector;
|
||||
|
||||
public SqlVersion23To24Upgrader(SqlDatabaseConnector sqlDatabaseConnector)
|
||||
public SqlVersion23To24Upgrader(IDatabaseConnector databaseConnector)
|
||||
{
|
||||
if (sqlDatabaseConnector == null)
|
||||
throw new ArgumentNullException(nameof(sqlDatabaseConnector));
|
||||
if (databaseConnector == null)
|
||||
throw new ArgumentNullException(nameof(databaseConnector));
|
||||
|
||||
_sqlDatabaseConnector = sqlDatabaseConnector;
|
||||
_databaseConnector = databaseConnector;
|
||||
}
|
||||
|
||||
public bool CanUpgrade(Version currentVersion)
|
||||
@@ -31,8 +30,8 @@ namespace mRemoteNG.Config.Serializers.Versioning
|
||||
ALTER TABLE tblCons
|
||||
ADD UseCredSsp bit NOT NULL DEFAULT 1,
|
||||
InheritUseCredSsp bit NOT NULL DEFAULT 0;";
|
||||
var sqlCommand = new SqlCommand(sqlText, _sqlDatabaseConnector.SqlConnection);
|
||||
sqlCommand.ExecuteNonQuery();
|
||||
var dbCommand = _databaseConnector.DbCommand(sqlText);
|
||||
dbCommand.ExecuteNonQuery();
|
||||
|
||||
return new Version(2, 4);
|
||||
}
|
||||
|
||||
@@ -2,20 +2,19 @@
|
||||
using mRemoteNG.Config.DatabaseConnectors;
|
||||
using mRemoteNG.Messages;
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace mRemoteNG.Config.Serializers.Versioning
|
||||
{
|
||||
public class SqlVersion24To25Upgrader : IVersionUpgrader
|
||||
{
|
||||
private readonly SqlDatabaseConnector _sqlDatabaseConnector;
|
||||
private readonly IDatabaseConnector _databaseConnector;
|
||||
|
||||
public SqlVersion24To25Upgrader(SqlDatabaseConnector sqlDatabaseConnector)
|
||||
public SqlVersion24To25Upgrader(IDatabaseConnector databaseConnector)
|
||||
{
|
||||
if (sqlDatabaseConnector == null)
|
||||
throw new ArgumentNullException(nameof(sqlDatabaseConnector));
|
||||
if (databaseConnector == null)
|
||||
throw new ArgumentNullException(nameof(databaseConnector));
|
||||
|
||||
_sqlDatabaseConnector = sqlDatabaseConnector;
|
||||
_databaseConnector = databaseConnector;
|
||||
}
|
||||
|
||||
public bool CanUpgrade(Version currentVersion)
|
||||
@@ -33,8 +32,8 @@ ADD LoadBalanceInfo varchar (1024) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
|
||||
AutomaticResize bit NOT NULL DEFAULT 1,
|
||||
InheritLoadBalanceInfo bit NOT NULL DEFAULT 0,
|
||||
InheritAutomaticResize bit NOT NULL DEFAULT 0;";
|
||||
var sqlCommand = new SqlCommand(sqlText, _sqlDatabaseConnector.SqlConnection);
|
||||
sqlCommand.ExecuteNonQuery();
|
||||
var dbCommand = _databaseConnector.DbCommand(sqlText);
|
||||
dbCommand.ExecuteNonQuery();
|
||||
|
||||
return new Version(2, 5);
|
||||
}
|
||||
|
||||
@@ -2,20 +2,19 @@
|
||||
using mRemoteNG.Config.DatabaseConnectors;
|
||||
using mRemoteNG.Messages;
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace mRemoteNG.Config.Serializers.Versioning
|
||||
{
|
||||
public class SqlVersion25To26Upgrader : IVersionUpgrader
|
||||
{
|
||||
private readonly SqlDatabaseConnector _sqlDatabaseConnector;
|
||||
private readonly IDatabaseConnector _databaseConnector;
|
||||
|
||||
public SqlVersion25To26Upgrader(SqlDatabaseConnector sqlDatabaseConnector)
|
||||
public SqlVersion25To26Upgrader(IDatabaseConnector databaseConnector)
|
||||
{
|
||||
if (sqlDatabaseConnector == null)
|
||||
throw new ArgumentNullException(nameof(sqlDatabaseConnector));
|
||||
if (databaseConnector == null)
|
||||
throw new ArgumentNullException(nameof(databaseConnector));
|
||||
|
||||
_sqlDatabaseConnector = sqlDatabaseConnector;
|
||||
_databaseConnector = databaseConnector;
|
||||
}
|
||||
|
||||
public bool CanUpgrade(Version currentVersion)
|
||||
@@ -37,8 +36,8 @@ ADD RDPMinutesToIdleTimeout int NOT NULL DEFAULT 0,
|
||||
InheritSoundQuality bit NOT NULL DEFAULT 0;
|
||||
UPDATE tblRoot
|
||||
SET ConfVersion='2.6'";
|
||||
var sqlCommand = new SqlCommand(sqlText, _sqlDatabaseConnector.SqlConnection);
|
||||
sqlCommand.ExecuteNonQuery();
|
||||
var dbCommand = _databaseConnector.DbCommand(sqlText);
|
||||
dbCommand.ExecuteNonQuery();
|
||||
|
||||
return new Version(2, 6);
|
||||
}
|
||||
|
||||
@@ -2,20 +2,16 @@
|
||||
using mRemoteNG.Config.DatabaseConnectors;
|
||||
using mRemoteNG.Messages;
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace mRemoteNG.Config.Serializers.Versioning
|
||||
{
|
||||
public class SqlVersion26To27Upgrader : IVersionUpgrader
|
||||
{
|
||||
private readonly SqlDatabaseConnector _sqlDatabaseConnector;
|
||||
private readonly IDatabaseConnector _databaseConnector;
|
||||
|
||||
public SqlVersion26To27Upgrader(SqlDatabaseConnector sqlDatabaseConnector)
|
||||
public SqlVersion26To27Upgrader(IDatabaseConnector databaseConnector)
|
||||
{
|
||||
if (sqlDatabaseConnector == null)
|
||||
throw new ArgumentNullException(nameof(sqlDatabaseConnector));
|
||||
|
||||
_sqlDatabaseConnector = sqlDatabaseConnector;
|
||||
_databaseConnector = databaseConnector ?? throw new ArgumentNullException(nameof(databaseConnector));
|
||||
}
|
||||
|
||||
public bool CanUpgrade(Version currentVersion)
|
||||
@@ -30,11 +26,15 @@ namespace mRemoteNG.Config.Serializers.Versioning
|
||||
const string sqlText = @"
|
||||
ALTER TABLE tblCons
|
||||
ADD RedirectClipboard bit NOT NULL DEFAULT 0,
|
||||
InheritRedirectClipboard bit NOT NULL DEFAULT 0;
|
||||
InheritRedirectClipboard bit NOT NULL DEFAULT 0,
|
||||
VmId varchar NOT NULL DEFAULT 0,
|
||||
UseVmId bit NOT NULL DEFAULT 0,
|
||||
InheritVmId bit NOT NULL DEFAULT 0,
|
||||
InheritUseVmId bit NOT NULL DEFAULT 0;
|
||||
UPDATE tblRoot
|
||||
SET ConfVersion='2.7'";
|
||||
var sqlCommand = new SqlCommand(sqlText, _sqlDatabaseConnector.SqlConnection);
|
||||
sqlCommand.ExecuteNonQuery();
|
||||
var dbCommand = _databaseConnector.DbCommand(sqlText);
|
||||
dbCommand.ExecuteNonQuery();
|
||||
|
||||
return new Version(2, 7);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ using mRemoteNG.App.Info;
|
||||
using mRemoteNG.UI.Forms;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Messages;
|
||||
using mRemoteNG.Tools;
|
||||
using mRemoteNG.UI.Controls;
|
||||
@@ -13,12 +14,14 @@ namespace mRemoteNG.Config.Settings
|
||||
public class ExternalAppsLoader
|
||||
{
|
||||
private readonly FrmMain _mainForm;
|
||||
private readonly IConnectionInitiator _connectionInitiator;
|
||||
private readonly MessageCollector _messageCollector;
|
||||
private readonly ExternalToolsToolStrip _externalToolsToolStrip;
|
||||
|
||||
public ExternalAppsLoader(FrmMain mainForm,
|
||||
MessageCollector messageCollector,
|
||||
ExternalToolsToolStrip externalToolsToolStrip)
|
||||
ExternalToolsToolStrip externalToolsToolStrip,
|
||||
IConnectionInitiator connectionInitiator)
|
||||
{
|
||||
if (mainForm == null)
|
||||
throw new ArgumentNullException(nameof(mainForm));
|
||||
@@ -30,6 +33,7 @@ namespace mRemoteNG.Config.Settings
|
||||
_mainForm = mainForm;
|
||||
_messageCollector = messageCollector;
|
||||
_externalToolsToolStrip = externalToolsToolStrip;
|
||||
_connectionInitiator = connectionInitiator;
|
||||
}
|
||||
|
||||
|
||||
@@ -71,7 +75,7 @@ namespace mRemoteNG.Config.Settings
|
||||
|
||||
foreach (XmlElement xEl in xDom.DocumentElement.ChildNodes)
|
||||
{
|
||||
var extA = new ExternalTool
|
||||
var extA = new ExternalTool(_connectionInitiator)
|
||||
{
|
||||
DisplayName = xEl.Attributes["DisplayName"].Value,
|
||||
FileName = xEl.Attributes["FileName"].Value,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
@@ -7,6 +7,7 @@ using System.Threading;
|
||||
using System.Globalization;
|
||||
using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.App.Info;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Messages;
|
||||
using mRemoteNG.Tools;
|
||||
using mRemoteNG.UI.Controls;
|
||||
@@ -23,16 +24,19 @@ namespace mRemoteNG.Config.Settings
|
||||
private readonly QuickConnectToolStrip _quickConnectToolStrip;
|
||||
private readonly ExternalToolsToolStrip _externalToolsToolStrip;
|
||||
private readonly MultiSshToolStrip _multiSshToolStrip;
|
||||
private readonly IConnectionInitiator _connectionInitiator;
|
||||
|
||||
private FrmMain MainForm { get; }
|
||||
|
||||
|
||||
public SettingsLoader(FrmMain mainForm,
|
||||
MessageCollector messageCollector,
|
||||
QuickConnectToolStrip quickConnectToolStrip,
|
||||
ExternalToolsToolStrip externalToolsToolStrip,
|
||||
MultiSshToolStrip multiSshToolStrip,
|
||||
MenuStrip mainMenu)
|
||||
public SettingsLoader(
|
||||
FrmMain mainForm,
|
||||
IConnectionInitiator connectionInitiator,
|
||||
MessageCollector messageCollector,
|
||||
QuickConnectToolStrip quickConnectToolStrip,
|
||||
ExternalToolsToolStrip externalToolsToolStrip,
|
||||
MultiSshToolStrip multiSshToolStrip,
|
||||
MenuStrip mainMenu)
|
||||
{
|
||||
if (mainForm == null)
|
||||
throw new ArgumentNullException(nameof(mainForm));
|
||||
@@ -53,7 +57,8 @@ namespace mRemoteNG.Config.Settings
|
||||
_externalToolsToolStrip = externalToolsToolStrip;
|
||||
_multiSshToolStrip = multiSshToolStrip;
|
||||
_mainMenu = mainMenu;
|
||||
_externalAppsLoader = new ExternalAppsLoader(MainForm, messageCollector, _externalToolsToolStrip);
|
||||
_connectionInitiator = connectionInitiator;
|
||||
_externalAppsLoader = new ExternalAppsLoader(MainForm, messageCollector, _externalToolsToolStrip, _connectionInitiator);
|
||||
}
|
||||
|
||||
#region Public Methods
|
||||
@@ -156,10 +161,10 @@ namespace mRemoteNG.Config.Settings
|
||||
MainForm.Fullscreen.Value = true;
|
||||
}
|
||||
|
||||
private static void SetShowSystemTrayIcon()
|
||||
private void SetShowSystemTrayIcon()
|
||||
{
|
||||
if (mRemoteNG.Settings.Default.ShowSystemTrayIcon)
|
||||
Runtime.NotificationAreaIcon = new NotificationAreaIcon();
|
||||
Runtime.NotificationAreaIcon = new NotificationAreaIcon(_connectionInitiator);
|
||||
}
|
||||
|
||||
private static void SetPuttyPath()
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.Connection.Protocol.Http;
|
||||
@@ -7,11 +6,11 @@ using mRemoteNG.Connection.Protocol.ICA;
|
||||
using mRemoteNG.Connection.Protocol.RDP;
|
||||
using mRemoteNG.Connection.Protocol.VNC;
|
||||
using mRemoteNG.Tools;
|
||||
using mRemoteNG.Tools.Attributes;
|
||||
|
||||
|
||||
namespace mRemoteNG.Connection
|
||||
{
|
||||
[Obsolete("Valid for mRemoteNG v1.75 (confCons v2.6) or earlier")]
|
||||
public abstract class AbstractConnectionRecord : INotifyPropertyChanged
|
||||
{
|
||||
#region Fields
|
||||
@@ -25,30 +24,33 @@ namespace mRemoteNG.Connection
|
||||
private string _username = "";
|
||||
private string _password = "";
|
||||
private string _domain = "";
|
||||
private string _vmId = "";
|
||||
|
||||
private ProtocolType _protocol;
|
||||
private RdpVersion _rdpProtocolVersion;
|
||||
private string _extApp;
|
||||
private int _port;
|
||||
private string _puttySession;
|
||||
private IcaProtocol.EncryptionStrength _icaEncryption;
|
||||
private bool _useConsoleSession;
|
||||
private RdpProtocol.AuthenticationLevel _rdpAuthenticationLevel;
|
||||
private AuthenticationLevel _rdpAuthenticationLevel;
|
||||
private int _rdpMinutesToIdleTimeout;
|
||||
private bool _rdpAlertIdleTimeout;
|
||||
private string _loadBalanceInfo;
|
||||
private HTTPBase.RenderingEngine _renderingEngine;
|
||||
private bool _useCredSsp;
|
||||
private bool _useVmId;
|
||||
|
||||
private RdpProtocol.RDGatewayUsageMethod _rdGatewayUsageMethod;
|
||||
private RDGatewayUsageMethod _rdGatewayUsageMethod;
|
||||
private string _rdGatewayHostname;
|
||||
private RdpProtocol.RDGatewayUseConnectionCredentials _rdGatewayUseConnectionCredentials;
|
||||
private RDGatewayUseConnectionCredentials _rdGatewayUseConnectionCredentials;
|
||||
private string _rdGatewayUsername;
|
||||
private string _rdGatewayPassword;
|
||||
private string _rdGatewayDomain;
|
||||
|
||||
private RdpProtocol.RDPResolutions _resolution;
|
||||
private RDPResolutions _resolution;
|
||||
private bool _automaticResize;
|
||||
private RdpProtocol.RDPColors _colors;
|
||||
private RDPColors _colors;
|
||||
private bool _cacheBitmaps;
|
||||
private bool _displayWallpaper;
|
||||
private bool _displayThemes;
|
||||
@@ -61,8 +63,9 @@ namespace mRemoteNG.Connection
|
||||
private bool _redirectClipboard;
|
||||
private bool _redirectPorts;
|
||||
private bool _redirectSmartCards;
|
||||
private RdpProtocol.RDPSounds _redirectSound;
|
||||
private RdpProtocol.RDPSoundQuality _soundQuality;
|
||||
private RDPSounds _redirectSound;
|
||||
private RDPSoundQuality _soundQuality;
|
||||
private bool _redirectAudioCapture;
|
||||
|
||||
private string _preExtApp;
|
||||
private string _postExtApp;
|
||||
@@ -131,26 +134,39 @@ namespace mRemoteNG.Connection
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryConnection", 2),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameAddress"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionAddress")]
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionAddress"),
|
||||
UsedInAllProtocolsExcept()]
|
||||
public virtual string Hostname
|
||||
{
|
||||
get => _hostname.Trim();
|
||||
set => SetField(ref _hostname, value?.Trim(), "Hostname");
|
||||
}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryConnection", 2),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNamePort"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionPort"),
|
||||
UsedInAllProtocolsExcept(ProtocolType.ICA)]
|
||||
public virtual int Port
|
||||
{
|
||||
get => GetPropertyValue("Port", _port);
|
||||
set => SetField(ref _port, value, "Port");
|
||||
}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryConnection", 2),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameUsername"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionUsername")]
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionUsername"),
|
||||
UsedInAllProtocolsExcept(ProtocolType.VNC, ProtocolType.Telnet, ProtocolType.Rlogin, ProtocolType.RAW)]
|
||||
public virtual string Username
|
||||
{
|
||||
get => GetPropertyValue("Username", _username);
|
||||
set => SetField(ref _username, value?.Trim(), "Username");
|
||||
set => SetField(ref _username, Settings.Default.DoNotTrimUsername ? value : value?.Trim(), "Username");
|
||||
}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryConnection", 2),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNamePassword"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionPassword"),
|
||||
PasswordPropertyText(true)]
|
||||
PasswordPropertyText(true),
|
||||
UsedInAllProtocolsExcept(ProtocolType.Telnet, ProtocolType.Rlogin, ProtocolType.RAW)]
|
||||
public virtual string Password
|
||||
{
|
||||
get => GetPropertyValue("Password", _password);
|
||||
@@ -159,13 +175,24 @@ namespace mRemoteNG.Connection
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryConnection", 2),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameDomain"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionDomain")]
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionDomain"),
|
||||
UsedInProtocol(ProtocolType.RDP, ProtocolType.ICA, ProtocolType.IntApp)]
|
||||
public string Domain
|
||||
{
|
||||
get => GetPropertyValue("Domain", _domain).Trim();
|
||||
set => SetField(ref _domain, value?.Trim(), "Domain");
|
||||
}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryConnection", 2),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameVmId"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionVmId"),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public string VmId
|
||||
{
|
||||
get => GetPropertyValue("VmId", _vmId).Trim();
|
||||
set => SetField(ref _vmId, value?.Trim(), "VmId");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Protocol
|
||||
@@ -180,29 +207,34 @@ namespace mRemoteNG.Connection
|
||||
set => SetField(ref _protocol, value, "Protocol");
|
||||
}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 3),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRdpVersion"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRdpVersion"),
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public virtual RdpVersion RdpVersion
|
||||
{
|
||||
get => GetPropertyValue(nameof(RdpVersion), _rdpProtocolVersion);
|
||||
set => SetField(ref _rdpProtocolVersion, value, nameof(RdpVersion));
|
||||
}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 3),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameExternalTool"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionExternalTool"),
|
||||
TypeConverter(typeof(ExternalToolsTypeConverter))]
|
||||
TypeConverter(typeof(ExternalToolsTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.IntApp)]
|
||||
public string ExtApp
|
||||
{
|
||||
get => GetPropertyValue("ExtApp", _extApp);
|
||||
set => SetField(ref _extApp, value, "ExtApp");
|
||||
}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 3),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNamePort"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionPort")]
|
||||
public virtual int Port
|
||||
{
|
||||
get => GetPropertyValue("Port", _port);
|
||||
set => SetField(ref _port, value, "Port");
|
||||
}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 3),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNamePuttySession"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionPuttySession"),
|
||||
TypeConverter(typeof(Config.Putty.PuttySessionsManager.SessionList))]
|
||||
TypeConverter(typeof(Config.Putty.PuttySessionsManager.SessionList)),
|
||||
UsedInProtocol(ProtocolType.SSH1, ProtocolType.SSH2, ProtocolType.Telnet,
|
||||
ProtocolType.RAW, ProtocolType.Rlogin)]
|
||||
public virtual string PuttySession
|
||||
{
|
||||
get => GetPropertyValue("PuttySession", _puttySession);
|
||||
@@ -212,7 +244,8 @@ namespace mRemoteNG.Connection
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 3),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameEncryptionStrength"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionEncryptionStrength"),
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter))]
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.ICA)]
|
||||
public IcaProtocol.EncryptionStrength ICAEncryptionStrength
|
||||
{
|
||||
get => GetPropertyValue("ICAEncryptionStrength", _icaEncryption);
|
||||
@@ -222,7 +255,8 @@ namespace mRemoteNG.Connection
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 3),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameUseConsoleSession"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionUseConsoleSession"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public bool UseConsoleSession
|
||||
{
|
||||
get => GetPropertyValue("UseConsoleSession", _useConsoleSession);
|
||||
@@ -232,8 +266,9 @@ namespace mRemoteNG.Connection
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 3),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameAuthenticationLevel"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionAuthenticationLevel"),
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter))]
|
||||
public RdpProtocol.AuthenticationLevel RDPAuthenticationLevel
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public AuthenticationLevel RDPAuthenticationLevel
|
||||
{
|
||||
get => GetPropertyValue("RDPAuthenticationLevel", _rdpAuthenticationLevel);
|
||||
set => SetField(ref _rdpAuthenticationLevel, value, "RDPAuthenticationLevel");
|
||||
@@ -241,7 +276,8 @@ namespace mRemoteNG.Connection
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 3),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRDPMinutesToIdleTimeout"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRDPMinutesToIdleTimeout")]
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRDPMinutesToIdleTimeout"),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public virtual int RDPMinutesToIdleTimeout
|
||||
{
|
||||
get => GetPropertyValue("RDPMinutesToIdleTimeout", _rdpMinutesToIdleTimeout);
|
||||
@@ -257,7 +293,8 @@ namespace mRemoteNG.Connection
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 3),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRDPAlertIdleTimeout"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRDPAlertIdleTimeout")]
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRDPAlertIdleTimeout"),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public bool RDPAlertIdleTimeout
|
||||
{
|
||||
get => GetPropertyValue("RDPAlertIdleTimeout", _rdpAlertIdleTimeout);
|
||||
@@ -266,7 +303,8 @@ namespace mRemoteNG.Connection
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 3),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameLoadBalanceInfo"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionLoadBalanceInfo")]
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionLoadBalanceInfo"),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public string LoadBalanceInfo
|
||||
{
|
||||
get => GetPropertyValue("LoadBalanceInfo", _loadBalanceInfo).Trim();
|
||||
@@ -276,7 +314,8 @@ namespace mRemoteNG.Connection
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 3),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRenderingEngine"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRenderingEngine"),
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter))]
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.HTTP, ProtocolType.HTTPS)]
|
||||
public HTTPBase.RenderingEngine RenderingEngine
|
||||
{
|
||||
get => GetPropertyValue("RenderingEngine", _renderingEngine);
|
||||
@@ -286,13 +325,25 @@ namespace mRemoteNG.Connection
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 3),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameUseCredSsp"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionUseCredSsp"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public bool UseCredSsp
|
||||
{
|
||||
get => GetPropertyValue("UseCredSsp", _useCredSsp);
|
||||
set => SetField(ref _useCredSsp, value, "UseCredSsp");
|
||||
}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 3),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameUseVmId"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionUseVmId"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public bool UseVmId
|
||||
{
|
||||
get => GetPropertyValue("UseVmId", _useVmId);
|
||||
set => SetField(ref _useVmId, value, "UseVmId");
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region RD Gateway
|
||||
@@ -300,8 +351,9 @@ namespace mRemoteNG.Connection
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryGateway", 4),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRDGatewayUsageMethod"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRDGatewayUsageMethod"),
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter))]
|
||||
public RdpProtocol.RDGatewayUsageMethod RDGatewayUsageMethod
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public RDGatewayUsageMethod RDGatewayUsageMethod
|
||||
{
|
||||
get => GetPropertyValue("RDGatewayUsageMethod", _rdGatewayUsageMethod);
|
||||
set => SetField(ref _rdGatewayUsageMethod, value, "RDGatewayUsageMethod");
|
||||
@@ -309,7 +361,8 @@ namespace mRemoteNG.Connection
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryGateway", 4),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRDGatewayHostname"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRDGatewayHostname")]
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRDGatewayHostname"),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public string RDGatewayHostname
|
||||
{
|
||||
get => GetPropertyValue("RDGatewayHostname", _rdGatewayHostname).Trim();
|
||||
@@ -319,8 +372,9 @@ namespace mRemoteNG.Connection
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryGateway", 4),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRDGatewayUseConnectionCredentials"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRDGatewayUseConnectionCredentials"),
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter))]
|
||||
public RdpProtocol.RDGatewayUseConnectionCredentials RDGatewayUseConnectionCredentials
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public RDGatewayUseConnectionCredentials RDGatewayUseConnectionCredentials
|
||||
{
|
||||
get => GetPropertyValue("RDGatewayUseConnectionCredentials", _rdGatewayUseConnectionCredentials);
|
||||
set => SetField(ref _rdGatewayUseConnectionCredentials, value, "RDGatewayUseConnectionCredentials");
|
||||
@@ -328,7 +382,8 @@ namespace mRemoteNG.Connection
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryGateway", 4),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRDGatewayUsername"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRDGatewayUsername")]
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRDGatewayUsername"),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public string RDGatewayUsername
|
||||
{
|
||||
get => GetPropertyValue("RDGatewayUsername", _rdGatewayUsername).Trim();
|
||||
@@ -338,7 +393,8 @@ namespace mRemoteNG.Connection
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryGateway", 4),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRDGatewayPassword"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyNameRDGatewayPassword"),
|
||||
PasswordPropertyText(true)]
|
||||
PasswordPropertyText(true),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public string RDGatewayPassword
|
||||
{
|
||||
get => GetPropertyValue("RDGatewayPassword", _rdGatewayPassword);
|
||||
@@ -347,7 +403,8 @@ namespace mRemoteNG.Connection
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryGateway", 4),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRDGatewayDomain"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRDGatewayDomain")]
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRDGatewayDomain"),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public string RDGatewayDomain
|
||||
{
|
||||
get => GetPropertyValue("RDGatewayDomain", _rdGatewayDomain).Trim();
|
||||
@@ -361,8 +418,9 @@ namespace mRemoteNG.Connection
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 5),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameResolution"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionResolution"),
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter))]
|
||||
public RdpProtocol.RDPResolutions Resolution
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.RDP, ProtocolType.ICA)]
|
||||
public RDPResolutions Resolution
|
||||
{
|
||||
get => GetPropertyValue("Resolution", _resolution);
|
||||
set => SetField(ref _resolution, value, "Resolution");
|
||||
@@ -371,7 +429,8 @@ namespace mRemoteNG.Connection
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 5),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameAutomaticResize"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionAutomaticResize"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public bool AutomaticResize
|
||||
{
|
||||
get => GetPropertyValue("AutomaticResize", _automaticResize);
|
||||
@@ -381,8 +440,9 @@ namespace mRemoteNG.Connection
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 5),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameColors"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionColors"),
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter))]
|
||||
public RdpProtocol.RDPColors Colors
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.RDP, ProtocolType.ICA)]
|
||||
public RDPColors Colors
|
||||
{
|
||||
get => GetPropertyValue("Colors", _colors);
|
||||
set => SetField(ref _colors, value, "Colors");
|
||||
@@ -391,7 +451,8 @@ namespace mRemoteNG.Connection
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 5),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameCacheBitmaps"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionCacheBitmaps"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.RDP, ProtocolType.ICA)]
|
||||
public bool CacheBitmaps
|
||||
{
|
||||
get => GetPropertyValue("CacheBitmaps", _cacheBitmaps);
|
||||
@@ -401,7 +462,8 @@ namespace mRemoteNG.Connection
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 5),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameDisplayWallpaper"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionDisplayWallpaper"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public bool DisplayWallpaper
|
||||
{
|
||||
get => GetPropertyValue("DisplayWallpaper", _displayWallpaper);
|
||||
@@ -411,7 +473,8 @@ namespace mRemoteNG.Connection
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 5),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameDisplayThemes"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionDisplayThemes"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public bool DisplayThemes
|
||||
{
|
||||
get => GetPropertyValue("DisplayThemes", _displayThemes);
|
||||
@@ -421,7 +484,8 @@ namespace mRemoteNG.Connection
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 5),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameEnableFontSmoothing"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionEnableFontSmoothing"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public bool EnableFontSmoothing
|
||||
{
|
||||
get => GetPropertyValue("EnableFontSmoothing", _enableFontSmoothing);
|
||||
@@ -431,7 +495,8 @@ namespace mRemoteNG.Connection
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 5),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameEnableDesktopComposition"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionEnableDesktopComposition"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public bool EnableDesktopComposition
|
||||
{
|
||||
get => GetPropertyValue("EnableDesktopComposition", _enableDesktopComposition);
|
||||
@@ -445,7 +510,8 @@ namespace mRemoteNG.Connection
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 6),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRedirectKeys"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRedirectKeys"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public bool RedirectKeys
|
||||
{
|
||||
get => GetPropertyValue("RedirectKeys", _redirectKeys);
|
||||
@@ -455,7 +521,8 @@ namespace mRemoteNG.Connection
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 6),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRedirectDrives"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRedirectDrives"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public bool RedirectDiskDrives
|
||||
{
|
||||
get => GetPropertyValue("RedirectDiskDrives", _redirectDiskDrives);
|
||||
@@ -465,7 +532,8 @@ namespace mRemoteNG.Connection
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 6),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRedirectPrinters"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRedirectPrinters"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public bool RedirectPrinters
|
||||
{
|
||||
get => GetPropertyValue("RedirectPrinters", _redirectPrinters);
|
||||
@@ -475,17 +543,20 @@ namespace mRemoteNG.Connection
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 6),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRedirectClipboard"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRedirectClipboard"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public bool RedirectClipboard
|
||||
{
|
||||
get { return GetPropertyValue("RedirectClipboard", _redirectClipboard); }
|
||||
set { SetField(ref _redirectClipboard, value, "RedirectClipboard"); }
|
||||
}
|
||||
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 6),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRedirectPorts"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRedirectPorts"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public bool RedirectPorts
|
||||
{
|
||||
get => GetPropertyValue("RedirectPorts", _redirectPorts);
|
||||
@@ -495,7 +566,8 @@ namespace mRemoteNG.Connection
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 6),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRedirectSmartCards"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRedirectSmartCards"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public bool RedirectSmartCards
|
||||
{
|
||||
get => GetPropertyValue("RedirectSmartCards", _redirectSmartCards);
|
||||
@@ -505,8 +577,9 @@ namespace mRemoteNG.Connection
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 6),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRedirectSounds"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRedirectSounds"),
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter))]
|
||||
public RdpProtocol.RDPSounds RedirectSound
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public RDPSounds RedirectSound
|
||||
{
|
||||
get => GetPropertyValue("RedirectSound", _redirectSound);
|
||||
set => SetField(ref _redirectSound, value, "RedirectSound");
|
||||
@@ -515,18 +588,30 @@ namespace mRemoteNG.Connection
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 6),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameSoundQuality"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionSoundQuality"),
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter))]
|
||||
public RdpProtocol.RDPSoundQuality SoundQuality
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public RDPSoundQuality SoundQuality
|
||||
{
|
||||
get => GetPropertyValue("SoundQuality", _soundQuality);
|
||||
set => SetField(ref _soundQuality, value, "SoundQuality");
|
||||
}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 6),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRedirectAudioCapture"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRedirectAudioCapture"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.RDP)]
|
||||
public bool RedirectAudioCapture
|
||||
{
|
||||
get => GetPropertyValue(nameof(RedirectAudioCapture), _redirectAudioCapture);
|
||||
set => SetField(ref _redirectAudioCapture, value, nameof(RedirectAudioCapture));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Misc
|
||||
|
||||
[Browsable(false)] public string ConstantID { get; /*set;*/ }
|
||||
[Browsable(false)] public string ConstantID { get; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryMiscellaneous", 7),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameExternalToolBefore"),
|
||||
@@ -578,12 +663,14 @@ namespace mRemoteNG.Connection
|
||||
#endregion
|
||||
|
||||
#region VNC
|
||||
|
||||
// TODO: it seems all these VNC properties were added and serialized but
|
||||
// never hooked up to the VNC protocol or shown to the user
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 5),
|
||||
Browsable(false),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameCompression"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionCompression"),
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter))]
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.VNC),
|
||||
Browsable(false)]
|
||||
public ProtocolVNC.Compression VNCCompression
|
||||
{
|
||||
get => GetPropertyValue("VNCCompression", _vncCompression);
|
||||
@@ -591,10 +678,11 @@ namespace mRemoteNG.Connection
|
||||
}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 5),
|
||||
Browsable(false),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameEncoding"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionEncoding"),
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter))]
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.VNC),
|
||||
Browsable(false)]
|
||||
public ProtocolVNC.Encoding VNCEncoding
|
||||
{
|
||||
get => GetPropertyValue("VNCEncoding", _vncEncoding);
|
||||
@@ -602,10 +690,11 @@ namespace mRemoteNG.Connection
|
||||
}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryConnection", 2),
|
||||
Browsable(false),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameAuthenticationMode"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionAuthenticationMode"),
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter))]
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.VNC),
|
||||
Browsable(false)]
|
||||
public ProtocolVNC.AuthMode VNCAuthMode
|
||||
{
|
||||
get => GetPropertyValue("VNCAuthMode", _vncAuthMode);
|
||||
@@ -613,10 +702,11 @@ namespace mRemoteNG.Connection
|
||||
}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProxy", 7),
|
||||
Browsable(false),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameVNCProxyType"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionVNCProxyType"),
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter))]
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.VNC),
|
||||
Browsable(false)]
|
||||
public ProtocolVNC.ProxyType VNCProxyType
|
||||
{
|
||||
get => GetPropertyValue("VNCProxyType", _vncProxyType);
|
||||
@@ -624,9 +714,10 @@ namespace mRemoteNG.Connection
|
||||
}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProxy", 7),
|
||||
Browsable(false),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameVNCProxyAddress"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionVNCProxyAddress")]
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionVNCProxyAddress"),
|
||||
UsedInProtocol(ProtocolType.VNC),
|
||||
Browsable(false)]
|
||||
public string VNCProxyIP
|
||||
{
|
||||
get => GetPropertyValue("VNCProxyIP", _vncProxyIp);
|
||||
@@ -634,9 +725,10 @@ namespace mRemoteNG.Connection
|
||||
}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProxy", 7),
|
||||
Browsable(false),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameVNCProxyPort"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionVNCProxyPort")]
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionVNCProxyPort"),
|
||||
UsedInProtocol(ProtocolType.VNC),
|
||||
Browsable(false)]
|
||||
public int VNCProxyPort
|
||||
{
|
||||
get => GetPropertyValue("VNCProxyPort", _vncProxyPort);
|
||||
@@ -644,9 +736,10 @@ namespace mRemoteNG.Connection
|
||||
}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProxy", 7),
|
||||
Browsable(false),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameVNCProxyUsername"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionVNCProxyUsername")]
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionVNCProxyUsername"),
|
||||
UsedInProtocol(ProtocolType.VNC),
|
||||
Browsable(false)]
|
||||
public string VNCProxyUsername
|
||||
{
|
||||
get => GetPropertyValue("VNCProxyUsername", _vncProxyUsername);
|
||||
@@ -654,10 +747,11 @@ namespace mRemoteNG.Connection
|
||||
}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProxy", 7),
|
||||
Browsable(false),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameVNCProxyPassword"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionVNCProxyPassword"),
|
||||
PasswordPropertyText(true)]
|
||||
PasswordPropertyText(true),
|
||||
UsedInProtocol(ProtocolType.VNC),
|
||||
Browsable(false)]
|
||||
public string VNCProxyPassword
|
||||
{
|
||||
get => GetPropertyValue("VNCProxyPassword", _vncProxyPassword);
|
||||
@@ -665,10 +759,11 @@ namespace mRemoteNG.Connection
|
||||
}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 5),
|
||||
Browsable(false),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameColors"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionColors"),
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter))]
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.VNC),
|
||||
Browsable(false)]
|
||||
public ProtocolVNC.Colors VNCColors
|
||||
{
|
||||
get => GetPropertyValue("VNCColors", _vncColors);
|
||||
@@ -678,7 +773,8 @@ namespace mRemoteNG.Connection
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 5),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameSmartSizeMode"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionSmartSizeMode"),
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter))]
|
||||
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.VNC)]
|
||||
public ProtocolVNC.SmartSizeMode VNCSmartSizeMode
|
||||
{
|
||||
get => GetPropertyValue("VNCSmartSizeMode", _vncSmartSizeMode);
|
||||
@@ -688,7 +784,8 @@ namespace mRemoteNG.Connection
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 5),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameViewOnly"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionViewOnly"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
|
||||
UsedInProtocol(ProtocolType.VNC)]
|
||||
public bool VNCViewOnly
|
||||
{
|
||||
get => GetPropertyValue("VNCViewOnly", _vncViewOnly);
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
using mRemoteNG.App;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.Connection.Protocol.Http;
|
||||
using mRemoteNG.Connection.Protocol.ICA;
|
||||
@@ -10,11 +15,6 @@ using mRemoteNG.Connection.Protocol.Telnet;
|
||||
using mRemoteNG.Connection.Protocol.VNC;
|
||||
using mRemoteNG.Container;
|
||||
using mRemoteNG.Tree;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
|
||||
namespace mRemoteNG.Connection
|
||||
@@ -22,9 +22,18 @@ namespace mRemoteNG.Connection
|
||||
[DefaultProperty("Name")]
|
||||
public class ConnectionInfo : AbstractConnectionRecord, IHasParent, IInheritable
|
||||
{
|
||||
private ConnectionInfoInheritance _inheritance;
|
||||
|
||||
#region Public Properties
|
||||
|
||||
[Browsable(false)] public ConnectionInfoInheritance Inheritance { get; set; }
|
||||
[Browsable(false)]
|
||||
public ConnectionInfoInheritance Inheritance
|
||||
{
|
||||
get => _inheritance;
|
||||
set => _inheritance = _inheritance.Parent != this
|
||||
? _inheritance.Clone(this)
|
||||
: value;
|
||||
}
|
||||
|
||||
[Browsable(false)] public ProtocolList OpenConnections { get; protected set; }
|
||||
|
||||
@@ -72,11 +81,14 @@ namespace mRemoteNG.Connection
|
||||
{
|
||||
var newConnectionInfo = new ConnectionInfo();
|
||||
newConnectionInfo.CopyFrom(this);
|
||||
newConnectionInfo.Inheritance = Inheritance.Clone();
|
||||
newConnectionInfo.Inheritance.Parent = newConnectionInfo;
|
||||
return newConnectionInfo;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copies all connection and inheritance values
|
||||
/// from the given <see cref="sourceConnectionInfo"/>.
|
||||
/// </summary>
|
||||
/// <param name="sourceConnectionInfo"></param>
|
||||
public void CopyFrom(ConnectionInfo sourceConnectionInfo)
|
||||
{
|
||||
var properties = GetType().BaseType?.GetProperties().Where(prop => prop.CanRead && prop.CanWrite);
|
||||
@@ -88,8 +100,7 @@ namespace mRemoteNG.Connection
|
||||
property.SetValue(this, remotePropertyValue, null);
|
||||
}
|
||||
|
||||
var clonedInheritance = sourceConnectionInfo.Inheritance.Clone();
|
||||
clonedInheritance.Parent = this;
|
||||
var clonedInheritance = sourceConnectionInfo.Inheritance.Clone(this);
|
||||
Inheritance = clonedInheritance;
|
||||
}
|
||||
|
||||
@@ -163,7 +174,8 @@ namespace mRemoteNG.Connection
|
||||
DoNotJump = 4,
|
||||
OverridePanel = 8,
|
||||
DontUseConsoleSession = 16,
|
||||
NoCredentials = 32
|
||||
NoCredentials = 32,
|
||||
ViewOnly = 64
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -234,7 +246,7 @@ namespace mRemoteNG.Connection
|
||||
switch (protocol)
|
||||
{
|
||||
case ProtocolType.RDP:
|
||||
return (int)RdpProtocol.Defaults.Port;
|
||||
return (int)RdpProtocol6.Defaults.Port;
|
||||
case ProtocolType.VNC:
|
||||
return (int)ProtocolVNC.Defaults.Port;
|
||||
case ProtocolType.SSH1:
|
||||
@@ -285,42 +297,27 @@ namespace mRemoteNG.Connection
|
||||
ExtApp = Settings.Default.ConDefaultExtApp;
|
||||
Port = 0;
|
||||
PuttySession = Settings.Default.ConDefaultPuttySession;
|
||||
ICAEncryptionStrength = (IcaProtocol.EncryptionStrength)Enum.Parse(typeof(IcaProtocol.EncryptionStrength),
|
||||
Settings
|
||||
.Default
|
||||
.ConDefaultICAEncryptionStrength);
|
||||
ICAEncryptionStrength = (IcaProtocol.EncryptionStrength)Enum.Parse(
|
||||
typeof(IcaProtocol.EncryptionStrength), Settings.Default.ConDefaultICAEncryptionStrength);
|
||||
UseConsoleSession = Settings.Default.ConDefaultUseConsoleSession;
|
||||
RDPAuthenticationLevel = (RdpProtocol.AuthenticationLevel)Enum.Parse(
|
||||
typeof(RdpProtocol.AuthenticationLevel
|
||||
),
|
||||
Settings
|
||||
.Default
|
||||
.ConDefaultRDPAuthenticationLevel);
|
||||
RDPAuthenticationLevel = (AuthenticationLevel)Enum.Parse(
|
||||
typeof(AuthenticationLevel), Settings.Default.ConDefaultRDPAuthenticationLevel);
|
||||
RDPMinutesToIdleTimeout = Settings.Default.ConDefaultRDPMinutesToIdleTimeout;
|
||||
RDPAlertIdleTimeout = Settings.Default.ConDefaultRDPAlertIdleTimeout;
|
||||
LoadBalanceInfo = Settings.Default.ConDefaultLoadBalanceInfo;
|
||||
RenderingEngine = (HTTPBase.RenderingEngine)Enum.Parse(typeof(HTTPBase.RenderingEngine),
|
||||
Settings.Default.ConDefaultRenderingEngine);
|
||||
UseCredSsp = Settings.Default.ConDefaultUseCredSsp;
|
||||
UseVmId = Settings.Default.ConDefaultUseVmId;
|
||||
}
|
||||
|
||||
private void SetRdGatewayDefaults()
|
||||
{
|
||||
RDGatewayUsageMethod = (RdpProtocol.RDGatewayUsageMethod)Enum.Parse(
|
||||
typeof(RdpProtocol.RDGatewayUsageMethod
|
||||
),
|
||||
Settings
|
||||
.Default
|
||||
.ConDefaultRDGatewayUsageMethod);
|
||||
RDGatewayUsageMethod = (RDGatewayUsageMethod)Enum.Parse(
|
||||
typeof(RDGatewayUsageMethod), Settings.Default.ConDefaultRDGatewayUsageMethod);
|
||||
RDGatewayHostname = Settings.Default.ConDefaultRDGatewayHostname;
|
||||
RDGatewayUseConnectionCredentials = (RdpProtocol.RDGatewayUseConnectionCredentials)Enum.Parse(
|
||||
typeof(
|
||||
RdpProtocol
|
||||
.RDGatewayUseConnectionCredentials
|
||||
),
|
||||
Settings
|
||||
.Default
|
||||
.ConDefaultRDGatewayUseConnectionCredentials);
|
||||
RDGatewayUseConnectionCredentials = (RDGatewayUseConnectionCredentials)Enum.Parse(
|
||||
typeof(RDGatewayUseConnectionCredentials), Settings.Default.ConDefaultRDGatewayUseConnectionCredentials);
|
||||
RDGatewayUsername = Settings.Default.ConDefaultRDGatewayUsername;
|
||||
RDGatewayPassword = Settings.Default.ConDefaultRDGatewayPassword;
|
||||
RDGatewayDomain = Settings.Default.ConDefaultRDGatewayDomain;
|
||||
@@ -328,11 +325,10 @@ namespace mRemoteNG.Connection
|
||||
|
||||
private void SetAppearanceDefaults()
|
||||
{
|
||||
Resolution = (RdpProtocol.RDPResolutions)Enum.Parse(typeof(RdpProtocol.RDPResolutions),
|
||||
Settings.Default.ConDefaultResolution);
|
||||
Resolution = (RDPResolutions)Enum.Parse(
|
||||
typeof(RDPResolutions), Settings.Default.ConDefaultResolution);
|
||||
AutomaticResize = Settings.Default.ConDefaultAutomaticResize;
|
||||
Colors = (RdpProtocol.RDPColors)Enum.Parse(typeof(RdpProtocol.RDPColors),
|
||||
Settings.Default.ConDefaultColors);
|
||||
Colors = (RDPColors)Enum.Parse(typeof(RDPColors), Settings.Default.ConDefaultColors);
|
||||
CacheBitmaps = Settings.Default.ConDefaultCacheBitmaps;
|
||||
DisplayWallpaper = Settings.Default.ConDefaultDisplayWallpaper;
|
||||
DisplayThemes = Settings.Default.ConDefaultDisplayThemes;
|
||||
@@ -348,10 +344,11 @@ namespace mRemoteNG.Connection
|
||||
RedirectClipboard = Settings.Default.ConDefaultRedirectClipboard;
|
||||
RedirectPorts = Settings.Default.ConDefaultRedirectPorts;
|
||||
RedirectSmartCards = Settings.Default.ConDefaultRedirectSmartCards;
|
||||
RedirectSound = (RdpProtocol.RDPSounds)Enum.Parse(typeof(RdpProtocol.RDPSounds),
|
||||
RedirectSound = (RDPSounds)Enum.Parse(typeof(RDPSounds),
|
||||
Settings.Default.ConDefaultRedirectSound);
|
||||
SoundQuality = (RdpProtocol.RDPSoundQuality)Enum.Parse(typeof(RdpProtocol.RDPSoundQuality),
|
||||
SoundQuality = (RDPSoundQuality)Enum.Parse(typeof(RDPSoundQuality),
|
||||
Settings.Default.ConDefaultSoundQuality);
|
||||
RedirectAudioCapture = Settings.Default.ConDefaultRedirectAudioCapture;
|
||||
}
|
||||
|
||||
private void SetMiscDefaults()
|
||||
@@ -367,10 +364,8 @@ namespace mRemoteNG.Connection
|
||||
{
|
||||
VNCCompression = (ProtocolVNC.Compression)Enum.Parse(typeof(ProtocolVNC.Compression),
|
||||
Settings.Default.ConDefaultVNCCompression);
|
||||
VNCEncoding =
|
||||
(ProtocolVNC.Encoding)Enum.Parse(typeof(ProtocolVNC.Encoding), Settings.Default.ConDefaultVNCEncoding);
|
||||
VNCAuthMode =
|
||||
(ProtocolVNC.AuthMode)Enum.Parse(typeof(ProtocolVNC.AuthMode), Settings.Default.ConDefaultVNCAuthMode);
|
||||
VNCEncoding = (ProtocolVNC.Encoding)Enum.Parse(typeof(ProtocolVNC.Encoding), Settings.Default.ConDefaultVNCEncoding);
|
||||
VNCAuthMode = (ProtocolVNC.AuthMode)Enum.Parse(typeof(ProtocolVNC.AuthMode), Settings.Default.ConDefaultVNCAuthMode);
|
||||
VNCProxyType = (ProtocolVNC.ProxyType)Enum.Parse(typeof(ProtocolVNC.ProxyType),
|
||||
Settings.Default.ConDefaultVNCProxyType);
|
||||
VNCProxyIP = Settings.Default.ConDefaultVNCProxyIP;
|
||||
@@ -386,9 +381,8 @@ namespace mRemoteNG.Connection
|
||||
|
||||
private void SetNonBrowsablePropertiesDefaults()
|
||||
{
|
||||
Inheritance = new ConnectionInfoInheritance(this);
|
||||
_inheritance = new ConnectionInfoInheritance(this);
|
||||
SetNewOpenConnectionList();
|
||||
//PositionID = 0;
|
||||
}
|
||||
|
||||
private void SetNewOpenConnectionList()
|
||||
|
||||
@@ -15,13 +15,13 @@ namespace mRemoteNG.Connection
|
||||
#region General
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryGeneral"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameAll"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionAll"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameAll"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionAll"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool EverythingInherited
|
||||
{
|
||||
get { return EverythingIsInherited(); }
|
||||
set { SetAllValues(value); }
|
||||
get => EverythingIsInherited();
|
||||
set => SetAllValues(value);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -29,20 +29,20 @@ namespace mRemoteNG.Connection
|
||||
#region Display
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryDisplay", 2),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameDescription"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionDescription"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameDescription"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionDescription"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool Description { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryDisplay", 2),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameIcon"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionIcon"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameIcon"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionIcon"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool Icon { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryDisplay", 2),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNamePanel"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionPanel"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNamePanel"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionPanel"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool Panel { get; set; }
|
||||
|
||||
@@ -51,140 +51,159 @@ namespace mRemoteNG.Connection
|
||||
#region Connection
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryConnection", 3),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameUsername"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionUsername"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameUsername"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionUsername"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
[Browsable(true)]
|
||||
public bool Username { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryConnection", 3),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNamePassword"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionPassword"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameVmId"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionVmId"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
[Browsable(true)]
|
||||
public bool VmId { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryConnection", 3),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNamePassword"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionPassword"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
[Browsable(true)]
|
||||
public bool Password { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryConnection", 3),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameDomain"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionDomain"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameDomain"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionDomain"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
[Browsable(true)]
|
||||
public bool Domain { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryConnection", 3),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNamePort"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionPort"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool Port { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Protocol
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 4),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameProtocol"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionProtocol"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameProtocol"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionProtocol"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool Protocol { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 4),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameExternalTool"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionExternalTool"),
|
||||
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRdpVersion"),
|
||||
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRdpVersion"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool RdpVersion { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 4),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameExternalTool"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionExternalTool"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool ExtApp { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 4),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNamePort"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionPort"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool Port { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 4),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNamePuttySession"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionPuttySession"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNamePuttySession"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionPuttySession"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool PuttySession { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 4),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameEncryptionStrength"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionEncryptionStrength"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameEncryptionStrength"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionEncryptionStrength"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool ICAEncryptionStrength { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 4),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameAuthenticationLevel"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionAuthenticationLevel"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameAuthenticationLevel"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionAuthenticationLevel"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool RDPAuthenticationLevel { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 4),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameRDPMinutesToIdleTimeout"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionRDPMinutesToIdleTimeout"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRDPMinutesToIdleTimeout"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRDPMinutesToIdleTimeout"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool RDPMinutesToIdleTimeout { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 4),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameRDPAlertIdleTimeout"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionRDPAlertIdleTimeout"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRDPAlertIdleTimeout"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRDPAlertIdleTimeout"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool RDPAlertIdleTimeout { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 4),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameLoadBalanceInfo"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionLoadBalanceInfo"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameLoadBalanceInfo"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionLoadBalanceInfo"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool LoadBalanceInfo { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 4),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameRenderingEngine"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionRenderingEngine"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRenderingEngine"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRenderingEngine"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool RenderingEngine { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 4),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameUseConsoleSession"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionUseConsoleSession"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameUseConsoleSession"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionUseConsoleSession"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool UseConsoleSession { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 4),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameUseCredSsp"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionUseCredSsp"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameUseCredSsp"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionUseCredSsp"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool UseCredSsp { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 4),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameUseVmId"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionUseVmId"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool UseVmId { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region RD Gateway
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryGateway", 5),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameRDGatewayUsageMethod"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionRDGatewayUsageMethod"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRDGatewayUsageMethod"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRDGatewayUsageMethod"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool RDGatewayUsageMethod { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryGateway", 5),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameRDGatewayHostname"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionRDGatewayHostname"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRDGatewayHostname"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRDGatewayHostname"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool RDGatewayHostname { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryGateway", 5),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameRDGatewayUseConnectionCredentials"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute(
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRDGatewayUseConnectionCredentials"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit(
|
||||
"strPropertyDescriptionRDGatewayUseConnectionCredentials"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool RDGatewayUseConnectionCredentials { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryGateway", 5),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameRDGatewayUsername"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionRDGatewayUsername"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRDGatewayUsername"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRDGatewayUsername"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool RDGatewayUsername { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryGateway", 5),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameRDGatewayPassword"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionRDGatewayPassword"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRDGatewayPassword"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRDGatewayPassword"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool RDGatewayPassword { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryGateway", 5),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameRDGatewayDomain"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionRDGatewayDomain"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRDGatewayDomain"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRDGatewayDomain"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool RDGatewayDomain { get; set; }
|
||||
|
||||
@@ -193,50 +212,50 @@ namespace mRemoteNG.Connection
|
||||
#region Appearance
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 6),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameResolution"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionResolution"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameResolution"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionResolution"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool Resolution { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 6),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameAutomaticResize"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionAutomaticResize"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameAutomaticResize"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionAutomaticResize"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool AutomaticResize { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 6),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameColors"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionColors"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameColors"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionColors"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool Colors { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 6),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameCacheBitmaps"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionCacheBitmaps"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameCacheBitmaps"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionCacheBitmaps"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool CacheBitmaps { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 6),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameDisplayWallpaper"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionDisplayWallpaper"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameDisplayWallpaper"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionDisplayWallpaper"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool DisplayWallpaper { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 6),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameDisplayThemes"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionDisplayThemes"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameDisplayThemes"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionDisplayThemes"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool DisplayThemes { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 6),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameEnableFontSmoothing"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionEnableFontSmoothing"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameEnableFontSmoothing"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionEnableFontSmoothing"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool EnableFontSmoothing { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 6),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameEnableDesktopComposition"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute(
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameEnableDesktopComposition"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit(
|
||||
"strPropertyDescriptionEnableEnableDesktopComposition"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool EnableDesktopComposition { get; set; }
|
||||
@@ -246,151 +265,157 @@ namespace mRemoteNG.Connection
|
||||
#region Redirect
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 7),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameRedirectKeys"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionRedirectKeys"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRedirectKeys"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRedirectKeys"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool RedirectKeys { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 7),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameRedirectDrives"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionRedirectDrives"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRedirectDrives"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRedirectDrives"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool RedirectDiskDrives { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 7),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameRedirectPrinters"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionRedirectPrinters"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRedirectPrinters"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRedirectPrinters"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool RedirectPrinters { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 7),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameRedirectClipboard"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionRedirectClipboard"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRedirectClipboard"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRedirectClipboard"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool RedirectClipboard { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 7),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameRedirectPorts"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionRedirectPorts"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRedirectPorts"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRedirectPorts"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool RedirectPorts { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 7),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameRedirectSmartCards"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionRedirectSmartCards"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRedirectSmartCards"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRedirectSmartCards"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool RedirectSmartCards { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 7),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameRedirectSounds"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionRedirectSounds"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRedirectSounds"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRedirectSounds"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool RedirectSound { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 7),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameSoundQuality"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionSoundQuality"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameSoundQuality"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionSoundQuality"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool SoundQuality { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 7),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRedirectAudioCapture"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRedirectAudioCapture"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool RedirectAudioCapture { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Misc
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryMiscellaneous", 8),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameExternalToolBefore"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionExternalToolBefore"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameExternalToolBefore"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionExternalToolBefore"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool PreExtApp { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryMiscellaneous", 8),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameExternalToolAfter"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionExternalToolAfter"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameExternalToolAfter"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionExternalToolAfter"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool PostExtApp { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryMiscellaneous", 8),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameMACAddress"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionMACAddress"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameMACAddress"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionMACAddress"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool MacAddress { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryMiscellaneous", 8),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameUser1"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionUser1"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameUser1"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionUser1"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool UserField { get; set; }
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryMiscellaneous", 8),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameFavorite"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionFavorite"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameFavorite"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionFavorite"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
|
||||
public bool Favorite { get; set; }
|
||||
#endregion
|
||||
|
||||
#region VNC
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 9),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameCompression"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionCompression"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameCompression"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionCompression"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCCompression {get; set;}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 9),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameEncoding"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionEncoding"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameEncoding"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionEncoding"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCEncoding {get; set;}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryConnection", 9),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameAuthenticationMode"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionAuthenticationMode"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameAuthenticationMode"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionAuthenticationMode"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCAuthMode {get; set;}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProxy", 9),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameVNCProxyType"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionVNCProxyType"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameVNCProxyType"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionVNCProxyType"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCProxyType {get; set;}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProxy", 9),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameVNCProxyAddress"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionVNCProxyAddress"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameVNCProxyAddress"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionVNCProxyAddress"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCProxyIP {get; set;}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProxy", 9),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameVNCProxyPort"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionVNCProxyPort"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameVNCProxyPort"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionVNCProxyPort"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCProxyPort {get; set;}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProxy", 9),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameVNCProxyUsername"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionVNCProxyUsername"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameVNCProxyUsername"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionVNCProxyUsername"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCProxyUsername {get; set;}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryProxy", 9),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameVNCProxyPassword"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionVNCProxyPassword"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameVNCProxyPassword"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionVNCProxyPassword"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCProxyPassword {get; set;}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 9),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameColors"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionColors"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameColors"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionColors"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCColors {get; set;}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 9),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameSmartSizeMode"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionSmartSizeMode"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameSmartSizeMode"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionSmartSizeMode"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCSmartSizeMode {get; set;}
|
||||
|
||||
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 9),
|
||||
LocalizedAttributes.LocalizedDisplayNameInheritAttribute("strPropertyNameViewOnly"),
|
||||
LocalizedAttributes.LocalizedDescriptionInheritAttribute("strPropertyDescriptionViewOnly"),
|
||||
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameViewOnly"),
|
||||
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionViewOnly"),
|
||||
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCViewOnly {get; set;}
|
||||
#endregion
|
||||
|
||||
[Browsable(false)] public object Parent { get; set; }
|
||||
[Browsable(false)] public ConnectionInfo Parent { get; private set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
public ConnectionInfoInheritance(object parent, bool ignoreDefaultInheritance = false)
|
||||
public ConnectionInfoInheritance(ConnectionInfo parent, bool ignoreDefaultInheritance = false)
|
||||
{
|
||||
Parent = parent;
|
||||
if (!ignoreDefaultInheritance)
|
||||
@@ -398,9 +423,10 @@ namespace mRemoteNG.Connection
|
||||
}
|
||||
|
||||
|
||||
public ConnectionInfoInheritance Clone()
|
||||
public ConnectionInfoInheritance Clone(ConnectionInfo parent)
|
||||
{
|
||||
var newInheritance = (ConnectionInfoInheritance)MemberwiseClone();
|
||||
newInheritance.Parent = parent;
|
||||
newInheritance._tempInheritanceStorage = null;
|
||||
return newInheritance;
|
||||
}
|
||||
@@ -425,7 +451,7 @@ namespace mRemoteNG.Connection
|
||||
|
||||
private void StashInheritanceData()
|
||||
{
|
||||
_tempInheritanceStorage = Clone();
|
||||
_tempInheritanceStorage = Clone(Parent);
|
||||
}
|
||||
|
||||
public void TurnOnInheritanceCompletely()
|
||||
@@ -452,6 +478,19 @@ namespace mRemoteNG.Connection
|
||||
return filteredProperties;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of all properties where inheritance is turned on
|
||||
/// (set to True).
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public IEnumerable<string> GetEnabledInheritanceProperties()
|
||||
{
|
||||
return GetProperties()
|
||||
.Where(property => (bool)property.GetValue(this))
|
||||
.Select(property => property.Name)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
private bool FilterProperty(PropertyInfo propertyInfo)
|
||||
{
|
||||
var exclusions = new[] {"EverythingInherited", "Parent"};
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
using mRemoteNG.App;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.Container;
|
||||
using mRemoteNG.Messages;
|
||||
using mRemoteNG.UI.Forms;
|
||||
using mRemoteNG.UI.Panels;
|
||||
using mRemoteNG.UI.Window;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.UI.Tabs;
|
||||
using mRemoteNG.UI.Window;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
|
||||
|
||||
@@ -16,38 +16,14 @@ namespace mRemoteNG.Connection
|
||||
{
|
||||
public class ConnectionInitiator : IConnectionInitiator
|
||||
{
|
||||
private readonly PanelAdder _panelAdder = new PanelAdder();
|
||||
private readonly List<string> _activeConnections = new List<string>();
|
||||
private readonly ProtocolFactory _protocolFactory;
|
||||
private readonly List<ProtocolBase> _activeConnections = new List<ProtocolBase>();
|
||||
|
||||
public IEnumerable<string> ActiveConnections => _activeConnections;
|
||||
public IEnumerable<ProtocolBase> ActiveConnections => _activeConnections;
|
||||
|
||||
public void OpenConnection(ContainerInfo containerInfo, ConnectionInfo.Force force = ConnectionInfo.Force.None)
|
||||
public ConnectionInitiator(ProtocolFactory protocolFactory)
|
||||
{
|
||||
OpenConnection(containerInfo, force, null);
|
||||
}
|
||||
|
||||
public void OpenConnection(ConnectionInfo connectionInfo)
|
||||
{
|
||||
try
|
||||
{
|
||||
OpenConnection(connectionInfo, ConnectionInfo.Force.None);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionStackTrace(Language.strConnectionOpenFailed, ex);
|
||||
}
|
||||
}
|
||||
|
||||
public void OpenConnection(ConnectionInfo connectionInfo, ConnectionInfo.Force force)
|
||||
{
|
||||
try
|
||||
{
|
||||
OpenConnection(connectionInfo, force, null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionStackTrace(Language.strConnectionOpenFailed, ex);
|
||||
}
|
||||
_protocolFactory = protocolFactory;
|
||||
}
|
||||
|
||||
public bool SwitchToOpenConnection(ConnectionInfo connectionInfo)
|
||||
@@ -61,13 +37,17 @@ namespace mRemoteNG.Connection
|
||||
return true;
|
||||
}
|
||||
|
||||
#region Private
|
||||
|
||||
|
||||
private void OpenConnection(ContainerInfo containerInfo, ConnectionInfo.Force force, Form conForm)
|
||||
public void OpenConnection(
|
||||
ContainerInfo containerInfo,
|
||||
ConnectionInfo.Force force = ConnectionInfo.Force.None,
|
||||
ConnectionWindow conForm = null)
|
||||
{
|
||||
var children = containerInfo.Children;
|
||||
if (children.Count == 0) return;
|
||||
foreach (var child in children)
|
||||
if (containerInfo == null || containerInfo.Children.Count == 0)
|
||||
return;
|
||||
|
||||
foreach (var child in containerInfo.Children)
|
||||
{
|
||||
if (child is ContainerInfo childAsContainer)
|
||||
OpenConnection(childAsContainer, force, conForm);
|
||||
@@ -76,8 +56,14 @@ namespace mRemoteNG.Connection
|
||||
}
|
||||
}
|
||||
|
||||
private void OpenConnection(ConnectionInfo connectionInfo, ConnectionInfo.Force force, Form conForm)
|
||||
public void OpenConnection(
|
||||
ConnectionInfo connectionInfo,
|
||||
ConnectionInfo.Force force = ConnectionInfo.Force.None,
|
||||
ConnectionWindow conForm = null)
|
||||
{
|
||||
if (connectionInfo == null)
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
if (connectionInfo.Hostname == "" && connectionInfo.Protocol != ProtocolType.IntApp)
|
||||
@@ -95,8 +81,7 @@ namespace mRemoteNG.Connection
|
||||
return;
|
||||
}
|
||||
|
||||
var protocolFactory = new ProtocolFactory();
|
||||
var newProtocol = protocolFactory.CreateProtocol(connectionInfo);
|
||||
var newProtocol = _protocolFactory.CreateProtocol(connectionInfo);
|
||||
|
||||
var connectionPanel = SetConnectionPanel(connectionInfo, force);
|
||||
if (string.IsNullOrEmpty(connectionPanel)) return;
|
||||
@@ -114,6 +99,7 @@ namespace mRemoteNG.Connection
|
||||
return;
|
||||
}
|
||||
|
||||
OnConnectionStarting(newProtocol.InterfaceControl.Info, newProtocol);
|
||||
if (newProtocol.Connect() == false)
|
||||
{
|
||||
newProtocol.Close();
|
||||
@@ -121,7 +107,7 @@ namespace mRemoteNG.Connection
|
||||
}
|
||||
|
||||
connectionInfo.OpenConnections.Add(newProtocol);
|
||||
_activeConnections.Add(connectionInfo.ConstantID);
|
||||
_activeConnections.Add(newProtocol);
|
||||
FrmMain.Default.SelectedConnection = connectionInfo;
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -130,6 +116,7 @@ namespace mRemoteNG.Connection
|
||||
}
|
||||
}
|
||||
|
||||
#region Private
|
||||
private static void StartPreConnectionExternalApp(ConnectionInfo connectionInfo)
|
||||
{
|
||||
if (connectionInfo.PreExtApp == "") return;
|
||||
@@ -160,54 +147,35 @@ namespace mRemoteNG.Connection
|
||||
return null;
|
||||
}
|
||||
|
||||
private static string SetConnectionPanel(ConnectionInfo connectionInfo, ConnectionInfo.Force force)
|
||||
private string SetConnectionPanel(ConnectionInfo connectionInfo, ConnectionInfo.Force force)
|
||||
{
|
||||
string connectionPanel;
|
||||
if (connectionInfo.Panel == "" || force.HasFlag(ConnectionInfo.Force.OverridePanel) ||
|
||||
Settings.Default.AlwaysShowPanelSelectionDlg)
|
||||
{
|
||||
var frmPnl = new FrmChoosePanel();
|
||||
if (frmPnl.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
connectionPanel = frmPnl.Panel;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//Return the current panel if exist, if not return default panel
|
||||
if (TabHelper.Instance.CurrentPanel != null)
|
||||
{
|
||||
connectionPanel = TabHelper.Instance.CurrentPanel.TabText;
|
||||
}
|
||||
else
|
||||
{
|
||||
connectionPanel = connectionInfo.Panel;
|
||||
}
|
||||
}
|
||||
if (connectionInfo.Panel != "" &&
|
||||
!force.HasFlag(ConnectionInfo.Force.OverridePanel) &&
|
||||
!Settings.Default.AlwaysShowPanelSelectionDlg)
|
||||
return connectionInfo.Panel;
|
||||
|
||||
return connectionPanel;
|
||||
var frmPnl = new FrmChoosePanel(this);
|
||||
return frmPnl.ShowDialog() == DialogResult.OK
|
||||
? frmPnl.Panel
|
||||
: null;
|
||||
}
|
||||
|
||||
private Form SetConnectionForm(Form conForm, string connectionPanel)
|
||||
private ConnectionWindow SetConnectionForm(ConnectionWindow conForm, string connectionPanel)
|
||||
{
|
||||
var connectionForm = conForm ?? Runtime.WindowList.FromString(connectionPanel);
|
||||
var connectionForm = conForm ?? Runtime.WindowList.FromString(connectionPanel) as ConnectionWindow;
|
||||
|
||||
if (connectionForm == null)
|
||||
connectionForm = _panelAdder.AddPanel(connectionPanel);
|
||||
connectionForm = new PanelAdder(this).AddPanel(connectionPanel);
|
||||
else
|
||||
((ConnectionWindow)connectionForm).Show(FrmMain.Default.pnlDock);
|
||||
connectionForm.Show(FrmMain.Default.pnlDock);
|
||||
|
||||
connectionForm.Focus();
|
||||
return connectionForm;
|
||||
}
|
||||
|
||||
private static Control SetConnectionContainer(ConnectionInfo connectionInfo, Form connectionForm)
|
||||
private static Control SetConnectionContainer(ConnectionInfo connectionInfo, ConnectionWindow connectionForm)
|
||||
{
|
||||
Control connectionContainer = ((ConnectionWindow)connectionForm).AddConnectionTab(connectionInfo);
|
||||
Control connectionContainer = connectionForm.AddConnectionTab(connectionInfo);
|
||||
|
||||
if (connectionInfo.Protocol != ProtocolType.IntApp) return connectionContainer;
|
||||
|
||||
@@ -261,11 +229,11 @@ namespace mRemoteNG.Connection
|
||||
}
|
||||
|
||||
Runtime.MessageCollector.AddMessage(msgClass,
|
||||
string.Format(
|
||||
Language.strProtocolEventDisconnected,
|
||||
disconnectedMessage,
|
||||
prot.InterfaceControl.Info.Hostname,
|
||||
prot.InterfaceControl.Info.Protocol.ToString()));
|
||||
string.Format(
|
||||
Language.strProtocolEventDisconnected,
|
||||
disconnectedMessage,
|
||||
prot.InterfaceControl.Info.Hostname,
|
||||
prot.InterfaceControl.Info.Protocol.ToString()));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -294,8 +262,8 @@ namespace mRemoteNG.Connection
|
||||
prot.InterfaceControl.Info.Protocol,
|
||||
Environment.UserName));
|
||||
prot.InterfaceControl.Info.OpenConnections.Remove(prot);
|
||||
if (_activeConnections.Contains(prot.InterfaceControl.Info.ConstantID))
|
||||
_activeConnections.Remove(prot.InterfaceControl.Info.ConstantID);
|
||||
if (_activeConnections.Contains(prot))
|
||||
_activeConnections.Remove(prot);
|
||||
|
||||
if (prot.InterfaceControl.Info.PostExtApp == "") return;
|
||||
var extA = Runtime.ExternalToolsService.GetExtAppByName(prot.InterfaceControl.Info.PostExtApp);
|
||||
@@ -307,7 +275,7 @@ namespace mRemoteNG.Connection
|
||||
}
|
||||
}
|
||||
|
||||
private static void Prot_Event_Connected(object sender)
|
||||
private void Prot_Event_Connected(object sender)
|
||||
{
|
||||
var prot = (ProtocolBase)sender;
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, Language.strConnectionEventConnected,
|
||||
@@ -340,5 +308,11 @@ namespace mRemoteNG.Connection
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public event EventHandler<ConnectionStartingEvent> ConnectionStarting;
|
||||
protected virtual void OnConnectionStarting(ConnectionInfo connectionInfo, ProtocolBase protocolBase)
|
||||
{
|
||||
ConnectionStarting?.Invoke(this, new ConnectionStartingEvent(connectionInfo, protocolBase));
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user