Compare commits

...

975 Commits

Author SHA1 Message Date
David Sparer
6eff685b18 updated changelog 2016-12-01 15:40:04 -07:00
David Sparer
2d08146de8 updated changelog for 1.75beta3 2016-12-01 15:38:26 -07:00
Sean Kaim
f131420a44 Change from .exe to .msi
Fixes #289
2016-12-01 17:22:50 -05:00
David Sparer
245ea5463e updated the folder path resolution for the release folder to be a bit safer 2016-12-01 15:04:49 -07:00
David Sparer
71bb90a769 Set build date 2016-12-01 14:47:43 -07:00
David Sparer
e71a22fbb3 Added badge for CII progress https://bestpractices.coreinfrastructure.org/projects/529 2016-12-01 14:24:20 -07:00
Sean Kaim
802c4c28f5 smaller image 2016-12-01 15:51:59 -05:00
Sean Kaim
2cda6fc057 updated/added some links 2016-12-01 15:47:40 -05:00
Sean Kaim
a0303c70f9 Merge pull request #285 from mRemoteNG/284_md5_update_checks
284 md5 update checks
2016-11-30 15:32:37 -05:00
Sean Kaim
f5b9f58747 generate update files 2016-11-30 15:31:34 -05:00
Sean Kaim
0d8dee0ed7 use MD5 checksum for zip and msi releases
and some code cleanup
2016-11-30 14:50:55 -05:00
David Sparer
ace02263dd added a few links 2016-11-30 12:48:29 -07:00
David Sparer
a2398bfb3a Merge pull request #189 from mRemoteNG/update_contribution_guide
Update CONTRIBUTING.md
2016-11-30 12:22:44 -07:00
David Sparer
cd7ddb5ba1 minor typo fixes 2016-11-30 12:08:48 -07:00
Sean Kaim
ae37a4c85d some additions
- added short code style section
- added "ready" and "Documentation" label notes
- made note of Static Code Analysis tools for PRs
2016-11-30 13:49:34 -05:00
Sean Kaim
32e1716061 Merge remote-tracking branch 'refs/remotes/origin/develop' into update_contribution_guide 2016-11-30 13:32:27 -05:00
David Sparer
d92616f39f Merge pull request #282 from mRemoteNG/280_connections_file_corrupted_when_cancelling_password_prompt
Connections file corrupted when cancelling password prompt
2016-11-30 10:28:50 -07:00
David Sparer
0c13db46fd save not performed when connections file is not loaded 2016-11-30 10:20:26 -07:00
David Sparer
b6fc9a8ec1 Updated credits and changelog for PR #275 2016-11-29 11:51:11 -07:00
David Sparer
a672141352 Merge pull request #275 from ForensicITGuy/develop
Addition of HTML code for SSH File Transfer help page
2016-11-29 11:46:53 -07:00
David Sparer
df354e483a Merge pull request #279 from mRemoteNG/278_silent_installs_not_detecting_prerequisites
Resolves #278
2016-11-29 11:16:00 -07:00
David Sparer
89874545b1 updated changelog 2016-11-29 11:12:45 -07:00
David Sparer
b0fdd09f39 added prereq checks to non-gui executions 2016-11-29 11:11:31 -07:00
David Sparer
fbf620ae36 Merge pull request #277 from mRemoteNG/271_make_installer_aware_of_previous_install_path
make installer aware of previous install path. Resolves #277
2016-11-29 11:00:42 -07:00
David Sparer
509f7da12e installer now saves and loads the previous install location in the registry 2016-11-29 10:37:54 -07:00
David Sparer
64a40e4ed0 renamed the property used for the fully install path from APPLICATIONROOTDIRECTORY to INSTALLDIR to make it easier to type at the cmdline 2016-11-29 09:21:22 -07:00
David Sparer
ab253dbf28 Merge pull request #273 from mRemoteNG/add_turkish_translation
Add Turkish translation provided by forum user rizaemet
2016-11-29 08:18:56 -07:00
David Sparer
feb19df20f minor update to credits 2016-11-29 08:15:15 -07:00
ForensicITGuy
d5d2241f1b Fixed Indentation and added Troubleshooting Info 2016-11-29 00:03:48 -06:00
ForensicITGuy
5af1a0aa87 Fixed Indentation 2016-11-28 23:55:44 -06:00
ForensicITGuy
816621651d Added help HTML code for SSH File Transfer 2016-11-28 23:03:23 -06:00
David Sparer
8f2aa08dbe Updated changelog and credits 2016-11-28 13:15:09 -07:00
David Sparer
d20e1a6e9c added Turkish translation provided by forum user rizaemet 2016-11-28 13:01:31 -07:00
Sean Kaim
2a5a4c9ace code clean up 2016-11-22 17:14:27 -05:00
Sean Kaim
2e7fd3fb60 code clean up 2016-11-22 16:54:06 -05:00
David Sparer
56579100f1 Merge pull request #265 from mRemoteNG/254_component_check_issues
Resolves #254
2016-11-22 08:04:37 -07:00
David Sparer
1e5cd24acd update changelog 2016-11-22 08:03:11 -07:00
David Sparer
7f152cef20 Merge branch 'develop' into 254_component_check_issues 2016-11-22 07:57:32 -07:00
David Sparer
3958d2d597 update changelog 2016-11-21 12:15:16 -07:00
David Sparer
84a3b31e8d Merge pull request #263 from mRemoteNG/260_unable_to_decrypt_confCons_v2_5_fullencryption
Resolves #260
2016-11-21 10:06:15 -07:00
David Sparer
cc15c12d19 Resolved bug with deserializing confCons v2.5 custom password full encryption files 2016-11-21 10:01:34 -07:00
David Sparer
50e7b89b15 Added test for deserializing confCons v2.5 custom password full encryption files 2016-11-21 10:00:55 -07:00
David Sparer
0b507cb66a Fixed bug where custom decryption passwords would require 2 password prompts to decrypt 2016-11-21 09:59:46 -07:00
David Sparer
b1c697ea09 ensured that the rootnodeinfo is not null during decryption 2016-11-21 09:25:43 -07:00
David Sparer
dbcf15e45b Created test to ensure deserializing confCons v2.5 w/ full encryption works 2016-11-21 09:05:35 -07:00
David Sparer
21d864ce7a Merge pull request #262 from mRemoteNG/261_double_click_expands_tree_node_folder
Re-add double click support for toggling tree node expansion. Resolves #261
2016-11-21 08:47:02 -07:00
David Sparer
dcf1f1af10 Added double click support for toggling tree node expansion. (existed in previous version - this was a feature regression) 2016-11-21 08:44:55 -07:00
David Sparer
9c25a39b7b split ICA object initialization from setting Parent property. this had created an appearance bug. connected to #254 2016-11-21 08:23:33 -07:00
David Sparer
d79687db53 Added some extra debugging messages. will remove once done investigating 2016-11-18 11:52:23 -07:00
David Sparer
77428e0fe5 minor cleanup 2016-11-18 09:48:21 -07:00
David Sparer
53df3b5cfa moved the Rdp and Vnc component check using directives into the try blocks. connected to #254 2016-11-18 08:15:24 -07:00
David Sparer
f2e1c9e959 moved the using directive of the ICA check into the try block. this seems to resolve #254 2016-11-17 15:16:45 -07:00
David Sparer
a004b2f3e0 split component checks to separate functions to make them a bit easier to digest mentally 2016-11-17 14:50:54 -07:00
Sean Kaim
65b4398b0e code clean up 2016-11-17 15:06:58 -05:00
Sean Kaim
0b83d2869d code clean up - use "using"
Attempt to help #254
2016-11-17 15:01:49 -05:00
Sean Kaim
1a408b810c use var everywhere in Logger
For #253
2016-11-17 14:38:51 -05:00
David Sparer
bab5879c3d Component check now tests for the correct RDP version. 2016-11-17 08:29:33 -07:00
David Sparer
6f79954989 re-added a few more missing menu icons 2016-11-16 15:07:43 -07:00
David Sparer
8d4622dc31 re-add Options menu icon 2016-11-16 15:00:39 -07:00
David Sparer
fecdc48b09 Merge branch 'trying_to_fix_the_main_menu_position' into develop 2016-11-16 14:35:29 -07:00
David Sparer
0edb51a32a set safe default positions for the quick connect and external tools menu items 2016-11-16 14:27:02 -07:00
David Sparer
750bd2f61b another attempt to fix the main menu default location 2016-11-16 13:29:56 -07:00
Sean Kaim
f6fa9821f0 Add PayPal badge to the readme 2016-11-15 14:50:08 -05:00
Sean Kaim
3ed06dafb0 suppress complier warning MSB3305
Processing COM reference "" from path "". At least one of the arguments
for '' cannot be marshaled by the runtime marshaler.  Such arguments
will therefore be passed as a pointer and may require unsafe code to
manipulate.
2016-11-15 14:17:17 -05:00
Sean Kaim
4be6a5b5a9 ReSharper - code clean up 2016-11-15 14:08:55 -05:00
Sean Kaim
a4c77ce33e Fix complier error CA2213 2016-11-15 14:02:06 -05:00
Sean Kaim
f6babd01ca Fix complier warning 2016-11-15 14:00:22 -05:00
Sean Kaim
17ce9a0903 Remove unused / unreferenced UI element 2016-11-15 13:43:57 -05:00
David Sparer
824b4681e4 Merge pull request #248 from mRemoteNG/247_inheritance_not_applied_correctly
Resolves #247
2016-11-15 10:20:34 -07:00
David Sparer
7ba7e0b2d8 resolved the issue with inheritance not being applied correctly for folders. created a few tests to help guard against this from happening again. 2016-11-15 10:15:49 -07:00
David Sparer
0391eabc79 fixed some test files 2016-11-15 10:14:35 -07:00
Sean Kaim
e2ebf6b8fe code clean up 2016-11-15 12:05:50 -05:00
Sean Kaim
58d3d678ca code clean up 2016-11-15 11:41:50 -05:00
David Sparer
b52b68595b set changelog version and date 2016-11-15 08:32:14 -07:00
Sean Kaim
0a8d606686 About: line some things up a little better 2016-11-15 09:45:09 -05:00
Sean Kaim
d1ef9f3e99 Fix build errors 2016-11-11 17:31:26 -05:00
Sean Kaim
5a830c17db ReShaper Cleanup 2016-11-11 17:24:02 -05:00
Sean Kaim
10c4a4d665 CA1034: Nested types should not be visible
https://msdn.microsoft.com/library/ms182162.aspx
2016-11-11 16:43:46 -05:00
Sean Kaim
e93e7f05c6 CA1031: Do not catch general exception types
https://msdn.microsoft.com/library/ms182137.aspx
2016-11-11 16:40:59 -05:00
Sean Kaim
e2c6240798 Fix Release build failure 2016-11-11 16:35:14 -05:00
Sean Kaim
24ad483214 Fix other complier warnings & code clean up 2016-11-11 16:30:22 -05:00
Sean Kaim
bfa53224a6 CA1060: Move to NativeMethods class
https://msdn.microsoft.com/en-us/library/ms182161.aspx
2016-11-11 16:29:57 -05:00
Sean Kaim
00ec25d38c Fix compilier warning: CA2202 & refactor
https://msdn.microsoft.com/en-us/library/ms182334.aspx
2016-11-11 16:25:47 -05:00
Sean Kaim
348fc156de Commented out Unused variable 2016-11-11 16:21:46 -05:00
Sean Kaim
1a9cb5335a adjust changelog display in about form 2016-11-11 14:36:08 -05:00
Sean Kaim
0abfab96a4 changelog and credits update 2016-11-11 12:24:47 -05:00
Sean Kaim
bbfbbbf91e make sub OU import optional 2016-11-10 17:53:32 -05:00
David Sparer
8db0150c4a Merge pull request #241 from mRemoteNG/240_Config_window_buttons_sometimes_deactivate
resolves #240
2016-11-10 11:00:29 -07:00
David Sparer
3d7db6136f resolved the issue of config window buttons being deactivated in some cases. the config window was incorrectly tracking the selected tree node. 2016-11-10 10:57:03 -07:00
David Sparer
ace6c1167b bit more cleanup 2016-11-10 10:20:48 -07:00
David Sparer
4644dfbd7b initial resharper cleanup 2016-11-10 10:00:39 -07:00
Sean Kaim
1bf6dc37d9 Merge pull request #234 from mRemoteNG/211_AD_Sub_OU_Import
Fixes #211
2016-11-09 14:54:17 -05:00
Sean Kaim
97a0e2413e Fixed MR-220
Don't close the AD importer after import
Add Close button (for when you're done with the importer)
2016-11-09 14:20:01 -05:00
Sean Kaim
c5f199bdf8 recurively import OU, Sub-OU and servers 2016-11-08 17:31:50 -05:00
Sean Kaim
11256e6988 code clean up 2016-11-07 16:05:36 -05:00
Sean Kaim
32240ee475 Allow the update options page for portable versions 2016-11-07 14:22:42 -05:00
Sean Kaim
77a1c2cfb8 code clean up
convert if else -> switch
use ?: where possible
use "var"
"return ;" - why??? Also, why does that space annoy me so much?
😕
2016-11-07 12:23:04 -05:00
Sean Kaim
0f6d7ce2a4 Merge pull request #224 from mRemoteNG/160_portable_update_check
160 portable update check
2016-11-06 17:12:55 -05:00
Sean Kaim
e8738adc40 correct file name 2016-11-06 17:05:49 -05:00
Sean Kaim
bca02edead fix a boo-boo 2016-11-06 16:59:41 -05:00
Sean Kaim
abf81ac26b Download portable zip
* code clean up
* Compare MD5 hash
* Display changelog properly direct from GH
2016-11-06 16:56:59 -05:00
Sean Kaim
011d2f83f6 clean up update code 2016-11-06 15:19:13 -05:00
Sean Kaim
1a80c5273c Use same exact format as installer version 2016-11-06 15:04:48 -05:00
Sean Kaim
cf8f31168e upgrade check file hash creation 2016-11-06 15:03:27 -05:00
Sean Kaim
e25d7ca995 Here are the basics for portable update checks... 2016-11-03 17:43:53 -04:00
David Sparer
51fa8994c3 Resaved test file with KdfIterations=5000 2016-11-02 16:04:05 -06:00
David Sparer
78852b7119 Added a test to ensure we can serialize then deserialize with custom kdf values 2016-11-02 15:59:53 -06:00
David Sparer
193bb0bf26 The xml decryptor wasn't passing the kdfiterations value to the cryptoprovider. It was being essentially hard-coded in... whoops
Added a new test to ensure we can serialize then deserialize with a custom kdf value
2016-11-02 15:59:25 -06:00
Sean Kaim
d862462bbf Fix build failures (tests)
I don't want to risk breaking any existing SQL implementations at this
point by updating the schema... Especially since I don't have the time
to test it properly.
2016-11-02 17:05:44 -04:00
Sean Kaim
dcecd30e7c Fix build failure (tests) 2016-11-02 17:00:37 -04:00
Sean Kaim
a01ef3bb08 Change update URL
Fixes #162
2016-11-02 16:35:03 -04:00
Sean Kaim
60cd2c2b12 RDP audioqualitymode option
fixes #172
2016-11-02 15:49:45 -04:00
Sean Kaim
daad1cac5e Fixed problem saving confCons.xml
Intoduced in commit 9a32aa3350

Removed "_saveUpdate" bool and related checks since it's not used
anywhere else. It was meaningless code (that caused a problem when
ReShaper "cleaned" it up).
2016-11-02 15:30:11 -04:00
Sean Kaim
c6b89425b1 FilteredPropertyGrid code cleanup 2016-11-02 14:10:50 -04:00
David Sparer
70408ca8ee Finalized the first draft and removed the template lines 2016-10-31 15:54:42 -06:00
David Sparer
eeb2f0ad60 Merge pull request #209 from mRemoteNG/Fix_password_support_for_international_chars
Investigate password support for international chars
2016-10-28 08:49:10 -06:00
David Sparer
314e5bc364 minor cleanup 2016-10-25 11:40:43 -06:00
David Sparer
a294bfde11 Added test to ensure that strings with international characters are serialized and deserialized correctly 2016-10-25 11:40:01 -06:00
David Sparer
baa496fc07 Merge pull request #199 from mRemoteNG/Make_XmlSerializer_class_testable
The XmlConnectionsSerializer class was broken into smaller classes that better adhere to SRP.

Closes #180
2016-10-25 11:17:07 -06:00
David Sparer
4ca29d5d2e Removed an unused variable in Runtime 2016-10-25 11:13:43 -06:00
David Sparer
5e7074a297 Fixed minor bug when turning off custom password encryption 2016-10-25 11:10:52 -06:00
David Sparer
fd6268ce8a Updated the deserializer / decryptor to look at the rootnodeinfo for decryption key rather than static Runtime. There was some state leaking that caused unit tests to fail intermittently 2016-10-25 10:59:43 -06:00
David Sparer
806da552ce Added a test for serializing a single connection node 2016-10-25 09:34:03 -06:00
David Sparer
47561340e3 minor cleanup 2016-10-25 09:33:34 -06:00
David Sparer
b374952141 Renamed the ConnectionsDecryptor to XmlConnectionsDecryptor and moved it into the Serializers namespace 2016-10-25 08:53:07 -06:00
David Sparer
e098970d82 Added some tests to ensure that the xml serializer produces output that the deserializer can handle. 2016-10-25 08:25:57 -06:00
David Sparer
6ca5f5e877 minor cleanup 2016-10-25 08:14:49 -06:00
David Sparer
6b023c5fb6 Simplified the xml serializer by chunking it into appropriate classes 2016-10-24 15:40:28 -06:00
David Sparer
bd30103758 Fixed bug where we were not using the correct encryption key during serialization 2016-10-24 15:39:50 -06:00
David Sparer
e9ead72e79 Added logic to the XmlConnectionsDocumentCompiler to respect the FullFileEncryption flag 2016-10-24 14:54:08 -06:00
David Sparer
513edc58ab Created XmlConnectionsDocumentEncryptor to handle encrypting the entire connections xml file 2016-10-24 14:51:48 -06:00
David Sparer
fd7e7bd439 Created a class to handle compiling the structure of the xml document (child/parent relationships) 2016-10-24 13:12:39 -06:00
David Sparer
f510f20f57 Created an xml serializer specifically for dealing with the root connections node 2016-10-24 11:47:35 -06:00
David Sparer
a0a92b9b40 RootNodeInfo.PasswordString will now return either a custom password (if one is set) otherwise the default password 2016-10-24 11:24:35 -06:00
David Sparer
ba878c7587 Moved some of the responsibility of the default encryption password into the RootNodeInfo class. This simplifies serialization a bit, though may not be the best place for storing encryption passwords 2016-10-24 10:51:59 -06:00
David Sparer
f1f76a4910 XmlConnectionNodeSerializer now respects save filter settings for serializing inheritance 2016-10-24 09:04:51 -06:00
David Sparer
3ea4bc29ba Began splitting individual xml element serialization from serializing the structure of the document. Created unit tests to ensure the attributes are serialized correctly 2016-10-21 12:47:20 -06:00
David Sparer
82848aa4cd Added a section on pull requests 2016-10-20 15:29:58 -06:00
David Sparer
5131604ba7 Added drafts for submitting bugs and feature requests 2016-10-20 12:33:23 -06:00
David Sparer
1be821b07a added rough draft of the contribution intro 2016-10-20 11:30:49 -06:00
David Sparer
1ed475d469 Test for confversion serialized 2016-10-19 18:03:45 -06:00
David Sparer
e11413eab8 The XmlConnectionsSerializer now looks to its crypto provider for the value of KdfIterations. This insulates the function from global state (Settings) 2016-10-19 18:00:14 -06:00
David Sparer
98db923ac7 Added get/set property KeyDerivationIterations to the ICryptographyProvider interface 2016-10-19 17:54:45 -06:00
David Sparer
7376ff1c9b XmlSerializer now requires a cryptoprovider be given to the ctor. Reduces reliance on global state (Settings) 2016-10-19 17:43:02 -06:00
David Sparer
d427e3e0ae Fixed CryptoFactory tests 2016-10-19 17:26:18 -06:00
David Sparer
550119a53a Modified the ICryptographyProvider interface to require getters for the cipher engine and mode using their enum types 2016-10-19 17:17:28 -06:00
David Sparer
2df182c4c9 disable resharper name checking for a few enums 2016-10-19 16:56:38 -06:00
David Sparer
2b9b872ad4 Added test 2016-10-19 15:28:44 -06:00
Sean Kaim
94853714c7 code clean up / fix complier warning 2016-10-18 17:31:09 -04:00
David Sparer
01529a8028 Began creating tests for the XmlConnectionsSerializer 2016-10-18 15:27:59 -06:00
David Sparer
71d348227e Merge branch 'Remove_unused_code' into develop 2016-10-18 14:56:40 -06:00
Sean Kaim
76f585a051 code clean up 2016-10-18 16:48:32 -04:00
David Sparer
f1085716d9 Removed references to the My namespace 2016-10-18 13:58:55 -06:00
David Sparer
93bb620099 Remove the defunct My.Settings file 2016-10-18 13:49:54 -06:00
David Sparer
ded0bd7d12 Merge pull request #179 from mRemoteNG/Create_more_tests
Createed more tests
2016-10-18 13:46:24 -06:00
Sean Kaim
088f646d6f updater code clean up 2016-10-18 11:01:52 -04:00
David Sparer
e6a00f7935 Merge branch 'develop' into Create_more_tests
# Conflicts:
#	mRemoteNGTests/mRemoteNGTests.csproj
2016-10-18 08:55:28 -06:00
Sean Kaim
e5d625f294 code clean up 2016-10-17 21:25:04 -04:00
Sean Kaim
6e3bfcdf04 Remove unused code 2016-10-17 20:52:36 -04:00
David Sparer
10bd19e390 The Tools.EnvironmentInfo class didn't need to exist. Replace a single call to it with Environment.Is64BitProcess 2016-10-17 15:33:07 -06:00
David Sparer
9a1cb822d1 Created tests for the NodeSearcher 2016-10-17 13:14:29 -06:00
David Sparer
8ad5f3426c Removed the Impersonator class. This was only ever used for the Sessions feature which was removed in v1.74 2016-10-17 12:34:14 -06:00
David Sparer
2070a98a72 Minor cleanup 2016-10-17 12:32:33 -06:00
David Sparer
b97410dab7 Removed unused/unnecessary code 2016-10-17 12:25:07 -06:00
David Sparer
d47bc021a5 Added a test for GetDefaultPort 2016-10-17 12:04:38 -06:00
David Sparer
0b2dfecf27 Created more containerinfo tests 2016-10-17 11:45:59 -06:00
David Sparer
46ea97333e Added more tests for the containerinfo 2016-10-17 11:19:27 -06:00
David Sparer
598a9f6a0f Added a few more tests for the LegacyRijndaelCryptographyProvider 2016-10-17 10:31:36 -06:00
Sean Kaim
ef7d92d6bd code clean up 2016-10-17 12:29:05 -04:00
David Sparer
da4fe41f34 Added extra test to cover setting the authenticator max attempts 2016-10-17 09:24:40 -06:00
David Sparer
91fe4050b2 Modified several tests that were failing on some machines due to differing environment variables. Tests are now more resilient 2016-10-14 13:09:35 -06:00
David Sparer
23da6cf69e Removed unused test 2016-10-14 09:57:03 -06:00
David Sparer
51883b450f Adding various other graphics/assets provided by Riley during the turnover 2016-10-14 08:56:49 -06:00
David Sparer
cbdf02db55 Merge pull request #174 from mRemoteNG/Make_UI_more_responsive_during_save/load
Resolves #166
2016-10-14 08:52:25 -06:00
David Sparer
196096cd65 Made a few Save calls async. These probably were async before and were accidentally changed. 2016-10-14 08:19:31 -06:00
David Sparer
476ac38883 Merge pull request #173 from mRemoteNG/Reduce_duplicate_password_serialization
Reduce duplicate password serialization
2016-10-14 08:15:33 -06:00
David Sparer
90fea916fd Passwords will now only be serialized if the SaveFilter allows them to be, and if the connection/container does NOT inherit the password. 2016-10-14 08:07:30 -06:00
David Sparer
6fccd203a4 Merge pull request #171 from mRemoteNG/Make_key_derivation_iterations_a_user_option
Make key derivation iterations a user option
2016-10-13 18:44:57 -06:00
David Sparer
f2f0ee0179 Key derivation iterations is now saved in the settings (for serialization) and the confCons file (for deserialization) 2016-10-13 18:43:46 -06:00
David Sparer
1f9218bd5a Added tests for the key generator 2016-10-13 18:01:36 -06:00
David Sparer
966f7b2d61 Decryption now uses the new key derivation class 2016-10-13 17:28:25 -06:00
David Sparer
58c4b541b0 Little cleanup on decryption. Now uses the new key derivation class 2016-10-13 17:23:55 -06:00
David Sparer
f6c490fc62 Created a key derivation interface and initial Pkcs5 implementation 2016-10-13 17:17:34 -06:00
David Sparer
be59392814 Merge pull request #170 from mRemoteNG/Decryption_failing_with_custom_password
More work needs to be done to cleanup the related classes and reduce coupling, though this PR is starting to get a bit large for what the original intent was. Of particular issue are the calls to Runtime.EncryptionKey. The current implementation makes it very easy to use the wrong encryption key. Resolves #168
2016-10-13 15:59:13 -06:00
David Sparer
d0e21d7d8a Added tests for all current versions and significant variations of confCons. More changes to the deserialization classes were required to make them more testable. Still needs significant work to be considered good code 2016-10-13 15:49:49 -06:00
David Sparer
737373940e PasswordAuthenticator will only attempt reauthentication up to MaxAttempts 2016-10-13 15:46:17 -06:00
David Sparer
c639b89511 Added a custom EncryptionException type that inherits from the BouncyCastle type. This gives us a bit of namespace insulation (we shouldn't reference BouncyCastle outside of the mRemoteNG.Security namespace). 2016-10-13 12:43:47 -06:00
David Sparer
c530b3f8b4 Fixed bug where we could not turn custom password encryption off 2016-10-13 12:25:45 -06:00
David Sparer
1592a448f3 Simplified the authentication code when deserializing xml 2016-10-13 12:00:49 -06:00
David Sparer
c5ab2b1373 Changed the AeadCryptographyProvider to use the localized error message when decryption fails 2016-10-13 11:52:57 -06:00
David Sparer
f14f2cb5b7 Modified the LegacyRijndaelCryptographyProvider to throw errors when decryption fails. This is more in line with the other crypto providers 2016-10-13 11:51:24 -06:00
David Sparer
9c2945d270 Forgot to commit one changed line 2016-10-13 11:48:31 -06:00
David Sparer
05357c24f6 Removed unnecessary resource file from tests and made it a string constant instead (it was a small amount of text) 2016-10-13 11:47:15 -06:00
David Sparer
75839f330c Created test to ensure decryption failures throw an exception in AeadCryptographyProvider 2016-10-13 11:33:03 -06:00
David Sparer
ba0a9bbe58 moved the IAuthenticator into the Security.Authentication namespace 2016-10-13 10:32:23 -06:00
David Sparer
fb082471fe Created a new interface & class for authenticating passwords. This will replace the ConnectionsDecryptor class 2016-10-13 10:23:08 -06:00
David Sparer
f8968f2eb1 Resolved issue with the password prompt box not appearing when trying to decrypt with custom password. Class needs to be cleaned up. 2016-10-13 09:13:02 -06:00
David Sparer
990605948b Changed the exception when decryption fails from the generic "Exception" type to the more specific "EncryptionException" type to make catching easier. 2016-10-13 09:10:47 -06:00
David Sparer
21c96281a8 Resolved issue where encrypted values were not being decrypted correctly. (it was using the wrong decryption provider) 2016-10-13 09:09:47 -06:00
Sean Kaim
1ad7fce7a5 update nugets / fix access denied on post build 2016-10-12 17:12:05 -04:00
David Sparer
76162953e6 Resolved build failure 2016-10-12 14:23:59 -06:00
Sean Kaim
b934e29dc0 Merge pull request #167 from mRemoteNG/137_Update_Check
137 update check
2016-10-12 15:52:13 -04:00
Sean Kaim
93c128438c Merge changes from devlop into 137_Update_Check
Fixed conflicts in mRemoteV1/UI/Forms/frmOptions.cs
2016-10-12 15:48:17 -04:00
Sean Kaim
c283ddbb6a remove announcement info and cleanup 2016-10-12 15:39:44 -04:00
David Sparer
e3085a7054 Export file selection dialog box now selects file type filter based on Export form selection 2016-10-12 12:27:23 -06:00
David Sparer
4aa9a6e7a3 Changed the mRemoteNG csv exporter to not use the non-existant TreeNode for serializing its location in the tree. Resolves #165 2016-10-12 12:09:28 -06:00
David Sparer
76b0057deb Merge pull request #164 from mRemoteNG/Remove_RemoteDesktop2008_export_option
Closes #144
2016-10-12 11:36:22 -06:00
David Sparer
5d964f7638 Removed the visionapp Remote Desktop 2008 export option and all related code 2016-10-12 11:30:31 -06:00
David Sparer
81610dee0e Merge pull request #158 from mRemoteNG/Implement_new_cryptography_providers
Implement new crypto providers
2016-10-12 10:05:53 -06:00
David Sparer
f64c0ae266 Code cleanup 2016-10-12 10:00:31 -06:00
David Sparer
324992f6ff Fixed a variable that should have been renamed 2016-10-12 09:58:50 -06:00
David Sparer
c35ce9ffe1 Renamed source file to match class name 2016-10-12 09:53:05 -06:00
David Sparer
a13a6d3919 Renamed the SaveFilter properties to include the prefix "Save" 2016-10-12 09:51:08 -06:00
David Sparer
ac01c6fff2 Renamed the Save class to SaveFilter to better indicate its purpose 2016-10-12 09:49:33 -06:00
David Sparer
53074c7b20 Simplified the Save class 2016-10-12 09:45:38 -06:00
David Sparer
1d4ef9474f Added tests of all BlockCipherEngine and BlockCipherMode combinations to ensure encryption/decryption is working. 2016-10-12 09:33:18 -06:00
David Sparer
59e948fa06 Renamed function to better show its purpose 2016-10-12 09:06:18 -06:00
David Sparer
55fe30b02c Resolved bug when unable to decrypt the confCons file. The app will now exit without attempting to save the cons file (avoiding data corruption issues) 2016-10-12 09:00:28 -06:00
David Sparer
e2929f43a3 Code cleanup of GeneralAppInfo (mostly just renames) 2016-10-12 08:19:37 -06:00
David Sparer
9d67f58490 Replaced all calls to GeneralAppInfo.EncryptionKey to Runtime.EncryptionKey 2016-10-12 08:16:05 -06:00
David Sparer
a862240ed7 Code cleanup 2016-10-12 08:09:28 -06:00
David Sparer
0f604f453d Code cleanup 2016-10-12 07:38:47 -06:00
David Sparer
113e9eba79 Deserialization now works for full file encryption 2016-10-11 20:02:54 -06:00
David Sparer
9af610a45b Rewrote the full file encryption code for the xml serializer. It now conforms to the expected placement of encrypted data 2016-10-11 16:09:42 -06:00
Sean Kaim
e8db5d267e display proper options page on customize
and code clean up
2016-10-11 17:41:11 -04:00
David Sparer
201fbb71c1 Xml deserializer is working for the new confcons schema to detect and use variable encryption methods. Full file decryption does not currently function. 2016-10-10 20:08:01 -06:00
David Sparer
2f87e55ae6 Incremented confcons file serialization version 2016-10-10 19:42:22 -06:00
David Sparer
34af797ad2 Modified xml serializer to use the new confcons schema 2016-10-10 19:41:14 -06:00
David Sparer
4ca640eee5 Made modifications to the confcons v2.6 schema. Eliminated the EncryptionInfo node. Its attributes are now owned by Connections node. 2016-10-10 19:31:22 -06:00
David Sparer
29d1bf7ce5 Updated the max supported confcons version to 2.6 2016-10-10 15:24:36 -06:00
David Sparer
c2f9c687ce Added an attribute to the Xml element "EncryptionInfo" to indicate whether we should expect full file encryption 2016-10-10 15:21:45 -06:00
David Sparer
a8da64cc6a Removed old code for serializing the complete xml file 2016-10-10 15:20:51 -06:00
David Sparer
d522258e0a Made the nonce size a bit smaller for CCM mode to avoid some issues with large nonces 2016-10-10 15:08:10 -06:00
Sean Kaim
5f738f97ea Remove more announcement stuff 2016-10-10 16:53:38 -04:00
Sean Kaim
db319825a1 fix update file parsing 2016-10-10 16:52:33 -04:00
David Sparer
cbb9ceb709 XmlSerialization now saves the new EncryptionInfo element 2016-10-10 14:50:37 -06:00
David Sparer
333ee232ae Fixed a small issue with the CCM mode nonce size 2016-10-10 14:48:32 -06:00
David Sparer
963b483697 null access checks 2016-10-10 14:06:43 -06:00
David Sparer
49425a37ac Added attribute to schema 2016-10-10 14:06:02 -06:00
Sean Kaim
0da975a9d3 fix build error & cleanup 2016-10-10 15:31:55 -04:00
Sean Kaim
1ea0522fcb MR-364 - remove announcements
And some code clean up
2016-10-10 15:23:55 -04:00
David Sparer
aaaa0e6aea Little simplification of the v2.6 schema 2016-10-10 11:39:13 -06:00
David Sparer
42368f05f8 Xml serializer now respects encryption settings 2016-10-10 11:26:54 -06:00
David Sparer
4e51a5db73 Created an updated confCons schema which saves encryption details 2016-10-10 11:22:24 -06:00
David Sparer
4bd5a3675f Minor security page layout change 2016-10-10 09:59:45 -06:00
David Sparer
a4d3850f13 Changed the localized text "Block Cipher" to "Block Cipher Mode" 2016-10-10 09:56:51 -06:00
David Sparer
864d370994 Simplified some code 2016-10-10 09:53:24 -06:00
David Sparer
47f0550cea Security settings now save. Simplified data binding to the encryption dropdowns 2016-10-10 09:34:00 -06:00
David Sparer
1bbc2b0165 Resolved issue with de/serializing encrypting settings 2016-10-10 09:19:33 -06:00
David Sparer
fc8a1ec4fc Renamed the EncryptionBlockCipher setting to EncryptionBlockCipherMode 2016-10-10 09:13:06 -06:00
David Sparer
4baabd7d07 Moved the confcons schema to a new folder 2016-10-10 08:19:53 -06:00
David Sparer
92ba170cdf Added schema attributes for the root Connections node and added sequence indicator for connectioninfo nodes. Schema appears to be complete 2016-10-10 08:12:34 -06:00
David Sparer
e842850695 #157 Began creating xml schema file for the current confCons file since we will need to change the schema to include the current encryption parameters 2016-10-09 09:23:32 -06:00
Sean Kaim
41fcbb2989 enable update check 2016-10-07 17:50:22 -04:00
Sean Kaim
d6a6cf6a59 code clean up & remove ugly colors (go to control) 2016-10-07 17:49:49 -04:00
David Sparer
113c8f6d4a Combo boxes now set their selected item on creation based off of the user settings 2016-10-07 13:03:17 -06:00
David Sparer
8218acddca Created dropdowns for choosing the encryption engine and the block cipher 2016-10-07 12:44:11 -06:00
David Sparer
7cb65df19e Rearranged the Advanced page after removing an option 2016-10-07 12:25:30 -06:00
David Sparer
91ba993279 Moved the option to completely encrypt the connections file from the Advanced page to the Security page 2016-10-07 12:23:53 -06:00
David Sparer
505f3dd947 Began creating the Security options page 2016-10-07 12:17:59 -06:00
David Sparer
7eca66e2c4 Added shield icon for the new security options page 2016-10-07 12:13:26 -06:00
David Sparer
3111c5437b Merge pull request #156 from mRemoteNG/Installer_does_not_respect_KB2923545_to_fulfill_RDP8_requirement
Installer now respects KB2923545 to fulfill RDP8 requirement. This closes #151
2016-10-07 11:19:59 -06:00
David Sparer
d32a1adead Installer now accepts either the RDP8 or RDP8.1 KB 2016-10-07 11:18:09 -06:00
David Sparer
9c5a2c0196 Added more efficient support for checking if atleast one of a number of KBs are installed. 2016-10-07 10:26:21 -06:00
David Sparer
19a76008d7 Merge pull request #149 from mRemoteNG/Hunting_for_memory_leaks
Hunting for memory leaks
2016-10-07 09:01:36 -06:00
David Sparer
2ffcccdc6f Fixed minor memory leak of Collection and Property changed event handlers when changing the ConnectionTreeModel associated to the ConnectionTreeWindow 2016-10-06 11:04:00 -06:00
David Sparer
67c01046be Removed unnecessary implementations of IDisposable 2016-10-05 13:50:55 -06:00
David Sparer
c755d651cc Removed all destructors since they were a very bad idea to implement 2016-10-05 13:41:35 -06:00
David Sparer
0529729626 Merge pull request #148 from mRemoteNG/Connection_icon_not_updating_until_mouseover
Resolved #141
2016-10-05 13:07:21 -06:00
David Sparer
984d989f14 #141 TreeListView objects now update immediately when their OpenConnections list contents change 2016-10-05 12:57:29 -06:00
David Sparer
a204e34d53 Modified the Asserts lines of a few tests to give better info on failure 2016-10-05 12:45:50 -06:00
David Sparer
3e47041820 Fixed minor bug where ProtocolList.Clear() would trigger a CollectionChanged event even when no items were removed (list already empty) 2016-10-05 12:43:27 -06:00
David Sparer
c471f621b2 #141 ConnectionInfo now listens to collection changed events from the ProtocolList and raises a PropertyChanged event for OpenConnections when the list contents changes. 2016-10-05 12:37:05 -06:00
David Sparer
e2e010c418 Created test to check for safe indexer handling of unknown object types 2016-10-05 11:51:44 -06:00
David Sparer
913e0dd3e4 #141 Implemented INotifyCollectionChanged on ProtocolList and created unit tests 2016-10-05 11:47:22 -06:00
David Sparer
192a718d08 Cleanup of the protocollist. connected to #141 2016-10-05 10:45:48 -06:00
David Sparer
a881232eb1 Merge pull request #145 from mRemoteNG/MR-975_Replace_TreeView_with_TreeListview
MR-975 / #143 replace tree view with tree listview
2016-10-04 15:28:11 -06:00
David Sparer
cf73e827e0 Quick changelog entry 2016-10-04 15:25:14 -06:00
David Sparer
bf97905fe9 Merge branch 'develop' into MR-975_Replace_TreeView_with_TreeListview 2016-10-04 15:19:04 -06:00
David Sparer
f962b8a573 Right clicking on an empty connection panel no longer displays the context menu 2016-10-04 15:15:38 -06:00
David Sparer
9e9786ecc7 Resolved minor bug with copying default connection info data to folders 2016-10-04 15:14:37 -06:00
David Sparer
59d22b536a Fixed bug that occurs on startup when non-english language is selected. 2016-10-04 14:50:58 -06:00
David Sparer
e8d17fd733 Suppress tree refresh errors which occassionally occur 2016-10-04 14:28:43 -06:00
David Sparer
42f4cb618b Resolved bug where some new connections/containers would not respect the default connection info and default inheritance settings 2016-10-04 14:26:49 -06:00
David Sparer
faa240ab97 Sorting tree nodes is now recursive in all cases to be more in line with user expectations 2016-10-04 14:01:36 -06:00
David Sparer
a02e72d895 Resolved bug where app would crash when opening the Export form with no connection tree node selected 2016-10-04 13:24:24 -06:00
David Sparer
852b43b121 Resolved crash bug when attempting to import from AD when no connection tree node is selected (will import under the root node) 2016-10-04 13:21:54 -06:00
David Sparer
020823510d Fixed bug where app would crash when no tree node selected and trying to import from file 2016-10-04 12:50:02 -06:00
David Sparer
5c92128b17 Resolves #140. The decryption key was not being saved and used for further decryption attempts. This fix is quick/temporary and should be redone to remove Runtime references. 2016-10-04 11:31:41 -06:00
David Sparer
7cee3c9050 Created another unit test for the legacy crypto provider 2016-10-04 11:31:15 -06:00
Sean Kaim
f31cf9f839 waffle.io badge 2016-10-04 12:37:26 -04:00
David Sparer
960de69c20 Added note regarding a minor efficiency bug to investigate 2016-10-04 10:18:49 -06:00
Sean Kaim
6d8e4d14e6 contributing typo. 2016-10-04 11:55:38 -04:00
Sean Kaim
fd7929134b Merge pull request #139 from mRemoteNG/dot-github
.github support
2016-10-04 11:34:18 -04:00
David Sparer
40016f0d52 Code cleanup 2016-10-04 08:28:39 -06:00
David Sparer
05c46653a1 Resolved crash bug when deserialization fails (for example when we cant decrypt the file). 2016-10-03 15:02:16 -06:00
David Sparer
a932129d52 Very minor code cleanup 2016-10-03 12:12:15 -06:00
David Sparer
426c07ce75 Code cleanup of Runtime.cs 2016-10-03 12:10:56 -06:00
David Sparer
140723108e Resolved bug where the RemoteConnectionsSyncronizer wouldn't get disposed/deferenced when switching from using Sql to not using it 2016-10-03 12:05:07 -06:00
David Sparer
418f023780 Removed unused code 2016-10-03 12:02:48 -06:00
David Sparer
85b6e09ea6 Merge branch 'develop' into MR-975_Replace_TreeView_with_TreeListview 2016-10-03 10:46:49 -06:00
David Sparer
d6bd7e0886 Resolved bug where rearranging nodes by drag-n-drop would not save changes 2016-10-03 10:36:58 -06:00
David Sparer
2df93bea24 Reduced some complexity by merging the PeriodicConnectionsUpdateChecker with the RemoteConnectionsSyncronizer since they did nearly the same thing. 2016-10-03 10:28:08 -06:00
David Sparer
b474a67ef4 Fixed a few unit tests 2016-10-03 10:08:48 -06:00
David Sparer
ddd94da47b Code cleanup 2016-10-03 10:04:58 -06:00
David Sparer
48bd1854e4 Resolved saving to an Sql DB. Had to correclty arrange the column schema, add the ID column and make it autoincrement, and change a few data types. 2016-10-03 09:55:31 -06:00
David Sparer
6582ebcf57 Resolved minor bug that would occassionaly create unnecessary exceptions 2016-10-03 09:19:57 -06:00
David Sparer
41cd6f4290 Save supported by the RemoteConnectionsSyncronizer 2016-09-30 15:32:36 -06:00
David Sparer
5f40bab9c5 Enforce column data types 2016-09-30 15:31:46 -06:00
David Sparer
4b90b259a8 Created a class that brings all the various database classes together to keep the local connections tree updated with the remote connections tree. DB reads will now only occur if the local last update time is behind the remote last update time. 2016-09-30 14:49:14 -06:00
David Sparer
279682df11 the db update checker now runs on app startup 2016-09-30 13:55:25 -06:00
David Sparer
64b6c5967d Removed unused code 2016-09-30 13:50:41 -06:00
David Sparer
5826f055e3 DB updates now trigger reloading of connections data and rebuilding of the connection tree (somewhat thread safe) 2016-09-30 13:47:08 -06:00
David Sparer
e4ec71928d Cleanup 2016-09-30 09:28:20 -06:00
David Sparer
cb2ff4002f Moved some files to Config.Connections.Multiuser to keep things organized 2016-09-30 09:27:53 -06:00
David Sparer
36d5c888a5 Cleanup. Made PeriodicConnectionsUpdateChecker a bit more generically useful 2016-09-30 09:02:12 -06:00
David Sparer
de7493bc00 Implemented the ConnectionsUpdateAvailable event. 2016-09-30 08:35:41 -06:00
David Sparer
6819c1d9ff Made IConnectionsUpdateChecker implement IDisposable 2016-09-30 08:04:44 -06:00
David Sparer
021a3fe3bc Created interface IConnectionsUpdateChecker and modified SqlConnectionsUpdateChecker to implement it 2016-09-30 08:02:02 -06:00
David Sparer
0d70033e4c Some code rearranging 2016-09-30 08:01:15 -06:00
David Sparer
812cf21f98 Some updates that should have been committed with the last rename 2016-09-30 08:00:34 -06:00
David Sparer
f0da088836 Renamed SqlConnectionsProvider to PeriodicConnectionsUpdateChecker to better indicate its purpose 2016-09-30 07:50:49 -06:00
David Sparer
d7501751e3 Removed the SqlUpdateQueryBuilder since it serves very little purpose 2016-09-30 07:49:10 -06:00
David Sparer
94648f072e Code cleanup 2016-09-29 15:02:12 -06:00
David Sparer
a7d34b2c1b Code cleanup 2016-09-29 15:01:19 -06:00
Bennett Blodinger
26403096e8 .github support
Adds initail support for GitHub settings
2016-09-29 14:37:01 -04:00
David Sparer
62190bde17 Resolved crash that would sometimes occur when working with interfacecontrols 2016-09-29 11:38:40 -06:00
David Sparer
293b3d90b9 Cleanup 2016-09-29 11:31:35 -06:00
David Sparer
1928b904e5 Minor cleanup 2016-09-29 11:29:16 -06:00
David Sparer
a71cf6080f Fixed bug where loading a new connection file or creating a new one would not update the connection tree 2016-09-29 11:01:06 -06:00
David Sparer
14d56c3e28 Fixed crash when adding node with no treenode selected 2016-09-29 10:33:59 -06:00
Sean Kaim
707e3bc08f code cleanup 2016-09-29 11:57:23 -04:00
Sean Kaim
0614aef362 fix minor post build event errors 2016-09-29 11:50:05 -04:00
David Sparer
2ff9a7ff22 Large code cleanup of the ConnectionWindow class 2016-09-29 09:16:57 -06:00
David Sparer
3e4cfc16df Simplified teh ConnectionWindow drag_over handler and made it safer (actually does type checking) 2016-09-28 15:26:18 -06:00
David Sparer
fcd846bd6d Dragging connections/folder onto a connection panel now opens the connection(s). This restores functionality for dragging single connections, but is new functionality for folders 2016-09-28 15:09:50 -06:00
David Sparer
05028c958e Fixed crash that would occur when double clicking inside a connection window after disconnecting 2016-09-28 15:08:40 -06:00
David Sparer
40455e199b Fixed bug that would occasionally cause crashes when clicking 2016-09-28 15:05:04 -06:00
David Sparer
e5c9ccbdcc Moved all database connectors to the Config.DatabaseConnectors namespace 2016-09-28 14:15:39 -06:00
David Sparer
be22ebd789 Code cleanup 2016-09-28 13:57:35 -06:00
David Sparer
050d12a8ec Created tests for the ConnectionInfoComparer 2016-09-28 13:52:21 -06:00
David Sparer
5746d0264a Extracted some methods in the ExternalToolArgumentParser to make it more readable 2016-09-28 11:50:09 -06:00
David Sparer
0a4010d9a9 Created more test cases for the ExternalToolArgumentParser 2016-09-28 11:49:28 -06:00
David Sparer
ab30dd2294 Extracted a method in ExternalToolArgumentParser 2016-09-28 11:49:02 -06:00
David Sparer
f53e77ecc9 Added a few more parser tests 2016-09-28 10:53:06 -06:00
David Sparer
91da8f1b5f Reset the position of the main menu. At some point it got pushed to the side again 2016-09-28 09:57:35 -06:00
David Sparer
1bf616579b Added tests for the external tools arg parser 2016-09-28 09:50:38 -06:00
David Sparer
da2d48b49a Minor code cleanup 2016-09-28 08:20:16 -06:00
David Sparer
48b209155b Renamed class to be more indicative of its use 2016-09-28 08:10:13 -06:00
David Sparer
7fe8749807 Resolved bug with the Reconnect context menu item being permanently disabled for containers 2016-09-27 14:52:06 -06:00
David Sparer
b73547ced9 Connecting to an entire folder working again 2016-09-27 14:44:35 -06:00
David Sparer
9c8c22979f Resolved bug where hitting the delete key would bring up the prompt to delete root nodes and putty nodes 2016-09-27 13:56:03 -06:00
David Sparer
60b387ac56 Adding a new node will expand the parent container, select the new node, and ensure the new node is visible. Extracted a method since these actions are identical for both containers and connections 2016-09-27 10:36:30 -06:00
David Sparer
20339c1452 Fixed bug when trying to refresh the display of a folder that had 0 children but now has some 2016-09-27 10:33:34 -06:00
David Sparer
7a15a8151c Resolved error when attempting to connect to PuTTY session 2016-09-27 09:21:15 -06:00
David Sparer
967d9b1036 Renamed properties and fields of the Windows class to conform to naming guidelines 2016-09-26 15:27:41 -06:00
David Sparer
faec28ac78 Removed unused code 2016-09-26 15:25:18 -06:00
David Sparer
0832c8610b Removed unused code 2016-09-26 15:17:26 -06:00
David Sparer
fa7ca994e9 ConnectionList served no purpose and was removed 2016-09-26 15:10:32 -06:00
David Sparer
288221918e ContainerList serves no purpose 2016-09-26 15:07:59 -06:00
David Sparer
5462e96090 Removed unused code 2016-09-26 15:02:12 -06:00
David Sparer
a1b5d8bdc5 Removed unused code 2016-09-26 14:59:14 -06:00
David Sparer
bd280ad2b6 Removed unused code 2016-09-26 14:53:32 -06:00
David Sparer
0c460f7aab Removed unused code 2016-09-26 14:49:32 -06:00
David Sparer
634c420799 Refactored the SqlSaver code to use the new functions 2016-09-26 14:49:16 -06:00
David Sparer
0bdb57c44e Removed reference to unnecessary method 2016-09-26 14:47:41 -06:00
David Sparer
2540777e18 Removed unnecessary code 2016-09-26 14:12:06 -06:00
David Sparer
eaced33ed5 Refactored some code for creating a menu tree of the connectiontreemodel 2016-09-26 14:07:33 -06:00
David Sparer
0b97c47f4e Removed unused code 2016-09-26 13:18:36 -06:00
David Sparer
584075a9b1 Fixed the connections dropdown list 2016-09-26 13:13:11 -06:00
David Sparer
3febb2be5e Removed unused code 2016-09-26 12:53:42 -06:00
David Sparer
c4a9841ba6 Refactored Export and ExportForm to require ConnectionInfo rather than TreeNode for export 2016-09-26 12:51:28 -06:00
David Sparer
c613c3b4e1 Updated the ISerialize interface to require a Serialize(ConnectionInfo) method to support serializing a target connection/container 2016-09-26 12:22:55 -06:00
David Sparer
814f07212d Made ISerializer generic 2016-09-26 11:58:48 -06:00
David Sparer
a63120b78f Code cleanup 2016-09-26 11:43:47 -06:00
David Sparer
598a39fcc1 Removed unnecessary code 2016-09-26 11:28:37 -06:00
David Sparer
425fdb502c Removed unnecessary code and implemented directly in the calling class 2016-09-26 11:28:05 -06:00
David Sparer
3016ef8545 Removed unnecessary code 2016-09-26 11:22:05 -06:00
David Sparer
87b4dd09e4 Rewrote Sql connection loading to use the DataProvider/Deserializer 2016-09-26 11:19:53 -06:00
David Sparer
95f54b9330 Made IDataProvider generic to support multiple data formatting types (mostly to help with database support and DataTables) 2016-09-26 09:35:40 -06:00
David Sparer
1a8d4ea7fd Removed unnecessary code 2016-09-26 09:21:45 -06:00
David Sparer
e27424102b Removed unused code 2016-09-26 09:15:17 -06:00
David Sparer
d35540e691 Code cleanup 2016-09-25 14:42:03 -06:00
David Sparer
bda536cc62 Call to the message collector is causing tests to fail. Will need a test-safe way of indicating failure 2016-09-25 14:35:18 -06:00
David Sparer
cf3443ace3 Disabled password import tests for the RemoteDesktopConnectionManagerDeserializer. Since the passwords are encrypted using a machine key, decryption on other machines will always fail. 2016-09-25 14:32:01 -06:00
David Sparer
b8e05fc7da Refactored the DecryptPassword function in RemoteDesktopConnectionManagerDeserializer to use managed rather than native functions 2016-09-25 14:27:27 -06:00
David Sparer
ddfbb1d42e Created tests for PuttyConnectionManagerDeserializer 2016-09-25 14:01:43 -06:00
David Sparer
c4c255d560 Created tests for PortScanDeserializer 2016-09-25 13:28:01 -06:00
David Sparer
b1fd47ff9d Renamed the Scanner class to PortScanner 2016-09-25 12:29:30 -06:00
David Sparer
636848ed26 Split the ScanHost class to its own file. 2016-09-25 12:27:58 -06:00
David Sparer
6e713ebd83 Moved some tests to the right namespace 2016-09-25 12:16:19 -06:00
David Sparer
80a4d2af59 Created tests for various bad version/schema scenarios 2016-09-25 12:10:48 -06:00
David Sparer
d0153da3d1 Created more tests for teh RemoteDesktopConnectionManagerDeserializer 2016-09-25 11:32:02 -06:00
David Sparer
aa6f467942 Made the parsing code a bit safer 2016-09-25 11:31:41 -06:00
David Sparer
34f8a123a5 Resolved bug with importing gateway password from RDCMan when not stored in clear text 2016-09-25 11:11:06 -06:00
David Sparer
63ae7d845c Code cleanup 2016-09-25 10:55:41 -06:00
David Sparer
12d8097774 Ensured UseConsoleSession bool could be parsed 2016-09-25 10:55:22 -06:00
David Sparer
ae4ce70c48 Began creating tests for the RemoteDesktopConnectionManagerDeserializer 2016-09-25 10:39:06 -06:00
David Sparer
cc43eab6ee Removed unnecessary code 2016-09-25 10:38:29 -06:00
David Sparer
ea5ec58ca3 Made the version checker a bit safer 2016-09-25 09:56:43 -06:00
David Sparer
775499a1ff Created more tests for the RemoteDesktopConnectionDeserializer 2016-09-24 12:18:37 -06:00
David Sparer
46d04541f1 Began creating unit tests for RemoteDesktopConnectionDeserializer 2016-09-23 23:13:19 -06:00
David Sparer
d80497011b Removed unnecessary code 2016-09-23 13:00:58 -06:00
David Sparer
02fea4ad5d Code cleanup 2016-09-23 12:48:56 -06:00
David Sparer
effc6fc9dd PortScanDeserializer created. Import now working 2016-09-23 12:47:48 -06:00
David Sparer
300fb55ec5 Created ActiveDirectoryDeserializer. Import is now working 2016-09-23 12:03:36 -06:00
David Sparer
8a1f2cbca8 Moved all serializers/deserializers to the mRemoteNG.Config.Serializers namespace 2016-09-23 11:06:13 -06:00
David Sparer
dec411e866 Created PuttyConnectionManagerDeserializer. Import is now working 2016-09-23 10:59:16 -06:00
David Sparer
88f40841d4 Code cleanup 2016-09-23 10:33:01 -06:00
David Sparer
c73aaa5455 Renamed PuttyConnectionManager to PuttyConnectionManagerImporter 2016-09-23 10:19:58 -06:00
David Sparer
6bf493f9a1 Created a RemoteDesktopConnectionManagerDeserializer. Importing from RDCM now works 2016-09-23 10:12:18 -06:00
David Sparer
b0be42815d Cleanup of RDCM Importer 2016-09-23 08:49:29 -06:00
David Sparer
79a423fc18 Renamed RemoteDesktopConnectionManager to RemoteDesktopConnectionManagerImporter 2016-09-23 08:38:08 -06:00
David Sparer
7047f2580f Cleanup 2016-09-22 15:24:06 -06:00
David Sparer
e8080aff58 Renamed ActiveDirectory to ActiveDirectoryImporter 2016-09-22 15:22:46 -06:00
David Sparer
d8ffed6e75 Renamed PortScan to PortScanImporter 2016-09-22 15:21:35 -06:00
David Sparer
0a3f201cb7 Created a deserializer for microsoft RDC and updated the importer 2016-09-22 15:20:28 -06:00
David Sparer
00adac42b8 mRemoteNG import doesnt need to be static 2016-09-22 15:17:54 -06:00
David Sparer
9a07ac075f Renamed RemoteDesktopConnection to RemoteDesktopConnectionImporter 2016-09-22 14:21:20 -06:00
David Sparer
44053f92c6 Importing mremoteng export files now works again 2016-09-22 14:17:34 -06:00
David Sparer
21475e0596 Small code cleanup 2016-09-22 12:38:50 -06:00
David Sparer
3ac09748db Opening a loading a putty session and showing the putty configuration window will no longer freeze mRemoteNG 2016-09-22 12:31:22 -06:00
David Sparer
91ff0786cc Rearranged some functions 2016-09-22 12:30:18 -06:00
David Sparer
45b207f399 Added property changed event handler to the connection tree. Model property updates will now be immediately reflected by the tree view 2016-09-22 12:06:18 -06:00
David Sparer
d7d15a0ab3 Fixed a typo in the ConnectionTreeModel's NotifyPropertyChanged event propogation 2016-09-22 12:04:30 -06:00
David Sparer
bce8d2e4b8 Forgot to commit this bit 2016-09-22 11:56:46 -06:00
David Sparer
d4e48e8b63 Fixed bug where app would crash when changing node name from config window 2016-09-22 11:56:12 -06:00
David Sparer
6de57ee0d4 ConnectionTreeModel now implements INotifyPropertyChanged and subscribes to child events 2016-09-22 11:55:28 -06:00
David Sparer
c3c9bb33a2 Code cleanup 2016-09-22 11:46:26 -06:00
David Sparer
ff4e6ab3ca Fixed bug where nodes could be dragged (with errors) above or below the root connections node 2016-09-22 10:45:00 -06:00
David Sparer
b646e7ef70 Minor optimization tree refresh when dragging nodes between containers. There is still a small disruption in the UI (~200ms) when moving nodes between containers. 2016-09-22 10:36:37 -06:00
David Sparer
981919335d Resolved a severe performance issue with refreshing the tree after drag-n-drop operations 2016-09-21 14:06:05 -06:00
David Sparer
42fcdd2267 Renamed variable to be more in line with other uses in the class 2016-09-21 10:43:01 -06:00
David Sparer
2b6367a8a9 Fixed bug where connections/containers could be dragged between putty session nodes 2016-09-21 10:38:41 -06:00
David Sparer
cbe0c1a550 Created tests for model-dropped 2016-09-21 10:22:25 -06:00
David Sparer
759c072c11 Refactored ModelDropped handler to be more test-friendly 2016-09-21 10:22:10 -06:00
David Sparer
d39e2a506f Added tests 2016-09-21 09:55:46 -06:00
David Sparer
f035872592 Extracted a method to increase readability 2016-09-21 09:55:33 -06:00
David Sparer
0324225c38 Added new convenience/optimization functions to containerinfo 2016-09-21 09:40:33 -06:00
David Sparer
a352516176 Fixed a bug where you could try to drag connection/containers onto a root putty session node 2016-09-21 09:38:54 -06:00
David Sparer
07fab69221 Created more tests for drag and drop handler 2016-09-21 09:35:07 -06:00
David Sparer
82804c1390 Fixed small bug in the drag and drop handler refactor that was causing info messages to not refresh all the time. 2016-09-21 09:10:32 -06:00
David Sparer
536d6f7c29 Refactored ConnectionTreeDragAndDropHandler to be more unit-test friendly. Began creating unit tests for it 2016-09-21 09:03:11 -06:00
David Sparer
a4ec3291ca Small drop-n-drop optimization 2016-09-20 13:56:03 -06:00
David Sparer
10420d9e7f ConnectionTreeWindow now updates its treelistview based on eventing from its ConnectionTreeModel 2016-09-20 13:03:25 -06:00
David Sparer
522d139044 ConnectionTreeModel now listens for and propogates collection changed events on child members 2016-09-20 13:02:15 -06:00
David Sparer
81a944a95c ContainerInfo objects now subscribe to child collection changed events 2016-09-20 13:01:17 -06:00
David Sparer
75b4ea175b Small cleanup 2016-09-20 12:27:20 -06:00
David Sparer
62b1402b43 Removing putty sessions now updates the treelistview as expected 2016-09-20 12:23:55 -06:00
David Sparer
688dbd1ce9 Added a convenience property and a way to remove sessions that triggers eventing 2016-09-20 12:07:05 -06:00
David Sparer
941e3d5904 Added putty model update code to tree view. Adding putty sessions works as expected 2016-09-20 12:00:04 -06:00
David Sparer
a938e098e5 Added support for propogating child session collection changed events 2016-09-20 11:36:45 -06:00
David Sparer
1bda39bc7e Implemented collectionchanged event on puttysessionprovider 2016-09-20 11:29:05 -06:00
David Sparer
6c5fedb631 Made the puttyrootnode property on puttysessionsproviders virtual to allow overriding 2016-09-20 11:13:45 -06:00
David Sparer
55e48742a9 Code cleanup 2016-09-20 10:48:20 -06:00
David Sparer
9a13273726 Renamed event SessionChanged to PuttySessionChanged 2016-09-20 10:37:39 -06:00
David Sparer
45e641067b Renamed SessionChangedEventHandler to PuttySessionChangedEventHandler 2016-09-20 10:36:39 -06:00
David Sparer
6a7dedfe67 Renamed SessionChangedEventArgs to PuttySessionChangedEventArgs 2016-09-20 10:35:58 -06:00
David Sparer
28fa043b32 Added support to the SessionChangedEventArgs to allow providing which session changed 2016-09-20 10:35:20 -06:00
David Sparer
d7c339ccea Refactored some of the eventing code in AbstractPuttySessionsProvider to make it less complex 2016-09-20 10:24:42 -06:00
David Sparer
cdc6567628 Forgot to commit this change to the Args change 2016-09-20 10:23:46 -06:00
David Sparer
fb315fd782 Moved the SessionChangedEventArgs to its own class file. Embeded classes are generally not a good idea 2016-09-20 10:23:03 -06:00
David Sparer
0907a19821 Renamed PuttySessionManager.AddSessionsToTree to just AddSessions to reflect that it does not directly work on any tree objects. Implemented the CollectionChanged event for the sessions providers collection 2016-09-20 10:12:46 -06:00
David Sparer
00b0552e5e Made PuttySessionManager a singleton rather than static. Began implementing collectionchanged event to notify when the putty session list changes 2016-09-20 09:55:05 -06:00
David Sparer
9949907adc Slightly better way to set root nodes on the treelistview 2016-09-20 09:50:20 -06:00
David Sparer
94ab1ddfbc Slight optimization of the treelistview CanExpandGetter 2016-09-20 09:49:47 -06:00
David Sparer
c13ff71f9a Abstracted the way we refresh tree model objects 2016-09-20 09:36:39 -06:00
David Sparer
e64ebf06f1 Fixed bug with calling CollectionChanged when sorting container children 2016-09-20 09:34:22 -06:00
David Sparer
20f527ae94 Created more ContainerInfo tests 2016-09-20 09:07:30 -06:00
David Sparer
1b0f9fcd88 Created more ContainerInfo tests 2016-09-20 09:02:03 -06:00
David Sparer
05799767a0 Added more ContainerInfo tests. Refactored a bit 2016-09-20 08:54:41 -06:00
David Sparer
86cb233cf6 Implemented INotifyCollectionChanged on the container children list rather than the INotifyPropertyChanged. It makes more sense, though we will need to implement UI refresh listeners on the TreeListView manually now (objectlistview currently only respects INotifyPropertyChanged events) 2016-09-20 08:37:44 -06:00
David Sparer
5838ff045a Implemented INotifyPropertyChanged for the Children proptery of the ContainerInfo object 2016-09-19 13:00:23 -06:00
David Sparer
95ddca0d7c Implemented INotifyPropertyChanged on AbstractConnectionInfoData (and thus on every connectioninfo subtype) 2016-09-19 12:54:01 -06:00
David Sparer
a03e2783d4 Created another level of abstraction between the data shared by all connection info objects and the behavior shown by certain connection info objects 2016-09-19 11:25:58 -06:00
David Sparer
f0638b0dd8 Cleanup 2016-09-19 10:58:37 -06:00
David Sparer
ab3e00f42c Fixed issue with using the proper tree images for the putty nodes 2016-09-19 10:44:23 -06:00
David Sparer
c67971035d Only show putty provider if it has sessions 2016-09-19 10:40:40 -06:00
David Sparer
3c55446e86 Putty sessions now being shown in connection tree again 2016-09-19 10:38:08 -06:00
David Sparer
fd559b61b1 Renamed PuttySessionsProvider to AbstractPuttySessionsProvider 2016-09-19 08:44:08 -06:00
David Sparer
77ca139363 Renamed class "Sessions" to "PuttySessionsManager" 2016-09-19 08:13:12 -06:00
David Sparer
f0828d3870 Some code cleanup 2016-09-19 08:08:34 -06:00
David Sparer
0e4ffde6ca Some file/class renaming 2016-09-15 13:41:32 -06:00
David Sparer
a50f96606b Resolved bug when editing a tree node name - the context menu would steal keyboard input for its shortcut keys 2016-09-15 13:31:00 -06:00
David Sparer
ecb77238a3 Sorting nodes now works (ascending/descending) 2016-09-15 12:05:46 -06:00
David Sparer
3fe5801366 Context menu item enable/disabled based on node type is now working again 2016-09-15 10:01:20 -06:00
David Sparer
9807231b72 Basic switch has been completed. Most context menu actions are working as expected. 2016-09-15 09:56:04 -06:00
David Sparer
eed85b3641 Finished creating pass-through events for the underlying context menu 2016-09-15 09:06:54 -06:00
David Sparer
7d7d4e62a3 Began moving connection tree context menu to its own class 2016-09-14 15:26:21 -06:00
David Sparer
f0f9d2a6aa Little bit of cleanup 2016-09-14 15:07:19 -06:00
David Sparer
7b2a30dcbf Starting external tools from the connections tree now works 2016-09-14 14:52:47 -06:00
David Sparer
b214efc029 Fixed SSH transfer window creation from context menu 2016-09-14 14:41:13 -06:00
David Sparer
e74884bcea any letter or number key press while the connections tree has focus will activate the search box 2016-09-14 14:27:31 -06:00
David Sparer
4accd71744 Hitting escape while the search box has focus switches focus to the connections tree 2016-09-14 14:19:43 -06:00
David Sparer
fa7c170540 Rather than yellow highlight, just make the node highlightling the same whether the contol has focus or not 2016-09-14 13:59:30 -06:00
David Sparer
92360eb2ce Fixed node search bug when no results are returned. 2016-09-14 13:58:51 -06:00
David Sparer
b13382a6ee Hooked up the keydown event with the new connection tree 2016-09-14 13:19:31 -06:00
David Sparer
b9718edfd3 Folders will now expand when scrolling through search results 2016-09-14 13:07:08 -06:00
David Sparer
d3e2976ff9 Scrolling through search results now ensures that the node is visible. Up/down keys no longer move the search box text cursor 2016-09-14 12:38:54 -06:00
David Sparer
5e84b7cffe Made search match nodes highlighted in yellow 2016-09-14 12:24:22 -06:00
David Sparer
764eb764ce Fixed case sensitivity when searching for nodes 2016-09-14 12:23:42 -06:00
David Sparer
a992b41e26 Refactored node searching to a new class 2016-09-14 11:43:40 -06:00
David Sparer
7d882c3f74 Added function to get all children of the connectiontreemodel, including root nodes 2016-09-14 11:42:56 -06:00
David Sparer
668e8de7df Removed unnecessary code 2016-09-14 10:19:53 -06:00
David Sparer
29ad420916 ExpandAll and CollapseAll now work 2016-09-14 10:17:43 -06:00
David Sparer
f743942e65 Fixed ExpandAll 2016-09-14 10:06:56 -06:00
David Sparer
0a120e402e Removed unnecessary code 2016-09-14 10:05:38 -06:00
David Sparer
6bc0c79624 Created a convenience function for determining if a container has children 2016-09-14 10:00:27 -06:00
David Sparer
6860ddced3 Reimplemented confirmation boxes when deleting tree nodes 2016-09-14 09:59:57 -06:00
David Sparer
ddf5e38396 Fixed minor bug where folders with no contents had an expand button 2016-09-14 09:44:15 -06:00
David Sparer
2ff2e448be Removed unnecessary code 2016-09-14 09:40:15 -06:00
David Sparer
9882dda905 Resolved issue with tree actions from the File menu. This is still an ugly fix, but its working 2016-09-14 09:27:05 -06:00
David Sparer
88d005caf6 Rearranged some event handler declarations 2016-09-14 08:59:03 -06:00
David Sparer
eba5fc9caf Slight optimization of updating the tree when deleting a node. Refresh one row rather than the whole tree 2016-09-14 08:39:12 -06:00
David Sparer
3a2f35f697 Duplicating a node now places it under the node that it was copied from, rather than the bottom of the list. (this was the previous behavior) 2016-09-14 08:36:58 -06:00
David Sparer
2ba3e95379 Removed unnecessary tooltip code 2016-09-14 07:59:36 -06:00
David Sparer
023570298b Removed unnecessary code 2016-09-14 07:41:38 -06:00
David Sparer
cf7e4d1f52 Moved GetExtAppByName() back to Runtime. Will make more sense for later refactoring 2016-09-12 10:20:35 -06:00
David Sparer
a09ce702c1 Removed unnecessary code 2016-09-12 10:17:14 -06:00
David Sparer
4c6f5dd72d Renamed some variables to adhere to style guidelines 2016-09-12 10:12:00 -06:00
David Sparer
dabed1568c Removed another OpenConnection overload that didnt take a connectioninfo object 2016-09-12 10:09:15 -06:00
David Sparer
79dee21f9b Removed empty arg overload for OpenConnection(). We always require a connectioninfo object 2016-09-12 10:07:05 -06:00
David Sparer
6ccbe69c02 Retargeted all Runtime.OpenConnection() to ConnectionInitiator.OpenConnection(). Will help with later iterative refactors 2016-09-12 10:00:53 -06:00
David Sparer
3ad8a14786 Initial refactor of connection initiation (which is heavily tied into how the connection tree was previously being managed) 2016-09-12 09:52:12 -06:00
David Sparer
c79ee46551 Removed unnecessary code 2016-09-12 08:49:32 -06:00
David Sparer
b391940037 Merge branch 'develop' into MR-975_Replace_TreeView_with_TreeListview
# Conflicts:
#	mRemoteV1/Config/SqlDatabaseConnector.cs
#	mRemoteV1/Tree/Root/RootPuttySessionsNodeInfo.cs
2016-09-12 08:40:43 -06:00
Sean Kaim
d5a54dd63d code clean up 2016-09-09 17:08:27 -04:00
Sean Kaim
6799ac2b30 code clean up 2016-09-09 17:08:15 -04:00
Sean Kaim
2f10e60dbf code clean up 2016-09-09 16:39:24 -04:00
Sean Kaim
95c818d92e code clean up
Octet1.Text.Remove didn't actually do anything. Text is already removed
properly when backspace is pressed without this code in the event
handlers.
2016-09-09 16:23:03 -04:00
David Sparer
e6f846107a drag-n-drop now supports rearranging nodes. Fixed a small bug with child rearrangement 2016-09-09 14:05:22 -06:00
Sean Kaim
b757ab7424 MR-979 - switched to notifications pnl incorrectly 2016-09-09 15:46:21 -04:00
David Sparer
d439a0df00 Created functions to rearrange child nodes. Moving nodes up/down now working 2016-09-09 12:03:35 -06:00
David Sparer
c3e14afe0a Created localization strings for drag-n-drop feedback messages 2016-09-09 10:33:20 -06:00
David Sparer
22f43d63ec Renamed drag-n-drop handlers 2016-09-09 10:32:25 -06:00
David Sparer
07c364cf0b Added support for changing the feedback color when dropping a node is allowed/denied. Removed unnecessary code 2016-09-09 10:18:52 -06:00
David Sparer
96485d9b9f Added check to prevent dragging a node onto the folder in which it already resides 2016-09-09 10:11:53 -06:00
David Sparer
4cdfeeecf2 Turns out we didn't need a custom Equals comparer for ConnectionInfo. Rolling back since it's probably best to keep the default implementation unless we actually need a custom one. 2016-09-09 09:57:21 -06:00
David Sparer
00abd53b19 Fixed issue with preventing dragging node onto itself. Feedback highlighting is disabled when attempting to drag un-draggable node. 2016-09-09 09:56:30 -06:00
Sean Kaim
6666552b8a code clean up and ensure settings save 2016-09-09 11:54:06 -04:00
David Sparer
b65fdbdd78 Overrode the Equals method for ConnectionInfo. Equality based on ConstantID 2016-09-09 09:50:06 -06:00
David Sparer
7c7d791f31 Renamed a few variables and created a check for dragging a node onto itself 2016-09-09 09:40:18 -06:00
David Sparer
d66f333bd5 Refactored drag-n-drop code to its own class 2016-09-09 09:35:13 -06:00
Sean Kaim
5afb9c572e code clean up 2016-09-09 11:31:43 -04:00
David Sparer
866aeab76b Changed the drag-drop highlight color 2016-09-09 08:25:56 -06:00
Sean Kaim
ae13b5f920 code clean up/remove unused files 2016-09-09 10:24:02 -04:00
David Sparer
cfbcb502d8 Removed unnecessary code 2016-09-08 10:54:36 -06:00
David Sparer
5f8d274b94 Drag and drop now working 2016-09-08 10:50:47 -06:00
David Sparer
092171982b Modified the IHasParent interface to include another common method 2016-09-08 09:10:52 -06:00
David Sparer
30ccc0c76c Resolved bug that broke the "child node only ever has one parent" rule 2016-09-08 09:01:21 -06:00
David Sparer
bf23d78e41 Node tool tips now working. Removed unnecessary code 2016-09-08 08:32:08 -06:00
David Sparer
08466f5179 Refactored the single node click event handler to handle the CellClick event instead of MouseClick to be more in line with the double click event handler 2016-09-08 08:24:01 -06:00
David Sparer
4ca07d534b Double click actions on tree nodes now working 2016-09-08 08:22:23 -06:00
David Sparer
3237875aee Merge branch 'develop' into MR-975_Replace_TreeView_with_TreeListview 2016-09-08 07:53:49 -06:00
David Sparer
c8db438cca Fixed single mouse click on node 2016-09-07 15:28:22 -06:00
David Sparer
5ea2304d5e Duplicating nodes now works 2016-09-07 14:36:52 -06:00
Sean Kaim
197652f8eb lock the file menu in place 2016-09-07 16:26:37 -04:00
Sean Kaim
80b16d8b57 lock the file menu in place 2016-09-07 16:10:32 -04:00
Sean Kaim
b8d78c1733 lock the file menu in place 2016-09-07 15:08:01 -04:00
David Sparer
8bf5004147 Fixed nullref error when attempting to delete a node when nothing is selected 2016-09-07 12:49:41 -06:00
David Sparer
89538e7289 New folders created with "New Folder" as the text 2016-09-07 12:47:51 -06:00
David Sparer
ff46d39a6a AddFolder now working 2016-09-07 12:45:44 -06:00
David Sparer
b843a55a25 AddNode is working 2016-09-07 12:41:07 -06:00
David Sparer
54008af8bf Deep clone for containers 2016-09-07 10:40:38 -06:00
David Sparer
d73f0d2401 Resolved nullref error with SetParent 2016-09-07 10:36:03 -06:00
David Sparer
86228e4270 Updated some Clone methods to be deeper 2016-09-07 10:29:16 -06:00
David Sparer
5ab5688844 Renamed Inheritance.Copy to Clone 2016-09-07 10:02:45 -06:00
David Sparer
53cb4149da Missed a commit for the Copy -> Clone rename 2016-09-07 09:52:55 -06:00
David Sparer
1056e20ec2 Renamed Copy to Clone 2016-09-07 09:47:15 -06:00
David Sparer
a589f337b7 Removed more unnecessary code 2016-09-07 09:37:12 -06:00
David Sparer
73ee88ab08 Removed unnecessary code 2016-09-07 09:28:41 -06:00
David Sparer
1e68483deb - Renamed IParent to IHasParent
- Renamed Add, AddRange, Remove, RemoveRange to include the word "Child" to make it more explicit
- Added SetParent and RemoveParent functions
- DeleteNode now works
2016-09-07 09:24:30 -06:00
Sean Kaim
9c168087af code cleanup / moved try in CloseConnectionTab 2016-09-07 11:21:22 -04:00
Sean Kaim
d988644b6a code cleanup/system colors for form/msg format 2016-09-07 11:00:03 -04:00
David Sparer
22c21222d3 Added more TODO notes for functionality that needs to be fixed for the treelistview change 2016-09-07 07:34:40 -06:00
David Sparer
73627a680c AfterSelect event working again 2016-09-06 18:56:28 -06:00
David Sparer
e70e8262e6 EnsureRootNodeVisible now works 2016-09-06 18:08:17 -06:00
David Sparer
8a74809ea4 Fixed opening previous connections to work with the tree list view 2016-09-06 18:05:46 -06:00
David Sparer
9cf3c23328 Disabled full row select to be more in line with previous functionality 2016-09-06 16:37:39 -06:00
David Sparer
40347c09ba minor update 2016-09-06 15:28:56 -06:00
David Sparer
64ed15ffae Got the tree node images working with the new TreeListView 2016-09-06 15:28:38 -06:00
David Sparer
617ec4cc3e Moved the code for generating a recursive list of children to ContainerInfo where it makes more sense. Left a helper function in ConnectionTreeModel where it may still be useful 2016-09-06 14:55:19 -06:00
David Sparer
bec154e538 Resolved issue serializing the connection tree node types (connect/container) 2016-09-06 14:48:53 -06:00
David Sparer
6e565c0b31 Fixed support for saving tree node expansion 2016-09-06 14:41:59 -06:00
David Sparer
c2b32de533 Added support for expanding all previously expanded nodes 2016-09-06 14:11:40 -06:00
David Sparer
454f007e42 Created helper function GetChildList in ConnectionTreeModel to retrieve a flat list of all connections/folders under a particular node 2016-09-06 13:59:10 -06:00
David Sparer
44a81cb7d8 Fixed scheme issue in the data table serializer 2016-09-06 13:57:26 -06:00
David Sparer
4623853399 Rearranged some code 2016-09-06 13:03:41 -06:00
David Sparer
15c894845c Created function to expand the root node on load. Refactored some delegate code 2016-09-06 12:58:27 -06:00
David Sparer
10597aed2f Renamed the Name column 2016-09-06 12:38:06 -06:00
David Sparer
2810fa7f80 Removed unnecessary tree update function. Added TODO comments for all functionality broken by the change to the TreeListView 2016-09-06 12:33:50 -06:00
David Sparer
a6dbc59ad1 Made the connection node name column take up all available space (similar to previous implementation) 2016-09-06 12:32:34 -06:00
David Sparer
1afe93be66 Began implementing TreeListView to replace the regular TreeView for the connection list. This will utilize a virtual list rather than a concrete set of tree nodes to model the connection list hierarchy. 2016-09-06 12:14:11 -06:00
David Sparer
1bd6839b21 Resolved bug with loading folders from SQL 2016-09-06 09:24:39 -06:00
David Sparer
b5e3564724 Fixed null ref error when viewing folders in some situations 2016-09-02 15:20:41 -06:00
David Sparer
8b143a2713 Fixed issue with creating node hierarchy 2016-09-02 15:07:22 -06:00
David Sparer
543f5e126f Fixed enum casts in DataTableSerializer 2016-09-02 14:54:34 -06:00
Sean Kaim
a5ac70cd3f changelog 2016-09-02 15:42:45 -04:00
Sean Kaim
07ed1b3f74 MR-586 - Reduce document title length
Also, code clean up...
2016-09-02 15:17:32 -04:00
Sean Kaim
7218208355 code clean up 2016-09-02 13:04:29 -04:00
David Sparer
d483c6a726 Merge branch 'develop' into MR-975_Replace_TreeView_with_TreeListview
# Conflicts:
#	mRemoteV1/App/Runtime.cs
#	mRemoteV1/UI/Window/ConnectionTreeWindow.cs
2016-09-02 09:20:58 -06:00
David Sparer
cb3fe686f3 Renamed function to be a bit more descriptive 2016-09-01 13:25:36 -06:00
Sean Kaim
69477cf3b4 changelog update 2016-08-30 17:07:10 -04:00
Sean Kaim
c114c68f15 MR-938 - add resolution / code clean up 2016-08-30 16:31:46 -04:00
Sean Kaim
1858c0f000 remove unused references 2016-08-30 15:36:02 -04:00
Sean Kaim
5c203c8e30 fix theme 2016-08-29 17:56:18 -04:00
Sean Kaim
005425efb1 code clean up 2016-08-29 17:31:34 -04:00
Sean Kaim
0c87954755 code cleanup 2016-08-29 17:19:13 -04:00
Sean Kaim
3c11092af1 changelog updates 2016-08-29 17:18:56 -04:00
Sean Kaim
4b71540dc7 default menu and quickconnect to same line
The Main menu bar, and the QuickConnect bar should now default to the
same line in the UI (though, forwhatever reason, it doesn't look like
this in VS Designer 😕 )

Code Clean up including rafactor QuickConnectComboBox to the correct
namespace.

Slightly related to MR-458
2016-08-29 16:48:47 -04:00
Sean Kaim
e22e3967f5 code cleanup 2016-08-29 16:11:38 -04:00
Sean Kaim
50809f45a3 MR-366 - Show PuTTY type and version
on components check screen
2016-08-29 15:12:41 -04:00
Sean Kaim
82bbf9d39f fix non-portable build failure 2016-08-26 17:18:01 -04:00
Sean Kaim
4692b20a74 more code clean up 2016-08-26 17:07:59 -04:00
Sean Kaim
9a32aa3350 code clean up 2016-08-26 17:00:01 -04:00
Sean Kaim
6d1fa4764d code clean up 2016-08-26 16:10:24 -04:00
Sean Kaim
267af5d6db Update strings: VncSharpNG to VncSharp 2016-08-26 15:59:15 -04:00
Sean Kaim
4bcb06c35b Update .gitignore 2016-08-26 12:00:42 -04:00
David Sparer
ff14c91fe1 First attempt at deserializing hierarchy from flat database 2016-08-25 15:16:56 -06:00
David Sparer
a0f7241f85 Fixed db schema error 2016-08-25 15:15:58 -06:00
Sean Kaim
66e7dfe6d5 update .gitignore 2016-08-25 16:49:02 -04:00
David Sparer
1538628e16 minor code cleanup 2016-08-25 14:45:18 -06:00
David Sparer
1b9d18adc1 Began creating the DataTableDeserializer 2016-08-25 14:44:31 -06:00
David Sparer
124ebaa970 Built out the SqlDataProvider 2016-08-25 14:44:04 -06:00
David Sparer
b44e657279 made the DataTableSerializer more closely conform to the current DB schema 2016-08-25 14:43:43 -06:00
David Sparer
de24dbbb7a Resolved small bug with uninitialized sql dbs 2016-08-25 13:21:49 -06:00
David Sparer
60f79b4400 Fixed bug where uninitialized sql database would not load 2016-08-25 13:13:08 -06:00
David Sparer
03c8f96a46 Created serializer which creates a data table. This can then be used for more efficient bulk Sql transfers 2016-08-25 11:16:49 -06:00
David Sparer
13d833ac5c Very minor code cleanup 2016-08-25 08:06:57 -06:00
David Sparer
71683992a0 Renamed ISqlConnector to IDatabaseConnector 2016-08-24 10:55:59 -06:00
David Sparer
2c785ade51 Initial refactor of sql saving. not even close to done 2016-08-24 10:49:03 -06:00
David Sparer
530819e788 Renamed several files to be more in line with project standards 2016-08-24 10:21:26 -06:00
David Sparer
c4c175e107 Minor code cleanup 2016-08-24 10:05:27 -06:00
David Sparer
6280fdf973 Refactored code for exporting connections in visionapp remote desktop 2008 csv format 2016-08-24 09:56:53 -06:00
David Sparer
269366264d Resolve small bug that would occur when exporting csv multiple times 2016-08-24 09:26:50 -06:00
David Sparer
8137b0831c Fixed issue where ConnectionTreeModel was not always populated when exporting. 2016-08-24 09:18:28 -06:00
David Sparer
396f63a3c9 Added necessary call to save the csv file to disk 2016-08-24 09:17:55 -06:00
David Sparer
cf87f2ee4d Fixed issue with undeclared variable 2016-08-24 08:47:31 -06:00
David Sparer
c98e672a73 minor code cleanup 2016-08-24 08:45:45 -06:00
David Sparer
21fe39542d Renamed CsvConnectionsSerializer to CsvConnectionsSerializerMremotengFormat to help distinguish between this and another CSV serializer strategy 2016-08-24 08:44:52 -06:00
David Sparer
8747da47a5 Began creating a serializer for Csv formatting 2016-08-23 15:31:47 -06:00
David Sparer
b3ff4de2ae Moved all data providers to the namespace mRemoteNG.Config.DataProviders 2016-08-23 15:02:54 -06:00
David Sparer
bc52362123 ConnectionSave now uses the FileDataProviderWithBackup strategies for saving connections files in xml 2016-08-23 14:58:04 -06:00
David Sparer
dcd63f321c Expanded some of the FileDataProvider code and created two different strategies for handling saves with backups 2016-08-23 14:57:17 -06:00
David Sparer
093f8c2714 XmlConnectionsDeserializer now implements IDeserializer 2016-08-23 14:00:00 -06:00
David Sparer
94ee9a39b4 Saving XML data to file now decoupled 2016-08-23 13:59:30 -06:00
David Sparer
1c5ea9e3ff Re-enabled opening connections from last session 2016-08-23 09:49:39 -06:00
David Sparer
3c69644f21 Re-enable expanding previously expanded folders. Implementation is still not ideal, but it's better 2016-08-23 09:35:08 -06:00
David Sparer
a89a593f51 code cleanup 2016-08-23 09:16:09 -06:00
David Sparer
8f685faf9b Refactored to reduce coupling 2016-08-22 16:05:49 -06:00
David Sparer
020433d7ad Fixed issue with display of connections tree which was caused by new connection tree builder code 2016-08-22 16:04:06 -06:00
Sean Kaim
80aa4fb852 removed hack for rightclick import menu 2016-08-22 17:07:24 -04:00
David Sparer
a1a8bd9656 Merge branch 'develop' into MR-975_Replace_TreeView_with_TreeListview 2016-08-22 11:17:03 -06:00
Sean Kaim
72623281c4 Initial PortScan context menu import
Need to fix the event implementation because it's a total hack right
now.
Also, want to put the code for detecting selected hosts into it's own
method.
2016-08-19 17:41:48 -04:00
David Sparer
ccaa70c1a4 XmlConnectionDeserializer now creates a connectiontreemodel which is turned into a treeview by ConnectionTreeViewBuilder 2016-08-19 15:28:12 -06:00
Sean Kaim
aa1ce22ada Missed one... One port scan form 2016-08-19 17:10:17 -04:00
David Sparer
003793b082 Removed dependency on GeneralAppInfo class to improved testability 2016-08-19 14:32:55 -06:00
Sean Kaim
15611cea43 one port scan form (import always available) 2016-08-19 14:52:53 -04:00
David Sparer
7a366de0e3 minor code cleanup 2016-08-19 12:51:01 -06:00
David Sparer
3baaf8bda4 Began building logic to build a TreeView from a connection tree model 2016-08-19 12:46:49 -06:00
David Sparer
23dcb3e823 Renamed method XmlConnectionsDeserializer.LoadFromXml to "Deserialize" 2016-08-19 12:45:52 -06:00
Sean Kaim
66e7790ee0 more code clean up 2016-08-19 11:56:29 -04:00
Sean Kaim
3065126ed1 code clean up 2016-08-19 11:00:30 -04:00
Sean Kaim
98ae737fb8 code clean up and expcetion stack logging 2016-08-19 10:45:22 -04:00
Sean Kaim
52cfda1d8e move some old/unused files 2016-08-18 13:22:41 -04:00
Sean Kaim
f727c13e20 fix minor complier warning 2016-08-18 13:11:21 -04:00
Sean Kaim
0c01479866 rebuild solution fails on post build
error 1104
editbin also can't find mremoteng.exe - seems to be a timing issue.
Small sleep fixes it.
2016-08-18 12:16:19 -04:00
Sean Kaim
34c9ae7518 Fix a cast 2016-08-18 12:04:48 -04:00
Sean Kaim
960334b638 minor logging changes & clean up 2016-08-18 12:00:11 -04:00
Sean Kaim
32e7ee1917 changelog.txt update 2016-08-18 08:55:09 -04:00
David Sparer
6e221e753b code cleanup 2016-08-17 15:12:48 -06:00
David Sparer
501dffe5b2 Refactored to separate loading connection data from deserializing data into domain objects 2016-08-17 14:47:03 -06:00
David Sparer
90dc8274c5 Added ObjectListView to packages 2016-08-17 09:29:43 -06:00
David Sparer
0a5cb40f55 Merge branch 'MR-651_improper_connection_inheritance_behavior' into develop 2016-08-17 09:17:01 -06:00
David Sparer
6d7d587a33 Renamed "Parent" interface to "IParent" 2016-08-17 09:11:13 -06:00
David Sparer
35b6e2bf35 minor cleanup of PuttySessionInfo 2016-08-17 09:02:43 -06:00
David Sparer
d2ebb207ab minor cleanup 2016-08-17 08:54:56 -06:00
David Sparer
c3a7f3c950 Created more unit tests for connection info objects 2016-08-17 08:54:36 -06:00
Sean Kaim
b44efbd998 ssh file transfer Don't add file name to dest file 2016-08-16 15:55:23 -04:00
David Sparer
8bdba217a6 Added test for multi-folder (recursive) inheritance 2016-08-15 15:36:32 -06:00
David Sparer
81dd315dfe More connection tree integration tests 2016-08-15 15:01:55 -06:00
David Sparer
d0be7f16ba Began creating integration tests for the connection tree 2016-08-15 14:47:26 -06:00
David Sparer
818ac03e84 RootNodeInfo now inherits from ContainerInfo 2016-08-15 14:45:33 -06:00
David Sparer
41127e0e38 Added collection management functions to ContainerInfo (Add, AddRange, Remove, RemoveRange). Added unit tests 2016-08-15 12:02:29 -06:00
David Sparer
b4af59a873 Fixed some instances where "Inheritance" was mistakenly changed to "IInheritable" by resharper 2016-08-15 11:05:18 -06:00
David Sparer
08972ff234 New connection entries now get their initial data from the DefaultConnectionInfo 2016-08-15 10:51:56 -06:00
David Sparer
6653f9b110 Resolved bug with DefaultConnectionInfo.SaveTo 2016-08-15 10:39:26 -06:00
David Sparer
c6f2ebd92a Merge branch 'develop' into MR-651_improper_connection_inheritance_behavior 2016-08-15 10:06:47 -06:00
David Sparer
b50c061c0a minor code cleanup 2016-08-12 13:19:43 -06:00
David Sparer
bb0e92c519 DefaultConnectionInfo saving is now handled by the SaveTo method. Removed unnecessary Runtime method 2016-08-12 13:06:26 -06:00
David Sparer
682dc36d34 Added custom type conversion support to the SaveTo method of DefaultConnectionInfo 2016-08-12 13:05:44 -06:00
Sean Kaim
3a173821d7 1.75 Alpha 3 2016-08-12 14:12:57 -04:00
David Sparer
0df478d2aa Resolved runtime type conversion issue with DefaultConnectionInfo when loading from a serialized source 2016-08-12 11:18:17 -06:00
David Sparer
8d3ba881e5 Refactoring DefaultConnectionInfo handling to a new class which inherits from ConnectionInfo 2016-08-11 15:32:04 -06:00
Sean Kaim
4555db8e97 MR-965, MR-871, MR-629: Error 264 on RDP Connect
Error 264 is a timeout:
RDP disconnected!
264 This computer can't connect to the remote computer.

The two computers couldn't connect in the amount of time allotted. Try
connecting again. If the problem continues, contact your network
administrator or technical support.
2016-08-11 16:52:57 -04:00
David Sparer
bc2beb2c56 Rename Config.mRemoteNG to Config.mRemoteNGImporter 2016-08-11 13:45:18 -06:00
David Sparer
29bd6af2a2 Made ContainerInfo class inherit from ConnectionInfo class 2016-08-11 11:11:31 -06:00
Sean Kaim
1bbd20de3c Merge PR #130 - port scan button width 2016-08-10 16:48:42 -04:00
Sean Kaim
d1f4164498 Update changelog 2016-08-10 16:41:56 -04:00
Sean Kaim
d1c238a812 Merge pull request #134 from mRemoteNG/MR-946_Initial_SSH.NET
MR-946 initial ssh.net - File xfer
2016-08-10 16:03:56 -04:00
Sean Kaim
675bbd602f Remove old components, update credits.txt 2016-08-10 15:59:14 -04:00
Sean Kaim
ab1be61fda SFTP file transfer now works fully 2016-08-10 15:52:02 -04:00
David Sparer
754caca613 Convert to auto-properties 2016-08-10 11:16:27 -06:00
Sean Kaim
8097ab146c Merge remote-tracking branch 'refs/remotes/origin/develop' into MR-946_Initial_SSH.NET 2016-08-10 12:04:02 -04:00
David Sparer
c0c4b69c64 Rename interface "Inheritance" to "IInheritable" 2016-08-10 09:24:48 -06:00
David Sparer
315d90391c Merge branch 'MR-906_default_Inherit_All_not_saved' into develop 2016-08-10 09:14:18 -06:00
David Sparer
869a5fd773 Created several simple unit & integration tests for DefaultConnectionInheritance 2016-08-10 09:06:44 -06:00
David Sparer
9940cfcf12 Minor cleanup of the Config window class 2016-08-10 08:28:35 -06:00
Sean Kaim
463b6cd791 progress bar style 2016-08-09 17:53:02 -04:00
David Sparer
b981516913 Fix issue setting ICAEncryptionStrength through inheritance 2016-08-09 15:50:56 -06:00
David Sparer
9ffdbee400 Fix self-reference initialization error 2016-08-09 15:49:52 -06:00
Sean Kaim
def55c9dfe code formatting/clean up 2016-08-09 17:48:22 -04:00
Sean Kaim
69668c5e55 background transfer 2016-08-09 17:45:46 -04:00
David Sparer
f41adec096 Minor cleanup of ConnectionInfo 2016-08-09 15:25:21 -06:00
David Sparer
3cc56f9886 Minor cleanup of ConnectionInfoInheritance 2016-08-09 15:25:03 -06:00
Sean Kaim
be8b302e20 Merge remote-tracking branch 'refs/remotes/origin/develop' into MR-946_Initial_SSH.NET 2016-08-09 16:58:57 -04:00
Sean Kaim
6da05af387 code clean up & fix complier warnings 2016-08-09 16:58:44 -04:00
Sean Kaim
2eb74afc20 upload with progress bar working 2016-08-09 16:41:46 -04:00
David Sparer
c44bb1e27d Made DefaultConnectionInheritance.SaveTo a generic method to decouple it from Settings 2016-08-09 11:08:06 -06:00
David Sparer
12cd38a047 Made DefaultConnectionInheritance LoadFrom a generic method to decouple it from the Settings class 2016-08-09 11:02:53 -06:00
David Sparer
e5c896cb36 Refactored much of the inheritance code to use System.Reflection instead of hardcoded values.
Refactored DefaultInheritance to its own class which inherits from the ConnectionInfoInheritance class.
Fixed issue with DefaultInheritance not saving to settings.
2016-08-09 10:34:51 -06:00
Sean Kaim
d89a2487e7 Merge remote-tracking branch 'refs/remotes/origin/develop' into MR-946_Initial_SSH.NET 2016-08-08 17:56:10 -04:00
David Sparer
e59f91a976 Minor refactoring 2016-08-05 09:37:22 -06:00
David Sparer
9a80777fe9 Minor code cleanup in ConnectionInfoInheritance 2016-08-05 09:02:17 -06:00
David Sparer
69b1da50b8 Removed redundant namespace qualifier 2016-08-05 08:55:45 -06:00
Sean Kaim
04ada28ffc Latest SSH.NET package 2016-08-04 17:48:26 -04:00
David Sparer
369a6c2f04 Merge branch 'MR-896_RDP_Class_not_registered' into develop 2016-08-04 13:39:37 -06:00
David Sparer
f438fb65f8 Installer now checkes for KB2574819 on win7 before installation can occur 2016-08-04 13:37:36 -06:00
David Sparer
6590011ef1 Refactored the CustomActions for checking if a KB is installed. Made it more generic 2016-08-04 13:36:08 -06:00
David Sparer
b6eb3d2361 Added the CustomActions project to build by default for Release and Debug builds 2016-08-03 13:26:32 -06:00
David Sparer
13b9b77f0d Added exception catching to a CustomAction method 2016-08-03 13:25:38 -06:00
David Sparer
20419856c1 Minor update to changelog 2016-08-03 13:25:02 -06:00
David Sparer
43100930cd update changelog for 1.75 alpha 2 2016-08-03 12:40:56 -06:00
David Sparer
aac7e4cc53 Merge branch 'MR-874_incorrect_rdp_check_in_installer' into develop 2016-08-03 12:16:31 -06:00
David Sparer
1c8f3e2328 Some more code cleanup 2016-08-03 12:10:36 -06:00
David Sparer
a54f0a2e89 Cleaned up some CustomActions code 2016-08-03 12:08:03 -06:00
David Sparer
fdb3cecf8e Refactored CustomActions to extract a class 2016-08-03 12:07:13 -06:00
David Sparer
8762c39dd5 Refactored the way we verify the minimum RDP version is installed. Now, instead of using a dynamically named variable based on the required KB, we boil this down to a statically named variable that indicates if the minimum KB is installed. 2016-08-03 11:57:17 -06:00
David Sparer
fc56c56883 Cleanup of some custom action code 2016-08-03 11:14:36 -06:00
David Sparer
ae950ac075 Use var for local variables in CustomActions file 2016-08-03 10:26:37 -06:00
Sean Kaim
8bbb9a70c6 code clean up, ui tweaks, new backend class 2016-07-29 21:52:06 -04:00
Sean Kaim
e6532dc155 code clean up, Eng translation for reconn all 2016-07-29 15:47:44 -04:00
Sean Kaim
ee6af8c187 Merge pull request #133 from yegorich/reconnect
Add an option to reconnect all opened tabs
2016-07-29 15:32:57 -04:00
David Sparer
bc1a0725df Merge branch 'develop' into MR-942_refactor_connection_loader 2016-07-28 14:56:30 -06:00
Sean Kaim
37905f8249 Add nuget packages to tests 2016-07-28 16:49:44 -04:00
Sean Kaim
8163e7273e Add nuget packages to tests 2016-07-28 16:47:45 -04:00
Yegor Yefremov
58fdba1d89 Add an option to reconnect all opened tabs 2016-07-28 09:40:17 +02:00
Sean Kaim
203dcf714f Initial SSH.NET file transfer
Upload succeeds. UI status/etc needs work.
2016-07-27 22:56:28 -04:00
David Sparer
649f864236 Extracted some methods from the sql connection loader 2016-07-27 12:11:17 -06:00
David Sparer
292f3b03cc Refactored AddNodeFromXml to improve readability 2016-07-27 10:51:47 -06:00
David Sparer
ec8fe3c343 Extracted methods for adding connections / containers to the TreeView 2016-07-27 10:36:37 -06:00
David Sparer
823b0518ae Extracted a method for authenticating protected data 2016-07-27 09:59:41 -06:00
David Sparer
c48caf5bdc Minor cleanup of the Runtime methods that use the connections loader 2016-07-26 14:02:59 -06:00
David Sparer
20bc6d079f Extraced method for expanding folders 2016-07-26 12:45:37 -06:00
David Sparer
dccd318f60 Fixed an oversight with bool initialization 2016-07-26 12:44:24 -06:00
David Sparer
2b0f670fb7 Extracted method for opening connections from last session 2016-07-26 12:42:08 -06:00
David Sparer
b5c431dca8 Extracted more methods 2016-07-26 12:40:38 -06:00
David Sparer
57dd93f136 Extracted method for initializing the root tree node 2016-07-26 12:39:37 -06:00
David Sparer
976e02effb Extracted method to load xml data 2016-07-26 12:19:54 -06:00
David Sparer
396387340a Extracted method to validate confcon file version 2016-07-26 12:15:11 -06:00
David Sparer
d9bf021597 Use object initializer 2016-07-26 12:14:27 -06:00
David Sparer
b4e26f513b Removed unnecessary property from xml connection loader 2016-07-26 11:44:50 -06:00
David Sparer
2eef31f74d Renamed several database related properties to be more generic ("sql" -> "database") 2016-07-26 11:34:47 -06:00
David Sparer
cc96e2b3eb Removed more unused code 2016-07-26 11:30:52 -06:00
David Sparer
4526a0b875 Removed unnecessary using directives 2016-07-26 11:29:24 -06:00
David Sparer
4568bcc0ae Split Xml connection loader to its own class 2016-07-26 11:27:31 -06:00
David Sparer
cf3af14c6a Split connection loader code for Sql to its own class 2016-07-26 11:13:43 -06:00
David Sparer
d320c84bc8 Removed some more redundant code 2016-07-26 10:26:03 -06:00
David Sparer
8eff262e8f Removed redundant code 2016-07-26 10:10:41 -06:00
David Sparer
8c7d90f0c4 Use object initializers 2016-07-26 10:02:16 -06:00
David Sparer
0e189551dd Simplify conditional statements 2016-07-26 09:58:26 -06:00
David Sparer
981acd6510 Modified a few function names to adhere to style guidelines 2016-07-26 09:48:45 -06:00
David Sparer
404aae6bf3 Fixed some spacing and caught a few more place that var should have been used 2016-07-26 09:44:11 -06:00
David Sparer
57cc9b8de4 Import Messages namespace 2016-07-26 09:36:24 -06:00
David Sparer
d2def0a34d Use var for local variable declarations 2016-07-26 09:34:40 -06:00
David Sparer
f1a5e1c029 Renamed fields and properties to adhere to style guide and be more descriptive 2016-07-26 09:19:46 -06:00
David Sparer
19ae192887 Converted properties to auto-properties where possible 2016-07-26 09:16:31 -06:00
Sean Kaim
cc87227559 minor tweaks to AeadCryptographyProvider 2016-07-20 11:33:55 -04:00
Sean Kaim
9ad0c74a56 code clean up 2016-07-15 09:36:34 -04:00
Sean Kaim
55a8b743c8 Fix exception opening in Designer 2016-07-15 09:08:34 -04:00
Sean Kaim
7adb150d1c minor code clean up & logging 2016-07-14 15:33:41 -04:00
David Sparer
afdb392289 Jenkinsfile change may not be working properly. This is a test commit 2016-07-14 12:50:44 -06:00
David Sparer
1c8e24a117 Found a way to simplify the git checkout stage of the Jenkins pipeline 2016-07-14 12:46:52 -06:00
David Sparer
266e79a2c3 Fixed a merge mistake regarding the Geckofx package version 2016-07-14 10:48:15 -06:00
David Sparer
6c5d629a88 Merge branch 'MR-917_Improve_cryptographic_support' into develop
# Conflicts:
#	mRemoteV1/mRemoteV1.csproj
#	mRemoteV1/packages.config
2016-07-14 08:43:16 -06:00
David Sparer
84ed778b67 Merge pull request #131 from jamesrenaud/MR-910_RDP_Gateway_Credentials_Applied_Incorrectly
MR-910 Fixes to support Remote Desktop Gateways
2016-07-13 18:13:58 -06:00
jamesrenaud
c1d41847a2 Removed inline comment per style feedback 2016-07-13 19:07:15 -04:00
David Sparer
73c50837d8 Created class for building and using encrypted secure strings 2016-07-13 12:51:21 -06:00
David Sparer
89075aa3e9 Removed unnecessary crypto experiment 2016-07-13 10:42:44 -06:00
David Sparer
bffe4454ba Moved AeasCryptographyProvider to the mRemoteNG.Security.SymmetricEncryption namespace 2016-07-13 10:34:36 -06:00
David Sparer
69a8f50b58 Moved LegacyRijndaelCryptographyProvider to the mRemoteNG.Security.SymmetricEncryption namespace 2016-07-13 10:32:36 -06:00
David Sparer
8c6f6534b6 Added method to the crypto factory and unit test 2016-07-13 10:10:08 -06:00
David Sparer
791a78154d Fixed a decryption bug introduced while cleaning up code in the LegacyRinjdaelCryptographyProvider class 2016-07-13 09:59:57 -06:00
David Sparer
f08ce0acd5 LegacyRijndaelCryptographyProvider now implements ICryptographyProvider 2016-07-13 09:39:27 -06:00
David Sparer
757b195d5c Made the LegacyRijndaelCryptographyProvider class non-static 2016-07-13 08:41:18 -06:00
David Sparer
c6a39a9220 Rename "Crypt" class to "LegacyRijndaelCryptographyProvider" 2016-07-13 08:22:06 -06:00
David Sparer
a2054b458b Code cleanup on the legacy crypt class 2016-07-13 08:16:06 -06:00
James Renaud
6ee12d447f Fixes to support Remote Desktop Gateways 2016-07-12 22:44:27 -04:00
Hayato Iriumi
f95e3fb719 Merge branch 'develop' of https://github.com/mRemoteNG/mRemoteNG.git 2016-07-11 21:44:16 -07:00
Hayato Iriumi
aa9141505f More Japanese translation 2016-07-11 19:56:09 -07:00
David Sparer
b4f0d2f2ae Removing un-needed experiments 2016-07-11 18:12:44 -06:00
David Sparer
5bc67ab796 Changed default engine from AesFastEngine to AesEngine 2016-07-11 18:07:42 -06:00
David Sparer
4f86e0da62 Added a factory class for instantiating crypto providers 2016-07-11 18:07:22 -06:00
David Sparer
12165ac9a6 Added required property to the ICryptographyProvider interface to get the underlying crypto algorithm 2016-07-11 18:06:28 -06:00
David Sparer
dd783c2dc0 Forgot to save project 2016-07-11 15:43:42 -06:00
David Sparer
4b65086622 Some cleanup 2016-07-11 15:42:48 -06:00
David Sparer
de2542c172 Renamed AesGcm to AeadCryptographyProvider 2016-07-11 15:38:13 -06:00
David Sparer
973de3507e AesGcm does not actually benefit from generics. Removed that support 2016-07-11 15:35:13 -06:00
Sean Kaim
1945d5ac6b Update changelog.txt 2016-07-11 17:27:23 -04:00
Sean Kaim
cb3614d54c Fix LargeAddressAware test 2016-07-11 17:27:01 -04:00
David Sparer
4375f2d5d1 Some cleanup of AesGcm class 2016-07-11 15:23:02 -06:00
David Sparer
92b6cf201e Modified AesGcm to accept different string encodings (besides UTF-8) 2016-07-11 15:17:07 -06:00
David Sparer
b2b53561ba Modified AESGCM to support specifying the block cipher engine through generics 2016-07-11 15:10:43 -06:00
Sean Kaim
73a1923db6 Fix conflicts 2016-07-11 16:25:53 -04:00
David Sparer
76e290f6b7 AESGCM implements ICryptographyProvider 2016-07-11 14:24:22 -06:00
Sean Kaim
be02814021 Update GeckoFx and NUnit nuget packages 2016-07-11 16:22:33 -04:00
David Sparer
d60c007ac6 Make AESGCM non-static 2016-07-11 14:22:20 -06:00
David Sparer
e92c1eaa9d Add some tests for the AesGcm class 2016-07-11 14:17:50 -06:00
David Sparer
8d638602b9 Fix encryptor class 2016-07-11 14:17:28 -06:00
David Sparer
48161aca47 Changed the unit tests to use to Encryptor class, which is a better implementation than the AesCryptographyProvider. 2016-07-11 14:16:20 -06:00
Sean Kaim
11314972fa Merge pull request #129 from mRemoteNG/dockpanelsuite_nuget
Dockpanelsuite nuget packages
2016-07-11 16:16:07 -04:00
David Sparer
83ac202a6b The "AESThenHMAC" file is not particularly helpful. This uses .Net crypto - trying to stick with BouncyCastle 2016-07-11 14:14:29 -06:00
Sean Kaim
02c601fd3a Remove local DockPanelSuite 2016-07-11 16:13:48 -04:00
Sean Kaim
86f6f85142 DockPanelSuite 2.10 Final NuGet packages 2016-07-11 16:12:32 -04:00
David Sparer
ca4cb433a9 Testing another implementation for crypto 2016-07-11 13:41:07 -06:00
David Sparer
e5bed0afcb Testing out some encryption implementations 2016-07-11 13:39:30 -06:00
Sean Kaim
11cf85f771 Delete "old installer" files 2016-07-11 15:01:03 -04:00
Sean Kaim
18d7a9cfe9 Update to correct chat room. 2016-07-11 14:23:19 -04:00
David Sparer
b3bac32441 Moved enhancements made in the CredentialManager branch to a dedicated branch 2016-07-11 11:41:42 -06:00
Sean Kaim
0b9fb06c08 fix Gitter badge 2016-07-11 12:44:04 -04:00
Sean Kaim
c6219ff315 Gitter badge 2016-07-11 12:42:30 -04:00
Sean Kaim
2b7668aa68 Updated installer post build steps 2016-07-08 17:59:25 -04:00
Sean Kaim
c8a684e10d Add readme.txt back (no markdown syntax) 2016-07-08 17:18:29 -04:00
Sean Kaim
5a5d675f3e Update version to 1.75 2016-07-08 17:09:02 -04:00
Sean Kaim
a4acc60f1d Updated change log
Fixed some formatting issues
2016-07-08 17:02:34 -04:00
Sean Kaim
b3bc04251b Update .gitignre
.editorconfig is a user preference
2016-07-08 17:01:50 -04:00
Sean Kaim
203111eb5a Revert "Update .gitignore"
This reverts commit 472168b9e4.
2016-07-08 17:01:16 -04:00
Sean Kaim
472168b9e4 Update .gitignore 2016-07-08 17:00:53 -04:00
Sean Kaim
328ebbe3f7 Merge pull request #127 from mRemoteNG/MR-902_vncsharp_lib_updates
MR-902 vncsharp lib updates
2016-07-08 16:52:31 -04:00
Sean Kaim
999cd19d81 Updated dll including fixes from VncSharpNG.dll
Updated credits.txt

Sent changes to upstream: https://github.com/humphd/VncSharp/pull/21
2016-07-08 16:49:53 -04:00
Sean Kaim
d23f6a69e5 MR-905 - Crash at startup
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidCastException
Stack:
at
mRemoteNG.App.CompatibilityChecker.FipsPolicyEnabledForServer2008AndNewer()
at mRemoteNG.App.CompatibilityChecker.CheckFipsPolicy()
at mRemoteNG.App.CompatibilityChecker.CheckCompatibility()
at mRemoteNG.App.Startup.InitializeProgram()
at mRemoteNG.App.ProgramRoot.StartApplication()
at mRemoteNG.App.ProgramRoot.Main(System.String[])
2016-07-08 13:42:13 -04:00
Sean Kaim
38c7fe9e0a links/formatting 2016-07-06 11:32:46 -04:00
Sean Kaim
dc02f51a15 Twitter shield linking to wrong page/formatting 2016-07-06 11:30:28 -04:00
Sean Kaim
dd7ea02c9f one last time - readme formatting 2016-07-06 10:23:57 -04:00
Sean Kaim
5e0bf0da6e more readme formatting 2016-07-06 10:19:20 -04:00
Sean Kaim
f2f4b14f5e Readme formatting 2016-07-06 10:18:27 -04:00
Sean Kaim
e27b4fa2f9 Twitter Sheild 2016-07-06 10:10:15 -04:00
Sean Kaim
c71a57bd69 Fix download stats 2016-07-06 09:58:09 -04:00
Sean Kaim
8c57b271d8 Download stats shield 2016-07-06 09:54:29 -04:00
Sean Kaim
e167602a32 Update build status 2016-07-06 09:52:20 -04:00
Sean Kaim
590f4ba2c6 Build status shield 2016-07-06 09:51:01 -04:00
Sean Kaim
b2c0dc235c Basic necessary changes
Upstream VncSharp doesn't support Ctrl + C currently.
2016-07-02 14:48:16 -04:00
Sean Kaim
f357a53e0e code clean up 2016-06-30 12:00:35 -04:00
Sean Kaim
5f7d1f9f3f Merge pull request #123 from mRemoteNG/Release_v1.74
MR-874: Added work-around to installer to ignore installation prereq
2016-06-30 10:18:38 -04:00
David Sparer
5ebd255a22 MR-874: Added work-around to installer to ignore installation prerequisites 2016-06-28 08:26:25 -06:00
Sean Kaim
010c0a5061 Merge pull request #121 from mRemoteNG/Release_v1.74
Merge latest 1.74 fixes into develop
2016-06-28 10:21:36 -04:00
Sean Kaim
6ec4bdd926 Updated change log 2016-06-28 10:09:35 -04:00
Sean Kaim
fe023b798d MR-884 - Slow startup
https://blogs.technet.microsoft.com/markrussinovich/2009/05/23/the-case-of-the-slow-keynote-demo/

https://msdn.microsoft.com/en-us/library/cc656914(v=vs.100).aspx#Anchor_8
2016-06-28 10:06:48 -04:00
Sean Kaim
141c916b7b MR-884: Attempt to optimize startup 2016-06-27 11:46:41 -04:00
Sean Kaim
f160e456ae Merge pull request #120 from mRemoteNG/Release_v1.74
Merge latest 1.74 fixes into develop
2016-06-27 10:47:34 -04:00
Sean Kaim
49c6219a84 MR-854: Additional code clean up
New (.NET) method for getting file icons.
Additional ReShaper fixes
Additional null checks/protections
2016-06-25 21:34:32 -04:00
Sean Kaim
0db444e78c MR-854: Code Clean up and logging 2016-06-24 13:08:35 -04:00
Sean Kaim
57c2dc0a88 Fix log message for debugging exception 2016-06-24 12:21:40 -04:00
Sean Kaim
15ba2d3156 Fix incorrect Language Selection on Reconnect 2016-06-24 12:11:41 -04:00
David Sparer
48e2ba11bf Resolved MR-882 by removing a ProtocolType enum value that was being tested some time back. This should not have made it into the develop branch. 2016-06-24 08:21:59 -06:00
David Sparer
2a3fc01937 Merge branch 'Release_v1.74' into develop 2016-06-23 09:58:48 -06:00
David Sparer
aa3e8344fb Modified installer postbuild actions to only attempt to sign the MSI during Release builds 2016-06-23 09:58:16 -06:00
David Sparer
df5e619349 - Moved the PuTTYNG dependency file to $(SolutionDir)\Resources
- Added postbuild task to mRemoteV1 project to copy PuTTYNG file to $(TargetDir)
- Modified installer to point to the new PuTTYNG location
2016-06-23 09:57:46 -06:00
Sean Kaim
0c06983411 MR-875 - Win native compress can't extract
Removed LZMA options
Checked for file existance
2016-06-22 10:11:54 -04:00
Sean Kaim
dda9c1f1af Additional fixes for MR-872
Additional code clean up
Fixed some casting errors likely from the initial c# conversion
2016-06-22 09:35:01 -04:00
Sean Kaim
6779a02cf9 MR-872: Prevent outofbounds ex parsing args 2016-06-21 15:30:07 -04:00
David Sparer
7671328245 Merge branch 'Release_v1.74' into develop 2016-06-20 15:18:38 -06:00
David Sparer
ba7608602b Restricted code signing postbuild task to only Release configurations 2016-06-20 12:52:04 -06:00
David Sparer
92dcd8981d Fixed bug with Help window where clicking a treenode that does not have a .html file associated with it would produce an error. 2016-06-20 12:51:25 -06:00
David Sparer
cbe18b70ca Fixed bug when clicking the root tree node in the Help window 2016-06-20 12:46:47 -06:00
David Sparer
ab26b94808 Remove references to the Help page for Sessions. This feature was removed 2016-06-20 12:38:29 -06:00
David Sparer
0e176cee74 Point postbuild action at the correct location of build-relport 2016-06-20 11:53:05 -06:00
David Sparer
23eaba0d47 - Added scripts to rename and copy the MSI installer to the $(SolutionDir)\Release folder
- Added conditional post build to run the build-relport script when building the Release Portable configuration
2016-06-20 11:52:01 -06:00
David Sparer
c6b079c9cb Moved build-relport.cmd to Tools directory 2016-06-20 11:50:08 -06:00
Sean Kaim
9d544fa7fe Updated date. 2016-06-20 10:25:55 -04:00
Sean Kaim
8aba1be3e6 Remove sessions.htm 2016-06-20 10:24:00 -04:00
Sean Kaim
72d28c5219 Minor build fixes 2016-06-20 10:19:12 -04:00
David Sparer
85dc45a479 Merge branch 'Release_v1.74' into develop 2016-06-19 20:23:06 -06:00
David Sparer
283714f88c - Moved various build tools to the Tools folder
- Modified the build-relport script to point to the Tools folder for its required external programs
2016-06-19 20:12:18 -06:00
David Sparer
eb696b49fe Merge branch 'Release_v1.74' into develop 2016-06-19 08:53:42 -06:00
David Sparer
063be0dbe2 Move all files under "Installer Projects" to "InstallerProjects" to make post build tasks a bit easier 2016-06-18 16:50:01 -06:00
David Sparer
1e4656769e - Began tracking changes to the signing script.
- Added post build event for moving Resources\Help to the correct location
- Added post build events for removing unnecessary files for all "Release" configurations
- Removed lines from the release portable script that are now present in the post build events
2016-06-18 12:03:00 -06:00
David Sparer
3079cad8d6 Somehow this file was not being tracked correctly 2016-06-18 12:01:22 -06:00
Sean Kaim
d5c86b91c3 Updated change log and help files 2016-06-17 17:37:57 -04:00
David Sparer
d5de0b8fa3 Modified postbuild actions to sign the binaries. This will only run if a specific script exists 2016-06-17 12:41:45 -06:00
Sean Kaim
167c02f433 Don't build by default, just package 2016-06-17 08:47:51 -04:00
David Sparer
327e03c3b1 Turned debugging symbol generation off for Release and Release Portable configurations 2016-06-16 19:27:29 -06:00
David Sparer
5304ecb71d Prevent .pdb files from being harvested for the installer 2016-06-16 19:20:33 -06:00
Sean Kaim
64dfa2fa33 Updated Assembly Info 2016-06-16 16:28:34 -04:00
Sean Kaim
8f6431f657 fix display issues on about screen 2016-06-16 16:26:12 -04:00
Sean Kaim
5a59c8c179 Merge pull request #118 from mRemoteNG/develop
merge develop into release (again)
2016-06-16 16:16:09 -04:00
Sean Kaim
2a7fa03df1 3G -> NG 2016-06-16 16:14:15 -04:00
David Sparer
be009d55f4 Jenkinsfile: add support for branches with a period (.) in the name 2016-06-16 14:10:01 -06:00
Sean Kaim
d8789926a7 Updated Credits 2016-06-16 16:09:15 -04:00
Sean Kaim
e7de6bd42b French Spell and typographic checking
From @SebThieu
2016-06-16 16:05:31 -04:00
David Sparer
3f6b70e783 Few changes to build configurations.
- Removed the 'AnyCPU' platform. Should always use x86
- Removed installer projects from being built by default in Release configuration
2016-06-16 13:59:42 -06:00
Sean Kaim
d1ab5cc40f Merge pull request #117 from mRemoteNG/develop
merge develop into release
2016-06-16 12:17:15 -04:00
Sean Kaim
a8376ebb96 fix a typo in the changelog. 2016-06-16 12:10:06 -04:00
Sean Kaim
f0456cce0e minor change log update 2016-06-16 12:09:33 -04:00
David Sparer
bc46f8c432 Merge branch 'develop' of github.com:mRemoteNG/mRemoteNG into develop 2016-06-14 15:23:44 -06:00
Sean Kaim
4de8a8e915 More detailed messages for RDP Disconnected events 2016-06-14 16:46:55 -04:00
David Sparer
4f0d425711 - Created a unit test to verify that the LARGEADDRESSAWARE flag is set on mRemoteNG.exe
- Created configurations for the unit test project to support the PORTABLE compilation symbol. This is required for the unit test to work correctly.
2016-06-14 14:28:45 -06:00
Sean Kaim
7679c255f3 better compression for the portable zip 2016-06-14 16:26:14 -04:00
David Sparer
3027ba6dc7 Fixed issue with setting LARGEADDRESSAWARE flag on the binary 2016-06-14 13:36:08 -06:00
Sean Kaim
9b556436bb Spell check and other minor updates
"offiginally" - seriously?  😕
2016-06-11 17:35:14 -04:00
Sean Kaim
1c84205a5e Updated Changelog 2016-06-11 17:08:02 -04:00
Sean Kaim
d39373a4f5 Remove files that are no longer needed 2016-06-10 09:08:55 -04:00
Sean Kaim
3dbfdf3b5b Merge pull request #116 from mRemoteNG/GeckoFx
Replaced XULRunner with GeckoFx
2016-06-10 09:02:55 -04:00
David Sparer
286cfc961e Set the unit tests to always build with "AnyCpu" configuration 2016-06-09 16:37:52 -06:00
David Sparer
3148879bf7 Removed the installer projects from being built in the Debug, Debug Portable, and Release Portable build configurations. 2016-06-09 16:20:36 -06:00
David Sparer
70924b6823 Modified jenkinsfile to force build server to build x86 2016-06-09 15:54:29 -06:00
Sean Kaim
2a63fe6a09 build fix 2016-06-09 17:42:49 -04:00
Sean Kaim
91c09ebd7e Fix jenkins unit test build/run 2016-06-09 17:39:42 -04:00
David Sparer
4957e62765 Fixed a missing apostrophe in the jenkinsfile 2016-06-09 14:57:10 -06:00
David Sparer
80ef32b8b5 Updated the jenkinsfile to restore nuget packages before build. This is done automatically in VS2015 but not in msbuild. 2016-06-09 14:55:26 -06:00
Sean Kaim
39bf3e754d Clarify option 2016-06-09 12:20:15 -04:00
hiriumi
3d8c0ce181 More Japanese translations 2016-06-09 08:26:54 -07:00
hiriumi
07042d16b0 More Japanese translation. About 60% done. 2016-06-08 13:02:48 -07:00
hiriumi
fce583a346 Option page weren't displaying target language so I added apply language in frmOptions. 2016-06-08 10:16:45 -07:00
hiriumi
7ba5a3b8cd Merge branch 'develop' of https://github.com/mRemoteNG/mRemoteNG.git 2016-06-08 10:07:56 -07:00
Sean Kaim
ae16c021da Remove XULRunner path from settings 2016-06-08 10:40:29 -04:00
Sean Kaim
70ff34438f Update component check for GeckoFx 2016-06-08 10:00:23 -04:00
Sean Kaim
b105585f5a Update Credits.txt 2016-06-07 16:12:16 -04:00
Sean Kaim
29c7859ea1 Replace XULRunner with GeckoFX 2016-06-07 15:43:44 -04:00
Sean Kaim
678194f4f7 minor code clean up 2016-06-07 10:41:56 -04:00
hiriumi
60353be2c0 Japanese translation 2016-06-06 07:05:35 -07:00
Sean Kaim
6410acbb48 minor tweaks to the port scan UI
This seems like a better user experience.  This will also allow for
further (future) changes in the import window when using custom ports
and have it make even more sense.
2016-06-05 14:55:31 -04:00
Sean Kaim
731c2e22b8 PortScan: Actually scan asynchronously
Speeds up the port scan signifigantly
2016-06-05 14:09:51 -04:00
Sean Kaim
cd950f39b4 refactor/cleanup + make portscan work
The non-import version of a portscan didn't test any ports and never
found any open ports (due to backwards logic).
2016-06-04 23:34:51 -04:00
Sean Kaim
8cbf56f7a5 Build FilteredPropertyGrid into mRemoteNG
No longer load the dll.
Makes the small amount of source more maintainable then from the code
project.
Gets rebuilt with latest build env.
2016-06-03 22:13:12 -04:00
David Sparer
17f986ea26 Few fixes for casting errors. These occurred due to commit e5f9fce01e 2016-06-03 15:56:15 -06:00
David Sparer
e5f9fce01e Cleaned up WindowPlacement class by moving native Win32 functions to the NativeMethods class 2016-06-03 15:53:11 -06:00
David Sparer
4c34a88a10 Cleaned up ProcessController tool by moving all native win32 methods to the NativeMethods class 2016-06-03 15:40:09 -06:00
David Sparer
324d34aa3c Moved the TreeImageType to the mRemoteNG.Tree namespace. Removed all references to the mRemoteNG.Images namespace, which no longer exists. 2016-06-03 15:24:01 -06:00
David Sparer
3f984fb65e Removed unused file (contained enum had no references) 2016-06-03 15:19:18 -06:00
David Sparer
c108c60c30 Merge branch 'release/v1.74' into develop 2016-06-03 15:11:44 -06:00
David Sparer
cf1a84f4b2 Resolved MR-855 - Resource not found error when testing proxy settings.
This was introduced in 634df366bd
2016-06-03 15:10:19 -06:00
hiriumi
350afcdb70 more Japanese translations 2016-06-03 12:01:20 -07:00
hiriumi
e5b319e518 Added question mark to MessageBox and more Japanese translation. 2016-06-02 17:07:45 -07:00
David Sparer
a43785d1f0 Small cleanup in Startup.cs 2016-06-02 15:29:24 -06:00
David Sparer
b90981a17c Made a couple more Startup methods non-static 2016-06-02 15:26:51 -06:00
David Sparer
47bbe20001 Startup: clean up some 'using' directives and sort them 2016-06-02 15:23:42 -06:00
David Sparer
668b9dd903 Refactored some Startup functions to their own class 2016-06-02 15:22:22 -06:00
David Sparer
6ca98149a7 Made Startup slightly less static 2016-06-02 15:21:30 -06:00
David Sparer
af2de33809 Forgot to save project when deleting the ApplicationEvents file... I do this a lot it seems. 2016-06-02 14:59:02 -06:00
Sean Kaim
737054873e Update Credits.txt 2016-06-02 16:46:23 -04:00
Sean Kaim
1dd0961a48 Just a comment... 2016-06-02 16:35:39 -04:00
David Sparer
3fcb6bcbd0 Removed unnecessary file. These functions were reimplemented in commit 996af9b268 2016-06-02 14:28:59 -06:00
David Sparer
53660cc7dc Merge branch 'release/v1.74' into develop 2016-06-02 13:49:21 -06:00
David Sparer
996af9b268 Fixed MR-852 - Option "Allow only a single instance of the application" non-functional 2016-06-02 13:47:04 -06:00
Sean Kaim
512044617c Last VB references removed 2016-06-02 15:45:47 -04:00
Sean Kaim
a91f712735 Remove more VB referneces 2016-06-02 14:35:12 -04:00
Sean Kaim
fb7a0fcb50 Remove VB references + fix exception 2016-06-02 14:34:56 -04:00
David Sparer
749ed5432b Merge branch 'release/v1.74' into develop 2016-06-01 11:17:10 -06:00
David Sparer
53be4c259e Fixed MR-847 - Renaming folder in connection tree does not update config panel name 2016-06-01 11:16:47 -06:00
Sean Kaim
e32630511d fix portable build
Move help files to proper location
Don't include unnecessary files
2016-06-01 10:51:02 -04:00
Sean Kaim
c9a6d69d6f README update 2016-05-31 22:38:37 -04:00
Sean Kaim
5a78a71316 Merge branch 'develop' of https://github.com/mRemoteNG/mRemoteNG into develop 2016-05-31 21:07:47 -04:00
Sean Kaim
da9680d210 Minor form changes
Ported from PR #105
Thanks @aplocher
2016-05-31 21:06:56 -04:00
Sean Kaim
1ec37d657d Minor form changes
Ported from PR #105
2016-05-31 21:04:58 -04:00
Sean Kaim
99df3df42c avoid exception when disposing external tools items
Similar to #114
Thanks @Brandhor
2016-05-31 20:53:10 -04:00
David Sparer
1c83609971 Merge pull request #114 from Brandhor/exttools
External Tools Fixes
2016-05-31 17:59:55 -06:00
Brandon
32da8433bb avoid exception when disposing external tools items 2016-06-01 01:05:15 +02:00
Brandon
485536dc90 fix launching external tools 2016-06-01 00:46:14 +02:00
David Sparer
0b605ddb70 Merge branch 'release/v1.74' into develop 2016-05-31 16:24:32 -06:00
David Sparer
755d7b0742 Resolved MR-846 - help files not being copied with installer 2016-05-31 15:31:47 -06:00
Sean Kaim
15030ab7cb Release Portable Build script 2016-05-31 16:59:06 -04:00
hiriumi
a438d6c3c3 Merging Japanese translation 2016-05-31 09:33:24 -07:00
hiriumi
865a926047 saving Japanese translation. 2016-05-31 09:27:56 -07:00
Sean Kaim
a36ec166cf Initial 1.74 Changelog update 2016-05-31 12:27:06 -04:00
504 changed files with 29635 additions and 107413 deletions

60
.github/CONTRIBUTING.md vendored Normal file
View File

@@ -0,0 +1,60 @@
# Welcome!
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.
### 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.
### Bug reports
A bug is any behavior that does not consistently produce the expected result.
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.
1. Please tag your your bug report with the [`Bug`](https://github.com/mRemoteNG/mRemoteNG/issues?q=is%3Aissue+is%3Aopen+label%3ABug) label.
### 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.
- Please tag your feature request with the [`Feature Request`](https://github.com/mRemoteNG/mRemoteNG/issues?q=is%3Aissue+is%3Aopen+label%3A%22Feature+Request%22) label.
# 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 :(

16
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,16 @@
<!--
Only file GitHub issues for bugs and feature requests. All other topics will be closed.
Before opening an issue, please search for a duplicate or closed issue.
Please provide as much detail as possible for us to fix your issue.
-->
<!-- Bug -->
|||
|--:|---|
|Operating system | Windows 7 x64 |
|mRemoteNG version| 1.75 aplha 3 |
<!-- Feature Request -->
<!-- If you file a feature request, please delete the bug section -->

4
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,4 @@
<!--
Please provide as much detail as possible with what your pull request does.
Include a reference to a filed issue if it exists.
-->

BIN
.github/icon_ReSharper.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

10
.gitignore vendored
View File

@@ -279,3 +279,13 @@ Installer/Resources/License.rtf
Installer/Fragments/FilesFragment.wxs
Installer Projects/Installer/Resources/License.rtf
Installer Projects/Installer/Fragments/FilesFragment.wxs
Installer Projects/Installer/Fragments/HelpFilesFragment.wxs
InstallerProjects/Installer/Fragments/FilesFragment.wxs
InstallerProjects/Installer/Resources/License.rtf
# user preference: .editorconfig - http://editorconfig.org/
.editorconfig
# gh-pages info
runlocal.bat
/_site

File diff suppressed because it is too large Load Diff

View File

@@ -1,20 +1,34 @@
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)
Tony Lambert
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
Felix Deimel
Holger Henke
Tom Hiller
Riley McArdle
Apisitt Rattana
Andreas Rehm
David Vidmar
David Sparer
Hayato Iriumi
Sean Kaim
github.com/Brandhor
github.com/Kvarkas
Translators
@@ -24,6 +38,9 @@ Eugenio "Ryo567" Mart
Mathieu Pape
Emanuel Silva
Robert Siwiec
Hayato Iriumi
Sebastien Thieury (github.com/SebThieu)
Riza Emet
Included Source Code
@@ -34,15 +51,18 @@ Copyright
MIT License
http://www.codeproject.com/KB/recipes/command_line.aspx
DotNetVer
Copyright <20> 2010 David Grinberg
Copyright <20> 2010-2011 Brandon Hansen
http://nsis.sourceforge.net/DotNetVer
FilteredPropertyGrid
Copyright <20> 2006 Azuria
http://www.codeproject.com/KB/cs/FilteredPropertyGrid.aspx
Hotkey Selection Control for .NET
Copyright <20> 2006 Thomas Backman
http://www.codeproject.com/Articles/15085/A-simple-hotkey-selection-control-for-NET
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
@@ -56,24 +76,15 @@ Copyright
Copyright <20> 2008 Felix Deimel
http://www.codeproject.com/KB/selection/ADPickerCtrl.aspx
DiffieHellman 1.0
Copyright <20> 2003 The Mentalis.org Team
Modified New BSD License
http://www.mentalis.org/
DockPanel Suite 2.3.1
Copyright <20> 2007 Weifen Luo
DockPanel Suite 2.10.0
Copyright <20> 2016 @roken and @lextm (formerly Weifen Luo)
MIT License
http://sourceforge.net/projects/dockpanelsuite/
https://github.com/dockpanelsuite/dockpanelsuite
FilteredPropertyGrid 1.0.0.0
Copyright <20> 2006 Azuria
http://www.codeproject.com/KB/cs/FilteredPropertyGrid.aspx
GeckoFX 1.8.1.4
Copyright <20> 2008 Skybound Software
Mozilla Public License 1.1
http://www.geckofx.org/
GeckoFX 45
Copyright <20> 2016 Tom Hindle
Mozilla Public License
https://bitbucket.org/geckofx/
log4net 1.2.15.0
Copyright <20> 2001-2015 The Apache Software Foundation
@@ -85,32 +96,22 @@ Copyright
Freely redistributable with attribution
http://www.dotnetmagic.com/magic_download.html
Mentalis.org Security Library 1.0.13.715
Copyright <20> 2002-2005 The Mentalis.org Team
Modified New BSD License
http://www.mentalis.org/
MiniGeckoBrowser 1.0
Copyright <20> 2008 Felix Deimel
http://www.appjuice.org/
PuTTY 0.67
Copyright <20> 1997-2016 Simon Tatham
MIT License
http://www.chiark.greenend.org.uk/~sgtatham/putty/
SharpSSH 1.1.1.13
Copyright <20> 2002-2008 Atsuhiko Yamanaka, JCraft, Inc.
Copyright <20> 2007 Tamir Gal
BSD Style License
http://www.tamirgal.com/blog/page/SharpSSH.aspx
Silk Icon Set
Copyright <20> 2005-2008 FAMFAMFAM
Creative Commons Attribution 2.5 License
http://www.famfamfam.com/
VncSharp 1.0
SSH.NET v2016.0.0
Copyright <20> 2016
MIT License
https://github.com/sshnet/SSH.NET
VncSharp 1.1
Copyright <20> 2004-2009 David Humphrey
GNU General Public License (GPL) Version 2
http://cdot.senecac.on.ca/projects/vncsharp/
https://github.com/humphd/VncSharp

View File

@@ -1,60 +0,0 @@
using Microsoft.Deployment.WindowsInstaller;
namespace CustomActions
{
public class CustomActions
{
[CustomAction]
public static ActionResult IsKBInstalled(Session session)
{
session.Log("Begin IsKBInstalled");
string kb = session["KB"];
session.Log("Checking if '{0}' is installed", kb);
InstalledWindowsUpdateGatherer updateGatherer = new InstalledWindowsUpdateGatherer();
bool isUpdateInstalled = updateGatherer.IsUpdateInstalled(kb);
session.Log("KB is installed = '{0}'", isUpdateInstalled);
if (isUpdateInstalled)
{
session[kb] = "1";
session.Log("Set property '{0}' to '1'", kb);
}
else
{
session[kb] = "0";
session.Log("Set property '{0}' to '0'", kb);
}
session.Log("End IsKBInstalled");
return ActionResult.Success;
}
[CustomAction]
public static ActionResult IsLegacyVersionInstalled(Session session)
{
session.Log("Begin IsLegacyVersionInstalled");
UninstallNSISVersions uninstaller = new UninstallNSISVersions();
if (uninstaller.IsLegacymRemoteNGInstalled())
{
session["LEGACYVERSIONINSTALLED"] = "1";
}
else
{
session["LEGACYVERSIONINSTALLED"] = "0";
}
session.Log("End IsLegacyVersionInstalled");
return ActionResult.Success;
}
[CustomAction]
public static ActionResult UninstallLegacyVersion(Session session)
{
session.Log("Begin UninstallLegacyVersion");
UninstallNSISVersions uninstaller = new UninstallNSISVersions();
string uninstallString = uninstaller.GetLegacyUninstallString();
uninstaller.UninstallLegacyVersion(true);
session.Log("End UninstallLegacyVersion");
return ActionResult.Success;
}
}
}

View File

@@ -1,54 +0,0 @@
using System;
using System.Management;
using System.Collections;
namespace CustomActions
{
public class InstalledWindowsUpdateGatherer
{
private ManagementScope _managementScope;
private ManagementClass _managementClass;
public InstalledWindowsUpdateGatherer()
{
_managementScope = Connect();
_managementClass = new ManagementClass("Win32_QuickFixEngineering");
}
public ManagementScope Connect()
{
try
{
return new ManagementScope(@"root\cimv2");
}
catch (ManagementException e)
{
Console.WriteLine("Failed to connect", e.Message);
throw;
}
}
public ArrayList GetInstalledUpdates()
{
string query = "SELECT * FROM Win32_QuickFixEngineering";
ArrayList installedUpdates = new ArrayList();
ManagementObjectSearcher searcher = new ManagementObjectSearcher(_managementScope, new ObjectQuery(query));
foreach(ManagementObject queryObj in searcher.Get())
{
installedUpdates.Add(queryObj["HotFixID"]);
}
return installedUpdates;
}
public bool IsUpdateInstalled(string KB)
{
bool updateIsInstalled = false;
string query = string.Format("SELECT HotFixID FROM Win32_QuickFixEngineering WHERE HotFixID='{0}'", KB);
ManagementObjectSearcher searcher = new ManagementObjectSearcher(_managementScope, new ObjectQuery(query));
if (searcher.Get().Count > 0)
updateIsInstalled = true;
return updateIsInstalled;
}
}
}

View File

@@ -1,81 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Win32;
using System.Diagnostics;
using System.IO;
namespace CustomActions
{
public class UninstallNSISVersions
{
private const string REGISTRY_PATH = "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\mRemoteNG";
private const string REGISTRY_PATH_Wow6432 = "Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\mRemoteNG";
private RegistryKey _activeRegistryPath;
public UninstallNSISVersions()
{
GetLegacymRemoteNGRegistryKeyPath();
}
public void UninstallLegacyVersion(bool Silent = false)
{
if (!IsLegacymRemoteNGInstalled())
return;
string uninstallString = GetLegacyUninstallString();
string forceNonTempUninstaller = string.Format("_?={0}", uninstallString.Replace("Uninstall.exe", "").Replace(@"""", ""));
string silentUninstall = "";
if (Silent)
{
silentUninstall = "/S";
}
ProcessStartInfo processStartInfo = new ProcessStartInfo(uninstallString);
processStartInfo.UseShellExecute = true;
processStartInfo.Arguments = string.Format("{0} {1}", forceNonTempUninstaller, silentUninstall);
Process uninstallProcess = Process.Start(processStartInfo);
while (uninstallProcess.HasExited == false)
{
Debug.WriteLine("Waiting for uninstaller to exit");
}
}
public bool IsLegacymRemoteNGInstalled()
{
return (_activeRegistryPath != null);
}
public string GetLegacyUninstallString()
{
if (IsLegacymRemoteNGInstalled())
return _activeRegistryPath.GetValue("UninstallString").ToString();
return "";
}
private void GetLegacymRemoteNGRegistryKeyPath()
{
GetUninstallKeyPath();
GetUninstallKeyPath6432();
}
private void GetUninstallKeyPath()
{
try
{
_activeRegistryPath = Registry.LocalMachine.OpenSubKey(REGISTRY_PATH);
}
catch (Exception ex)
{ }
}
private void GetUninstallKeyPath6432()
{
try
{
_activeRegistryPath = Registry.LocalMachine.OpenSubKey(REGISTRY_PATH_Wow6432);
}
catch (Exception ex)
{ }
}
}
}

View File

@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?include $(sys.CURRENTDIR)Includes\Config.wxi?>
<Fragment>
<CustomAction Id="SetRDP80KBValue" Return="check" Execute="immediate" Property="KB" Value="$(var.RDP80KB)" />
<CustomAction Id="CheckIfRDP80Installed" Return="check" Execute="immediate" BinaryKey="CustomActions.CA.dll" DllEntry="IsKBInstalled" />
</Fragment>
<Fragment>
<CustomAction Id="SetRDP81KBValue" Return="check" Execute="immediate" Property="KB" Value="$(var.RDP81KB)" />
<CustomAction Id="CheckIfRDP81Installed" Return="check" Execute="immediate" BinaryKey="CustomActions.CA.dll" DllEntry="IsKBInstalled" />
</Fragment>
</Wix>

View File

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<DirectoryRef Id="APPLICATIONROOTDIRECTORY">
<Component Id="C.PuttyNGFile" Guid="*">
<File Id="PuttyNGFile" Name="PuTTYNG.exe" Source="Dependencies\PuTTYNG.exe" KeyPath="yes" />
</Component>
</DirectoryRef>
</Fragment>
</Wix>

View File

@@ -0,0 +1,56 @@
using Microsoft.Deployment.WindowsInstaller;
namespace CustomActions
{
public class CustomActions
{
[CustomAction]
public static ActionResult IsMinimumRdpVersionInstalled(Session session)
{
var acceptedRdpKbVariables = new[] { session["RDP80_KB"], session["RDP81_KB"] };
var returnVariable = "MINIMUM_RDP_VERSION_INSTALLED";
var kbInstalledChecker = new KbInstalledChecker(session);
kbInstalledChecker.Execute(acceptedRdpKbVariables, returnVariable);
return ActionResult.Success;
}
[CustomAction]
public static ActionResult IsRdpDtlsUpdateInstalled(Session session)
{
var kb = session["RDP_DTLS_KB"];
var returnVar = "RDP_DTLS_UPDATE_INSTALLED";
var kbInstalledChecker = new KbInstalledChecker(session);
kbInstalledChecker.Execute(kb, returnVar);
return ActionResult.Success;
}
[CustomAction]
public static ActionResult IsLegacyVersionInstalled(Session session)
{
session.Log("Begin IsLegacyVersionInstalled");
var uninstaller = new UninstallNsisVersions();
if (uninstaller.IsLegacymRemoteNgInstalled())
{
session["LEGACYVERSIONINSTALLED"] = "1";
}
else
{
session["LEGACYVERSIONINSTALLED"] = "0";
}
session.Log("End IsLegacyVersionInstalled");
return ActionResult.Success;
}
[CustomAction]
public static ActionResult UninstallLegacyVersion(Session session)
{
session.Log("Begin UninstallLegacyVersion");
var uninstaller = new UninstallNsisVersions();
uninstaller.GetLegacyUninstallString();
uninstaller.UninstallLegacyVersion(true);
session.Log("End UninstallLegacyVersion");
return ActionResult.Success;
}
}
}

View File

@@ -45,9 +45,10 @@
</ItemGroup>
<ItemGroup>
<Compile Include="CustomActions.cs" />
<Compile Include="KbInstalledChecker.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="InstalledWindowsUpdateGatherer.cs" />
<Compile Include="UninstallNSISVersions.cs" />
<Compile Include="InstalledWindowsUpdateChecker.cs" />
<Compile Include="UninstallNsisVersions.cs" />
<Content Include="CustomAction.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

View File

@@ -0,0 +1,72 @@
using System;
using System.Management;
using System.Collections;
using System.Collections.Generic;
namespace CustomActions
{
public class InstalledWindowsUpdateChecker
{
private readonly ManagementScope _managementScope;
public InstalledWindowsUpdateChecker()
{
_managementScope = Connect();
}
public ManagementScope Connect()
{
try
{
return new ManagementScope(@"root\cimv2");
}
catch (ManagementException e)
{
Console.WriteLine($"Failed to connect: {e.Message}");
throw;
}
}
public ArrayList GetInstalledUpdates()
{
const string query = "SELECT * FROM Win32_QuickFixEngineering";
var installedUpdates = new ArrayList();
var searcher = new ManagementObjectSearcher(_managementScope, new ObjectQuery(query));
foreach(var o in searcher.Get())
{
var queryObj = (ManagementObject) o;
installedUpdates.Add(queryObj["HotFixID"]);
}
return installedUpdates;
}
public bool IsUpdateInstalled(string kb) => IsUpdateInstalled(new[] {kb});
public bool IsUpdateInstalled(IEnumerable<string> kbList)
{
var updateIsInstalled = false;
var whereClause = BuildWhereClauseFromKbList(kbList);
if (whereClause == "") return false;
var query = $"SELECT HotFixID FROM Win32_QuickFixEngineering WHERE {whereClause}";
var searcher = new ManagementObjectSearcher(_managementScope, new ObjectQuery(query));
if (searcher.Get().Count > 0)
updateIsInstalled = true;
return updateIsInstalled;
}
private string BuildWhereClauseFromKbList(IEnumerable<string> kbList)
{
var whereClause = "";
var counter = 0;
foreach (var kb in kbList)
{
if (counter > 0)
whereClause += " OR ";
whereClause += $"HotFixID='{kb}'";
counter++;
}
return whereClause;
}
}
}

View File

@@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using Microsoft.Deployment.WindowsInstaller;
namespace CustomActions
{
public class KbInstalledChecker
{
private readonly Session _session;
private readonly InstalledWindowsUpdateChecker _installedUpdateChecker;
public KbInstalledChecker(Session session)
{
_installedUpdateChecker = new InstalledWindowsUpdateChecker();
_session = session;
}
public bool Execute(string acceptedKb, string returnVar) => Execute(new[] {acceptedKb}, returnVar);
public bool Execute(IEnumerable<string> acceptedKbs, string returnVar)
{
try
{
_session.Log("Begin KbInstalledChecker");
var isUpdateInstalled = _installedUpdateChecker.IsUpdateInstalled(acceptedKbs);
SetReturnValue(isUpdateInstalled, returnVar);
_session.Log("End KbInstalledChecker");
return true;
}
catch (Exception e)
{
_session.Log($"There was an issue executing the KbInstalledChecker. Exception: {e}");
return false;
}
}
private void SetReturnValue(bool isUpdateInstalled, string returnVar)
{
var updateInstalledVal = isUpdateInstalled ? "1" : "0";
_session[returnVar] = updateInstalledVal;
_session.Log($"Set property '{returnVar}' to '{updateInstalledVal}'");
}
}
}

View File

@@ -0,0 +1,83 @@
using System;
using Microsoft.Win32;
using System.Diagnostics;
namespace CustomActions
{
public class UninstallNsisVersions
{
private const string RegistryPath = "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\mRemoteNG";
private const string RegistryPathWow6432 = "Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\mRemoteNG";
private RegistryKey _activeRegistryPath;
public UninstallNsisVersions()
{
GetLegacymRemoteNgRegistryKeyPath();
}
public void UninstallLegacyVersion(bool silent = false)
{
if (!IsLegacymRemoteNgInstalled())
return;
var uninstallString = GetLegacyUninstallString();
var forceNonTempUninstaller = $"_?={uninstallString.Replace("Uninstall.exe", "").Replace(@"""", "")}";
var silentUninstall = "";
if (silent)
{
silentUninstall = "/S";
}
var processStartInfo = new ProcessStartInfo(uninstallString)
{
UseShellExecute = true,
Arguments = $"{forceNonTempUninstaller} {silentUninstall}"
};
var uninstallProcess = Process.Start(processStartInfo);
while (uninstallProcess != null && uninstallProcess.HasExited == false)
{
Debug.WriteLine("Waiting for uninstaller to exit");
}
}
public bool IsLegacymRemoteNgInstalled()
{
return (_activeRegistryPath != null);
}
public string GetLegacyUninstallString()
{
return IsLegacymRemoteNgInstalled() ? _activeRegistryPath.GetValue("UninstallString").ToString() : "";
}
private void GetLegacymRemoteNgRegistryKeyPath()
{
GetUninstallKeyPath();
GetUninstallKeyPath6432();
}
private void GetUninstallKeyPath()
{
try
{
_activeRegistryPath = Registry.LocalMachine.OpenSubKey(RegistryPath);
}
catch (Exception)
{
// ignored
}
}
private void GetUninstallKeyPath6432()
{
try
{
_activeRegistryPath = Registry.LocalMachine.OpenSubKey(RegistryPathWow6432);
}
catch (Exception)
{
// ignored
}
}
}
}

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?include $(sys.CURRENTDIR)Includes\Config.wxi?>
<Fragment>
<CustomAction Id="CheckIfMinimumRdpInstalled" Return="check" Execute="immediate" BinaryKey="CustomActions.CA.dll" DllEntry="IsMinimumRdpVersionInstalled" />
</Fragment>
<Fragment>
<CustomAction Id="CheckIfRdpDtlsUpdateInstalled" Return="check" Execute="immediate" BinaryKey="CustomActions.CA.dll" DllEntry="IsRdpDtlsUpdateInstalled" />
</Fragment>
</Wix>

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<!-- http://robmensching.com/blog/posts/2010/5/2/the-wix-toolsets-remember-property-pattern/ -->
<!-- This pattern allows a cmdline value to take precedence over values set from searchers (registry/file/etc) -->
<!-- Save the INSTALLDIR value from the cmdline, if it was provided -->
<CustomAction Id="SaveCmdlineINSTALLDIR" Property="CMDLINE_INSTALLDIR" Value="[INSTALLDIR]" Execute="firstSequence" />
<!-- Set the INSTALLDIR value to the cmdline value, if one was provided -->
<CustomAction Id="SetFromCmdlineINSTALLDIR" Property="INSTALLDIR" Value="[CMDLINE_INSTALLDIR]" Execute="firstSequence" />
<InstallUISequence>
<Custom Action="SaveCmdlineINSTALLDIR" Before="AppSearch" />
<Custom Action="SetFromCmdlineINSTALLDIR" After="AppSearch">
CMDLINE_INSTALLDIR
</Custom>
</InstallUISequence>
<InstallExecuteSequence>
<Custom Action="SaveCmdlineINSTALLDIR" Before="AppSearch" />
<Custom Action="SetFromCmdlineINSTALLDIR" After="AppSearch">
CMDLINE_INSTALLDIR
</Custom>
</InstallExecuteSequence>
</Fragment>
</Wix>

View File

@@ -8,13 +8,13 @@ xmlns:wix="http://schemas.microsoft.com/wix/2006/wi">
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:key name="service-search" match="wix:Component[contains(wix:File/@Source, '.pdb')]" use="@Id" />
<xsl:key name="service-search" match="wix:Component[contains(wix:File/@Source, '.xml')]" use="@Id" />
<xsl:key name="service-search" match="wix:Component[contains(wix:File/@Source, 'app.config')]" use="@Id" />
<xsl:key name="service-search" match="wix:Component[contains(wix:File/@Source, 'vshost')]" use="@Id" />
<xsl:key name="service-search" match="wix:Component[contains(wix:File/@Source, 'manifest')]" use="@Id" />
<xsl:key name="service-search" match="wix:Component[contains(wix:File/@Source, '.application')]" use="@Id" />
<xsl:key name="service-search" match="wix:Component[wix:File/@Source = '$(var.HarvestPath)\mRemoteNG.exe']" use="@Id" />
<xsl:key name="service-search" match="wix:Component[wix:File/@Source = '$(var.HarvestPath)\PuTTYNG.exe']" use="@Id" />
<xsl:template match="wix:Component[key('service-search', @Id)]" />
<xsl:template match="wix:ComponentRef[key('service-search', @Id)]" />
</xsl:stylesheet>

View File

@@ -4,7 +4,8 @@
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.PlatformProgramFilesFolder)">
<Directory Id="APPLICATIONROOTDIRECTORY" Name="$(var.ProductName)" />
<Directory Id="INSTALLDIR" Name="$(var.ProductName)">
</Directory>
</Directory>
<Directory Id="DesktopFolder" Name="!(loc.Folders_Desktop)" />

View File

@@ -2,7 +2,7 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?include $(sys.CURRENTDIR)Includes\Config.wxi?>
<Fragment>
<Component Id="C.MainExe" Directory="APPLICATIONROOTDIRECTORY" Guid="*">
<Component Id="C.MainExe" Directory="INSTALLDIR" Guid="*">
<File Id="MainExeFile" Source="$(var.SolutionDir)mRemoteV1\bin\$(var.Configuration)\mRemoteNG.exe" />
</Component>
</Fragment>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<ComponentGroup Id="CG.ProjectInfoFiles" Directory="APPLICATIONROOTDIRECTORY">
<ComponentGroup Id="CG.ProjectInfoFiles" Directory="INSTALLDIR">
<Component Id="C.Changelog" Guid="*">
<File Id="ChangelogFile" Name="Changelog.txt" Source="$(var.SolutionDir)CHANGELOG.TXT" KeyPath="yes" />
</Component>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<DirectoryRef Id="INSTALLDIR">
<Component Id="C.PuttyNGFile" Guid="*">
<File Id="PuttyNGFile" Name="PuTTYNG.exe" Source="$(var.HarvestPath)\PuTTYNG.exe" KeyPath="yes" />
</Component>
</DirectoryRef>
</Fragment>
</Wix>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<DirectoryRef Id="TARGETDIR">
<Component Id="C.RegistryEntries" Guid="*">
<RegistryKey Root="HKLM" Key="Software\mRemoteNG">
<RegistryValue Type="string" Name="InstallDir" Value="[INSTALLDIR]" KeyPath="yes" />
</RegistryKey>
</Component>
</DirectoryRef>
</Fragment>
</Wix>

View File

@@ -5,17 +5,17 @@
<DirectoryRef Id="DesktopFolder">
<Component Id="C.DesktopShortcut" Guid="F78E5A16-A2F7-4BD9-9250-CBF3016CCCDA">
<Shortcut Id="DesktopShortcut" Name="$(var.ProductName)" Target="[APPLICATIONROOTDIRECTORY][MAINEXE]" WorkingDirectory="APPLICATIONROOTDIRECTORY" Icon="mRemoteNG.ico" />
<Shortcut Id="DesktopShortcut" Name="$(var.ProductName)" Target="[INSTALLDIR][MAINEXE]" WorkingDirectory="INSTALLDIR" Icon="mRemoteNG.ico" />
<RegistryValue Root="HKCU" Key="Software\$(var.ProductName)" Name="DesktopShortcut" Type="integer" Value="1" KeyPath="yes" />
</Component>
</DirectoryRef>
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="C.ApplicationStartMenuShortcut" Guid="193B9E14-F40E-44F1-8514-BED253BCBF75">
<Shortcut Id="ApplicationStartMenuShortcut" Name="$(var.ProductName)" Target="[APPLICATIONROOTDIRECTORY][MAINEXE]" WorkingDirectory="APPLICATIONROOTDIRECTORY" Icon="mRemoteNG.ico" />
<Shortcut Id="CreditsShortcut" Name="Credits" Target="[APPLICATIONROOTDIRECTORY]Credits.txt" WorkingDirectory="APPLICATIONROOTDIRECTORY" />
<Shortcut Id="LicenseShortcut" Name="License" Target="[APPLICATIONROOTDIRECTORY]License.txt" WorkingDirectory="APPLICATIONROOTDIRECTORY" />
<Shortcut Id="ReadmeShortcut" Name="Readme" Target="[APPLICATIONROOTDIRECTORY]Readme.txt" WorkingDirectory="APPLICATIONROOTDIRECTORY" />
<Shortcut Id="ApplicationStartMenuShortcut" Name="$(var.ProductName)" Target="[INSTALLDIR][MAINEXE]" WorkingDirectory="INSTALLDIR" Icon="mRemoteNG.ico" />
<Shortcut Id="CreditsShortcut" Name="Credits" Target="[INSTALLDIR]Credits.txt" WorkingDirectory="INSTALLDIR" />
<Shortcut Id="LicenseShortcut" Name="License" Target="[INSTALLDIR]License.txt" WorkingDirectory="INSTALLDIR" />
<Shortcut Id="ReadmeShortcut" Name="Readme" Target="[INSTALLDIR]Readme.txt" WorkingDirectory="INSTALLDIR" />
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\$(var.ProductName)" Name="ApplicationStartMenuShortcut" Type="integer" Value="1" KeyPath="yes"/>
</Component>

View File

@@ -16,8 +16,11 @@
<?define RequiredDotNetFrameworkMinorVersion = "0" ?>
<?define RequiredDotNetFrameworkServicePackLevel = "" ?>
<?define RequiredDotNetFrameworkVersion = "$(var.RequiredDotNetFrameworkMajorVersion).$(var.RequiredDotNetFrameworkMinorVersion)" ?>
<?define RDP80KB = "KB2592687" ?>
<?define RDP81KB = "KB2923545" ?>
<?define Rdp80Kb = "KB2592687" ?>
<?define Rdp81Kb = "KB2923545" ?>
<?define MinimumRdpKb = $(var.Rdp80Kb) ?>
<?define RdpDtlsKb = "KB2574819" ?>
<?define IGNOREPREREQUISITES = 0 ?>
<?if $(var.Platform) = x64 ?>
<?define ProductNameWithPlatform = "$(var.ProductName) (64 bit)" ?>

View File

@@ -27,12 +27,14 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="CustomActions\CheckForInstalledWindowsUpdates.wxs" />
<Compile Include="CustomActions\SaveInstallLocation.wxs" />
<Compile Include="CustomActions\UninstallLegacyVersions.wxs" />
<Compile Include="Fragments\FilesFragment.wxs" />
<Compile Include="Fragments\DirectoriesFragment.wxs" />
<Compile Include="Fragments\MainExeFragment.wxs" />
<Compile Include="Fragments\MiscTextFilesFragment.wxs" />
<Compile Include="Fragments\PuTTYNGFragment.wxs" />
<Compile Include="Fragments\RegistryEntriesFragment.wxs" />
<Compile Include="Fragments\ShortcutFragment.wxs" />
<Compile Include="mRemoteNGV1.wxs" />
</ItemGroup>
@@ -98,22 +100,46 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<LinkerAdditionalOptions>
</LinkerAdditionalOptions>
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteV1\bin\Release;</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent>REM Harvest bin directory of the mRemoteV1 project
call "$(WIX)bin\heat.exe" dir "$(SolutionDir)mRemoteV1\bin\$(Configuration)" -ag -dr APPLICATIONROOTDIRECTORY -var var.HarvestPath -srd -cg MandatoryComponents -template fragment -out "$(ProjectDir)Fragments\FilesFragment.wxs" -t "$(ProjectDir)Filters\Harvest_Filter.xslt" -v
REM Convert the license file "COPYING.TXT" to "License.rtf" to be shown in the installer GUI
call "$(ProjectDir)Resources\Pandoc\pandoc.exe" -s -t rtf -o "$(ProjectDir)\Resources\License.rtf" "$(SolutionDir)COPYING.TXT"</PreBuildEvent>
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteV1\bin\Release;HelpFilesHarvestPath=$(SolutionDir)mRemoteV1\Resources\Help</DefineConstants>
<Cultures>en-US</Cultures>
<SuppressPdbOutput>True</SuppressPdbOutput>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<Cultures>en-US</Cultures>
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteV1\bin\Debug;</DefineConstants>
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteV1\bin\Debug;HelpFilesHarvestPath=$(SolutionDir)mRemoteV1\Resources\Help</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug Portable|x86' ">
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteV1\bin\Debug Portable;</DefineConstants>
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteV1\bin\Debug Portable;HelpFilesHarvestPath=$(SolutionDir)mRemoteV1\Resources\Help</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release Portable|x86' ">
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteV1\bin\Release Portable;</DefineConstants>
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteV1\bin\Release Portable;HelpFilesHarvestPath=$(SolutionDir)mRemoteV1\Resources\Help</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>set /p buildenv=&lt;buildenv.tmp
REM Sign MSI
IF EXIST C:\mRemoteNG_code_signing_cert.pfx (
IF %25buildenv: Portable=%25==Release (
powershell "&amp;""$(SolutionDir)Tools\signfiles.ps1""" %27%25cd%25%27
)
)
REM Rename MSI to include version number
powershell -ExecutionPolicy Bypass -File "$(SolutionDir)Tools\rename_installer_with_version.ps1" $(SolutionDir)
REM Copy MSI to Release folder
IF %25buildenv: Portable=%25==Release (powershell -ExecutionPolicy Bypass -File "$(SolutionDir)Tools\copy_release_installer.ps1" $(TargetDir) $(SolutionDir)Release)</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent>REM Clean the TargetDir
rmdir /S /Q "$(TargetDir)"
echo $(ConfigurationName) &gt; buildenv.tmp
REM Harvest bin directory of the mRemoteV1 project
call "$(WIX)bin\heat.exe" dir "$(SolutionDir)mRemoteV1\bin\$(Configuration)" -ag -dr INSTALLDIR -var var.HarvestPath -srd -cg MandatoryComponents -template fragment -out "$(ProjectDir)Fragments\FilesFragment.wxs" -t "$(ProjectDir)Filters\Harvest_Filter.xslt" -v
REM Convert the license file "COPYING.TXT" to "License.rtf" to be shown in the installer GUI
call "$(ProjectDir)Resources\Pandoc\pandoc.exe" -s -t rtf -o "$(ProjectDir)\Resources\License.rtf" "$(SolutionDir)COPYING.TXT"</PreBuildEvent>
</PropertyGroup>
</Project>

View File

@@ -7,6 +7,7 @@
<String Id="Install_NeedDotNetFrameworkVersion">mRemoteNG requires Microsoft .NET Framework [REQUIREDDOTNETFRAMEWORKVERSION] or higher.</String>
<String Id="Install_OSVersionRequirement">mRemoteNG requires Windows 7 SP1 or higher to run. Please update your operating system and try again.</String>
<String Id="Install_RDP80Requirement">mRemoteNG requires RDP 8.0 or higher to run. Windows 7 users will need to install KB2592687</String>
<String Id="Install_RDPDtlsRequirement">mRemoteNG requires KB2574819 in order to create RDP connections. Windows 7 users will need to install this KB.</String>
<String Id="Install_Win7RequiresSP1">For mRemoteNG to run on Windows 7, it requires Service Pack 1 to be installed. Please install Service Pack 1 and try again.</String>
<!-- Directories and File names -->

View File

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB

View File

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

View File

Before

Width:  |  Height:  |  Size: 451 KiB

After

Width:  |  Height:  |  Size: 451 KiB

View File

@@ -9,26 +9,42 @@
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="!(loc.Upgrade_NewerVersionInstalled)" Schedule="afterInstallExecute" />
<MediaTemplate EmbedCab="yes" />
<Binary Id="CustomActions.CA.dll" SourceFile="$(var.SolutionDir)Installer Projects\CustomActions\bin\$(var.Configuration)\CustomActions.CA.dll" />
<Binary Id="CustomActions.CA.dll" SourceFile="$(var.SolutionDir)InstallerProjects\CustomActions\bin\$(var.Configuration)\CustomActions.CA.dll" />
<Property Id="ARPPRODUCTICON" Value="mRemoteNG.ico" />
<Property Id="ARPHELPLINK" Value="http://www.mremoteng.org" />
<SetProperty Id="ARPINSTALLLOCATION" Value="[INSTALLDIR]" After="CostFinalize" />
<Property Id="MAINEXE" Value="$(var.ExeProcessName)" />
<Property Id="APPLICATIONROOTDIRECTORY">
<Property Id="INSTALLDIR">
<RegistrySearch Id='mRemoteNGRegistry' Type='raw' Root='HKLM' Key='Software\mRemoteNG' Name='InstallDir' />
</Property>
<Property Id='RDP_DTLS_KB' Value='$(var.RdpDtlsKb)' />
<Property Id='RDP_DTLS_UPDATE_INSTALLED' Value='0' Secure='yes' />
<Property Id='RDP80_KB' Value='$(var.Rdp80Kb)' />
<Property Id='RDP81_KB' Value='$(var.Rdp81Kb)' />
<Property Id='MINIMUM_RDP_VERSION_INSTALLED' Value='0' Secure='yes' />
<Property Id='REQUIREDDOTNETFRAMEWORKVERSION' Value='$(var.RequiredDotNetFrameworkVersion)' />
<Property Id='LEGACYVERSIONINSTALLED' Value='0' />
<PropertyRef Id="NETFRAMEWORK40FULL" />
<PropertyRef Id="WIX_IS_NETFRAMEWORK_40_OR_LATER_INSTALLED" />
<Icon Id="mRemoteNG.ico" SourceFile="Resources\mRemoteNG.ico" />
<CustomActionRef Id='SaveCmdlineINSTALLDIR' />
<InstallUISequence>
<Custom Action="SetRDP80KBValue" After="AppSearch" />
<Custom Action="CheckIfRDP80Installed" After="SetRDP80KBValue">(NOT Installed) AND (VersionNT = 601 OR VersionNT64 = 601)</Custom>
<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>
</InstallUISequence>
<InstallExecuteSequence>
<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>
</InstallExecuteSequence>
<!-- Need to be admin to install -->
@@ -37,28 +53,33 @@
</Condition>
<!-- Windows 7 or higher required -->
<Condition Message="!(loc.Install_OSVersionRequirement)">
<![CDATA[Installed OR (VersionNT >= 601) OR (VersionNT64 >= 601)]]>
<![CDATA[Installed OR (IGNOREPREREQUISITES = 1) OR (VersionNT >= 601) OR (VersionNT64 >= 601)]]>
</Condition>
<!-- If Windows 7, SP 1 is required -->
<Condition Message="!(loc.Install_Win7RequiresSP1)">
<![CDATA[Installed OR (VersionNT >= 602 OR VersionNT64 >= 602) OR ((VersionNT = 601 OR VersionNT64 = 601) AND ServicePackLevel >= 1)]]>
<![CDATA[Installed OR (IGNOREPREREQUISITES = 1) OR (VersionNT >= 602 OR VersionNT64 >= 602) OR ((VersionNT = 601 OR VersionNT64 = 601) AND ServicePackLevel >= 1)]]>
</Condition>
<!-- .Net Framework Version Condition -->
<Condition Message="!(loc.Install_NeedDotNetFrameworkVersion)">
<![CDATA[Installed OR WIX_IS_NETFRAMEWORK_40_OR_LATER_INSTALLED = 1]]>
<![CDATA[Installed OR (IGNOREPREREQUISITES = 1) OR WIX_IS_NETFRAMEWORK_40_OR_LATER_INSTALLED = 1]]>
</Condition>
<!-- If Win7, require RDP DTLS update (KB2574819) -->
<Condition Message="!(loc.Install_RDPDtlsRequirement)">
<![CDATA[Installed OR (IGNOREPREREQUISITES = 1) OR (VersionNT >= 602 OR VersionNT64 >= 602) OR ((VersionNT = 601 OR VersionNT64 = 601) AND (RDP_DTLS_UPDATE_INSTALLED = 1))]]>
</Condition>
<!-- If Win7, require RDP 8.0 update (KB2592687) -->
<Condition Message="!(loc.Install_RDP80Requirement)">
<![CDATA[Installed OR (VersionNT >= 602 OR VersionNT64 >= 602) OR ((VersionNT = 601 OR VersionNT64 = 601) ]]>AND ($(var.RDP80KB) = 1 OR $(var.RDP81KB) = 1))
<![CDATA[Installed OR (IGNOREPREREQUISITES = 1) OR (VersionNT >= 602 OR VersionNT64 >= 602) OR ((VersionNT = 601 OR VersionNT64 = 601) AND (MINIMUM_RDP_VERSION_INSTALLED = 1))]]>
</Condition>
<Feature Id="F.Complete" Title="!(loc.Feature_Complete)" Display="expand" AllowAdvertise="no" Level="1">
<Feature Id="F.MinimalFeature" Title="$(var.ProductName)" Absent="disallow" ConfigurableDirectory="APPLICATIONROOTDIRECTORY" Level="1">
<Feature Id="F.MinimalFeature" Title="$(var.ProductName)" Absent="disallow" ConfigurableDirectory="INSTALLDIR" Level="1">
<ComponentGroupRef Id="MandatoryComponents" Primary="yes" />
<ComponentRef Id="C.MainExe" Primary="yes" />
<ComponentGroupRef Id="CG.ProjectInfoFiles" Primary="yes" />
<ComponentRef Id="C.RegistryEntries" Primary="yes" />
</Feature>
<Feature Id="F.PuttyNG" Title="PuTTYNG" Absent="allow" AllowAdvertise="no" Level="1">
@@ -71,7 +92,6 @@
<Feature Id="F.ApplicationStartMenuShortcut" Title="!(loc.Feature_StartMenuShortcut)" Absent="allow" AllowAdvertise="no" Level="1">
<ComponentRef Id="C.ApplicationStartMenuShortcut" Primary="yes" />
</Feature>
</Feature>

41
Jenkinsfile vendored
View File

@@ -1,44 +1,27 @@
node('windows') {
def jobDir = pwd()
def solutionFilePath = "\"${jobDir}\\mRemoteV1.sln\""
def vsToolsDir = "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\Tools"
def vsExtensionsDir = "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\CommonExtensions\\Microsoft\\TestWindow"
stage 'Checkout Branch'
def gitUrl = "https://github.com/mRemoteNG/mRemoteNG.git"
def branchName = GetBranchName()
echo "BranchName: ${branchName}"
git([url: gitUrl, branch: branchName])
checkout([
$class: 'GitSCM',
branches: scm.branches,
userRemoteConfigs: scm.userRemoteConfigs
])
stage 'Restore NuGet Packages'
def nugetPath = "C:\\nuget.exe"
bat "${nugetPath} restore ${solutionFilePath}"
stage 'Build mRemoteNG (Normal)'
bat "\"${vsToolsDir}\\VsDevCmd.bat\" && msbuild.exe /nologo \"${jobDir}\\mRemoteV1.sln\""
bat "\"${vsToolsDir}\\VsDevCmd.bat\" && msbuild.exe /nologo /p:Platform=x86 \"${jobDir}\\mRemoteV1.sln\""
stage 'Build mRemoteNG (Portable)'
bat "\"${vsToolsDir}\\VsDevCmd.bat\" && msbuild.exe /nologo /p:Configuration=\"Debug Portable\" \"${jobDir}\\mRemoteV1.sln\""
bat "\"${vsToolsDir}\\VsDevCmd.bat\" && msbuild.exe /nologo /p:Configuration=\"Debug Portable\";Platform=x86 \"${jobDir}\\mRemoteV1.sln\""
stage 'Run Unit Tests'
def nunitTestAdapterPath = "C:\\Users\\Administrator\\AppData\\Local\\Microsoft\\VisualStudio\\14.0\\Extensions"
bat "\"${vsToolsDir}\\VsDevCmd.bat\" && VSTest.Console.exe /TestAdapterPath:${nunitTestAdapterPath} \"${jobDir}\\mRemoteNGTests\\bin\\debug\\mRemoteNGTests.dll\""
}
def GetBranchName() {
def jobDir = pwd()
echo "JobDir: ${jobDir}"
def patternToUse = GetPatternToMatchBranchNameFromDirectory()
echo "PatternToUse: ${patternToUse}"
java.util.regex.Matcher matcher = jobDir =~ patternToUse
echo "Ran the matcher"
matcher ? matcher[0][1] : null
}
def GetPatternToMatchBranchNameFromDirectory() {
def patternToUse = ""
def folderSeparator = ""
def branchNamePattern = "[a-zA-Z0-9\\-_]*"
def jenkinsJobInfoTag = "@*[0-9]*"
echo "isUnix: ${isUnix()}"
if (isUnix()) {
folderSeparator = "/"
} else {
folderSeparator = "\\\\"
}
patternToUse = "${folderSeparator}(${branchNamePattern})(${jenkinsJobInfoTag})\$"
patternToUse
}

View File

@@ -1,296 +0,0 @@
; ---------------------
; DotNetVer.nsh
; Written by: David Grinberg
; Homepage: http://ontheperiphery.veraida.com/
; Updated By: Brandon Hansen (http://www.remotehams.com/)
; ---------------------
;
; LogicLib extensions for checking Microsoft .NET Framework versions and service packs.
;
; Latests Updates by Brandon Hansen, KG6YPI (RemoteHams.com)
; Dec 26, 2011 - .NET Framework 4.0 detection fixes - client profile not being found
; Dec 07, 2010 - .NET Framework 4.0 detection added by Brandon Hansen (KG6YPI)
;
; Usage examples:
;
; ${If} ${HasDotNet4.0}
; DetailPrint "Microsoft .NET Framework 4.0 installed."
; ${If} ${DOTNETVER_4_0} AtLeastDotNetServicePack 1
; DetailPrint "Microsoft .NET Framework 4.0 is at least SP1."
; ${Else}
; DetailPrint "Microsoft .NET Framework 4.0 SP1 not installed."
; ${EndIf}
; ${If} ${DOTNETVER_4_0} HasDotNetClientProfile 1
; DetailPrint "Microsoft .NET Framework 4.0 (Client Profile) available."
; ${EndIf}
; ${If} ${DOTNETVER_4_0} HasDotNetFullProfile 1
; DetailPrint "Microsoft .NET Framework 4.0 (Full Profile) available."
; ${EndIf}
; ${If} ${DOTNETVER_4_0} HasDotNetFullProfile 0
; DetailPrint "Microsoft .NET Framework 4.0 (Full Profile) not available."
; ${EndIf}
; ${EndIf}
!verbose push
!verbose 3
!ifndef ___DOTNETVER__NSH___
!define ___DOTNETVER__NSH___
!include LogicLib.nsh
!include Util.nsh
# constants
!define DOTNETVER_1_0 "1.0"
!define DOTNETVER_1_1 "1.1"
!define DOTNETVER_2_0 "2.0"
!define DOTNETVER_3_0 "3.0"
!define DOTNETVER_3_5 "3.5"
!define DOTNETVER_4_0 "4.0"
# variable declaration
Var /GLOBAL __DONTNET_FOUNDVER
!macro __DotNetVer_DeclareVars
!ifndef __DOTNETVER_VARS_DECLARED
!define __DOTNETVER_VARS_DECLARED
Var /GLOBAL __DOTNET_1.0
Var /GLOBAL __DOTNET_1.1
Var /GLOBAL __DOTNET_2.0
Var /GLOBAL __DOTNET_3.0
Var /GLOBAL __DOTNET_3.5
Var /GLOBAL __DOTNET_4.0
Var /GLOBAL __DOTNETVER_1.0_SP
Var /GLOBAL __DOTNETVER_1.1_SP
Var /GLOBAL __DOTNETVER_2.0_SP
Var /GLOBAL __DOTNETVER_3.0_SP
Var /GLOBAL __DOTNETVER_3.5_SP
Var /GLOBAL __DOTNETVER_4.0_SP
Var /GLOBAL __DOTNET_1.0_CLIENT
Var /GLOBAL __DOTNET_1.1_CLIENT
Var /GLOBAL __DOTNET_2.0_CLIENT
Var /GLOBAL __DOTNET_3.0_CLIENT
Var /GLOBAL __DOTNET_3.5_CLIENT
Var /GLOBAL __DOTNET_4.0_CLIENT
Var /GLOBAL __DOTNET_1.0_FULL
Var /GLOBAL __DOTNET_1.1_FULL
Var /GLOBAL __DOTNET_2.0_FULL
Var /GLOBAL __DOTNET_3.0_FULL
Var /GLOBAL __DOTNET_3.5_FULL
Var /GLOBAL __DOTNET_4.0_FULL
StrCpy $__DOTNET_1.0 0
StrCpy $__DOTNET_1.1 0
StrCpy $__DOTNET_2.0 0
StrCpy $__DOTNET_3.0 0
StrCpy $__DOTNET_3.5 0
StrCpy $__DOTNET_4.0 0
StrCpy $__DOTNETVER_1.0_SP 0
StrCpy $__DOTNETVER_1.1_SP 0
StrCpy $__DOTNETVER_2.0_SP 0
StrCpy $__DOTNETVER_3.0_SP 0
StrCpy $__DOTNETVER_3.5_SP 0
StrCpy $__DOTNETVER_4.0_SP 0
StrCpy $__DOTNET_1.0_CLIENT 0
StrCpy $__DOTNET_1.1_CLIENT 0
StrCpy $__DOTNET_2.0_CLIENT 0
StrCpy $__DOTNET_3.0_CLIENT 0
StrCpy $__DOTNET_3.5_CLIENT 0
StrCpy $__DOTNET_4.0_CLIENT 0
StrCpy $__DOTNET_1.0_FULL 0
StrCpy $__DOTNET_1.1_FULL 0
StrCpy $__DOTNET_2.0_FULL 0
StrCpy $__DOTNET_3.0_FULL 0
StrCpy $__DOTNET_3.5_FULL 0
StrCpy $__DOTNET_4.0_FULL 0
!endif
!macroend
# lazy initialization macro
!macro __DotNetVer_InitVars
# only calculate version once
StrCmp $__DONTNET_FOUNDVER "" dotnetver.noveryet
Return
dotnetver.noveryet:
!insertmacro __DotNetVer_DeclareVars
Push $0 ;registry count
Push $1 ;registry key
Push $2 ;version number
Push $3 ;installed
Push $4 ;service pack number
Push $8 ;strLen helper var
StrCpy $0 0
dotnetver.startenum:
EnumRegKey $1 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP" $0
StrCmp $1 "" dotnetver.done
IntOp $0 $0 + 1
StrCpy $2 $1 1 0
StrCmp $2 "v" +1 dotnetver.startenum
StrCpy $2 $1 3 1
; Check for .NET 1.0 to 3.5
ReadRegDWORD $3 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\$1" "Install"
ReadRegDWORD $4 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\$1" "SP"
IntCmp $3 1 dotnetcheck.skipalt
; Alternate check for versions that don't set the Install key
ReadRegDWORD $3 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\$1\Setup" "InstallSuccess"
dotnetcheck.skipalt:
; This is a sanity check that works on .NET 1.0 to 3.5
; if it fails check for dotnet 4
IntCmp $3 0 dotnetcheck.40
StrCmp $2 ${DOTNETVER_1_0} dotnetver.10
StrCmp $2 ${DOTNETVER_1_1} dotnetver.11
StrCmp $2 ${DOTNETVER_2_0} dotnetver.20
StrCmp $2 ${DOTNETVER_3_0} dotnetver.30
StrCmp $2 ${DOTNETVER_3_5} dotnetver.35
dotnetcheck.40:
StrCmp $2 ${DOTNETVER_4_0} dotnetver.40
StrCmp $2 "4" dotnetver.40
Goto dotnetver.startenum
dotnetver.10:
StrCpy $__DOTNET_1.0 1
StrCpy $__DOTNETVER_1.0_SP $4
StrCpy $__DOTNET_1.0_FULL 1
Goto dotnetver.startenum
dotnetver.11:
StrCpy $__DOTNET_1.1 1
StrCpy $__DOTNETVER_1.1_SP $4
StrCpy $__DOTNET_1.1_FULL 1
Goto dotnetver.startenum
dotnetver.20:
StrCpy $__DOTNET_2.0 1
StrCpy $__DOTNETVER_2.0_SP $4
StrCpy $__DOTNET_2.0_FULL 1
Goto dotnetver.startenum
dotnetver.30:
StrCpy $__DOTNET_3.0 1
StrCpy $__DOTNETVER_3.0_SP $4
StrCpy $__DOTNET_3.0_FULL 1
Goto dotnetver.startenum
dotnetver.35:
StrCpy $__DOTNET_3.5 1
StrCpy $__DOTNETVER_3.5_SP $4
StrCpy $__DOTNET_3.5_FULL 1
Goto dotnetver.startenum
dotnetver.40:
; Check for .NET 4.0 (Full Profile)
ReadRegDWORD $3 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" "Install"
ReadRegDWORD $4 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" "SP"
StrLen $8 $3
IntCmp $8 0 dotnetcheck.40c
IntCmp $3 0 dotnetcheck.40c
StrCmp $2 ${DOTNETVER_4_0} dotnetver.40_Full
StrCmp $2 "4" dotnetver.40_Full
dotnetcheck.40c:
; Check for .NET 4.0 (Client Profile)
ReadRegDWORD $3 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client" "Install"
ReadRegDWORD $4 HKLM "SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client" "SP"
StrLen $8 $3
IntCmp $8 0 dotnetver.startenum
IntCmp $3 0 dotnetver.startenum
StrCmp $2 ${DOTNETVER_4_0} dotnetver.40_Client
StrCmp $2 "4" dotnetver.40_Client
Goto dotnetver.startenum
dotnetver.40_Full:
StrCpy $__DOTNET_4.0 1
StrCpy $__DOTNETVER_4.0_SP $4
StrCpy $__DOTNET_4.0_FULL 1
Goto dotnetcheck.40c ; continue looking for other profiles
dotnetver.40_Client:
StrCpy $__DOTNET_4.0 1
StrCpy $__DOTNETVER_4.0_SP $4
StrCpy $__DOTNET_4.0_CLIENT 1
Goto dotnetver.startenum
dotnetver.done:
StrCpy $__DONTNET_FOUNDVER "1"
Pop $8
Pop $4
Pop $3
Pop $2
Pop $1
Pop $0
!macroend
!macro _HasDotNet _a _b _t _f
${CallArtificialFunction} __DotNetVer_InitVars
!insertmacro _= `$__DOTNET_${_b}` `1` `${_t}` `${_f}`
!macroend
!macro __DotNetVer_DefineTest Ver
!define HasDotNet${Ver} `"" HasDotNet ${Ver}`
!macroend
!insertmacro __DotNetVer_DefineTest ${DOTNETVER_1_0}
!insertmacro __DotNetVer_DefineTest ${DOTNETVER_1_1}
!insertmacro __DotNetVer_DefineTest ${DOTNETVER_2_0}
!insertmacro __DotNetVer_DefineTest ${DOTNETVER_3_0}
!insertmacro __DotNetVer_DefineTest ${DOTNETVER_3_5}
!insertmacro __DotNetVer_DefineTest ${DOTNETVER_4_0}
!macro _AtLeastDotNetServicePack _a _b _t _f
${CallArtificialFunction} __DotNetVer_InitVars
!insertmacro _>= `$__DOTNETVER_${_a}_SP` `${_b}` `${_t}` `${_f}`
!macroend
!define AtLeastDotNetServicePack `AtLeastDotNetServicePack`
!macro _AtMostDotNetServicePack _a _b _t _f
${CallArtificialFunction} __DotNetVer_InitVars
!insertmacro _<= `$__DOTNETVER_${_a}_SP` `${_b}` `${_t}` `${_f}`
!macroend
!define AtMostDotNetServicePack `AtMostDotNetServicePack`
!macro _IsDotNetServicePack _a _b _t _f
${CallArtificialFunction} __DotNetVer_InitVars
!insertmacro _= `$__DOTNETVER_${_a}_SP` `${_b}` `${_t}` `${_f}`
!macroend
!define IsDotNetServicePack `IsDotNetServicePack`
!macro _HasDotNetClientProfile _a _b _t _f
${CallArtificialFunction} __DotNetVer_InitVars
!insertmacro _= `$__DOTNET_${_a}_CLIENT` `${_b}` `${_t}` `${_f}`
!macroend
!define HasDotNetClientProfile `HasDotNetClientProfile`
!macro _HasDotNetFullProfile _a _b _t _f
${CallArtificialFunction} __DotNetVer_InitVars
!insertmacro _= `$__DOTNET_${_a}_FULL` `${_b}` `${_t}` `${_f}`
!macroend
!define HasDotNetFullProfile `HasDotNetFullProfile`
# done
!endif # !___DOTNETVER__NSH___
!verbose pop

View File

@@ -1,22 +0,0 @@
; Czech installer translation
; Start mRemoteNG after installation
LangString LaunchMremoteNow ${LANG_CZECH} "mRemoteNG run CZECH message"
; Installer Language
LangString InstallerLanguage ${LANG_CZECH} "Installer Language"
; Select installer Language
LangString SelectInstallerLanguage ${LANG_CZECH} "Please select the language of the installer"
; Requires .NET Framework
LangString RequiresNetFramework ${LANG_CZECH} "mRemoteNG requires Microsoft .NET Framework 3.0."
; User needs to be Admin
LangString RequiresAdminUser ${LANG_CZECH} "You must be a member of the 'Power Users' or 'Administrators' group to install mRemoteNG."
; Start Menu items
LangString CreditsLinkName ${LANG_CZECH} "Credits"
LangString CopyingLinkName ${LANG_CZECH} "License"
LangString UninstallLinkName ${LANG_CZECH} "Uninstall"
LangString ChangeLogLinkName ${LANG_CZECH} "Version History"

View File

@@ -1,22 +0,0 @@
; Dutch installer translation
; Start mRemoteNG after installation
LangString LaunchMremoteNow ${LANG_DUTCH} "mRemoteNG run DUTCH message"
; Installer Language
LangString InstallerLanguage ${LANG_DUTCH} "Installer Language"
; Select installer Language
LangString SelectInstallerLanguage ${LANG_DUTCH} "Please select the language of the installer"
; Requires .NET Framework
LangString RequiresNetFramework ${LANG_DUTCH} "mRemoteNG requires Microsoft .NET Framework 3.0."
; User needs to be Admin
LangString RequiresAdminUser ${LANG_DUTCH} "You must be a member of the 'Power Users' or 'Administrators' group to install mRemoteNG."
; Start Menu items
LangString CreditsLinkName ${LANG_DUTCH} "Credits"
LangString CopyingLinkName ${LANG_DUTCH} "License"
LangString UninstallLinkName ${LANG_DUTCH} "Uninstall"
LangString ChangeLogLinkName ${LANG_DUTCH} "Version History"

View File

@@ -1,22 +0,0 @@
; English installer translation
; Start mRemoteNG after installation
LangString LaunchMremoteNow ${LANG_ENGLISH} "Launch mRemoteNG Now"
; Installer Language
LangString InstallerLanguage ${LANG_ENGLISH} "Installer Language"
; Select installer Language
LangString SelectInstallerLanguage ${LANG_ENGLISH} "Please select the language of the installer"
; Requires .NET Framework
LangString RequiresNetFramework ${LANG_ENGLISH} "mRemoteNG requires Microsoft .NET Framework 3.0."
; User needs to be Admin
LangString RequiresAdminUser ${LANG_ENGLISH} "You must be a member of the 'Power Users' or 'Administrators' group to install mRemoteNG."
; Start Menu items
LangString CreditsLinkName ${LANG_ENGLISH} "Credits"
LangString CopyingLinkName ${LANG_ENGLISH} "License"
LangString UninstallLinkName ${LANG_ENGLISH} "Uninstall"
LangString ChangeLogLinkName ${LANG_ENGLISH} "Version History"

View File

@@ -1,22 +0,0 @@
; French installer translation
; Start mRemoteNG after installation
LangString LaunchMremoteNow ${LANG_FRENCH} "mRemoteNG run FRENCH message"
; Installer Language
LangString InstallerLanguage ${LANG_FRENCH} "Installer Language"
; Select installer Language
LangString SelectInstallerLanguage ${LANG_FRENCH} "Please select the language of the installer"
; Requires .NET Framework
LangString RequiresNetFramework ${LANG_FRENCH} "mRemoteNG requires Microsoft .NET Framework 3.0."
; User needs to be Admin
LangString RequiresAdminUser ${LANG_FRENCH} "You must be a member of the 'Power Users' or 'Administrators' group to install mRemoteNG."
; Start Menu items
LangString CreditsLinkName ${LANG_FRENCH} "Credits"
LangString CopyingLinkName ${LANG_FRENCH} "License"
LangString UninstallLinkName ${LANG_FRENCH} "Uninstall"
LangString ChangeLogLinkName ${LANG_FRENCH} "Version History"

View File

@@ -1,22 +0,0 @@
; German installer translation
; Start mRemoteNG after installation
LangString LaunchMremoteNow ${LANG_GERMAN} "mRemoteNG jetzt Starten"
; Installer Language
LangString InstallerLanguage ${LANG_GERMAN} "Installationsprogamm Sprache"
; Select installer Language
LangString SelectInstallerLanguage ${LANG_GERMAN} "Bitte w<>hlen Sie die Sprache f<>r das Installationsprogramm"
; Requires .NET Framework
LangString RequiresNetFramework ${LANG_GERMAN} "mRemoteNG ben<65>tigt das Microsoft .NET Framework 3.0."
; User needs to be Admin
LangString RequiresAdminUser ${LANG_GERMAN} "Sie m<>ssen Mitglied der Grupper 'Power Users' or 'Administratoren' sein, damit Sie mRemoteNG installieren k<>nnen."
; Start Menu items
LangString CreditsLinkName ${LANG_GERMAN} "Credits"
LangString CopyingLinkName ${LANG_GERMAN} "License"
LangString UninstallLinkName ${LANG_GERMAN} "Uninstall"
LangString ChangeLogLinkName ${LANG_GERMAN} "Version History"

View File

@@ -1,31 +0,0 @@
!define LanguageNameEnglish "English"
!insertmacro MUI_LANGUAGE "English"
!include "Language\english.nsi"
!define LanguageNameCzech "Čeština"
!insertmacro MUI_LANGUAGE "Czech"
!include "Language\czech.nsi"
!define LanguageNameGerman "Deutsch"
!insertmacro MUI_LANGUAGE "German"
!include "Language\german.nsi"
!define LanguageNameSpanish "Español"
!insertmacro MUI_LANGUAGE "Spanish"
!include "Language\spanish.nsi"
!define LanguageNameFrench "Français"
!insertmacro MUI_LANGUAGE "French"
!include "Language\french.nsi"
!define LanguageNameDutch "Nederlands"
!insertmacro MUI_LANGUAGE "Dutch"
!include "Language\dutch.nsi"
!define LanguageNamePolish "Polski"
!insertmacro MUI_LANGUAGE "Polish"
!include "Language\polish.nsi"
!define LanguageNameThai "ภาษาไทย"
!insertmacro MUI_LANGUAGE "Thai"
!include "Language\thai.nsi"

View File

@@ -1,22 +0,0 @@
; Polish installer translation
; Start mRemoteNG after installation
LangString LaunchMremoteNow ${LANG_POLISH} "mRemoteNG run POLISH message"
; Installer Language
LangString InstallerLanguage ${LANG_POLISH} "Installer Language"
; Select installer Language
LangString SelectInstallerLanguage ${LANG_POLISH} "Please select the language of the installer"
; Requires .NET Framework
LangString RequiresNetFramework ${LANG_POLISH} "mRemoteNG requires Microsoft .NET Framework 3.0."
; User needs to be Admin
LangString RequiresAdminUser ${LANG_POLISH} "You must be a member of the 'Power Users' or 'Administrators' group to install mRemoteNG."
; Start Menu items
LangString CreditsLinkName ${LANG_POLISH} "Credits"
LangString CopyingLinkName ${LANG_POLISH} "License"
LangString UninstallLinkName ${LANG_POLISH} "Uninstall"
LangString ChangeLogLinkName ${LANG_POLISH} "Version History"

View File

@@ -1,22 +0,0 @@
; Spanish installer translation
; Start mRemoteNG after installation
LangString LaunchMremoteNow ${LANG_SPANISH} "Iniciando de mRemoteNG"
; Installer Language
LangString InstallerLanguage ${LANG_SPANISH} "Lenguaje de Instalación"
; Select installer Language
LangString SelectInstallerLanguage ${LANG_SPANISH} "Seleccione el lenguaje de instalación"
; Requires .NET Framework
LangString RequiresNetFramework ${LANG_SPANISH} "mRemoteNG requiere Microsoft .NET Framework 3.0."
; User needs to be Admin
LangString RequiresAdminUser ${LANG_SPANISH} "Debe ser miembro del grupo 'Administradores' para poder instalar mRemoteNG."
; Start Menu items
LangString CreditsLinkName ${LANG_SPANISH} "Créditos"
LangString CopyingLinkName ${LANG_SPANISH} "Licencia"
LangString UninstallLinkName ${LANG_SPANISH} "Desinstalar"
LangString ChangeLogLinkName ${LANG_SPANISH} "Historial de Versiones"

View File

@@ -1,23 +0,0 @@
; Thai installer translation
; Contributed by Apisitt Rattana
; Start mRemoteNG after installation
LangString LaunchMremoteNow ${LANG_THAI} "ขณะนี้กำลังติดตั้ง mRemoteNG"
; Installer Language
LangString InstallerLanguage ${LANG_THAI} "ภาษาสำหรับการติดตั้ง"
; Select installer Language
LangString SelectInstallerLanguage ${LANG_THAI} "กรุณาเลือกภาษาสำหรับการติดตั้ง"
; Requires .NET Framework
LangString RequiresNetFramework ${LANG_THAI} "mRemoteNG มีความต้องการ Microsoft .NET Framework 3.0. เป็นพื้นฐาน"
; User needs to be Admin
LangString RequiresAdminUser ${LANG_THAI} "คุณต้องเป็นสมาชิกในกลุ่มของ 'Power Users' หรือ 'Administrators' เพื่อการติดตั้ง mRemoteNG"
; Start Menu items
LangString CreditsLinkName ${LANG_THAI} "Credits"
LangString CopyingLinkName ${LANG_THAI} "License"
LangString UninstallLinkName ${LANG_THAI} "Uninstall"
LangString ChangeLogLinkName ${LANG_THAI} "Version History"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

View File

@@ -1,197 +0,0 @@
!include "MUI.nsh"
!include "WordFunc.nsh"
!insertmacro VersionCompare
!include "DotNetVer.nsh"
!include "..\Release\Version.nsh"
; This will be passed in using the /D switch by BUILD.CMD
!ifdef PRODUCT_VERSION_TAG
!define PRODUCT_VERSION_FRIENDLY "${PRODUCT_VERSION_SHORT}"
!define PRODUCT_VERSION_TAGGED "${PRODUCT_VERSION_SHORT}-${PRODUCT_VERSION_TAG}"
!else
!define PRODUCT_VERSION_FRIENDLY "${PRODUCT_VERSION_SHORT}"
!define PRODUCT_VERSION_TAGGED "${PRODUCT_VERSION_SHORT}"
!endif
; Basic Config
Name "mRemoteNG ${PRODUCT_VERSION_FRIENDLY}"
OutFile "..\Release\mRemoteNG-Installer-${PRODUCT_VERSION_TAGGED}.exe"
SetCompressor /SOLID lzma
InstallDir "$PROGRAMFILES\mRemoteNG"
InstallDirRegKey HKLM "Software\mRemoteNG" "InstallPath"
RequestExecutionLevel admin
; Version Information
VIProductVersion ${PRODUCT_VERSION}
VIAddVersionKey "CompanyName" "Next Generation Software"
VIAddVersionKey "ProductName" "mRemoteNG"
VIAddVersionKey "ProductVersion" ${PRODUCT_VERSION}
VIAddVersionKey "LegalCopyright" "Copyright © 2007-2009 Felix Deimel, 2010-2013 Riley McArdle"
VIAddVersionKey "FileDescription" "mRemoteNG ${PRODUCT_VERSION_FRIENDLY} Installer"
VIAddVersionKey "FileVersion" ${PRODUCT_VERSION}
; Design
!define MUI_ICON "Setup_Install.ico"
!define MUI_UNICON "RecycleBin.ico"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "header.bmp" ; optional
!define MUI_HEADERIMAGE_BITMAP_NOSTRETCH
!define MUI_HEADERIMAGE_UNBITMAP "header.bmp" ; optional
!define MUI_HEADERIMAGE_UNBITMAP_NOSTRETCH
!define MUI_HEADER_TRANSPARENT_TEXT
!define MUI_WELCOMEFINISHPAGE_BITMAP "welcomefinish.bmp"
!define MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "welcomefinish.bmp"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP_NOSTRETCH
; Install Pages
!insertmacro MUI_PAGE_LICENSE "..\COPYING.TXT"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_NOAUTOCLOSE
; Finish Page
!define MUI_FINISHPAGE_RUN_NOTCHECKED
!define MUI_FINISHPAGE_RUN "$INSTDIR\mRemoteNG.exe"
!insertmacro MUI_PAGE_FINISH
; Uninstall Pages
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
; Get Languages
!include "Language\languages.nsi"
; Set finish page text
!define MUI_FINISHPAGE_RUN_Text "$(LaunchMremoteNow)"
Function .onInit
ClearErrors
UserInfo::GetName
IfErrors Win9x
Pop $0
UserInfo::GetAccountType
Pop $1
# GetOriginalAccountType will check the tokens of the original user of the
# current thread/process. If the user tokens were elevated or limited for
# this process, GetOriginalAccountType will return the non-restricted
# account type.
# On Vista with UAC, for example, this is not the same value when running
# with `RequestExecutionLevel user`. GetOriginalAccountType will return
# "admin" while GetAccountType will return "user".
StrCmp $1 "Admin" 0 +3
Goto doit
StrCmp $1 "Power" 0 +3
Goto doit
StrCmp $1 "User" 0 +3
Goto noop
StrCmp $1 "Guest" 0 +3
Goto noop
MessageBox MB_OK "Unknown error"
Goto doit
Win9x:
doit:
# We can install
IfSilent +2
Call SelectLanguage
Goto end
noop:
MessageBox MB_OK "$(RequiresAdminUser)"
Quit
end:
FunctionEnd
Function SelectLanguage
;Language selection dialog
Push ""
Push ${LANG_ENGLISH}
Push ${LanguageNameEnglish}
Push ${LANG_GERMAN}
Push ${LanguageNameGerman}
Push ${LANG_DUTCH}
Push ${LanguageNameDutch}
Push ${LANG_FRENCH}
Push ${LanguageNameFrench}
Push ${LANG_POLISH}
Push ${LanguageNamePolish}
Push ${LANG_SPANISH}
Push ${LanguageNameSpanish}
Push ${LANG_CZECH}
Push ${LanguageNameCzech}
Push ${LANG_THAI}
Push ${LanguageNameThai}
Push A ; A means auto count languages
; for the auto count to work the first empty push (Push "") must remain
LangDLL::LangDialog "$(InstallerLanguage)" "$(SelectInstallerLanguage)"
Pop $LANGUAGE
StrCmp $LANGUAGE "cancel" 0 +2
Abort
; Check .NET version
${IfNot} ${HasDotNet3.0}
MessageBox MB_OK|MB_ICONEXCLAMATION "$(RequiresNetFramework)"
Quit
${EndIf}
FunctionEnd
Section "" ; Install
SetOutPath $INSTDIR
SetShellVarContext all
; AddFiles
File /r /x "mRemoteNG.vshost.*" "..\mRemoteV1\bin\Release\*.*"
File /r "Dependencies\*.*"
File "..\*.txt"
; Uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
; Register ActiveX components
RegDLL "$INSTDIR\eolwtscom.dll"
; Start Menu
CreateDirectory "$SMPROGRAMS\mRemoteNG"
CreateShortCut "$SMPROGRAMS\mRemoteNG\$(CreditsLinkName).lnk" "$INSTDIR\CREDITS.TXT"
CreateShortCut "$SMPROGRAMS\mRemoteNG\$(CopyingLinkName).lnk" "$INSTDIR\COPYING.TXT"
CreateShortCut "$SMPROGRAMS\mRemoteNG\mRemoteNG.lnk" "$INSTDIR\mRemoteNG.exe"
CreateShortCut "$SMPROGRAMS\mRemoteNG\$(UninstallLinkName).lnk" "$INSTDIR\Uninstall.exe"
CreateShortCut "$SMPROGRAMS\mRemoteNG\$(ChangeLogLinkName).lnk" "$INSTDIR\CHANGELOG.TXT"
; Registry
WriteRegStr HKLM "Software\mRemoteNG" "InstallPath" $INSTDIR
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\mRemoteNG" "DisplayName" "mRemoteNG"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\mRemoteNG" "Publisher" "Next Generation Software"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\mRemoteNG" "DisplayIcon" "$INSTDIR\mRemoteNG.exe"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\mRemoteNG" "EstimatedSize" 7080
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\mRemoteNG" "DisplayVersion" ${PRODUCT_VERSION}
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\mRemoteNG" "VersionMajor" ${PRODUCT_VERSION_MAJOR}
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\mRemoteNG" "VersionMinor" ${PRODUCT_VERSION_MINOR}
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\mRemoteNG" "UninstallString" '"$INSTDIR\Uninstall.exe"'
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\mRemoteNG" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\mRemoteNG" "NoRepair" 1
SectionEnd
Section "un.Uninstall"
; Unregister ActiveX components
UnregDLL "$INSTDIR\eolwtscom.dll"
; Delete Files
RMDIR /r $INSTDIR
; Start Menu
SetShellVarContext all
RMDir /r "$SMPROGRAMS\mRemoteNG"
SetShellVarContext current
RMDir /r "$SMPROGRAMS\mRemoteNG"
; Registry
DeleteRegValue HKLM "Software\mRemoteNG" "InstallPath"
DeleteRegKey /ifempty HKLM "Software\mRemoteNG"
DeleteRegKey /ifempty HKCU "Software\mRemoteNG"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\mRemoteNG"
SectionEnd

43
README.MD Normal file
View File

@@ -0,0 +1,43 @@
[![Twitter Follow](https://img.shields.io/twitter/follow/mRemoteNG.svg?style=social&label=Follow)](https://twitter.com/intent/follow?screen_name=mRemoteNG)
[![Join the chat at https://gitter.im/mRemoteNG/PublicChat/](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mRemoteNG/PublicChat)
[![PayPal](https://img.shields.io/badge/%24-PayPal-blue.svg)](https://www.paypal.me/DavidSparer)
[![Build Status](http://ec2-52-39-111-114.us-west-2.compute.amazonaws.com:8080/buildStatus/icon?job=mRemoteNG/mRemoteNG/develop)](http://ec2-52-39-111-114.us-west-2.compute.amazonaws.com:8080/job/mRemoteNG/job/mRemoteNG/job/develop/)
[![Issues In Progress](https://badge.waffle.io/mRemoteNG/mRemoteNG.png?label=In%20Progress&title=In%20Progress)](https://waffle.io/mRemoteNG/mRemoteNG)
[![Github Releases (by Release)](https://img.shields.io/github/downloads/mRemoteNG/mRemoteNG/v1.74/total.svg)](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.74)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/529/badge)](https://bestpractices.coreinfrastructure.org/projects/529)
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).
[![Developed with ReSharper](https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/develop/.github/icon_ReSharper.png)](https://www.jetbrains.com/resharper/)

View File

@@ -11,4 +11,15 @@ Currently these protocols are supported:
* Telnet (TELecommunication NETwork)
* HTTP/S (Hypertext Transfer Protocol)
* Rlogin (Rlogin)
* RAW
* 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).

BIN
Tools/7zip/7za.dll Normal file

Binary file not shown.

BIN
Tools/7zip/7za.exe Normal file

Binary file not shown.

BIN
Tools/7zip/7zxa.dll Normal file

Binary file not shown.

31
Tools/7zip/License.txt Normal file
View File

@@ -0,0 +1,31 @@
7-Zip Extra
~~~~~~~~~~~
License for use and distribution
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Copyright (C) 1999-2016 Igor Pavlov.
7-Zip Extra files are under the GNU LGPL license.
Notes:
You can use 7-Zip Extra on any computer, including a computer in a commercial
organization. You don't need to register or pay for 7-Zip.
GNU LGPL information
--------------------
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You can receive a copy of the GNU Lesser General Public License from
http://www.gnu.org/

77
Tools/7zip/history.txt Normal file
View File

@@ -0,0 +1,77 @@
7-Zip Extra history
-------------------
9.35 beta 2014-12-07
------------------------------
- SFX modules were moved to LZMA SDK package.
9.34 alpha 2014-06-22
------------------------------
- Minimum supported system now is Windows 2000 for EXE and DLL files.
- all EXE and DLL files use msvcrt.dll.
- 7zr.exe now support AES encryption.
9.18 2010-11-02
------------------------------
- New small SFX module for installers.
9.17 2010-10-04
------------------------------
- New 7-Zip plugin for FAR Manager x64.
9.10 2009-12-30
------------------------------
- 7-Zip for installers now supports LZMA2.
9.09 2009-12-12
------------------------------
- LZMA2 compression method support.
- Some bugs were fixed.
4.65 2009-02-03
------------------------------
- Some bugs were fixed.
4.38 beta 2006-04-13
------------------------------
- SFX for installers now supports new properties in config file:
Progress, Directory, ExecuteFile, ExecuteParameters.
4.34 beta 2006-02-27
------------------------------
- ISetProperties::SetProperties:
it's possible to specify desirable number of CPU threads:
PROPVARIANT: name=L"mt", vt = VT_UI4, ulVal = NumberOfThreads
If "mt" is not defined, 7za.dll will check number of processors in system to set
number of desirable threads.
Now 7za.dll can use:
2 threads for LZMA compressing
N threads for BZip2 compressing
4 threads for BZip2 decompressing
Other codecs use only one thread.
Note: 7za.dll can use additional "small" threads with low CPU load.
- It's possible to call ISetProperties::SetProperties to specify "mt" property for decoder.
4.33 beta 2006-02-05
------------------------------
- Compressing speed and Memory requirements were increased.
Default dictionary size was increased: Fastest: 64 KB, Fast: 1 MB,
Normal: 4 MB, Max: 16 MB, Ultra: 64 MB.
- 7z/LZMA now can use only these match finders: HC4, BT2, BT3, BT4
4.27 2005-09-21
------------------------------
- Some GUIDs/interfaces were changed.
IStream.h:
ISequentialInStream::Read now works as old ReadPart
ISequentialOutStream::Write now works as old WritePart

124
Tools/7zip/readme.txt Normal file
View File

@@ -0,0 +1,124 @@
7-Zip Extra 16.02
-----------------
7-Zip Extra is package of extra modules of 7-Zip.
7-Zip Copyright (C) 1999-2016 Igor Pavlov.
7-Zip is free software. Read License.txt for more information about license.
Source code of binaries can be found at:
http://www.7-zip.org/
This package contains the following files:
7za.exe - standalone console version of 7-Zip with reduced formats support.
7za.dll - library for working with 7z archives
7zxa.dll - library for extracting from 7z archives
License.txt - license information
readme.txt - this file
Far\ - plugin for Far Manager
x64\ - binaries for x64
All 32-bit binaries can work in:
Windows 2000 / 2003 / 2008 / XP / Vista / 7 / 8 / 10
and in any Windows x64 version with WoW64 support.
All x64 binaries can work in any Windows x64 version.
All binaries use msvcrt.dll.
7za.exe
-------
7za.exe - is a standalone console version of 7-Zip with reduced formats support.
Extra: 7za.exe : support for only some formats of 7-Zip.
7-Zip: 7z.exe with 7z.dll : support for all formats of 7-Zip.
7za.exe and 7z.exe from 7-Zip have same command line interface.
7za.exe doesn't use external DLL files.
You can read Help File (7-zip.chm) from 7-Zip package for description
of all commands and switches for 7za.exe and 7z.exe.
7za.exe features:
- High compression ratio in 7z format
- Supported formats:
- Packing / unpacking: 7z, xz, ZIP, GZIP, BZIP2 and TAR
- Unpacking only: Z, lzma, CAB.
- Highest compression ratio for ZIP and GZIP formats.
- Fast compression and decompression
- Strong AES-256 encryption in 7z and ZIP formats.
Note: LZMA SDK contains 7zr.exe - more reduced version of 7za.exe.
But you can use 7zr.exe as "public domain" code.
DLL files
---------
7za.dll and 7zxa.dll are reduced versions of 7z.dll from 7-Zip.
7za.dll and 7zxa.dll support only 7z format.
Note: 7z.dll is main DLL file that works with all archive types in 7-Zip.
7za.dll and 7zxa.dll support the following decoding methods:
- LZMA, LZMA2, PPMD, BCJ, BCJ2, COPY, 7zAES, BZip2, Deflate.
7za.dll also supports 7z encoding with the following encoding methods:
- LZMA, LZMA2, PPMD, BCJ, BCJ2, COPY, 7zAES.
7za.dll and 7zxa.dll work via COM interfaces.
But these DLLs don't use standard COM interfaces for objects creating.
Look also example code that calls DLL functions (in source code of 7-Zip):
7zip\UI\Client7z
Another example of binary that uses these interface is 7-Zip itself.
The following binaries from 7-Zip use 7z.dll:
- 7z.exe (console version)
- 7zG.exe (GUI version)
- 7zFM.exe (7-Zip File Manager)
Note: The source code of LZMA SDK also contains the code for similar DLLs
(DLLs without BZip2, Deflate support). And these files from LZMA SDK can be
used as "public domain" code. If you use LZMA SDK files, you don't need to
follow GNU LGPL rules, if you want to change the code.
License FAQ
-----------
Can I use the EXE or DLL files from 7-Zip in a commercial application?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Yes, but you are required to specify in documentation for your application:
(1) that you used parts of the 7-Zip program,
(2) that 7-Zip is licensed under the GNU LGPL license and
(3) you must give a link to www.7-zip.org, where the source code can be found.
Can I use the source code of 7-Zip in a commercial application?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Since 7-Zip is licensed under the GNU LGPL you must follow the rules of that license.
In brief, it means that any LGPL'ed code must remain licensed under the LGPL.
For instance, you can change the code from 7-Zip or write a wrapper for some
code from 7-Zip and compile it into a DLL; but, the source code of that DLL
(including your modifications / additions / wrapper) must be licensed under
the LGPL or GPL.
Any other code in your application can be licensed as you wish. This scheme allows
users and developers to change LGPL'ed code and recompile that DLL. That is the
idea of free software. Read more here: http://www.gnu.org/.
Note: You can look also LZMA SDK, which is available under a more liberal license.
---
End of document

45
Tools/build-relport.cmd Normal file
View File

@@ -0,0 +1,45 @@
@echo off
setlocal enabledelayedexpansion
set SOLUTIONDIR=%~dp0..
rem Windows Sysinternals Sigcheck from http://technet.microsoft.com/en-us/sysinternals/bb897441
set SIGCHECK="%SOLUTIONDIR%\Tools\sigcheck.exe"
set SEVENZIP="%SOLUTIONDIR%\Tools\7zip\7za.exe"
set VCVARSALL="%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
call %VCVARSALL% x86
IF NOT "%~1"=="build" goto skipbuild
echo Building...
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe" "%SOLUTIONDIR%\mRemoteV1.sln" /Rebuild "Release Portable"
:skipbuild
IF NOT EXIST "%SOLUTIONDIR%\mRemoteV1\bin\Release Portable\mRemoteNG.exe" echo Did you forget to build? && goto end
set SIGCHECK=!SIGCHECK:"=^"!
set SIGCHECK=!SIGCHECK: =^^ !
set SIGCHECK=!SIGCHECK:(=^^(!
set SIGCHECK=!SIGCHECK:)=^^)!
for /F "usebackq delims=. tokens=1-4" %%i in (`!SIGCHECK! /accepteula -q -n "%SOLUTIONDIR%\mRemoteV1\bin\Release Portable\mRemoteNG.exe"`) do (
set PRODUCT_VERSION_SHORT=%%i.%%j
set PRODUCT_VERSION=%%i.%%j.%%k.%%l
)
echo Version is %PRODUCT_VERSION%
set PORTABLEZIP="%SOLUTIONDIR%\Release\mRemoteNG-Portable-%PRODUCT_VERSION%.zip"
rmdir /S /Q "%SOLUTIONDIR%\mRemoteV1\bin\package"
mkdir "%SOLUTIONDIR%\mRemoteV1\bin\package"
copy "%SOLUTIONDIR%\*.txt" "%SOLUTIONDIR%\mRemoteV1\bin\package"
copy "%SOLUTIONDIR%\Installer Projects\Installer\Dependencies\PuTTYNG.exe" "%SOLUTIONDIR%\mRemoteV1\bin\package"
xcopy /S /Y "%SOLUTIONDIR%\mRemoteV1\bin\Release Portable" "%SOLUTIONDIR%\mRemoteV1\bin\package"
echo Creating portable ZIP file...
echo %PORTABLEZIP%
del /f /q %PORTABLEZIP% > nul 2>&1
%SEVENZIP% a -bt -mx=9 -tzip -y -r %PORTABLEZIP% "%SOLUTIONDIR%\mRemoteV1\bin\package\*.*"
%SEVENZIP% a -bt -mx=9 -tzip -y %PORTABLEZIP% "%SOLUTIONDIR%\*.TXT"
:end

View File

@@ -0,0 +1,16 @@
$sourcePath = $args[0]
$destinationDir = $args[1]
Write-Host $sourcePath
Write-Host $destinationDir
if (!(Test-Path -Path $destinationDir))
{
New-Item -Path $destinationDir -ItemType "directory"
}
$sourceFiles = Get-ChildItem -Path $sourcePath -Recurse | ?{$_.Extension -match "exe|msi"}
foreach ($item in $sourceFiles)
{
Copy-Item -Path $item.FullName -Destination $destinationDir -Force
}

View File

@@ -0,0 +1,42 @@
#Requires -Version 4.0
$releaseFolder = Join-Path -Path $PSScriptRoot -ChildPath "..\Release" -Resolve
$tag = Read-Host -Prompt 'Tag name'
Write-Host
Write-Host
Write-Host
Write-Host PORTABLE
Write-Host --------
$file = Get-ChildItem -Path "$releaseFolder\*.zip" | sort LastWriteTime | select -last 1 | % { $_.FullName }
$filename = $file.Split("\") | select -last 1
$version = $file.tostring().Split("-")[2].trim(".zip")
Write-Host Version: $version
Write-Host dURL: https://github.com/mRemoteNG/mRemoteNG/releases/download/$tag/$filename
Write-Host clURL: https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/$tag/CHANGELOG.TXT
$hash = Get-FileHash -Algorithm MD5 $file | % { $_.Hash }
Write-Host Checksum: $hash
Write-Host
Write-Host
Write-Host
Write-Host MSI
Write-Host ---
$file = Get-ChildItem -Path "$releaseFolder\*.msi" | sort LastWriteTime | select -last 1 | % { $_.FullName }
$filename = $file.Split("\") | select -last 1
$version = $file.tostring().Split("-")[2].trim(".msi")
Write-Host Version: $version
Write-Host dURL: https://github.com/mRemoteNG/mRemoteNG/releases/download/$tag/$filename
Write-Host clURL: https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/$tag/CHANGELOG.TXT
Write-Host CertificateThumbprint: 0CEA828E5C787EA8AA89268D83816C1EA03375BA
$hash = Get-FileHash -Algorithm MD5 $file | % { $_.Hash }
Write-Host Checksum: $hash

View File

@@ -0,0 +1,25 @@
$solutionDir = $args[0]
$renameTarget = $solutionDir + "InstallerProjects\Installer\bin\Release\en-US\mRemoteNG-Installer.msi"
Write-Host $solutionDir
Write-Host $renameTarget
$targetVersionedFile = "$solutionDir\mRemoteV1\bin\Release\mRemoteNG.exe"
$version = &"$solutionDir\Tools\sigcheck.exe" /accepteula -q -n $targetVersionedFile
$renameTargetFileObject = Get-Item -Path $renameTarget -ErrorAction SilentlyContinue
if ($renameTargetFileObject)
{
# Build the new file name
$oldFileName = $renameTargetFileObject.Name
$newFileName = $oldFileName -replace "$("\"+$renameTargetFileObject.Extension)",$("-"+$version+$renameTargetFileObject.Extension)
Write-Host $oldFileName
Write-Host $newFileName
# Delete any items that already exist with the new name (effectively an overwrite)
Remove-Item -Path "$($renameTargetFileObject.Directory.FullName)\$newFileName" -ErrorAction SilentlyContinue
# Rename file
Rename-Item -Path $renameTarget -NewName $newFileName -ErrorAction SilentlyContinue
}

BIN
Tools/sigcheck.exe Normal file

Binary file not shown.

13
Tools/signfiles.ps1 Normal file
View File

@@ -0,0 +1,13 @@
$timeserver = "http://timestamp.verisign.com/scripts/timstamp.dll"
$certPath = "C:\mRemoteNG_code_signing_cert.pfx"
$certPassword = (Get-Credential -Message "Enter the password for the certificate" -UserName "USERNAME NOT NEEDED").Password
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($certPath, $certPassword)
$targetPath = $args[0]
Write-Output "Getting files from path: $targetPath"
$signableFiles = Get-ChildItem -Path $targetPath -Recurse | ?{$_.Extension -match "dll|exe|msi"}
Write-Output "Signable files count: $($signableFiles.Count)"
foreach ($file in $signableFiles) {
Set-AuthenticodeSignature -Certificate $cert -TimestampServer $timeserver -IncludeChain all -FilePath $file.FullName
}

View File

@@ -0,0 +1,68 @@
using NUnit.Framework;
using System.IO;
namespace mRemoteNGTests
{
[TestFixture]
public class BinaryFileTests
{
[Test]
public void LargeAddressAwareFlagIsSet()
{
var exePath = GetTargetPath();
Assert.That(IsLargeAware(exePath), Is.True);
}
static string GetTargetPath([System.Runtime.CompilerServices.CallerFilePath] string sourceFilePath = "")
{
string debugOrRelease = "";
string normalOrPortable = "";
#if DEBUG
debugOrRelease = "Debug";
#else
debugOrRelease = "Release";
#endif
#if PORTABLE
normalOrPortable = " Portable";
#else
normalOrPortable = "";
#endif
var path = Path.GetDirectoryName(sourceFilePath);
string FilePath = $"{path}\\..\\mRemoteV1\\bin\\{debugOrRelease}{normalOrPortable}\\mRemoteNG.exe";
return FilePath;
}
static bool IsLargeAware(string file)
{
using (var fs = File.OpenRead(file))
{
return IsLargeAware(fs);
}
}
/// <summary>
/// Checks if the stream is a MZ header and if it is large address aware
/// </summary>
/// <param name="stream">Stream to check, make sure its at the start of the MZ header</param>
/// <exception cref=""></exception>
/// <returns></returns>
static bool IsLargeAware(Stream stream)
{
const int IMAGE_FILE_LARGE_ADDRESS_AWARE = 0x20;
var br = new BinaryReader(stream);
if (br.ReadInt16() != 0x5A4D) //No MZ Header
return false;
br.BaseStream.Position = 0x3C;
var peloc = br.ReadInt32(); //Get the PE header location.
br.BaseStream.Position = peloc;
if (br.ReadInt32() != 0x4550) //No PE header
return false;
br.BaseStream.Position += 0x12;
return (br.ReadInt16() & IMAGE_FILE_LARGE_ADDRESS_AWARE) == IMAGE_FILE_LARGE_ADDRESS_AWARE;
}
}
}

View File

@@ -1,27 +0,0 @@
using System;
using NUnit.Framework;
using mRemoteNG.Config;
using mRemoteNG.Config.Connections;
using NSubstitute;
namespace mRemoteNGTests.Config.Connections
{
[TestFixture]
public class SqlConnectionUpdateCheckerTests
{
SqlConnectionsUpdateChecker _updateChecker;
[SetUp]
public void Setup()
{
_updateChecker = new SqlConnectionsUpdateChecker();
}
[TearDown]
public void Teardown()
{
_updateChecker.Dispose();
_updateChecker = null;
}
}
}

View File

@@ -1,32 +0,0 @@
using System;
using NUnit.Framework;
using mRemoteNG.Config.Connections;
using System.Data.SqlClient;
namespace mRemoteNGTests.Config.Connections
{
[TestFixture]
public class SqlUpdateQueryBuilderTest
{
private SqlUpdateQueryBuilder _sqlUpdateQueryBuilder;
[SetUp]
public void Setup()
{
_sqlUpdateQueryBuilder = new SqlUpdateQueryBuilder();
}
[TearDown]
public void Teardown()
{
_sqlUpdateQueryBuilder = null;
}
[Test]
public void SqlUpdateQueryBuilderReturnsSomeCommand()
{
SqlCommand command = _sqlUpdateQueryBuilder.BuildCommand();
Assert.AreNotEqual(command.CommandText, "");
}
}
}

View File

@@ -1,40 +0,0 @@
using mRemoteNG.Config.Connections;
using NUnit.Framework;
namespace mRemoteNGTests.Config.Connections
{
[TestFixture]
public class SqlUpdateTimerTests
{
private SqlUpdateTimer sqlUpdateChecker;
[SetUp]
public void SetupSqlUpdateChecker()
{
sqlUpdateChecker = new SqlUpdateTimer();
}
[TearDown]
public void TearDownSqlUpdateChecker()
{
sqlUpdateChecker.Dispose();
sqlUpdateChecker = null;
}
[Test]
public void EnableSQLUpdating()
{
sqlUpdateChecker.Enable();
Assert.AreEqual(true, sqlUpdateChecker.IsUpdateCheckingEnabled());
}
[Test]
public void DisableSQLUpdating()
{
sqlUpdateChecker.Enable();
Assert.AreEqual(true, sqlUpdateChecker.IsUpdateCheckingEnabled());
sqlUpdateChecker.Disable();
Assert.AreEqual(false, sqlUpdateChecker.IsUpdateCheckingEnabled());
}
}
}

View File

@@ -0,0 +1,128 @@
using mRemoteNG.Config.Serializers;
using mRemoteNG.Connection;
using mRemoteNG.Container;
using mRemoteNG.Security;
using mRemoteNG.Tree;
using mRemoteNG.Tree.Root;
using NUnit.Framework;
namespace mRemoteNGTests.Config.Serializers
{
public class DataTableSerializerTests
{
private DataTableSerializer _dataTableSerializer;
private SaveFilter _saveFilter;
[SetUp]
public void Setup()
{
_saveFilter = new SaveFilter();
_dataTableSerializer = new DataTableSerializer(_saveFilter);
}
[TearDown]
public void Teardown()
{
_saveFilter = null;
_dataTableSerializer = null;
}
[Test]
public void AllItemsSerialized()
{
var model = CreateConnectionTreeModel();
var dataTable = _dataTableSerializer.Serialize(model);
Assert.That(dataTable.Rows.Count, Is.EqualTo(3));
}
[Test]
public void UsernameSerializedWhenSaveSecurityAllowsIt()
{
var model = CreateConnectionTreeModel();
_saveFilter.SaveUsername = true;
var dataTable = _dataTableSerializer.Serialize(model);
Assert.That(dataTable.Rows[0]["Username"], Is.Not.EqualTo(""));
}
[Test]
public void DomainSerializedWhenSaveSecurityAllowsIt()
{
var model = CreateConnectionTreeModel();
_saveFilter.SaveDomain = true;
var dataTable = _dataTableSerializer.Serialize(model);
Assert.That(dataTable.Rows[0]["DomainName"], Is.Not.EqualTo(""));
}
[Test]
public void PasswordSerializedWhenSaveSecurityAllowsIt()
{
var model = CreateConnectionTreeModel();
_saveFilter.SavePassword = true;
var dataTable = _dataTableSerializer.Serialize(model);
Assert.That(dataTable.Rows[0]["Password"], Is.Not.EqualTo(""));
}
[Test]
public void InheritanceSerializedWhenSaveSecurityAllowsIt()
{
var model = CreateConnectionTreeModel();
_saveFilter.SaveInheritance = true;
var dataTable = _dataTableSerializer.Serialize(model);
Assert.That(dataTable.Rows[0]["InheritUsername"], Is.Not.EqualTo(""));
}
[Test]
public void UsernameNotSerializedWhenSaveSecurityDisabled()
{
var model = CreateConnectionTreeModel();
_saveFilter.SaveUsername = false;
var dataTable = _dataTableSerializer.Serialize(model);
Assert.That(dataTable.Rows[0]["Username"], Is.EqualTo(""));
}
[Test]
public void DomainNotSerializedWhenSaveSecurityDisabled()
{
var model = CreateConnectionTreeModel();
_saveFilter.SaveDomain = false;
var dataTable = _dataTableSerializer.Serialize(model);
Assert.That(dataTable.Rows[0]["DomainName"], Is.EqualTo(""));
}
[Test]
public void PasswordNotSerializedWhenSaveSecurityDisabled()
{
var model = CreateConnectionTreeModel();
_saveFilter.SavePassword = false;
var dataTable = _dataTableSerializer.Serialize(model);
Assert.That(dataTable.Rows[0]["Password"], Is.EqualTo(""));
}
[Test]
public void InheritanceNotSerializedWhenSaveSecurityDisabled()
{
var model = CreateConnectionTreeModel();
_saveFilter.SaveInheritance = false;
var dataTable = _dataTableSerializer.Serialize(model);
Assert.That(dataTable.Rows[0]["InheritUsername"], Is.False);
}
private ConnectionTreeModel CreateConnectionTreeModel()
{
var model = new ConnectionTreeModel();
var root = new RootNodeInfo(RootNodeType.Connection);
var folder1 = new ContainerInfo {Name = "folder1", Username = "user1", Domain = "domain1", Password = "password1"};
var con1 = new ConnectionInfo {Name = "Con1", Username = "user1", Domain = "domain1", Password = "password1" };
var con2 = new ConnectionInfo {Name = "Con2", Username = "user2", Domain = "domain2", Password = "password2" };
root.AddChild(folder1);
root.AddChild(con2);
folder1.AddChild(con1);
model.AddRootNode(root);
return model;
}
}
}

View File

@@ -0,0 +1,61 @@
using System.Linq;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Connection;
using mRemoteNG.Connection.Protocol;
using mRemoteNG.Tools;
using NUnit.Framework;
namespace mRemoteNGTests.Config.Serializers
{
public class PortScanDeserializerTests
{
private PortScanDeserializer _deserializer;
private ConnectionInfo _importedConnectionInfo;
private const string ExpectedHostName = "server1.domain.com";
private const string ExpectedDisplayName = "server1";
private const ProtocolType ExpectedProtocolType = ProtocolType.SSH2;
[OneTimeSetUp]
public void OnetimeSetup()
{
var host = new ScanHost("10.20.30.40")
{
HostName = "server1.domain.com",
SSH = true
};
_deserializer = new PortScanDeserializer(new [] {host}, ProtocolType.SSH2);
_deserializer.Deserialize();
var connectionTreeModel = _deserializer.Deserialize();
var root = connectionTreeModel.RootNodes.First();
_importedConnectionInfo = root.Children.First();
}
[OneTimeTearDown]
public void OnetimeTeardown()
{
_deserializer = null;
_importedConnectionInfo = null;
}
[Test]
public void DisplayNameImported()
{
Assert.That(_importedConnectionInfo.Name, Is.EqualTo(ExpectedDisplayName));
}
[Test]
public void HostNameImported()
{
Assert.That(_importedConnectionInfo.Hostname, Is.EqualTo(ExpectedHostName));
}
[Test]
public void ProtocolImported()
{
Assert.That(_importedConnectionInfo.Protocol, Is.EqualTo(ExpectedProtocolType));
}
}
}

View File

@@ -0,0 +1,112 @@
using System.Linq;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Connection;
using mRemoteNG.Connection.Protocol;
using mRemoteNG.Container;
using mRemoteNGTests.Properties;
using NUnit.Framework;
namespace mRemoteNGTests.Config.Serializers
{
public class PuttyConnectionManagerDeserializerTests
{
private PuttyConnectionManagerDeserializer _deserializer;
private ContainerInfo _rootImportedFolder;
private const string ExpectedRootFolderName = "test_puttyConnectionManager_database";
private const string ExpectedConnectionDisplayName = "my ssh connection";
private const string ExpectedConnectionHostname = "server1.mydomain.com";
private const string ExpectedConnectionDescription = "My Description Here";
private const int ExpectedConnectionPort = 22;
private const ProtocolType ExpectedProtocolType = ProtocolType.SSH2;
private const string ExpectedPuttySession = "MyCustomPuttySession";
private const string ExpectedConnectionUsername = "mysshusername";
private const string ExpectedConnectionPassword = "password123";
[OneTimeSetUp]
public void OnetimeSetup()
{
var fileContents = Resources.test_puttyConnectionManager_database;
_deserializer = new PuttyConnectionManagerDeserializer(fileContents);
var connectionTreeModel = _deserializer.Deserialize();
var rootNode = connectionTreeModel.RootNodes.First();
_rootImportedFolder = rootNode.Children.Cast<ContainerInfo>().First();
}
[OneTimeTearDown]
public void OnetimeTeardown()
{
_deserializer = null;
_rootImportedFolder = null;
}
[Test]
public void RootFolderImportedWithCorrectName()
{
Assert.That(_rootImportedFolder.Name, Is.EqualTo(ExpectedRootFolderName));
}
[Test]
public void ConnectionDisplayNameImported()
{
var connection = GetSshConnection();
Assert.That(connection.Name, Is.EqualTo(ExpectedConnectionDisplayName));
}
[Test]
public void ConnectionHostNameImported()
{
var connection = GetSshConnection();
Assert.That(connection.Hostname, Is.EqualTo(ExpectedConnectionHostname));
}
[Test]
public void ConnectionDescriptionImported()
{
var connection = GetSshConnection();
Assert.That(connection.Description, Is.EqualTo(ExpectedConnectionDescription));
}
[Test]
public void ConnectionPortImported()
{
var connection = GetSshConnection();
Assert.That(connection.Port, Is.EqualTo(ExpectedConnectionPort));
}
[Test]
public void ConnectionProtocolTypeImported()
{
var connection = GetSshConnection();
Assert.That(connection.Protocol, Is.EqualTo(ExpectedProtocolType));
}
[Test]
public void ConnectionPuttySessionImported()
{
var connection = GetSshConnection();
Assert.That(connection.PuttySession, Is.EqualTo(ExpectedPuttySession));
}
[Test]
public void ConnectionUsernameImported()
{
var connection = GetSshConnection();
Assert.That(connection.Username, Is.EqualTo(ExpectedConnectionUsername));
}
[Test]
public void ConnectionPasswordImported()
{
var connection = GetSshConnection();
Assert.That(connection.Password, Is.EqualTo(ExpectedConnectionPassword));
}
private ConnectionInfo GetSshConnection()
{
var sshFolder = _rootImportedFolder.Children.OfType<ContainerInfo>().First(node => node.Name == "SSHFolder");
return sshFolder.Children.First();
}
}
}

View File

@@ -0,0 +1,185 @@
using System;
using System.Linq;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Connection;
using mRemoteNG.Connection.Protocol.RDP;
using mRemoteNG.Tree;
using mRemoteNGTests.Properties;
using NUnit.Framework;
namespace mRemoteNGTests.Config.Serializers
{
public class RemoteDesktopConnectionDeserializerTests
{
// .rdp file schema: https://technet.microsoft.com/en-us/library/ff393699(v=ws.10).aspx
private string[] _connectionFileContents;
private RemoteDesktopConnectionDeserializer _deserializer;
private ConnectionTreeModel _connectionTreeModel;
private const string ExpectedHostname = "testhostname.domain.com";
private const string ExpectedUserName = "myusernamehere";
private const string ExpectedDomain = "myspecialdomain";
private const string ExpectedGatewayHostname = "gatewayhostname.domain.com";
private const int ExpectedPort = 9933;
private const ProtocolRDP.RDPColors ExpectedColors = ProtocolRDP.RDPColors.Colors24Bit;
private const bool ExpectedBitmapCaching = false;
private const ProtocolRDP.RDPResolutions ExpectedResolutionMode = ProtocolRDP.RDPResolutions.FitToWindow;
private const bool ExpectedWallpaperDisplay = true;
private const bool ExpectedThemesDisplay = true;
private const bool ExpectedFontSmoothing = true;
private const bool ExpectedDesktopComposition = true;
private const bool ExpectedSmartcardRedirection = true;
private const bool ExpectedDriveRedirection = true;
private const bool ExpectedPortRedirection = true;
private const bool ExpectedPrinterRedirection = true;
private const ProtocolRDP.RDPSounds ExpectedSoundRedirection = ProtocolRDP.RDPSounds.BringToThisComputer;
[OneTimeSetUp]
public void OnetimeSetup()
{
_connectionFileContents = Resources.test_remotedesktopconnection_rdp.Split(Environment.NewLine.ToCharArray());
_deserializer = new RemoteDesktopConnectionDeserializer(_connectionFileContents);
_connectionTreeModel = _deserializer.Deserialize();
}
[OneTimeTearDown]
public void OnetimeTeardown()
{
_deserializer = null;
}
[Test]
public void ConnectionTreeModelHasARootNode()
{
var numberOfRootNodes = _connectionTreeModel.RootNodes.Count;
Assert.That(numberOfRootNodes, Is.GreaterThan(0));
}
[Test]
public void RootNodeHasConnectionInfo()
{
var rootNodeContents = _connectionTreeModel.RootNodes.First().Children.OfType<ConnectionInfo>();
Assert.That(rootNodeContents, Is.Not.Empty);
}
[Test]
public void HostnameImportedCorrectly()
{
var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First();
Assert.That(connectionInfo.Hostname, Is.EqualTo(ExpectedHostname));
}
[Test]
public void PortImportedCorrectly()
{
var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First();
Assert.That(connectionInfo.Port, Is.EqualTo(ExpectedPort));
}
[Test]
public void UsernameImportedCorrectly()
{
var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First();
Assert.That(connectionInfo.Username, Is.EqualTo(ExpectedUserName));
}
[Test]
public void DomainImportedCorrectly()
{
var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First();
Assert.That(connectionInfo.Domain, Is.EqualTo(ExpectedDomain));
}
[Test]
public void RdpColorsImportedCorrectly()
{
var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First();
Assert.That(connectionInfo.Colors, Is.EqualTo(ExpectedColors));
}
[Test]
public void BitmapCachingImportedCorrectly()
{
var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First();
Assert.That(connectionInfo.CacheBitmaps, Is.EqualTo(ExpectedBitmapCaching));
}
[Test]
public void ResolutionImportedCorrectly()
{
var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First();
Assert.That(connectionInfo.Resolution, Is.EqualTo(ExpectedResolutionMode));
}
[Test]
public void DisplayWallpaperImportedCorrectly()
{
var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First();
Assert.That(connectionInfo.DisplayWallpaper, Is.EqualTo(ExpectedWallpaperDisplay));
}
[Test]
public void DisplayThemesImportedCorrectly()
{
var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First();
Assert.That(connectionInfo.DisplayThemes, Is.EqualTo(ExpectedThemesDisplay));
}
[Test]
public void FontSmoothingImportedCorrectly()
{
var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First();
Assert.That(connectionInfo.EnableFontSmoothing, Is.EqualTo(ExpectedFontSmoothing));
}
[Test]
public void DesktopCompositionImportedCorrectly()
{
var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First();
Assert.That(connectionInfo.EnableDesktopComposition, Is.EqualTo(ExpectedDesktopComposition));
}
[Test]
public void SmartcardRedirectionImportedCorrectly()
{
var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First();
Assert.That(connectionInfo.RedirectSmartCards, Is.EqualTo(ExpectedSmartcardRedirection));
}
[Test]
public void DriveRedirectionImportedCorrectly()
{
var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First();
Assert.That(connectionInfo.RedirectDiskDrives, Is.EqualTo(ExpectedDriveRedirection));
}
[Test]
public void PortRedirectionImportedCorrectly()
{
var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First();
Assert.That(connectionInfo.RedirectPorts, Is.EqualTo(ExpectedPortRedirection));
}
[Test]
public void PrinterRedirectionImportedCorrectly()
{
var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First();
Assert.That(connectionInfo.RedirectPrinters, Is.EqualTo(ExpectedPrinterRedirection));
}
[Test]
public void SoundRedirectionImportedCorrectly()
{
var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First();
Assert.That(connectionInfo.RedirectSound, Is.EqualTo(ExpectedSoundRedirection));
}
//[Test]
//public void GatewayHostnameImportedCorrectly()
//{
// var connectionInfo = _connectionTreeModel.RootNodes.First().Children.First();
// Assert.That(connectionInfo.RDGatewayHostname, Is.EqualTo(_expectedGatewayHostname));
//}
}
}

View File

@@ -0,0 +1,335 @@
using System.Linq;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Connection.Protocol;
using mRemoteNG.Connection.Protocol.RDP;
using mRemoteNG.Container;
using mRemoteNG.Tree;
using mRemoteNGTests.Properties;
using NUnit.Framework;
using System.IO;
namespace mRemoteNGTests.Config.Serializers
{
public class RemoteDesktopConnectionManagerDeserializerTests
{
private string _connectionFileContents;
private RemoteDesktopConnectionManagerDeserializer _deserializer;
private ConnectionTreeModel _connectionTreeModel;
private const string ExpectedName = "server1_displayname";
private const string ExpectedHostname = "server1";
private const string ExpectedDescription = "Comment text here";
private const string ExpectedUsername = "myusername1";
private const string ExpectedDomain = "mydomain";
private const string ExpectedPassword = "passwordHere!";
private const bool ExpectedUseConsoleSession = true;
private const int ExpectedPort = 9933;
private const ProtocolRDP.RDGatewayUsageMethod ExpectedGatewayUsageMethod = ProtocolRDP.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 ProtocolRDP.RDPResolutions ExpectedRdpResolution = ProtocolRDP.RDPResolutions.FitToWindow;
private const ProtocolRDP.RDPColors ExpectedRdpColorDepth = ProtocolRDP.RDPColors.Colors24Bit;
private const ProtocolRDP.RDPSounds ExpectedAudioRedirection = ProtocolRDP.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 ProtocolRDP.AuthenticationLevel ExpectedAuthLevel = ProtocolRDP.AuthenticationLevel.AuthRequired;
[OneTimeSetUp]
public void OnetimeSetup()
{
_connectionFileContents = Resources.test_rdcman_v2_2_schema1;
_deserializer = new RemoteDesktopConnectionManagerDeserializer(_connectionFileContents);
_connectionTreeModel = _deserializer.Deserialize();
}
[OneTimeTearDown]
public void OnetimeTeardown()
{
_deserializer = null;
}
[Test]
public void ConnectionTreeModelHasARootNode()
{
var numberOfRootNodes = _connectionTreeModel.RootNodes.Count;
Assert.That(numberOfRootNodes, Is.GreaterThan(0));
}
[Test]
public void RootNodeHasContents()
{
var rootNodeContents = _connectionTreeModel.RootNodes.First().Children;
Assert.That(rootNodeContents, Is.Not.Empty);
}
[Test]
public void AllSubRootFoldersImported()
{
var rootNode = _connectionTreeModel.RootNodes.First();
var importedRdcmanRootNode = rootNode.Children.OfType<ContainerInfo>().First();
var rootNodeContents = importedRdcmanRootNode.Children.Count(node => node.Name == "Group1" || node.Name == "Group2");
Assert.That(rootNodeContents, Is.EqualTo(2));
}
[Test]
public void ConnectionDisplayNameImported()
{
var rootNode = _connectionTreeModel.RootNodes.First();
var importedRdcmanRootNode = rootNode.Children.OfType<ContainerInfo>().First();
var group1 = importedRdcmanRootNode.Children.OfType<ContainerInfo>().First(node => node.Name == "Group1");
var connection = group1.Children.First();
Assert.That(connection.Name, Is.EqualTo(ExpectedName));
}
[Test]
public void ConnectionHostnameImported()
{
var rootNode = _connectionTreeModel.RootNodes.First();
var importedRdcmanRootNode = rootNode.Children.OfType<ContainerInfo>().First();
var group1 = importedRdcmanRootNode.Children.OfType<ContainerInfo>().First(node => node.Name == "Group1");
var connection = group1.Children.First();
Assert.That(connection.Hostname, Is.EqualTo(ExpectedHostname));
}
[Test]
public void ConnectionDescriptionImported()
{
var rootNode = _connectionTreeModel.RootNodes.First();
var importedRdcmanRootNode = rootNode.Children.OfType<ContainerInfo>().First();
var group1 = importedRdcmanRootNode.Children.OfType<ContainerInfo>().First(node => node.Name == "Group1");
var connection = group1.Children.First();
Assert.That(connection.Description, Is.EqualTo(ExpectedDescription));
}
[Test]
public void ConnectionUsernameImported()
{
var rootNode = _connectionTreeModel.RootNodes.First();
var importedRdcmanRootNode = rootNode.Children.OfType<ContainerInfo>().First();
var group1 = importedRdcmanRootNode.Children.OfType<ContainerInfo>().First(node => node.Name == "Group1");
var connection = group1.Children.First();
Assert.That(connection.Username, Is.EqualTo(ExpectedUsername));
}
[Test]
public void ConnectionDomainImported()
{
var rootNode = _connectionTreeModel.RootNodes.First();
var importedRdcmanRootNode = rootNode.Children.OfType<ContainerInfo>().First();
var group1 = importedRdcmanRootNode.Children.OfType<ContainerInfo>().First(node => node.Name == "Group1");
var connection = group1.Children.First();
Assert.That(connection.Domain, Is.EqualTo(ExpectedDomain));
}
// Since password is encrypted with a machine key, cant test decryption on another machine
//[Test]
//public void ConnectionPasswordImported()
//{
// var rootNode = _connectionTreeModel.RootNodes.First();
// var importedRdcmanRootNode = rootNode.Children.OfType<ContainerInfo>().First();
// var group1 = importedRdcmanRootNode.Children.OfType<ContainerInfo>().First(node => node.Name == "Group1");
// var connection = group1.Children.First();
// Assert.That(connection.Password, Is.EqualTo(ExpectedPassword));
//}
[Test]
public void ConnectionProtocolSetToRdp()
{
var rootNode = _connectionTreeModel.RootNodes.First();
var importedRdcmanRootNode = rootNode.Children.OfType<ContainerInfo>().First();
var group1 = importedRdcmanRootNode.Children.OfType<ContainerInfo>().First(node => node.Name == "Group1");
var connection = group1.Children.First();
Assert.That(connection.Protocol, Is.EqualTo(ProtocolType.RDP));
}
[Test]
public void ConnectionUseConsoleSessionImported()
{
var rootNode = _connectionTreeModel.RootNodes.First();
var importedRdcmanRootNode = rootNode.Children.OfType<ContainerInfo>().First();
var group1 = importedRdcmanRootNode.Children.OfType<ContainerInfo>().First(node => node.Name == "Group1");
var connection = group1.Children.First();
Assert.That(connection.UseConsoleSession, Is.EqualTo(ExpectedUseConsoleSession));
}
[Test]
public void ConnectionPortImported()
{
var rootNode = _connectionTreeModel.RootNodes.First();
var importedRdcmanRootNode = rootNode.Children.OfType<ContainerInfo>().First();
var group1 = importedRdcmanRootNode.Children.OfType<ContainerInfo>().First(node => node.Name == "Group1");
var connection = group1.Children.First();
Assert.That(connection.Port, Is.EqualTo(ExpectedPort));
}
[Test]
public void ConnectionGatewayUsageMethodImported()
{
var rootNode = _connectionTreeModel.RootNodes.First();
var importedRdcmanRootNode = rootNode.Children.OfType<ContainerInfo>().First();
var group1 = importedRdcmanRootNode.Children.OfType<ContainerInfo>().First(node => node.Name == "Group1");
var connection = group1.Children.First();
Assert.That(connection.RDGatewayUsageMethod, Is.EqualTo(ExpectedGatewayUsageMethod));
}
[Test]
public void ConnectionGatewayHostnameImported()
{
var rootNode = _connectionTreeModel.RootNodes.First();
var importedRdcmanRootNode = rootNode.Children.OfType<ContainerInfo>().First();
var group1 = importedRdcmanRootNode.Children.OfType<ContainerInfo>().First(node => node.Name == "Group1");
var connection = group1.Children.First();
Assert.That(connection.RDGatewayHostname, Is.EqualTo(ExpectedGatewayHostname));
}
[Test]
public void ConnectionGatewayUsernameImported()
{
var rootNode = _connectionTreeModel.RootNodes.First();
var importedRdcmanRootNode = rootNode.Children.OfType<ContainerInfo>().First();
var group1 = importedRdcmanRootNode.Children.OfType<ContainerInfo>().First(node => node.Name == "Group1");
var connection = group1.Children.First();
Assert.That(connection.RDGatewayUsername, Is.EqualTo(ExpectedGatewayUsername));
}
// Since password is encrypted with a machine key, cant test decryption on another machine
//[Test]
//public void ConnectionGatewayPasswordImported()
//{
// var rootNode = _connectionTreeModel.RootNodes.First();
// var importedRdcmanRootNode = rootNode.Children.OfType<ContainerInfo>().First();
// var group1 = importedRdcmanRootNode.Children.OfType<ContainerInfo>().First(node => node.Name == "Group1");
// var connection = group1.Children.First();
// Assert.That(connection.RDGatewayPassword, Is.EqualTo(ExpectedGatewayPassword));
//}
[Test]
public void ConnectionGatewayDomainImported()
{
var rootNode = _connectionTreeModel.RootNodes.First();
var importedRdcmanRootNode = rootNode.Children.OfType<ContainerInfo>().First();
var group1 = importedRdcmanRootNode.Children.OfType<ContainerInfo>().First(node => node.Name == "Group1");
var connection = group1.Children.First();
Assert.That(connection.RDGatewayDomain, Is.EqualTo(ExpectedGatewayDomain));
}
[Test]
public void ConnectionResolutionImported()
{
var rootNode = _connectionTreeModel.RootNodes.First();
var importedRdcmanRootNode = rootNode.Children.OfType<ContainerInfo>().First();
var group1 = importedRdcmanRootNode.Children.OfType<ContainerInfo>().First(node => node.Name == "Group1");
var connection = group1.Children.First();
Assert.That(connection.Resolution, Is.EqualTo(ExpectedRdpResolution));
}
[Test]
public void ConnectionColorDepthImported()
{
var rootNode = _connectionTreeModel.RootNodes.First();
var importedRdcmanRootNode = rootNode.Children.OfType<ContainerInfo>().First();
var group1 = importedRdcmanRootNode.Children.OfType<ContainerInfo>().First(node => node.Name == "Group1");
var connection = group1.Children.First();
Assert.That(connection.Colors, Is.EqualTo(ExpectedRdpColorDepth));
}
[Test]
public void ConnectionAudioRedirectionImported()
{
var rootNode = _connectionTreeModel.RootNodes.First();
var importedRdcmanRootNode = rootNode.Children.OfType<ContainerInfo>().First();
var group1 = importedRdcmanRootNode.Children.OfType<ContainerInfo>().First(node => node.Name == "Group1");
var connection = group1.Children.First();
Assert.That(connection.RedirectSound, Is.EqualTo(ExpectedAudioRedirection));
}
[Test]
public void ConnectionKeyRedirectionImported()
{
var rootNode = _connectionTreeModel.RootNodes.First();
var importedRdcmanRootNode = rootNode.Children.OfType<ContainerInfo>().First();
var group1 = importedRdcmanRootNode.Children.OfType<ContainerInfo>().First(node => node.Name == "Group1");
var connection = group1.Children.First();
Assert.That(connection.RedirectKeys, Is.EqualTo(ExpectedKeyRedirection));
}
[Test]
public void ConnectionDriveRedirectionImported()
{
var rootNode = _connectionTreeModel.RootNodes.First();
var importedRdcmanRootNode = rootNode.Children.OfType<ContainerInfo>().First();
var group1 = importedRdcmanRootNode.Children.OfType<ContainerInfo>().First(node => node.Name == "Group1");
var connection = group1.Children.First();
Assert.That(connection.RedirectDiskDrives, Is.EqualTo(ExpectedDriveRedirection));
}
[Test]
public void ConnectionPortRedirectionImported()
{
var rootNode = _connectionTreeModel.RootNodes.First();
var importedRdcmanRootNode = rootNode.Children.OfType<ContainerInfo>().First();
var group1 = importedRdcmanRootNode.Children.OfType<ContainerInfo>().First(node => node.Name == "Group1");
var connection = group1.Children.First();
Assert.That(connection.RedirectPorts, Is.EqualTo(ExpectedPortRedirection));
}
[Test]
public void ConnectionPrinterRedirectionImported()
{
var rootNode = _connectionTreeModel.RootNodes.First();
var importedRdcmanRootNode = rootNode.Children.OfType<ContainerInfo>().First();
var group1 = importedRdcmanRootNode.Children.OfType<ContainerInfo>().First(node => node.Name == "Group1");
var connection = group1.Children.First();
Assert.That(connection.RedirectPrinters, Is.EqualTo(ExpectedPrinterRedirection));
}
[Test]
public void ConnectionSmartcardRedirectionImported()
{
var rootNode = _connectionTreeModel.RootNodes.First();
var importedRdcmanRootNode = rootNode.Children.OfType<ContainerInfo>().First();
var group1 = importedRdcmanRootNode.Children.OfType<ContainerInfo>().First(node => node.Name == "Group1");
var connection = group1.Children.First();
Assert.That(connection.RedirectSmartCards, Is.EqualTo(ExpectedSmartcardRedirection));
}
[Test]
public void ConnectionauthenticationLevelImported()
{
var rootNode = _connectionTreeModel.RootNodes.First();
var importedRdcmanRootNode = rootNode.Children.OfType<ContainerInfo>().First();
var group1 = importedRdcmanRootNode.Children.OfType<ContainerInfo>().First(node => node.Name == "Group1");
var connection = group1.Children.First();
Assert.That(connection.RDPAuthenticationLevel, Is.EqualTo(ExpectedAuthLevel));
}
[Test]
public void ExceptionThrownOnBadSchemaVersion()
{
var badFileContents = Resources.test_rdcman_v2_2_badschemaversion;
var deserializer = new RemoteDesktopConnectionManagerDeserializer(badFileContents);
Assert.That(() => deserializer.Deserialize(), Throws.TypeOf<FileFormatException>());
}
[Test]
public void ExceptionThrownOnUnsupportedVersion()
{
var badFileContents = Resources.test_rdcman_badVersionNumber;
var deserializer = new RemoteDesktopConnectionManagerDeserializer(badFileContents);
Assert.That(() => deserializer.Deserialize(), Throws.TypeOf<FileFormatException>());
}
[Test]
public void ExceptionThrownOnNoVersion()
{
var badFileContents = Resources.test_rdcman_noversion;
var deserializer = new RemoteDesktopConnectionManagerDeserializer(badFileContents);
Assert.That(() => deserializer.Deserialize(), Throws.TypeOf<FileFormatException>());
}
}
}

View File

@@ -0,0 +1,255 @@
using System.Collections;
using System.Xml.Linq;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Connection;
using mRemoteNG.Container;
using mRemoteNG.Security;
using NUnit.Framework;
namespace mRemoteNGTests.Config.Serializers
{
public class XmlConnectionNodeSerializerTests
{
private XmlConnectionNodeSerializer _connectionNodeSerializer;
[SetUp]
public void Setup()
{
var cryptoProvider = new CryptographyProviderFactory().CreateAeadCryptographyProvider(
BlockCipherEngines.AES, BlockCipherModes.GCM);
_connectionNodeSerializer = new XmlConnectionNodeSerializer(cryptoProvider, "myPassword1".ConvertToSecureString());
}
[Test]
public void ReturnsXElement()
{
var returnVal = _connectionNodeSerializer.SerializeConnectionInfo(new ConnectionInfo());
Assert.That(returnVal, Is.TypeOf<XElement>());
}
[TestCaseSource(typeof(TestCaseDataSource), nameof(TestCaseDataSource.AttributesAndExpectedValues))]
public void XmlElementContainsSerializedAttribute(string attributeName, string expectedValue, ConnectionInfo connectionInfo)
{
var returnVal = _connectionNodeSerializer.SerializeConnectionInfo(connectionInfo);
var targetAttribute = returnVal.Attribute(XName.Get(attributeName));
Assert.That(targetAttribute?.Value, Is.EqualTo(expectedValue));
}
[TestCaseSource(typeof(TestCaseDataSource), nameof(TestCaseDataSource.PasswordAttributes))]
public void PasswordFieldsAreSerialized(string attributeName, ConnectionInfo connectionInfo)
{
var returnVal = _connectionNodeSerializer.SerializeConnectionInfo(connectionInfo);
var targetAttribute = returnVal.Attribute(XName.Get(attributeName));
Assert.That(targetAttribute?.Value, Is.Not.Empty);
}
[TestCaseSource(typeof(TestCaseDataSource), nameof(TestCaseDataSource.SaveFilterTests))]
public void AttributesNotSerializedWhenFiltered(string attributeName, ConnectionInfo connectionInfo)
{
var saveFilter = new SaveFilter(true);
var cryptoProvider = new CryptographyProviderFactory().CreateAeadCryptographyProvider(BlockCipherEngines.AES, BlockCipherModes.GCM);
_connectionNodeSerializer = new XmlConnectionNodeSerializer(cryptoProvider, "myPassword1".ConvertToSecureString(), saveFilter);
var returnVal = _connectionNodeSerializer.SerializeConnectionInfo(connectionInfo);
var targetAttribute = returnVal.Attribute(XName.Get(attributeName));
Assert.That(targetAttribute?.Value, Is.EqualTo(string.Empty));
}
[TestCaseSource(typeof(TestCaseDataSource), nameof(TestCaseDataSource.InheritanceFilterTests))]
public void InheritanceNotSerialiedWhenFiltered(string attributeName, ConnectionInfo connectionInfo)
{
var saveFilter = new SaveFilter(true);
var cryptoProvider = new CryptographyProviderFactory().CreateAeadCryptographyProvider(BlockCipherEngines.AES, BlockCipherModes.GCM);
_connectionNodeSerializer = new XmlConnectionNodeSerializer(cryptoProvider, "myPassword1".ConvertToSecureString(), saveFilter);
var returnVal = _connectionNodeSerializer.SerializeConnectionInfo(connectionInfo);
var targetAttribute = returnVal.Attribute(XName.Get(attributeName));
Assert.That(targetAttribute?.Value, Is.EqualTo(false.ToString()));
}
private class TestCaseDataSource
{
private static readonly ConnectionInfo ConnectionInfo = new ConnectionInfo
{
Name = "HeresACustomName",
Description = "myDescription",
Username = "myuser",
Domain = "superdomain",
Password = "pass",
Hostname = "somehost",
ExtApp = "myextapp",
PreExtApp = "preext1",
PostExtApp = "postext1",
MacAddress = "asdf-asdf-asdf-asdf23423",
LoadBalanceInfo = "loadbalanceinfohere",
RDGatewayUsername = "gatewayuser",
RDGatewayDomain = "somegatewaydomain",
RDGatewayHostname = "somegatewayhost",
RDGatewayPassword = "gatewaypass",
UserField = "userfield data here",
VNCProxyIP = "192.168.1.1",
VNCProxyUsername = "vncproxyuser",
VNCProxyPassword = "vncproxypass",
};
private static readonly ConnectionInfo ConnectionInfoWithInheritance = new ConnectionInfo
{
Inheritance = {EverythingInherited = true}
};
private static readonly ContainerInfo ContainerInfo = new ContainerInfo();
public static IEnumerable SaveFilterTests
{
get
{
yield return new TestCaseData("Username", ConnectionInfo);
yield return new TestCaseData("Domain", ConnectionInfo);
yield return new TestCaseData("Password", ConnectionInfo);
yield return new TestCaseData("RDGatewayUsername", ConnectionInfo);
yield return new TestCaseData("RDGatewayDomain", ConnectionInfo);
yield return new TestCaseData("RDGatewayPassword", ConnectionInfo);
yield return new TestCaseData("VNCProxyUsername", ConnectionInfo);
yield return new TestCaseData("VNCProxyPassword", ConnectionInfo);
}
}
public static IEnumerable InheritanceFilterTests
{
get
{
yield return new TestCaseData("InheritUsername", ConnectionInfoWithInheritance);
yield return new TestCaseData("InheritDomain", ConnectionInfoWithInheritance);
yield return new TestCaseData("InheritPassword", ConnectionInfoWithInheritance);
yield return new TestCaseData("InheritRDGatewayUsername", ConnectionInfoWithInheritance);
yield return new TestCaseData("InheritRDGatewayDomain", ConnectionInfoWithInheritance);
yield return new TestCaseData("InheritRDGatewayPassword", ConnectionInfoWithInheritance);
yield return new TestCaseData("InheritVNCProxyUsername", ConnectionInfoWithInheritance);
yield return new TestCaseData("InheritVNCProxyPassword", ConnectionInfoWithInheritance);
}
}
public static IEnumerable PasswordAttributes
{
get
{
yield return new TestCaseData("Password", ConnectionInfo);
yield return new TestCaseData("VNCProxyPassword", ConnectionInfo);
yield return new TestCaseData("RDGatewayPassword", ConnectionInfo);
}
}
public static IEnumerable AttributesAndExpectedValues
{
get
{
yield return new TestCaseData("Name", ConnectionInfo.Name, ConnectionInfo);
yield return new TestCaseData("Type", "Connection", ConnectionInfo);
yield return new TestCaseData("Type", "Container", ContainerInfo);
yield return new TestCaseData("Expanded", ContainerInfo.IsExpanded.ToString(), ContainerInfo);
yield return new TestCaseData("Descr", ConnectionInfo.Description, ConnectionInfo);
yield return new TestCaseData("Icon", ConnectionInfo.Icon, ConnectionInfo);
yield return new TestCaseData("Panel", "General", ConnectionInfo);
yield return new TestCaseData("Username", ConnectionInfo.Username, ConnectionInfo);
yield return new TestCaseData("Domain", ConnectionInfo.Domain, ConnectionInfo);
yield return new TestCaseData("Hostname", ConnectionInfo.Hostname, ConnectionInfo);
yield return new TestCaseData("Protocol", "RDP", ConnectionInfo);
yield return new TestCaseData("PuttySession", ConnectionInfo.PuttySession, ConnectionInfo);
yield return new TestCaseData("Port", ConnectionInfo.Port.ToString(), ConnectionInfo);
yield return new TestCaseData("ConnectToConsole", ConnectionInfo.UseConsoleSession.ToString(), ConnectionInfo);
yield return new TestCaseData("UseCredSsp", ConnectionInfo.UseCredSsp.ToString(), ConnectionInfo);
yield return new TestCaseData("RenderingEngine", ConnectionInfo.RenderingEngine.ToString(), ConnectionInfo);
yield return new TestCaseData("ICAEncryptionStrength", ConnectionInfo.ICAEncryptionStrength.ToString(), ConnectionInfo);
yield return new TestCaseData("RDPAuthenticationLevel", ConnectionInfo.RDPAuthenticationLevel.ToString(), ConnectionInfo);
yield return new TestCaseData("LoadBalanceInfo", ConnectionInfo.LoadBalanceInfo, ConnectionInfo);
yield return new TestCaseData("Colors", ConnectionInfo.Colors.ToString(), ConnectionInfo);
yield return new TestCaseData("Resolution", ConnectionInfo.Resolution.ToString(), ConnectionInfo);
yield return new TestCaseData("AutomaticResize", ConnectionInfo.AutomaticResize.ToString(), ConnectionInfo);
yield return new TestCaseData("DisplayWallpaper", ConnectionInfo.DisplayWallpaper.ToString(), ConnectionInfo);
yield return new TestCaseData("DisplayThemes", ConnectionInfo.DisplayThemes.ToString(), ConnectionInfo);
yield return new TestCaseData("EnableFontSmoothing", ConnectionInfo.EnableFontSmoothing.ToString(), ConnectionInfo);
yield return new TestCaseData("EnableDesktopComposition", ConnectionInfo.EnableDesktopComposition.ToString(), ConnectionInfo);
yield return new TestCaseData("CacheBitmaps", ConnectionInfo.CacheBitmaps.ToString(), ConnectionInfo);
yield return new TestCaseData("RedirectDiskDrives", ConnectionInfo.RedirectDiskDrives.ToString(), ConnectionInfo);
yield return new TestCaseData("RedirectPorts", ConnectionInfo.RedirectPorts.ToString(), ConnectionInfo);
yield return new TestCaseData("RedirectPrinters", ConnectionInfo.RedirectPrinters.ToString(), ConnectionInfo);
yield return new TestCaseData("RedirectSmartCards", ConnectionInfo.RedirectSmartCards.ToString(), ConnectionInfo);
yield return new TestCaseData("RedirectSound", ConnectionInfo.RedirectSound.ToString(), ConnectionInfo);
yield return new TestCaseData("RedirectKeys", ConnectionInfo.RedirectKeys.ToString(), ConnectionInfo);
yield return new TestCaseData("Connected", false.ToString(), ConnectionInfo);
yield return new TestCaseData("PreExtApp", ConnectionInfo.PreExtApp, ConnectionInfo);
yield return new TestCaseData("PostExtApp", ConnectionInfo.PostExtApp, ConnectionInfo);
yield return new TestCaseData("MacAddress", ConnectionInfo.MacAddress, ConnectionInfo);
yield return new TestCaseData("UserField", ConnectionInfo.UserField, ConnectionInfo);
yield return new TestCaseData("ExtApp", ConnectionInfo.ExtApp, ConnectionInfo);
yield return new TestCaseData("VNCCompression", ConnectionInfo.VNCCompression.ToString(), ConnectionInfo);
yield return new TestCaseData("VNCEncoding", ConnectionInfo.VNCEncoding.ToString(), ConnectionInfo);
yield return new TestCaseData("VNCAuthMode", ConnectionInfo.VNCAuthMode.ToString(), ConnectionInfo);
yield return new TestCaseData("VNCProxyType", ConnectionInfo.VNCProxyType.ToString(), ConnectionInfo);
yield return new TestCaseData("VNCProxyIP", ConnectionInfo.VNCProxyIP, ConnectionInfo);
yield return new TestCaseData("VNCProxyPort", ConnectionInfo.VNCProxyPort.ToString(), ConnectionInfo);
yield return new TestCaseData("VNCProxyUsername", ConnectionInfo.VNCProxyUsername, ConnectionInfo);
yield return new TestCaseData("VNCColors", ConnectionInfo.VNCColors.ToString(), ConnectionInfo);
yield return new TestCaseData("VNCSmartSizeMode", ConnectionInfo.VNCSmartSizeMode.ToString(), ConnectionInfo);
yield return new TestCaseData("VNCViewOnly", ConnectionInfo.VNCViewOnly.ToString(), ConnectionInfo);
yield return new TestCaseData("RDGatewayUsageMethod", ConnectionInfo.RDGatewayUsageMethod.ToString(), ConnectionInfo);
yield return new TestCaseData("RDGatewayHostname", ConnectionInfo.RDGatewayHostname, ConnectionInfo);
yield return new TestCaseData("RDGatewayUseConnectionCredentials", ConnectionInfo.RDGatewayUseConnectionCredentials.ToString(), ConnectionInfo);
yield return new TestCaseData("RDGatewayUsername", ConnectionInfo.RDGatewayUsername, ConnectionInfo);
yield return new TestCaseData("RDGatewayDomain", ConnectionInfo.RDGatewayDomain, ConnectionInfo);
yield return new TestCaseData("InheritCacheBitmaps", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritColors", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritDescription", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritDisplayThemes", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritDisplayWallpaper", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritEnableFontSmoothing", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritEnableDesktopComposition", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritDomain", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritIcon", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritPanel", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritPassword", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritPort", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritProtocol", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritPuttySession", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritRedirectDiskDrives", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritRedirectKeys", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritRedirectPorts", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritRedirectPrinters", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritRedirectSmartCards", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritRedirectSound", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritSoundQuality", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritResolution", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritAutomaticResize", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritUseConsoleSession", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritUseCredSsp", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritRenderingEngine", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritUsername", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritICAEncryptionStrength", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritRDPAuthenticationLevel", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritLoadBalanceInfo", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritPreExtApp", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritPostExtApp", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritMacAddress", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritUserField", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritExtApp", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritVNCCompression", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritVNCEncoding", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritVNCAuthMode", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritVNCProxyType", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritVNCProxyIP", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritVNCProxyPort", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritVNCProxyUsername", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritVNCProxyPassword", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritVNCColors", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritVNCSmartSizeMode", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritVNCViewOnly", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritRDGatewayUsageMethod", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritRDGatewayHostname", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritRDGatewayUseConnectionCredentials", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritRDGatewayUsername", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritRDGatewayPassword", false.ToString(), ConnectionInfo);
yield return new TestCaseData("InheritRDGatewayDomain", false.ToString(), ConnectionInfo);
}
}
}
}
}

View File

@@ -0,0 +1,156 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Connection;
using mRemoteNG.Container;
using mRemoteNG.Security;
using mRemoteNG.Tree;
using mRemoteNGTests.Properties;
using NUnit.Framework;
namespace mRemoteNGTests.Config.Serializers
{
public class XmlConnectionsDeserializerTests
{
private XmlConnectionsDeserializer _xmlConnectionsDeserializer;
private ConnectionTreeModel _connectionTreeModel;
public void Setup(string confCons, string password)
{
_xmlConnectionsDeserializer = new XmlConnectionsDeserializer(confCons, password.ConvertToSecureString);
_connectionTreeModel = _xmlConnectionsDeserializer.Deserialize();
}
[TearDown]
public void Teardown()
{
_xmlConnectionsDeserializer = null;
_connectionTreeModel = null;
}
[TestCaseSource(typeof(XmlConnectionsDeserializerFixtureData), nameof(XmlConnectionsDeserializerFixtureData.FixtureParams))]
public void DeserializingCreatesRootNode(Datagram testData)
{
Setup(testData.ConfCons, testData.Password);
Assert.That(_connectionTreeModel.RootNodes, Is.Not.Empty);
}
[TestCaseSource(typeof(XmlConnectionsDeserializerFixtureData), nameof(XmlConnectionsDeserializerFixtureData.FixtureParams))]
public void RootNodeHasThreeChildren(Datagram testData)
{
Setup(testData.ConfCons, testData.Password);
var connectionRoot = _connectionTreeModel.RootNodes[0];
Assert.That(connectionRoot.Children.Count, Is.EqualTo(3));
}
[TestCaseSource(typeof(XmlConnectionsDeserializerFixtureData), nameof(XmlConnectionsDeserializerFixtureData.FixtureParams))]
public void RootContainsFolder1(Datagram testData)
{
Setup(testData.ConfCons, testData.Password);
var connectionRoot = _connectionTreeModel.RootNodes[0];
Assert.That(ContainsNodeNamed("Folder1", connectionRoot.Children), Is.True);
}
[TestCaseSource(typeof(XmlConnectionsDeserializerFixtureData), nameof(XmlConnectionsDeserializerFixtureData.FixtureParams))]
public void Folder1ContainsThreeConnections(Datagram testData)
{
Setup(testData.ConfCons, testData.Password);
var connectionRoot = _connectionTreeModel.RootNodes[0];
var folder1 = GetFolderNamed("Folder1", connectionRoot.Children);
var folder1ConnectionCount = folder1?.Children.Count(node => !(node is ContainerInfo));
Assert.That(folder1ConnectionCount, Is.EqualTo(3));
}
[TestCaseSource(typeof(XmlConnectionsDeserializerFixtureData), nameof(XmlConnectionsDeserializerFixtureData.FixtureParams))]
public void Folder2ContainsThreeNodes(Datagram testData)
{
Setup(testData.ConfCons, testData.Password);
var connectionRoot = _connectionTreeModel.RootNodes[0];
var folder2 = GetFolderNamed("Folder2", connectionRoot.Children);
var folder1Count = folder2?.Children.Count();
Assert.That(folder1Count, Is.EqualTo(3));
}
[TestCaseSource(typeof(XmlConnectionsDeserializerFixtureData), nameof(XmlConnectionsDeserializerFixtureData.FixtureParams))]
public void Folder21HasTwoNodes(Datagram testData)
{
Setup(testData.ConfCons, testData.Password);
var connectionRoot = _connectionTreeModel.RootNodes[0];
var folder2 = GetFolderNamed("Folder2", connectionRoot.Children);
var folder21 = GetFolderNamed("Folder2.1", folder2.Children);
Assert.That(folder21.Children.Count, Is.EqualTo(2));
}
[TestCaseSource(typeof(XmlConnectionsDeserializerFixtureData), nameof(XmlConnectionsDeserializerFixtureData.FixtureParams))]
public void Folder211HasOneConnection(Datagram testData)
{
Setup(testData.ConfCons, testData.Password);
var connectionRoot = _connectionTreeModel.RootNodes[0];
var folder2 = GetFolderNamed("Folder2", connectionRoot.Children);
var folder21 = GetFolderNamed("Folder2.1", folder2.Children);
var folder211 = GetFolderNamed("Folder2.1.1", folder21.Children);
var connectionCount = folder211.Children.Count(node => !(node is ContainerInfo));
Assert.That(connectionCount, Is.EqualTo(1));
}
[TestCaseSource(typeof(XmlConnectionsDeserializerFixtureData), nameof(XmlConnectionsDeserializerFixtureData.FixtureParams))]
public void Folder22InheritsUsername(Datagram testData)
{
Setup(testData.ConfCons, testData.Password);
var connectionRoot = _connectionTreeModel.RootNodes[0];
var folder2 = GetFolderNamed("Folder2", connectionRoot.Children);
var folder22 = GetFolderNamed("Folder2.2", folder2.Children);
Assert.That(folder22.Inheritance.Username, Is.True);
}
private bool ContainsNodeNamed(string name, IEnumerable<ConnectionInfo> list)
{
return list.Any(node => node.Name == name);
}
private ContainerInfo GetFolderNamed(string name, IEnumerable<ConnectionInfo> list)
{
var folder = list.First(node => (node is ContainerInfo && node.Name == name)) as ContainerInfo;
return folder;
}
}
public class XmlConnectionsDeserializerFixtureData
{
public static IEnumerable FixtureParams
{
get
{
yield return new TestCaseData(new Datagram("confCons v2.5", Resources.confCons_v2_5, "mR3m"));
yield return new TestCaseData(new Datagram("confCons v2.5 fullencryption", Resources.confCons_v2_5_fullencryption, "mR3m"));
yield return new TestCaseData(new Datagram("confCons v2.5 custompassword,fullencryption", Resources.confCons_v2_5_passwordis_Password_fullencryption, "Password"));
yield return new TestCaseData(new Datagram("confCons v2.6", Resources.confCons_v2_6, "mR3m"));
yield return new TestCaseData(new Datagram("confCons v2.6 5k Iterations", Resources.confCons_v2_6_5k_iterations, "mR3m"));
yield return new TestCaseData(new Datagram("confCons v2.6 fullencryption", Resources.confCons_v2_6_fullencryption, "mR3m"));
yield return new TestCaseData(new Datagram("confCons v2.6 custompassword", Resources.confCons_v2_6_passwordis_Password, "Password"));
yield return new TestCaseData(new Datagram("confCons v2.6 custompassword,fullencryption", Resources.confCons_v2_6_passwordis_Password_fullencryption, "Password"));
}
}
}
public class Datagram
{
private readonly string _testName;
public string ConfCons { get; set; }
public string Password { get; set; }
public Datagram(string testName, string confCons, string password)
{
_testName = testName;
ConfCons = confCons;
Password = password;
}
public override string ToString()
{
return _testName;
}
}
}

View File

@@ -0,0 +1,107 @@
using System.Xml.XPath;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Connection;
using mRemoteNG.Container;
using mRemoteNG.Security;
using mRemoteNG.Tree;
using mRemoteNG.Tree.Root;
using NUnit.Framework;
namespace mRemoteNGTests.Config.Serializers
{
public class XmlConnectionsDocumentCompilerTests
{
private XmlConnectionsDocumentCompiler _documentCompiler;
private ConnectionTreeModel _connectionTreeModel;
private ICryptographyProvider _cryptographyProvider;
private ContainerInfo _folder1;
private ContainerInfo _folder2;
private ContainerInfo _folder3;
private ConnectionInfo _con0;
private ConnectionInfo _con1;
private ConnectionInfo _con2;
private ConnectionInfo _con3;
private ConnectionInfo _con4;
[SetUp]
public void Setup()
{
_cryptographyProvider = new CryptographyProviderFactory().CreateAeadCryptographyProvider(BlockCipherEngines.AES, BlockCipherModes.GCM);
_documentCompiler = new XmlConnectionsDocumentCompiler(_cryptographyProvider);
_connectionTreeModel = SetupConnectionTreeModel();
}
[Test]
public void XDocumentHasXmlDeclaration()
{
var xdoc = _documentCompiler.CompileDocument(_connectionTreeModel, false, false);
Assert.That(xdoc.Declaration, Is.Not.Null);
}
[Test]
public void DocumentHasRootConnectionElement()
{
var xdoc =_documentCompiler.CompileDocument(_connectionTreeModel, false, false);
var rootElementName = xdoc.Root?.Name.LocalName;
Assert.That(rootElementName, Is.EqualTo("Connections"));
}
[Test]
public void ConnectionNodesSerializedRecursively()
{
var xdoc = _documentCompiler.CompileDocument(_connectionTreeModel, false, false);
var con4 = xdoc.Root?.XPathSelectElement("Node[@Name='folder2']/Node[@Name='folder3']/Node[@Name='con4']");
Assert.That(con4, Is.Not.Null);
}
[Test]
public void XmlContentEncryptedWhenFullFileEncryptionTurnedOn()
{
var xdoc = _documentCompiler.CompileDocument(_connectionTreeModel, true, false);
var rootElementValue = xdoc.Root?.Value;
Assert.That(rootElementValue, Is.Not.EqualTo(string.Empty));
}
private ConnectionTreeModel SetupConnectionTreeModel()
{
/*
* Root
* |--- con0
* |--- folder1
* | L--- con1
* L--- folder2
* |--- con2
* L--- folder3
* |--- con3
* L--- con4
*/
BuildTreeNodes();
var connectionTreeModel = new ConnectionTreeModel();
var rootNode = new RootNodeInfo(RootNodeType.Connection);
rootNode.AddChild(_folder1);
rootNode.AddChild(_folder2);
rootNode.AddChild(_con0);
_folder1.AddChild(_con1);
_folder2.AddChild(_con2);
_folder2.AddChild(_folder3);
_folder3.AddChild(_con3);
_folder3.AddChild(_con4);
connectionTreeModel.AddRootNode(rootNode);
return connectionTreeModel;
}
private void BuildTreeNodes()
{
_folder1 = new ContainerInfo { Name = "folder1" };
_folder2 = new ContainerInfo { Name = "folder2" };
_folder3 = new ContainerInfo { Name = "folder3" };
_con0 = new ConnectionInfo { Name = "con0" };
_con1 = new ConnectionInfo { Name = "con1" };
_con2 = new ConnectionInfo { Name = "con2" };
_con3 = new ConnectionInfo { Name = "con3" };
_con4 = new ConnectionInfo { Name = "con4" };
}
}
}

View File

@@ -0,0 +1,70 @@
using System.Xml.Linq;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Connection;
using mRemoteNG.Container;
using mRemoteNG.Security;
using mRemoteNG.Tree;
using mRemoteNG.Tree.Root;
using NUnit.Framework;
namespace mRemoteNGTests.Config.Serializers
{
public class XmlConnectionsDocumentEncryptorTests
{
private XmlConnectionsDocumentEncryptor _documentEncryptor;
private XDocument _originalDocument;
[SetUp]
public void Setup()
{
var connectionTreeModel = SetupConnectionTreeModel();
var cryptoProvider = new CryptographyProviderFactory().CreateAeadCryptographyProvider(BlockCipherEngines.AES, BlockCipherModes.GCM);
_originalDocument = new XmlConnectionsDocumentCompiler(cryptoProvider).CompileDocument(connectionTreeModel, false, false);
_documentEncryptor = new XmlConnectionsDocumentEncryptor(cryptoProvider);
}
[Test]
public void RootNodeValueIsEncrypted()
{
var encryptedDocument = _documentEncryptor.EncryptDocument(_originalDocument, "mR3m".ConvertToSecureString());
var encryptedContent = encryptedDocument.Root?.Value;
Assert.That(encryptedContent, Is.Not.EqualTo(string.Empty));
}
private ConnectionTreeModel SetupConnectionTreeModel()
{
/*
* Root
* |--- con0
* |--- folder1
* | L--- con1
* L--- folder2
* |--- con2
* L--- folder3
* |--- con3
* L--- con4
*/
var connectionTreeModel = new ConnectionTreeModel();
var rootNode = new RootNodeInfo(RootNodeType.Connection);
var folder1 = new ContainerInfo { Name = "folder1" };
var folder2 = new ContainerInfo { Name = "folder2" };
var folder3 = new ContainerInfo { Name = "folder3" };
var con0 = new ConnectionInfo { Name = "con0" };
var con1 = new ConnectionInfo { Name = "con1" };
var con2 = new ConnectionInfo { Name = "con2" };
var con3 = new ConnectionInfo { Name = "con3" };
var con4 = new ConnectionInfo { Name = "con4" };
rootNode.AddChild(folder1);
rootNode.AddChild(folder2);
rootNode.AddChild(con0);
folder1.AddChild(con1);
folder2.AddChild(con2);
folder2.AddChild(folder3);
folder3.AddChild(con3);
folder3.AddChild(con4);
connectionTreeModel.AddRootNode(rootNode);
return connectionTreeModel;
}
}
}

View File

@@ -0,0 +1,83 @@
using System.Xml;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Connection;
using mRemoteNG.Container;
using mRemoteNG.Security.SymmetricEncryption;
using mRemoteNG.Tree;
using mRemoteNG.Tree.Root;
using NUnit.Framework;
namespace mRemoteNGTests.Config.Serializers
{
public class XmlConnectionsSerializerTests
{
private XmlConnectionsSerializer _serializer;
private ConnectionTreeModel _connectionTreeModel;
[SetUp]
public void Setup()
{
var encryptor = new AeadCryptographyProvider();
_serializer = new XmlConnectionsSerializer(encryptor);
_connectionTreeModel = SetupConnectionTreeModel();
}
[Test]
public void ChildNestingSerializedCorrectly()
{
var serializedConnections = _serializer.Serialize(_connectionTreeModel);
var xmlDoc = new XmlDocument();
xmlDoc.LoadXml(serializedConnections);
var nodeCon4 = xmlDoc.DocumentElement?.SelectSingleNode("Node[@Name='folder2']/Node[@Name='folder3']/Node[@Name='con4']");
Assert.That(nodeCon4, Is.Not.Null);
}
[Test]
public void SingleConnectionSerializedCorrectly()
{
var connectionInfo = new ConnectionInfo {Name = "myConnection"};
var serializedConnections = _serializer.Serialize(connectionInfo);
var xmlDoc = new XmlDocument();
xmlDoc.LoadXml(serializedConnections);
var connectionNode = xmlDoc.DocumentElement?.SelectSingleNode($"Node[@Name='{connectionInfo.Name}']");
Assert.That(connectionNode, Is.Not.Null);
}
private ConnectionTreeModel SetupConnectionTreeModel()
{
/*
* Root
* |--- con0
* |--- folder1
* | L--- con1
* L--- folder2
* |--- con2
* L--- folder3
* |--- con3
* L--- con4
*/
var connectionTreeModel = new ConnectionTreeModel();
var rootNode = new RootNodeInfo(RootNodeType.Connection);
var folder1 = new ContainerInfo { Name = "folder1" };
var folder2 = new ContainerInfo { Name = "folder2" };
var folder3 = new ContainerInfo { Name = "folder3" };
var con0 = new ConnectionInfo { Name = "con0" };
var con1 = new ConnectionInfo { Name = "con1" };
var con2 = new ConnectionInfo { Name = "con2" };
var con3 = new ConnectionInfo { Name = "con3" };
var con4 = new ConnectionInfo { Name = "con4" };
rootNode.AddChild(folder1);
rootNode.AddChild(folder2);
rootNode.AddChild(con0);
folder1.AddChild(con1);
folder2.AddChild(con2);
folder2.AddChild(folder3);
folder3.AddChild(con3);
folder3.AddChild(con4);
connectionTreeModel.AddRootNode(rootNode);
return connectionTreeModel;
}
}
}

View File

@@ -0,0 +1,139 @@
using System;
using System.Collections;
using System.Xml.Linq;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Security;
using mRemoteNG.Security.SymmetricEncryption;
using mRemoteNG.Tree.Root;
using NUnit.Framework;
namespace mRemoteNGTests.Config.Serializers
{
public class XmlRootNodeSerializerTests
{
private XmlRootNodeSerializer _rootNodeSerializer;
private ICryptographyProvider _cryptographyProvider;
private RootNodeInfo _rootNodeInfo;
[SetUp]
public void Setup()
{
_rootNodeSerializer = new XmlRootNodeSerializer();
_cryptographyProvider = new AeadCryptographyProvider();
_rootNodeInfo = new RootNodeInfo(RootNodeType.Connection);
}
[Test]
public void RootElementNamedConnections()
{
var element = _rootNodeSerializer.SerializeRootNodeInfo(_rootNodeInfo, _cryptographyProvider);
Assert.That(element.Name.LocalName, Is.EqualTo("Connections"));
}
[Test]
public void RootNodeInfoNameSerialized()
{
var element = _rootNodeSerializer.SerializeRootNodeInfo(_rootNodeInfo, _cryptographyProvider);
var attributeValue = element.Attribute(XName.Get("Name"))?.Value;
Assert.That(attributeValue, Is.EqualTo("Connections"));
}
[TestCase(true)]
[TestCase(false)]
public void ExportValueSerialized(bool export)
{
var element = _rootNodeSerializer.SerializeRootNodeInfo(_rootNodeInfo, _cryptographyProvider, export:export);
var attributeValue = element.Attribute(XName.Get("Export"))?.Value;
Assert.That(attributeValue, Is.EqualTo(export.ToString()));
}
[TestCaseSource(typeof(TestCaseSources), nameof(TestCaseSources.AllEngineAndModeCombos))]
public void EncryptionEngineSerialized(BlockCipherEngines engine, BlockCipherModes mode)
{
var cryptoProvider = new CryptographyProviderFactory().CreateAeadCryptographyProvider(engine, mode);
var element = _rootNodeSerializer.SerializeRootNodeInfo(_rootNodeInfo, cryptoProvider);
var attributeValue = element.Attribute(XName.Get("EncryptionEngine"))?.Value;
Assert.That(attributeValue, Is.EqualTo(engine.ToString()));
}
[TestCaseSource(typeof(TestCaseSources), nameof(TestCaseSources.AllEngineAndModeCombos))]
public void EncryptionModeSerialized(BlockCipherEngines engine, BlockCipherModes mode)
{
var cryptoProvider = new CryptographyProviderFactory().CreateAeadCryptographyProvider(engine, mode);
var element = _rootNodeSerializer.SerializeRootNodeInfo(_rootNodeInfo, cryptoProvider);
var attributeValue = element.Attribute(XName.Get("BlockCipherMode"))?.Value;
Assert.That(attributeValue, Is.EqualTo(mode.ToString()));
}
[TestCase(1000)]
[TestCase(1234)]
[TestCase(9999)]
[TestCase(10000)]
public void KdfIterationsSerialized(int iterations)
{
_cryptographyProvider.KeyDerivationIterations = iterations;
var element = _rootNodeSerializer.SerializeRootNodeInfo(_rootNodeInfo, _cryptographyProvider);
var attributeValue = element.Attribute(XName.Get("KdfIterations"))?.Value;
Assert.That(attributeValue, Is.EqualTo(iterations.ToString()));
}
[TestCase(true)]
[TestCase(false)]
public void FullFileEncryptionFlagSerialized(bool fullFileEncryption)
{
var element = _rootNodeSerializer.SerializeRootNodeInfo(_rootNodeInfo, _cryptographyProvider, fullFileEncryption);
var attributeValue = element.Attribute(XName.Get("FullFileEncryption"))?.Value;
Assert.That(attributeValue, Is.EqualTo(fullFileEncryption.ToString()));
}
[TestCase("", "ThisIsNotProtected")]
[TestCase(null, "ThisIsNotProtected")]
[TestCase("mR3m", "ThisIsNotProtected")]
[TestCase("customPassword1", "ThisIsProtected")]
public void ProtectedStringSerialized(string customPassword, string expectedPlainText)
{
_rootNodeInfo.PasswordString = customPassword;
var element = _rootNodeSerializer.SerializeRootNodeInfo(_rootNodeInfo, _cryptographyProvider);
var attributeValue = element.Attribute(XName.Get("Protected"))?.Value;
var attributeValuePlainText = _cryptographyProvider.Decrypt(attributeValue, _rootNodeInfo.PasswordString.ConvertToSecureString());
Assert.That(attributeValuePlainText, Is.EqualTo(expectedPlainText));
}
[TestCase("", "ThisIsNotProtected")]
[TestCase("customPassword1", "ThisIsNotProtected")]
public void EncryptWithDefaultPasswordWhenExporting(string customPassword, string expectedPlainText)
{
_rootNodeInfo.PasswordString = customPassword;
var element = _rootNodeSerializer.SerializeRootNodeInfo(_rootNodeInfo, _cryptographyProvider, export:true);
var attributeValue = element.Attribute(XName.Get("Protected"))?.Value;
var attributeValuePlainText = _cryptographyProvider.Decrypt(attributeValue, _rootNodeInfo.DefaultPassword.ConvertToSecureString());
Assert.That(attributeValuePlainText, Is.EqualTo(expectedPlainText));
}
[Test]
public void ConfVersionSerialized()
{
var element = _rootNodeSerializer.SerializeRootNodeInfo(_rootNodeInfo, _cryptographyProvider);
var attributeValue = element.Attribute(XName.Get("ConfVersion"))?.Value;
Assert.That(attributeValue, Is.EqualTo("2.6"));
}
private class TestCaseSources
{
public static IEnumerable AllEngineAndModeCombos
{
get
{
foreach (var engine in Enum.GetValues(typeof(BlockCipherEngines)))
{
foreach (var mode in Enum.GetValues(typeof(BlockCipherModes)))
{
yield return new TestCaseData(engine, mode);
}
}
}
}
}
}
}

View File

@@ -0,0 +1,507 @@
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 NUnit.Framework;
namespace mRemoteNGTests.Connection
{
public class AbstractConnectionInfoDataTests
{
private class TestAbstractConnectionInfoData : AbstractConnectionInfoData {}
private TestAbstractConnectionInfoData _testAbstractConnectionInfoData;
[SetUp]
public void Setup()
{
_testAbstractConnectionInfoData = new TestAbstractConnectionInfoData();
}
[TearDown]
public void Teardown()
{
_testAbstractConnectionInfoData = null;
}
[Test]
public void NameNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.Name = "a";
Assert.That(wasCalled, Is.True);
}
[Test]
public void DescriptionNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.Description = "a";
Assert.That(wasCalled, Is.True);
}
[Test]
public void IconNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.Icon = "a";
Assert.That(wasCalled, Is.True);
}
[Test]
public void PanelNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.Panel = "a";
Assert.That(wasCalled, Is.True);
}
[Test]
public void HostnameNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.Hostname = "a";
Assert.That(wasCalled, Is.True);
}
[Test]
public void UsernameNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.Username = "a";
Assert.That(wasCalled, Is.True);
}
[Test]
public void PasswordNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.Password = "a";
Assert.That(wasCalled, Is.True);
}
[Test]
public void DomainNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.Domain = "a";
Assert.That(wasCalled, Is.True);
}
[Test]
public void ProtocolNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.Protocol = ProtocolType.HTTP;
Assert.That(wasCalled, Is.True);
}
[Test]
public void ExtAppNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.ExtApp = "a";
Assert.That(wasCalled, Is.True);
}
[Test]
public void PortNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.Port = 9999;
Assert.That(wasCalled, Is.True);
}
[Test]
public void PuttySessionNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.PuttySession = "a";
Assert.That(wasCalled, Is.True);
}
[Test]
public void IcaEncryptionNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.ICAEncryptionStrength = ProtocolICA.EncryptionStrength.Encr128BitLogonOnly;
Assert.That(wasCalled, Is.True);
}
[Test]
public void UseConsoleSessionNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.UseConsoleSession = true;
Assert.That(wasCalled, Is.True);
}
[Test]
public void RdpAuthenticationLevelNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.RDPAuthenticationLevel = ProtocolRDP.AuthenticationLevel.AuthRequired;
Assert.That(wasCalled, Is.True);
}
[Test]
public void LoadBalanceInfoNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.LoadBalanceInfo = "a";
Assert.That(wasCalled, Is.True);
}
[Test]
public void RenderingEngineNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.RenderingEngine = HTTPBase.RenderingEngine.Gecko;
Assert.That(wasCalled, Is.True);
}
[Test]
public void UseCredSspNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.UseCredSsp = true;
Assert.That(wasCalled, Is.True);
}
[Test]
public void RdGatewayUsageMethodNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.RDGatewayUsageMethod = ProtocolRDP.RDGatewayUsageMethod.Always;
Assert.That(wasCalled, Is.True);
}
[Test]
public void RdGatewayHostnameNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.RDGatewayHostname = "a";
Assert.That(wasCalled, Is.True);
}
[Test]
public void RdGatewayUseConnectionCredentialsNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.RDGatewayUseConnectionCredentials = ProtocolRDP.RDGatewayUseConnectionCredentials.SmartCard;
Assert.That(wasCalled, Is.True);
}
[Test]
public void RdGatewayUsernameNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.RDGatewayUsername = "a";
Assert.That(wasCalled, Is.True);
}
[Test]
public void RdGatewayPasswordNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.RDGatewayPassword = "a";
Assert.That(wasCalled, Is.True);
}
[Test]
public void RdGatewayDomainNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.RDGatewayDomain = "a";
Assert.That(wasCalled, Is.True);
}
[Test]
public void ResolutionNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.Resolution = ProtocolRDP.RDPResolutions.Res1366x768;
Assert.That(wasCalled, Is.True);
}
[Test]
public void AutomaticResizeNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.AutomaticResize = true;
Assert.That(wasCalled, Is.True);
}
[Test]
public void ColorsNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.Colors = ProtocolRDP.RDPColors.Colors16Bit;
Assert.That(wasCalled, Is.True);
}
[Test]
public void CacheBitmapsNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.CacheBitmaps = true;
Assert.That(wasCalled, Is.True);
}
[Test]
public void DisplayWallpaperNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.DisplayWallpaper = true;
Assert.That(wasCalled, Is.True);
}
[Test]
public void DisplayThemesNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.DisplayThemes = true;
Assert.That(wasCalled, Is.True);
}
[Test]
public void EnableFontSmoothingNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.EnableFontSmoothing = true;
Assert.That(wasCalled, Is.True);
}
[Test]
public void EnableDesktopCompositionNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.EnableDesktopComposition = true;
Assert.That(wasCalled, Is.True);
}
[Test]
public void RedirectKeysNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.RedirectKeys = true;
Assert.That(wasCalled, Is.True);
}
[Test]
public void RedirectDiskDrivesNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.RedirectDiskDrives = true;
Assert.That(wasCalled, Is.True);
}
[Test]
public void RedirectPrintersNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.RedirectPrinters = true;
Assert.That(wasCalled, Is.True);
}
[Test]
public void RedirectPortsNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.RedirectPorts = true;
Assert.That(wasCalled, Is.True);
}
[Test]
public void RedirectSmartCardsNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.RedirectSmartCards = true;
Assert.That(wasCalled, Is.True);
}
[Test]
public void RedirectSoundNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.RedirectSound = ProtocolRDP.RDPSounds.DoNotPlay;
Assert.That(wasCalled, Is.True);
}
[Test]
public void PreExtAppNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.PreExtApp = "a";
Assert.That(wasCalled, Is.True);
}
[Test]
public void PostExtAppNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.PostExtApp = "a";
Assert.That(wasCalled, Is.True);
}
[Test]
public void MacAddressNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.MacAddress = "a";
Assert.That(wasCalled, Is.True);
}
[Test]
public void UserFieldNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.UserField = "a";
Assert.That(wasCalled, Is.True);
}
[Test]
public void VncCompressionNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.VNCCompression = ProtocolVNC.Compression.Comp5;
Assert.That(wasCalled, Is.True);
}
[Test]
public void VncEncodingNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.VNCEncoding = ProtocolVNC.Encoding.EncTight;
Assert.That(wasCalled, Is.True);
}
[Test]
public void VncAuthModeNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.VNCAuthMode = ProtocolVNC.AuthMode.AuthWin;
Assert.That(wasCalled, Is.True);
}
[Test]
public void VncProxyTypeNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.VNCProxyType = ProtocolVNC.ProxyType.ProxyUltra;
Assert.That(wasCalled, Is.True);
}
[Test]
public void VncProxyIpNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.VNCProxyIP = "a";
Assert.That(wasCalled, Is.True);
}
[Test]
public void VncProxyPortNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.VNCProxyPort = 9999;
Assert.That(wasCalled, Is.True);
}
[Test]
public void VncProxyUsernameNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.VNCProxyUsername = "a";
Assert.That(wasCalled, Is.True);
}
[Test]
public void VncProxyPasswordNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.VNCProxyPassword = "a";
Assert.That(wasCalled, Is.True);
}
[Test]
public void VncColorsNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.VNCColors = ProtocolVNC.Colors.Col8Bit;
Assert.That(wasCalled, Is.True);
}
[Test]
public void VncSmartSizeModeNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.VNCSmartSizeMode = ProtocolVNC.SmartSizeMode.SmartSFree;
Assert.That(wasCalled, Is.True);
}
[Test]
public void VncViewOnlyNotifiesOnValueChange()
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.VNCViewOnly = true;
Assert.That(wasCalled, Is.True);
}
}
}

View File

@@ -0,0 +1,42 @@
using System.ComponentModel;
using mRemoteNG.Connection;
using NUnit.Framework;
namespace mRemoteNGTests.Connection
{
public class ConnectionInfoComparerTests
{
private ConnectionInfo _con1;
private ConnectionInfo _con2;
[OneTimeSetUp]
public void OnetimeSetup()
{
_con1 = new ConnectionInfo { Name = "a" };
_con2 = new ConnectionInfo { Name = "b" };
}
[Test]
public void SortAscendingOnName()
{
var comparer = new ConnectionInfoComparer<string>(node => node.Name)
{
SortDirection = ListSortDirection.Ascending
};
var compareReturn = comparer.Compare(_con1, _con2);
Assert.That(compareReturn, Is.Negative);
}
[Test]
public void SortDescendingOnName()
{
var comparer = new ConnectionInfoComparer<string>(node => node.Name)
{
SortDirection = ListSortDirection.Descending
};
var compareReturn = comparer.Compare(_con1, _con2);
Assert.That(compareReturn, Is.Positive);
}
}
}

View File

@@ -2,6 +2,7 @@
using NUnit.Framework;
using System.Reflection;
using System.Collections;
using System.Linq;
namespace mRemoteNGTests.Connection
{
@@ -59,10 +60,23 @@ namespace mRemoteNGTests.Connection
Assert.That(_inheritance.Username, Is.True);
}
[Test]
public void GetPropertiesReturnsListOfSettableProperties()
{
var hasIconProperty = _inheritance.GetProperties().Contains(typeof(ConnectionInfoInheritance).GetProperty("Icon"));
Assert.That(hasIconProperty, Is.True);
}
[Test]
public void GetPropertiesExludesPropertiesThatShouldNotBeSet()
{
var hasEverythingInheritedProperty = _inheritance.GetProperties().Contains(typeof(ConnectionInfoInheritance).GetProperty("EverythingInherited"));
Assert.That(hasEverythingInheritedProperty, Is.False);
}
private bool AllInheritancePropertiesAreTrue()
{
bool allPropertiesTrue = true;
var allPropertiesTrue = true;
foreach (var property in _inheritanceProperties)
{
if (PropertyIsBoolean(property) && PropertyIsChangedWhenSettingInheritAll(property) && BooleanPropertyIsSetToFalse(property))
@@ -73,7 +87,7 @@ namespace mRemoteNGTests.Connection
private bool AllInheritancePropertiesAreFalse()
{
bool allPropertiesFalse = true;
var allPropertiesFalse = true;
foreach (var property in _inheritanceProperties)
{
if (PropertyIsBoolean(property) && PropertyIsChangedWhenSettingInheritAll(property) && BooleanPropertyIsSetToTrue(property))
@@ -84,8 +98,7 @@ namespace mRemoteNGTests.Connection
private bool PropertyIsChangedWhenSettingInheritAll(PropertyInfo property)
{
ArrayList propertiesIgnoredByInheritAll = new ArrayList();
propertiesIgnoredByInheritAll.Add("IsDefault");
var propertiesIgnoredByInheritAll = new ArrayList {"IsDefault"};
return propertiesIgnoredByInheritAll.Contains(property);
}
@@ -101,7 +114,7 @@ namespace mRemoteNGTests.Connection
private bool BooleanPropertyIsSetToTrue(PropertyInfo property)
{
return (bool)property.GetValue(_inheritance) == true;
return (bool)property.GetValue(_inheritance);
}
}
}

View File

@@ -0,0 +1,103 @@
using mRemoteNG.Connection;
using mRemoteNG.Connection.Protocol;
using mRemoteNG.Connection.Protocol.SSH;
using mRemoteNG.Container;
using NUnit.Framework;
namespace mRemoteNGTests.Connection
{
public class ConnectionInfoTests
{
private ConnectionInfo _connectionInfo;
private const string TestDomain = "somedomain";
[SetUp]
public void Setup()
{
_connectionInfo = new ConnectionInfo();
}
[TearDown]
public void Teardown()
{
_connectionInfo = null;
}
[Test]
public void CreatingConnectionInfoWithParentSetsTheParentProperty()
{
var container = new ContainerInfo();
var connectionInfo = new ConnectionInfo(container);
Assert.That(connectionInfo.Parent, Is.EqualTo(container));
}
[Test]
public void CreatingConnectionInfoWithParentAddsToTheParentsChildList()
{
var container = new ContainerInfo();
var connectionInfo = new ConnectionInfo(container);
Assert.That(container.Children, Does.Contain(connectionInfo));
}
[Test]
public void CopyCreatesMemberwiseCopy()
{
_connectionInfo.Domain = TestDomain;
var secondConnection = _connectionInfo.Clone();
Assert.That(secondConnection.Domain, Is.EqualTo(_connectionInfo.Domain));
}
[Test]
public void CopyFromCopiesProperties()
{
var secondConnection = new ConnectionInfo {Domain = TestDomain};
_connectionInfo.CopyFrom(secondConnection);
Assert.That(_connectionInfo.Domain, Is.EqualTo(secondConnection.Domain));
}
[Test]
public void CopyingAConnectionInfoAlsoCopiesItsInheritance()
{
_connectionInfo.Inheritance.Username = true;
var secondConnection = new ConnectionInfo {Inheritance = {Username = false}};
secondConnection.CopyFrom(_connectionInfo);
Assert.That(secondConnection.Inheritance.Username, Is.True);
}
[Test]
public void PropertyChangedEventRaisedWhenOpenConnectionsChanges()
{
var eventWasCalled = false;
_connectionInfo.PropertyChanged += (sender, args) => eventWasCalled = true;
_connectionInfo.OpenConnections.Add(new ProtocolSSH2());
Assert.That(eventWasCalled);
}
[Test]
public void PropertyChangedEventArgsAreCorrectWhenOpenConnectionsChanges()
{
var nameOfModifiedProperty = "";
_connectionInfo.PropertyChanged += (sender, args) => nameOfModifiedProperty = args.PropertyName;
_connectionInfo.OpenConnections.Add(new ProtocolSSH2());
Assert.That(nameOfModifiedProperty, Is.EqualTo("OpenConnections"));
}
[TestCase(ProtocolType.HTTP, ExpectedResult = 80)]
[TestCase(ProtocolType.HTTPS, ExpectedResult = 443)]
[TestCase(ProtocolType.ICA, ExpectedResult = 1494)]
[TestCase(ProtocolType.IntApp, ExpectedResult = 0)]
[TestCase(ProtocolType.RAW, ExpectedResult = 23)]
[TestCase(ProtocolType.RDP, ExpectedResult = 3389)]
[TestCase(ProtocolType.Rlogin, ExpectedResult = 513)]
[TestCase(ProtocolType.SSH1, ExpectedResult = 22)]
[TestCase(ProtocolType.SSH2, ExpectedResult = 22)]
[TestCase(ProtocolType.Telnet, ExpectedResult = 23)]
[TestCase(ProtocolType.VNC, ExpectedResult = 5900)]
public int GetDefaultPortReturnsCorrectPortForProtocol(ProtocolType protocolType)
{
_connectionInfo.Protocol = protocolType;
return _connectionInfo.GetDefaultPort();
}
}
}

View File

@@ -0,0 +1,34 @@
using mRemoteNG.Connection;
using NUnit.Framework;
namespace mRemoteNGTests.Connection
{
public class DefaultConnectionInfoTests
{
private string _testDomain = "somedomain";
[SetUp]
public void Setup()
{
DefaultConnectionInfo.Instance.Domain = "";
}
[Test]
public void LoadingDefaultInfoUpdatesAllProperties()
{
var connectionInfoSource = new ConnectionInfo { Domain = _testDomain };
DefaultConnectionInfo.Instance.LoadFrom(connectionInfoSource);
Assert.That(DefaultConnectionInfo.Instance.Domain, Is.EqualTo(_testDomain));
}
[Test]
public void SavingDefaultConnectionInfoExportsAllProperties()
{
var saveTarget = new ConnectionInfo();
DefaultConnectionInfo.Instance.Domain = _testDomain;
DefaultConnectionInfo.Instance.SaveTo(saveTarget);
Assert.That(saveTarget.Domain, Is.EqualTo(_testDomain));
}
}
}

View File

@@ -0,0 +1,49 @@
using mRemoteNG.Connection;
using NUnit.Framework;
namespace mRemoteNGTests.Connection
{
public class DefaultConnectionInheritanceTests
{
[SetUp]
public void Setup()
{
DefaultConnectionInheritance.Instance.TurnOffInheritanceCompletely();
}
[Test]
public void LoadingDefaultInheritanceUpdatesAllProperties()
{
var inheritanceSource = new ConnectionInfoInheritance(new object(), true);
inheritanceSource.TurnOnInheritanceCompletely();
DefaultConnectionInheritance.Instance.LoadFrom(inheritanceSource);
Assert.That(DefaultConnectionInheritance.Instance.EverythingInherited, Is.True);
}
[Test]
public void SavingDefaultInheritanceExportsAllProperties()
{
var inheritanceDestination = new ConnectionInfoInheritance(new object(), true);
DefaultConnectionInheritance.Instance.AutomaticResize = true;
DefaultConnectionInheritance.Instance.SaveTo(inheritanceDestination);
Assert.That(inheritanceDestination.AutomaticResize, Is.True);
}
[Test]
public void NewInheritanceInstancesCreatedWithDefaultInheritanceValues()
{
DefaultConnectionInheritance.Instance.Domain = true;
var inheritanceInstance = new ConnectionInfoInheritance(new object());
Assert.That(inheritanceInstance.Domain, Is.True);
}
[Test]
public void NewInheritanceInstancesCreatedWithAllDefaultInheritanceValues()
{
DefaultConnectionInheritance.Instance.TurnOnInheritanceCompletely();
var inheritanceInstance = new ConnectionInfoInheritance(new object());
Assert.That(inheritanceInstance.EverythingInherited, Is.True);
}
}
}

View File

@@ -0,0 +1,218 @@
using System.Collections;
using System.Collections.Specialized;
using mRemoteNG.Connection.Protocol;
using mRemoteNG.Connection.Protocol.SSH;
using mRemoteNG.Connection.Protocol.Telnet;
using mRemoteNG.Connection.Protocol.VNC;
using NUnit.Framework;
namespace mRemoteNGTests.Connection.Protocol
{
public class ProtocolListTests
{
private ProtocolList _protocolList;
private ProtocolBase _protocol1;
private ProtocolBase _protocol2;
private ProtocolBase _protocol3;
[SetUp]
public void Setup()
{
_protocolList = new ProtocolList();
_protocol1 = new ProtocolTelnet();
_protocol2 = new ProtocolSSH2();
_protocol3 = new ProtocolVNC();
}
[TearDown]
public void Teardown()
{
_protocolList = null;
_protocol1 = null;
_protocol2 = null;
_protocol3 = null;
}
[Test]
public void EmptyWhenInitialized()
{
Assert.That(_protocolList.Count == 0);
}
[Test]
public void AddAddsObjectToList()
{
_protocolList.Add(_protocol1);
Assert.That(_protocolList[0] == _protocol1);
}
[Test]
public void AddRangeAddsAllObjects()
{
var protArray = new[] {_protocol1, _protocol2, _protocol3};
_protocolList.AddRange(protArray);
Assert.That(_protocolList, Is.EquivalentTo(protArray));
}
[Test]
public void CountUpdatesToReflectCurrentList()
{
var protArray = new[] { _protocol1, _protocol2, _protocol3 };
_protocolList.AddRange(protArray);
Assert.That(_protocolList.Count == protArray.Length);
}
[Test]
public void RemoveRemovesObjectFromList()
{
_protocolList.Add(_protocol1);
_protocolList.Remove(_protocol1);
Assert.That(_protocolList.Count == 0);
}
[Test]
public void ClearResetsList()
{
var protArray = new[] { _protocol1, _protocol2, _protocol3 };
_protocolList.AddRange(protArray);
_protocolList.Clear();
Assert.That(_protocolList.Count == 0);
}
[Test]
public void IntIndexerReturnsCorrectObject()
{
var protArray = new[] { _protocol1, _protocol2, _protocol3 };
_protocolList.AddRange(protArray);
Assert.That(_protocolList[1], Is.EqualTo(protArray[1]));
}
[Test]
public void ObjectIndexerReturnsCorrectObject()
{
var protArray = new[] { _protocol1, _protocol2, _protocol3 };
_protocolList.AddRange(protArray);
Assert.That(_protocolList[_protocol3], Is.EqualTo(_protocol3));
}
[Test]
public void IndexerSafelyHandlesUnknownObjects()
{
var protArray = new[] { _protocol1, _protocol2, _protocol3 };
_protocolList.AddRange(protArray);
Assert.That(_protocolList["unacceptablevalue"], Is.EqualTo(null));
}
[Test]
public void RemovingNonexistantObjectFromListDoesNothing()
{
Assert.DoesNotThrow(()=> _protocolList.Remove(_protocol1));
}
[Test]
public void AddRaisesCollectionChangedEvent()
{
var eventWasCalled = false;
_protocolList.CollectionChanged += (sender, args) => eventWasCalled = true;
_protocolList.Add(_protocol1);
Assert.That(eventWasCalled);
}
[Test]
public void AddCollectionChangedEventContainsAddedObject()
{
IList nodeListFromEvent = new ArrayList();
_protocolList.CollectionChanged += (sender, args) => nodeListFromEvent = args.NewItems;
_protocolList.Add(_protocol1);
Assert.That(nodeListFromEvent, Is.EquivalentTo(new[] {_protocol1}));
}
[Test]
public void AddRangeCollectionChangedEventContainsAddedObjects()
{
var protArray = new[] { _protocol1, _protocol2, _protocol3 };
IList nodeListFromEvent = new ArrayList();
_protocolList.CollectionChanged += (sender, args) => nodeListFromEvent = args.NewItems;
_protocolList.AddRange(protArray);
Assert.That(nodeListFromEvent, Is.EquivalentTo(protArray));
}
[Test]
public void RemoveCollectionChangedEventContainsRemovedObject()
{
IList nodeListFromEvent = new ArrayList();
_protocolList.Add(_protocol1);
_protocolList.CollectionChanged += (sender, args) => nodeListFromEvent = args.OldItems;
_protocolList.Remove(_protocol1);
Assert.That(nodeListFromEvent, Is.EquivalentTo(new[] { _protocol1 }));
}
[Test]
public void AttemptingToRemoveNonexistantObjectDoesNotRaiseCollectionChangedEvent()
{
var eventWasCalled = false;
_protocolList.CollectionChanged += (sender, args) => eventWasCalled = true;
_protocolList.Remove(_protocol1);
Assert.That(eventWasCalled == false);
}
[Test]
public void ClearRaisesCollectionChangedEvent()
{
var eventWasCalled = false;
_protocolList.Add(_protocol1);
_protocolList.CollectionChanged += (sender, args) => eventWasCalled = true;
_protocolList.Clear();
Assert.That(eventWasCalled);
}
[Test]
public void ClearDoesntRaiseCollectionChangedEventWhenNoObjectsRemoved()
{
var eventWasCalled = false;
_protocolList.CollectionChanged += (sender, args) => eventWasCalled = true;
_protocolList.Clear();
Assert.That(eventWasCalled == false);
}
[Test]
public void AddCollectionChangedEventHasCorrectAction()
{
NotifyCollectionChangedAction collectionChangedAction = NotifyCollectionChangedAction.Move;
_protocolList.CollectionChanged += (sender, args) => collectionChangedAction = args.Action;
_protocolList.Add(_protocol1);
Assert.That(collectionChangedAction, Is.EqualTo(NotifyCollectionChangedAction.Add));
}
[Test]
public void AddRangeCollectionChangedEventHasCorrectAction()
{
NotifyCollectionChangedAction collectionChangedAction = NotifyCollectionChangedAction.Move;
_protocolList.CollectionChanged += (sender, args) => collectionChangedAction = args.Action;
_protocolList.AddRange(new []{_protocol1});
Assert.That(collectionChangedAction, Is.EqualTo(NotifyCollectionChangedAction.Add));
}
[Test]
public void RemoveCollectionChangedEventHasCorrectAction()
{
NotifyCollectionChangedAction collectionChangedAction = NotifyCollectionChangedAction.Move;
_protocolList.Add(_protocol1);
_protocolList.CollectionChanged += (sender, args) => collectionChangedAction = args.Action;
_protocolList.Remove(_protocol1);
Assert.That(collectionChangedAction, Is.EqualTo(NotifyCollectionChangedAction.Remove));
}
[Test]
public void ClearCollectionChangedEventHasCorrectAction()
{
NotifyCollectionChangedAction collectionChangedAction = NotifyCollectionChangedAction.Move;
_protocolList.Add(_protocol1);
_protocolList.CollectionChanged += (sender, args) => collectionChangedAction = args.Action;
_protocolList.Clear();
Assert.That(collectionChangedAction, Is.EqualTo(NotifyCollectionChangedAction.Reset));
}
}
}

View File

@@ -0,0 +1,430 @@
using System.ComponentModel;
using System.Linq;
using mRemoteNG.Connection;
using mRemoteNG.Container;
using NUnit.Framework;
namespace mRemoteNGTests.Container
{
public class ContainerInfoTests
{
private ContainerInfo _containerInfo;
private ConnectionInfo _con1;
private ConnectionInfo _con2;
private ConnectionInfo _con3;
[SetUp]
public void Setup()
{
_containerInfo = new ContainerInfo();
_con1 = new ConnectionInfo {Name = "a"};
_con2 = new ConnectionInfo {Name = "b"};
_con3 = new ConnectionInfo {Name = "c"};
}
[TearDown]
public void Teardown()
{
_containerInfo = null;
_con1 = null;
_con2 = null;
_con3 = null;
}
[Test]
public void AddSetsParentPropertyOnTheChild()
{
_containerInfo.AddChild(_con1);
Assert.That(_con1.Parent, Is.EqualTo(_containerInfo));
}
[Test]
public void AddAddsChildToChildrenList()
{
_containerInfo.AddChild(_con1);
Assert.That(_containerInfo.Children, Does.Contain(_con1));
}
[Test]
public void AddRangeAddsAllItems()
{
var collection = new[] { _con1, _con2, _con3 };
_containerInfo.AddChildRange(collection);
Assert.That(_containerInfo.Children, Is.EquivalentTo(collection));
}
[Test]
public void RemoveUnsetsParentPropertyOnChild()
{
_containerInfo.AddChild(_con1);
_containerInfo.RemoveChild(_con1);
Assert.That(_con1.Parent, Is.Not.EqualTo(_containerInfo));
}
[Test]
public void RemoveRemovesChildFromChildrenList()
{
_containerInfo.AddChild(_con1);
_containerInfo.RemoveChild(_con1);
Assert.That(_containerInfo.Children, Does.Not.Contains(_con1));
}
[Test]
public void RemoveRangeRemovesAllIndicatedItems()
{
var collection = new[] { _con1, _con2, new ContainerInfo() };
_containerInfo.AddChildRange(collection);
_containerInfo.RemoveChildRange(collection);
Assert.That(_containerInfo.Children, Does.Not.Contains(collection[0]).And.Not.Contains(collection[1]).And.Not.Contains(collection[2]));
}
[Test]
public void RemoveRangeDoesNotRemoveUntargetedMembers()
{
var collection = new[] { _con1, _con2, new ContainerInfo() };
_containerInfo.AddChildRange(collection);
_containerInfo.AddChild(_con3);
_containerInfo.RemoveChildRange(collection);
Assert.That(_containerInfo.Children, Does.Contain(_con3));
}
[Test]
public void AddingChildTriggersCollectionChangedEvent()
{
var wasCalled = false;
_containerInfo.CollectionChanged += (sender, args) => wasCalled = true;
_containerInfo.AddChild(_con1);
Assert.That(wasCalled, Is.True);
}
[Test]
public void RemovingChildTriggersCollectionChangedEvent()
{
var wasCalled = false;
_containerInfo.AddChild(_con1);
_containerInfo.CollectionChanged += (sender, args) => wasCalled = true;
_containerInfo.RemoveChild(_con1);
Assert.That(wasCalled, Is.True);
}
[Test]
public void ChangingChildPropertyTriggersPropertyChangedEvent()
{
var wasCalled = false;
_containerInfo.AddChild(_con1);
_containerInfo.PropertyChanged += (sender, args) => wasCalled = true;
_con1.Name = "somethinghere";
Assert.That(wasCalled, Is.True);
}
[Test]
public void ChangingSubChildPropertyTriggersPropertyChangedEvent()
{
var wasCalled = false;
var container2 = new ContainerInfo();
_containerInfo.AddChild(container2);
container2.AddChild(_con1);
_containerInfo.PropertyChanged += (sender, args) => wasCalled = true;
_con1.Name = "somethinghere";
Assert.That(wasCalled, Is.True);
}
[Test]
public void SetChildPositionPutsChildInCorrectPosition()
{
_containerInfo.AddChild(_con1);
_containerInfo.AddChild(_con2);
_containerInfo.AddChild(_con3);
_containerInfo.SetChildPosition(_con2, 2);
Assert.That(_containerInfo.Children.IndexOf(_con2), Is.EqualTo(2));
}
[Test]
public void SettingChildPositionAboveArrayBoundsPutsItAtEndOfList()
{
_containerInfo.AddChild(_con1);
_containerInfo.AddChild(_con2);
_containerInfo.AddChild(_con3);
var finalIndex = _containerInfo.Children.Count - 1;
_containerInfo.SetChildPosition(_con2, 5);
Assert.That(_containerInfo.Children.IndexOf(_con2), Is.EqualTo(finalIndex));
}
[Test]
public void SettingChildPositionBelowArrayBoundsDoesNotMoveTheChild()
{
_containerInfo.AddChild(_con1);
_containerInfo.AddChild(_con2);
_containerInfo.AddChild(_con3);
var originalIndex = _containerInfo.Children.IndexOf(_con2);
_containerInfo.SetChildPosition(_con2, -1);
Assert.That(_containerInfo.Children.IndexOf(_con2), Is.EqualTo(originalIndex));
}
[Test]
public void SetChildAbovePutsChildInCorrectPosition()
{
_containerInfo.AddChild(_con1);
_containerInfo.AddChild(_con2);
_containerInfo.AddChild(_con3);
var referenceChildIndexBeforeMove = _containerInfo.Children.IndexOf(_con2);
_containerInfo.SetChildAbove(_con3, _con2);
var targetsNewIndex = _containerInfo.Children.IndexOf(_con3);
Assert.That(targetsNewIndex, Is.EqualTo(referenceChildIndexBeforeMove));
}
[Test]
public void SetChildBelowPutsChildInCorrectPosition()
{
_containerInfo.AddChild(_con1);
_containerInfo.AddChild(_con2);
_containerInfo.AddChild(_con3);
var referenceChildIndexBeforeMove = _containerInfo.Children.IndexOf(_con1);
_containerInfo.SetChildBelow(_con3, _con1);
var targetsNewIndex = _containerInfo.Children.IndexOf(_con3);
Assert.That(targetsNewIndex, Is.EqualTo(referenceChildIndexBeforeMove+1));
}
[Test]
public void PromoteChildMovesTargetUpOne()
{
_containerInfo.AddChild(_con1);
_containerInfo.AddChild(_con2);
_containerInfo.AddChild(_con3);
var targetsIndexBeforeMove = _containerInfo.Children.IndexOf(_con3);
_containerInfo.PromoteChild(_con3);
var targetsNewIndex = _containerInfo.Children.IndexOf(_con3);
Assert.That(targetsNewIndex, Is.EqualTo(targetsIndexBeforeMove - 1));
}
[Test]
public void PromoteChildDoesNothingWhenAlreadyAtTopOfList()
{
_containerInfo.AddChild(_con1);
_containerInfo.AddChild(_con2);
_containerInfo.AddChild(_con3);
var targetsIndexBeforeMove = _containerInfo.Children.IndexOf(_con1);
_containerInfo.PromoteChild(_con1);
var targetsNewIndex = _containerInfo.Children.IndexOf(_con1);
Assert.That(targetsNewIndex, Is.EqualTo(targetsIndexBeforeMove));
}
[Test]
public void DemoteChildMovesTargetDownOne()
{
_containerInfo.AddChild(_con1);
_containerInfo.AddChild(_con2);
_containerInfo.AddChild(_con3);
var targetsIndexBeforeMove = _containerInfo.Children.IndexOf(_con1);
_containerInfo.DemoteChild(_con1);
var targetsNewIndex = _containerInfo.Children.IndexOf(_con1);
Assert.That(targetsNewIndex, Is.EqualTo(targetsIndexBeforeMove + 1));
}
[Test]
public void DemoteChildDoesNothingWhenAlreadyAtTopOfList()
{
_containerInfo.AddChild(_con1);
_containerInfo.AddChild(_con2);
_containerInfo.AddChild(_con3);
var targetsIndexBeforeMove = _containerInfo.Children.IndexOf(_con3);
_containerInfo.DemoteChild(_con3);
var targetsNewIndex = _containerInfo.Children.IndexOf(_con3);
Assert.That(targetsNewIndex, Is.EqualTo(targetsIndexBeforeMove));
}
[Test]
public void WhenChildAlreadyPresentAddChildAtDoesNothing()
{
_containerInfo.AddChild(_con1);
_containerInfo.AddChild(_con2);
_containerInfo.AddChild(_con3);
var indexBeforeAttemptedMove = _containerInfo.Children.IndexOf(_con1);
_containerInfo.AddChildAt(_con1, 2);
var indexAfterAttemptedMove = _containerInfo.Children.IndexOf(_con1);
Assert.That(indexAfterAttemptedMove, Is.EqualTo(indexBeforeAttemptedMove));
}
[Test]
public void RemoveChildDoesNothingIfChildNotInList()
{
_containerInfo.AddChild(_con1);
var childListBeforeRemoval = _containerInfo.Children;
_containerInfo.RemoveChild(_con2);
var childListAfterRemoval = _containerInfo.Children;
Assert.That(childListAfterRemoval, Is.EquivalentTo(childListBeforeRemoval));
}
[Test]
public void ClonedContainerHasNewConstantId()
{
var clone = _containerInfo.Clone();
Assert.That(clone.ConstantID, Is.Not.EqualTo(_containerInfo.ConstantID));
}
[Test]
public void ClonedContainerContainsClonedChildren()
{
_containerInfo.AddChild(_con1);
_containerInfo.AddChild(_con2);
_containerInfo.AddChild(_con3);
var clone = _containerInfo.Clone() as ContainerInfo;
var clonedChildNames = clone?.Children.Select((node) => node.Name);
var originalChildNames = _containerInfo?.Children.Select((node) => node.Name);
Assert.That(clonedChildNames, Is.EquivalentTo(originalChildNames));
}
[Test]
public void HasChildrenReturnsFalseForNoChildren()
{
var hasChildren = _containerInfo.HasChildren();
Assert.That(hasChildren, Is.False);
}
[Test]
public void HasChildrenReturnsTrueWhenChildrenPresent()
{
_containerInfo.AddChild(_con1);
var hasChildren = _containerInfo.HasChildren();
Assert.That(hasChildren, Is.True);
}
[Test]
public void AddChildAbovePutsNewChildInCorrectLocation()
{
_containerInfo.AddChild(_con1);
var referenceChildIndexBeforeInsertion = _containerInfo.Children.IndexOf(_con1);
_containerInfo.AddChildAbove(_con2, _con1);
var newChildIndex = _containerInfo.Children.IndexOf(_con2);
Assert.That(newChildIndex, Is.EqualTo(referenceChildIndexBeforeInsertion));
}
[Test]
public void AddChildAbovePutsNewChildAtEndOfListIfReferenceChildNotInList()
{
_containerInfo.AddChild(_con1);
_containerInfo.AddChildAbove(_con2, _con3);
var newChildIndex = _containerInfo.Children.IndexOf(_con2);
var lastIndex = _containerInfo.Children.Count - 1;
Assert.That(newChildIndex, Is.EqualTo(lastIndex));
}
[Test]
public void AddChildBelowPutsNewChildInCorrectLocation()
{
_containerInfo.AddChild(_con1);
_containerInfo.AddChild(_con2);
var referenceChildIndexBeforeInsertion = _containerInfo.Children.IndexOf(_con1);
_containerInfo.AddChildBelow(_con3, _con1);
var newChildIndex = _containerInfo.Children.IndexOf(_con3);
Assert.That(newChildIndex, Is.EqualTo(referenceChildIndexBeforeInsertion + 1));
}
[Test]
public void AddChildBelowPutsNewChildAtEndOfListIfReferenceChildNotInList()
{
_containerInfo.AddChild(_con1);
_containerInfo.AddChildBelow(_con2, _con3);
var newChildIndex = _containerInfo.Children.IndexOf(_con2);
var lastIndex = _containerInfo.Children.Count - 1;
Assert.That(newChildIndex, Is.EqualTo(lastIndex));
}
[Test]
public void SortAscendingSortsCorrectlyByName()
{
_containerInfo.AddChild(_con2);
_containerInfo.AddChild(_con1);
_containerInfo.AddChild(_con3);
_containerInfo.Sort();
var orderAfterSort = _containerInfo.Children.ToArray();
Assert.That(orderAfterSort, Is.Ordered.Ascending.By(nameof(ConnectionInfo.Name)));
}
[Test]
public void SortDescendingSortsCorrectlyByName()
{
_containerInfo.AddChild(_con2);
_containerInfo.AddChild(_con1);
_containerInfo.AddChild(_con3);
_containerInfo.Sort(ListSortDirection.Descending);
var orderAfterSort = _containerInfo.Children.ToArray();
Assert.That(orderAfterSort, Is.Ordered.Descending.By(nameof(ConnectionInfo.Name)));
}
[Test]
public void SortOnConstantIdAscendingSortsCorrectly()
{
_containerInfo.AddChild(_con2);
_containerInfo.AddChild(_con1);
_containerInfo.AddChild(_con3);
_containerInfo.SortOn(node=> node.ConstantID);
var orderAfterSort = _containerInfo.Children.ToArray();
Assert.That(orderAfterSort, Is.Ordered.Ascending.By(nameof(ConnectionInfo.ConstantID)));
}
[Test]
public void SortOnConstantIdDescendingSortsCorrectly()
{
_containerInfo.AddChild(_con2);
_containerInfo.AddChild(_con1);
_containerInfo.AddChild(_con3);
_containerInfo.SortOn(node => node.ConstantID, ListSortDirection.Descending);
var orderAfterSort = _containerInfo.Children.ToArray();
Assert.That(orderAfterSort, Is.Ordered.Descending.By(nameof(ConnectionInfo.ConstantID)));
}
[Test]
public void SortAscendingRecursiveSortsGrandchildrenCorrectlyByName()
{
var childContainer = new ContainerInfo();
childContainer.AddChild(_con2);
childContainer.AddChild(_con1);
childContainer.AddChild(_con3);
_containerInfo.AddChild(childContainer);
_containerInfo.SortRecursive();
var grandchildOrderAfterSort = childContainer.Children.ToArray();
Assert.That(grandchildOrderAfterSort, Is.Ordered.Ascending.By(nameof(ConnectionInfo.Name)));
}
[Test]
public void SortDescendingRecursiveSortsGrandchildrenCorrectlyByName()
{
var childContainer = new ContainerInfo();
childContainer.AddChild(_con2);
childContainer.AddChild(_con1);
childContainer.AddChild(_con3);
_containerInfo.AddChild(childContainer);
_containerInfo.SortRecursive(ListSortDirection.Descending);
var grandchildOrderAfterSort = _containerInfo.Children.ToArray();
Assert.That(grandchildOrderAfterSort, Is.Ordered.Descending.By(nameof(ConnectionInfo.Name)));
}
[Test]
public void SortOnRecursiveConstantIdAscendingSortsGrandchildrenCorrectly()
{
var childContainer = new ContainerInfo();
childContainer.AddChild(_con2);
childContainer.AddChild(_con1);
childContainer.AddChild(_con3);
_containerInfo.AddChild(childContainer);
_containerInfo.SortOnRecursive(node => node.ConstantID);
var grandchildOrderAfterSort = _containerInfo.Children.ToArray();
Assert.That(grandchildOrderAfterSort, Is.Ordered.Ascending.By(nameof(ConnectionInfo.ConstantID)));
}
[Test]
public void SortOnRecursiveConstantIdDescendingSortsGrandchildrenCorrectly()
{
var childContainer = new ContainerInfo();
childContainer.AddChild(_con2);
childContainer.AddChild(_con1);
childContainer.AddChild(_con3);
_containerInfo.AddChild(childContainer);
_containerInfo.SortOnRecursive(node => node.ConstantID, ListSortDirection.Descending);
var grandchildOrderAfterSort = _containerInfo.Children.ToArray();
Assert.That(grandchildOrderAfterSort, Is.Ordered.Descending.By(nameof(ConnectionInfo.ConstantID)));
}
}
}

Some files were not shown because too many files have changed in this diff Show More