Compare commits

...

348 Commits

Author SHA1 Message Date
David Sparer
756950ff4e added import logic for rdm files 2020-01-26 17:59:30 -06:00
David Sparer
11ea575898 implemented importing of basic RDM connection types 2020-01-26 16:43:09 -06:00
Faryan Rezagholi
9257b7ac52 Merge pull request #1669 from Filippo125/sql_update#1589
Sql fixes
2020-01-16 16:36:31 +01:00
Faryan Rezagholi
28d131f74d fixed typo 2020-01-16 16:23:12 +01:00
Faryan Rezagholi
76e1ae3596 updated changelog 2020-01-16 15:16:08 +01:00
Filippo Ferrazini
8357cfc9b5 Add database migration
Update changelog and credits
2020-01-09 23:41:18 +01:00
Filippo Ferrazini
1250f389af Remove unnecessary code 2020-01-05 16:18:50 +01:00
Filippo Ferrazini
d0ae6ee21a Add check if sql row has to be updated 2020-01-04 14:15:02 +01:00
Filippo Ferrazini
40f5bd9444 Implement crud on mssql 2019-12-29 16:56:34 +01:00
Filippo Ferrazini
c3ea05b862 Fix mssql creation tblCons query 2019-12-29 16:56:15 +01:00
Filippo Ferrazini
488c6f5f64 Change tblCons primary key sql setup 2019-12-28 16:33:23 +01:00
Filippo Ferrazini
a1940e3ab9 Optimize code remove 2019-12-28 16:11:39 +01:00
Filippo Ferrazini
eda873911a Change behaviour in sql save, don't rewrite all database 2019-12-28 16:03:18 +01:00
Faryan Rezagholi
048f890dcb Merge pull request #1622 from wwj402/develop
update chinese simplified language 2019/10/16
2019-11-10 12:15:57 +01:00
Faryan Rezagholi
28c31fc101 fixed failing test 2019-11-10 12:05:24 +01:00
Faryan Rezagholi
852c6576cf Merge branch 'develop' into pr/1622 2019-11-09 19:32:50 +01:00
David Sparer
00a5fc0142 created user documentation for default connection properties 2019-10-16 11:46:33 -05:00
wwj402
48cca34055 update chinese simplified language 2019/10/16 2019-10-16 14:59:41 +08:00
Faryan Rezagholi
b2c5298400 removed incomplete variable example table 2019-10-07 22:23:34 +02:00
Faryan Rezagholi
cf5d5e6974 Merge pull request #1567 from mRemoteNG/powershell_remoting
Powershell remoting
2019-10-06 11:01:26 +02:00
Faryan Rezagholi
3266485307 Updated translated string, fixes #1611 2019-10-05 01:07:19 +02:00
Faryan Rezagholi
d27ae45512 fixed wrongly negated if statement 2019-10-04 21:48:00 +02:00
Faryan Rezagholi
c9f0ea47b7 merged develop into powershell_remoting 2019-10-04 00:59:24 +02:00
Faryan Rezagholi
d5100660fb added missing translation 2019-10-03 18:59:03 +02:00
Faryan Rezagholi
5c07327467 initialize settingsLoader earlier in code to prevent ui elements from being created before the language culture is propeperly set, part of #1497 2019-10-03 18:52:48 +02:00
Faryan Rezagholi
1e374d3a25 minimal code refractoring 2019-10-03 18:14:18 +02:00
Faryan Rezagholi
d68c419bab access language resources with nameof, part 2 2019-10-03 17:06:15 +02:00
Faryan Rezagholi
a9c4d0dee5 simply close options form instead of reverting settings, fixes #1610 2019-10-03 16:56:57 +02:00
Faryan Rezagholi
75a453e598 Merge pull request #1608 from Mant1kor/develop
Update Ukrainian translation
2019-10-03 12:13:44 +02:00
Faryan Rezagholi
404f23e7e6 fixed line break in credits 2019-10-03 11:49:30 +02:00
Mantikor
104be16061 Fixes 2019-10-03 10:33:23 +03:00
Mantikor
742301edf8 Update CREDITS.md 2019-10-03 10:31:57 +03:00
Mantikor
c3734f2e09 Add files via upload 2019-10-03 10:31:34 +03:00
Mantikor
e0cd4f2e0a Add files via upload 2019-10-03 10:30:22 +03:00
Faryan Rezagholi
db6042a30e updated nuget packages 2019-10-03 00:22:45 +02:00
Faryan Rezagholi
0e233e7027 Updated .NET to 4.7.2 2019-10-03 00:18:27 +02:00
Faryan Rezagholi
8e5d41bfea removed https in credits 2019-10-02 19:50:08 +02:00
Mantikor
8bb03195b5 Update CREDITS.md 2019-10-02 17:44:43 +03:00
Mantikor
de2bafd5a0 Update translation and fix errors 2019-10-02 17:28:01 +03:00
Faryan Rezagholi
4c08d06e93 fixed error where mrng would never close when set to "minimize to tray on close" 2019-10-01 14:01:10 +02:00
Faryan Rezagholi
ab5b58f3ae Merge branch 'develop' of https://github.com/mRemoteNG/mRemoteNG into develop 2019-10-01 09:31:36 +02:00
Faryan Rezagholi
31f637bc51 Added option to minimize to system tray on closing, fixes #545 2019-10-01 09:31:11 +02:00
Faryan Rezagholi
fbcfdb3fea Merge pull request #1601 from ryno2121/develop
Increased VNC test connection timeout from 150ms to 500ms
2019-09-30 14:13:58 +02:00
ryno2121
b1c650bb72 Increased VNC test connection timeout from 150ms to 500ms
It has been found at times that when connecting to a VNC host that the connection times-out even though the host is powered on. This happens mostly when you are connected to the network through WiFi. The time out value for the VNC test connection has been increased from 150ms to 500ms.
2019-09-30 06:05:42 +02:00
Faryan Rezagholi
209a3fb381 Merge pull request #1596 from ryno2121/develop
Handle VNC timeout
2019-09-27 23:51:37 +02:00
Faryan Rezagholi
772a11cb1d small code improvements and formatting 2019-09-27 23:29:44 +02:00
Faryan Rezagholi
758f7770a1 updated changelog 2019-09-27 23:02:52 +02:00
ryno2121
b319eb188a Update CHANGELOG.md 2019-09-27 18:56:37 +02:00
ryno2121
8ad7547640 Added code to report within 150ms a timeout error if no connection can be made on the VNC port for 150ms. 2019-09-27 17:26:45 +02:00
Faryan Rezagholi
8b060745ef do not try to display multi ssh command from history when there are none, fixes #1595 2019-09-27 09:50:01 +02:00
Faryan Rezagholi
baf2037ca1 Merge pull request #1583 from ng3727/fix_about_window_click
Fix about window url click, updated CREDITS.md
2019-09-19 14:38:11 +02:00
Faryan Rezagholi
7bf00e30e6 minor code formatting 2019-09-19 14:12:22 +02:00
ng3727
55c983c565 Update AboutWindow.cs
fix if the clicked isn't a link, i.e. empty status bar text caused the process start
to cause an exception
2019-09-17 21:45:48 +01:00
ng3727
6a4cd70811 Update CREDITS.md
changed gibhub.com urls to be http:// this allows the urls to be clickable
2019-09-17 21:43:25 +01:00
Faryan Rezagholi
652a580ec6 fixed typo 2019-09-14 12:04:12 +02:00
Faryan Rezagholi
0d2a2134b9 Merge branch 'develop' into powershell_remoting 2019-09-14 12:03:12 +02:00
Faryan Rezagholi
a330d3e943 fixed copy-paste error 2019-09-12 13:05:39 +02:00
Faryan Rezagholi
0034f78edc merged develop into powershell_remoting 2019-09-10 00:13:23 +02:00
Faryan Rezagholi
27e71ebfc7 get protocol type descriptions by nameof instead of accessing them directly 2019-09-09 23:50:36 +02:00
Faryan Rezagholi
f0f3ddef87 Set localized attributes values by nameof instead of accessing them directly
Makes tracking of used/unused items and renaming items easier
2019-09-09 23:40:04 +02:00
Faryan Rezagholi
f65478ee36 added missing translations 2019-09-09 23:37:48 +02:00
Faryan Rezagholi
4bd7d63d9c merged develop into powershell_remoting 2019-09-09 23:04:48 +02:00
Faryan Rezagholi
0343254cad Merge pull request #1569 from damianszczepanik/translations-pl
Add translations for Polish language
2019-09-09 09:03:36 +02:00
Damian Szczepanik
9aaafa5015 Add translations for Polish language 2019-09-08 23:15:53 +02:00
Faryan Rezagholi
04bd78e91a Merge pull request #1565 from mRemoteNG/vmid_enhancedmode
Added option to set enhanced mode
2019-09-08 15:57:29 +02:00
Faryan Rezagholi
7ce17c7fb3 added powershell connection icon 2019-09-08 15:27:56 +02:00
Faryan Rezagholi
2a796d3bf5 Update PULL_REQUEST_TEMPLATE.md 2019-09-08 14:58:25 +02:00
Faryan Rezagholi
944aa6b13e Changed background color to native powershell color 2019-09-08 14:56:52 +02:00
Faryan Rezagholi
58add600d6 Update PULL_REQUEST_TEMPLATE.md 2019-09-08 14:30:06 +02:00
Faryan Rezagholi
b1089de1ad Revert "Set language version to C#7.1"
This reverts commit 69c1e2ccc2.
2019-09-08 14:07:22 +02:00
Faryan Rezagholi
69c1e2ccc2 Set language version to C#7.1 2019-09-08 13:43:13 +02:00
Faryan Rezagholi
6ec23d9d69 removed unnecessary usings 2019-09-08 13:07:14 +02:00
Faryan Rezagholi
de3072c67e Added ConsoleControl, since it seems that the powershell.exe cannot be integrated 2019-09-08 13:02:58 +02:00
Faryan Rezagholi
35f6d3eb90 updated documentation 2019-09-08 02:30:55 +02:00
Faryan Rezagholi
f0ffcc6944 updated changelog 2019-09-08 02:25:42 +02:00
Faryan Rezagholi
5ab3f71551 removed redundant language resources 2019-09-08 02:23:53 +02:00
Faryan Rezagholi
cef3b9294d cleanup 2019-09-08 02:22:19 +02:00
Faryan Rezagholi
0008631771 Added PowerShell Protocol for remote PS-Sessions 2019-09-07 18:16:36 +02:00
Faryan Rezagholi
8e5caaca55 Merge branch 'develop' into vmid_enhancedmode 2019-09-07 16:46:57 +02:00
Faryan Rezagholi
8c962e8b60 Merge pull request #1555 from mRemoteNG/update_geckofx
Updated GeckoFX
2019-09-07 16:42:02 +02:00
Faryan Rezagholi
7ebcba3c21 fixed enhancedMode value not being translated 2019-09-07 06:08:24 +02:00
Faryan Rezagholi
7ac45dbd32 fixed failing tests 2019-09-06 21:02:15 +02:00
Faryan Rezagholi
b83488d08a Added option to det enhanced mode as requested in #1564 2019-09-06 14:59:41 +02:00
Faryan Rezagholi
5528b701fb fixed installer build error 2019-09-03 16:09:36 +02:00
Faryan Rezagholi
8767d103f0 Updated Changelog 2019-09-02 23:15:05 +02:00
Faryan Rezagholi
ca66656a8e updated geckofx from 45 to 60 2019-09-02 22:55:09 +02:00
David Sparer
41e299aaaf dev channel badge updated in readme 2019-09-02 12:33:27 -05:00
Faryan Rezagholi
c3f44ef70a corrected wrongly negated if-statement, fixes #1337 2019-09-02 19:31:08 +02:00
Faryan Rezagholi
fa44e66bd9 Revert "do not automatically enable inheritance on connections imported from AD, fixes #1518"
This reverts commit c1b6bd4679.
2019-09-02 19:25:31 +02:00
Faryan Rezagholi
0b944c4222 added lithuanian language dummy file (copy from default one) as a template to be translated #878 2019-09-02 18:33:10 +02:00
David Sparer
11abc789a0 fixed nunit runner path in publish script 2019-09-02 10:20:41 -05:00
David Sparer
15e2cdaad0 release date set in changelog 2019-09-02 10:03:01 -05:00
David Sparer
10b6973f0d updated changelog and bumped minor version 2019-09-02 09:59:21 -05:00
Faryan Rezagholi
24cd9f257c Moved port property from 'protocol' to 'connection' section, fixes #718 2019-09-01 18:30:30 +02:00
Faryan Rezagholi
8ecb49709e Added missing description for password protect field in root node, fixes #617 2019-09-01 18:00:39 +02:00
Faryan Rezagholi
e12d20ab85 Added option to start mRemoteNG minimized, fixes #1385 2019-09-01 15:52:05 +02:00
Faryan Rezagholi
8b7f7b16a8 revised sort button in connection tree to be able to sort in both orders, fixes #1434 2019-09-01 15:04:16 +02:00
Faryan Rezagholi
117e57d7b0 Allow for sorting in port scan results, fixes #841 2019-08-30 21:57:47 +02:00
Faryan Rezagholi
56b3f9355a Set browser language when using geckofx, fixes #553 2019-08-30 21:41:57 +02:00
Faryan Rezagholi
70af08616f Changed rendering engine of documentation to gecko. Open external links in os default browser, fixes #1378 2019-08-30 18:01:18 +02:00
Faryan Rezagholi
6066cb708e set protocol type when importing from ad, possible fix for #759 2019-08-30 16:28:42 +02:00
Faryan Rezagholi
c1b6bd4679 do not automatically enable inheritance on connections imported from AD, fixes #1518 2019-08-30 16:21:13 +02:00
Faryan Rezagholi
88617759f6 Merge pull request #1508 from Airthee/patch-1
Delete Readme.txt
2019-08-30 15:46:19 +02:00
Faryan Rezagholi
3df98602ee Merge pull request #1551 from ng3727/origin/fix_MsSql_RdpVersion_null
Update DataTableDeserializer.cs handle null values in column RdpVersion
2019-08-30 15:35:19 +02:00
Faryan Rezagholi
3da989e37f Merge pull request #1532 from Filippo125/db_structure#1493
Fixed DB setup scripts, fixes #1493
2019-08-30 15:33:13 +02:00
Faryan Rezagholi
f735237b3a removed README.TXT from installer 2019-08-30 15:29:16 +02:00
david-sway
125330b695 Added handling of Gecko.LauncherDialog.Download (#1548)
* Added handling of Gecko.LauncherDialog.Download
Code lifted from https://stackoverflow.com/questions/27368791/how-to-handle-downloading-in-geckofx-29
This code addition addresses https://github.com/mRemoteNG/mRemoteNG/issues/1400
* updated changelog for #1400
* refractored launcher dialog method
2019-08-30 15:15:45 +02:00
Faryan Rezagholi
11199eabf3 Merge pull request #1544 from damianszczepanik/translate
Add translations for Polish language
2019-08-30 14:22:12 +02:00
ng3727
12b4eb64ba Update DataTableDeserializer.cs
Table allows for null values which must be handled so as not to create an error
2019-08-27 15:19:09 +01:00
Damian Szczepanik
d62fd25db5 Add translations for Polish language 2019-08-22 23:47:17 +02:00
Faryan Rezagholi
58851aadb0 fixed another occurence of a spelling mistake like mentioned in #1458 2019-08-22 14:50:04 +02:00
Faryan Rezagholi
322049196c Merge pull request #1524 from wwj402/develop
update chinese simplified language 2019/07/23
2019-08-17 19:09:02 +02:00
David Sparer
ce85801dcf removed the no-longer used option "automatically get session info" from settings 2019-08-14 08:52:54 -05:00
Filippo Ferrazini
04ad29d7c9 Fix table tblCons structure 2019-08-01 17:42:54 +02:00
Filippo Ferrazini
92f532c694 Fix database issue, column duplicate and absent 2019-08-01 17:26:58 +02:00
wwj402
9188979367 update chinese simplified language 2019/07/23 2019-07-23 10:55:25 +08:00
Faryan Rezagholi
b21379952b Added option to close panel from right click menu, fixes #1512 2019-07-13 18:31:07 +02:00
Raphaël
900c5c8351 Delete Readme.txt
I think this file is no longer maintained and has been replaced by the README.md
2019-07-08 08:41:57 +02:00
Faryan Rezagholi
5cab342c8c do not try to show an exception windows when main form is already disposed 2019-07-01 22:24:46 +02:00
Faryan Rezagholi
69e4bc2650 set html colors of about screen based on current color theme, fixes #1505 2019-07-01 21:56:39 +02:00
Faryan Rezagholi
cabd712b75 updated sql upgrader class to reflect recent changes, fixes #1501 2019-07-01 00:41:58 +02:00
Faryan Rezagholi
fe4266a41e updated nuget packages 2019-07-01 00:38:00 +02:00
Faryan Rezagholi
07fa8232e4 Revert "migrate package.config to PackageReference"
This reverts commit 17e227236f.
2019-07-01 00:16:32 +02:00
Faryan Rezagholi
d02ec9bec6 Revert "updated nuget packages"
This reverts commit 91b1007083.
2019-07-01 00:16:10 +02:00
Faryan Rezagholi
47a508b9ea Merge pull request #1498 from mRemoteNG/feature/rdp_version_selection
Add option to choose RDP protocol version
2019-06-29 12:20:27 +02:00
Faryan Rezagholi
6c620b09c9 updated german translation 2019-06-27 23:21:36 +02:00
Faryan Rezagholi
cb822c44ce Merge branch 'develop' into feature/rdp_version_selection 2019-06-27 23:08:38 +02:00
Faryan Rezagholi
aa9d5ce04e fixed failing tests 2019-06-27 23:08:09 +02:00
Faryan Rezagholi
8876cb91c9 Merge branch 'develop' into feature/rdp_version_selection 2019-06-26 15:03:36 +02:00
Faryan Rezagholi
91b1007083 updated nuget packages 2019-06-26 09:08:24 +02:00
Faryan Rezagholi
17e227236f migrate package.config to PackageReference 2019-06-26 00:39:08 +02:00
David Sparer
22ba4c86bb fixed bug with opening ssh connections
introduced in 65edebc
2019-06-25 08:01:14 -05:00
David Sparer
017d9c8290 updated db init scripts for RdpVersion property 2019-06-24 09:43:06 -05:00
David Sparer
2f7c930859 removed the option for Rdc10 since it is not available for general use yet 2019-06-24 09:36:42 -05:00
David Sparer
983637973b fixed failing tests 2019-06-24 09:30:10 -05:00
David Sparer
bb2e0f0b7d renamed more items to RdpVersion as suggested in code review 2019-06-24 08:31:38 -05:00
David Sparer
0d8a3b84fe simplified RDP version property name and description 2019-06-23 18:15:44 -05:00
David Sparer
3503652df3 added documentation note to rdp 7 warning about performance flag support 2019-06-23 15:34:27 -05:00
David Sparer
1a82e48b3d minor cleanup 2019-06-23 15:29:06 -05:00
David Sparer
f5a86814a9 removed rdp KBs from the install requirements 2019-06-23 15:28:50 -05:00
David Sparer
bde3b691ff updated changelog 2019-06-23 15:15:13 -05:00
David Sparer
ed53db1bdc added an error message for when the rdp client class doesn't exist 2019-06-23 14:11:54 -05:00
David Sparer
ecbd62676b Merge branch 'develop' into feature/rdp_version_selection
# Conflicts:
#	mRemoteV1/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsSerializerMremotengFormat.cs
#	mRemoteV1/Config/Serializers/ConnectionSerializers/Xml/XmlConnectionsDeserializer.cs
#	mRemoteV1/Connection/Protocol/RDP/RdpProtocol6.cs
#	mRemoteV1/Properties/Settings.Designer.cs
#	mRemoteV1/Properties/Settings.settings
#	mRemoteV1/app.config
2019-06-23 13:33:40 -05:00
David Sparer
b343ebec15 minor cleanup 2019-06-23 13:15:15 -05:00
David Sparer
99e1de2503 fixed issue where performance flags were not being honored on newer versions of windows
fixes #323
2019-06-23 13:15:08 -05:00
Faryan Rezagholi
f7700b9279 Update README.MD 2019-06-21 21:28:49 +02:00
Faryan Rezagholi
4007568d93 Merge pull request #1422 from mRemoteNG/hyperv
Support for Hyper-V VMRDP
2019-06-21 14:59:02 +02:00
Faryan Rezagholi
208134e970 merged develop into hyperv 2019-06-21 13:58:51 +02:00
Faryan Rezagholi
bda5d481b2 Enable enhanced mode by default 2019-06-21 13:55:03 +02:00
Faryan Rezagholi
00609f5a5d removed trailing slash from URLs, fixes #1496 2019-06-20 22:34:27 +02:00
Faryan Rezagholi
09f52a32a6 Update connections.rst
fixed typo
2019-06-18 01:33:46 +02:00
Faryan Rezagholi
73c14a9ad0 updated help to include info about PuTTY menu #1209 2019-06-18 00:28:15 +02:00
Faryan Rezagholi
8cc826a57b Merge pull request #1491 from cguadall/patch-1
Update Language.es.resx
2019-06-17 22:27:50 +02:00
cguadall
02e17f9845 Update Language.es.resx
Fix "dle" typo
2019-06-16 09:00:59 +02:00
David Sparer
3e18a25ed3 Merge pull request #1489 from wwj402/develop
update chinese simplified language 2019/06/13
2019-06-15 20:05:58 -05:00
David Sparer
4c31106839 modified RTD theme to prevent scroll bars on list-table cells 2019-06-15 17:59:15 -05:00
David Sparer
2b8ff1d090 added a protocols/rdp page to the documentation 2019-06-15 17:57:58 -05:00
David Sparer
9e7690054d fixed a sphinx warning 2019-06-15 17:56:30 -05:00
David Sparer
2e6fdce592 removed unnecessary files 2019-06-15 17:56:14 -05:00
wwj402
eee40c2130 update chinese simplified language 2019/06/13 2019-06-13 17:08:23 +08:00
David Sparer
818fe3adfc removed pre-install check for RDP KBs
These should no longer be required since we can now dynamically select
which RDP protocol version to use.
2019-06-12 07:59:33 -05:00
David Sparer
f6bfaf415f finished updating serializers and added a default setting for the rdp protocol version property 2019-06-11 15:47:07 -05:00
David Sparer
35a3190b28 updated the component check window to check all supported RDP versions 2019-06-11 14:13:01 -05:00
David Sparer
65edebca2e finished splitting up rdp functionality between classes 2019-06-11 10:44:26 -05:00
David Sparer
aef9be8d9b began re-splitting rdp into different classes by version 2019-06-10 19:34:26 -05:00
Faryan Rezagholi
3acb9f1842 local attribute "favorite not getting serialized", fixes #1470 2019-06-09 23:50:15 +02:00
David Sparer
9f7271178f Merge pull request #1469 from Glober777/FixGetArchitectureData
Improve startup time
2019-06-09 12:45:29 -05:00
Faryan Rezagholi
5038deaf97 updated changelog 2019-06-09 13:23:34 +02:00
Faryan Rezagholi
d6e04156f1 Merge pull request #1473 from suggestable/patch-1
corrected spelling mistake
2019-06-04 22:53:45 +02:00
Faryan Rezagholi
07d7f10622 fixed spellling mistake 2019-06-04 21:57:21 +02:00
Sarah Van der Veken
78a1058aa1 Update sql_configuration.rst
Correcting English syntax
2019-06-04 11:56:42 +01:00
Ivan Seriavin
f16894869a Resolves https://github.com/mRemoteNG/mRemoteNG/issues/1468 2019-05-30 14:27:27 +03:00
David Sparer
31240fa50d moved most RDP enums to their own files 2019-05-27 12:22:26 -05:00
Faryan Rezagholi
0f7c2c83b3 fixed wrong word in russian tranlation #1458 2019-05-25 12:43:10 +02:00
David Sparer
22e43c84fc fixes #1456 2019-05-24 08:31:15 -05:00
Faryan Rezagholi
f9160677c3 Update README.MD
updated stale link, fixes #1457
2019-05-23 21:15:08 +02:00
David Sparer
0b1f04abe3 fixes #1379 2019-05-21 07:51:41 -05:00
David Sparer
c28b4d39ad moved sql scripts to separate files to ease management 2019-05-20 07:41:36 -05:00
David Sparer
519efe633f updated changelog 2019-05-18 15:14:40 -05:00
David Sparer
cf680eba4a fixed issue with collection-changed exception when iterating over items to save 2019-05-18 15:10:51 -05:00
David Sparer
63c78f986d added button to test encryption settings on the security page 2019-05-18 15:10:08 -05:00
David Sparer
57d8b0c803 default kdf iteration count is now 10000 2019-05-18 15:09:24 -05:00
David Sparer
cae906d226 simplified connection initiator method overloads 2019-05-13 14:07:10 -05:00
David Sparer
1ebe773b6e minor cleanup of ng search box 2019-05-13 13:30:13 -05:00
David Sparer
594f005476 fixed a few more cases where default text wouldn't behave correctly 2019-05-13 13:28:25 -05:00
David Sparer
027e37545b added a "defaulttext" mode to the ng search box
This will prevent a bug when users want to perform a real search
using the same term as Language.strSearchPrompt
2019-05-13 12:54:36 -05:00
David Sparer
4fc82ab7c1 fixes #1439 2019-05-13 12:17:50 -05:00
David Sparer
565e163b3e fixes #1447 2019-05-13 09:31:17 -05:00
Faryan Rezagholi
e6c26dde7b Merge pull request #1443 from wwj402/develop
update chinese simplified language base on commit 9fdcffd
2019-05-12 15:36:57 +02:00
Faryan Rezagholi
6e8acc0f4c Merge branch 'develop' into develop 2019-05-12 15:00:25 +02:00
Faryan Rezagholi
b7fff50d31 updated changelog 2019-05-12 14:58:33 +02:00
Faryan Rezagholi
a2d240ee4a Merge pull request #1437 from petterjohanolsen/develop
Updated Norwegian translation
2019-05-12 14:55:55 +02:00
Faryan Rezagholi
a69f6925e9 updated changelog file 2019-05-12 14:42:00 +02:00
Faryan Rezagholi
c4544832d2 Update PULL_REQUEST_TEMPLATE.md 2019-05-12 14:24:20 +02:00
wwj402
e9dcb986f9 update chinese simplified language base on commit 9fdcffd 2019-05-08 14:36:02 +08:00
Petter Johan Olsen
93b6fe7aab Updated Norwegian translation 2019-05-05 20:13:49 +02:00
Faryan Rezagholi
d6aadef2b8 Update CONTRIBUTING.md
fixed spelling
2019-05-03 00:01:44 +02:00
Faryan Rezagholi
4e0fb6bf65 updated changelog 2019-05-02 23:54:37 +02:00
Faryan Rezagholi
93c4f99619 Merge branch 'develop' into hyperv 2019-05-02 10:00:31 +02:00
Faryan Rezagholi
7c489cb9aa fixed error where connecting to vm on localhost
fixed error where rdp pre connection blob would not work if mrng is also running on localhost in a console session
2019-05-02 09:57:52 +02:00
Faryan Rezagholi
1d74cc8225 updated collapse/expand icons 2019-05-01 22:40:25 +02:00
Faryan Rezagholi
8021529a41 added back github health files 2019-05-01 22:27:54 +02:00
Faryan Rezagholi
2791f60a58 fixed the rest of the failing tests 2019-05-01 20:43:02 +02:00
Faryan Rezagholi
88e88be756 fixed some failing tests 2019-05-01 16:29:16 +02:00
Faryan Rezagholi
13d42ae288 moved and revised documentation 2019-05-01 01:16:39 +02:00
Faryan Rezagholi
5408cc6015 merged 'develop' into hyperv 2019-05-01 00:23:12 +02:00
Faryan Rezagholi
c97fbba173 Merge pull request #1430 from sli-pro/develop
Minor changes to option pages for russian language
2019-05-01 00:12:37 +02:00
Faryan Rezagholi
79d9e806d5 Merge branch 'develop' into develop 2019-04-30 23:59:27 +02:00
Faryan Rezagholi
12589ffbe0 more little improvements 2019-04-30 23:57:18 +02:00
Faryan Rezagholi
f21b62241a updated changelog 2019-04-30 23:03:48 +02:00
Faryan Rezagholi
b6cd10b51e removed pr template in favor of community-health repository 2019-04-30 21:52:50 +02:00
Faryan Rezagholi
e7344cdc24 updated changelog 2019-04-30 21:52:08 +02:00
Faryan Rezagholi
4e118493d2 Sphinx docs (#1384)
* included changes from @nmat from separate repo into mrng

* added sphinx-doc build dir

* fixed error on non-appveyor builds

* removed unneccesary variable

* added post-build script for sphinx documenatation

* retired "move_help_files" post build script

* added sphinx-documentation files to project

* display spinx docs

* changed theme to read the docs

* fixed typo

* restructured sphinx dir

* added documentation forr keyboard shortcuts and command line switches

* more hierarchy fixes

* added known issues

* added images for sphinx docs to project

* added quick connect documentation

* added port scan documentation

* added screenshot manager documentation

* added notifications documentation

* added import/export documentation

* added ssh file transfer documentation

* added connection config documentation

* added options documentation

* added menus documentation

* converted remaining help files and tidied up resources

* fixed formatting error

* modified sphinx script to automatically grab assembly details from assembly file

* modified copyright string for automated sphinx builds

* splitted toctree

* added RTD configuration file

* added RTD badge

* use default values if assembly file cannot be found

* removed colons from headings

* Minor fixes

* Remove source link so its not confusing for users

* Fix minor spelling

* Add editorconfig for rst files

* added external tools cheat sheet

* extended known issues segment

* added contact information

* Fix list item in document:

* Under "Opening and Closing Connections"

* added infor on how to migrate from pre-NG versions

* fixed list not being rendered properly

* removed markup guide from help to move it to the github wiki

* added missing information from github wiki

* removed contributing document from repository itself to move it to the wiki

* fixed formatting error

* Add more information for import/export

* minor wording fixes

* moved troubleshooting and known issues to its own support section

* moved "folders and inheritance" under "application handling"

* Minor formatting fixes

* Formatting fixes

* Updated docs for ssh file transfer:

* Added screenshot

* Updated documentation a little

* added FAQ

* revised external tools

* fixed sphinx build errors

* changed heading format

* do not output images for sphinx docs to build dir

* removed issue/pr templates

* updated appveyer configuration

* added missing variables

* added python to path

* output PATH for debugging

* sphinx build tests

* Minor cleanup

* added sql script changes into sphinx docs

* removed unused appveyor.xml
2019-04-30 21:42:32 +02:00
sli-pro
590b526079 Minor changes and forms of the Russian language 2019-04-30 21:22:48 +03:00
Faryan Rezagholi
b051e8cc46 Update PULL_REQUEST_TEMPLATE.md
added changelog to pr template checklist
2019-04-30 19:59:32 +02:00
David Sparer
952c2e570e updated changelog 2019-04-30 12:48:53 -05:00
David Sparer
d9834eae6d safer cast in the fips checker
fixes #1428
2019-04-30 12:46:47 -05:00
David Sparer
1901686a2a updated changelog 2019-04-30 10:33:31 -05:00
David Sparer
9efe4f41bf refactored to removed some casts 2019-04-30 10:28:58 -05:00
David Sparer
3fad296e3f use panel setting from connection info unless empty or overriden
fixes #1425
2019-04-30 10:28:03 -05:00
David Sparer
100b101e60 fixed update check file script to point to changelog.md 2019-04-30 08:03:19 -05:00
David Sparer
b66022fb64 fixed #1426 2019-04-30 07:10:06 -05:00
David Sparer
3e354868ea also fix installer project cert password reference 2019-04-29 17:54:11 -05:00
David Sparer
a6fda6c76a get cert password from build args rather than environment
change this back once appveyor is working
2019-04-29 17:37:08 -05:00
David Sparer
7ea08a0f6b fixed changelog and credits links in the csproj 2019-04-29 17:00:36 -05:00
David Sparer
dda6726a43 removed the unreleased section of the changelog for release 2019-04-29 15:03:16 -05:00
Faryan Rezagholi
70deb278e5 removed stale code and small code refractoring 2019-04-29 21:53:58 +02:00
Faryan Rezagholi
017934ab8e open links in about form with system default browser 2019-04-29 21:46:47 +02:00
Faryan Rezagholi
c8c98ebc02 updated changelog 2019-04-29 19:50:38 +02:00
David Sparer
939d49db57 Merge pull request #1419 from mRemoteNG/markdown
Move CHANGELOG.TXT to CHANGELOG.md
2019-04-29 12:21:07 -05:00
Faryan Rezagholi
9994a214b5 Jump between octet fields with tab, fixes #1423 2019-04-29 19:03:53 +02:00
Faryan Rezagholi
5d44ff8ca5 updated vmrdp documentation 2019-04-29 18:46:54 +02:00
David Sparer
60cef9fa49 fixed installer for markdown files 2019-04-29 11:16:35 -05:00
David Sparer
dda98b2902 Merge branch 'develop' into markdown 2019-04-29 08:53:04 -05:00
David Sparer
19ddc9de97 set the release date for 1.77.0 2019-04-29 08:42:41 -05:00
David Sparer
7985344042 updated changelog for #1389 2019-04-29 08:41:20 -05:00
Faryan Rezagholi
259768f92f updated (de)serializers 2019-04-28 22:30:13 +02:00
Faryan Rezagholi
e61716e25c added german translation for ne connection properties 2019-04-28 16:36:40 +02:00
Faryan Rezagholi
99d747aabe make it possible to connect to vm via id 2019-04-28 15:57:36 +02:00
Faryan Rezagholi
d789e0d5a4 do not hide user/pass/domain when connecting via vm id 2019-04-28 15:04:19 +02:00
Faryan Rezagholi
6524bbed43 added necessary properties to connect to hyper-v virtual machine via VM ID 2019-04-27 19:21:14 +02:00
Faryan Rezagholi
9b9dfbe46a fix display of copyright sign 2019-04-25 11:52:42 +02:00
Faryan Rezagholi
12c67f4244 added link to full changelog 2019-04-25 11:31:17 +02:00
Faryan Rezagholi
cd66d335e8 code-cleanup 2019-04-25 11:07:35 +02:00
Faryan Rezagholi
20a33eb69f removed implementation instructions, fixes #1153 2019-04-25 03:58:26 +02:00
Faryan Rezagholi
ee0fabca8e revised about window to show markdown file as html in gecko web browser 2019-04-25 03:38:41 +02:00
Faryan Rezagholi
527d0b85ad Added Markdig markdown parser 2019-04-25 03:37:10 +02:00
Faryan Rezagholi
4a72a0535b beautified file 2019-04-25 03:36:41 +02:00
Faryan Rezagholi
361d2246ed merged develop into markdown 2019-04-24 23:15:19 +02:00
Faryan Rezagholi
ffd8a9e87b Added new markdown files to project 2019-04-24 23:10:37 +02:00
David Sparer
be347da9f2 Merge pull request #1389 from mRemoteNG/refactor_config_window
Refactored config window to make property management easier
2019-04-24 12:08:12 -05:00
David Sparer
c01b2ca4be Merge branch 'develop' into refactor_config_window
# Conflicts:
#	mRemoteV1/UI/Window/ConfigWindow.cs
2019-04-24 10:27:27 -05:00
David Sparer
12ad4d2a22 improved the description of the remote audio capture property 2019-04-24 10:18:54 -05:00
David Sparer
18d992b96d updated changelog for #1414 2019-04-24 10:15:51 -05:00
David Sparer
59c74c6101 Merge pull request #1414 from bllkrkmz/develop
Add "Remote Audio Capture" option #383
2019-04-24 10:13:40 -05:00
David Sparer
cf4f552595 moved some theming code from the connection tree window to the connection tree itself 2019-04-23 15:11:50 -05:00
David Sparer
c6a16823b0 fixed ugly unthemed border around connection search box 2019-04-23 14:46:09 -05:00
David Sparer
0eb6185b6c made the connection tree theming code slightly more readable 2019-04-23 14:45:45 -05:00
David Sparer
d11e99b918 removed dead code 2019-04-23 14:30:57 -05:00
David Sparer
ff721ae820 properly theme the password dialog 2019-04-23 14:28:00 -05:00
Bennett Blodinger
dab605f50d Update CHANGELOG.md 2019-04-19 19:16:13 -05:00
David Sparer
cd40f04443 close the splash screen if it exists when an unhandled exception occurs 2019-04-19 10:33:41 -05:00
David Sparer
160e5696fe updated app manifest so we can correctly retrieve win10 version numbers 2019-04-19 10:33:17 -05:00
David Sparer
e98cd4ef55 our unhandled exception window now displays relevant environment info 2019-04-19 10:32:49 -05:00
David Sparer
79fddf1395 updated changelog with some missing items for v1.77 2019-04-18 15:48:00 -05:00
David Sparer
753e8bc049 Merge branch 'master' into develop
# Conflicts:
#	CHANGELOG.TXT
#	mRemoteV1/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManagerDeserializer.cs
#	mRemoteV1/Properties/AssemblyInfo.cs
2019-04-18 08:34:59 -05:00
bllkrkmz
2ae59b049c solved some problem according to test case 2019-04-18 09:00:07 +03:00
bllkrkmz
140429c931 Merge branch 'develop' of https://github.com/bllkrkmz/mRemoteNG into develop 2019-04-17 14:33:05 +03:00
bllkrkmz
ad756617dd Add "Remote Audio Capture" option #383 2019-04-17 14:32:37 +03:00
bllkrkmz
8812cd18ad Added "Remote Audio Capture" option 2019-04-17 14:27:46 +03:00
Faryan Rezagholi
ce71fe2b06 Merge pull request #1342 from mRemoteNG/disable_trimming
Added option to disable username trimming
2019-04-16 20:08:42 +02:00
Faryan Rezagholi
360366b9f5 merged from develop 2019-04-16 18:47:39 +02:00
Faryan Rezagholi
29f4123ab8 Merge pull request #1353 from wwj402/develop
update chinese simplified language 2019/03/15
2019-04-16 18:00:15 +02:00
Faryan Rezagholi
9fdcffda2f Merge branch 'develop' into develop 2019-04-16 17:39:20 +02:00
David Sparer
52d1b9a270 Merge branch 'release/v1.76' 2019-04-12 09:14:26 -05:00
David Sparer
068f5942e7 updated changelog and bumped version to 1.76.20 2019-04-12 08:38:06 -05:00
David Sparer
703cefaf19 ensure rdcman import never sets properties to null. fixes #1401 2019-04-12 08:24:05 -05:00
David Sparer
b9d326e9de Merge pull request #1404 from carrtohu/develop
Correct the Chinese translation in https://github.com/mRemoteNG/mRemoteNG/issues/1403
2019-04-12 07:15:30 -05:00
carrothu
06917327d8 Update Language.zh-CN.resx 2019-04-12 13:03:02 +08:00
carrothu
df92aaae56 Update Language.zh-CN.resx 2019-04-12 13:01:42 +08:00
carrothu
cafb03393c Update Language.zh-CN.resx 2019-04-12 12:58:54 +08:00
Sean Kaim
3d32557177 Merge pull request #1390 from mRemoteNG/release/v1.76
Release/v1.76
2019-04-04 15:51:02 -04:00
Sean Kaim
ea1f72b8b7 bump version and changelog update 2019-04-04 15:44:34 -04:00
Sean Kaim
993b6759cc Update PuTTYNG.exe
Reference #1374
2019-04-04 15:41:55 -04:00
Sean Kaim
b89ff616f0 Update ADTree.dll
Fixes #1383

@farosch had some refactoring done in the dll which required some minor updates in the calling code as well...
2019-04-04 15:40:34 -04:00
Sean Kaim
9e37959a50 Update PuTTYNG
Reference #1374
2019-04-04 15:39:25 -04:00
Sean Kaim
40f740de59 fixed typo and unmatched tag 2019-04-03 16:47:38 -04:00
David Sparer
500608b383 fixed a few more bugs in the config window 2019-04-02 15:21:45 -05:00
David Sparer
02c05a6c63 added more config window tests and fixed a bug 2019-04-02 14:39:21 -05:00
David Sparer
4b4444e8d7 added some more tests for the config window 2019-04-02 09:39:57 -05:00
David Sparer
bbeaf76a68 fixed some tests 2019-04-02 07:48:17 -05:00
David Sparer
82c289b2f5 fixed inheritance property display issue 2019-04-01 15:18:58 -05:00
David Sparer
fd461b8e9e mode now correctly switches to connection properties when inheritance isnt a valid selection 2019-04-01 15:02:40 -05:00
David Sparer
edda670b4f refactored the config window property grid logic
Extracted the mapping of properties to the protocols that use them. We can now
declare the mapping directly within the AbstractConnectionInfo class. Created
a new class to handle the specific way we are using the FilteredPropertyGrid
to show connection info / inheritance data.
2019-04-01 13:24:05 -05:00
David Sparer
ccfac74cc3 fixed minor bug in the test value ranomizer 2019-04-01 13:18:38 -05:00
David Sparer
0359e75de7 added tests of the filtered property grid 2019-04-01 13:15:20 -05:00
David Sparer
f709ea2a95 refactored test helper to reduce code duplication 2019-04-01 11:56:09 -05:00
David Sparer
1cd7e27911 changed some asset files from copyalways to presevenewest
this should help alleviate build time issues
2019-04-01 11:55:00 -05:00
David Sparer
e17d0e990d strongly typed the clone method for inheritance info objects 2019-04-01 11:54:03 -05:00
David Sparer
43169bc512 Merge pull request #1339 from mRemoteNG/clear_searchbox
Add button to clear searchbox
2019-03-21 13:42:13 -05:00
David Sparer
0015300b19 Merge branch 'develop' into clear_searchbox 2019-03-21 12:04:49 -05:00
David Sparer
a52c59a36b Merge pull request #1361 from mRemoteNG/feature/896_rdp_view_only
Implemented a view only mode for RDP
2019-03-21 10:58:28 -05:00
David Sparer
6ce89a9f57 Merge pull request #1340 from mRemoteNG/rdp_import
added missing properties when deserializing .rdp file
2019-03-21 10:54:32 -05:00
David Sparer
78d2c42bdd updated credits and changelog 2019-03-21 08:16:47 -05:00
David Sparer
fce7fdbee5 Merge branch 'mjbnz-mysql' into develop 2019-03-21 07:45:36 -05:00
David Sparer
0ce8eafe6c Merge branch 'develop' into mjbnz-mysql 2019-03-20 10:45:43 -05:00
David Sparer
c0b07307f5 Merge branch 'release/v1.76' 2019-03-20 10:38:31 -05:00
David Sparer
8751bd75da Merge branch 'release/v1.76' into develop
# Conflicts:
#	CHANGELOG.TXT
#	mRemoteV1/Connection/Protocol/PuttyBase.cs
#	mRemoteV1/Properties/AssemblyInfo.cs
2019-03-20 10:35:38 -05:00
David Sparer
15f23769d6 bumped version to v1.76.18 and updated changelog 2019-03-20 09:33:21 -05:00
Sean Kaim
2d175fd575 border fix for puttyng 0.70.0.1+ -- backported from develop 2019-03-20 10:21:56 -04:00
David Sparer
01bfdf52ff Merge branch 'release/v1.76' into develop
# Conflicts:
#	CHANGELOG.TXT
#	mRemoteV1/Properties/AssemblyInfo.cs
#	mRemoteV1/Resources/PuTTYNG.exe
2019-03-20 07:50:38 -05:00
David Sparer
bdeb4b4dcc bumped version to v1.76.17 and updated changelog 2019-03-20 07:32:27 -05:00
David Sparer
bdfbb57504 updated puttyng to 0.71
fixes #1362
2019-03-20 07:29:13 -05:00
David Sparer
c0eebdf74b Merge branch 'mysql' of https://github.com/mjbnz/mRemoteNG into mjbnz-mysql
# Conflicts:
#	mRemoteV1/Config/Connections/SqlConnectionsSaver.cs
#	mRemoteV1/Properties/Settings.Designer.cs
#	mRemoteV1/Properties/Settings.settings
#	mRemoteV1/Resources/Help/ui_sql_configuration.htm
#	mRemoteV1/app.config
2019-03-20 07:22:56 -05:00
Faryan Rezagholi
5a317c5d3e Added/unified german language resources 2019-03-19 21:12:09 +01:00
David Sparer
af7c14b2f2 implemented a view only mode for RDP 2019-03-19 14:24:11 -05:00
David Sparer
d151524ed9 updated vncsharp dll 2019-03-19 12:42:20 -05:00
David Sparer
175acc86e2 Merge branch 'master' into develop
# Conflicts:
#	CHANGELOG.TXT
#	mRemoteV1/Config/Serializers/ConnectionSerializers/MsSql/DataTableSerializer.cs
#	mRemoteV1/Properties/AssemblyInfo.cs
2019-03-16 11:53:00 -05:00
wwj402
bb07acf45e update chinese simplified language 2019/03/15 2019-03-15 18:53:34 +08:00
David Sparer
38d1c756f3 Merge branch 'release/v1.76' 2019-03-14 18:01:20 -05:00
David Sparer
6c89913bc6 updated changelog 2019-03-14 17:58:53 -05:00
David Sparer
efa72cb697 bumped version to 1.76.16 2019-03-14 17:58:43 -05:00
David Sparer
a31fec5fb9 encrypt correct db field
fixes #1347
2019-03-14 17:35:28 -05:00
David Sparer
2349d2320f use nameof to ensure refactoring is safe 2019-03-13 08:05:55 -05:00
David Sparer
166e5b73fa Merge pull request #1344 from mRemoteNG/help_file_cleanup
Help file cleanup
2019-03-12 07:54:44 -05:00
Faryan Rezagholi
a39b87f9fd reviewed documentation and fixed some layout/grammar mistakes 2019-03-12 10:03:57 +01:00
Faryan Rezagholi
162f945a9e unified design of help pages 2019-03-12 00:07:59 +01:00
Faryan Rezagholi
5be5f54351 improved line-spacing on headings for better readability 2019-03-11 23:09:27 +01:00
Faryan Rezagholi
dfe9f5b05c removed intruduction.htm and included information in index.html 2019-03-11 23:00:19 +01:00
Faryan Rezagholi
4c1e28fe39 added class to indent text parts 2019-03-11 22:44:05 +01:00
Faryan Rezagholi
bf67168c7a updated document title to show breadcrumbs 2019-03-11 21:28:37 +01:00
Faryan Rezagholi
b30ed702d3 underline hyperlinks 2019-03-11 20:27:16 +01:00
Faryan Rezagholi
9c33caf74e beautified html code and made it xhtml conform 2019-03-11 20:19:03 +01:00
Faryan Rezagholi
65e1ab616b removed unused, old screenshots 2019-03-11 20:18:26 +01:00
Faryan Rezagholi
13c5dd7b72 removed tags from initial author 2019-03-11 19:26:06 +01:00
Faryan Rezagholi
b37dc9900c Added option to disable username trimming #907 2019-03-11 00:40:00 +01:00
Faryan Rezagholi
b27cd0c914 added missing properties when deserializing .rdp file 2019-03-10 21:13:18 +01:00
Faryan Rezagholi
446b40d8a6 some design improvements 2019-03-10 20:16:02 +01:00
Faryan Rezagholi
6ba1d28f13 added logic for clear button 2019-03-10 18:20:15 +01:00
Faryan Rezagholi
01f4af6876 fixed background color of picturebox 2019-03-10 16:51:46 +01:00
Faryan Rezagholi
0ee173475e introduced new user control 2019-03-10 16:31:55 +01:00
mjbnz
ae5abbd039 Merge branch 'develop' into mysql 2019-02-28 09:12:32 +13:00
mjbnz
4f95722915 Merge branch 'develop' into mysql 2019-02-22 19:04:38 +13:00
Mike Beattie
fb7095f2d3 Update SqlUpgrade tests for new Connector class name. 2019-02-17 18:27:00 +13:00
Mike Beattie
c16689d936 Updated Help for SQL Databases.
* Included SQL for creating MySQL tables.

Signed-off-by: Mike Beattie <mike@ethernal.org>
2019-02-17 18:27:00 +13:00
Mike Beattie
9f3bf545bf Implement MySQL support
* Uses MySQL Connector/NET from nuget
* Adds SQL Server type to configuration.
* Hostname for MySQL connections can include port
  - Format:  <hostname>[:<port>]
* Abstracted a bundle of stuff to be generic for both
  MSSQL and MySQL, including a number of variable and method names.
  (Mostly went from "sql..." -> "db..."
* Changed MiscTools.DBDate() string building for MSSQL,
  uses DateTime.ToString() with a format which seemed simpler.
* Unsure about which lines in .csproj are actually required,
  and which are auto-munged by Visual Studio.
* ... This is my first C# (and VS!) work, be gentle!

Signed-off-by: Mike Beattie <mike@ethernal.org>
2019-02-17 18:27:00 +13:00
Mike Beattie
09c8c97b4e Update ConnectionFileVersion to match SQL version
Also add missing columns to SQL script in Help for 2.7

Signed-off-by: Mike Beattie <mike@ethernal.org>
2019-02-17 14:23:32 +13:00
Bennett Blodinger
4cb6c9e2e8 Plaintext to Markdown
Moves CHANGELOG.TXT and CREDITS.TXT to Markdown
2019-02-16 08:54:46 -06:00
440 changed files with 27454 additions and 22630 deletions

View File

@@ -1,58 +1,24 @@
# Welcome!
**Hello, and welcome to the mRemoteNG project!**
We are really glad you are interested in contributing to mRemoteNG!
Open source software is best when shared with others. This also applies to the work that goes into the software. Your ideas and passion are what make this software great!
There are many ways that you can help improve mRemoteNG, even if you don't know how to program:
Open source software is best when shared with others. This also applies to the work that goes into the software. Your ideas and passion are what make this software great.
- add documentation or "how-to" articles on the Wiki
- answer support questions on the forum
- add or improve a translation
- submit a pull request for a bug or feature ticket
### Ways you can contribute
There are many ways that you can help improve mRemoteNG, even if you don't know how to program.
For example, you might:
- add documentation or "how-to" articles on the [Wiki](https://github.com/mRemoteNG/mRemoteNG/wiki)
- answer support questions on the [forum](http://forum.mremoteng.org)
- [add or improve a translation](https://github.com/mRemoteNG/mRemoteNG/wiki/How-to-Help-Translating-mRemoteNG)
- submit a [pull request](https://github.com/mRemoteNG/mRemoteNG/pulls) for a [bug or feature ticket](https://github.com/mRemoteNG/mRemoteNG/issues)
# Submitting GitHub Issues
The GitHub Issue tracker is our preferred channel for bug reports and feature requests.
- For questions or general discussion, please use [our public Gitter chat](https://gitter.im/mRemoteNG/PublicChat) or the [forum](http://forum.mremoteng.org).
- If you find a security vulnerability, do **NOT** open an issue. Email support@mremoteng.org instead.
For questions or general discussion, please use [our public Gitter chat](https://gitter.im/mRemoteNG/PublicChat) or the [forum](http://forum.mremoteng.org).
### Bug reports
A bug is any behavior that does not consistently produce the expected result.
If you find a security vulnerability, do **NOT** open an issue. Email security@mremoteng.org instead.
Guidelines for bug reports:
1. Do not open bug reports for questions.
1. Use the GitHub Issue search to make sure your bug hasn't already been reported.
1. Include as much detailed information as possible. We've included a default template when opening an issue to make this easier.
You'll find all information on our GitHub workflow in our [Wiki](https://github.com/mRemoteNG/mRemoteNG/wiki), or you can use these links:
### Feature requests
Feature requests are great! Take some time to compose a well thought out proposal. It's up to you to convince the project maintainers that your feature is a good idea. To ensure your request receives the consideration that it deserves, include as much detail as possible. For example:
- What is the purpose of the new feature?
- What situation led you to want this feature?
- How does the application perform now and how would the new feature change this?
- If applicable, consider including visual mock-ups to show us what you mean.
- [Branches](https://github.com/mRemoteNG/mRemoteNG/wiki/Branches)
- [Bug Repots](https://github.com/mRemoteNG/mRemoteNG/wiki/Bug-Reports)
- [Feature Requests](https://github.com/mRemoteNG/mRemoteNG/wiki/Feature-Requests)
- [Pull Requests](https://github.com/mRemoteNG/mRemoteNG/wiki/Pull-Requests)
# Pull requests
Good pull requests are a huge help! If you haven't already, please consider reading [GitHub's guide to contributing to open source](https://guides.github.com/activities/contributing-to-open-source/)
Our requests when it comes to pull requests:
- Be clear about what your PR seeks to do.
- Keep your PR focused. It should be clear what code changed to achieve your stated goal.
- Add or update tests when possible. Some of the code base is still very hard to effectively test. If you can, please try to create or update tests that relate to your PR.
- Please talk with one of the project maintainers before starting work on large pull requests. Otherwise, you run the risk of putting a lot of time into a feature or refactor that gets denied.
- If you have access to Static Code Analysis tools (like ReSharper), please don't analyze/fix everything in one giant PR. As great as these tools are, they can sometimes cause unintended problems.
# Code Style
- Please make use of simple types and var where possible
- Prefer "using" over .Dispose()
- Avoid nesting "using"
# Your first contributions
Want to help but don't know where to start? Check out the issues that we've labeled with [`Help Wanted`](https://github.com/mRemoteNG/mRemoteNG/issues?q=is%3Aissue+is%3Aopen+label%3A%22Help+Wanted%22) or [`ready`](https://github.com/mRemoteNG/mRemoteNG/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aopen%20label%3A%22ready%22). These will vary in difficulty, but should be possible for new contributors.
Want to help but don't know C#? Check out the issues that we've labeled with [`Documentation`](https://github.com/mRemoteNG/mRemoteNG/labels/Documentation).
Sorry, we currently do not have any tags for truly beginner-friendly issues :(
Even if you don't know C# you can heck out the issues that we've labeled with [`Documentation`](https://github.com/mRemoteNG/mRemoteNG/labels/Documentation).

View File

@@ -15,15 +15,19 @@
## Screenshots (if appropriate):
## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
<!--- What types of changes does your code introduce? -->
<!--- Uncomment the line(s) that apply(s) to you pull request -->
<!--- - Bug fix (non-breaking change which fixes an issue) -->
<!--- - New feature (non-breaking change which adds functionality) -->
<!--- - Breaking change (fix or feature that would cause existing functionality to change) -->
<!--- - Updated translation -->
## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- Go over all the following points. All of them must apply to your pull request to be merged. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the **CONTRIBUTING** document.
- [ ] My code follows the code style of this project.
- [ ] All Tests within VisualStudio are passing
- [ ] This pull request does not target the master branch.
- [ ] I have updated the changelog file accordingly, if necessary.
- [ ] I have updated the documentation accordingly, if necessary.

2
.gitignore vendored
View File

@@ -285,4 +285,4 @@ InstallerProjects/Installer/Resources/License.rtf
# gh-pages info
runlocal.bat
/_site
/_site

File diff suppressed because it is too large Load Diff

1612
CHANGELOG.md Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,150 +0,0 @@
Contributors
============
Current mRemoteNG dev team:
David Sparer (github.com/sparerd)
Sean Kaim (github.com/kmscode)
Thanks for the awesome new website!
Bennett Blodinger (github.com/benwa)
Joe Cefoli (github.com/jcefoli)
countchappy (github.com/countchappy)
Tony Lambert
Julien Roncaglia (github.com/vbfox)
github.com/peterchenadded
Brandon Wulf (github.com/mrwulf)
Pedro Rodrigues (github.com/pedro2555)
github.com/dekelMP
Faryan Rezagholi (github.com/farosch)
Bruce (github.com/brucetp)
Camilo Alvarez (github.com/jotatsu)
github.com/DamianBis
github.com/pfjason
github.com/sirLoaf
github.com/Fyers
Vladimir Semenov (github.com/sli-pro)
Stephan (github.com/st-schuler)
Aleksey Reytsman (github.com/areytsman)
Cristian Abelleira (github.com/CrAbelleira)
github.com/MitchellBot
Past Contributors
=================
Felix Deimel - mRemote original developer
Riley McArdle - mRemoteNG original developer
Hayato Iriumi (github.com/hiriumi)
Jason Barbier
Wiktor Beryt
Lionel Caignec
Ruben d'Arco
Holger Henke
Tom Hiller
Apisitt Rattana
Andreas Rehm
David Vidmar
github.com/Brandhor
github.com/Kvarkas
Translators
===========
Eugenio "Ryo567" Mart<72>nez
Mathieu Pape
Emanuel Silva
Robert Siwiec
Hayato Iriumi
Sebastien Thieury (github.com/SebThieu)
Riza Emet
Lukas Plachy (github.com/rheingold)
Gyuha Shin
Stefan (github.com/polluks)
github.com/emazv72
Vladimir Semenov (github.com/sli-pro)
Marco Sousa (github.com/marcomsousa)
github.com/wwj402
github.com/Fyers
github.com/pablomh
Included Source Code
====================
Command Line Arguments Parser
Copyright <20> 2002 Richard Lopes
MIT License
http://www.codeproject.com/KB/recipes/command_line.aspx
FilteredPropertyGrid
Copyright <20> 2006 Azuria
http://www.codeproject.com/KB/cs/FilteredPropertyGrid.aspx
InputBox
Copyright <20> 2016 Jan Slama
http://www.csharp-examples.net/inputbox/
IP TextBox
Copyright <20> 2005 mawnkay
http://www.codeproject.com/Articles/11576/IP-TextBox
PortableSettingsProvider
Copyright <20> 2014 crdx
https://github.com/crdx/PortableSettingsProvider
Included Components
===================
ADTree
Copyright <20> 2004 Marc Merritt
Copyright <20> 2008 Felix Deimel
http://www.codeproject.com/KB/selection/ADPickerCtrl.aspx
DockPanel Suite
Copyright <20> 2018 @roken and @lextm (formerly Weifen Luo)
MIT License
https://github.com/dockpanelsuite/dockpanelsuite
GeckoFX
Copyright <20> 2016 Tom Hindle
Mozilla Public License
https://bitbucket.org/geckofx/
log4net
Copyright <20> 2001-2015 The Apache Software Foundation
Apache License Version 2.0
http://logging.apache.org/log4net/
Magic Library
Copyright <20> 2002-2003 Crownwood Consulting, Ltd.
Freely redistributable with attribution
http://www.dotnetmagic.com/magic_download.html
PuTTY
Copyright <20> 1997-2017 Simon Tatham
MIT License
http://www.chiark.greenend.org.uk/~sgtatham/putty/
Silk Icon Set
Copyright <20> 2005-2008 FAMFAMFAM
Creative Commons Attribution 2.5 License
http://www.famfamfam.com/
SSH.NET
Copyright <20> 2016
MIT License
https://github.com/sshnet/SSH.NET
VncSharp
Copyright <20> 2004-2009 David Humphrey
GNU General Public License (GPL) Version 2
https://github.com/humphd/VncSharp
ObjectListView
Copyright <20> 2006-2016 Phillip Piper
GNU General Public License (GPL) Version 3
https://sourceforge.net/projects/objectlistview/

150
CREDITS.md Normal file
View File

@@ -0,0 +1,150 @@
# Contributors
## Current mRemoteNG dev team
David Sparer (http://github.com/sparerd)
Sean Kaim (http://github.com/kmscode)
Faryan Rezagholi (http://github.com/farosch)
Thanks for the awesome new website!
Bennett Blodinger (http://github.com/benwa)
Joe Cefoli (http://github.com/jcefoli)
countchappy (http://github.com/countchappy)
Tony Lambert
Julien Roncaglia (http://github.com/vbfox)
http://github.com/peterchenadded
Brandon Wulf (http://github.com/mrwulf)
Pedro Rodrigues (http://github.com/pedro2555)
http://github.com/dekelMP
Bruce (http://github.com/brucetp)
Camilo Alvarez (http://github.com/jotatsu)
http://github.com/DamianBis
http://github.com/pfjason
http://github.com/sirLoaf
http://github.com/Fyers
Vladimir Semenov (http://github.com/sli-pro)
Stephan (http://github.com/st-schuler)
Aleksey Reytsman (http://github.com/areytsman)
Cristian Abelleira (http://github.com/CrAbelleira)
http://github.com/MitchellBot
Filippo Ferrazini (http://github.com/Filippo125)
## Past Contributors
Felix Deimel - mRemote original developer
Riley McArdle - mRemoteNG original developer
Hayato Iriumi (http://github.com/hiriumi)
Jason Barbier
Wiktor Beryt
Lionel Caignec
Ruben d'Arco
Holger Henke
Tom Hiller
Apisitt Rattana
Andreas Rehm
David Vidmar
http://github.com/Brandhor
Dimitrij (http://github.com/Kvarkas)
## Translators
Eugenio "Ryo567" Martínez
Mathieu Pape
Emanuel Silva
Robert Siwiec
Hayato Iriumi
Sebastien Thieury (http://github.com/SebThieu)
Riza Emet
Lukas Plachy (http://github.com/rheingold)
Gyuha Shin
Stefan (http://github.com/polluks)
http://github.com/emazv72
Vladimir Semenov (http://github.com/sli-pro)
Marco Sousa (http://github.com/marcomsousa)
http://github.com/wwj402
http://github.com/Fyers
http://github.com/pablomh
Damian Szczepanik (http://github.com/damianszczepanik)
Mant1kor (http://github.com/Mant1kor)
## Included Source Code
Command Line Arguments Parser
Copyright © 2002 Richard Lopes
MIT License
http://www.codeproject.com/KB/recipes/command_line.aspx
FilteredPropertyGrid
Copyright © 2006 Azuria
http://www.codeproject.com/KB/cs/FilteredPropertyGrid.aspx
InputBox
Copyright © 2016 Jan Slama
http://www.csharp-examples.net/inputbox/
IP TextBox
Copyright © 2005 mawnkay
http://www.codeproject.com/Articles/11576/IP-TextBox
PortableSettingsProvider
Copyright © 2014 crdx
https://github.com/crdx/PortableSettingsProvider
## Included Components
ADTree
Copyright © 2004 Marc Merritt
Copyright © 2008 Felix Deimel
http://www.codeproject.com/KB/selection/ADPickerCtrl.aspx
DockPanel Suite
Copyright © 2018 @roken and @lextm (formerly Weifen Luo)
MIT License
https://github.com/dockpanelsuite/dockpanelsuite
GeckoFX
Copyright © 2016 Tom Hindle
Mozilla Public License
https://bitbucket.org/geckofx/
log4net
Copyright © 2001-2015 The Apache Software Foundation
Apache License Version 2.0
http://logging.apache.org/log4net/
Magic Library
Copyright © 2002-2003 Crownwood Consulting, Ltd.
Freely redistributable with attribution
http://www.dotnetmagic.com/magic_download.html
PuTTY
Copyright © 1997-2017 Simon Tatham
MIT License
http://www.chiark.greenend.org.uk/~sgtatham/putty/
Silk Icon Set
Copyright © 2005-2008 FAMFAMFAM
Creative Commons Attribution 2.5 License
http://www.famfamfam.com/
SSH.NET
Copyright © 2016
MIT License
https://github.com/sshnet/SSH.NET
VncSharp
Copyright © 2004-2009 David Humphrey
GNU General Public License (GPL) Version 2
https://github.com/humphd/VncSharp [Archived]
ObjectListView
Copyright © 2006-2016 Phillip Piper
GNU General Public License (GPL) Version 3
https://sourceforge.net/projects/objectlistview/
Markdig
Copyright © 2016-2019 Alexandre Mutel
BSD 2-Clause "Simplified"
https://github.com/lunet-io/markdig
ConsoleControl
Copyright © 2015 Dave Kerr
MIT License
https://github.com/dwmkerr/consolecontrol

View File

@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following

View File

@@ -3,16 +3,16 @@
<Fragment>
<ComponentGroup Id="CG.ProjectInfoFiles" Directory="INSTALLDIR">
<Component Id="C.Changelog" Guid="*">
<File Id="ChangelogFile" Name="Changelog.txt" Source="$(var.SolutionDir)CHANGELOG.TXT" KeyPath="yes" />
<File Id="ChangelogFile" Name="Changelog.txt" Source="$(var.SolutionDir)CHANGELOG.md" KeyPath="yes" />
</Component>
<Component Id="C.Credits" Guid="*">
<File Id="CreditsFile" Name="Credits.txt" Source="$(var.SolutionDir)CREDITS.TXT" KeyPath="yes" />
<File Id="CreditsFile" Name="Credits.txt" Source="$(var.SolutionDir)CREDITS.md" KeyPath="yes" />
</Component>
<Component Id="C.License" Guid="*">
<File Id="LicenseFile" Name="License.txt" Source="$(var.SolutionDir)COPYING.TXT" KeyPath="yes" />
</Component>
<Component Id="C.Readme" Guid="*">
<File Id="ReadmeFile" Name="Readme.txt" Source="$(var.SolutionDir)README.TXT" KeyPath="yes" />
<File Id="ReadmeFile" Name="Readme.txt" Source="$(var.SolutionDir)README.md" KeyPath="yes" />
</Component>
<Component Id="C.TileManifest" Guid="*">
<File Id="TileManifest" Name="mRemoteNG.VisualElementsManifest.xml" Source="$(var.SolutionDir)mRemoteV1\bin\Release\mRemoteNG.VisualElementsManifest.xml" KeyPath="yes" />

View File

@@ -44,7 +44,6 @@
<Content Include="Resources\AppIcon.ico" />
<Content Include="Resources\Installer_Header.png" />
<Content Include="Resources\Installer_Side.png" />
<Content Include="Resources\License.rtf" />
</ItemGroup>
<ItemGroup>
<Folder Include="CustomActions" />
@@ -110,18 +109,6 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release Portable|x86' ">
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteV1\bin\Release Portable;HelpFilesHarvestPath=$(SolutionDir)mRemoteV1\Resources\Help</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent>REM Clean the TargetDir
rmdir /S /Q "$(TargetDir)"
echo $(ConfigurationName) &gt; buildenv.tmp
REM Harvest bin directory of the mRemoteV1 project
"$(WIX)bin\heat.exe" dir "$(SolutionDir)mRemoteV1\bin\$(Configuration)" -ag -nologo -dr INSTALLDIR -var var.HarvestPath -srd -cg MandatoryComponents -template fragment -out "$(ProjectDir)Fragments\FilesFragment.wxs" -t "$(ProjectDir)Filters\Harvest_Filter.xslt"
REM Convert the license file "COPYING.TXT" to "License.rtf" to be shown in the installer GUI
"$(ProjectDir)Resources\Pandoc\pandoc.exe" -s -t rtf -o "$(ProjectDir)\Resources\License.rtf" "$(SolutionDir)COPYING.TXT"</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>:: When passing paths to powershell scripts, check if the path ends with a backslash "\"
:: If it does, then the backslash may be interpreted as an escape character. Add another backslash to cancel the first one.
@@ -134,6 +121,18 @@ set /p buildenv=&lt;buildenv.tmp
:: IF "%25APPVEYOR_BUILD_FOLDER"=="" ( set cert_pwd= )
:: Call the post build powershell script
powershell.exe -ExecutionPolicy Bypass -File "$(SolutionDir)Tools\postbuild_installer.ps1" -SolutionDir "$(SolutionDir)\" -TargetDir "%25cd%25" -TargetFileName "mRemoteNG.exe" -ConfigurationName "%25buildenv%25" -CertificatePath "$(CertPath)" -CertificatePassword "%25cert_pwd%25" -ExcludeFromSigning "PuTTYNG.exe"</PostBuildEvent>
powershell.exe -ExecutionPolicy Bypass -File "$(SolutionDir)Tools\postbuild_installer.ps1" -SolutionDir "$(SolutionDir)\" -TargetDir "%25cd%25" -TargetFileName "mRemoteNG.exe" -ConfigurationName "%25buildenv%25" -CertificatePath "$(CertPath)" -CertificatePassword "$(CertPassword)" -ExcludeFromSigning "PuTTYNG.exe"</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent>REM Clean the TargetDir
rmdir /S /Q "$(TargetDir)"
echo $(ConfigurationName) &gt; buildenv.tmp
REM Harvest bin directory of the mRemoteV1 project
"$(WIX)bin\heat.exe" dir "$(SolutionDir)mRemoteV1\bin\$(Configuration)" -ag -nologo -dr INSTALLDIR -var var.HarvestPath -srd -scom -sreg -cg MandatoryComponents -template fragment -out "$(ProjectDir)Fragments\FilesFragment.wxs" -t "$(ProjectDir)Filters\Harvest_Filter.xslt"
REM Convert the license file "COPYING.TXT" to "License.rtf" to be shown in the installer GUI
"$(ProjectDir)Resources\Pandoc\pandoc.exe" -s -t rtf -o "$(ProjectDir)\Resources\License.rtf" "$(SolutionDir)COPYING.TXT"</PreBuildEvent>
</PropertyGroup>
</Project>

View File

@@ -32,8 +32,6 @@
<InstallUISequence>
<Custom Action="CheckIfRdpDtlsUpdateInstalled" After="AppSearch">(NOT Installed) AND (VersionNT = 601 OR VersionNT64 = 601)</Custom>
<Custom Action="CheckIfMinimumRdpInstalled" After="CheckIfRdpDtlsUpdateInstalled">(NOT Installed) AND (VersionNT = 601 OR VersionNT64 = 601)</Custom>
<LaunchConditions After="SetWIX_IS_NETFRAMEWORK_40_OR_LATER_INSTALLED" />
<Custom Action="CheckIfLegacyVersionInstalled" After="LaunchConditions" />
<Custom Action="UninstallLegacyVersion" After="CheckIfLegacyVersionInstalled">(NOT Installed) AND (LEGACYVERSIONINSTALLED = 1)</Custom>

View File

@@ -2,7 +2,7 @@ node('windows') {
def jobDir = pwd()
def solutionFilePath = "\"${jobDir}\\mRemoteV1.sln\""
def msBuild = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\MSBuild\\15.0\\Bin\\msbuild.exe"
def nunitConsolePath = "${jobDir}\\packages\\NUnit.ConsoleRunner.3.7.0\\tools\\nunit3-console.exe"
def nunitConsolePath = "${jobDir}\\packages\\NUnit.ConsoleRunner.3.10.0\\tools\\nunit3-console.exe"
def openCoverPath = "${jobDir}\\packages\\OpenCover.4.6.519\\tools\\OpenCover.Console.exe"
def testResultFilePrefix = "TestResult"
def testResultFileNormal = "${testResultFilePrefix}_UnitTests_normal.xml"

View File

@@ -7,12 +7,13 @@
[![Github Releases](https://img.shields.io/github/downloads/mRemoteNG/mRemoteNG/total.svg?style=flat-square)](https://github.com/mRemoteNG/mRemoteNG/releases/)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/529/badge)](https://bestpractices.coreinfrastructure.org/projects/529)
[![Documentation Status](https://readthedocs.org/projects/mremoteng/badge/?version=latest)](https://mremoteng.readthedocs.io/en/latest/?badge=latest)
| Update Channel | Build Status | Downloads |
| ---------------|--------------|-----------|
| Stable | [![Build status](https://ci.appveyor.com/api/projects/status/k0sdbxmq90fgdmj6/branch/master?svg=true)](https://ci.appveyor.com/project/mremoteng/mremoteng/branch/master) | [![Github Releases (by Release)](https://img.shields.io/github/downloads/mRemoteNG/mRemoteNG/v1.76.15/total.svg)](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.76.15) |
| Beta | | [![Github Releases (by Release)](https://img.shields.io/github/downloads/mRemoteNG/mRemoteNG/v1.76.15/total.svg)](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.76.15) |
| Development | [![Build status](https://ci.appveyor.com/api/projects/status/k0sdbxmq90fgdmj6/branch/develop?svg=true)](https://ci.appveyor.com/project/mremoteng/mremoteng/branch/develop) | [![Github Releases (by Release)](https://img.shields.io/github/downloads/mRemoteNG/mRemoteNG/v1.76.15/total.svg)](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.76.15) |
| Development | [![Build status](https://ci.appveyor.com/api/projects/status/k0sdbxmq90fgdmj6/branch/develop?svg=true)](https://ci.appveyor.com/project/mremoteng/mremoteng/branch/develop) | [![Github Releases (by Release)](https://img.shields.io/github/downloads/mRemoteNG/mRemoteNG/v1.77.1/total.svg)](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.77.1) |
mRemoteNG is the next generation of mRemote, a full-featured, multi-tab remote connections manager.
@@ -37,23 +38,20 @@ For a detailed feature list and general usage support, refer to the [User Manual
## Installation
Before installing make sure you have all the required [prerequisites](https://github.com/mRemoteNG/mRemoteNG/wiki/Prerequisites).
mRemoteNG is supported on Windows 7 or later. Before installing make sure you fullfill all the [minimum requirements](https://mremoteng.readthedocs.io/en/latest/installation/minimum_requirements.html).
mRemoteNG is available as a redistributable msi package, and can be downloaded from the following locations:
* [GitHub](https://github.com/mRemoteNG/mRemoteNG/releases)
* [Project Website](https://mremoteng.org/download)
mRemoteNG is supported on Windows 7 or later.
Windows 7 and Windows Server 2008 installations must ensure the [listed required updates](https://github.com/mRemoteNG/mRemoteNG/wiki/Prerequisites#full-list-of-required-windows-updates-for-windows-7--server-2008-clients) are installed and active.
## Contribute
If you find mRemoteNG useful and would like to contribute, it would be greatly appreciated. When you contribute, you make it possible for the team to cover the costs of producing mRemoteNG.
### Submit Code
Check out the [Wiki page](https://github.com/mRemoteNG/mRemoteNG/wiki/Development) on how to configure your development environment and submit a pull request.
Check out the [Wiki page](https://github.com/mRemoteNG/mRemoteNG/wiki) on how to configure your development environment and submit a pull request.
### Translate
Check out the [Wiki page](https://github.com/mRemoteNG/mRemoteNG/wiki/How%20to%20Help%20Translating%20mRemoteNG) on how to help make mRemoteNG a polyglot
Check out the [Wiki page](https://github.com/mRemoteNG/mRemoteNG/wiki) on how to help make mRemoteNG a polyglot
[![Developed with ReSharper](https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/develop/.github/icon_ReSharper.png)](https://www.jetbrains.com/resharper/)

View File

@@ -1,25 +0,0 @@
mRemoteNG is the next generation of mRemote, a full-featured, multi-tab remote connections manager.
It allows you to store all your remote connections in a simple yet powerful interface.
Currently these protocols are supported:
* RDP (Remote Desktop)
* VNC (Virtual Network Computing)
* ICA (Independent Computing Architecture)
* SSH (Secure Shell)
* Telnet (TELecommunication NETwork)
* HTTP/S (Hypertext Transfer Protocol)
* Rlogin (Rlogin)
* RAW
mRemoteNG can be installed on Windows 7 or later.
Windows 7 systems require RDP version 8:
https://support.microsoft.com/en-us/kb/2592687
OR
https://support.microsoft.com/en-us/kb/2923545
Windows 8+ support RDP version 8+ out of the box.
RDP versions are backwards compatible, so an mRemoteNG client running on Windows 10 can connection successfully to a Windows 2003 host (for example).

View File

@@ -12,8 +12,6 @@ Write-Output "===== Beginning $($PSCmdlet.MyInvocation.MyCommand) ====="
Write-Output "Copying TILES folder to output"
$sourceFiles = [io.path]::combine($SolutionDir , 'mRemoteV1\Resources\Tiles' )
$DestinationDir = $TargetDir
robocopy $sourceFiles $DestinationDir *.*
robocopy $sourceFiles $TargetDir *.*
Write-Output ""

View File

@@ -30,7 +30,7 @@ function New-MsiUpdateFileContent {
$fileContents = `
"Version: $version
dURL: https://github.com/mRemoteNG/mRemoteNG/releases/download/$TagName/$($MsiFile.Name)
clURL: https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/$TagName/CHANGELOG.TXT
clURL: https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/$TagName/CHANGELOG.md
CertificateThumbprint: $certThumbprint
Checksum: $hash"
Write-Output $fileContents

View File

@@ -42,7 +42,7 @@ Format-Table -AutoSize -Wrap -InputObject @{
& "$PSScriptRoot\copy_puttyng.ps1" -SolutionDir $SolutionDir -TargetDir $TargetDir
& "$PSScriptRoot\copy_themes.ps1" -SolutionDir $SolutionDir -TargetDir $TargetDir
& "$PSScriptRoot\copy_tiles.ps1" -SolutionDir $SolutionDir -TargetDir $TargetDir
& "$PSScriptRoot\move_help_files.ps1" -TargetDir $TargetDir
& "$PSScriptRoot\sphinx_docs.ps1" -SolutionDir $SolutionDir -TargetDir $TargetDir
& "$PSScriptRoot\set_LargeAddressAware.ps1" -TargetDir $TargetDir -TargetFileName $TargetFileName
& "$PSScriptRoot\verify_LargeAddressAware.ps1" -TargetDir $TargetDir -TargetFileName $TargetFileName
& "$PSScriptRoot\tidy_files_for_release.ps1" -TargetDir $TargetDir -ConfigurationName $ConfigurationName

View File

@@ -1,23 +1,23 @@
param (
[string]
param (
[string]
[Parameter(Mandatory=$true)]
$SolutionDir,
[string]
[Parameter(Mandatory=$true)]
$TargetDir
)
Write-Output "===== Beginning $($PSCmdlet.MyInvocation.MyCommand) ====="
Write-Output "Building HTML-Documentation with Sphinx"
$path_HelpFilesDir = Join-Path -Path $TargetDir -ChildPath "Help"
Write-Output "Moving Help files to correct directory"
$path_SphinxSourceDir = Join-Path -Path $SolutionDir -ChildPath "mremoteV1\Documentation"
# Remove stale Help files, if they exist
if (Test-Path -Path $path_HelpFilesDir) {
Remove-Item -Path $path_HelpFilesDir -Recurse -Force
}
# Move Help files
Move-Item -Path (Join-Path -Path $TargetDir -ChildPath "Resources\Help") -Destination $path_HelpFilesDir -Force
Start-Sleep -Seconds 2
Remove-Item -Path (Join-Path -Path $TargetDir -ChildPath "Resources") -Recurse -Force
sphinx-build $path_SphinxSourceDir $path_HelpFilesDir
Write-Output ""

View File

@@ -13,7 +13,12 @@ Write-Output "===== Beginning $($PSCmdlet.MyInvocation.MyCommand) ====="
# Remove unnecessary files from Release versions
if ($ConfigurationName -match "Release") {
Write-Output "Removing unnecessary files from Release versions"
Remove-Item -Path (Join-Path -Path $TargetDir -ChildPath "app.publish") -Recurse -Force
$test = Join-Path -Path $TargetDir -ChildPath "app.publish"
if (Test-Path $test -PathType Container) {
Remove-Item -Path (Join-Path -Path $TargetDir -ChildPath "app.publish") -Recurse -Force
}
$filesToDelete = Get-ChildItem -Path $TargetDir -Recurse -Include @(
"*.publish",
"*.xml",

View File

@@ -1,46 +0,0 @@
version: 1.76.{build}
pull_requests:
do_not_increment_build_number: true
skip_tags: true
skip_branch_with_pr: true
image: Visual Studio 2017
configuration:
- Release
- Release Portable
- Release Installer
platform: x86
shallow_clone: true
clone_depth: 1
install:
- ps: >-
date
mRemoteV1\Resources\CitrixReceiver.exe ENABLE_SSON="No" /silent /noreboot /EnableCEIP=false /AutoUpdateCheck=disabled /EnableTracing=false | out-null
date
before_build:
- cmd: >-
echo %TIME%
nuget restore
echo %TIME%
build:
project: mRemoteV1.sln
parallel: true
verbosity: normal
after_build:
- ps: "if([string]::IsNullOrEmpty($Env:APPVEYOR_BUILD_FOLDER)) {\n Write-Output \"NOT running via Appveyor - Exiting\"\n Exit\n}\n\n$appvDir = $Env:APPVEYOR_BUILD_FOLDER\n\nWrite-Output \"Appveyor Build Dir: '$($appvDir)'\"\n$ConfigurationName = $Env:CONFIGURATION.Trim()\nWrite-Output \"Config Name (tirmmed): '$($ConfigurationName)'\"\n\n\n$SIGCHECK=\"Tools\\exes\\sigcheck.exe\"\n$SEVENZIP=\"Tools\\7zip\\7za.exe\"\n\nif ($ConfigurationName -eq \"Release Portable\") {\n Write-Output \"Packaging Release Portable ZIP\"\n \n $version = & $SIGCHECK /accepteula -q -n \"mRemoteV1\\bin\\$($ConfigurationName)\\mRemoteNG.exe\"\n\n Write-Output \"Version is $($version)\"\n\n $PortableZip=\"Release\\mRemoteNG-Portable-$($version).zip\"\n\n Remove-Item -Recurse \"mRemoteV1\\bin\\package\" -ErrorAction SilentlyContinue | Out-Null\n New-Item \"mRemoteV1\\bin\\package\" -ItemType \"directory\" | Out-Null\n \n Copy-Item \"mRemoteV1\\Resources\\PuTTYNG.exe\" -Destination \"mRemoteV1\\bin\\package\"\n\n Copy-Item \"mRemoteV1\\bin\\$ConfigurationName\\*\" -Destination \"mRemoteV1\\bin\\package\" -Recurse -Force -Exclude *.pdb\n Copy-Item \"*.txt\" -Destination \"mRemoteV1\\bin\\package\"\n\n Write-Output \"Creating portable ZIP file $($PortableZip)\"\n Remove-Item -Force $PortableZip -ErrorAction SilentlyContinue\n & $SEVENZIP a -bt -bd -bb1 -mx=9 -tzip -y -r $PortableZip \".\\mRemoteV1\\bin\\package\\*.*\"\n}\nelse {\n Write-Output \"We will not zip anything - this isnt a portable release build.\"\n}\n\nWrite-Output \"\"\nWrite-Output \"\"\n\nif ($ConfigurationName -match \"Release\" -And $ConfigurationName -ne \"Release Installer\") {\n Write-Output \"Packaging debug symbols\"\n \n $version = & $SIGCHECK /accepteula -q -n \"mRemoteV1\\bin\\$($ConfigurationName)\\mRemoteNG.exe\"\n\n Write-Output \"Version is $($version)\"\n\n if ($ConfigurationName -match \"Portable\") {\n $zipFilePrefix = \"mRemoteNG-Portable-symbols\"\n } else {\n $zipFilePrefix = \"mRemoteNG-symbols\"\n }\n\n $outputZipPath=\"Release\\$zipFilePrefix-$($version).zip\"\n\n Write-Output \"Creating debug symbols ZIP file $($outputZipPath)\"\n Remove-Item -Force $outputZipPath -ErrorAction SilentlyContinue\n $SymPath = (Join-Path -Path mRemoteV1\\bin\\$($ConfigurationName) -ChildPath \"*.pdb\")\n if(Test-Path \"$SymPath\") {\n & $SEVENZIP a -bt -bd -bb1 -mx=9 -tzip -y -r $outputZipPath \"$SymPath\"\n } else {\n Write-Output \"No Debugging Symbols Found...\"\n }\n \n}\nelse {\n Write-Output \"We will not package debug symbols for this configuration $($ConfigurationName)\"\n}\n\nWrite-Output \"\""
test:
assemblies:
only:
- mRemoteNGTests\bin\$(configuration)\mRemoteNGTests.dll
artifacts:
- path: Release\*.msi
name: mRemoteNG-installer.msi
- path: Release\mRemoteNG-Portable-1.*.zip
name: mRemoteNG-portable.zip
- path: Release\mRemoteNG-Portable-symbols*.zip
name: mRemoteNG-Portable-symbols.zip
- path: Release\mRemoteNG-symbols*.zip
name: mRemoteNG-symbols.zip

View File

@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow" />
</configSections>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
@@ -13,14 +11,30 @@
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="BouncyCastle.Crypto" publicKeyToken="0e99375e54769942" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.8.5.0" newVersion="1.8.5.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Google.Protobuf" publicKeyToken="a7d26565bac4d604" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.9.2.0" newVersion="3.9.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<specFlow>
<!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config -->
<!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config -->
<unitTestProvider name="NUnit" />
</specFlow>
</configuration>
</configuration>

View File

@@ -59,7 +59,7 @@ namespace mRemoteNG.Specs.Features
public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo)
{
testRunner.OnScenarioStart(scenarioInfo);
testRunner.OnScenarioStart();
}
public virtual void ScenarioCleanup()
@@ -73,7 +73,7 @@ namespace mRemoteNG.Specs.Features
[Ignore("Cred Repo not implmented currently.")]
public virtual void LoadCredentialRepository()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Load credential repository", new string[] {
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Load credential repository", "", new string[] {
"credentials"});
#line 7
this.ScenarioSetup(scenarioInfo);
@@ -94,7 +94,7 @@ this.ScenarioSetup(scenarioInfo);
[Ignore("Cred Repo not implmented currently.")]
public virtual void AddCredentialRecord()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add credential record", ((string[])(null)));
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add credential record", "", ((string[])(null)));
#line 13
this.ScenarioSetup(scenarioInfo);
#line 14
@@ -116,7 +116,7 @@ this.ScenarioSetup(scenarioInfo);
[Ignore("Cred Repo not implmented currently.")]
public virtual void UnloadCredentialRepository()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Unload credential repository", ((string[])(null)));
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Unload credential repository", "", ((string[])(null)));
#line 20
this.ScenarioSetup(scenarioInfo);
#line 21

View File

@@ -60,7 +60,7 @@ namespace mRemoteNG.Specs.Features
public virtual void ScenarioSetup(TechTalk.SpecFlow.ScenarioInfo scenarioInfo)
{
testRunner.OnScenarioStart(scenarioInfo);
testRunner.OnScenarioStart();
}
public virtual void ScenarioCleanup()
@@ -74,7 +74,7 @@ namespace mRemoteNG.Specs.Features
[Ignore("Cred Repo not implmented currently.")]
public virtual void AddANewCredentialRepository()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add a new credential repository", new string[] {
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add a new credential repository", "", new string[] {
"credentials"});
#line 7
this.ScenarioSetup(scenarioInfo);
@@ -95,7 +95,7 @@ this.ScenarioSetup(scenarioInfo);
[Ignore("Cred Repo not implmented currently.")]
public virtual void RemoveACredentialRepository()
{
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Remove a credential repository", ((string[])(null)));
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Remove a credential repository", "", ((string[])(null)));
#line 13
this.ScenarioSetup(scenarioInfo);
#line 14

View File

@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following

View File

@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\NUnit.3.11.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" />
<Import Project="..\packages\SpecFlow.NUnit.3.0.225\build\SpecFlow.NUnit.props" Condition="Exists('..\packages\SpecFlow.NUnit.3.0.225\build\SpecFlow.NUnit.props')" />
<Import Project="..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props')" />
<Import Project="..\packages\NUnit.3.12.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -10,13 +12,13 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>mRemoteNG.Specs</RootNamespace>
<AssemblyName>mRemoteNG.Specs</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
@@ -24,8 +26,9 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
@@ -34,22 +37,43 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="BoDi, Version=1.4.1.0, Culture=neutral, PublicKeyToken=ff7cd5ea2744b496, processorArchitecture=MSIL">
<HintPath>..\packages\BoDi.1.4.1\lib\net45\BoDi.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=3.11.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll</HintPath>
<Reference Include="Gherkin, Version=6.0.0.0, Culture=neutral, PublicKeyToken=86496cfa5b4a5851, processorArchitecture=MSIL">
<HintPath>..\packages\Gherkin.6.0.0\lib\net45\Gherkin.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=3.12.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.12.0\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.6.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="TechTalk.SpecFlow, Version=2.2.0.0, Culture=neutral, PublicKeyToken=0778194805d6db41, processorArchitecture=MSIL">
<HintPath>..\packages\SpecFlow.2.2.1\lib\net45\TechTalk.SpecFlow.dll</HintPath>
<Reference Include="TechTalk.SpecFlow, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0778194805d6db41, processorArchitecture=MSIL">
<HintPath>..\packages\SpecFlow.3.0.225\lib\net45\TechTalk.SpecFlow.dll</HintPath>
</Reference>
<Reference Include="TechTalk.SpecFlow.NUnit.SpecFlowPlugin, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0778194805d6db41, processorArchitecture=MSIL">
<HintPath>..\packages\SpecFlow.NUnit.3.0.225\lib\net45\TechTalk.SpecFlow.NUnit.SpecFlowPlugin.dll</HintPath>
</Reference>
<Reference Include="Utf8Json, Version=1.3.7.0, Culture=neutral, PublicKeyToken=8a73d3ba7e392e27, processorArchitecture=MSIL">
<HintPath>..\packages\Utf8Json.1.3.7\lib\net45\Utf8Json.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -96,8 +120,12 @@
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.11.0\build\NUnit.props'))" />
<Error Condition="!Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.12.0\build\NUnit.props'))" />
<Error Condition="!Exists('..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props'))" />
<Error Condition="!Exists('..\packages\SpecFlow.NUnit.3.0.225\build\SpecFlow.NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SpecFlow.NUnit.3.0.225\build\SpecFlow.NUnit.props'))" />
<Error Condition="!Exists('..\packages\SpecFlow.NUnit.3.0.225\build\SpecFlow.NUnit.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SpecFlow.NUnit.3.0.225\build\SpecFlow.NUnit.targets'))" />
</Target>
<Import Project="..\packages\SpecFlow.NUnit.3.0.225\build\SpecFlow.NUnit.targets" Condition="Exists('..\packages\SpecFlow.NUnit.3.0.225\build\SpecFlow.NUnit.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

View File

@@ -1,16 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net46" />
<package id="NUnit" version="3.11.0" targetFramework="net46" />
<package id="NUnit.Console" version="3.9.0" targetFramework="net46" />
<package id="NUnit.ConsoleRunner" version="3.9.0" targetFramework="net46" />
<package id="BoDi" version="1.4.1" targetFramework="net46" />
<package id="Gherkin" version="6.0.0" targetFramework="net46" />
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net46" />
<package id="NUnit" version="3.12.0" targetFramework="net46" />
<package id="NUnit.Console" version="3.10.0" targetFramework="net46" />
<package id="NUnit.ConsoleRunner" version="3.10.0" targetFramework="net46" />
<package id="NUnit.Extension.NUnitProjectLoader" version="3.6.0" targetFramework="net46" />
<package id="NUnit.Extension.NUnitV2Driver" version="3.7.0" targetFramework="net46" />
<package id="NUnit.Extension.NUnitV2ResultWriter" version="3.6.0" targetFramework="net46" />
<package id="NUnit.Extension.TeamCityEventListener" version="1.0.5" targetFramework="net46" />
<package id="NUnit.Extension.TeamCityEventListener" version="1.0.7" targetFramework="net472" />
<package id="NUnit.Extension.VSProjectLoader" version="3.8.0" targetFramework="net46" />
<package id="NUnit.Runners" version="3.9.0" targetFramework="net46" />
<package id="SpecFlow" version="2.2.1" targetFramework="net46" />
<package id="SpecFlow.NUnit" version="2.2.1" targetFramework="net46" />
<package id="SpecFlow.NUnit.Runners" version="2.2.1" targetFramework="net46" />
<package id="NUnit.Runners" version="3.10.0" targetFramework="net46" />
<package id="NUnit3TestAdapter" version="3.15.1" targetFramework="net472" />
<package id="SpecFlow" version="3.0.225" targetFramework="net472" />
<package id="SpecFlow.NUnit" version="3.0.225" targetFramework="net472" />
<package id="SpecFlow.NUnit.Runners" version="3.0.225" targetFramework="net472" />
<package id="System.Reflection.Emit" version="4.6.0" targetFramework="net472" />
<package id="System.Reflection.Emit.Lightweight" version="4.6.0" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.6.0" targetFramework="net472" />
<package id="System.Threading.Tasks.Extensions" version="4.5.3" targetFramework="net472" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net46" requireReinstallation="true" />
<package id="Utf8Json" version="1.3.7" targetFramework="net46" requireReinstallation="true" />
</packages>

View File

@@ -83,7 +83,7 @@ namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Csv
PostExtApp = "SomePostExtApp",
MacAddress = "SomeMacAddress",
UserField = "SomeUserField",
Favorite = true,
VmId = "SomeVmId",
ExtApp = "SomeExtApp",
VNCProxyUsername = "SomeVNCProxyUsername",
VNCProxyPassword = "SomeVNCProxyPassword",
@@ -94,13 +94,16 @@ namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Csv
RDGatewayHostname = "SomeRDGatewayHostname",
Protocol = ProtocolType.ICA,
Port = 999,
Favorite = true,
UseConsoleSession = true,
UseCredSsp = true,
UseVmId = false,
UseEnhancedMode = false,
RenderingEngine = HTTPBase.RenderingEngine.Gecko,
ICAEncryptionStrength = IcaProtocol.EncryptionStrength.Encr40Bit,
RDPAuthenticationLevel = RdpProtocol.AuthenticationLevel.WarnOnFailedAuth,
Colors = RdpProtocol.RDPColors.Colors16Bit,
Resolution = RdpProtocol.RDPResolutions.Res1366x768,
RDPAuthenticationLevel = AuthenticationLevel.WarnOnFailedAuth,
Colors = RDPColors.Colors16Bit,
Resolution = RDPResolutions.Res1366x768,
AutomaticResize = true,
DisplayWallpaper = true,
DisplayThemes = true,
@@ -111,7 +114,8 @@ namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Csv
RedirectPorts = true,
RedirectPrinters = true,
RedirectSmartCards = true,
RedirectSound = RdpProtocol.RDPSounds.LeaveAtRemoteComputer,
RedirectSound = RDPSounds.LeaveAtRemoteComputer,
RedirectAudioCapture = true,
RedirectKeys = true,
VNCCompression = ProtocolVNC.Compression.Comp4,
VNCEncoding = ProtocolVNC.Encoding.EncRRE,
@@ -121,8 +125,8 @@ namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Csv
VNCColors = ProtocolVNC.Colors.Col8Bit,
VNCSmartSizeMode = ProtocolVNC.SmartSizeMode.SmartSAspect,
VNCViewOnly = true,
RDGatewayUsageMethod = RdpProtocol.RDGatewayUsageMethod.Detect,
RDGatewayUseConnectionCredentials = RdpProtocol.RDGatewayUseConnectionCredentials.SmartCard
RDGatewayUsageMethod = RDGatewayUsageMethod.Detect,
RDGatewayUseConnectionCredentials = RDGatewayUseConnectionCredentials.SmartCard
};
}
@@ -161,25 +165,14 @@ namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Csv
public static IEnumerable InheritanceTestCases()
{
var ignoreProperties = new[]
{
nameof(ConnectionInfoInheritance.EverythingInherited),
nameof(ConnectionInfoInheritance.Parent)
};
var properties = typeof(ConnectionInfoInheritance)
.GetProperties()
.Where(property => !ignoreProperties.Contains(property.Name));
var testCases = new List<TestCaseData>();
var testInheritance = GetTestConnectionWithAllInherited().Inheritance;
var testInheritance = GetTestConnectionWithAllInherited().Inheritance;
var properties = testInheritance.GetProperties();
foreach (var property in properties)
{
testCases.Add(
new TestCaseData(property.Name)
.Returns(property.GetValue(testInheritance)));
}
return testCases;
return properties
.Select(property =>
new TestCaseData(property.Name)
.Returns(property.GetValue(testInheritance)))
.ToList();
}
}
}

View File

@@ -1,6 +1,5 @@
using System;
using System.Linq;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Config.Serializers.Csv;
using mRemoteNG.Connection;
using mRemoteNG.Container;

View File

@@ -6,7 +6,6 @@ using mRemoteNG.Security;
using mRemoteNG.Security.SymmetricEncryption;
using mRemoteNG.Tree;
using mRemoteNGTests.TestHelpers;
using NSubstitute;
using NUnit.Framework;
namespace mRemoteNGTests.Config.Serializers

View File

@@ -1,15 +1,11 @@
using System.Linq;
using System.Security;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Config.Serializers.MsSql;
using mRemoteNG.Connection;
using mRemoteNG.Container;
using mRemoteNG.Security;
using mRemoteNG.Security.SymmetricEncryption;
using mRemoteNG.Tree;
using mRemoteNG.Tree.Root;
using mRemoteNGTests.TestHelpers;
using NSubstitute;
using NUnit.Framework;
namespace mRemoteNGTests.Config.Serializers

View File

@@ -19,9 +19,9 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers
private const string ExpectedGatewayHostname = "gatewayhostname.domain.com";
private const string ExpectedLoadBalanceInfo = "tsv://MS Terminal Services Plugin.1.RDS-NAME";
private const int ExpectedPort = 9933;
private const RdpProtocol.RDPColors ExpectedColors = RdpProtocol.RDPColors.Colors24Bit;
private const RDPColors ExpectedColors = RDPColors.Colors24Bit;
private const bool ExpectedBitmapCaching = false;
private const RdpProtocol.RDPResolutions ExpectedResolutionMode = RdpProtocol.RDPResolutions.FitToWindow;
private const RDPResolutions ExpectedResolutionMode = RDPResolutions.FitToWindow;
private const bool ExpectedWallpaperDisplay = true;
private const bool ExpectedThemesDisplay = true;
private const bool ExpectedFontSmoothing = true;
@@ -30,7 +30,7 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers
private const bool ExpectedDriveRedirection = true;
private const bool ExpectedPortRedirection = true;
private const bool ExpectedPrinterRedirection = true;
private const RdpProtocol.RDPSounds ExpectedSoundRedirection = RdpProtocol.RDPSounds.BringToThisComputer;
private const RDPSounds ExpectedSoundRedirection = RDPSounds.BringToThisComputer;
[OneTimeSetUp]

View File

@@ -24,20 +24,20 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers
private const string ExpectedPassword = "passwordHere!";
private const bool ExpectedUseConsoleSession = true;
private const int ExpectedPort = 9933;
private const RdpProtocol.RDGatewayUsageMethod ExpectedGatewayUsageMethod = RdpProtocol.RDGatewayUsageMethod.Always;
private const RDGatewayUsageMethod ExpectedGatewayUsageMethod = RDGatewayUsageMethod.Always;
private const string ExpectedGatewayHostname = "gatewayserverhost.innerdomain.net";
private const string ExpectedGatewayUsername = "gatewayusername";
private const string ExpectedGatewayDomain = "innerdomain";
private const string ExpectedGatewayPassword = "gatewayPassword123";
private const RdpProtocol.RDPResolutions ExpectedRdpResolution = RdpProtocol.RDPResolutions.FitToWindow;
private const RdpProtocol.RDPColors ExpectedRdpColorDepth = RdpProtocol.RDPColors.Colors24Bit;
private const RdpProtocol.RDPSounds ExpectedAudioRedirection = RdpProtocol.RDPSounds.DoNotPlay;
private const RDPResolutions ExpectedRdpResolution = RDPResolutions.FitToWindow;
private const RDPColors ExpectedRdpColorDepth = RDPColors.Colors24Bit;
private const RDPSounds ExpectedAudioRedirection = RDPSounds.DoNotPlay;
private const bool ExpectedKeyRedirection = true;
private const bool ExpectedSmartcardRedirection = true;
private const bool ExpectedDriveRedirection = true;
private const bool ExpectedPortRedirection = true;
private const bool ExpectedPrinterRedirection = true;
private const RdpProtocol.AuthenticationLevel ExpectedAuthLevel = RdpProtocol.AuthenticationLevel.WarnOnFailedAuth;
private const AuthenticationLevel ExpectedAuthLevel = AuthenticationLevel.WarnOnFailedAuth;
[OneTimeSetUp]
@@ -91,7 +91,7 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers
[TestCaseSource(nameof(NullPropertyValues))]
public void PropertiesWithoutValuesAreIgnored(Func<ConnectionInfo, object> propSelector)
{
var connectionTreeModel = _deserializer.Deserialize(Resources.test_rdcman_v2_7_schema3_null_values);
var connectionTreeModel = _deserializer.Deserialize(Resources.test_rdcman_v2_7_schema3_empty_values);
var importedConnection = connectionTreeModel
.GetRecursiveChildList()
@@ -103,7 +103,22 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers
Assert.That(propSelector(importedConnection), Is.EqualTo(propSelector(new ConnectionInfo())));
}
[Test]
[TestCaseSource(nameof(NullPropertyValues))]
public void NonExistantPropertiesAreIgnored(Func<ConnectionInfo, object> propSelector)
{
var connectionTreeModel = _deserializer.Deserialize(Resources.test_rdcman_v2_7_schema3_null_values);
var importedConnection = connectionTreeModel
.GetRecursiveChildList()
.OfType<ContainerInfo>()
.First(node => node.Name == "Group1")
.Children
.First();
Assert.That(propSelector(importedConnection), Is.EqualTo(propSelector(new ConnectionInfo())));
}
[Test]
public void ExceptionThrownOnBadSchemaVersion()
{
var badFileContents = Resources.test_rdcman_v2_2_badschemaversion;

View File

@@ -23,20 +23,20 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers
private const string ExpectedPassword = "passwordHere!";
private const bool ExpectedUseConsoleSession = true;
private const int ExpectedPort = 9933;
private const RdpProtocol.RDGatewayUsageMethod ExpectedGatewayUsageMethod = RdpProtocol.RDGatewayUsageMethod.Always;
private const RDGatewayUsageMethod ExpectedGatewayUsageMethod = RDGatewayUsageMethod.Always;
private const string ExpectedGatewayHostname = "gatewayserverhost.innerdomain.net";
private const string ExpectedGatewayUsername = "gatewayusername";
private const string ExpectedGatewayDomain = "innerdomain";
private const string ExpectedGatewayPassword = "gatewayPassword123";
private const RdpProtocol.RDPResolutions ExpectedRdpResolution = RdpProtocol.RDPResolutions.FitToWindow;
private const RdpProtocol.RDPColors ExpectedRdpColorDepth = RdpProtocol.RDPColors.Colors24Bit;
private const RdpProtocol.RDPSounds ExpectedAudioRedirection = RdpProtocol.RDPSounds.DoNotPlay;
private const RDPResolutions ExpectedRdpResolution = RDPResolutions.FitToWindow;
private const RDPColors ExpectedRdpColorDepth = RDPColors.Colors24Bit;
private const RDPSounds ExpectedAudioRedirection = RDPSounds.DoNotPlay;
private const bool ExpectedKeyRedirection = true;
private const bool ExpectedSmartcardRedirection = true;
private const bool ExpectedDriveRedirection = true;
private const bool ExpectedPortRedirection = true;
private const bool ExpectedPrinterRedirection = true;
private const RdpProtocol.AuthenticationLevel ExpectedAuthLevel = RdpProtocol.AuthenticationLevel.AuthRequired;
private const AuthenticationLevel ExpectedAuthLevel = AuthenticationLevel.AuthRequired;
[OneTimeSetUp]

View File

@@ -0,0 +1,200 @@
using mRemoteNG.Config.Serializers.MiscSerializers;
using mRemoteNG.Connection;
using mRemoteNG.Connection.Protocol;
using mRemoteNG.Connection.Protocol.Http;
using mRemoteNG.Connection.Protocol.RDP;
using mRemoteNG.Connection.Protocol.VNC;
using mRemoteNGTests.Properties;
using NUnit.Framework;
using System.Collections.Generic;
using System.Linq;
namespace mRemoteNGTests.Config.Serializers.MiscSerializers
{
public class RemoteDesktopManagerDeserializerTests
{
private readonly RemoteDesktopManagerDeserializer _sut = new RemoteDesktopManagerDeserializer();
private readonly Dictionary<ProtocolType, string> _rdmExports = new Dictionary<ProtocolType, string>
{
{ProtocolType.RDP, Resources.rdp_rdm_export},
{ProtocolType.SSH2, Resources.ssh_rdm_export},
{ProtocolType.VNC, Resources.vnc_rdm_export},
{ProtocolType.Telnet, Resources.telnet_rdm_export},
{ProtocolType.HTTPS, Resources.website_rdm_export},
};
[TestCaseSource(nameof(RdpPropertiesAndValues))]
public void CorrectlyImportsRdpProperties(string propertyName, object expectedValue)
{
var rootContainer = _sut.Deserialize(_rdmExports[ProtocolType.RDP]);
var node = rootContainer.RootNodes[0].Children.FirstOrDefault(i => i.Protocol == ProtocolType.RDP);
Assert.That(node, Is.Not.Null);
var actualValue = node.GetType().GetProperty(propertyName)?.GetValue(node);
Assert.That(actualValue, Is.EqualTo(expectedValue));
}
[TestCaseSource(nameof(SshPropertiesAndValues))]
public void CorrectlyImportsSshProperties(string propertyName, object expectedValue)
{
var rootContainer = _sut.Deserialize(_rdmExports[ProtocolType.SSH2]);
var node = rootContainer.RootNodes[0].Children.FirstOrDefault(i => i.Protocol == ProtocolType.SSH2);
Assert.That(node, Is.Not.Null);
var actualValue = node.GetType().GetProperty(propertyName)?.GetValue(node);
Assert.That(actualValue, Is.EqualTo(expectedValue));
}
[TestCaseSource(nameof(VncPropertiesAndValues))]
public void CorrectlyImportsVncProperties(string propertyName, object expectedValue)
{
var rootContainer = _sut.Deserialize(_rdmExports[ProtocolType.VNC]);
var node = rootContainer.RootNodes[0].Children.FirstOrDefault(i => i.Protocol == ProtocolType.VNC);
Assert.That(node, Is.Not.Null);
var actualValue = node.GetType().GetProperty(propertyName)?.GetValue(node);
Assert.That(actualValue, Is.EqualTo(expectedValue));
}
[TestCaseSource(nameof(TelnetPropertiesAndValues))]
public void CorrectlyImportsTelnetProperties(string propertyName, object expectedValue)
{
var rootContainer = _sut.Deserialize(_rdmExports[ProtocolType.Telnet]);
var node = rootContainer.RootNodes[0].Children.FirstOrDefault(i => i.Protocol == ProtocolType.Telnet);
Assert.That(node, Is.Not.Null);
var actualValue = node.GetType().GetProperty(propertyName)?.GetValue(node);
Assert.That(actualValue, Is.EqualTo(expectedValue));
}
[TestCaseSource(nameof(WebsitePropertiesAndValues))]
public void CorrectlyImportsWebsiteProperties(string propertyName, object expectedValue)
{
var rootContainer = _sut.Deserialize(_rdmExports[ProtocolType.HTTPS]);
var node = rootContainer.RootNodes[0].Children.FirstOrDefault(i => i.Protocol == ProtocolType.HTTPS);
Assert.That(node, Is.Not.Null);
var actualValue = node.GetType().GetProperty(propertyName)?.GetValue(node);
Assert.That(actualValue, Is.EqualTo(expectedValue));
}
private static IEnumerable<TestCaseData> RdpPropertiesAndValues()
{
return new[]
{
new TestCaseData(nameof(ConnectionInfo.ConstantID), "1f36e6f0-90ca-4607-b6ec-86227738486d"),
new TestCaseData(nameof(ConnectionInfo.Name), "rdp connection"),
new TestCaseData(nameof(ConnectionInfo.Protocol), ProtocolType.RDP),
new TestCaseData(nameof(ConnectionInfo.Hostname), "my.rdp.host.com"),
new TestCaseData(nameof(ConnectionInfo.Description), "This is a general description"),
new TestCaseData(nameof(ConnectionInfo.Username), "user1"),
new TestCaseData(nameof(ConnectionInfo.Domain), "domain1"),
//new TestCaseData(nameof(ConnectionInfo.Password), "password1"),
new TestCaseData(nameof(ConnectionInfo.Resolution), RDPResolutions.FitToWindow),
new TestCaseData(nameof(ConnectionInfo.AutomaticResize), true),
new TestCaseData(nameof(ConnectionInfo.CacheBitmaps), false),
new TestCaseData(nameof(ConnectionInfo.DisplayThemes), false),
new TestCaseData(nameof(ConnectionInfo.DisplayWallpaper), false),
new TestCaseData(nameof(ConnectionInfo.EnableDesktopComposition), true),
new TestCaseData(nameof(ConnectionInfo.EnableFontSmoothing), true),
new TestCaseData(nameof(ConnectionInfo.RedirectSound), RDPSounds.DoNotPlay),
new TestCaseData(nameof(ConnectionInfo.RedirectAudioCapture), true),
new TestCaseData(nameof(ConnectionInfo.RedirectClipboard), false),
new TestCaseData(nameof(ConnectionInfo.RedirectDiskDrives), false),
new TestCaseData(nameof(ConnectionInfo.RedirectPrinters), true),
new TestCaseData(nameof(ConnectionInfo.RedirectPorts), false),
new TestCaseData(nameof(ConnectionInfo.RedirectSmartCards), true),
new TestCaseData(nameof(ConnectionInfo.RDPMinutesToIdleTimeout), 17),
new TestCaseData(nameof(ConnectionInfo.MacAddress), "mac-add-goes-here"),
new TestCaseData(nameof(ConnectionInfo.UseCredSsp), true),
new TestCaseData(nameof(ConnectionInfo.Port), 1234),
new TestCaseData(nameof(ConnectionInfo.RdpVersion), RdpVersion.Rdc7),
new TestCaseData(nameof(ConnectionInfo.RedirectKeys), true),
new TestCaseData(nameof(ConnectionInfo.UseConsoleSession), true),
new TestCaseData(nameof(ConnectionInfo.RDPAuthenticationLevel), AuthenticationLevel.WarnOnFailedAuth),
new TestCaseData(nameof(ConnectionInfo.RDGatewayUsageMethod), RDGatewayUsageMethod.Always),
new TestCaseData(nameof(ConnectionInfo.RDGatewayUseConnectionCredentials), RDGatewayUseConnectionCredentials.Yes),
new TestCaseData(nameof(ConnectionInfo.RDGatewayHostname), "rdhost1"),
new TestCaseData(nameof(ConnectionInfo.RDGatewayUsername), "rduser1"),
new TestCaseData(nameof(ConnectionInfo.RDGatewayDomain), "rddomain1"),
//new TestCaseData(nameof(ConnectionInfo.RDGatewayPassword), "rdpassword1"),
new TestCaseData(nameof(ConnectionInfo.UseEnhancedMode), true),
new TestCaseData(nameof(ConnectionInfo.UseVmId), true),
new TestCaseData(nameof(ConnectionInfo.VmId), "instance-id-here"),
};
}
private static IEnumerable<TestCaseData> SshPropertiesAndValues()
{
return new[]
{
new TestCaseData(nameof(ConnectionInfo.ConstantID), "44ae261f-0094-48a2-93cb-bc5abcfcc394"),
new TestCaseData(nameof(ConnectionInfo.Name), "ssh connection"),
new TestCaseData(nameof(ConnectionInfo.Protocol), ProtocolType.SSH2),
new TestCaseData(nameof(ConnectionInfo.Hostname), "mysshhost"),
new TestCaseData(nameof(ConnectionInfo.Description), "This is a linux host description"),
new TestCaseData(nameof(ConnectionInfo.Username), "linuxuser1"),
//new TestCaseData(nameof(ConnectionInfo.Password), "linuxpassword1"),
new TestCaseData(nameof(ConnectionInfo.MacAddress), "some-mac-here"),
new TestCaseData(nameof(ConnectionInfo.Port), 4321),
};
}
private static IEnumerable<TestCaseData> VncPropertiesAndValues()
{
return new[]
{
new TestCaseData(nameof(ConnectionInfo.ConstantID), "16ff7dd6-2ac3-4e27-96cf-435b5bfe5a00"),
new TestCaseData(nameof(ConnectionInfo.Name), "vnc connection"),
new TestCaseData(nameof(ConnectionInfo.Protocol), ProtocolType.VNC),
new TestCaseData(nameof(ConnectionInfo.Hostname), "vnchost1"),
new TestCaseData(nameof(ConnectionInfo.Port), 9987),
new TestCaseData(nameof(ConnectionInfo.Description), "This is a VNC description"),
new TestCaseData(nameof(ConnectionInfo.Username), "winuser1"),
new TestCaseData(nameof(ConnectionInfo.Domain), "windomain1"),
//new TestCaseData(nameof(ConnectionInfo.Password), "vncpassword1"),
new TestCaseData(nameof(ConnectionInfo.MacAddress), "some-mac-here"),
new TestCaseData(nameof(ConnectionInfo.VNCEncoding), ProtocolVNC.Encoding.EncTight),
new TestCaseData(nameof(ConnectionInfo.VNCAuthMode), ProtocolVNC.AuthMode.AuthWin),
new TestCaseData(nameof(ConnectionInfo.VNCCompression), ProtocolVNC.Compression.Comp4),
new TestCaseData(nameof(ConnectionInfo.VNCViewOnly), true),
new TestCaseData(nameof(ConnectionInfo.VNCProxyIP), "proxyhost"),
new TestCaseData(nameof(ConnectionInfo.VNCProxyPort), 7777),
};
}
private static IEnumerable<TestCaseData> TelnetPropertiesAndValues()
{
return new[]
{
new TestCaseData(nameof(ConnectionInfo.ConstantID), "8d77d3ac-b414-4b51-ac10-60304d63cc6f"),
new TestCaseData(nameof(ConnectionInfo.Name), "telnet connection"),
new TestCaseData(nameof(ConnectionInfo.Protocol), ProtocolType.Telnet),
new TestCaseData(nameof(ConnectionInfo.Hostname), "telnethost1"),
new TestCaseData(nameof(ConnectionInfo.Description), "Telnet description"),
new TestCaseData(nameof(ConnectionInfo.Username), "user1"),
//new TestCaseData(nameof(ConnectionInfo.Password), "password1"),
new TestCaseData(nameof(ConnectionInfo.MacAddress), "some-mac-here"),
new TestCaseData(nameof(ConnectionInfo.Port), 7648),
};
}
private static IEnumerable<TestCaseData> WebsitePropertiesAndValues()
{
return new[]
{
new TestCaseData(nameof(ConnectionInfo.ConstantID), "65092747-6870-42c9-b8bc-35ec9fb5b3fb"),
new TestCaseData(nameof(ConnectionInfo.Name), "website connection"),
new TestCaseData(nameof(ConnectionInfo.Protocol), ProtocolType.HTTPS),
new TestCaseData(nameof(ConnectionInfo.Hostname), "www.google.com"),
new TestCaseData(nameof(ConnectionInfo.Description), "Website description"),
new TestCaseData(nameof(ConnectionInfo.Username), "user1"),
new TestCaseData(nameof(ConnectionInfo.Domain), "domain1"),
//new TestCaseData(nameof(ConnectionInfo.Password), "password1"),
new TestCaseData(nameof(ConnectionInfo.Port), 8080),
new TestCaseData(nameof(ConnectionInfo.RenderingEngine), HTTPBase.RenderingEngine.Gecko),
};
}
}
}

View File

@@ -13,7 +13,7 @@ namespace mRemoteNGTests.Config.Serializers.Versioning
[SetUp]
public void Setup()
{
var sqlConnector = Substitute.For<SqlDatabaseConnector>("", "", "", "");
var sqlConnector = Substitute.For<MSSqlDatabaseConnector>("", "", "", "");
_versionUpgrader = new SqlVersion22To23Upgrader(sqlConnector);
}

View File

@@ -13,7 +13,7 @@ namespace mRemoteNGTests.Config.Serializers.Versioning
[SetUp]
public void Setup()
{
var sqlConnector = Substitute.For<SqlDatabaseConnector>("", "", "", "");
var sqlConnector = Substitute.For<MSSqlDatabaseConnector>("", "", "", "");
_versionUpgrader = new SqlVersion23To24Upgrader(sqlConnector);
}

View File

@@ -13,7 +13,7 @@ namespace mRemoteNGTests.Config.Serializers.Versioning
[SetUp]
public void Setup()
{
var sqlConnector = Substitute.For<SqlDatabaseConnector>("", "", "", "");
var sqlConnector = Substitute.For<MSSqlDatabaseConnector>("", "", "", "");
_versionUpgrader = new SqlVersion24To25Upgrader(sqlConnector);
}

View File

@@ -13,7 +13,7 @@ namespace mRemoteNGTests.Config.Serializers.Versioning
[SetUp]
public void Setup()
{
var sqlConnector = Substitute.For<SqlDatabaseConnector>("", "", "", "");
var sqlConnector = Substitute.For<MSSqlDatabaseConnector>("", "", "", "");
_versionUpgrader = new SqlVersion25To26Upgrader(sqlConnector);
}

View File

@@ -165,7 +165,7 @@ namespace mRemoteNGTests.Connection
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.RDPAuthenticationLevel = RdpProtocol.AuthenticationLevel.AuthRequired;
_testAbstractConnectionInfoData.RDPAuthenticationLevel = AuthenticationLevel.AuthRequired;
Assert.That(wasCalled, Is.True);
}
@@ -201,7 +201,7 @@ namespace mRemoteNGTests.Connection
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.RDGatewayUsageMethod = RdpProtocol.RDGatewayUsageMethod.Always;
_testAbstractConnectionInfoData.RDGatewayUsageMethod = RDGatewayUsageMethod.Always;
Assert.That(wasCalled, Is.True);
}
@@ -219,7 +219,7 @@ namespace mRemoteNGTests.Connection
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.RDGatewayUseConnectionCredentials = RdpProtocol.RDGatewayUseConnectionCredentials.SmartCard;
_testAbstractConnectionInfoData.RDGatewayUseConnectionCredentials = RDGatewayUseConnectionCredentials.SmartCard;
Assert.That(wasCalled, Is.True);
}
@@ -255,7 +255,7 @@ namespace mRemoteNGTests.Connection
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.Resolution = RdpProtocol.RDPResolutions.Res1366x768;
_testAbstractConnectionInfoData.Resolution = RDPResolutions.Res1366x768;
Assert.That(wasCalled, Is.True);
}
@@ -273,7 +273,7 @@ namespace mRemoteNGTests.Connection
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.Colors = RdpProtocol.RDPColors.Colors16Bit;
_testAbstractConnectionInfoData.Colors = RDPColors.Colors16Bit;
Assert.That(wasCalled, Is.True);
}
@@ -372,7 +372,7 @@ namespace mRemoteNGTests.Connection
{
var wasCalled = false;
_testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true;
_testAbstractConnectionInfoData.RedirectSound = RdpProtocol.RDPSounds.DoNotPlay;
_testAbstractConnectionInfoData.RedirectSound = RDPSounds.DoNotPlay;
Assert.That(wasCalled, Is.True);
}

View File

@@ -53,7 +53,8 @@ namespace mRemoteNGTests.Connection
[Test]
public void CloneCorrectlySetsParentOfInheritanceObject()
{
var clonedConnection = _connectionInfo.Clone();
var originalConnection = new ConnectionInfo();
var clonedConnection = originalConnection.Clone();
Assert.That(clonedConnection.Inheritance.Parent, Is.EqualTo(clonedConnection));
}
@@ -135,7 +136,7 @@ namespace mRemoteNGTests.Connection
{
public static IEnumerable<PropertyInfo> GetProperties()
{
return new ConnectionInfoInheritance(new object()).GetProperties();
return new ConnectionInfoInheritance(new ConnectionInfo()).GetProperties();
}
}
}

View File

@@ -50,7 +50,7 @@ namespace mRemoteNGTests.Connection
DefaultConnectionInfo.Instance.SaveTo(saveTarget);
var valueInSource = property.GetValue(DefaultConnectionInfo.Instance).ToString();
var valueInDestination = saveTarget.GetType().GetProperty(property.Name).GetValue(saveTarget).ToString();
var valueInDestination = saveTarget.GetType().GetProperty(property.Name)?.GetValue(saveTarget)?.ToString();
Assert.That(valueInDestination, Is.EqualTo(valueInSource));
}

View File

@@ -11,7 +11,7 @@ namespace mRemoteNGTests.Connection
[TestCaseSource(nameof(GetInheritanceProperties))]
public void LoadingDefaultInheritanceUpdatesAllProperties(PropertyInfo property)
{
var inheritanceSource = new ConnectionInfoInheritance(new object(), true);
var inheritanceSource = new ConnectionInfoInheritance(new ConnectionInfo(), true);
inheritanceSource.TurnOnInheritanceCompletely();
DefaultConnectionInheritance.Instance.TurnOffInheritanceCompletely();
@@ -25,7 +25,7 @@ namespace mRemoteNGTests.Connection
[TestCaseSource(nameof(GetInheritanceProperties))]
public void SavingDefaultInheritanceExportsAllProperties(PropertyInfo property)
{
var saveTarget = new ConnectionInfoInheritance(new object(), true);
var saveTarget = new ConnectionInfoInheritance(new ConnectionInfo(), true);
saveTarget.TurnOffInheritanceCompletely();
DefaultConnectionInheritance.Instance.TurnOnInheritanceCompletely();
@@ -40,7 +40,7 @@ namespace mRemoteNGTests.Connection
public void NewInheritanceInstancesCreatedWithDefaultInheritanceValues()
{
DefaultConnectionInheritance.Instance.Domain = true;
var inheritanceInstance = new ConnectionInfoInheritance(new object());
var inheritanceInstance = new ConnectionInfoInheritance(new ConnectionInfo());
Assert.That(inheritanceInstance.Domain, Is.True);
}
@@ -48,7 +48,7 @@ namespace mRemoteNGTests.Connection
public void NewInheritanceInstancesCreatedWithAllDefaultInheritanceValues(PropertyInfo property)
{
DefaultConnectionInheritance.Instance.TurnOnInheritanceCompletely();
var inheritanceInstance = new ConnectionInfoInheritance(new object());
var inheritanceInstance = new ConnectionInfoInheritance(new ConnectionInfo());
var valueInDestination = property.GetValue(inheritanceInstance);
var valueInSource = property.GetValue(DefaultConnectionInheritance.Instance);
@@ -57,7 +57,7 @@ namespace mRemoteNGTests.Connection
private static IEnumerable<PropertyInfo> GetInheritanceProperties()
{
return new ConnectionInfoInheritance(new object(), true).GetProperties();
return new ConnectionInfoInheritance(new ConnectionInfo(), true).GetProperties();
}
}
}

View File

@@ -1,5 +1,4 @@
using System.Collections.ObjectModel;
using mRemoteNG.App;
using mRemoteNG.App;
using mRemoteNG.Connection;
using mRemoteNG.Connection.Protocol;
using mRemoteNG.Tools;

View File

@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following

View File

@@ -19,7 +19,7 @@ namespace mRemoteNGTests.Properties {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
@@ -194,6 +194,71 @@ namespace mRemoteNGTests.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to &lt;?xml version=&quot;1.0&quot;?&gt;
///&lt;ArrayOfConnection&gt;
/// &lt;Connection&gt;
/// &lt;AuthentificationLevel&gt;WarnMe&lt;/AuthentificationLevel&gt;
/// &lt;AutomaticallyClose&gt;true&lt;/AutomaticallyClose&gt;
/// &lt;AutomaticallyCloseInterval&gt;17&lt;/AutomaticallyCloseInterval&gt;
/// &lt;ConnectionType&gt;RDPConfigured&lt;/ConnectionType&gt;
/// &lt;Console&gt;true&lt;/Console&gt;
/// &lt;Description&gt;This is a general description&lt;/Description&gt;
/// &lt;DesktopComposition&gt;true&lt;/DesktopComposition&gt;
/// &lt;DisableBitmapCache&gt;true&lt;/DisableBitmapCache&gt;
/// &lt;DisableThemes&gt;true&lt;/Disable [rest of string was truncated]&quot;;.
/// </summary>
internal static string rdp_rdm_export {
get {
return ResourceManager.GetString("rdp_rdm_export", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &lt;?xml version=&quot;1.0&quot;?&gt;
///&lt;ArrayOfConnection&gt;
/// &lt;Connection&gt;
/// &lt;ConnectionType&gt;SSHShell&lt;/ConnectionType&gt;
/// &lt;Description&gt;This is a linux host description&lt;/Description&gt;
/// &lt;ID&gt;44ae261f-0094-48a2-93cb-bc5abcfcc394&lt;/ID&gt;
/// &lt;Name&gt;ssh connection&lt;/Name&gt;
/// &lt;OpenEmbedded&gt;true&lt;/OpenEmbedded&gt;
/// &lt;Stamp&gt;ab007011-2836-426f-a8e0-9fef1ff88865&lt;/Stamp&gt;
/// &lt;MetaInformation&gt;
/// &lt;MAC&gt;some-mac-here&lt;/MAC&gt;
/// &lt;PasswordHistory&gt;
/// &lt;PasswordHistory&gt;
/// &lt;LoggedModifiedBy&gt;LEVIATHAN\David&lt;/LoggedMo [rest of string was truncated]&quot;;.
/// </summary>
internal static string ssh_rdm_export {
get {
return ResourceManager.GetString("ssh_rdm_export", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &lt;?xml version=&quot;1.0&quot;?&gt;
///&lt;ArrayOfConnection&gt;
/// &lt;Connection&gt;
/// &lt;ConnectionType&gt;Telnet&lt;/ConnectionType&gt;
/// &lt;Description&gt;Telnet description&lt;/Description&gt;
/// &lt;ID&gt;8d77d3ac-b414-4b51-ac10-60304d63cc6f&lt;/ID&gt;
/// &lt;Name&gt;telnet connection&lt;/Name&gt;
/// &lt;OpenEmbedded&gt;true&lt;/OpenEmbedded&gt;
/// &lt;Stamp&gt;08aaa9ff-3583-4dc0-8622-3a0f4d37a7c4&lt;/Stamp&gt;
/// &lt;MetaInformation&gt;
/// &lt;MAC&gt;some-mac-here&lt;/MAC&gt;
/// &lt;PasswordHistory&gt;
/// &lt;PasswordHistory&gt;
/// &lt;LoggedModifiedBy&gt;LEVIATHAN\David&lt;/LoggedModifiedBy&gt;
/// [rest of string was truncated]&quot;;.
/// </summary>
internal static string telnet_rdm_export {
get {
return ResourceManager.GetString("telnet_rdm_export", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;
///&lt;!-- ****************************************************************--&gt;
@@ -298,6 +363,32 @@ namespace mRemoteNGTests.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
///&lt;RDCMan programVersion=&quot;2.7&quot; schemaVersion=&quot;3&quot;&gt;
/// &lt;file&gt;
/// &lt;credentialsProfiles /&gt;
/// &lt;properties&gt;
/// &lt;expanded&gt;True&lt;/expanded&gt;
/// &lt;name&gt;test_RDCMan_connections&lt;/name&gt;
/// &lt;/properties&gt;
/// &lt;smartGroup&gt;
/// &lt;properties&gt;
/// &lt;expanded&gt;False&lt;/expanded&gt;
/// &lt;name&gt;AllServers&lt;/name&gt;
/// &lt;/properties&gt;
/// &lt;ruleGroup operator=&quot;All&quot;&gt;
/// &lt;rule&gt;
/// &lt;property&gt;DisplayName&lt;/property&gt;
/// &lt;operator&gt;Matches&lt;/operator&gt;
/// [rest of string was truncated]&quot;;.
/// </summary>
internal static string test_rdcman_v2_7_schema3_empty_values {
get {
return ResourceManager.GetString("test_rdcman_v2_7_schema3_empty_values", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
///&lt;RDCMan programVersion=&quot;2.7&quot; schemaVersion=&quot;3&quot;&gt;
@@ -390,5 +481,48 @@ namespace mRemoteNGTests.Properties {
return ResourceManager.GetString("update_portable", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &lt;?xml version=&quot;1.0&quot;?&gt;
///&lt;ArrayOfConnection&gt;
/// &lt;Connection&gt;
/// &lt;ConnectionSubType&gt;UltraVNC&lt;/ConnectionSubType&gt;
/// &lt;ConnectionType&gt;VNC&lt;/ConnectionType&gt;
/// &lt;Description&gt;This is a VNC description&lt;/Description&gt;
/// &lt;ID&gt;16ff7dd6-2ac3-4e27-96cf-435b5bfe5a00&lt;/ID&gt;
/// &lt;Name&gt;vnc connection&lt;/Name&gt;
/// &lt;OpenEmbedded&gt;true&lt;/OpenEmbedded&gt;
/// &lt;Stamp&gt;a44e3b58-2e14-47bf-8a79-0646b1e4ba46&lt;/Stamp&gt;
/// &lt;MetaInformation&gt;
/// &lt;MAC&gt;some-mac-here&lt;/MAC&gt;
/// &lt;PasswordHistory&gt;
/// &lt;PasswordHistory&gt;
/// &lt;L [rest of string was truncated]&quot;;.
/// </summary>
internal static string vnc_rdm_export {
get {
return ResourceManager.GetString("vnc_rdm_export", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &lt;?xml version=&quot;1.0&quot;?&gt;
///&lt;ArrayOfConnection&gt;
/// &lt;Connection&gt;
/// &lt;ConnectionSubType&gt;FireFox&lt;/ConnectionSubType&gt;
/// &lt;ConnectionType&gt;WebBrowser&lt;/ConnectionType&gt;
/// &lt;Description&gt;Website description&lt;/Description&gt;
/// &lt;ID&gt;65092747-6870-42c9-b8bc-35ec9fb5b3fb&lt;/ID&gt;
/// &lt;Name&gt;website connection&lt;/Name&gt;
/// &lt;OpenEmbedded&gt;true&lt;/OpenEmbedded&gt;
/// &lt;Stamp&gt;d04a9abb-4d4c-4ba5-8ef8-1699bd84b734&lt;/Stamp&gt;
/// &lt;WebBrowserApplication&gt;FireFox&lt;/WebBrowserApplication&gt;
/// &lt;WebBrowserUrl&gt;https://www.google.com:8080&lt;/WebBrow [rest of string was truncated]&quot;;.
/// </summary>
internal static string website_rdm_export {
get {
return ResourceManager.GetString("website_rdm_export", resourceCulture);
}
}
}
}

View File

@@ -175,6 +175,9 @@
<data name="test_rdcman_v2_7_schema3" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\test_RDCMan_v2_7_schema3.rdg;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="test_rdcman_v2_7_schema3_empty_values" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\test_rdcman_v2_7_schema3_empty_values.rdg;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
<data name="test_rdcman_v2_7_schema3_null_values" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\test_rdcman_v2_7_schema3_null_values.rdg;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data>
@@ -187,4 +190,19 @@
<data name="update_portable" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\update-portable.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="rdp_rdm_export" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\rdp.rdm;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="ssh_rdm_export" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ssh.rdm;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;iso-8859-1</value>
</data>
<data name="telnet_rdm_export" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\telnet.rdm;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="vnc_rdm_export" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\vnc.rdm;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="website_rdm_export" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\website.rdm;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
</root>

View File

@@ -0,0 +1,65 @@
<?xml version="1.0"?>
<ArrayOfConnection>
<Connection>
<AuthentificationLevel>WarnMe</AuthentificationLevel>
<AutomaticallyClose>true</AutomaticallyClose>
<AutomaticallyCloseInterval>17</AutomaticallyCloseInterval>
<ConnectionType>RDPConfigured</ConnectionType>
<Console>true</Console>
<Description>This is a general description</Description>
<DesktopComposition>true</DesktopComposition>
<DisableBitmapCache>true</DisableBitmapCache>
<DisableThemes>true</DisableThemes>
<DisableWallpaper>true</DisableWallpaper>
<FontSmoothing>true</FontSmoothing>
<ID>1f36e6f0-90ca-4607-b6ec-86227738486d</ID>
<KeyboardHook>OnTheRemoteComputer</KeyboardHook>
<Name>rdp connection</Name>
<OpenEmbedded>true</OpenEmbedded>
<ScreenColor>C256</ScreenColor>
<ScreenSize>CurrentScreenSize</ScreenSize>
<SoundHook>DoNotPlay</SoundHook>
<Stamp>22400949-a0b8-46c1-8f27-49232ac1fb27</Stamp>
<Url>my.rdp.host.com:1234</Url>
<UsesClipboard>false</UsesClipboard>
<UsesHardDrives>false</UsesHardDrives>
<UsesPrinters>true</UsesPrinters>
<UsesSerialPorts>false</UsesSerialPorts>
<UsesSmartDevices>true</UsesSmartDevices>
<MetaInformation>
<MAC>mac-add-goes-here</MAC>
<PasswordHistory>
<PasswordHistory>
<LoggedModifiedBy>LEVIATHAN\David</LoggedModifiedBy>
<ModifiedBy>LEVIATHAN\David</ModifiedBy>
<ModifiedDateTime>2020-01-26T14:40:54</ModifiedDateTime>
<SafePassword>T2/JO7Aps+GMZG0vk5Jo8A==</SafePassword>
</PasswordHistory>
</PasswordHistory>
</MetaInformation>
<RDP>
<AudioCaptureRedirectionMode>true</AudioCaptureRedirectionMode>
<Domain>domain1</Domain>
<EnableCredSSPSupport>True</EnableCredSSPSupport>
<GatewayCredentialsSource>UserPassword</GatewayCredentialsSource>
<GatewayDomain>rddomain1</GatewayDomain>
<GatewayHostname>rdhost1</GatewayHostname>
<GatewayProfileUsageMethod>Explicit</GatewayProfileUsageMethod>
<GatewaySafePassword>kLaEwH4EDrZEaaK21HgqHg==</GatewaySafePassword>
<GatewayUsageMethod>ModeDirect</GatewayUsageMethod>
<GatewayUserName>rduser1</GatewayUserName>
<HyperVInstanceID>instance-id-here</HyperVInstanceID>
<KeepAliveInterval>6</KeepAliveInterval>
<KeyboardLayoutText>Default</KeyboardLayoutText>
<NetworkLevelAuthentication>true</NetworkLevelAuthentication>
<PromptCredentialOnce>true</PromptCredentialOnce>
<RDPType>HyperV</RDPType>
<SafePassword>tW7TUhUf1KUzuzuAdANJvg==</SafePassword>
<ScreenSizingMode>AutoScale</ScreenSizingMode>
<ShadowSessionConsentPrompt>false</ShadowSessionConsentPrompt>
<UseEnhancedSessionMode>true</UseEnhancedSessionMode>
<UserName>user1</UserName>
<Version>RDP70</Version>
</RDP>
</Connection>
</ArrayOfConnection>

View File

@@ -0,0 +1,36 @@
<?xml version="1.0"?>
<ArrayOfConnection>
<Connection>
<ConnectionType>SSHShell</ConnectionType>
<Description>This is a linux host description</Description>
<ID>44ae261f-0094-48a2-93cb-bc5abcfcc394</ID>
<Name>ssh connection</Name>
<OpenEmbedded>true</OpenEmbedded>
<Stamp>ab007011-2836-426f-a8e0-9fef1ff88865</Stamp>
<MetaInformation>
<MAC>some-mac-here</MAC>
<PasswordHistory>
<PasswordHistory>
<LoggedModifiedBy>LEVIATHAN\David</LoggedModifiedBy>
<ModifiedBy>LEVIATHAN\David</ModifiedBy>
<ModifiedDateTime>2020-01-26T20:46:26</ModifiedDateTime>
<SafePassword>rV4oZM9LrfZ6SYHIlwTwvA==</SafePassword>
</PasswordHistory>
<PasswordHistory>
<LoggedModifiedBy>LEVIATHAN\David</LoggedModifiedBy>
<ModifiedBy>LEVIATHAN\David</ModifiedBy>
<ModifiedDateTime>2020-01-26T14:42:38</ModifiedDateTime>
<SafePassword>rV4oZM9LrfbUvSh5Y2lNDw==</SafePassword>
</PasswordHistory>
</PasswordHistory>
</MetaInformation>
<Terminal>
<Host>mysshhost</Host>
<HostPort>4321</HostPort>
<PrivateKeyPromptForPassPhrase>false</PrivateKeyPromptForPassPhrase>
<SafePassword>/et4Enc7v6HUQXJP6chuhA==</SafePassword>
<Username>linuxuser1</Username>
</Terminal>
<TerminalMac />
</Connection>
</ArrayOfConnection>

View File

@@ -0,0 +1,30 @@
<?xml version="1.0"?>
<ArrayOfConnection>
<Connection>
<ConnectionType>Telnet</ConnectionType>
<Description>Telnet description</Description>
<ID>8d77d3ac-b414-4b51-ac10-60304d63cc6f</ID>
<Name>telnet connection</Name>
<OpenEmbedded>true</OpenEmbedded>
<Stamp>08aaa9ff-3583-4dc0-8622-3a0f4d37a7c4</Stamp>
<MetaInformation>
<MAC>some-mac-here</MAC>
<PasswordHistory>
<PasswordHistory>
<LoggedModifiedBy>LEVIATHAN\David</LoggedModifiedBy>
<ModifiedBy>LEVIATHAN\David</ModifiedBy>
<ModifiedDateTime>2020-01-26T21:50:48</ModifiedDateTime>
<SafePassword>T2/JO7Aps+GMZG0vk5Jo8A==</SafePassword>
</PasswordHistory>
</PasswordHistory>
</MetaInformation>
<Terminal>
<Host>telnethost1</Host>
<HostPort>7648</HostPort>
<ProxyMode>Custom</ProxyMode>
<SafePassword>yLHh9AVRl8TilluPKnidMw==</SafePassword>
<Username>user1</Username>
</Terminal>
<TerminalMac />
</Connection>
</ArrayOfConnection>

View File

@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8"?>
<RDCMan programVersion="2.7" schemaVersion="3">
<file>
<credentialsProfiles />
<properties>
<expanded>True</expanded>
<name>test_RDCMan_connections</name>
</properties>
<smartGroup>
<properties>
<expanded>False</expanded>
<name>AllServers</name>
</properties>
<ruleGroup operator="All">
<rule>
<property>DisplayName</property>
<operator>Matches</operator>
<value>server</value>
</rule>
</ruleGroup>
</smartGroup>
<group>
<properties>
<expanded>True</expanded>
<name>Group1</name>
</properties>
<server>
<properties>
<displayName></displayName>
<name></name>
<comment></comment>
</properties>
<logonCredentials inherit="None">
<profileName scope="Local"></profileName>
<userName></userName>
<password></password>
<domain></domain>
</logonCredentials>
<connectionSettings inherit="None">
<connectToConsole></connectToConsole>
<startProgram />
<workingDir />
<port></port>
<loadBalanceInfo />
</connectionSettings>
<gatewaySettings inherit="None">
<enabled></enabled>
<hostName></hostName>
<logonMethod></logonMethod>
<localBypass></localBypass>
<credSharing></credSharing>
<profileName scope="Local"></profileName>
<userName></userName>
<password />
<domain></domain>
</gatewaySettings>
<remoteDesktop inherit="None">
<sameSizeAsClientArea></sameSizeAsClientArea>
<fullScreen></fullScreen>
<colorDepth></colorDepth>
</remoteDesktop>
<localResources inherit="None">
<audioRedirection></audioRedirection>
<audioRedirectionQuality></audioRedirectionQuality>
<audioCaptureRedirection></audioCaptureRedirection>
<keyboardHook></keyboardHook>
<redirectClipboard></redirectClipboard>
<redirectDrives></redirectDrives>
<redirectDrivesList>
<item></item>
<item></item>
<item></item>
<item></item>
<item></item>
</redirectDrivesList>
<redirectPrinters></redirectPrinters>
<redirectPorts></redirectPorts>
<redirectSmartCards></redirectSmartCards>
<redirectPnpDevices></redirectPnpDevices>
</localResources>
<displaySettings inherit="None">
<thumbnailScale></thumbnailScale>
<smartSizeDockedWindows></smartSizeDockedWindows>
<smartSizeUndockedWindows></smartSizeUndockedWindows>
</displaySettings>
<securitySettings inherit="None">
<authentication></authentication>
</securitySettings>
</server>
</group>
</file>
<connected />
<favorites />
<recentlyUsed />
</RDCMan>

View File

@@ -26,65 +26,20 @@
</properties>
<server>
<properties>
<displayName></displayName>
<name></name>
<comment></comment>
</properties>
<logonCredentials inherit="None">
<profileName scope="Local"></profileName>
<userName></userName>
<password></password>
<domain></domain>
</logonCredentials>
<connectionSettings inherit="None">
<connectToConsole></connectToConsole>
<startProgram />
<workingDir />
<port></port>
<loadBalanceInfo />
</connectionSettings>
<gatewaySettings inherit="None">
<enabled></enabled>
<hostName></hostName>
<logonMethod></logonMethod>
<localBypass></localBypass>
<credSharing></credSharing>
<profileName scope="Local"></profileName>
<userName></userName>
<password />
<domain></domain>
</gatewaySettings>
<remoteDesktop inherit="None">
<sameSizeAsClientArea></sameSizeAsClientArea>
<fullScreen></fullScreen>
<colorDepth></colorDepth>
</remoteDesktop>
<localResources inherit="None">
<audioRedirection></audioRedirection>
<audioRedirectionQuality></audioRedirectionQuality>
<audioCaptureRedirection></audioCaptureRedirection>
<keyboardHook></keyboardHook>
<redirectClipboard></redirectClipboard>
<redirectDrives></redirectDrives>
<redirectDrivesList>
<item></item>
<item></item>
<item></item>
<item></item>
<item></item>
</redirectDrivesList>
<redirectPrinters></redirectPrinters>
<redirectPorts></redirectPorts>
<redirectSmartCards></redirectSmartCards>
<redirectPnpDevices></redirectPnpDevices>
</localResources>
<displaySettings inherit="None">
<thumbnailScale></thumbnailScale>
<smartSizeDockedWindows></smartSizeDockedWindows>
<smartSizeUndockedWindows></smartSizeUndockedWindows>
</displaySettings>
<securitySettings inherit="None">
<authentication></authentication>
</securitySettings>
</server>
</group>

View File

@@ -0,0 +1,45 @@
<?xml version="1.0"?>
<ArrayOfConnection>
<Connection>
<ConnectionSubType>UltraVNC</ConnectionSubType>
<ConnectionType>VNC</ConnectionType>
<Description>This is a VNC description</Description>
<ID>16ff7dd6-2ac3-4e27-96cf-435b5bfe5a00</ID>
<Name>vnc connection</Name>
<OpenEmbedded>true</OpenEmbedded>
<Stamp>a44e3b58-2e14-47bf-8a79-0646b1e4ba46</Stamp>
<MetaInformation>
<MAC>some-mac-here</MAC>
<PasswordHistory>
<PasswordHistory>
<LoggedModifiedBy>LEVIATHAN\David</LoggedModifiedBy>
<ModifiedBy>LEVIATHAN\David</ModifiedBy>
<ModifiedDateTime>2020-01-26T21:12:44</ModifiedDateTime>
<SafePassword>aHjuKKmVmbivKM+wovI3aA==</SafePassword>
</PasswordHistory>
<PasswordHistory>
<LoggedModifiedBy>LEVIATHAN\David</LoggedModifiedBy>
<ModifiedBy>LEVIATHAN\David</ModifiedBy>
<ModifiedDateTime>2020-01-26T21:08:16</ModifiedDateTime>
<SafePassword>uEGtwH/QfjSvKM+wovI3aA==</SafePassword>
</PasswordHistory>
</PasswordHistory>
</MetaInformation>
<VNC>
<CustomCompressionLevel>4</CustomCompressionLevel>
<DisableClipboard>true</DisableClipboard>
<Host>vnchost1</Host>
<JPEGCompressionLevel>3</JPEGCompressionLevel>
<MsDomain>windomain1</MsDomain>
<MsSafePassword>bUWiWCi7qod7YQ5XXK5LFQ==</MsSafePassword>
<MsUser>winuser1</MsUser>
<Port>9987</Port>
<PreferredEncoding>Tight</PreferredEncoding>
<ProxyHost>proxyhost:7777</ProxyHost>
<SafePassword>oGzaL3q/dK17YQ5XXK5LFQ==</SafePassword>
<ScreenColorDepth>C8</ScreenColorDepth>
<ViewOnly>true</ViewOnly>
<VNCEmbeddedType>UltraVNC</VNCEmbeddedType>
</VNC>
</Connection>
</ArrayOfConnection>

View File

@@ -0,0 +1,29 @@
<?xml version="1.0"?>
<ArrayOfConnection>
<Connection>
<ConnectionSubType>FireFox</ConnectionSubType>
<ConnectionType>WebBrowser</ConnectionType>
<Description>Website description</Description>
<ID>65092747-6870-42c9-b8bc-35ec9fb5b3fb</ID>
<Name>website connection</Name>
<OpenEmbedded>true</OpenEmbedded>
<Stamp>d04a9abb-4d4c-4ba5-8ef8-1699bd84b734</Stamp>
<WebBrowserApplication>FireFox</WebBrowserApplication>
<WebBrowserUrl>https://www.google.com:8080</WebBrowserUrl>
<MetaInformation>
<PasswordHistory>
<PasswordHistory>
<LoggedModifiedBy>LEVIATHAN\David</LoggedModifiedBy>
<ModifiedBy>LEVIATHAN\David</ModifiedBy>
<ModifiedDateTime>2020-01-26T22:01:26</ModifiedDateTime>
<SafePassword>T2/JO7Aps+GMZG0vk5Jo8A==</SafePassword>
</PasswordHistory>
</PasswordHistory>
</MetaInformation>
<Web>
<Domain>domain1</Domain>
<SafePassword>24ifhl01e7Le3Aj8NxM4ww==</SafePassword>
<UserName>user1</UserName>
</Web>
</Connection>
</ArrayOfConnection>

View File

@@ -1,94 +1,17 @@
using System;
using mRemoteNG.Connection;
using mRemoteNG.Connection.Protocol;
using mRemoteNG.Connection.Protocol.Http;
using mRemoteNG.Connection.Protocol.ICA;
using mRemoteNG.Connection.Protocol.RDP;
using mRemoteNG.Connection.Protocol.VNC;
using mRemoteNG.Connection;
using mRemoteNG.Container;
namespace mRemoteNGTests.TestHelpers
{
internal static class ConnectionInfoHelpers
internal static class ConnectionInfoHelpers
{
private static readonly Random _random = new Random();
/// <summary>
/// Returns a <see cref="ConnectionInfo"/> object with randomized
/// values in all fields.
/// </summary>
internal static ConnectionInfo GetRandomizedConnectionInfo(bool randomizeInheritance = false)
{
var connectionInfo = new ConnectionInfo
{
// string types
Name = RandomString(),
Hostname = RandomString(),
Description = RandomString(),
Domain = RandomString(),
ExtApp = RandomString(),
Icon = RandomString(),
LoadBalanceInfo = RandomString(),
MacAddress = RandomString(),
Panel = RandomString(),
Password = RandomString(),
PostExtApp = RandomString(),
PreExtApp = RandomString(),
PuttySession = RandomString(),
RDGatewayHostname = RandomString(),
RDGatewayUsername = RandomString(),
RDGatewayDomain = RandomString(),
RDGatewayPassword = RandomString(),
UserField = RandomString(),
Username = RandomString(),
VNCProxyIP = RandomString(),
VNCProxyPassword = RandomString(),
VNCProxyUsername = RandomString(),
// bool types
AutomaticResize = RandomBool(),
CacheBitmaps = RandomBool(),
DisplayThemes = RandomBool(),
DisplayWallpaper = RandomBool(),
EnableDesktopComposition = RandomBool(),
EnableFontSmoothing = RandomBool(),
IsContainer = RandomBool(),
IsDefault = RandomBool(),
IsQuickConnect = RandomBool(),
PleaseConnect = RandomBool(),
RDPAlertIdleTimeout = RandomBool(),
RedirectDiskDrives = RandomBool(),
RedirectKeys = RandomBool(),
RedirectPorts = RandomBool(),
RedirectPrinters = RandomBool(),
RedirectSmartCards = RandomBool(),
UseConsoleSession = RandomBool(),
UseCredSsp = RandomBool(),
VNCViewOnly = RandomBool(),
Favorite = RandomBool(),
// ints
Port = RandomInt(),
RDPMinutesToIdleTimeout = RandomInt(),
VNCProxyPort = RandomInt(),
// enums
Colors = RandomEnum<RdpProtocol.RDPColors>(),
ICAEncryptionStrength = RandomEnum<IcaProtocol.EncryptionStrength> (),
Protocol = RandomEnum<ProtocolType>(),
RDGatewayUsageMethod = RandomEnum<RdpProtocol.RDGatewayUsageMethod>(),
RDGatewayUseConnectionCredentials = RandomEnum<RdpProtocol.RDGatewayUseConnectionCredentials>(),
RDPAuthenticationLevel = RandomEnum<RdpProtocol.AuthenticationLevel>(),
RedirectSound = RandomEnum<RdpProtocol.RDPSounds>(),
RenderingEngine = RandomEnum<HTTPBase.RenderingEngine>(),
Resolution = RandomEnum<RdpProtocol.RDPResolutions>(),
SoundQuality = RandomEnum<RdpProtocol.RDPSoundQuality>(),
VNCAuthMode = RandomEnum<ProtocolVNC.AuthMode>(),
VNCColors = RandomEnum<ProtocolVNC.Colors>(),
VNCCompression = RandomEnum<ProtocolVNC.Compression>(),
VNCEncoding = RandomEnum<ProtocolVNC.Encoding>(),
VNCProxyType = RandomEnum<ProtocolVNC.ProxyType>(),
VNCSmartSizeMode = RandomEnum<ProtocolVNC.SmartSizeMode>(),
};
var connectionInfo = new ConnectionInfo().RandomizeValues();
if (randomizeInheritance)
connectionInfo.Inheritance = GetRandomizedInheritance(connectionInfo);
@@ -96,38 +19,24 @@ namespace mRemoteNGTests.TestHelpers
return connectionInfo;
}
internal static ContainerInfo GetRandomizedContainerInfo(bool randomizeInheritance = false)
{
var containerInfo = new ContainerInfo().RandomizeValues();
if (randomizeInheritance)
containerInfo.Inheritance = GetRandomizedInheritance(containerInfo);
return containerInfo;
}
internal static ConnectionInfoInheritance GetRandomizedInheritance(ConnectionInfo parent)
{
var inheritance = new ConnectionInfoInheritance(parent, true);
foreach (var property in inheritance.GetProperties())
{
property.SetValue(inheritance, RandomBool());
property.SetValue(inheritance, Randomizer.RandomBool());
}
return inheritance;
}
internal static string RandomString()
{
return Guid.NewGuid().ToString("N");
}
internal static bool RandomBool()
{
return _random.Next() % 2 == 0;
}
internal static int RandomInt()
{
return _random.Next();
}
internal static T RandomEnum<T>() where T : struct, IConvertible
{
if (!typeof(T).IsEnum)
throw new ArgumentException("T must be an enum");
var values = Enum.GetValues(typeof(T));
return (T)values.GetValue(_random.Next(values.Length));
}
}
}

View File

@@ -6,7 +6,7 @@ using Enum = System.Enum;
namespace mRemoteNGTests.TestHelpers
{
internal static class Randomizer
internal static class Randomizer
{
private static readonly Random Random = new Random();
@@ -98,7 +98,8 @@ namespace mRemoteNGTests.TestHelpers
if (opByType.TryGetValue(property.PropertyType, out var mutator))
mutator(property, con);
else if (opByType.TryGetValue(property.PropertyType.BaseType, out var mutator2))
else if (property.PropertyType.BaseType != null &&
opByType.TryGetValue(property.PropertyType.BaseType, out var mutator2))
mutator2(property, con);
}

View File

@@ -45,11 +45,14 @@
public TType RedirectSmartCards { get; set; }
public TType RedirectSound { get; set; }
public TType SoundQuality { get; set; }
public TType RedirectAudioCapture { get; set; }
public TType PreExtApp { get; set; }
public TType PostExtApp { get; set; }
public TType MacAddress { get; set; }
public TType UserField { get; set; }
public TType Favorite { get; set; }
public TType VmId { get; set; }
public TType UseVmId { get; set; }
public TType VNCCompression { get; set; }
public TType VNCEncoding { get; set; }
public TType VNCAuthMode { get; set; }
@@ -61,5 +64,7 @@
public TType VNCColors { get; set; }
public TType VNCSmartSizeMode { get; set; }
public TType VNCViewOnly { get; set; }
}
public TType RdpVersion { get; set; }
public TType UseEnhancedMode { get; set; }
}
}

View File

@@ -0,0 +1,133 @@
using System;
using System.Linq;
using mRemoteNG.UI.Controls.FilteredPropertyGrid;
using NUnit.Framework;
namespace mRemoteNGTests.UI.Controls
{
public class FilteredPropertyGridTests
{
[Test]
public void AllPropertiesVisibleByDefault()
{
var grid = new FilteredPropertyGrid();
var obj = new {Prop1 = "hello"};
grid.SelectedObject = obj;
Assert.That(grid.VisibleProperties, Is.EquivalentTo(new []{ nameof(obj.Prop1) }));
}
[Test]
public void PropertiesOnTheHiddenPropertiesListAreNotShown()
{
var grid = new FilteredPropertyGrid();
var obj = new { Prop1 = "hello", Prop2 = "world" };
grid.HiddenProperties = new[] { nameof(obj.Prop1) };
grid.SelectedObject = obj;
Assert.That(grid.VisibleProperties, Is.EquivalentTo(new[] { nameof(obj.Prop2) }));
}
[Test]
public void OnlyPropertiesOnTheBrowsablePropertiesListAreShown()
{
var grid = new FilteredPropertyGrid();
var obj = new { Prop1 = "hello", Prop2 = "world" };
grid.BrowsableProperties = new[] { nameof(obj.Prop1) };
grid.SelectedObject = obj;
Assert.That(grid.VisibleProperties, Is.EquivalentTo(new[] { nameof(obj.Prop1) }));
}
[Test]
public void APropertyOnBothTheBrowsableAndHiddenListWillNotBeShown()
{
var grid = new FilteredPropertyGrid();
var obj = new { Prop1 = "hello", Prop2 = "world", Prop3 = "!" };
grid.BrowsableProperties = new[] { nameof(obj.Prop1), nameof(obj.Prop2) };
grid.HiddenProperties = new[] { nameof(obj.Prop1) };
grid.SelectedObject = obj;
Assert.That(grid.VisibleProperties, Is.EquivalentTo(new[] { nameof(obj.Prop2) }));
}
[Test]
public void ExceptionThrownWhenNonExistantPropertyFoundInBrowsablePropertiesList()
{
var grid = new FilteredPropertyGrid();
var obj = new { Prop1 = "hello" };
grid.SelectedObject = obj;
Assert.Throws<InvalidOperationException>(() =>
grid.BrowsableProperties = new[] {"NonExistantProperty"});
}
[Test]
public void HiddenPropertiesListCanHandleNonExistentProperties()
{
var grid = new FilteredPropertyGrid();
var obj = new { Prop1 = "hello" };
grid.SelectedObject = obj;
Assert.DoesNotThrow(() => grid.HiddenProperties = new[] { "NonExistantProperty" });
}
[Test]
public void GetVisibleGridItemsReturnsAllExpandedItems()
{
var grid = new FilteredPropertyGrid();
var obj = new { Prop1 = "hello", Prop2 = new{Prop3 = "world"} };
grid.SelectedObject = obj;
var visibleGridItems = grid.GetVisibleGridItems();
Assert.That(visibleGridItems.Select(i => i.Label),
Is.EquivalentTo(new[]
{
nameof(obj.Prop1),
nameof(obj.Prop2)
}));
}
[Test]
public void CanSelectGridItem()
{
var grid = new FilteredPropertyGrid();
var obj = new { Prop1 = "hello", Prop2 = "world" };
grid.SelectedObject = obj;
grid.SelectGridItem(nameof(obj.Prop2));
Assert.That(grid.SelectedGridItem.PropertyDescriptor?.Name,
Is.EqualTo(nameof(obj.Prop2)));
}
[Test]
public void FindNextGridItemPropertyReturnsTheCorrectItem()
{
var grid = new FilteredPropertyGrid();
var obj = new { Prop1 = "hello", Prop2 = "world" };
grid.SelectedObject = obj;
grid.SelectGridItem(nameof(obj.Prop1));
var nextGridItem = grid.FindNextGridItemProperty(grid.SelectedGridItem);
Assert.That(nextGridItem?.PropertyDescriptor?.Name,
Is.EqualTo(nameof(obj.Prop2)));
}
[Test]
public void FindPreviousGridItemPropertyReturnsTheCorrectItem()
{
var grid = new FilteredPropertyGrid();
var obj = new { Prop1 = "hello", Prop2 = "world", Prop3 = "!" };
grid.SelectedObject = obj;
grid.SelectGridItem(nameof(obj.Prop3));
var nextGridItem = grid.FindPreviousGridItemProperty(grid.SelectedGridItem);
Assert.That(nextGridItem?.PropertyDescriptor?.Name,
Is.EqualTo(nameof(obj.Prop2)));
}
}
}

View File

@@ -1,7 +1,6 @@
using System.Linq;
using System.Windows.Forms;
using mRemoteNG.UI.Controls.PageSequence;
using NSubstitute;
using NUnit.Framework;
namespace mRemoteNGTests.UI.Controls

View File

@@ -1,11 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace mRemoteNGTests.UI.Controls

View File

@@ -30,8 +30,8 @@ namespace mRemoteNGTests.UI.Forms
[SetUICulture("en-US")]
public void PasswordFormText()
{
FormTester formTester = new FormTester("PasswordForm");
Assert.That(formTester.Text, Does.Match("Password"));
var formTester = new FormTester("PasswordForm");
Assert.That(formTester.Text, Does.Match("mRemoteNG password"));
}
[Test]

View File

@@ -12,17 +12,14 @@ using NUnit.Framework;
namespace mRemoteNGTests.UI.Window.ConfigWindowTests
{
public class ConfigWindowGeneralTests
public class ConfigWindowGeneralTests
{
private ConfigWindow _configWindow;
[SetUp]
public void Setup()
{
_configWindow = new ConfigWindow
{
PropertiesVisible = true
};
_configWindow = new ConfigWindow();
}
[TestCaseSource(nameof(ConnectionInfoGeneralTestCases))]
@@ -57,7 +54,92 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
Assert.That(_configWindow.VisibleObjectProperties, Is.EquivalentTo(expectedVisibleProperties));
}
private static IEnumerable<TestCaseData> ConnectionInfoGeneralTestCases()
[Test]
public void SwitchFromInheritanceToConnectionPropertiesWhenClickingRootNode()
{
// connection with a normal parent container
var connection = new ConnectionInfo();
connection.SetParent(new ContainerInfo());
_configWindow.SelectedTreeNode = connection;
_configWindow.ShowInheritanceProperties();
_configWindow.SelectedTreeNode = new RootNodeInfo(RootNodeType.Connection);
Assert.That(_configWindow.PropertiesVisible, Is.True,
() => "The property mode should switch from inheritance to connection properties when clicking on the root node.");
}
[Test]
public void SwitchFromInheritanceToConnectionPropertiesWhenClickingRootPuttyNode()
{
// connection with a normal parent container
var connection = new ConnectionInfo();
connection.SetParent(new ContainerInfo());
_configWindow.SelectedTreeNode = connection;
_configWindow.ShowInheritanceProperties();
_configWindow.SelectedTreeNode = new RootPuttySessionsNodeInfo();
Assert.That(_configWindow.PropertiesVisible, Is.True,
() => "The property mode should switch from inheritance to connection properties when clicking on the root node.");
}
[Test]
public void SwitchFromInheritanceToConnectionPropertiesWhenClickingChildOfRootNode()
{
// connection with a normal parent container
var root = new RootNodeInfo(RootNodeType.Connection);
var containerWhoseParentIsRoot = new ContainerInfo();
var connection = new ConnectionInfo();
root.AddChild(containerWhoseParentIsRoot);
containerWhoseParentIsRoot.AddChild(connection);
_configWindow.SelectedTreeNode = connection;
_configWindow.ShowInheritanceProperties();
_configWindow.SelectedTreeNode = containerWhoseParentIsRoot;
Assert.That(_configWindow.PropertiesVisible, Is.True,
() => "The property mode should switch from inheritance to connection properties " +
"when clicking on a container whose parent is the root node.");
}
[TestCaseSource(nameof(EveryNodeType))]
public void DefaultConnectionPropertiesCanBeShownRegardlessOfWhichNodeIsSelected(ConnectionInfo selectedObject)
{
_configWindow.SelectedTreeNode = selectedObject;
Assert.That(_configWindow.CanShowDefaultProperties, Is.True);
}
[TestCaseSource(nameof(EveryNodeType))]
public void DefaultInheritancePropertiesCanBeShownRegardlessOfWhichNodeIsSelected(ConnectionInfo selectedObject)
{
_configWindow.SelectedTreeNode = selectedObject;
Assert.That(_configWindow.CanShowDefaultInheritance, Is.True);
}
[TestCaseSource(nameof(EveryNodeType))]
public void ConnectionPropertiesCanAlwaysBeShownUnlessNothingIsSelected(ConnectionInfo selectedObject)
{
_configWindow.SelectedTreeNode = selectedObject;
var selectedObjectNotNull = selectedObject != null;
Assert.That(_configWindow.CanShowProperties, Is.EqualTo(selectedObjectNotNull));
}
[TestCaseSource(nameof(EveryNodeType))]
public void InheritancePropertiesAreVisibleInCertainCases(ConnectionInfo selectedObject)
{
_configWindow.SelectedTreeNode = selectedObject;
var shouldBeAvailable = selectedObject != null &&
!(selectedObject is RootNodeInfo) &&
!(selectedObject is PuttySessionInfo) &&
!(selectedObject.Parent is RootNodeInfo);
Assert.That(_configWindow.CanShowInheritance, Is.EqualTo(shouldBeAvailable));
}
private static IEnumerable<TestCaseData> ConnectionInfoGeneralTestCases()
{
var protocolTypes = typeof(ProtocolType).GetEnumValues().OfType<ProtocolType>();
var testCases = new List<TestCaseData>();
@@ -80,6 +162,56 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
return testCases;
}
private static IEnumerable<TestCaseData> EveryNodeType()
{
var protocolTypes = typeof(ProtocolType).GetEnumValues().OfType<ProtocolType>().ToList();
var root = new RootNodeInfo(RootNodeType.Connection);
var container = new ContainerInfo();
var connectionsWithNormalParent = protocolTypes
.Select(protocolType =>
{
var c = new ConnectionInfo {Protocol = protocolType};
c.SetParent(container);
return new TestCaseData(c).SetName(protocolType + ", Connection, NormalParent");
});
var connectionsWithRootParent = protocolTypes
.Select(protocolType =>
{
var c = new ConnectionInfo { Protocol = protocolType };
c.SetParent(root);
return new TestCaseData(c).SetName(protocolType + ", Connection, RootParent");
});
var contianersWithNormalParent = protocolTypes
.Select(protocolType =>
{
var c = new ContainerInfo { Protocol = protocolType };
c.SetParent(container);
return new TestCaseData(c).SetName(protocolType + ", Connection, NormalParent");
});
var containersWithRootParent = protocolTypes
.Select(protocolType =>
{
var c = new ContainerInfo { Protocol = protocolType };
c.SetParent(root);
return new TestCaseData(c).SetName(protocolType + ", Connection, RootParent");
});
return connectionsWithNormalParent
.Concat(connectionsWithRootParent)
.Concat(contianersWithNormalParent)
.Concat(containersWithRootParent)
.Concat(new[]
{
new TestCaseData(root).SetName("RootNode"),
new TestCaseData(new RootPuttySessionsNodeInfo()).SetName("RootPuttyNode"),
new TestCaseData(new PuttySessionInfo()).SetName("PuttyNode"),
new TestCaseData(null).SetName("Null"),
});
}
internal static ConnectionInfo ConstructConnectionInfo(ProtocolType protocol, bool isContainer)
{
// build connection info. set certain connection properties so
@@ -90,12 +222,13 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
: new ConnectionInfo();
node.Protocol = protocol;
node.Resolution = RdpProtocol.RDPResolutions.Res800x600;
node.RDGatewayUsageMethod = RdpProtocol.RDGatewayUsageMethod.Never;
node.RDGatewayUseConnectionCredentials = RdpProtocol.RDGatewayUseConnectionCredentials.Yes;
node.RedirectSound = RdpProtocol.RDPSounds.DoNotPlay;
node.Resolution = RDPResolutions.Res800x600;
node.RDGatewayUsageMethod = RDGatewayUsageMethod.Never;
node.RDGatewayUseConnectionCredentials = RDGatewayUseConnectionCredentials.Yes;
node.RedirectSound = RDPSounds.DoNotPlay;
node.VNCAuthMode = ProtocolVNC.AuthMode.AuthVNC;
node.VNCProxyType = ProtocolVNC.ProxyType.ProxyNone;
node.UseVmId = false;
node.Inheritance.TurnOffInheritanceCompletely();
return node;
@@ -134,6 +267,7 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
nameof(ConnectionInfo.Password),
nameof(ConnectionInfo.Domain),
nameof(ConnectionInfo.Port),
nameof(ConnectionInfo.UseVmId),
nameof(ConnectionInfo.UseConsoleSession),
nameof(ConnectionInfo.RDPAuthenticationLevel),
nameof(ConnectionInfo.RDPMinutesToIdleTimeout),
@@ -154,6 +288,8 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
nameof(ConnectionInfo.RedirectPorts),
nameof(ConnectionInfo.RedirectSmartCards),
nameof(ConnectionInfo.RedirectSound),
nameof(ConnectionInfo.RedirectAudioCapture),
nameof(ConnectionInfo.RdpVersion)
});
break;
case ProtocolType.VNC:
@@ -206,6 +342,15 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
nameof(ConnectionInfo.CacheBitmaps),
});
break;
case ProtocolType.PowerShell:
expectedProperties.AddRange(new[]
{
nameof(ConnectionInfo.Username),
nameof(ConnectionInfo.Password),
nameof(ConnectionInfo.Domain),
nameof(ConnectionInfo.Port),
});
break;
case ProtocolType.IntApp:
expectedProperties.AddRange(new[]
{

View File

@@ -1,5 +1,4 @@
using mRemoteNG.Connection;
using mRemoteNG.Connection.Protocol;
using mRemoteNG.Connection.Protocol;
using mRemoteNG.Connection.Protocol.RDP;
using NUnit.Framework;
@@ -18,12 +17,12 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
RunVerification();
}
[TestCase(RdpProtocol.RDGatewayUsageMethod.Always)]
[TestCase(RdpProtocol.RDGatewayUsageMethod.Detect)]
public void RdGatewayPropertiesShown_WhenRdGatewayUsageMethodIsNotNever(RdpProtocol.RDGatewayUsageMethod gatewayUsageMethod)
[TestCase(RDGatewayUsageMethod.Always)]
[TestCase(RDGatewayUsageMethod.Detect)]
public void RdGatewayPropertiesShown_WhenRdGatewayUsageMethodIsNotNever(RDGatewayUsageMethod gatewayUsageMethod)
{
ConnectionInfo.RDGatewayUsageMethod = gatewayUsageMethod;
ConnectionInfo.RDGatewayUseConnectionCredentials = RdpProtocol.RDGatewayUseConnectionCredentials.Yes;
ConnectionInfo.RDGatewayUseConnectionCredentials = RDGatewayUseConnectionCredentials.Yes;
ExpectedPropertyList.AddRange(new []
{
nameof(mRemoteNG.Connection.ConnectionInfo.RDGatewayHostname),
@@ -33,11 +32,11 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
RunVerification();
}
[TestCase(RdpProtocol.RDGatewayUseConnectionCredentials.No)]
[TestCase(RdpProtocol.RDGatewayUseConnectionCredentials.SmartCard)]
public void RdGatewayPropertiesShown_WhenRDGatewayUseConnectionCredentialsIsNotYes(RdpProtocol.RDGatewayUseConnectionCredentials useConnectionCredentials)
[TestCase(RDGatewayUseConnectionCredentials.No)]
[TestCase(RDGatewayUseConnectionCredentials.SmartCard)]
public void RdGatewayPropertiesShown_WhenRDGatewayUseConnectionCredentialsIsNotYes(RDGatewayUseConnectionCredentials useConnectionCredentials)
{
ConnectionInfo.RDGatewayUsageMethod = RdpProtocol.RDGatewayUsageMethod.Always;
ConnectionInfo.RDGatewayUsageMethod = RDGatewayUsageMethod.Always;
ConnectionInfo.RDGatewayUseConnectionCredentials = useConnectionCredentials;
ExpectedPropertyList.AddRange(new []
{
@@ -54,15 +53,15 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
[Test]
public void SoundQualityPropertyShown_WhenRdpSoundsSetToBringToThisComputer()
{
ConnectionInfo.RedirectSound = RdpProtocol.RDPSounds.BringToThisComputer;
ConnectionInfo.RedirectSound = RDPSounds.BringToThisComputer;
ExpectedPropertyList.Add(nameof(mRemoteNG.Connection.ConnectionInfo.SoundQuality));
RunVerification();
}
[TestCase(RdpProtocol.RDPResolutions.FitToWindow)]
[TestCase(RdpProtocol.RDPResolutions.Fullscreen)]
public void AutomaticResizePropertyShown_WhenResolutionIsDynamic(RdpProtocol.RDPResolutions resolution)
[TestCase(RDPResolutions.FitToWindow)]
[TestCase(RDPResolutions.Fullscreen)]
public void AutomaticResizePropertyShown_WhenResolutionIsDynamic(RDPResolutions resolution)
{
ConnectionInfo.Resolution = resolution;
ExpectedPropertyList.Add(nameof(mRemoteNG.Connection.ConnectionInfo.AutomaticResize));

View File

@@ -6,7 +6,7 @@ using NUnit.Framework;
namespace mRemoteNGTests.UI.Window.ConfigWindowTests
{
public abstract class ConfigWindowSpecialTestsBase
public abstract class ConfigWindowSpecialTestsBase
{
protected abstract ProtocolType Protocol { get; }
protected bool TestAgainstContainerInfo { get; set; } = false;
@@ -20,10 +20,7 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
ConnectionInfo = ConfigWindowGeneralTests.ConstructConnectionInfo(Protocol, TestAgainstContainerInfo);
ExpectedPropertyList = ConfigWindowGeneralTests.BuildExpectedConnectionInfoPropertyList(Protocol, TestAgainstContainerInfo);
ConfigWindow = new ConfigWindow
{
PropertiesVisible = true,
};
ConfigWindow = new ConfigWindow();
}
public void RunVerification()

View File

@@ -8,8 +8,20 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="BouncyCastle.Crypto" publicKeyToken="0e99375e54769942" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.8.5.0" newVersion="1.8.5.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Google.Protobuf" publicKeyToken="a7d26565bac4d604" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.9.2.0" newVersion="3.9.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" /></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /></startup></configuration>

View File

@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\NUnit.3.11.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" />
<Import Project="..\packages\ReportGenerator.4.3.0\build\netstandard2.0\ReportGenerator.props" Condition="Exists('..\packages\ReportGenerator.4.3.0\build\netstandard2.0\ReportGenerator.props')" />
<Import Project="..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props')" />
<Import Project="..\packages\NUnit.3.12.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -9,7 +11,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>mRemoteNGTests</RootNamespace>
<AssemblyName>mRemoteNGTests</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
@@ -58,21 +60,21 @@
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="BouncyCastle.Crypto, Version=1.8.4.0, Culture=neutral, PublicKeyToken=0e99375e54769942">
<HintPath>..\packages\BouncyCastle.1.8.4\lib\BouncyCastle.Crypto.dll</HintPath>
<Reference Include="BouncyCastle.Crypto, Version=1.8.5.0, Culture=neutral, PublicKeyToken=0e99375e54769942">
<HintPath>..\packages\BouncyCastle.1.8.5\lib\BouncyCastle.Crypto.dll</HintPath>
</Reference>
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
<HintPath>..\packages\Castle.Core.4.3.1\lib\net45\Castle.Core.dll</HintPath>
<HintPath>..\packages\Castle.Core.4.4.0\lib\net45\Castle.Core.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="NSubstitute, Version=4.0.0.0, Culture=neutral, PublicKeyToken=92dd2e9066daa5ca, processorArchitecture=MSIL">
<HintPath>..\packages\NSubstitute.4.0.0\lib\net46\NSubstitute.dll</HintPath>
<Reference Include="NSubstitute, Version=4.2.0.0, Culture=neutral, PublicKeyToken=92dd2e9066daa5ca, processorArchitecture=MSIL">
<HintPath>..\packages\NSubstitute.4.2.1\lib\net46\NSubstitute.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=3.11.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll</HintPath>
<Reference Include="nunit.framework, Version=3.12.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.12.0\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="NUnitForms">
<HintPath>nUnitForms\bin\NUnitForms.dll</HintPath>
@@ -85,11 +87,11 @@
<Reference Include="System.Data" />
<Reference Include="System.DirectoryServices" />
<Reference Include="System.Drawing" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.6.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.2\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll</HintPath>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
@@ -121,6 +123,7 @@
<Compile Include="Config\DataProviders\FileBackupCreatorTests.cs" />
<Compile Include="Config\DataProviders\FileDataProviderTests.cs" />
<Compile Include="Config\DataProviders\FileDataProviderWithRollingBackupTests.cs" />
<Compile Include="Config\Serializers\MiscSerializers\RemoteDesktopManagerDeserializerTests.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\Xml\ValidateXmlSchemas.cs" />
<Compile Include="Config\Serializers\DataTableDeserializerTests.cs" />
<Compile Include="Config\CredentialHarvesterTests.cs" />
@@ -218,6 +221,7 @@
<Compile Include="Tree\ClickHandlers\SwitchToConnectionClickHandlerTests.cs" />
<Compile Include="Tree\SelectedConnectionDeletionConfirmerTests.cs" />
<Compile Include="UI\Controls\ConnectionTreeTests.cs" />
<Compile Include="UI\Controls\FilteredPropertyGridTests.cs" />
<Compile Include="UI\Controls\PageSequenceTests.cs" />
<Compile Include="UI\Controls\SecureTextBoxTestForm.cs">
<SubType>Form</SubType>
@@ -251,6 +255,10 @@
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="Resources\rdp.rdm" />
<None Include="Resources\ssh.rdm" />
<None Include="Resources\vnc.rdm" />
<None Include="Resources\website.rdm" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
@@ -270,12 +278,14 @@
<ItemGroup>
<None Include="packages.config" />
<None Include="Resources\confCons_v2_5.xml" />
<None Include="Resources\telnet.rdm" />
<None Include="Resources\test_puttyConnectionManager_database.dat" />
<None Include="Resources\test_rdcman_badVersionNumber.rdg" />
<None Include="Resources\test_rdcman_noversion.rdg" />
<None Include="Resources\test_rdcman_v2_2_badschemaversion.rdg" />
<None Include="Resources\test_rdcman_v2_2_schema1.rdg" />
<None Include="Resources\test_RDCMan_v2_7_schema3.rdg" />
<None Include="Resources\test_rdcman_v2_7_schema3_empty_values.rdg" />
<None Include="Resources\test_rdcman_v2_7_schema3_null_values.rdg" />
<None Include="Resources\test_remotedesktopconnection.rdp" />
</ItemGroup>
@@ -339,7 +349,9 @@
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\NUnit.3.11.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.11.0\build\NUnit.props'))" />
<Error Condition="!Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.12.0\build\NUnit.props'))" />
<Error Condition="!Exists('..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props'))" />
<Error Condition="!Exists('..\packages\ReportGenerator.4.3.0\build\netstandard2.0\ReportGenerator.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ReportGenerator.4.3.0\build\netstandard2.0\ReportGenerator.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View File

@@ -1,21 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="BouncyCastle" version="1.8.4" targetFramework="net46" />
<package id="Castle.Core" version="4.3.1" targetFramework="net46" />
<package id="BouncyCastle" version="1.8.5" targetFramework="net46" />
<package id="Castle.Core" version="4.4.0" targetFramework="net46" />
<package id="DockPanelSuite" version="3.0.6" targetFramework="net46" />
<package id="log4net" version="2.0.8" targetFramework="net46" />
<package id="NSubstitute" version="4.0.0" targetFramework="net46" />
<package id="NUnit" version="3.11.0" targetFramework="net46" />
<package id="NUnit.Console" version="3.9.0" targetFramework="net46" />
<package id="NUnit.ConsoleRunner" version="3.9.0" targetFramework="net46" />
<package id="NSubstitute" version="4.2.1" targetFramework="net472" />
<package id="NUnit" version="3.12.0" targetFramework="net46" />
<package id="NUnit.Console" version="3.10.0" targetFramework="net46" />
<package id="NUnit.ConsoleRunner" version="3.10.0" targetFramework="net46" />
<package id="NUnit.Extension.NUnitProjectLoader" version="3.6.0" targetFramework="net46" />
<package id="NUnit.Extension.NUnitV2Driver" version="3.7.0" targetFramework="net46" />
<package id="NUnit.Extension.NUnitV2ResultWriter" version="3.6.0" targetFramework="net46" />
<package id="NUnit.Extension.TeamCityEventListener" version="1.0.5" targetFramework="net46" />
<package id="NUnit.Extension.TeamCityEventListener" version="1.0.7" targetFramework="net472" />
<package id="NUnit.Extension.VSProjectLoader" version="3.8.0" targetFramework="net46" />
<package id="NUnit3TestAdapter" version="3.15.1" targetFramework="net472" />
<package id="ObjectListView.Official" version="2.9.1" targetFramework="net46" />
<package id="OpenCover" version="4.6.519" targetFramework="net46" />
<package id="ReportGenerator" version="3.0.2" targetFramework="net46" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net46" />
<package id="System.Threading.Tasks.Extensions" version="4.5.2" targetFramework="net46" />
<package id="OpenCover" version="4.7.922" targetFramework="net46" />
<package id="ReportGenerator" version="4.3.0" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.6.0" targetFramework="net472" />
<package id="System.Threading.Tasks.Extensions" version="4.5.3" targetFramework="net472" />
</packages>

View File

@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2010
# Visual Studio Version 16
VisualStudioVersion = 16.0.28803.352
MinimumVisualStudioVersion = 14.0.25420.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mRemoteV1", "mRemoteV1\mRemoteV1.csproj", "{4934A491-40BC-4E5B-9166-EA1169A220F6}"
EndProject
@@ -100,25 +100,24 @@ Global
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release Portable|x86.ActiveCfg = Release Portable|x86
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release|Any CPU.ActiveCfg = Release|x86
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release|x86.ActiveCfg = Release|x86
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug Portable|Any CPU.ActiveCfg = Debug|Any CPU
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug Portable|Any CPU.Build.0 = Debug|Any CPU
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug Portable|x86.ActiveCfg = Debug|Any CPU
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug Portable|x86.Build.0 = Debug|Any CPU
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug|x86.ActiveCfg = Debug|Any CPU
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Installer|Any CPU.ActiveCfg = Release|Any CPU
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Installer|Any CPU.Build.0 = Release|Any CPU
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Installer|x86.ActiveCfg = Release|Any CPU
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Installer|x86.Build.0 = Release|Any CPU
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Portable|Any CPU.ActiveCfg = Release|Any CPU
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Portable|Any CPU.Build.0 = Release|Any CPU
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Portable|x86.ActiveCfg = Release|Any CPU
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Portable|x86.Build.0 = Release|Any CPU
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release|Any CPU.Build.0 = Release|Any CPU
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release|x86.ActiveCfg = Release|Any CPU
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release|x86.Build.0 = Release|Any CPU
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug Portable|Any CPU.ActiveCfg = Release|x86
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug Portable|Any CPU.Build.0 = Release|x86
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug Portable|x86.ActiveCfg = Debug|x86
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug Portable|x86.Build.0 = Debug|x86
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug|Any CPU.ActiveCfg = Debug|x86
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug|x86.ActiveCfg = Debug|x86
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug|x86.Build.0 = Debug|x86
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Installer|Any CPU.ActiveCfg = Release|x86
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Installer|Any CPU.Build.0 = Release|x86
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Installer|x86.ActiveCfg = Release|x86
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Installer|x86.Build.0 = Release|x86
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Portable|Any CPU.ActiveCfg = Release|x86
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Portable|Any CPU.Build.0 = Release|x86
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Portable|x86.ActiveCfg = Release|x86
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Portable|x86.Build.0 = Release|x86
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release|Any CPU.ActiveCfg = Release|x86
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release|x86.ActiveCfg = Release|x86
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -13,6 +13,15 @@ indent_size = 4
trim_trailing_whitespace = true
charset = utf-8-bom
# reStructuredText
[*.rst]
charset = utf-8
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
indent_size = 3
max_line_length = 120
# Organize usings
dotnet_sort_system_directives_first = true
@@ -41,4 +50,4 @@ csharp_space_after_colon_in_inheritance_clause = true
csharp_space_around_binary_operators = before_and_after
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false

View File

@@ -1,11 +1,11 @@
using Microsoft.Win32;
using mRemoteNG.App.Info;
using mRemoteNG.UI.TaskDialog;
using System;
using System;
using System.Diagnostics;
using System.Windows.Forms;
using Microsoft.Win32;
using mRemoteNG.App.Info;
using mRemoteNG.Messages;
using mRemoteNG.UI.Forms;
using mRemoteNG.UI.TaskDialog;
namespace mRemoteNG.App
{
@@ -55,21 +55,18 @@ namespace mRemoteNG.App
private static bool FipsPolicyEnabledForServer2003()
{
var regKey = Registry.LocalMachine.OpenSubKey("System\\CurrentControlSet\\Control\\Lsa");
var fipsPolicy = regKey?.GetValue("FIPSAlgorithmPolicy");
if (fipsPolicy == null) return false;
fipsPolicy = Convert.ToInt32(fipsPolicy);
return (int)fipsPolicy != 0;
var regKey = Registry.LocalMachine.OpenSubKey(@"System\CurrentControlSet\Control\Lsa");
if (!(regKey?.GetValue("FIPSAlgorithmPolicy") is int fipsPolicy))
return false;
return fipsPolicy != 0;
}
private static bool FipsPolicyEnabledForServer2008AndNewer()
{
var regKey =
Registry.LocalMachine.OpenSubKey("System\\CurrentControlSet\\Control\\Lsa\\FIPSAlgorithmPolicy");
var fipsPolicy = regKey?.GetValue("Enabled");
if (fipsPolicy == null) return false;
fipsPolicy = Convert.ToInt32(fipsPolicy);
return (int)fipsPolicy != 0;
var regKey = Registry.LocalMachine.OpenSubKey(@"System\CurrentControlSet\Control\Lsa\FIPSAlgorithmPolicy");
if (!(regKey?.GetValue("Enabled") is int fipsPolicy))
return false;
return fipsPolicy != 0;
}
private static void CheckLenovoAutoScrollUtility(MessageCollector messageCollector)

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Windows.Forms;
@@ -23,11 +23,12 @@ namespace mRemoteNG.App
openFileDialog.Multiselect = true;
var fileTypes = new List<string>();
fileTypes.AddRange(new[] {Language.strFilterAllImportable, "*.xml;*.rdp;*.rdg;*.dat;*.csv"});
fileTypes.AddRange(new[] {Language.strFilterAllImportable, "*.xml;*.rdp;*.rdg;*.dat;*.csv;*.rdm"});
fileTypes.AddRange(new[] {Language.strFiltermRemoteXML, "*.xml"});
fileTypes.AddRange(new[] {Language.strFiltermRemoteCSV, "*.csv"});
fileTypes.AddRange(new[] {Language.strFilterRDP, "*.rdp"});
fileTypes.AddRange(new[] {Language.strFilterRdgFiles, "*.rdg"});
fileTypes.AddRange(new[] {Language.RemoteDesktopManagerFiles, "*.rdm"});
fileTypes.AddRange(new[] {Language.strFilterPuttyConnectionManager, "*.dat"});
fileTypes.AddRange(new[] {Language.strFilterAll, "*.*"});
@@ -125,6 +126,8 @@ namespace mRemoteNG.App
return new RemoteDesktopConnectionManagerImporter();
case ".dat":
return new PuttyConnectionManagerImporter();
case ".rdm":
return new RemoteDesktopManagerImporter();
default:
throw new FileFormatException("Unrecognized file format.");
}

View File

@@ -5,6 +5,6 @@
public static readonly string DefaultConnectionsPath = SettingsFileInfo.SettingsPath;
public static readonly string DefaultConnectionsFile = "confCons.xml";
public static readonly string DefaultConnectionsFileNew = "confConsNew.xml";
public static readonly double ConnectionFileVersion = 2.6;
public static readonly double ConnectionFileVersion = 2.7;
}
}

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
@@ -11,10 +11,10 @@ namespace mRemoteNG.App.Info
{
public static class GeneralAppInfo
{
public const string UrlHome = "https://www.mremoteng.org/";
public const string UrlDonate = "https://mremoteng.org/contribute/";
public const string UrlForum = "https://www.reddit.com/r/mRemoteNG/";
public const string UrlBugs = "https://bugs.mremoteng.org/";
public const string UrlHome = "https://www.mremoteng.org";
public const string UrlDonate = "https://mremoteng.org/contribute";
public const string UrlForum = "https://www.reddit.com/r/mRemoteNG";
public const string UrlBugs = "https://bugs.mremoteng.org";
public static string ApplicationVersion = Application.ProductVersion;
public static readonly string ProductName = Application.ProductName;

View File

@@ -76,7 +76,7 @@ namespace mRemoteNG.App.Initialization
var architecture = string.Empty;
try
{
foreach (var o in new ManagementObjectSearcher("SELECT * FROM Win32_Processor WHERE DeviceID=\'CPU0\'")
foreach (var o in new ManagementObjectSearcher("SELECT AddressWidth FROM Win32_Processor WHERE DeviceID=\'CPU0\'")
.Get())
{
var managementObject = (ManagementObject)o;

View File

@@ -1,8 +1,8 @@
using mRemoteNG.UI.Forms;
using System;
using System;
using System.Diagnostics;
using System.Threading;
using System.Windows.Forms;
using mRemoteNG.UI.Forms;
namespace mRemoteNG.App
{
@@ -27,7 +27,7 @@ namespace mRemoteNG.App
CatchAllUnhandledExceptions();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
FrmSplashScreen frmSplashScreen = FrmSplashScreen.getInstance();
var frmSplashScreen = FrmSplashScreen.getInstance();
frmSplashScreen.Show();
Application.Run(FrmMain.Default);
}
@@ -85,12 +85,21 @@ namespace mRemoteNG.App
private static void ApplicationOnThreadException(object sender, ThreadExceptionEventArgs e)
{
if (!FrmSplashScreen.getInstance().IsDisposed)
FrmSplashScreen.getInstance().Close();
if (FrmMain.Default.IsDisposed) return;
var window = new UnhandledExceptionWindow(e.Exception, false);
window.ShowDialog(FrmMain.Default);
}
private static void CurrentDomainOnUnhandledException(object sender, UnhandledExceptionEventArgs e)
{
if (!FrmSplashScreen.getInstance().IsDisposed)
FrmSplashScreen.getInstance().Close();
var window = new UnhandledExceptionWindow(e.ExceptionObject as Exception, e.IsTerminating);
window.ShowDialog(FrmMain.Default);
}

View File

@@ -1,309 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ClassDiagram MajorVersion="1" MinorVersion="1">
<Class Name="mRemoteNG.Connection.Info" Collapsed="true">
<Position X="29.5" Y="0.5" Width="1.5" />
<Compartments>
<Compartment Name="Fields" Collapsed="true" />
<Compartment Name="Properties" Collapsed="true" />
<Compartment Name="Methods" Collapsed="true" />
<Compartment Name="Nested Types" Collapsed="false" />
</Compartments>
<NestedTypes>
<Enum Name="mRemoteNG.Connection.Info.Force" Collapsed="true">
<TypeIdentifier>
<NewMemberFileName>Connection\Connection.Info.cs</NewMemberFileName>
</TypeIdentifier>
</Enum>
<Class Name="mRemoteNG.Connection.Info.Inheritance">
<Compartments>
<Compartment Name="Properties" Collapsed="true" />
<Compartment Name="Methods" Collapsed="true" />
</Compartments>
<TypeIdentifier>
<NewMemberFileName>Connection\Connection.Info.Inheritance.cs</NewMemberFileName>
</TypeIdentifier>
</Class>
</NestedTypes>
<TypeIdentifier>
<HashCode>nsdT4YQ80AjyrN6+C3B3TRVBrwEyVASPjA5epmmggHg=</HashCode>
<FileName>Connection\Connection.Info.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="mRemoteNG.Connection.List" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="27.75" Y="1.5" Width="1.5" />
<Compartments>
<Compartment Name="Properties" Collapsed="true" />
<Compartment Name="Methods" Collapsed="true" />
</Compartments>
<TypeIdentifier>
<HashCode>AAIAAAAAAAAAAAAACAAAAAQAAkAAAAAAAAAAAABEAAA=</HashCode>
<FileName>Connection\Connection.List.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" Collapsed="true" />
</Class>
<Class Name="mRemoteNG.Connection.Protocol.PuttyBase">
<Position X="17.25" Y="3.25" Width="2.75" />
<Compartments>
<Compartment Name="Fields" Collapsed="true" />
<Compartment Name="Properties" Collapsed="true" />
<Compartment Name="Methods" Collapsed="true" />
</Compartments>
<NestedTypes>
<Enum Name="mRemoteNG.Connection.Protocol.PuttyBase.Putty_Protocol" Collapsed="true">
<TypeIdentifier>
<NewMemberFileName>Connection\Connection.Protocol.PuttyBase.cs</NewMemberFileName>
</TypeIdentifier>
</Enum>
<Enum Name="mRemoteNG.Connection.Protocol.PuttyBase.Putty_SSHVersion" Collapsed="true">
<TypeIdentifier>
<NewMemberFileName>Connection\Connection.Protocol.PuttyBase.cs</NewMemberFileName>
</TypeIdentifier>
</Enum>
</NestedTypes>
<TypeIdentifier>
<HashCode>BjAAQAAAQBAAgAAAgAAAAIAAAAAADoAAAAQAAAGAQgA=</HashCode>
<FileName>Connection\Connection.Protocol.PuttyBase.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="mRemoteNG.Connection.Protocol.Converter" Collapsed="true">
<Position X="26" Y="0.5" Width="1.5" />
<Compartments>
<Compartment Name="Methods" Collapsed="true" />
</Compartments>
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQAAAAAAAAAA=</HashCode>
<FileName>Connection\Connection.Protocol.Protocols.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="mRemoteNG.Connection.Protocol.Base">
<Position X="12.25" Y="0.5" Width="1.5" />
<Compartments>
<Compartment Name="Fields" Collapsed="true" />
<Compartment Name="Properties" Collapsed="true" />
<Compartment Name="Methods" Collapsed="true" />
<Compartment Name="Events" Collapsed="true" />
</Compartments>
<NestedTypes>
<Delegate Name="mRemoteNG.Connection.Protocol.Base.SetTagToNothingCB" Collapsed="true">
<TypeIdentifier>
<NewMemberFileName>Connection\Connection.Protocol.Base.cs</NewMemberFileName>
</TypeIdentifier>
</Delegate>
<Delegate Name="mRemoteNG.Connection.Protocol.Base.ErrorOccuredEventHandler" Collapsed="true">
<TypeIdentifier>
<NewMemberFileName>Connection\Connection.Protocol.Base.cs</NewMemberFileName>
</TypeIdentifier>
</Delegate>
<Delegate Name="mRemoteNG.Connection.Protocol.Base.ClosingEventHandler" Collapsed="true">
<TypeIdentifier>
<NewMemberFileName>Connection\Connection.Protocol.Base.cs</NewMemberFileName>
</TypeIdentifier>
</Delegate>
<Delegate Name="mRemoteNG.Connection.Protocol.Base.ConnectedEventHandler" Collapsed="true">
<TypeIdentifier>
<NewMemberFileName>Connection\Connection.Protocol.Base.cs</NewMemberFileName>
</TypeIdentifier>
</Delegate>
<Delegate Name="mRemoteNG.Connection.Protocol.Base.DisconnectedEventHandler" Collapsed="true">
<TypeIdentifier>
<NewMemberFileName>Connection\Connection.Protocol.Base.cs</NewMemberFileName>
</TypeIdentifier>
</Delegate>
<Delegate Name="mRemoteNG.Connection.Protocol.Base.DisposeControlCB" Collapsed="true">
<TypeIdentifier>
<NewMemberFileName>Connection\Connection.Protocol.Base.cs</NewMemberFileName>
</TypeIdentifier>
</Delegate>
<Delegate Name="mRemoteNG.Connection.Protocol.Base.ConnectingEventHandler" Collapsed="true">
<TypeIdentifier>
<NewMemberFileName>Connection\Connection.Protocol.Base.cs</NewMemberFileName>
</TypeIdentifier>
</Delegate>
<Delegate Name="mRemoteNG.Connection.Protocol.Base.ClosedEventHandler" Collapsed="true">
<TypeIdentifier>
<NewMemberFileName>Connection\Connection.Protocol.Base.cs</NewMemberFileName>
</TypeIdentifier>
</Delegate>
<Delegate Name="mRemoteNG.Connection.Protocol.Base.DisposeInterfaceCB" Collapsed="true">
<TypeIdentifier>
<NewMemberFileName>Connection\Connection.Protocol.Base.cs</NewMemberFileName>
</TypeIdentifier>
</Delegate>
</NestedTypes>
<TypeIdentifier>
<HashCode>ACSAAQAMAABAQQADAgBUoMSAlIAQAAgAAAAAkwGoABA=</HashCode>
<FileName>Connection\Connection.Protocol.Base.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="mRemoteNG.Connection.InterfaceControl" Collapsed="true">
<Position X="26" Y="1.5" Width="1.5" />
<Compartments>
<Compartment Name="Fields" Collapsed="true" />
<Compartment Name="Properties" Collapsed="true" />
<Compartment Name="Methods" Collapsed="true" />
</Compartments>
<TypeIdentifier>
<HashCode>AAAAAAAAACAAAAAAAACAAABKAAAAAAAAAAAAAEAAABA=</HashCode>
<FileName>Connection\Connection.InterfaceControl.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="mRemoteNG.Connection.Icon" Collapsed="true">
<Position X="27.75" Y="0.5" Width="1.5" />
<Compartments>
<Compartment Name="Fields" Collapsed="true" />
<Compartment Name="Methods" Collapsed="true" />
</Compartments>
<TypeIdentifier>
<HashCode>AAIAAAAAAAABACAAEAAAAAAAAAAAAAAAAAAAAAAAAAE=</HashCode>
<FileName>Connection\Connection.Icon.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="mRemoteNG.Connection.Protocol.VNC.ProtocolVNC" Collapsed="true">
<Position X="10" Y="3.25" Width="1.5" />
<TypeIdentifier>
<HashCode>AxQAAAAAIAgAAQABAAAAAYAQAQAAAAAAAAAAAEAAwAA=</HashCode>
<FileName>Connection\Protocol\VNC\Connection.Protocol.VNC.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="mRemoteNG.Connection.Protocol.Telnet.ProtocolTelnet" Collapsed="true">
<Position X="16.75" Y="5.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Connection\Protocol\Telnet\Connection.Protocol.Telnet.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="mRemoteNG.Connection.Protocol.SSH.ProtocolSSH1" Collapsed="true">
<Position X="21.25" Y="5.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Connection\Protocol\SSH\Connection.Protocol.SSH1.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="mRemoteNG.Connection.Protocol.SSH.ProtocolSSH2" Collapsed="true">
<Position X="23.5" Y="5.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Connection\Protocol\SSH\Connection.Protocol.SSH2.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="mRemoteNG.Connection.Protocol.Serial.ProtocolSerial" Collapsed="true">
<Position X="19" Y="5.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Connection\Protocol\Serial\Connection.Protocol.Serial.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="mRemoteNG.Connection.Protocol.Rlogin.ProtocolRlogin" Collapsed="true">
<Position X="14.5" Y="5.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Connection\Protocol\Rlogin\Connection.Protocol.Rlogin.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="mRemoteNG.Connection.Protocol.RDP.ProtocolRDP" Collapsed="true">
<Position X="3.25" Y="3.25" Width="1.5" />
<TypeIdentifier>
<HashCode>ACQRAAAFIAQgIQACAIBACIAAQaAABIIbAIgUYgEAgAE=</HashCode>
<FileName>Connection\Protocol\RDP\Connection.Protocol.RDP.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="mRemoteNG.Connection.Protocol.RAW.ProtocolRAW" Collapsed="true">
<Position X="12.25" Y="5.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Connection\Protocol\RAW\Connection.Protocol.RAW.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="mRemoteNG.Connection.Protocol.ICA.ProtocolICA" Collapsed="true">
<Position X="1" Y="3.25" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAEAABAAAAAQADAABAIIAIAQABBAAAAIiAAAAEAgA=</HashCode>
<FileName>Connection\Protocol\ICA\Connection.Protocol.ICA.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="mRemoteNG.Connection.Protocol.Http.ProtocolHTTP" Collapsed="true">
<Position X="5.5" Y="4.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Connection\Protocol\Http\Connection.Protocol.HTTP.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="mRemoteNG.Connection.Protocol.Http.HTTPBase" Collapsed="true">
<Position X="6.75" Y="3.25" Width="1.5" />
<TypeIdentifier>
<HashCode>AQAAAQAAABAAAQAIAAAAAKCAAAAAAAEAAAAAABAAAUA=</HashCode>
<FileName>Connection\Protocol\Http\Connection.Protocol.HTTPBase.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="mRemoteNG.Connection.Protocol.Http.ProtocolHTTPS" Collapsed="true">
<Position X="7.75" Y="4.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Connection\Protocol\Http\Connection.Protocol.HTTPS.cs</FileName>
</TypeIdentifier>
</Class>
<Enum Name="mRemoteNG.Connection.Protocol.Protocols" Collapsed="true">
<Position X="29.5" Y="3.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AEAwAgAAAQAQAEAAAAAAAAAAJAEABAAAAAAAAAAAAAA=</HashCode>
<FileName>Connection\Connection.Protocol.Protocols.cs</FileName>
</TypeIdentifier>
</Enum>
<Enum Name="mRemoteNG.Connection.Protocol.VNC.Defaults" Collapsed="true">
<Position X="26" Y="3.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Connection\Protocol\VNC\VNCEnum.cs</FileName>
</TypeIdentifier>
</Enum>
<Enum Name="mRemoteNG.Connection.Protocol.VNC.SpecialKeys" Collapsed="true">
<Position X="29.5" Y="4.25" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Connection\Protocol\VNC\VNCEnum.cs</FileName>
</TypeIdentifier>
</Enum>
<Enum Name="mRemoteNG.Connection.Protocol.VNC.Compression" Collapsed="true">
<Position X="29.5" Y="2.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAIAAAAAAAkAAAAAAAQAgAAQAAIAABAAAAAIBAIAA=</HashCode>
<FileName>Connection\Protocol\VNC\VNCEnum.cs</FileName>
</TypeIdentifier>
</Enum>
<Enum Name="mRemoteNG.Connection.Protocol.VNC.Encoding" Collapsed="true">
<Position X="27.75" Y="3.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAQAEBAAIAAAAAAAIAAAEAAAQgAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Connection\Protocol\VNC\VNCEnum.cs</FileName>
</TypeIdentifier>
</Enum>
<Enum Name="mRemoteNG.Connection.Protocol.VNC.AuthMode" Collapsed="true">
<Position X="26" Y="2.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAACAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Connection\Protocol\VNC\VNCEnum.cs</FileName>
</TypeIdentifier>
</Enum>
<Enum Name="mRemoteNG.Connection.Protocol.VNC.ProxyType" Collapsed="true">
<Position X="26" Y="4.25" Width="1.5" />
<TypeIdentifier>
<HashCode>BAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAACAACAAA=</HashCode>
<FileName>Connection\Protocol\VNC\VNCEnum.cs</FileName>
</TypeIdentifier>
</Enum>
<Enum Name="mRemoteNG.Connection.Protocol.VNC.Colors" Collapsed="true">
<Position X="27.75" Y="2.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAI=</HashCode>
<FileName>Connection\Protocol\VNC\VNCEnum.cs</FileName>
</TypeIdentifier>
</Enum>
<Enum Name="mRemoteNG.Connection.Protocol.VNC.SmartSizeMode" Collapsed="true">
<Position X="27.75" Y="4.25" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAIAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAA=</HashCode>
<FileName>Connection\Protocol\VNC\VNCEnum.cs</FileName>
</TypeIdentifier>
</Enum>
<Font Name="Segoe UI" Size="9" />
</ClassDiagram>

View File

@@ -1,54 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ClassDiagram MajorVersion="1" MinorVersion="1">
<Class Name="mRemoteNG.Connection.New.ConnectionRecordImp" Collapsed="true" BaseTypeListCollapsed="true">
<Position X="7.75" Y="0.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAQAAAAAIAAAAAAAAAAAIIVAAAAAAAAAAAAAAAAAABA=</HashCode>
<FileName>Connection\New\ConnectionRecordImp.cs</FileName>
</TypeIdentifier>
<Lollipop Orientation="Left" Position="0.1" />
</Class>
<Interface Name="mRemoteNG.Connection.New.Connectable">
<Position X="2.75" Y="0.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAQAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Connection\New\Connectable.cs</FileName>
</TypeIdentifier>
</Interface>
<Interface Name="mRemoteNG.Connection.New.ConnectionRecord">
<Position X="5" Y="2.5" Width="1.75" />
<TypeIdentifier>
<HashCode>AAAAAAAAIAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Connection\New\ConnectionRecord.cs</FileName>
</TypeIdentifier>
</Interface>
<Interface Name="mRemoteNG.Connection.New.Protocol">
<Position X="1.5" Y="2.5" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAIAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Connection\New\Protocol.cs</FileName>
</TypeIdentifier>
</Interface>
<Interface Name="mRemoteNG.Connection.New.ProtocolRDP">
<Position X="0.5" Y="4.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Connection\New\ProtocolRDP.cs</FileName>
</TypeIdentifier>
</Interface>
<Interface Name="mRemoteNG.Connection.New.ProtocolSSH">
<Position X="2.75" Y="4.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Connection\New\ProtocolSSH.cs</FileName>
</TypeIdentifier>
</Interface>
<Interface Name="mRemoteNG.Connection.RecordList" Collapsed="true">
<Position X="7.75" Y="1.75" Width="1.5" />
<TypeIdentifier>
<HashCode>AAIAAAAAAAAAAAAACAAAAAQAAkAAAAAAAAAAAABEAAA=</HashCode>
<FileName>Connection\New\RecordList.cs</FileName>
</TypeIdentifier>
</Interface>
<Font Name="Segoe UI" Size="9" />
</ClassDiagram>

View File

@@ -1,7 +1,6 @@
using System;
using mRemoteNG.App;
using mRemoteNG.Config.DataProviders;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Config.Serializers.Csv;
using mRemoteNG.Security;
using mRemoteNG.Tree;

View File

@@ -4,23 +4,23 @@ using mRemoteNG.Config.DatabaseConnectors;
using mRemoteNG.Messages;
using System;
using System.Data;
using System.Data.SqlClient;
using System.Data.Common;
using System.Threading;
namespace mRemoteNG.Config.Connections
{
public class SqlConnectionsUpdateChecker : IConnectionsUpdateChecker
{
private readonly SqlDatabaseConnector _sqlConnector;
private readonly SqlCommand _sqlQuery;
private readonly IDatabaseConnector _dbConnector;
private readonly DbCommand _dbQuery;
private DateTime LastUpdateTime => Runtime.ConnectionsService.LastSqlUpdate;
private DateTime _lastDatabaseUpdateTime;
public SqlConnectionsUpdateChecker()
{
_sqlConnector = DatabaseConnectorFactory.SqlDatabaseConnectorFromSettings();
_sqlQuery = new SqlCommand("SELECT * FROM tblUpdate", _sqlConnector.SqlConnection);
_dbConnector = DatabaseConnectorFactory.DatabaseConnectorFromSettings();
_dbQuery = _dbConnector.DbCommand("SELECT * FROM tblUpdate");
_lastDatabaseUpdateTime = default(DateTime);
}
@@ -46,7 +46,7 @@ namespace mRemoteNG.Config.Connections
{
try
{
_sqlConnector.Connect();
_dbConnector.Connect();
}
catch (Exception e)
{
@@ -76,7 +76,7 @@ namespace mRemoteNG.Config.Connections
var lastUpdateInDb = default(DateTime);
try
{
var sqlReader = _sqlQuery.ExecuteReader(CommandBehavior.CloseConnection);
var sqlReader = _dbQuery.ExecuteReader(CommandBehavior.CloseConnection);
sqlReader.Read();
if (sqlReader.HasRows)
lastUpdateInDb = Convert.ToDateTime(sqlReader["LastUpdate"]);
@@ -114,7 +114,7 @@ namespace mRemoteNG.Config.Connections
private void RaiseConnectionsUpdateAvailableEvent()
{
Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, "Remote connection update is available");
var args = new ConnectionsUpdateAvailableEventArgs(_sqlConnector, _lastDatabaseUpdateTime);
var args = new ConnectionsUpdateAvailableEventArgs(_dbConnector, _lastDatabaseUpdateTime);
ConnectionsUpdateAvailable?.Invoke(this, args);
}
@@ -126,9 +126,9 @@ namespace mRemoteNG.Config.Connections
private void Dispose(bool itIsSafeToDisposeManagedObjects)
{
if (!itIsSafeToDisposeManagedObjects) return;
_sqlConnector.Disconnect();
_sqlConnector.Dispose();
_sqlQuery.Dispose();
_dbConnector.Disconnect();
_dbConnector.Dispose();
_dbQuery.Dispose();
}
}
}

View File

@@ -17,7 +17,7 @@ using mRemoteNG.Tree.Root;
namespace mRemoteNG.Config.Connections
{
public class SqlConnectionsLoader : IConnectionsLoader
public class SqlConnectionsLoader : IConnectionsLoader
{
private readonly IDeserializer<string, IEnumerable<LocalConnectionPropertiesModel>>
_localConnectionPropertiesDeserializer;
@@ -38,7 +38,7 @@ namespace mRemoteNG.Config.Connections
public ConnectionTreeModel Load()
{
var connector = DatabaseConnectorFactory.SqlDatabaseConnectorFromSettings();
var connector = DatabaseConnectorFactory.DatabaseConnectorFromSettings();
var dataProvider = new SqlDataProvider(connector);
var metaDataRetriever = new SqlDatabaseMetaDataRetriever();
var databaseVersionVerifier = new SqlDatabaseVersionVerifier(connector);
@@ -93,7 +93,7 @@ namespace mRemoteNG.Config.Connections
});
}
private SqlConnectionListMetaData HandleFirstRun(SqlDatabaseMetaDataRetriever metaDataRetriever, SqlDatabaseConnector connector)
private SqlConnectionListMetaData HandleFirstRun(SqlDatabaseMetaDataRetriever metaDataRetriever, IDatabaseConnector connector)
{
metaDataRetriever.WriteDatabaseMetaData(new RootNodeInfo(RootNodeType.Connection), connector);
return metaDataRetriever.GetDatabaseMetaData(connector);

View File

@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Globalization;
using System.Linq;
using mRemoteNG.App;
@@ -59,12 +58,12 @@ namespace mRemoteNG.Config.Connections
return;
}
using (var sqlConnector = DatabaseConnectorFactory.SqlDatabaseConnectorFromSettings())
using (var dbConnector = DatabaseConnectorFactory.DatabaseConnectorFromSettings())
{
sqlConnector.Connect();
var databaseVersionVerifier = new SqlDatabaseVersionVerifier(sqlConnector);
dbConnector.Connect();
var databaseVersionVerifier = new SqlDatabaseVersionVerifier(dbConnector);
var metaDataRetriever = new SqlDatabaseMetaDataRetriever();
var metaData = metaDataRetriever.GetDatabaseMetaData(sqlConnector);
var metaData = metaDataRetriever.GetDatabaseMetaData(dbConnector);
if (!databaseVersionVerifier.VerifyDatabaseVersion(metaData.ConfVersion))
{
@@ -73,9 +72,10 @@ namespace mRemoteNG.Config.Connections
return;
}
metaDataRetriever.WriteDatabaseMetaData(rootTreeNode, sqlConnector);
UpdateConnectionsTable(rootTreeNode, sqlConnector);
UpdateUpdatesTable(sqlConnector);
metaDataRetriever.WriteDatabaseMetaData(rootTreeNode, dbConnector);
UpdateConnectionsTable(rootTreeNode, dbConnector);
UpdateUpdatesTable(dbConnector);
}
Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, "Saved connections to database");
@@ -111,7 +111,7 @@ namespace mRemoteNG.Config.Connections
Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, "Saved local connection properties");
}
private void UpdateRootNodeTable(RootNodeInfo rootTreeNode, SqlDatabaseConnector sqlDatabaseConnector)
private void UpdateRootNodeTable(RootNodeInfo rootTreeNode, IDatabaseConnector databaseConnector)
{
var cryptographyProvider = new LegacyRijndaelCryptographyProvider();
string strProtected;
@@ -132,19 +132,17 @@ namespace mRemoteNG.Config.Connections
strProtected = cryptographyProvider.Encrypt("ThisIsNotProtected", Runtime.EncryptionKey);
}
var sqlQuery = new SqlCommand("DELETE FROM tblRoot", sqlDatabaseConnector.SqlConnection);
sqlQuery.ExecuteNonQuery();
var dbQuery = databaseConnector.DbCommand("DELETE FROM tblRoot");
dbQuery.ExecuteNonQuery();
if (rootTreeNode != null)
{
sqlQuery =
new SqlCommand(
"INSERT INTO tblRoot (Name, Export, Protected, ConfVersion) VALUES(\'" +
MiscTools.PrepareValueForDB(rootTreeNode.Name) + "\', 0, \'" + strProtected + "\'," +
ConnectionsFileInfo.ConnectionFileVersion.ToString(CultureInfo.InvariantCulture) +
")",
sqlDatabaseConnector.SqlConnection);
sqlQuery.ExecuteNonQuery();
dbQuery =
databaseConnector.DbCommand(
"INSERT INTO tblRoot (Name, Export, Protected, ConfVersion) VALUES(\'" +
MiscTools.PrepareValueForDB(rootTreeNode.Name) + "\', 0, \'" + strProtected + "\'," +
ConnectionsFileInfo.ConnectionFileVersion.ToString(CultureInfo.InvariantCulture) + ")");
dbQuery.ExecuteNonQuery();
}
else
{
@@ -153,28 +151,28 @@ namespace mRemoteNG.Config.Connections
}
}
private void UpdateConnectionsTable(RootNodeInfo rootTreeNode, SqlDatabaseConnector sqlDatabaseConnector)
private void UpdateConnectionsTable(RootNodeInfo rootTreeNode, IDatabaseConnector databaseConnector)
{
var dataProvider = new SqlDataProvider(databaseConnector);
var currentDataTable = dataProvider.Load();
var cryptoProvider = new LegacyRijndaelCryptographyProvider();
var serializer = new DataTableSerializer(_saveFilter, cryptoProvider,
rootTreeNode.PasswordString.ConvertToSecureString());
serializer.SetSourceDataTable(currentDataTable);
var dataTable = serializer.Serialize(rootTreeNode);
var dataProvider = new SqlDataProvider(sqlDatabaseConnector);
//var dbQuery = databaseConnector.DbCommand("DELETE FROM tblCons");
//dbQuery.ExecuteNonQuery();
var sqlQuery = new SqlCommand("DELETE FROM tblCons", sqlDatabaseConnector.SqlConnection);
sqlQuery.ExecuteNonQuery();
dataProvider.Save(dataTable);
}
private void UpdateUpdatesTable(SqlDatabaseConnector sqlDatabaseConnector)
private void UpdateUpdatesTable(IDatabaseConnector databaseConnector)
{
var sqlQuery = new SqlCommand("DELETE FROM tblUpdate", sqlDatabaseConnector.SqlConnection);
sqlQuery.ExecuteNonQuery();
sqlQuery = new SqlCommand(
"INSERT INTO tblUpdate (LastUpdate) VALUES(\'" + MiscTools.DBDate(DateTime.Now) +
"\')",
sqlDatabaseConnector.SqlConnection);
sqlQuery.ExecuteNonQuery();
var dbQuery = databaseConnector.DbCommand("DELETE FROM tblUpdate");
dbQuery.ExecuteNonQuery();
dbQuery = databaseConnector.DbCommand("INSERT INTO tblUpdate (LastUpdate) VALUES(\'" + MiscTools.DBDate(DateTime.Now) + "\')");
dbQuery.ExecuteNonQuery();
}
private bool SqlUserIsReadOnly()

View File

@@ -2,7 +2,6 @@
using System.Linq;
using mRemoteNG.App;
using mRemoteNG.Config.DataProviders;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Config.Serializers.Xml;
using mRemoteNG.Security;
using mRemoteNG.Security.Factories;
@@ -32,19 +31,16 @@ namespace mRemoteNG.Config.Connections
try
{
var cryptographyProvider = new CryptoProviderFactoryFromSettings().Build();
var connectionNodeSerializer = new XmlConnectionNodeSerializer27(
cryptographyProvider,
connectionTreeModel
.RootNodes.OfType<RootNodeInfo>()
.First().PasswordString
.ConvertToSecureString(),
_saveFilter);
var xmlConnectionsSerializer =
new XmlConnectionsSerializer(cryptographyProvider, connectionNodeSerializer)
{
UseFullEncryption = mRemoteNG.Settings.Default.EncryptCompleteConnectionsFile
};
var xml = xmlConnectionsSerializer.Serialize(connectionTreeModel);
var serializerFactory = new XmlConnectionSerializerFactory();
var xmlConnectionsSerializer = serializerFactory.Build(
cryptographyProvider,
connectionTreeModel,
_saveFilter,
mRemoteNG.Settings.Default.EncryptCompleteConnectionsFile);
var rootNode = connectionTreeModel.RootNodes.OfType<RootNodeInfo>().First();
var xml = xmlConnectionsSerializer.Serialize(rootNode);
var fileDataProvider = new FileDataProviderWithRollingBackup(_connectionFileName);
fileDataProvider.Save(xml);

View File

@@ -1,66 +1,112 @@
using System.Data;
using System.Data.SqlClient;
using mRemoteNG.Config.DatabaseConnectors;
using mRemoteNG.Messages;
using mRemoteNG.App;
using MySql.Data.MySqlClient;
using System.Data.SqlClient;
namespace mRemoteNG.Config.DataProviders
{
public class SqlDataProvider : IDataProvider<DataTable>
{
public SqlDatabaseConnector SqlDatabaseConnector { get; }
public IDatabaseConnector DatabaseConnector { get; }
public SqlDataProvider(SqlDatabaseConnector sqlDatabaseConnector)
public SqlDataProvider(IDatabaseConnector databaseConnector)
{
SqlDatabaseConnector = sqlDatabaseConnector;
DatabaseConnector = databaseConnector;
}
public DataTable Load()
{
var dataTable = new DataTable();
var sqlQuery = new SqlCommand("SELECT * FROM tblCons ORDER BY PositionID ASC");
SqlDatabaseConnector.AssociateItemToThisConnector(sqlQuery);
if (!SqlDatabaseConnector.IsConnected)
var dbQuery = DatabaseConnector.DbCommand("SELECT * FROM tblCons ORDER BY PositionID ASC");
DatabaseConnector.AssociateItemToThisConnector(dbQuery);
if (!DatabaseConnector.IsConnected)
OpenConnection();
var sqlDataReader = sqlQuery.ExecuteReader(CommandBehavior.CloseConnection);
var dbDataReader = dbQuery.ExecuteReader(CommandBehavior.CloseConnection);
if (sqlDataReader.HasRows)
dataTable.Load(sqlDataReader);
sqlDataReader.Close();
if (dbDataReader.HasRows)
dataTable.Load(dbDataReader);
dbDataReader.Close();
return dataTable;
}
public void Save(DataTable dataTable)
{
if (SqlUserIsReadOnly())
if (DbUserIsReadOnly())
{
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg,
"Trying to save connections but the SQL read only checkbox is checked, aborting!");
return;
}
if (!SqlDatabaseConnector.IsConnected)
if (!DatabaseConnector.IsConnected)
OpenConnection();
using (var sqlBulkCopy = new SqlBulkCopy(SqlDatabaseConnector.SqlConnection))
if (DatabaseConnector.GetType() == typeof(MSSqlDatabaseConnector))
{
foreach (DataColumn col in dataTable.Columns)
sqlBulkCopy.ColumnMappings.Add(col.ColumnName, col.ColumnName);
sqlBulkCopy.DestinationTableName = "dbo.tblCons";
sqlBulkCopy.WriteToServer(dataTable);
SqlConnection sqlConnection = (SqlConnection)DatabaseConnector.DbConnection();
using (SqlTransaction transaction = sqlConnection.BeginTransaction(System.Data.IsolationLevel.Serializable))
{
using (SqlCommand sqlCommand = new SqlCommand())
{
sqlCommand.Connection = sqlConnection;
sqlCommand.Transaction = transaction;
sqlCommand.CommandText = "SELECT * FROM tblCons";
using (SqlDataAdapter dataAdpater = new SqlDataAdapter())
{
dataAdpater.SelectCommand = sqlCommand;
SqlCommandBuilder builder = new SqlCommandBuilder(dataAdpater);
// Avoid optimistic concurrency, check if it is necessary.
builder.ConflictOption = ConflictOption.OverwriteChanges;
dataAdpater.UpdateCommand = builder.GetUpdateCommand();
dataAdpater.DeleteCommand = builder.GetDeleteCommand();
dataAdpater.InsertCommand = builder.GetInsertCommand();
dataAdpater.Update(dataTable);
transaction.Commit();
}
}
}
}
else if (DatabaseConnector.GetType() == typeof(MySqlDatabaseConnector))
{
var dbConnection = (MySqlConnection) DatabaseConnector.DbConnection();
using (MySqlTransaction transaction = dbConnection.BeginTransaction(System.Data.IsolationLevel.Serializable))
{
using (MySqlCommand sqlCommand = new MySqlCommand())
{
sqlCommand.Connection = dbConnection;
sqlCommand.Transaction = transaction;
sqlCommand.CommandText = "SELECT * FROM tblCons";
using (MySqlDataAdapter dataAdapter = new MySqlDataAdapter(sqlCommand))
{
dataAdapter.UpdateBatchSize = 1000;
using (MySqlCommandBuilder cb = new MySqlCommandBuilder(dataAdapter))
{
dataAdapter.Update(dataTable);
transaction.Commit();
}
}
}
}
}
}
public void OpenConnection()
{
SqlDatabaseConnector.Connect();
DatabaseConnector.Connect();
}
public void CloseConnection()
{
SqlDatabaseConnector.Disconnect();
DatabaseConnector.Disconnect();
}
private bool SqlUserIsReadOnly()
private bool DbUserIsReadOnly()
{
return mRemoteNG.Settings.Default.SQLReadOnly;
}

View File

@@ -7,18 +7,19 @@ namespace mRemoteNG.Config.DatabaseConnectors
/// <summary>
/// A helper class for testing database connectivity
/// </summary>
public class SqlDatabaseConnectionTester
public class DatabaseConnectionTester
{
public async Task<ConnectionTestResult> TestConnectivity(string server,
public async Task<ConnectionTestResult> TestConnectivity(string type,
string server,
string database,
string username,
string password)
{
using (var sqlConnector = new SqlDatabaseConnector(server, database, username, password))
using (var dbConnector = DatabaseConnectorFactory.DatabaseConnector(type, server, database, username, password))
{
try
{
await sqlConnector.ConnectAsync();
await dbConnector.ConnectAsync();
return ConnectionTestResult.ConnectionSucceded;
}
catch (SqlException sqlException)

View File

@@ -5,14 +5,28 @@ namespace mRemoteNG.Config.DatabaseConnectors
{
public class DatabaseConnectorFactory
{
public static SqlDatabaseConnector SqlDatabaseConnectorFromSettings()
public static IDatabaseConnector DatabaseConnectorFromSettings()
{
var sqlType = mRemoteNG.Settings.Default.SQLServerType;
var sqlHost = mRemoteNG.Settings.Default.SQLHost;
var sqlCatalog = mRemoteNG.Settings.Default.SQLDatabaseName;
var sqlUsername = mRemoteNG.Settings.Default.SQLUser;
var cryptographyProvider = new LegacyRijndaelCryptographyProvider();
var sqlPassword = cryptographyProvider.Decrypt(mRemoteNG.Settings.Default.SQLPass, Runtime.EncryptionKey);
return new SqlDatabaseConnector(sqlHost, sqlCatalog, sqlUsername, sqlPassword);
return DatabaseConnector(sqlType, sqlHost, sqlCatalog, sqlUsername, sqlPassword);
}
public static IDatabaseConnector DatabaseConnector(string type, string server, string database, string username, string password)
{
switch (type)
{
case "mysql":
return new MySqlDatabaseConnector(server, database, username, password);
case "mssql":
default:
return new MSSqlDatabaseConnector(server, database, username, password);
}
}
}
}

View File

@@ -1,13 +1,17 @@
using System;
using System.Data.SqlClient;
using System.Data.Common;
using System.Threading.Tasks;
namespace mRemoteNG.Config.DatabaseConnectors
{
public interface IDatabaseConnector : IDisposable
{
DbConnection DbConnection();
DbCommand DbCommand(string dbCommand);
bool IsConnected { get; }
void Connect();
Task ConnectAsync();
void Disconnect();
void AssociateItemToThisConnector(SqlCommand sqlCommand);
void AssociateItemToThisConnector(DbCommand dbCommand);
}
}

View File

@@ -0,0 +1,99 @@
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Threading.Tasks;
// ReSharper disable ArrangeAccessorOwnerBody
namespace mRemoteNG.Config.DatabaseConnectors
{
public class MSSqlDatabaseConnector : IDatabaseConnector
{
private DbConnection _dbConnection { get; set; } = default(SqlConnection);
private string _dbConnectionString = "";
private readonly string _dbHost;
private readonly string _dbCatalog;
private readonly string _dbUsername;
private readonly string _dbPassword;
public DbConnection DbConnection()
{
return _dbConnection;
}
public DbCommand DbCommand(string dbCommand)
{
return new SqlCommand(dbCommand, (SqlConnection) _dbConnection);
}
public bool IsConnected
{
get { return (_dbConnection.State == ConnectionState.Open); }
}
public MSSqlDatabaseConnector(string sqlServer, string catalog, string username, string password)
{
_dbHost = sqlServer;
_dbCatalog = catalog;
_dbUsername = username;
_dbPassword = password;
Initialize();
}
private void Initialize()
{
BuildSqlConnectionString();
_dbConnection = new SqlConnection(_dbConnectionString);
}
private void BuildSqlConnectionString()
{
if (_dbUsername != "")
BuildDbConnectionStringWithCustomCredentials();
else
BuildDbConnectionStringWithDefaultCredentials();
}
private void BuildDbConnectionStringWithCustomCredentials()
{
_dbConnectionString = $"Data Source={_dbHost};Initial Catalog={_dbCatalog};User Id={_dbUsername};Password={_dbPassword}";
}
private void BuildDbConnectionStringWithDefaultCredentials()
{
_dbConnectionString = $"Data Source={_dbHost};Initial Catalog={_dbCatalog};Integrated Security=True";
}
public void Connect()
{
_dbConnection.Open();
}
public async Task ConnectAsync()
{
await _dbConnection.OpenAsync();
}
public void Disconnect()
{
_dbConnection.Close();
}
public void AssociateItemToThisConnector(DbCommand dbCommand)
{
dbCommand.Connection = (SqlConnection) _dbConnection;
}
public void Dispose()
{
Dispose(true);
}
private void Dispose(bool itIsSafeToFreeManagedObjects)
{
if (!itIsSafeToFreeManagedObjects) return;
_dbConnection.Close();
_dbConnection.Dispose();
}
}
}

View File

@@ -0,0 +1,88 @@
using System.Data;
using System.Data.Common;
using System.Threading.Tasks;
using MySql.Data.MySqlClient;
// ReSharper disable ArrangeAccessorOwnerBody
namespace mRemoteNG.Config.DatabaseConnectors
{
public class MySqlDatabaseConnector : IDatabaseConnector
{
private DbConnection _dbConnection { get; set; } = default(MySqlConnection);
private string _dbConnectionString = "";
private readonly string _dbHost;
private readonly string _dbPort;
private readonly string _dbName;
private readonly string _dbUsername;
private readonly string _dbPassword;
public DbConnection DbConnection()
{
return _dbConnection;
}
public DbCommand DbCommand(string dbCommand)
{
return new MySqlCommand(dbCommand, (MySqlConnection) _dbConnection);
}
public bool IsConnected
{
get { return (_dbConnection.State == ConnectionState.Open); }
}
public MySqlDatabaseConnector(string host, string database, string username, string password)
{
string[] hostParts = host.Split(new char[]{':'}, 2);
_dbHost = hostParts[0];
_dbPort = (hostParts.Length == 2)?hostParts[1]:"3306";
_dbName = database;
_dbUsername = username;
_dbPassword = password;
Initialize();
}
private void Initialize()
{
BuildSqlConnectionString();
_dbConnection = new MySqlConnection(_dbConnectionString);
}
private void BuildSqlConnectionString()
{
_dbConnectionString = $"server={_dbHost};user={_dbUsername};database={_dbName};port={_dbPort};password={_dbPassword}";
}
public void Connect()
{
_dbConnection.Open();
}
public async Task ConnectAsync()
{
await _dbConnection.OpenAsync();
}
public void Disconnect()
{
_dbConnection.Close();
}
public void AssociateItemToThisConnector(DbCommand dbCommand)
{
dbCommand.Connection = (MySqlConnection) _dbConnection;
}
public void Dispose()
{
Dispose(true);
}
private void Dispose(bool itIsSafeToFreeManagedObjects)
{
if (!itIsSafeToFreeManagedObjects) return;
_dbConnection.Close();
_dbConnection.Dispose();
}
}
}

View File

@@ -1,89 +0,0 @@
using System.Data;
using System.Data.SqlClient;
using System.Threading.Tasks;
// ReSharper disable ArrangeAccessorOwnerBody
namespace mRemoteNG.Config.DatabaseConnectors
{
public class SqlDatabaseConnector : IDatabaseConnector
{
public SqlConnection SqlConnection { get; private set; } = default(SqlConnection);
private string _sqlConnectionString = "";
private readonly string _sqlHost;
private readonly string _sqlCatalog;
private readonly string _sqlUsername;
private readonly string _sqlPassword;
public bool IsConnected
{
get { return (SqlConnection.State == ConnectionState.Open); }
}
public SqlDatabaseConnector(string sqlServer, string catalog, string username, string password)
{
_sqlHost = sqlServer;
_sqlCatalog = catalog;
_sqlUsername = username;
_sqlPassword = password;
Initialize();
}
private void Initialize()
{
BuildSqlConnectionString();
SqlConnection = new SqlConnection(_sqlConnectionString);
}
private void BuildSqlConnectionString()
{
if (_sqlUsername != "")
BuildSqlConnectionStringWithCustomCredentials();
else
BuildSqlConnectionStringWithDefaultCredentials();
}
private void BuildSqlConnectionStringWithCustomCredentials()
{
_sqlConnectionString =
$"Data Source={_sqlHost};Initial Catalog={_sqlCatalog};User Id={_sqlUsername};Password={_sqlPassword}";
}
private void BuildSqlConnectionStringWithDefaultCredentials()
{
_sqlConnectionString = $"Data Source={_sqlHost};Initial Catalog={_sqlCatalog};Integrated Security=True";
}
public void Connect()
{
SqlConnection.Open();
}
public async Task ConnectAsync()
{
await SqlConnection.OpenAsync();
}
public void Disconnect()
{
SqlConnection.Close();
}
public void AssociateItemToThisConnector(SqlCommand sqlCommand)
{
sqlCommand.Connection = SqlConnection;
}
public void Dispose()
{
Dispose(true);
}
private void Dispose(bool itIsSafeToFreeManagedObjects)
{
if (!itIsSafeToFreeManagedObjects) return;
SqlConnection.Close();
SqlConnection.Dispose();
}
}
}

View File

@@ -1,8 +1,7 @@
using System.IO;
using System.IO;
using System.Linq;
using mRemoteNG.App;
using mRemoteNG.Config.DataProviders;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Config.Serializers.Xml;
using mRemoteNG.Container;
using mRemoteNG.Messages;

View File

@@ -0,0 +1,18 @@
using mRemoteNG.Config.Serializers.MiscSerializers;
using mRemoteNG.Container;
namespace mRemoteNG.Config.Import
{
/// <summary>
/// Imports connections from Devolutions *.rdm files.
/// </summary>
public class RemoteDesktopManagerImporter : IConnectionImporter<string>
{
public void Import(string source, ContainerInfo destinationContainer)
{
var deserializer = new RemoteDesktopManagerDeserializer();
var tree = deserializer.Deserialize(source);
destinationContainer.AddChildRange(tree.RootNodes[0].Children);
}
}
}

View File

@@ -95,13 +95,12 @@ namespace mRemoteNG.Config.Serializers.Csv
connectionRecord.Password = headers.Contains("Password") ? connectionCsv[headers.IndexOf("Password")] : "";
connectionRecord.Domain = headers.Contains("Domain") ? connectionCsv[headers.IndexOf("Domain")] : "";
connectionRecord.Hostname = headers.Contains("Hostname") ? connectionCsv[headers.IndexOf("Hostname")] : "";
connectionRecord.PuttySession =
headers.Contains("PuttySession") ? connectionCsv[headers.IndexOf("PuttySession")] : "";
connectionRecord.VmId = headers.Contains("VmId") ? connectionCsv[headers.IndexOf("VmId")] : "";
connectionRecord.PuttySession = headers.Contains("PuttySession") ? connectionCsv[headers.IndexOf("PuttySession")] : "";
connectionRecord.LoadBalanceInfo = headers.Contains("LoadBalanceInfo")
? connectionCsv[headers.IndexOf("LoadBalanceInfo")]
: "";
connectionRecord.PreExtApp =
headers.Contains("PreExtApp") ? connectionCsv[headers.IndexOf("PreExtApp")] : "";
connectionRecord.PreExtApp = headers.Contains("PreExtApp") ? connectionCsv[headers.IndexOf("PreExtApp")] : "";
connectionRecord.PostExtApp =
headers.Contains("PostExtApp") ? connectionCsv[headers.IndexOf("PostExtApp")] : "";
connectionRecord.MacAddress =
@@ -158,6 +157,20 @@ namespace mRemoteNG.Config.Serializers.Csv
connectionRecord.UseCredSsp = value;
}
if (headers.Contains("UseVmId"))
{
bool value;
if (bool.TryParse(connectionCsv[headers.IndexOf("UseVmId")], out value))
connectionRecord.UseVmId = value;
}
if (headers.Contains("UseEnhancedMode"))
{
bool value;
if (bool.TryParse(connectionCsv[headers.IndexOf("UseEnhancedMode")], out value))
connectionRecord.UseEnhancedMode = value;
}
if (headers.Contains("RenderingEngine"))
{
HTTPBase.RenderingEngine value;
@@ -174,21 +187,21 @@ namespace mRemoteNG.Config.Serializers.Csv
if (headers.Contains("RDPAuthenticationLevel"))
{
RdpProtocol.AuthenticationLevel value;
AuthenticationLevel value;
if (Enum.TryParse(connectionCsv[headers.IndexOf("RDPAuthenticationLevel")], out value))
connectionRecord.RDPAuthenticationLevel = value;
}
if (headers.Contains("Colors"))
{
RdpProtocol.RDPColors value;
RDPColors value;
if (Enum.TryParse(connectionCsv[headers.IndexOf("Colors")], out value))
connectionRecord.Colors = value;
}
if (headers.Contains("Resolution"))
{
RdpProtocol.RDPResolutions value;
RDPResolutions value;
if (Enum.TryParse(connectionCsv[headers.IndexOf("Resolution")], out value))
connectionRecord.Resolution = value;
}
@@ -272,11 +285,18 @@ namespace mRemoteNG.Config.Serializers.Csv
if (headers.Contains("RedirectSound"))
{
RdpProtocol.RDPSounds value;
RDPSounds value;
if (Enum.TryParse(connectionCsv[headers.IndexOf("RedirectSound")], out value))
connectionRecord.RedirectSound = value;
}
if (headers.Contains("RedirectAudioCapture"))
{
bool value;
if (bool.TryParse(connectionCsv[headers.IndexOf("RedirectAudioCapture")], out value))
connectionRecord.RedirectAudioCapture = value;
}
if (headers.Contains("RedirectKeys"))
{
bool value;
@@ -342,14 +362,14 @@ namespace mRemoteNG.Config.Serializers.Csv
if (headers.Contains("RDGatewayUsageMethod"))
{
RdpProtocol.RDGatewayUsageMethod value;
RDGatewayUsageMethod value;
if (Enum.TryParse(connectionCsv[headers.IndexOf("RDGatewayUsageMethod")], out value))
connectionRecord.RDGatewayUsageMethod = value;
}
if (headers.Contains("RDGatewayUseConnectionCredentials"))
{
RdpProtocol.RDGatewayUseConnectionCredentials value;
RDGatewayUseConnectionCredentials value;
if (Enum.TryParse(connectionCsv[headers.IndexOf("RDGatewayUseConnectionCredentials")], out value))
connectionRecord.RDGatewayUseConnectionCredentials = value;
}
@@ -361,6 +381,12 @@ namespace mRemoteNG.Config.Serializers.Csv
connectionRecord.Favorite = value;
}
if (headers.Contains("RdpVersion"))
{
if (Enum.TryParse(connectionCsv[headers.IndexOf("RdpVersion")], true, out RdpVersion version))
connectionRecord.RdpVersion = version;
}
#region Inheritance
if (headers.Contains("InheritCacheBitmaps"))
@@ -538,6 +564,20 @@ namespace mRemoteNG.Config.Serializers.Csv
connectionRecord.Inheritance.UseCredSsp = value;
}
if (headers.Contains("InheritUseVmId"))
{
bool value;
if (bool.TryParse(connectionCsv[headers.IndexOf("InheritUseVmId")], out value))
connectionRecord.Inheritance.UseVmId = value;
}
if (headers.Contains("InheritUseEnhancedMode"))
{
bool value;
if (bool.TryParse(connectionCsv[headers.IndexOf("InheritUseEnhancedMode")], out value))
connectionRecord.Inheritance.UseEnhancedMode = value;
}
if (headers.Contains("InheritRenderingEngine"))
{
bool value;
@@ -552,6 +592,13 @@ namespace mRemoteNG.Config.Serializers.Csv
connectionRecord.Inheritance.Username = value;
}
if (headers.Contains("InheritVmId"))
{
bool value;
if (bool.TryParse(connectionCsv[headers.IndexOf("InheritVmId")], out value))
connectionRecord.Inheritance.VmId = value;
}
if (headers.Contains("InheritICAEncryptionStrength"))
{
bool value;
@@ -756,6 +803,20 @@ namespace mRemoteNG.Config.Serializers.Csv
connectionRecord.Inheritance.SoundQuality = value;
}
if (headers.Contains("InheritRedirectAudioCapture"))
{
bool value;
if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRedirectAudioCapture")], out value))
connectionRecord.Inheritance.RedirectAudioCapture = value;
}
if (headers.Contains("InheritRdpVersion"))
{
bool value;
if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRdpVersion")], out value))
connectionRecord.Inheritance.RdpVersion = value;
}
#endregion
return connectionRecord;

View File

@@ -55,11 +55,26 @@ namespace mRemoteNG.Config.Serializers.Csv
sb.Append("Password;");
if (_saveFilter.SaveDomain)
sb.Append("Domain;");
sb.Append(
"Hostname;Protocol;PuttySession;Port;ConnectToConsole;UseCredSsp;RenderingEngine;ICAEncryptionStrength;RDPAuthenticationLevel;LoadBalanceInfo;Colors;Resolution;AutomaticResize;DisplayWallpaper;DisplayThemes;EnableFontSmoothing;EnableDesktopComposition;CacheBitmaps;RedirectDiskDrives;RedirectPorts;RedirectPrinters;RedirectClipboard;RedirectSmartCards;RedirectSound;RedirectKeys;PreExtApp;PostExtApp;MacAddress;UserField;ExtApp;Favorite;VNCCompression;VNCEncoding;VNCAuthMode;VNCProxyType;VNCProxyIP;VNCProxyPort;VNCProxyUsername;VNCProxyPassword;VNCColors;VNCSmartSizeMode;VNCViewOnly;RDGatewayUsageMethod;RDGatewayHostname;RDGatewayUseConnectionCredentials;RDGatewayUsername;RDGatewayPassword;RDGatewayDomain;");
sb.Append("Hostname;Port;VmId;Protocol;PuttySession;ConnectToConsole;UseCredSsp;UseVmId;UseEnhancedMode;RenderingEngine;ICAEncryptionStrength;RDPAuthenticationLevel;" +
"LoadBalanceInfo;Colors;Resolution;AutomaticResize;DisplayWallpaper;DisplayThemes;EnableFontSmoothing;EnableDesktopComposition;" +
"CacheBitmaps;RedirectDiskDrives;RedirectPorts;RedirectPrinters;RedirectClipboard;RedirectSmartCards;RedirectSound;RedirectKeys;" +
"PreExtApp;PostExtApp;MacAddress;UserField;ExtApp;Favorite;VNCCompression;VNCEncoding;VNCAuthMode;VNCProxyType;VNCProxyIP;" +
"VNCProxyPort;VNCProxyUsername;VNCProxyPassword;VNCColors;VNCSmartSizeMode;VNCViewOnly;RDGatewayUsageMethod;RDGatewayHostname;" +
"RDGatewayUseConnectionCredentials;RDGatewayUsername;RDGatewayPassword;RDGatewayDomain;RedirectAudioCapture;RdpVersion;");
if (_saveFilter.SaveInheritance)
sb.Append(
"InheritCacheBitmaps;InheritColors;InheritDescription;InheritDisplayThemes;InheritDisplayWallpaper;InheritEnableFontSmoothing;InheritEnableDesktopComposition;InheritDomain;InheritIcon;InheritPanel;InheritPassword;InheritPort;InheritProtocol;InheritPuttySession;InheritRedirectDiskDrives;InheritRedirectKeys;InheritRedirectPorts;InheritRedirectPrinters;InheritRedirectClipboard;InheritRedirectSmartCards;InheritRedirectSound;InheritResolution;InheritAutomaticResize;InheritUseConsoleSession;InheritUseCredSsp;InheritRenderingEngine;InheritUsername;InheritICAEncryptionStrength;InheritRDPAuthenticationLevel;InheritLoadBalanceInfo;InheritPreExtApp;InheritPostExtApp;InheritMacAddress;InheritUserField;InheritFavorite;InheritExtApp;InheritVNCCompression;InheritVNCEncoding;InheritVNCAuthMode;InheritVNCProxyType;InheritVNCProxyIP;InheritVNCProxyPort;InheritVNCProxyUsername;InheritVNCProxyPassword;InheritVNCColors;InheritVNCSmartSizeMode;InheritVNCViewOnly;InheritRDGatewayUsageMethod;InheritRDGatewayHostname;InheritRDGatewayUseConnectionCredentials;InheritRDGatewayUsername;InheritRDGatewayPassword;InheritRDGatewayDomain;InheritRDPAlertIdleTimeout;InheritRDPMinutesToIdleTimeout;InheritSoundQuality");
sb.Append("InheritCacheBitmaps;InheritColors;InheritDescription;InheritDisplayThemes;InheritDisplayWallpaper;" +
"InheritEnableFontSmoothing;InheritEnableDesktopComposition;InheritDomain;InheritIcon;InheritPanel;InheritPassword;InheritPort;" +
"InheritProtocol;InheritPuttySession;InheritRedirectDiskDrives;InheritRedirectKeys;InheritRedirectPorts;InheritRedirectPrinters;" +
"InheritRedirectClipboard;InheritRedirectSmartCards;InheritRedirectSound;InheritResolution;InheritAutomaticResize;" +
"InheritUseConsoleSession;InheritUseCredSsp;InheritUseVmId;InheritUseEnhancedMode;InheritVmId;InheritRenderingEngine;InheritUsername;InheritICAEncryptionStrength;" +
"InheritRDPAuthenticationLevel;InheritLoadBalanceInfo;InheritPreExtApp;InheritPostExtApp;InheritMacAddress;InheritUserField;" +
"InheritFavorite;InheritExtApp;InheritVNCCompression;InheritVNCEncoding;InheritVNCAuthMode;InheritVNCProxyType;InheritVNCProxyIP;" +
"InheritVNCProxyPort;InheritVNCProxyUsername;InheritVNCProxyPassword;InheritVNCColors;InheritVNCSmartSizeMode;InheritVNCViewOnly;" +
"InheritRDGatewayUsageMethod;InheritRDGatewayHostname;InheritRDGatewayUseConnectionCredentials;InheritRDGatewayUsername;" +
"InheritRDGatewayPassword;InheritRDGatewayDomain;InheritRDPAlertIdleTimeout;InheritRDPMinutesToIdleTimeout;InheritSoundQuality;" +
"InheritRedirectAudioCapture;InheritRdpVersion");
}
private void SerializeNodesRecursive(ConnectionInfo node, StringBuilder sb)
@@ -101,11 +116,14 @@ namespace mRemoteNG.Config.Serializers.Csv
sb.Append(FormatForCsv(con.Domain));
sb.Append(FormatForCsv(con.Hostname))
.Append(FormatForCsv(con.Port))
.Append(FormatForCsv(con.VmId))
.Append(FormatForCsv(con.Protocol))
.Append(FormatForCsv(con.PuttySession))
.Append(FormatForCsv(con.Port))
.Append(FormatForCsv(con.UseConsoleSession))
.Append(FormatForCsv(con.UseCredSsp))
.Append(FormatForCsv(con.UseVmId))
.Append(FormatForCsv(con.UseEnhancedMode))
.Append(FormatForCsv(con.RenderingEngine))
.Append(FormatForCsv(con.ICAEncryptionStrength))
.Append(FormatForCsv(con.RDPAuthenticationLevel))
@@ -147,7 +165,9 @@ namespace mRemoteNG.Config.Serializers.Csv
.Append(FormatForCsv(con.RDGatewayUseConnectionCredentials))
.Append(FormatForCsv(con.RDGatewayUsername))
.Append(FormatForCsv(con.RDGatewayPassword))
.Append(FormatForCsv(con.RDGatewayDomain));
.Append(FormatForCsv(con.RDGatewayDomain))
.Append(FormatForCsv(con.RedirectAudioCapture))
.Append(FormatForCsv(con.RdpVersion));
if (!_saveFilter.SaveInheritance)
@@ -178,6 +198,9 @@ namespace mRemoteNG.Config.Serializers.Csv
.Append(FormatForCsv(con.Inheritance.AutomaticResize))
.Append(FormatForCsv(con.Inheritance.UseConsoleSession))
.Append(FormatForCsv(con.Inheritance.UseCredSsp))
.Append(FormatForCsv(con.Inheritance.UseVmId))
.Append(FormatForCsv(con.Inheritance.UseEnhancedMode))
.Append(FormatForCsv(con.Inheritance.VmId))
.Append(FormatForCsv(con.Inheritance.RenderingEngine))
.Append(FormatForCsv(con.Inheritance.Username))
.Append(FormatForCsv(con.Inheritance.ICAEncryptionStrength))
@@ -208,7 +231,9 @@ namespace mRemoteNG.Config.Serializers.Csv
.Append(FormatForCsv(con.Inheritance.RDGatewayDomain))
.Append(FormatForCsv(con.Inheritance.RDPAlertIdleTimeout))
.Append(FormatForCsv(con.Inheritance.RDPMinutesToIdleTimeout))
.Append(FormatForCsv(con.Inheritance.SoundQuality));
.Append(FormatForCsv(con.Inheritance.SoundQuality))
.Append(FormatForCsv(con.Inheritance.RedirectAudioCapture))
.Append(FormatForCsv(con.Inheritance.RdpVersion));
}
private string FormatForCsv(object value)

View File

@@ -14,7 +14,6 @@ using System.Data;
using System.Linq;
using System.Security;
using mRemoteNG.Security;
using mRemoteNG.Security.SymmetricEncryption;
using mRemoteNG.Tools;
namespace mRemoteNG.Config.Serializers.MsSql
@@ -89,26 +88,29 @@ namespace mRemoteNG.Config.Serializers.MsSql
connectionInfo.Domain = (string)dataRow["DomainName"];
connectionInfo.Password = DecryptValue((string)dataRow["Password"]);
connectionInfo.Hostname = (string)dataRow["Hostname"];
connectionInfo.VmId = (string)dataRow["VmId"];
connectionInfo.UseEnhancedMode = (bool)dataRow["UseEnhancedMode"];
connectionInfo.Protocol = (ProtocolType)Enum.Parse(typeof(ProtocolType), (string)dataRow["Protocol"]);
connectionInfo.PuttySession = (string)dataRow["PuttySession"];
connectionInfo.Port = (int)dataRow["Port"];
connectionInfo.UseConsoleSession = (bool)dataRow["ConnectToConsole"];
connectionInfo.UseCredSsp = (bool)dataRow["UseCredSsp"];
connectionInfo.UseVmId = (bool)dataRow["UseVmId"];
connectionInfo.RenderingEngine = (HTTPBase.RenderingEngine)Enum.Parse(typeof(HTTPBase.RenderingEngine),
(string)dataRow["RenderingEngine"]);
connectionInfo.ICAEncryptionStrength =
(IcaProtocol.EncryptionStrength)Enum.Parse(typeof(IcaProtocol.EncryptionStrength),
(string)dataRow["ICAEncryptionStrength"]);
connectionInfo.RDPAuthenticationLevel =
(RdpProtocol.AuthenticationLevel)Enum.Parse(typeof(RdpProtocol.AuthenticationLevel),
(AuthenticationLevel)Enum.Parse(typeof(AuthenticationLevel),
(string)dataRow["RDPAuthenticationLevel"]);
connectionInfo.RDPMinutesToIdleTimeout = (int)dataRow["RDPMinutesToIdleTimeout"];
connectionInfo.RDPAlertIdleTimeout = (bool)dataRow["RDPAlertIdleTimeout"];
connectionInfo.LoadBalanceInfo = (string)dataRow["LoadBalanceInfo"];
connectionInfo.Colors =
(RdpProtocol.RDPColors)Enum.Parse(typeof(RdpProtocol.RDPColors), (string)dataRow["Colors"]);
(RDPColors)Enum.Parse(typeof(RDPColors), (string)dataRow["Colors"]);
connectionInfo.Resolution =
(RdpProtocol.RDPResolutions)Enum.Parse(typeof(RdpProtocol.RDPResolutions),
(RDPResolutions)Enum.Parse(typeof(RDPResolutions),
(string)dataRow["Resolution"]);
connectionInfo.AutomaticResize = (bool)dataRow["AutomaticResize"];
connectionInfo.DisplayWallpaper = (bool)dataRow["DisplayWallpaper"];
@@ -122,9 +124,11 @@ namespace mRemoteNG.Config.Serializers.MsSql
connectionInfo.RedirectClipboard = (bool)dataRow["RedirectClipboard"];
connectionInfo.RedirectSmartCards = (bool)dataRow["RedirectSmartCards"];
connectionInfo.RedirectSound =
(RdpProtocol.RDPSounds)Enum.Parse(typeof(RdpProtocol.RDPSounds), (string)dataRow["RedirectSound"]);
connectionInfo.SoundQuality = (RdpProtocol.RDPSoundQuality)Enum.Parse(typeof(RdpProtocol.RDPSoundQuality),
(RDPSounds)Enum.Parse(typeof(RDPSounds), (string)dataRow["RedirectSound"]);
connectionInfo.SoundQuality = (RDPSoundQuality)Enum.Parse(typeof(RDPSoundQuality),
(string)dataRow["SoundQuality"]);
connectionInfo.RedirectAudioCapture = (bool)dataRow["RedirectAudioCapture"];
connectionInfo.RedirectKeys = (bool)dataRow["RedirectKeys"];
connectionInfo.PreExtApp = (string)dataRow["PreExtApp"];
connectionInfo.PostExtApp = (string)dataRow["PostExtApp"];
@@ -150,19 +154,20 @@ namespace mRemoteNG.Config.Serializers.MsSql
["VNCSmartSizeMode"]);
connectionInfo.VNCViewOnly = (bool)dataRow["VNCViewOnly"];
connectionInfo.RDGatewayUsageMethod =
(RdpProtocol.RDGatewayUsageMethod)Enum.Parse(typeof(RdpProtocol.RDGatewayUsageMethod),
(RDGatewayUsageMethod)Enum.Parse(typeof(RDGatewayUsageMethod),
(string)dataRow["RDGatewayUsageMethod"]);
connectionInfo.RDGatewayHostname = (string)dataRow["RDGatewayHostname"];
connectionInfo.RDGatewayUseConnectionCredentials =
(RdpProtocol.RDGatewayUseConnectionCredentials)Enum.Parse(
typeof(RdpProtocol.
RDGatewayUseConnectionCredentials),
(string)dataRow
["RDGatewayUseConnectionCredentials"]);
(RDGatewayUseConnectionCredentials)Enum.Parse(typeof(RDGatewayUseConnectionCredentials),
(string)dataRow["RDGatewayUseConnectionCredentials"]);
connectionInfo.RDGatewayUsername = (string)dataRow["RDGatewayUsername"];
connectionInfo.RDGatewayPassword = DecryptValue((string)dataRow["RDGatewayPassword"]);
connectionInfo.RDGatewayDomain = (string)dataRow["RDGatewayDomain"];
if (!dataRow.IsNull("RdpVersion")) // table allows null values which must be handled
if (Enum.TryParse((string)dataRow["RdpVersion"], true, out RdpVersion rdpVersion))
connectionInfo.RdpVersion = rdpVersion;
connectionInfo.Inheritance.CacheBitmaps = (bool)dataRow["InheritCacheBitmaps"];
connectionInfo.Inheritance.Colors = (bool)dataRow["InheritColors"];
connectionInfo.Inheritance.Description = (bool)dataRow["InheritDescription"];
@@ -185,10 +190,14 @@ namespace mRemoteNG.Config.Serializers.MsSql
connectionInfo.Inheritance.RedirectSmartCards = (bool)dataRow["InheritRedirectSmartCards"];
connectionInfo.Inheritance.RedirectSound = (bool)dataRow["InheritRedirectSound"];
connectionInfo.Inheritance.SoundQuality = (bool)dataRow["InheritSoundQuality"];
connectionInfo.Inheritance.RedirectAudioCapture = (bool)dataRow["InheritRedirectAudioCapture"];
connectionInfo.Inheritance.Resolution = (bool)dataRow["InheritResolution"];
connectionInfo.Inheritance.AutomaticResize = (bool)dataRow["InheritAutomaticResize"];
connectionInfo.Inheritance.UseConsoleSession = (bool)dataRow["InheritUseConsoleSession"];
connectionInfo.Inheritance.UseCredSsp = (bool)dataRow["InheritUseCredSsp"];
connectionInfo.Inheritance.UseVmId = (bool)dataRow["InheritUseVmId"];
connectionInfo.Inheritance.UseEnhancedMode = (bool)dataRow["InheritUseEnhancedMode"];
connectionInfo.Inheritance.VmId = (bool)dataRow["InheritVmId"];
connectionInfo.Inheritance.RenderingEngine = (bool)dataRow["InheritRenderingEngine"];
connectionInfo.Inheritance.Username = (bool)dataRow["InheritUsername"];
connectionInfo.Inheritance.ICAEncryptionStrength = (bool)dataRow["InheritICAEncryptionStrength"];
@@ -219,6 +228,7 @@ namespace mRemoteNG.Config.Serializers.MsSql
connectionInfo.Inheritance.RDGatewayUsername = (bool)dataRow["InheritRDGatewayUsername"];
connectionInfo.Inheritance.RDGatewayPassword = (bool)dataRow["InheritRDGatewayPassword"];
connectionInfo.Inheritance.RDGatewayDomain = (bool)dataRow["InheritRDGatewayDomain"];
connectionInfo.Inheritance.RdpVersion = (bool)dataRow["InheritRdpVersion"];
}
private string DecryptValue(string cipherText)

View File

@@ -5,8 +5,8 @@ using mRemoteNG.Tools;
using mRemoteNG.Tree;
using mRemoteNG.Tree.Root;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlTypes;
using System.Linq;
using System.Security;
@@ -14,14 +14,17 @@ namespace mRemoteNG.Config.Serializers.MsSql
{
public class DataTableSerializer : ISerializer<ConnectionInfo, DataTable>
{
public readonly int DELETE = 0;
private readonly ICryptographyProvider _cryptographyProvider;
private readonly SecureString _encryptionKey;
private DataTable _dataTable;
private DataTable _sourceDataTable;
private Dictionary<string, int> sourcePrimaryKeyDict = new Dictionary<string, int>();
private const string TableName = "tblCons";
private readonly SaveFilter _saveFilter;
private int _currentNodeIndex;
public Version Version { get; } = new Version(2, 7);
public Version Version { get; } = new Version(2, 8);
public DataTableSerializer(SaveFilter saveFilter,
ICryptographyProvider cryptographyProvider,
@@ -32,6 +35,11 @@ namespace mRemoteNG.Config.Serializers.MsSql
_encryptionKey = encryptionKey.ThrowIfNull(nameof(encryptionKey));
}
public void SetSourceDataTable(DataTable sourceDataTable)
{
_sourceDataTable = sourceDataTable;
}
public DataTable Serialize(ConnectionTreeModel connectionTreeModel)
{
@@ -52,15 +60,33 @@ namespace mRemoteNG.Config.Serializers.MsSql
{
_dataTable = BuildTable();
_currentNodeIndex = 0;
// Register add or update row
SerializeNodesRecursive(serializationTarget);
var entryToDelete = sourcePrimaryKeyDict.Keys.ToList();
foreach( var entry in entryToDelete)
{
_dataTable.Rows.Find(entry).Delete();
}
return _dataTable;
}
private DataTable BuildTable()
{
var dataTable = new DataTable(TableName);
CreateSchema(dataTable);
SetPrimaryKey(dataTable);
DataTable dataTable;
if (_sourceDataTable != null)
{
dataTable = _sourceDataTable;
}else
{
dataTable = new DataTable(TableName);
}
if (dataTable.Columns.Count == 0) CreateSchema(dataTable);
if (dataTable.PrimaryKey.Length == 0 ) SetPrimaryKey(dataTable);
foreach(DataRow row in dataTable.Rows)
{
sourcePrimaryKeyDict.Add((string)row["ConstantID"], DELETE);
}
return dataTable;
}
@@ -72,7 +98,7 @@ namespace mRemoteNG.Config.Serializers.MsSql
dataTable.Columns.Add("ConstantID", typeof(string));
dataTable.Columns.Add("PositionID", typeof(int));
dataTable.Columns.Add("ParentID", typeof(string));
dataTable.Columns.Add("LastChange", typeof(SqlDateTime));
dataTable.Columns.Add("LastChange", MiscTools.DBTimeStampType());
dataTable.Columns.Add("Name", typeof(string));
dataTable.Columns.Add("Type", typeof(string));
dataTable.Columns.Add("Expanded", typeof(bool));
@@ -104,6 +130,7 @@ namespace mRemoteNG.Config.Serializers.MsSql
dataTable.Columns.Add("RedirectClipboard", typeof(bool));
dataTable.Columns.Add("RedirectSmartCards", typeof(bool));
dataTable.Columns.Add("RedirectSound", typeof(string));
dataTable.Columns.Add("RedirectAudioCapture", typeof(bool));
dataTable.Columns.Add("RedirectKeys", typeof(bool));
dataTable.Columns.Add("Connected", typeof(bool));
dataTable.Columns.Add("PreExtApp", typeof(string));
@@ -149,6 +176,7 @@ namespace mRemoteNG.Config.Serializers.MsSql
dataTable.Columns.Add("InheritRedirectClipboard", typeof(bool));
dataTable.Columns.Add("InheritRedirectSmartCards", typeof(bool));
dataTable.Columns.Add("InheritRedirectSound", typeof(bool));
dataTable.Columns.Add("InheritRedirectAudioCapture", typeof(bool));
dataTable.Columns.Add("InheritResolution", typeof(bool));
dataTable.Columns.Add("InheritUseConsoleSession", typeof(bool));
dataTable.Columns.Add("InheritUseCredSsp", typeof(bool));
@@ -188,6 +216,16 @@ namespace mRemoteNG.Config.Serializers.MsSql
dataTable.Columns.Add("InheritRDPMinutesToIdleTimeout", typeof(bool));
dataTable.Columns.Add("InheritRDPAlertIdleTimeout", typeof(bool));
dataTable.Columns.Add("InheritSoundQuality", typeof(bool));
dataTable.Columns.Add("VmId", typeof(string));
dataTable.Columns.Add("UseVmId", typeof(bool));
dataTable.Columns.Add("UseEnhancedMode", typeof(bool));
dataTable.Columns.Add("InheritVmId", typeof(bool));
dataTable.Columns.Add("InheritUseVmId", typeof(bool));
dataTable.Columns.Add("InheritUseEnhancedMode", typeof(bool));
dataTable.Columns.Add("RdpVersion", typeof(string));
dataTable.Columns.Add("InheritRdpVersion", typeof(bool));
dataTable.Columns.Add("EnhancedMode", typeof(bool));
dataTable.Columns.Add("InheritEnhancedMode", typeof(bool));
}
private void SetPrimaryKey(DataTable dataTable)
@@ -205,17 +243,247 @@ namespace mRemoteNG.Config.Serializers.MsSql
SerializeNodesRecursive(child);
}
public bool isRowUpdated(ConnectionInfo connectionInfo, DataRow dataRow)
{
var isFieldNotChange = dataRow["Name"].Equals(connectionInfo.Name) &&
dataRow["Type"].Equals(connectionInfo.GetTreeNodeType().ToString()) &&
dataRow["ParentID"].Equals(connectionInfo.Parent?.ConstantID ?? "") &&
dataRow["PositionID"].Equals(_currentNodeIndex) &&
dataRow["Expanded"].Equals(false) &&
dataRow["Description"].Equals(connectionInfo.Description) &&
dataRow["Icon"].Equals(connectionInfo.Icon) &&
dataRow["Panel"].Equals(connectionInfo.Panel) &&
dataRow["Username"].Equals(_saveFilter.SaveUsername ? connectionInfo.Username : "") &&
dataRow["DomainName"].Equals(_saveFilter.SaveDomain ? connectionInfo.Domain : "");
isFieldNotChange = isFieldNotChange && dataRow["Hostname"].Equals(connectionInfo.Hostname);
isFieldNotChange = isFieldNotChange && dataRow["VmId"].Equals(connectionInfo.VmId);
isFieldNotChange = isFieldNotChange && dataRow["Protocol"].Equals(connectionInfo.Protocol.ToString());
isFieldNotChange = isFieldNotChange && dataRow["PuttySession"].Equals(connectionInfo.PuttySession);
isFieldNotChange = isFieldNotChange &&
dataRow["Port"].Equals(connectionInfo.Port);
isFieldNotChange = isFieldNotChange &&
dataRow["ConnectToConsole"].Equals(connectionInfo.UseConsoleSession);
isFieldNotChange = isFieldNotChange &&
dataRow["UseCredSsp"].Equals(connectionInfo.UseCredSsp);
isFieldNotChange = isFieldNotChange &&
dataRow["UseVmId"].Equals(connectionInfo.UseVmId);
isFieldNotChange = isFieldNotChange &&
dataRow["UseEnhancedMode"].Equals(connectionInfo.UseEnhancedMode);
isFieldNotChange = isFieldNotChange &&
dataRow["RenderingEngine"].Equals(connectionInfo.RenderingEngine.ToString());
isFieldNotChange = isFieldNotChange &&
dataRow["ICAEncryptionStrength"].Equals(connectionInfo.ICAEncryptionStrength.ToString());
isFieldNotChange = isFieldNotChange &&
dataRow["RDPAuthenticationLevel"].Equals(connectionInfo.RDPAuthenticationLevel.ToString());
isFieldNotChange = isFieldNotChange &&
dataRow["RDPMinutesToIdleTimeout"].Equals(connectionInfo.RDPMinutesToIdleTimeout);
isFieldNotChange = isFieldNotChange &&
dataRow["RDPAlertIdleTimeout"].Equals(connectionInfo.RDPAlertIdleTimeout);
isFieldNotChange = isFieldNotChange &&
dataRow["LoadBalanceInfo"].Equals(connectionInfo.LoadBalanceInfo);
isFieldNotChange = isFieldNotChange &&
dataRow["Colors"].Equals(connectionInfo.Colors.ToString());
isFieldNotChange = isFieldNotChange &&
dataRow["Resolution"].Equals(connectionInfo.Resolution.ToString());
isFieldNotChange = isFieldNotChange &&
dataRow["AutomaticResize"].Equals(connectionInfo.AutomaticResize);
isFieldNotChange = isFieldNotChange &&
dataRow["DisplayWallpaper"].Equals(connectionInfo.DisplayWallpaper) &&
dataRow["DisplayThemes"].Equals(connectionInfo.DisplayThemes) &&
dataRow["EnableFontSmoothing"].Equals(connectionInfo.EnableFontSmoothing) &&
dataRow["EnableDesktopComposition"].Equals(connectionInfo.EnableDesktopComposition) &&
dataRow["CacheBitmaps"].Equals(connectionInfo.CacheBitmaps) &&
dataRow["RedirectDiskDrives"].Equals(connectionInfo.RedirectDiskDrives) &&
dataRow["RedirectPorts"].Equals(connectionInfo.RedirectPorts) &&
dataRow["RedirectPrinters"].Equals(connectionInfo.RedirectPrinters) &&
dataRow["RedirectClipboard"].Equals(connectionInfo.RedirectClipboard) &&
dataRow["RedirectSmartCards"].Equals(connectionInfo.RedirectSmartCards) &&
dataRow["RedirectSound"].Equals(connectionInfo.RedirectSound.ToString()) &&
dataRow["SoundQuality"].Equals(connectionInfo.SoundQuality.ToString()) &&
dataRow["RedirectAudioCapture"].Equals(connectionInfo.RedirectAudioCapture) &&
dataRow["RedirectKeys"].Equals(connectionInfo.RedirectKeys);
isFieldNotChange = isFieldNotChange &&
dataRow["Connected"].Equals(false) && // TODO: this column can eventually be removed. we now save this property locally
dataRow["PreExtApp"].Equals(connectionInfo.PreExtApp) &&
dataRow["PostExtApp"].Equals(connectionInfo.PostExtApp) &&
dataRow["MacAddress"].Equals(connectionInfo.MacAddress) &&
dataRow["UserField"].Equals(connectionInfo.UserField) &&
dataRow["ExtApp"].Equals(connectionInfo.ExtApp) &&
dataRow["VNCCompression"].Equals(connectionInfo.VNCCompression.ToString()) &&
dataRow["VNCEncoding"].Equals(connectionInfo.VNCEncoding.ToString()) &&
dataRow["VNCAuthMode"].Equals(connectionInfo.VNCAuthMode.ToString()) &&
dataRow["VNCProxyType"].Equals(connectionInfo.VNCProxyType.ToString()) &&
dataRow["VNCProxyIP"].Equals(connectionInfo.VNCProxyIP) &&
dataRow["VNCProxyPort"].Equals(connectionInfo.VNCProxyPort) &&
dataRow["VNCProxyUsername"].Equals(connectionInfo.VNCProxyUsername) &&
dataRow["VNCColors"].Equals(connectionInfo.VNCColors.ToString()) &&
dataRow["VNCSmartSizeMode"].Equals(connectionInfo.VNCSmartSizeMode.ToString()) &&
dataRow["VNCViewOnly"].Equals(connectionInfo.VNCViewOnly) &&
dataRow["RDGatewayUsageMethod"].Equals(connectionInfo.RDGatewayUsageMethod.ToString()) &&
dataRow["RDGatewayHostname"].Equals(connectionInfo.RDGatewayHostname) &&
dataRow["RDGatewayUseConnectionCredentials"].Equals(connectionInfo.RDGatewayUseConnectionCredentials.ToString()) &&
dataRow["RDGatewayUsername"].Equals(connectionInfo.RDGatewayUsername) &&
dataRow["RDGatewayDomain"].Equals(connectionInfo.RDGatewayDomain) &&
dataRow["RdpVersion"].Equals(connectionInfo.RdpVersion.ToString());
var isInheritanceFieldNotChange = false;
if (_saveFilter.SaveInheritance)
{
isInheritanceFieldNotChange = (dataRow["InheritCacheBitmaps"].Equals(connectionInfo.Inheritance.CacheBitmaps) &&
dataRow["InheritColors"].Equals(connectionInfo.Inheritance.Colors) &&
dataRow["InheritDescription"].Equals(connectionInfo.Inheritance.Description) &&
dataRow["InheritDisplayThemes"].Equals(connectionInfo.Inheritance.DisplayThemes) &&
dataRow["InheritDisplayWallpaper"].Equals(connectionInfo.Inheritance.DisplayWallpaper) &&
dataRow["InheritEnableFontSmoothing"].Equals(connectionInfo.Inheritance.EnableFontSmoothing) &&
dataRow["InheritEnableDesktopComposition"].Equals(connectionInfo.Inheritance.EnableDesktopComposition) &&
dataRow["InheritDomain"].Equals(connectionInfo.Inheritance.Domain) &&
dataRow["InheritIcon"].Equals(connectionInfo.Inheritance.Icon) &&
dataRow["InheritPanel"].Equals(connectionInfo.Inheritance.Panel) &&
dataRow["InheritPassword"].Equals(connectionInfo.Inheritance.Password) &&
dataRow["InheritPort"].Equals(connectionInfo.Inheritance.Port) &&
dataRow["InheritProtocol"].Equals(connectionInfo.Inheritance.Protocol) &&
dataRow["InheritPuttySession"].Equals(connectionInfo.Inheritance.PuttySession) &&
dataRow["InheritRedirectDiskDrives"].Equals(connectionInfo.Inheritance.RedirectDiskDrives) &&
dataRow["InheritRedirectKeys"].Equals(connectionInfo.Inheritance.RedirectKeys) &&
dataRow["InheritRedirectPorts"].Equals(connectionInfo.Inheritance.RedirectPorts) &&
dataRow["InheritRedirectPrinters"].Equals(connectionInfo.Inheritance.RedirectPrinters) &&
dataRow["InheritRedirectClipboard"].Equals(connectionInfo.Inheritance.RedirectClipboard) &&
dataRow["InheritRedirectSmartCards"].Equals(connectionInfo.Inheritance.RedirectSmartCards) &&
dataRow["InheritRedirectSound"].Equals(connectionInfo.Inheritance.RedirectSound) &&
dataRow["InheritSoundQuality"].Equals(connectionInfo.Inheritance.SoundQuality) &&
dataRow["InheritRedirectAudioCapture"].Equals(connectionInfo.Inheritance.RedirectAudioCapture) &&
dataRow["InheritResolution"].Equals(connectionInfo.Inheritance.Resolution) &&
dataRow["InheritAutomaticResize"].Equals(connectionInfo.Inheritance.AutomaticResize) &&
dataRow["InheritUseConsoleSession"].Equals(connectionInfo.Inheritance.UseConsoleSession) &&
dataRow["InheritUseCredSsp"].Equals(connectionInfo.Inheritance.UseCredSsp) &&
dataRow["InheritRenderingEngine"].Equals(connectionInfo.Inheritance.RenderingEngine) &&
dataRow["InheritUsername"].Equals(connectionInfo.Inheritance.Username) &&
dataRow["InheritVmId"].Equals(connectionInfo.Inheritance.VmId) &&
dataRow["InheritUseVmId"].Equals(connectionInfo.Inheritance.UseVmId) &&
dataRow["InheritUseEnhancedMode"].Equals(connectionInfo.Inheritance.UseEnhancedMode) &&
dataRow["InheritICAEncryptionStrength"].Equals(connectionInfo.Inheritance.ICAEncryptionStrength) &&
dataRow["InheritRDPAuthenticationLevel"].Equals(connectionInfo.Inheritance.RDPAuthenticationLevel) &&
dataRow["InheritRDPMinutesToIdleTimeout"].Equals(connectionInfo.Inheritance.RDPMinutesToIdleTimeout) &&
dataRow["InheritRDPAlertIdleTimeout"].Equals(connectionInfo.Inheritance.RDPAlertIdleTimeout) &&
dataRow["InheritLoadBalanceInfo"].Equals(connectionInfo.Inheritance.LoadBalanceInfo) &&
dataRow["InheritPreExtApp"].Equals(connectionInfo.Inheritance.PreExtApp) &&
dataRow["InheritPostExtApp"].Equals(connectionInfo.Inheritance.PostExtApp) &&
dataRow["InheritMacAddress"].Equals(connectionInfo.Inheritance.MacAddress) &&
dataRow["InheritUserField"].Equals(connectionInfo.Inheritance.UserField) &&
dataRow["InheritExtApp"].Equals(connectionInfo.Inheritance.ExtApp) &&
dataRow["InheritVNCCompression"].Equals(connectionInfo.Inheritance.VNCCompression) &&
dataRow["InheritVNCEncoding"].Equals(connectionInfo.Inheritance.VNCEncoding) &&
dataRow["InheritVNCAuthMode"].Equals(connectionInfo.Inheritance.VNCAuthMode) &&
dataRow["InheritVNCProxyType"].Equals(connectionInfo.Inheritance.VNCProxyType) &&
dataRow["InheritVNCProxyIP"].Equals(connectionInfo.Inheritance.VNCProxyIP) &&
dataRow["InheritVNCProxyPort"].Equals(connectionInfo.Inheritance.VNCProxyPort) &&
dataRow["InheritVNCProxyUsername"].Equals(connectionInfo.Inheritance.VNCProxyUsername) &&
dataRow["InheritVNCProxyPassword"].Equals(connectionInfo.Inheritance.VNCProxyPassword) &&
dataRow["InheritVNCColors"].Equals(connectionInfo.Inheritance.VNCColors) &&
dataRow["InheritVNCSmartSizeMode"].Equals(connectionInfo.Inheritance.VNCSmartSizeMode) &&
dataRow["InheritVNCViewOnly"].Equals(connectionInfo.Inheritance.VNCViewOnly) &&
dataRow["InheritRDGatewayUsageMethod"].Equals(connectionInfo.Inheritance.RDGatewayUsageMethod) &&
dataRow["InheritRDGatewayHostname"].Equals(connectionInfo.Inheritance.RDGatewayHostname) &&
dataRow["InheritRDGatewayUseConnectionCredentials"].Equals(connectionInfo.Inheritance.RDGatewayUseConnectionCredentials) &&
dataRow["InheritRDGatewayUsername"].Equals(connectionInfo.Inheritance.RDGatewayUsername) &&
dataRow["InheritRDGatewayPassword"].Equals(connectionInfo.Inheritance.RDGatewayPassword) &&
dataRow["InheritRDGatewayDomain"].Equals(connectionInfo.Inheritance.RDGatewayDomain) &&
dataRow["InheritRdpVersion"].Equals(connectionInfo.Inheritance.RdpVersion));
}
else
{
isInheritanceFieldNotChange = (dataRow["InheritCacheBitmaps"].Equals(false) &&
dataRow["InheritColors"].Equals(false) &&
dataRow["InheritDescription"].Equals(false) &&
dataRow["InheritDisplayThemes"].Equals(false) &&
dataRow["InheritDisplayWallpaper"].Equals(false) &&
dataRow["InheritEnableFontSmoothing"].Equals(false) &&
dataRow["InheritEnableDesktopComposition"].Equals(false) &&
dataRow["InheritDomain"].Equals(false) &&
dataRow["InheritIcon"].Equals(false) &&
dataRow["InheritPanel"].Equals(false) &&
dataRow["InheritPassword"].Equals(false) &&
dataRow["InheritPort"].Equals(false) &&
dataRow["InheritProtocol"].Equals(false) &&
dataRow["InheritPuttySession"].Equals(false) &&
dataRow["InheritRedirectDiskDrives"].Equals(false) &&
dataRow["InheritRedirectKeys"].Equals(false) &&
dataRow["InheritRedirectPorts"].Equals(false) &&
dataRow["InheritRedirectPrinters"].Equals(false) &&
dataRow["InheritRedirectClipboard"].Equals(false) &&
dataRow["InheritRedirectSmartCards"].Equals(false) &&
dataRow["InheritRedirectSound"].Equals(false) &&
dataRow["InheritSoundQuality"].Equals(false) &&
dataRow["InheritRedirectAudioCapture"].Equals(false) &&
dataRow["InheritResolution"].Equals(false) &&
dataRow["InheritAutomaticResize"].Equals(false) &&
dataRow["InheritUseConsoleSession"].Equals(false) &&
dataRow["InheritUseCredSsp"].Equals(false) &&
dataRow["InheritRenderingEngine"].Equals(false) &&
dataRow["InheritUsername"].Equals(false) &&
dataRow["InheritICAEncryptionStrength"].Equals(false) &&
dataRow["InheritRDPAuthenticationLevel"].Equals(false) &&
dataRow["InheritRDPMinutesToIdleTimeout"].Equals(false) &&
dataRow["InheritRDPAlertIdleTimeout"].Equals(false) &&
dataRow["InheritLoadBalanceInfo"].Equals(false) &&
dataRow["InheritPreExtApp"].Equals(false) &&
dataRow["InheritPostExtApp"].Equals(false) &&
dataRow["InheritMacAddress"].Equals(false) &&
dataRow["InheritUserField"].Equals(false) &&
dataRow["InheritExtApp"].Equals(false) &&
dataRow["InheritVNCCompression"].Equals(false) &&
dataRow["InheritVNCEncoding"].Equals(false) &&
dataRow["InheritVNCAuthMode"].Equals(false) &&
dataRow["InheritVNCProxyType"].Equals(false) &&
dataRow["InheritVNCProxyIP"].Equals(false) &&
dataRow["InheritVNCProxyPort"].Equals(false) &&
dataRow["InheritVNCProxyUsername"].Equals(false) &&
dataRow["InheritVNCProxyPassword"].Equals(false) &&
dataRow["InheritVNCColors"].Equals(false) &&
dataRow["InheritVNCSmartSizeMode"].Equals(false) &&
dataRow["InheritVNCViewOnly"].Equals(false) &&
dataRow["InheritRDGatewayUsageMethod"].Equals(false) &&
dataRow["InheritRDGatewayHostname"].Equals(false) &&
dataRow["InheritRDGatewayUseConnectionCredentials"].Equals(false) &&
dataRow["InheritRDGatewayUsername"].Equals(false) &&
dataRow["InheritRDGatewayPassword"].Equals(false) &&
dataRow["InheritRDGatewayDomain"].Equals(false) &&
dataRow["InheritRdpVersion"].Equals(false));
}
var pwd = dataRow["Password"].Equals(_saveFilter.SavePassword ? _cryptographyProvider.Encrypt(connectionInfo.Password, _encryptionKey) : "") &&
dataRow["VNCProxyPassword"].Equals(_cryptographyProvider.Encrypt(connectionInfo.VNCProxyPassword, _encryptionKey)) &&
dataRow["RDGatewayPassword"].Equals(_cryptographyProvider.Encrypt(connectionInfo.RDGatewayPassword, _encryptionKey));
return !(pwd && isFieldNotChange && isInheritanceFieldNotChange);
}
private void SerializeConnectionInfo(ConnectionInfo connectionInfo)
{
_currentNodeIndex++;
var dataRow = _dataTable.NewRow();
dataRow["ID"] = DBNull.Value;
var isNewRow = false;
DataRow dataRow = _dataTable.Rows.Find(connectionInfo.ConstantID);
if (dataRow == null)
{
dataRow = _dataTable.NewRow();
dataRow["ConstantID"] = connectionInfo.ConstantID;
isNewRow = true;
}
else
{
sourcePrimaryKeyDict.Remove(connectionInfo.ConstantID);
}
var tmp = isRowUpdated(connectionInfo, dataRow);
if (!tmp){
return;
}
dataRow["Name"] = connectionInfo.Name;
dataRow["Type"] = connectionInfo.GetTreeNodeType().ToString();
dataRow["ConstantID"] = connectionInfo.ConstantID;
dataRow["ParentID"] = connectionInfo.Parent?.ConstantID ?? "";
dataRow["PositionID"] = _currentNodeIndex;
dataRow["LastChange"] = (SqlDateTime)DateTime.Now;
dataRow["LastChange"] = MiscTools.DBTimeStampNow();
dataRow["Expanded"] =
false; // TODO: this column can eventually be removed. we now save this property locally
dataRow["Description"] = connectionInfo.Description;
@@ -227,11 +495,14 @@ namespace mRemoteNG.Config.Serializers.MsSql
? _cryptographyProvider.Encrypt(connectionInfo.Password, _encryptionKey)
: "";
dataRow["Hostname"] = connectionInfo.Hostname;
dataRow["VmId"] = connectionInfo.VmId;
dataRow["Protocol"] = connectionInfo.Protocol;
dataRow["PuttySession"] = connectionInfo.PuttySession;
dataRow["Port"] = connectionInfo.Port;
dataRow["ConnectToConsole"] = connectionInfo.UseConsoleSession;
dataRow["UseCredSsp"] = connectionInfo.UseCredSsp;
dataRow["UseVmId"] = connectionInfo.UseVmId;
dataRow["UseEnhancedMode"] = connectionInfo.UseEnhancedMode;
dataRow["RenderingEngine"] = connectionInfo.RenderingEngine;
dataRow["ICAEncryptionStrength"] = connectionInfo.ICAEncryptionStrength;
dataRow["RDPAuthenticationLevel"] = connectionInfo.RDPAuthenticationLevel;
@@ -253,9 +524,9 @@ namespace mRemoteNG.Config.Serializers.MsSql
dataRow["RedirectSmartCards"] = connectionInfo.RedirectSmartCards;
dataRow["RedirectSound"] = connectionInfo.RedirectSound;
dataRow["SoundQuality"] = connectionInfo.SoundQuality;
dataRow["RedirectAudioCapture"] = connectionInfo.RedirectAudioCapture;
dataRow["RedirectKeys"] = connectionInfo.RedirectKeys;
dataRow["Connected"] =
false; // TODO: this column can eventually be removed. we now save this property locally
dataRow["Connected"] = false; // TODO: this column can eventually be removed. we now save this property locally
dataRow["PreExtApp"] = connectionInfo.PreExtApp;
dataRow["PostExtApp"] = connectionInfo.PostExtApp;
dataRow["MacAddress"] = connectionInfo.MacAddress;
@@ -276,10 +547,12 @@ namespace mRemoteNG.Config.Serializers.MsSql
dataRow["RDGatewayUsageMethod"] = connectionInfo.RDGatewayUsageMethod;
dataRow["RDGatewayHostname"] = connectionInfo.RDGatewayHostname;
dataRow["RDGatewayUseConnectionCredentials"] = connectionInfo.RDGatewayUseConnectionCredentials;
dataRow["RDGatewayUsername"] =
_cryptographyProvider.Encrypt(connectionInfo.RDGatewayUsername, _encryptionKey);
dataRow["RDGatewayPassword"] = connectionInfo.RDGatewayPassword;
dataRow["RDGatewayUsername"] = connectionInfo.RDGatewayUsername;
dataRow["RDGatewayPassword"] = _cryptographyProvider.Encrypt(connectionInfo.RDGatewayPassword, _encryptionKey);
dataRow["RDGatewayDomain"] = connectionInfo.RDGatewayDomain;
dataRow["RdpVersion"] = connectionInfo.RdpVersion;
if (_saveFilter.SaveInheritance)
{
dataRow["InheritCacheBitmaps"] = connectionInfo.Inheritance.CacheBitmaps;
@@ -304,12 +577,16 @@ namespace mRemoteNG.Config.Serializers.MsSql
dataRow["InheritRedirectSmartCards"] = connectionInfo.Inheritance.RedirectSmartCards;
dataRow["InheritRedirectSound"] = connectionInfo.Inheritance.RedirectSound;
dataRow["InheritSoundQuality"] = connectionInfo.Inheritance.SoundQuality;
dataRow["InheritRedirectAudioCapture"] = connectionInfo.Inheritance.RedirectAudioCapture;
dataRow["InheritResolution"] = connectionInfo.Inheritance.Resolution;
dataRow["InheritAutomaticResize"] = connectionInfo.Inheritance.AutomaticResize;
dataRow["InheritUseConsoleSession"] = connectionInfo.Inheritance.UseConsoleSession;
dataRow["InheritUseCredSsp"] = connectionInfo.Inheritance.UseCredSsp;
dataRow["InheritRenderingEngine"] = connectionInfo.Inheritance.RenderingEngine;
dataRow["InheritUsername"] = connectionInfo.Inheritance.Username;
dataRow["InheritVmId"] = connectionInfo.Inheritance.VmId;
dataRow["InheritUseVmId"] = connectionInfo.Inheritance.UseVmId;
dataRow["InheritUseEnhancedMode"] = connectionInfo.Inheritance.UseEnhancedMode;
dataRow["InheritICAEncryptionStrength"] = connectionInfo.Inheritance.ICAEncryptionStrength;
dataRow["InheritRDPAuthenticationLevel"] = connectionInfo.Inheritance.RDPAuthenticationLevel;
dataRow["InheritRDPMinutesToIdleTimeout"] = connectionInfo.Inheritance.RDPMinutesToIdleTimeout;
@@ -333,11 +610,11 @@ namespace mRemoteNG.Config.Serializers.MsSql
dataRow["InheritVNCViewOnly"] = connectionInfo.Inheritance.VNCViewOnly;
dataRow["InheritRDGatewayUsageMethod"] = connectionInfo.Inheritance.RDGatewayUsageMethod;
dataRow["InheritRDGatewayHostname"] = connectionInfo.Inheritance.RDGatewayHostname;
dataRow["InheritRDGatewayUseConnectionCredentials"] =
connectionInfo.Inheritance.RDGatewayUseConnectionCredentials;
dataRow["InheritRDGatewayUseConnectionCredentials"] = connectionInfo.Inheritance.RDGatewayUseConnectionCredentials;
dataRow["InheritRDGatewayUsername"] = connectionInfo.Inheritance.RDGatewayUsername;
dataRow["InheritRDGatewayPassword"] = connectionInfo.Inheritance.RDGatewayPassword;
dataRow["InheritRDGatewayDomain"] = connectionInfo.Inheritance.RDGatewayDomain;
dataRow["InheritRdpVersion"] = connectionInfo.Inheritance.RdpVersion;
}
else
{
@@ -363,6 +640,7 @@ namespace mRemoteNG.Config.Serializers.MsSql
dataRow["InheritRedirectSmartCards"] = false;
dataRow["InheritRedirectSound"] = false;
dataRow["InheritSoundQuality"] = false;
dataRow["InheritRedirectAudioCapture"] = false;
dataRow["InheritResolution"] = false;
dataRow["InheritAutomaticResize"] = false;
dataRow["InheritUseConsoleSession"] = false;
@@ -396,9 +674,9 @@ namespace mRemoteNG.Config.Serializers.MsSql
dataRow["InheritRDGatewayUsername"] = false;
dataRow["InheritRDGatewayPassword"] = false;
dataRow["InheritRDGatewayDomain"] = false;
dataRow["InheritRdpVersion"] = false;
}
_dataTable.Rows.Add(dataRow);
if (isNewRow)_dataTable.Rows.Add(dataRow);
}
}
}

View File

@@ -20,7 +20,8 @@ namespace mRemoteNG.Config.Serializers.MsSql
.Select(m => new XElement("Node",
new XAttribute("ConnectionId", m.ConnectionId),
new XAttribute("Connected", m.Connected),
new XAttribute("Expanded", m.Expanded)));
new XAttribute("Expanded", m.Expanded),
new XAttribute("Favorite", m.Favorite)));
var root = new XElement("LocalConnections", localConnections);
var xdoc = new XDocument(new XDeclaration("1.0", "utf-8", null), root);
@@ -40,7 +41,8 @@ namespace mRemoteNG.Config.Serializers.MsSql
{
ConnectionId = e.Attribute("ConnectionId")?.Value,
Connected = bool.Parse(e.Attribute("Connected")?.Value ?? "False"),
Expanded = bool.Parse(e.Attribute("Expanded")?.Value ?? "False")
Expanded = bool.Parse(e.Attribute("Expanded")?.Value ?? "False"),
Favorite = bool.Parse(e.Attribute("Favorite")?.Value ?? "False")
});
}

View File

@@ -1,5 +1,4 @@
using System;
using System.Security;
namespace mRemoteNG.Config.Serializers.MsSql
{

View File

@@ -1,5 +1,5 @@
using System;
using System.Data.SqlClient;
using System.Data.Common;
using System.Globalization;
using mRemoteNG.App;
using mRemoteNG.App.Info;
@@ -12,30 +12,31 @@ using mRemoteNG.Tree.Root;
namespace mRemoteNG.Config.Serializers.MsSql
{
public class SqlDatabaseMetaDataRetriever
public class SqlDatabaseMetaDataRetriever
{
public SqlConnectionListMetaData GetDatabaseMetaData(SqlDatabaseConnector sqlDatabaseConnector)
public SqlConnectionListMetaData GetDatabaseMetaData(IDatabaseConnector databaseConnector)
{
SqlConnectionListMetaData metaData;
SqlDataReader sqlDataReader = null;
DbDataReader dbDataReader = null;
try
{
var sqlCommand = new SqlCommand("SELECT * FROM tblRoot", sqlDatabaseConnector.SqlConnection);
if (!sqlDatabaseConnector.IsConnected)
sqlDatabaseConnector.Connect();
sqlDataReader = sqlCommand.ExecuteReader();
if (!sqlDataReader.HasRows)
var dbCommand = databaseConnector.DbCommand("SELECT * FROM tblRoot");
if (!databaseConnector.IsConnected)
databaseConnector.Connect();
dbDataReader = dbCommand.ExecuteReader();
if (!dbDataReader.HasRows)
return null; // assume new empty database
else
sqlDataReader.Read();
dbDataReader.Read();
metaData = new SqlConnectionListMetaData
{
Name = sqlDataReader["Name"] as string ?? "",
Protected = sqlDataReader["Protected"] as string ?? "",
Export = (bool)sqlDataReader["Export"],
Name = dbDataReader["Name"] as string ?? "",
Protected = dbDataReader["Protected"] as string ?? "",
Export = (bool)dbDataReader["Export"],
ConfVersion =
new Version(Convert.ToString(sqlDataReader["confVersion"], CultureInfo.InvariantCulture))
new Version(Convert.ToString(dbDataReader["confVersion"], CultureInfo.InvariantCulture))
};
}
catch (Exception ex)
@@ -45,14 +46,14 @@ namespace mRemoteNG.Config.Serializers.MsSql
}
finally
{
if (sqlDataReader != null && !sqlDataReader.IsClosed)
sqlDataReader.Close();
if (dbDataReader != null && !dbDataReader.IsClosed)
dbDataReader.Close();
}
return metaData;
}
public void WriteDatabaseMetaData(RootNodeInfo rootTreeNode, SqlDatabaseConnector sqlDatabaseConnector)
public void WriteDatabaseMetaData(RootNodeInfo rootTreeNode, IDatabaseConnector databaseConnector)
{
var cryptographyProvider = new LegacyRijndaelCryptographyProvider();
string strProtected;
@@ -73,18 +74,16 @@ namespace mRemoteNG.Config.Serializers.MsSql
strProtected = cryptographyProvider.Encrypt("ThisIsNotProtected", Runtime.EncryptionKey);
}
var sqlQuery = new SqlCommand("DELETE FROM tblRoot", sqlDatabaseConnector.SqlConnection);
sqlQuery.ExecuteNonQuery();
var cmd = databaseConnector.DbCommand("DELETE FROM tblRoot");
cmd.ExecuteNonQuery();
if (rootTreeNode != null)
{
sqlQuery =
new SqlCommand(
"INSERT INTO tblRoot (Name, Export, Protected, ConfVersion) VALUES(\'" +
cmd = databaseConnector.DbCommand(
"INSERT INTO tblRoot (Name, Export, Protected, ConfVersion) VALUES(\'" +
MiscTools.PrepareValueForDB(rootTreeNode.Name) + "\', 0, \'" + strProtected + "\'," +
ConnectionsFileInfo.ConnectionFileVersion.ToString(CultureInfo.InvariantCulture) + ")",
sqlDatabaseConnector.SqlConnection);
sqlQuery.ExecuteNonQuery();
ConnectionsFileInfo.ConnectionFileVersion.ToString(CultureInfo.InvariantCulture) + ")");
cmd.ExecuteNonQuery();
}
else
{

View File

@@ -45,6 +45,9 @@ namespace mRemoteNG.Config.Serializers.Xml
{
var nodeAsContainer = connectionInfo as ContainerInfo;
element.Add(new XAttribute("Name", connectionInfo.Name));
element.Add(new XAttribute("VmId", connectionInfo.VmId));
element.Add(new XAttribute("UseVmId", connectionInfo.UseVmId));
element.Add(new XAttribute("UseEnhancedMode", connectionInfo.UseVmId));
element.Add(new XAttribute("Type", connectionInfo.GetTreeNodeType().ToString()));
if (nodeAsContainer != null)
element.Add(new XAttribute("Expanded", nodeAsContainer.IsExpanded.ToString().ToLowerInvariant()));
@@ -72,6 +75,7 @@ namespace mRemoteNG.Config.Serializers.Xml
element.Add(new XAttribute("Hostname", connectionInfo.Hostname));
element.Add(new XAttribute("Protocol", connectionInfo.Protocol));
element.Add(new XAttribute("RdpVersion", connectionInfo.RdpVersion.ToString().ToLowerInvariant()));
element.Add(new XAttribute("PuttySession", connectionInfo.PuttySession));
element.Add(new XAttribute("Port", connectionInfo.Port));
element.Add(new XAttribute("ConnectToConsole",
@@ -107,6 +111,7 @@ namespace mRemoteNG.Config.Serializers.Xml
connectionInfo.RedirectSmartCards.ToString().ToLowerInvariant()));
element.Add(new XAttribute("RedirectSound", connectionInfo.RedirectSound.ToString()));
element.Add(new XAttribute("SoundQuality", connectionInfo.SoundQuality.ToString()));
element.Add(new XAttribute("RedirectAudioCapture", connectionInfo.RedirectAudioCapture.ToString().ToLowerInvariant()));
element.Add(new XAttribute("RedirectKeys", connectionInfo.RedirectKeys.ToString().ToLowerInvariant()));
element.Add(new XAttribute("Connected",
(connectionInfo.OpenConnections.Count > 0).ToString().ToLowerInvariant()));
@@ -190,6 +195,8 @@ namespace mRemoteNG.Config.Serializers.Xml
connectionInfo.Inheritance.Port.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritProtocol",
connectionInfo.Inheritance.Protocol.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritRdpVersion",
connectionInfo.Inheritance.RdpVersion.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritPuttySession",
connectionInfo.Inheritance.PuttySession.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritRedirectDiskDrives",
@@ -204,12 +211,13 @@ namespace mRemoteNG.Config.Serializers.Xml
element.Add(new XAttribute("InheritRedirectClipboard",
connectionInfo.Inheritance.RedirectClipboard.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritRedirectSmartCards",
connectionInfo
.Inheritance.RedirectSmartCards.ToString().ToLowerInvariant()));
connectionInfo.Inheritance.RedirectSmartCards.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritRedirectSound",
connectionInfo.Inheritance.RedirectSound.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritSoundQuality",
connectionInfo.Inheritance.SoundQuality.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritRedirectAudioCapture",
connectionInfo.Inheritance.RedirectAudioCapture.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritResolution",
connectionInfo.Inheritance.Resolution.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritAutomaticResize",
@@ -284,7 +292,13 @@ namespace mRemoteNG.Config.Serializers.Xml
element.Add(new XAttribute("InheritRDGatewayPassword",
connectionInfo.Inheritance.RDGatewayPassword.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritRDGatewayDomain",
connectionInfo.Inheritance.RDGatewayDomain.ToString().ToLowerInvariant()));
connectionInfo.Inheritance.RDGatewayDomain.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritVmId",
connectionInfo.Inheritance.VmId.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritUseVmId",
connectionInfo.Inheritance.UseVmId.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritUseEnhancedMode",
connectionInfo.Inheritance.UseEnhancedMode.ToString().ToLowerInvariant()));
}
else
{
@@ -311,6 +325,7 @@ namespace mRemoteNG.Config.Serializers.Xml
element.Add(new XAttribute("InheritRedirectSmartCards", falseString));
element.Add(new XAttribute("InheritRedirectSound", falseString));
element.Add(new XAttribute("InheritSoundQuality", falseString));
element.Add(new XAttribute("InheritRedirectAudioCapture", falseString));
element.Add(new XAttribute("InheritResolution", falseString));
element.Add(new XAttribute("InheritAutomaticResize", falseString));
element.Add(new XAttribute("InheritUseConsoleSession", falseString));

View File

@@ -0,0 +1,33 @@
using System.Linq;
using mRemoteNG.Connection;
using mRemoteNG.Security;
using mRemoteNG.Tree;
using mRemoteNG.Tree.Root;
namespace mRemoteNG.Config.Serializers.Xml
{
public class XmlConnectionSerializerFactory
{
public ISerializer<ConnectionInfo, string> Build(
ICryptographyProvider cryptographyProvider,
ConnectionTreeModel connectionTreeModel,
SaveFilter saveFilter = null,
bool useFullEncryption = false)
{
var encryptionKey = connectionTreeModel
.RootNodes.OfType<RootNodeInfo>()
.First().PasswordString
.ConvertToSecureString();
var connectionNodeSerializer = new XmlConnectionNodeSerializer27(
cryptographyProvider,
encryptionKey,
saveFilter ?? new SaveFilter());
return new XmlConnectionsSerializer(cryptographyProvider, connectionNodeSerializer)
{
UseFullEncryption = useFullEncryption
};
}
}
}

View File

@@ -226,8 +226,8 @@ namespace mRemoteNG.Config.Serializers.Xml
if (_confVersion < 1.1) //1.0 - 0.1
{
connectionInfo.Resolution = xmlnode.GetAttributeAsBool("Fullscreen")
? RdpProtocol.RDPResolutions.Fullscreen
: RdpProtocol.RDPResolutions.FitToWindow;
? RDPResolutions.Fullscreen
: RDPResolutions.FitToWindow;
}
if (!Runtime.UseCredentialManager || _confVersion <= 2.6) // 0.2 - 2.6
@@ -257,7 +257,7 @@ namespace mRemoteNG.Config.Serializers.Xml
}
else
{
connectionInfo.Port = (int)RdpProtocol.Defaults.Port;
connectionInfo.Port = (int)RdpProtocol6.Defaults.Port;
connectionInfo.Protocol = ProtocolType.RDP;
}
@@ -279,7 +279,7 @@ namespace mRemoteNG.Config.Serializers.Xml
if (xmlnode.GetAttributeAsBool("UseVNC"))
connectionInfo.Port = (int)ProtocolVNC.Defaults.Port;
else
connectionInfo.Port = (int)RdpProtocol.Defaults.Port;
connectionInfo.Port = (int)RdpProtocol6.Defaults.Port;
}
connectionInfo.UseConsoleSession = false;
@@ -318,34 +318,36 @@ namespace mRemoteNG.Config.Serializers.Xml
if (_confVersion >= 1.3)
{
connectionInfo.Colors = xmlnode.GetAttributeAsEnum<RdpProtocol.RDPColors>("Colors");
connectionInfo.Resolution = xmlnode.GetAttributeAsEnum<RdpProtocol.RDPResolutions>("Resolution");
connectionInfo.RedirectSound = xmlnode.GetAttributeAsEnum<RdpProtocol.RDPSounds>("RedirectSound");
connectionInfo.Colors = xmlnode.GetAttributeAsEnum<RDPColors>("Colors");
connectionInfo.Resolution = xmlnode.GetAttributeAsEnum<RDPResolutions>("Resolution");
connectionInfo.RedirectSound = xmlnode.GetAttributeAsEnum<RDPSounds>("RedirectSound");
connectionInfo.RedirectAudioCapture = xmlnode.GetAttributeAsBool("RedirectAudioCapture");
}
else
{
switch (xmlnode.GetAttributeAsInt("Colors"))
{
case 0:
connectionInfo.Colors = RdpProtocol.RDPColors.Colors256;
connectionInfo.Colors = RDPColors.Colors256;
break;
case 1:
connectionInfo.Colors = RdpProtocol.RDPColors.Colors16Bit;
connectionInfo.Colors = RDPColors.Colors16Bit;
break;
case 2:
connectionInfo.Colors = RdpProtocol.RDPColors.Colors24Bit;
connectionInfo.Colors = RDPColors.Colors24Bit;
break;
case 3:
connectionInfo.Colors = RdpProtocol.RDPColors.Colors32Bit;
connectionInfo.Colors = RDPColors.Colors32Bit;
break;
// ReSharper disable once RedundantCaseLabel
case 4:
default:
connectionInfo.Colors = RdpProtocol.RDPColors.Colors15Bit;
connectionInfo.Colors = RDPColors.Colors15Bit;
break;
}
connectionInfo.RedirectSound = xmlnode.GetAttributeAsEnum<RdpProtocol.RDPSounds>("RedirectSound");
connectionInfo.RedirectSound = xmlnode.GetAttributeAsEnum<RDPSounds>("RedirectSound");
connectionInfo.RedirectAudioCapture = xmlnode.GetAttributeAsBool("RedirectAudioCapture");
}
if (_confVersion >= 1.3)
@@ -368,6 +370,7 @@ namespace mRemoteNG.Config.Serializers.Xml
connectionInfo.Inheritance.RedirectSmartCards =
xmlnode.GetAttributeAsBool("InheritRedirectSmartCards");
connectionInfo.Inheritance.RedirectSound = xmlnode.GetAttributeAsBool("InheritRedirectSound");
connectionInfo.Inheritance.RedirectAudioCapture = xmlnode.GetAttributeAsBool("RedirectAudioCapture");
connectionInfo.Inheritance.Resolution = xmlnode.GetAttributeAsBool("InheritResolution");
connectionInfo.Inheritance.UseConsoleSession =
xmlnode.GetAttributeAsBool("InheritUseConsoleSession");
@@ -439,7 +442,7 @@ namespace mRemoteNG.Config.Serializers.Xml
if (_confVersion >= 1.8)
{
connectionInfo.RDPAuthenticationLevel =
xmlnode.GetAttributeAsEnum<RdpProtocol.AuthenticationLevel>("RDPAuthenticationLevel");
xmlnode.GetAttributeAsEnum<AuthenticationLevel>("RDPAuthenticationLevel");
connectionInfo.Inheritance.RDPAuthenticationLevel =
xmlnode.GetAttributeAsBool("InheritRDPAuthenticationLevel");
}
@@ -469,10 +472,10 @@ namespace mRemoteNG.Config.Serializers.Xml
{
// Get settings
connectionInfo.RDGatewayUsageMethod =
xmlnode.GetAttributeAsEnum<RdpProtocol.RDGatewayUsageMethod>("RDGatewayUsageMethod");
xmlnode.GetAttributeAsEnum<RDGatewayUsageMethod>("RDGatewayUsageMethod");
connectionInfo.RDGatewayHostname = xmlnode.GetAttributeAsString("RDGatewayHostname");
connectionInfo.RDGatewayUseConnectionCredentials =
xmlnode.GetAttributeAsEnum<RdpProtocol.RDGatewayUseConnectionCredentials>(
xmlnode.GetAttributeAsEnum<RDGatewayUseConnectionCredentials>(
"RDGatewayUseConnectionCredentials");
connectionInfo.RDGatewayUsername = xmlnode.GetAttributeAsString("RDGatewayUsername");
connectionInfo.RDGatewayPassword =
@@ -523,7 +526,7 @@ namespace mRemoteNG.Config.Serializers.Xml
if (_confVersion >= 2.6)
{
connectionInfo.SoundQuality =
xmlnode.GetAttributeAsEnum<RdpProtocol.RDPSoundQuality>("SoundQuality");
xmlnode.GetAttributeAsEnum<RDPSoundQuality>("SoundQuality");
connectionInfo.Inheritance.SoundQuality = xmlnode.GetAttributeAsBool("InheritSoundQuality");
connectionInfo.RDPMinutesToIdleTimeout = xmlnode.GetAttributeAsInt("RDPMinutesToIdleTimeout");
connectionInfo.Inheritance.RDPMinutesToIdleTimeout =
@@ -536,17 +539,24 @@ namespace mRemoteNG.Config.Serializers.Xml
if (_confVersion >= 2.7)
{
connectionInfo.RedirectClipboard = xmlnode.GetAttributeAsBool("RedirectClipboard");
connectionInfo.Inheritance.RedirectClipboard = xmlnode.GetAttributeAsBool("InheritRedirectClipboard");
connectionInfo.Favorite = xmlnode.GetAttributeAsBool("Favorite");
connectionInfo.UseVmId = xmlnode.GetAttributeAsBool("UseVmId");
connectionInfo.VmId = xmlnode.GetAttributeAsString("VmId");
connectionInfo.UseEnhancedMode = xmlnode.GetAttributeAsBool("UseEnhancedMode");
connectionInfo.Inheritance.RedirectClipboard = xmlnode.GetAttributeAsBool("InheritRedirectClipboard");
connectionInfo.Inheritance.Favorite = xmlnode.GetAttributeAsBool("InheritFavorite");
connectionInfo.RdpVersion = xmlnode.GetAttributeAsEnum("RdpVersion", RdpVersion.Highest);
connectionInfo.Inheritance.RdpVersion = xmlnode.GetAttributeAsBool("InheritRdpVersion");
connectionInfo.Inheritance.UseVmId = xmlnode.GetAttributeAsBool("InheritUseVmId");
connectionInfo.Inheritance.VmId = xmlnode.GetAttributeAsBool("InheritVmId");
connectionInfo.Inheritance.UseEnhancedMode = xmlnode.GetAttributeAsBool("InheritUseEnhancedMode");
}
}
catch (Exception ex)
{
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg,
string.Format(Language.strGetConnectionInfoFromXmlFailed,
connectionInfo.Name, ConnectionFileName,
ex.Message));
string.Format(Language.strGetConnectionInfoFromXmlFailed,
connectionInfo.Name, ConnectionFileName, ex.Message));
}
return connectionInfo;

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