Compare commits

...

191 Commits

Author SHA1 Message Date
Dimitrij
985feb4b91 name space sync 2023-03-03 23:25:18 +00:00
Dimitrij
c43c85bb21 lib Update
correction for update window
2023-03-03 22:19:38 +00:00
Dimitrij
038074131c add template for build versioning 2023-03-03 20:45:40 +00:00
Dimitrij
ab9156a7d3 Merge branch 'v1.77.3-dev' of https://github.com/mRemoteNG/mRemoteNG into v1.77.3-dev 2023-03-03 15:44:34 +00:00
Dimitrij
f4b76818e8 lib update 2023-03-03 15:42:33 +00:00
Dimitrij
12a399a354 Merge pull request #2364 from BlueBlock/update_sql_usage_instructions
update sql usage doc
2023-03-02 13:55:24 +00:00
BlueBlock
dfdbbea85c sql usage doc updated 2023-03-02 08:32:07 -05:00
Dimitrij
fe94da4727 lib update 2023-03-02 09:42:43 +00:00
Dimitrij
361ae3af50 Merge pull request #2362 from BlueBlock/fix_use_of_sql_database
Fix use of sql database
2023-03-02 09:34:06 +00:00
BlueBlock
9a2453524a update db to 2.9 2023-03-01 14:19:41 -05:00
BlueBlock
3a2e128e98 add missing columns to serializer 2023-03-01 11:22:18 -05:00
BlueBlock
1bd2dbf9f0 modify schema to be consistent 2023-03-01 11:21:55 -05:00
BlueBlock
b7f880e7f8 modify sql bit columns to be consistent 2023-03-01 11:21:26 -05:00
BlueBlock
13cd926b4f add missing columns 2023-03-01 09:37:10 -05:00
BlueBlock
6fb7b1c6e4 update docs to reflect auto-schema generation 2023-03-01 07:29:31 -05:00
BlueBlock
8f35015a6c fix db upgrade
fix db upgrade 2.8->2.9
2023-03-01 07:11:45 -05:00
BlueBlock
a926bccb97 fix db upgrade
fix db upgrade 2.7->2.8
2023-03-01 07:11:30 -05:00
BlueBlock
b9f2abf5eb add db schema initialization on a new empty database 2023-03-01 07:10:29 -05:00
BlueBlock
8dc5bda171 Update SqlDatabaseVersionVerifier.cs
fix CRLF of file
2023-03-01 07:09:33 -05:00
Dimitrij
d24bdb543b lib update 2023-02-26 21:40:14 +00:00
Dimitrij
8e248cb545 lib update 2023-02-21 21:48:20 +00:00
Dimitrij
21dd175456 lib update 2023-02-17 19:49:47 +00:00
Dimitrij
46732803c3 Merge pull request #2356 from BlueBlock/improve_options_page_speed
improve speed for the display of the options page
2023-02-16 20:16:47 +00:00
BlueBlock
39d205bd4d improve speed for the display of the options page
rather than create the options page on demand, instantiate the options page immediately upon app start though in the background using idle time.
2023-02-16 14:57:11 -05:00
Dimitrij
8e2bd7997e update "Known Issues" regarding how-to update PuttyNG to latest 2023-02-16 11:12:44 +00:00
Dimitrij
76db9a6c62 Merge pull request #2352 from pakass/SSH.NET-update
SSH.NET Update
2023-02-16 09:45:30 +00:00
pakass
c03d5e891d update Changelog 2023-02-15 15:15:55 +01:00
pakass
b21f6e8ce7 update SSH.NET 2023-02-15 15:11:22 +01:00
Dimitrij
1f80e5339b Merge pull request #2348 from BlueBlock/remove_mat_kit
Remove mat kit included unintentionally
2023-02-13 09:30:48 +00:00
BlueBlock
dc616f8ea1 remove mat kit included unintentionally
It appears the mat kit config was included along with some .xlf definitions on the csproj

Remove th mat kit and references
2023-02-12 16:39:30 -05:00
Dimitrij
dc6588243f libs update 2023-02-11 21:31:12 +00:00
Dimitrij
690d3b0d4e Merge pull request #2347 from savornicesei/simo/gh-2344-docs-log4net-patching
Documented manual patching of  log4net CVE-2018-1285 vulnerability #2344
2023-02-11 12:41:09 +00:00
Dimitrij
4bc5dffabb Merge pull request #2346 from BlueBlock/add_feature_to_auto_reconnect_without_clicking_check
Modify "auto reconnect" to have the ability to really auto-reconnect
2023-02-11 12:35:02 +00:00
Simona Avornicesei
55a1e4a544 Documented manual patching of log4net CVE-2018-1285 vulnerability #2344 2023-02-10 21:17:26 +02:00
BlueBlock
5cb32dd75a change reconnect timer from 2s to 5s
Change and increase the reconnect timer to avoid too frequent connection attempts.
2023-02-10 04:40:55 -05:00
BlueBlock
f858c9fe48 fix checkbox state 2023-02-10 04:39:13 -05:00
BlueBlock
0ac39af404 modify "auto reconnect" to really auto-reconnect
The auto-reconnect does not automatically reconnect but instead displays a reconnect dialog. A second Options checkbox is added to allow true auto-reconnect.
2023-02-09 13:41:31 -05:00
Dimitrij
fc757b236f lib update 2023-02-04 16:42:12 +00:00
Dimitrij
a921e6e3d4 Merge pull request #2340 from BlueBlock/set_default_theme_on_first_run
set the default theme setting
2023-02-04 16:28:34 +00:00
Dimitrij
8cf0f50565 Merge pull request #2341 from BlueBlock/fix_broken_tests
Fix broken tests
2023-02-04 16:26:34 +00:00
Dimitrij
575ad7664f Merge pull request #2343 from savornicesei/simo/gh-2342-installer-in-debug-mode
Build installer in Debug mode #2342
2023-02-04 16:23:51 +00:00
Dimitrij
be17488070 Merge pull request #2339 from BlueBlock/add_missing_settings
Add 2 missing settings
2023-02-04 16:23:07 +00:00
Simona Avornicesei
f504107928 Build installer in Debug mode #2342 2023-02-04 10:10:51 +02:00
BlueBlock
0113f549c5 fix remaining unit tests 2023-02-03 17:35:09 -05:00
BlueBlock
9ff831faab fix additional tests 2023-02-03 17:05:36 -05:00
BlueBlock
a9ca243c0b fix protocol config unit tests 2023-02-03 16:53:29 -05:00
BlueBlock
553bbef45f set the default theme setting
On the initial start of a fresh install, if the options are opened the theme is then set from an empty string to the default. This causes the user to see the "must restart app" dialog when closing the options.

This only occurs on the initial run of the app. If the app is closed and run again, the theme will have been set.
2023-02-03 14:34:38 -05:00
BlueBlock
8f713f861b Add 2 missing settings
Two settings are missing in the settings but do exist in the Designer class.  These settings are used in code so they do need to exist.
ConDefaultRDGatewayUserViaAPI
ConDefaultRDGatewayExternalCredentialProvider
2023-02-03 14:12:02 -05:00
Dimitrij
324054b9d7 Merge pull request #2337 from BlueBlock/set_language_resx_to_autogen_language_class
set language.resx to auto generate the designer class
2023-02-03 10:10:20 +00:00
BlueBlock
d3fc9404ee set language.resx to auto generate the designer class
This avoids the need to manually regenerate the Language.Designer.cs file.

Note that in VS the file Language.Designer.cs will appear under Language.resx but the actual file locations have not changed.
2023-02-02 10:25:27 -05:00
Dimitrij
5bb780439b add autodate as was suggested by @savornicese 2023-02-01 12:56:43 +00:00
Dimitrij
f0e6008441 lib update 2023-02-01 12:44:37 +00:00
Dimitrij
39dd69f15e Merge pull request #2334 from BlueBlock/fix_build_order
Fix the dependencies for the Installer project build
2023-02-01 12:37:47 +00:00
Dimitrij
7b2e89df26 Merge pull request #2335 from BlueBlock/update_packages
Update project packages
2023-02-01 12:36:14 +00:00
BlueBlock
aa853f8481 Update project packages 2023-01-31 14:44:37 -05:00
BlueBlock
83bba75af6 Fix the dependencies for the Installer project build
The Installer project fails to build without also specifying the ExternalConnectors and mRemoteNG projects as dependencies.
2023-01-31 10:46:51 -05:00
Dimitrij
23889aa5b1 lib update 2023-01-08 11:57:03 +00:00
Dimitrij
5e6094fc42 lib update 2022-11-15 15:16:03 +00:00
Dimitrij
a4181cb6d6 Merge pull request #2301 from bartuszekj/splash_screen_fix
Fix for splash screen to appear on the primary screen.
2022-11-14 09:29:06 +00:00
Jerzy Bartuszek
88c49f0722 Fix for splash screen to appear on the primary screen. 2022-11-11 17:06:50 -06:00
Dimitrij
513d9e199c lib update 2022-11-09 14:34:02 +00:00
Dimitrij
e80975c56e lib update 2022-10-20 11:53:32 +01:00
Dimitrij
9051ac102c Merge pull request #2298 from SOlangsam/patch-2
Update mysql_db_setup.sql
2022-10-19 19:13:44 +01:00
SOlangsam
39a9b2e619 Update mysql_db_setup.sql
Added missing fields
Fix Issue for mysql #2292
2022-10-11 16:40:08 +02:00
Dimitrij
dbc55d248f add version color overwrite 2022-10-06 18:58:52 +01:00
Dimitrij
2b46180bfb clear inherited max-width 2022-10-06 18:41:31 +01:00
Dimitrij
5abe6c7e27 empty css 2022-10-06 18:30:31 +01:00
Dimitrij
4595ebeb9a next try to fix theme 2022-10-06 17:36:45 +01:00
Dimitrij
815c08e6d4 fix colors of sidebar 2022-10-05 21:31:30 +01:00
Dimitrij
a72ad218a0 fix for menu links color 2022-10-05 21:14:46 +01:00
Dimitrij
944ad1f769 Merge pull request #2295 from CrunchyBlue/v1.77.3-dev
*Updates hyperlink style to make links more visible to end users
2022-10-05 19:40:07 +01:00
PRINTABLE\dgagliardi
e17a68f61c *Updates hyperlink style to make links more visible to end users 2022-10-05 11:40:30 -05:00
Dimitrij
0b8196be68 Merge pull request #2285 from tecxx/develop-orig
support extraction of SSH private keys from external cred prov
2022-09-07 13:59:21 +01:00
tecxx
d9c01148b7 support extraction of SSH private keys from external credential provider (DSS)
supported formats: rsa, rsa with passphrase, putty private key
2022-09-07 14:08:29 +02:00
Dimitrij
2b3cfd992f Merge pull request #2275 from tecxx/develop-orig
external connectors improvement
2022-08-25 21:36:27 +01:00
tecxx
7e4bd7a6f3 add UI property selectors for external connectors
add support for external credential provider in remote desktop gateway
rename TSS to DSS
fix tests and property naming issues
2022-08-25 21:58:16 +02:00
Dimitrij
161e0ed637 fix for #2208 2022-08-22 10:31:54 +01:00
Dimitrij
1ee03e863c Merge branch 'v1.77.3-dev' of https://github.com/mRemoteNG/mRemoteNG into v1.77.3-dev 2022-07-29 23:26:59 +01:00
Dimitrij
2411481d8b lib upd 2022-07-29 23:26:14 +01:00
Dimitrij
0314a627ed Merge pull request #2259 from luciusagarthy/patch-1
Update Language.cs-CZ.resx
2022-07-27 23:39:09 +01:00
Dimitrij
4d339a0b09 Merge pull request #2261 from maxshlain/v1.77.3-hide-filemenu
Implement Show/Hide file menu in view menu
2022-07-27 23:38:37 +01:00
Dimitrij
c171e7f94b Merge branch 'v1.77.3-dev' of https://github.com/mRemoteNG/mRemoteNG into v1.77.3-dev 2022-07-17 23:14:21 +01:00
Dimitrij
eac4d966d9 remove not needed reference to old ObjectListView 2.7 2022-07-17 23:11:36 +01:00
Dimitrij
c20868c20c lib update 2022-07-17 22:42:17 +01:00
maxim-shlain
bb74d46f1f Implement Show/Hide file menu in view menu 2022-07-08 19:34:42 +03:00
luciusagarthy
152d48c583 Update Language.cs-CZ.resx
Thank you for a great app. I will contribute more. Here is some translation.
2022-07-07 16:19:48 +02:00
Dimitrij
b7a0155ba4 lib update 2022-06-25 06:39:19 +01:00
Dimitrij
0414724b21 update 2022-06-13 13:34:21 +01:00
Dimitrij
469f21db8d lib update 2022-06-13 10:35:41 +01:00
Dimitrij
b6c9d30195 Merge pull request #2244 from tecxx/develop-orig
save RCG and RestrictedAdmin fields correctly in connections file
2022-06-11 11:30:26 +01:00
tecxx
7b89430317 quickfix to save application settings correctly 2022-06-10 21:31:55 +02:00
tecxx
5bd854116a rcg/restrictedadmin fixes: schema file and defaults to false 2022-06-08 21:22:59 +02:00
tecxx
3fb7575529 save RCG and RestrictedAdmin fields correctly in connections file 2022-06-08 20:55:06 +02:00
Dimitrij
a3a868c2ce Merge pull request #2235 from jafin/fix/topmenu
fix (Toolbar): Remove unused `modeToolStripmenuItem` from Main toolbar
2022-06-03 09:59:26 +01:00
Jason Finch
1eb6fc2235 fix (Toolbar): Remove unused modeToolStripmenuItem from Main toolbar 2022-06-02 17:01:06 +10:00
Dimitrij
5ff4502f0a Merge pull request #2231 from simonai1254/patch-1
Specify "Desktop Runtime" in Requirements
2022-05-23 21:24:38 +01:00
Simon Monai
3126b8d4b0 Specify "Desktop Runtime" in Requirements 2022-05-23 22:15:00 +02:00
Dimitrij
dfb1d34b8a cleaning redundant blocks 2022-05-14 20:39:00 +01:00
Dimitrij
ace62c07be lib update 2022-05-13 01:55:18 +01:00
Dimitrij
ec2f3024b6 implement DPIAware, change splash screen to wpf 2022-05-13 01:39:00 +01:00
Dimitrij
25543f6561 Add acl controls to backupOptions 2022-05-02 00:31:00 +01:00
Dimitrij
3278657da7 fix missing values 2022-05-01 20:44:38 +01:00
Dimitrij
90c4d12688 lib updates 2022-05-01 20:10:22 +01:00
Dimitrij
4ceaea99f7 Merge pull request #2211 from nilsjonsson/new-lang
Add Swedish translation
2022-04-27 13:32:51 +01:00
Nils Jonsson
585de34ef1 Add Swedish translation 2022-04-27 14:18:53 +02:00
Dimitrij
60e1a3ce93 Merge pull request #2208 from Pwnoz0r/MR-887_rdm_import
Add Remote Desktop Manager (Devolutions) Importer
2022-04-23 21:02:32 +01:00
Jonathan Rainier
413d77ff1a Add Comments and Icon Support / Fix Unsorted
- Add Comments
- Add icon support for supported connection types
- Fix empty unsorted folder from being added
2022-04-23 15:53:25 -04:00
Jonathan Rainier
d8bb561063 Add Remote Desktop Manager (Devolutions) Importer
- Add RDM Importer mRemoteNG/mRemoteNG#887
2022-04-23 15:22:08 -04:00
Dimitrij
5dff2c20b2 Merge pull request #2204 from tecxx/develop-orig
fix for otp token renewal in TSS api
2022-04-19 12:53:06 +01:00
tecxx
27803e7787 fix for otp token renewal in TSS api 2022-04-19 11:44:12 +02:00
Dimitrij
58f9c1575f Merge pull request #2203 from tecxx/develop-orig
enable remote credential guard option
2022-04-15 16:45:33 +01:00
tecxx
7b909665b9 enable remote credential guard option
enable restricted admin mode option
2022-04-15 17:08:49 +02:00
Dimitrij
11eee991a1 fix visibility 2022-04-03 16:37:45 +01:00
Dimitrij
7056a859ef add acl for option pages 2022-04-03 16:25:04 +01:00
Dimitrij
2455f0d73e lib update 2022-04-03 15:35:56 +01:00
Dimitrij
943d36e23e add rbac to hide menu page + lang updates 2022-04-03 14:38:06 +01:00
Dimitrij
b563ac6e0c add basic rbac (acl) implementation as example for backup options + Language modification 2022-03-31 19:22:56 +01:00
Dimitrij
ed37a8ca2a fix #1015 2022-03-30 15:27:55 +01:00
Dimitrij
55bee8b0d8 add rbac settings 2022-03-30 12:30:59 +01:00
Dimitrij
6bd18c29e3 lib update 2022-03-29 10:38:27 +01:00
Dimitrij
37fc611767 Merge pull request #2188 from Trellmor/UpdateSessionDisplaySettings
Update session display settings
2022-03-19 12:57:09 +00:00
Daniel Triendl
f95fe351e2 Updated changelog and documentation 2022-03-18 20:27:54 +01:00
Daniel Triendl
2fb0ab1d91 Enable size change without reconnect
Use IMsRdpClient9::UpdateSessionDisplaySettings to dynamically update the
session display settings without reconnecting. RDP Version needs to be
Rdc9 or Highest for this to work.

Fixes #1546
2022-03-18 19:33:10 +01:00
Dimitrij
85f7be1d79 refactoring menu (preparation for RBAC) 2022-03-16 22:33:16 +00:00
Dimitrij
b3e5c1abc2 lib update 2022-03-16 09:55:34 +00:00
Dimitrij
9e216c0020 remove spaces 2022-03-11 17:53:05 +00:00
Dimitrij
a9f00b6a8c remove spaces 2022-03-11 17:04:51 +00:00
Dimitrij
46e7b02da2 lib update 2022-03-11 12:36:52 +00:00
Dimitrij
8db0bc6e6f refactoring options
each settings page from now will have separate options file, a bit later that helps to migrate into modular structure, then admin can control access to options and external modules may add may options independently
2022-03-10 13:48:39 +00:00
Dimitrij
1702b5867a update 2022-02-24 01:17:02 +00:00
Dimitrij
c03a6452ef update link 2022-02-24 01:14:14 +00:00
Dimitrij
69b840fb12 update 2022-02-24 01:11:44 +00:00
Dimitrij
9385ab287f update 2022-02-24 00:58:36 +00:00
Dimitrij
d2b2c39b97 fixing link 2022-02-24 00:54:01 +00:00
Dimitrij
f8ff978738 fix link 2022-02-24 00:49:43 +00:00
Dimitrij
d50b32236c update 2022-02-24 00:43:59 +00:00
Dimitrij
88d1db2840 Add howto for CyberArk psm 2022-02-24 00:35:00 +00:00
Dimitrij
b1dbe562d6 Merge pull request #2176 from AndyX90/sql-fix
Create missing columns
2022-02-23 23:56:56 +00:00
Andy Binder
e95b6f1b5d Update mysql_db_setup.sql 2022-02-23 21:57:24 +01:00
Andy Binder
1cbb7bb5dd Create missing columns 2022-02-23 21:46:10 +01:00
Dimitrij
34f3ffa129 Add version number to splash screen 2022-02-22 23:26:04 +00:00
Dimitrij
ecd25a673e lib updates 2022-02-15 17:27:57 +00:00
Dimitrij
58d0778c3d Merge pull request #2145 from jacko873/Dev
External Connectors, Default Options updated
2022-01-28 13:50:31 +00:00
Dimitrij
81a5422974 Merge pull request #2144 from tecxx/develop-orig
TSS improve refresh token / otp request handling
2022-01-28 13:04:40 +00:00
jacko873
eb859e5ede External Connectors, Default Options updated
Updated options form to fix UI bug where domain was pushout of range,
Added saving of  default User API ID
adjusted RDP and SHH to check for default User API ID,
also adjusted code here for consistancey
2022-01-28 13:50:13 +01:00
tecxx
c8035b5071 TSS improve refresh token / otp request handling 2022-01-28 11:18:44 +01:00
Dimitrij
a98a336e52 Merge branch 'v1.77.3-dev' of https://github.com/mRemoteNG/mRemoteNG into v1.77.3-dev 2022-01-21 23:58:25 +00:00
Dimitrij
d7f6535b85 update putty to v0.76 2022-01-21 23:54:28 +00:00
Faryan Rezagholi
f9d4e3152b Update README.md
Added  installation via winget
2022-01-19 23:49:16 +01:00
Dimitrij
69bd816aeb Merge branch 'v1.77.3-dev' of https://github.com/mRemoteNG/mRemoteNG into v1.77.3-dev 2022-01-19 19:44:19 +00:00
Dimitrij
783810749c change log update 2022-01-19 19:42:43 +00:00
Dimitrij
92c3c967ba Merge pull request #2138 from ThoGoetz/v1.77.3-dev
Improve compatibility with Remote Desktop Connection Manager v2.83
2022-01-19 19:41:05 +00:00
Thomas Götzinger
c632ba4306 Allow importing connections from Remote Desktop Connection Manager v2.83 2022-01-19 16:59:42 +01:00
Thomas Götzinger
e29d2c25ba Fixing Null value exception, when saving imported connections from Remote Desktop Connection Manager 2022-01-19 16:59:16 +01:00
Dimitrij
5cfdc96cd2 Merge pull request #2132 from tecxx/develop-orig
fix refresh token issue in TSS API
2022-01-18 15:48:20 +00:00
tecxx
a20e10b342 fix refresh token issue in TSS API 2022-01-18 16:28:03 +01:00
Dimitrij
39b7414553 correction 2022-01-18 10:50:09 +00:00
Dimitrij
0eef20caf6 Merge pull request #2131 from mRemoteNG/v1.77.2-dev
V1.77.2 dev
2022-01-18 10:44:50 +00:00
Dimitrij
859d12b450 Merge branch 'v1.77.3-dev' into v1.77.2-dev 2022-01-18 10:44:40 +00:00
Dimitrij
cd7c594b76 lib update 2022-01-18 10:38:14 +00:00
Dimitrij
39862e15f6 lib update 2022-01-18 10:37:49 +00:00
Dimitrij
87b0cf5c3f Merge pull request #2130 from simonai1254/patch-1
Patch 1
2022-01-18 10:35:37 +00:00
Simon Monai
a14219e1e2 Fix typo 2022-01-18 11:33:51 +01:00
Dimitrij
ee4660707c correction 2022-01-18 10:31:50 +00:00
Simon Monai
ccdf15c79c Update location for older versions
x64 and x86 builds behave differently on a x64 windows
2022-01-18 11:31:47 +01:00
Dimitrij
b31362afab correction 2022-01-18 10:30:49 +00:00
Dimitrij
74d6c88565 Merge branch 'v1.77.2-dev' into v1.77.3-dev 2022-01-18 10:24:33 +00:00
Dimitrij
638f64b888 Merge branch 'v1.77.3-dev' into v1.77.2-dev 2022-01-18 10:23:54 +00:00
Simon Monai
ffff9c1529 Add programm registry key 2022-01-18 11:23:26 +01:00
Dimitrij
39968c7c6e update changes 2022-01-18 10:16:42 +00:00
Simon Monai
2c3edf0ff2 Add Windows Desktop Runtime to removal list 2022-01-18 11:09:05 +01:00
Simon Monai
2c4445a2d9 Update wording 2022-01-18 10:59:06 +01:00
Simon Monai
09114a5ed3 Improve uninstall documentation
Addin AppData\Roaming as well as updating the Registry path for the new 64bit builds
2022-01-18 10:48:37 +01:00
Dimitrij
22e7825d65 Merge pull request #2126 from david-sway/v1.77.2-dev-RefactorConnectionInitiator
Combined instances of ConnectionInitiator to help with issue #2119
2022-01-18 09:47:36 +00:00
Dimitrij
62862141a8 update change log 2022-01-18 09:37:17 +00:00
Dimitrij
920461920c Merge pull request #2125 from david-sway/v1.77.2-dev
Fixed string parsing logic for Quick Connect toolbar.
2022-01-18 09:32:56 +00:00
david-sway
f5d0e93ecd Combined instances of ConnectionInitiator 2022-01-17 17:40:02 -05:00
david-sway
952a2f536b Fixed string parsing logic for Quick Connect toolbar. 2022-01-17 16:05:22 -05:00
Dimitrij
fbb9d849b4 update change log 2022-01-17 15:07:36 +00:00
Dimitrij
65a13dee68 fix tests 2022-01-17 15:01:35 +00:00
Dimitrij
09d26b37c7 fix year for copyright note 2022-01-17 14:54:12 +00:00
Dimitrij
47de6905df add check if xml return empty to address #2122 2022-01-17 14:53:38 +00:00
Dimitrij
c0cf316c16 update readme 2022-01-14 17:44:10 +00:00
Dimitrij
c055f8069d remove unnecessary files 2022-01-14 17:42:55 +00:00
Dimitrij
575356214f update readme 2022-01-14 17:42:16 +00:00
Dimitrij
33e007ad48 update changelog 2022-01-12 16:44:49 +00:00
Dimitrij
efea9f0857 fix extensions (2 step) 2022-01-12 16:39:11 +00:00
Dimitrij
aa755a0093 fix normalize extension to lower case (1 step) 2022-01-12 16:38:11 +00:00
Dimitrij
807e80acbe Add missed credits file
Fix opening link in about form for .net 6
2022-01-12 16:32:40 +00:00
Dimitrij
4096247ee8 add default settings for channel
fix missing options
2022-01-12 16:29:16 +00:00
Dimitrij
782d09ddbc fix for ProgramWorkDir option name 2022-01-12 16:28:15 +00:00
221 changed files with 10742 additions and 4578 deletions

View File

@@ -2,10 +2,15 @@
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.77.3]
### Added
- # #2123: Thycotic Secret Server - Added 2FA OTP support
- #1736: Update of SSH.NET to 2020.0.2 to allow File Transfer again
- #2138: Improve compatibility with Remote Desktop Connection Manager v2.83
- #2123: Thycotic Secret Server - Added 2FA OTP support
### Changed
- #1546: Enable resize without reconnect for RDP Version Rdc9 or higher
## [1.77.2]
### Added
- #2086: Replace WebClient with async HttpClient for updater.
@@ -37,6 +42,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- #1325: Language resource files cleanup
- #xxxx: Secret Server connector via new field "API User ID" instead of SSAPI: prefix
### Fixed
- #2125: Fixed string parsing logic for Quick Connect toolbar.
- #2122: Fix to avoid throwing exception incase if not able decrypt connections and ask to open another one or create a new.
- #2117: Fix of broken Links due migration to .NET 6 and branch renaming
- #2098: Fix failed BinaryFileTest
- #2097: Fix failed tests related to mRemoteNGTests.UI.Window.ConfigWindowTests
- #2096: Corrected encryption code of LegacyRijndaelCryptographyProvider

127
CREDITS.md Normal file
View File

@@ -0,0 +1,127 @@
# Contributors
## Current mRemoteNG dev team
[David Sparer](http://github.com/sparerd)
[Sean Kaim](http://github.com/kmscode)
[Faryan Rezagholi](http://github.com/farosch)
[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)
[peterchenadded](http://github.com/peterchenadded)
[Brandon Wulf](http://github.com/mrwulf)
[Pedro Rodrigues](http://github.com/pedro2555)
[dekelMP](http://github.com/dekelMP)
[Bruce](http://github.com/brucetp)
[Camilo Alvarez](http://github.com/jotatsu)
[DamianBis](http://github.com/DamianBis)
[pfjason](http://github.com/pfjason)
[sirLoaf](http://github.com/sirLoaf)
[Fyers](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)
[MitchellBot](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
[Brandhor](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)
[emazv72](http://github.com/emazv72)
[Vladimir Semenov](http://github.com/sli-pro)
[Marco Sousa](http://github.com/marcomsousa)
[wwj402](http://github.com/wwj402)
[Fyers](http://github.com/Fyers)
[pablomh](http://github.com/pablomh)
[Damian Szczepanik](http://github.com/damianszczepanik)
[Mant1kor](http://github.com/Mant1kor)
# Included Source Code
**[Command Line Arguments Parser](http://www.codeproject.com/KB/recipes/command_line.aspx)**
Copyright © 2002 Richard Lopes
MIT License
**[FilteredPropertyGrid](http://www.codeproject.com/KB/cs/FilteredPropertyGrid.aspx)**
Copyright © 2006 Azuria
**[InputBox](http://www.csharp-examples.net/inputbox/)**
Copyright © 2016 Jan Slama
**[IP TextBox](http://www.codeproject.com/Articles/11576/IP-TextBox)**
Copyright © 2005 mawnkay
**[PortableSettingsProvider](https://github.com/crdx/PortableSettingsProvider)**
Copyright © 2014 crdx
**[ADTree](http://www.codeproject.com/KB/selection/ADPickerCtrl.aspx)**
Copyright © 2004 Marc Merritt © 2008 Felix Deimel
# Included Components
**[CefSharp](https://github.com/cefsharp/CefSharp)**
Copyright © The CefSharp Authors
MIT License
**[DockPanel Suite](https://github.com/dockpanelsuite/dockpanelsuite)**
Copyright © 2018 @roken and @lextm (formerly Weifen Luo)
MIT License
**[log4net](http://logging.apache.org/log4net/)**
Copyright © 2001-2015 The Apache Software Foundation
Apache License Version 2.0
**[PuTTY](http://www.chiark.greenend.org.uk/~sgtatham/putty/)**
Copyright © 1997-2017 Simon Tatham
MIT License
**[Silk Icon Set](http://www.famfamfam.com/)**
Copyright © 2005-2008 FAMFAMFAM
Creative Commons Attribution 2.5 License
**[SSH.NET](https://github.com/sshnet/SSH.NET)**
Copyright © 2016
MIT License
**[VncSharp](https://github.com/humphd/VncSharp) (Archived)**
Copyright © 2004-2009 David Humphrey
GNU General Public License (GPL) Version 2
**[ObjectListView](https://sourceforge.net/projects/objectlistview/)**
Copyright © 2006-2016 Phillip Piper
GNU General Public License (GPL) Version 3
**[ConsoleControl](https://github.com/dwmkerr/consolecontrol)**
Copyright © 2015 Dave Kerr
MIT License

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -1,4 +1,4 @@
namespace ExternalConnectors.TSS
namespace ExternalConnectors.DSS
{
partial class SSConnectionForm
{
@@ -51,29 +51,29 @@
// tbSSURL
//
this.tbSSURL.Dock = System.Windows.Forms.DockStyle.Fill;
this.tbSSURL.Location = new System.Drawing.Point(260, 4);
this.tbSSURL.Margin = new System.Windows.Forms.Padding(4);
this.tbSSURL.Location = new System.Drawing.Point(298, 5);
this.tbSSURL.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.tbSSURL.Name = "tbSSURL";
this.tbSSURL.Size = new System.Drawing.Size(536, 23);
this.tbSSURL.Size = new System.Drawing.Size(611, 27);
this.tbSSURL.TabIndex = 0;
//
// tbUsername
//
this.tbUsername.Dock = System.Windows.Forms.DockStyle.Fill;
this.tbUsername.Location = new System.Drawing.Point(260, 35);
this.tbUsername.Margin = new System.Windows.Forms.Padding(4);
this.tbUsername.Location = new System.Drawing.Point(298, 47);
this.tbUsername.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.tbUsername.Name = "tbUsername";
this.tbUsername.Size = new System.Drawing.Size(536, 23);
this.tbUsername.Size = new System.Drawing.Size(611, 27);
this.tbUsername.TabIndex = 2;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Dock = System.Windows.Forms.DockStyle.Fill;
this.label3.Location = new System.Drawing.Point(4, 62);
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label3.Location = new System.Drawing.Point(5, 84);
this.label3.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(248, 31);
this.label3.Size = new System.Drawing.Size(283, 42);
this.label3.TabIndex = 5;
this.label3.Text = "Password";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -81,10 +81,10 @@
// tbPassword
//
this.tbPassword.Dock = System.Windows.Forms.DockStyle.Fill;
this.tbPassword.Location = new System.Drawing.Point(260, 66);
this.tbPassword.Margin = new System.Windows.Forms.Padding(4);
this.tbPassword.Location = new System.Drawing.Point(298, 89);
this.tbPassword.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.tbPassword.Name = "tbPassword";
this.tbPassword.Size = new System.Drawing.Size(536, 23);
this.tbPassword.Size = new System.Drawing.Size(611, 27);
this.tbPassword.TabIndex = 4;
this.tbPassword.UseSystemPasswordChar = true;
//
@@ -92,10 +92,10 @@
//
this.btnOK.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOK.Location = new System.Drawing.Point(296, 12);
this.btnOK.Margin = new System.Windows.Forms.Padding(4);
this.btnOK.Location = new System.Drawing.Point(337, 16);
this.btnOK.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(88, 26);
this.btnOK.Size = new System.Drawing.Size(101, 35);
this.btnOK.TabIndex = 6;
this.btnOK.Text = "OK";
this.btnOK.UseVisualStyleBackColor = true;
@@ -104,10 +104,10 @@
//
this.btnCancel.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(415, 12);
this.btnCancel.Margin = new System.Windows.Forms.Padding(4);
this.btnCancel.Location = new System.Drawing.Point(474, 16);
this.btnCancel.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(88, 26);
this.btnCancel.Size = new System.Drawing.Size(101, 35);
this.btnCancel.TabIndex = 11;
this.btnCancel.Text = "Cancel";
this.btnCancel.UseVisualStyleBackColor = true;
@@ -129,7 +129,7 @@
this.tableLayoutPanel1.Controls.Add(this.tbOTP, 1, 3);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4);
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 5;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
@@ -137,17 +137,17 @@
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(800, 159);
this.tableLayoutPanel1.Size = new System.Drawing.Size(914, 212);
this.tableLayoutPanel1.TabIndex = 12;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Dock = System.Windows.Forms.DockStyle.Fill;
this.label5.Location = new System.Drawing.Point(260, 124);
this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label5.Location = new System.Drawing.Point(298, 168);
this.label5.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(536, 35);
this.label5.Size = new System.Drawing.Size(611, 44);
this.label5.TabIndex = 15;
this.label5.Text = "For SSO to work, additional IIS configuration is required!";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -156,10 +156,10 @@
//
this.label1.AutoSize = true;
this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
this.label1.Location = new System.Drawing.Point(4, 0);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Location = new System.Drawing.Point(5, 0);
this.label1.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(248, 31);
this.label1.Size = new System.Drawing.Size(283, 42);
this.label1.TabIndex = 2;
this.label1.Text = "Secret Server URL";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -168,10 +168,10 @@
//
this.label2.AutoSize = true;
this.label2.Dock = System.Windows.Forms.DockStyle.Fill;
this.label2.Location = new System.Drawing.Point(4, 31);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Location = new System.Drawing.Point(5, 42);
this.label2.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(248, 31);
this.label2.Size = new System.Drawing.Size(283, 42);
this.label2.TabIndex = 4;
this.label2.Text = "DOMAIN\\Username";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -179,10 +179,10 @@
// cbUseSSO
//
this.cbUseSSO.AutoSize = true;
this.cbUseSSO.Location = new System.Drawing.Point(4, 128);
this.cbUseSSO.Margin = new System.Windows.Forms.Padding(4, 4, 4, 0);
this.cbUseSSO.Location = new System.Drawing.Point(5, 173);
this.cbUseSSO.Margin = new System.Windows.Forms.Padding(5, 5, 5, 0);
this.cbUseSSO.Name = "cbUseSSO";
this.cbUseSSO.Size = new System.Drawing.Size(69, 19);
this.cbUseSSO.Size = new System.Drawing.Size(86, 24);
this.cbUseSSO.TabIndex = 14;
this.cbUseSSO.Text = "Use SSO";
this.cbUseSSO.UseVisualStyleBackColor = true;
@@ -192,47 +192,48 @@
//
this.label6.AutoSize = true;
this.label6.Dock = System.Windows.Forms.DockStyle.Fill;
this.label6.Location = new System.Drawing.Point(3, 93);
this.label6.Location = new System.Drawing.Point(3, 126);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(250, 31);
this.label6.Size = new System.Drawing.Size(287, 42);
this.label6.TabIndex = 15;
this.label6.Text = "2FA OTP (Optional)";
//
// tbOTP
//
this.tbOTP.Dock = System.Windows.Forms.DockStyle.Fill;
this.tbOTP.Location = new System.Drawing.Point(259, 96);
this.tbOTP.Location = new System.Drawing.Point(296, 130);
this.tbOTP.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.tbOTP.Name = "tbOTP";
this.tbOTP.Size = new System.Drawing.Size(538, 23);
this.tbOTP.Size = new System.Drawing.Size(615, 27);
this.tbOTP.TabIndex = 5;
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.ColumnCount = 5;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 93F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 106F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 23F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 26F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 93F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 107F));
this.tableLayoutPanel2.Controls.Add(this.btnOK, 1, 0);
this.tableLayoutPanel2.Controls.Add(this.btnCancel, 3, 0);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 225);
this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(4);
this.tableLayoutPanel2.Location = new System.Drawing.Point(0, 300);
this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(800, 50);
this.tableLayoutPanel2.Size = new System.Drawing.Size(914, 67);
this.tableLayoutPanel2.TabIndex = 13;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Dock = System.Windows.Forms.DockStyle.Fill;
this.label4.Location = new System.Drawing.Point(0, 159);
this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label4.Location = new System.Drawing.Point(0, 212);
this.label4.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(341, 15);
this.label4.Size = new System.Drawing.Size(427, 20);
this.label4.TabIndex = 14;
this.label4.Text = "URL is the base URL, like https://cred.domain.local/SecretServer";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -240,14 +241,14 @@
// SSConnectionForm
//
this.AcceptButton = this.btnOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 275);
this.ClientSize = new System.Drawing.Size(914, 367);
this.Controls.Add(this.label4);
this.Controls.Add(this.tableLayoutPanel2);
this.Controls.Add(this.tableLayoutPanel1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Margin = new System.Windows.Forms.Padding(4);
this.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
this.Name = "SSConnectionForm";
this.Text = "Secret Server API Login Data";
this.Activated += new System.EventHandler(this.SSConnectionForm_Activated);

View File

@@ -1,4 +1,4 @@
namespace ExternalConnectors.TSS
namespace ExternalConnectors.DSS
{
public partial class SSConnectionForm : Form
{
@@ -13,7 +13,12 @@
if (cbUseSSO.Checked)
btnOK.Focus();
else
tbPassword.Focus();
{
if (tbPassword.Text.Length == 0)
tbPassword.Focus();
else
tbOTP.Focus();
}
}
private void cbUseSSO_CheckedChanged(object sender, EventArgs e)

View File

@@ -12,7 +12,7 @@
#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'"
#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant"
namespace SecretServerAuthentication.TSS
namespace SecretServerAuthentication.DSS
{
using System = global::System;

View File

@@ -0,0 +1,342 @@
using Microsoft.Win32;
using Org.BouncyCastle.Crypto;
using Org.BouncyCastle.Crypto.Parameters;
using Org.BouncyCastle.OpenSsl;
using Org.BouncyCastle.Security;
using SecretServerAuthentication.DSS;
using SecretServerRestClient.DSS;
using System.Security.Cryptography;
namespace ExternalConnectors.DSS
{
public class SecretServerInterface
{
private static class SSConnectionData
{
public static string ssUsername = "";
public static string ssPassword = "";
public static string ssUrl = "";
public static string ssOTP = "";
public static bool ssSSO = false;
public static bool initdone = false;
//token
public static string ssTokenBearer = "";
public static DateTime ssTokenExpiresOn = DateTime.UtcNow;
public static string ssTokenRefresh = "";
public static void Init()
{
if (initdone == true)
return;
RegistryKey key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\mRemoteSSInterface");
try
{
// display gui and ask for data
SSConnectionForm f = new SSConnectionForm();
string? un = key.GetValue("Username") as string;
f.tbUsername.Text = un ?? "";
f.tbPassword.Text = SSConnectionData.ssPassword; // in OTP refresh cases, this value might already be filled
string? url = key.GetValue("URL") as string;
if (url == null || !url.Contains("://"))
url = "https://cred.domain.local/SecretServer";
f.tbSSURL.Text = url;
var b = key.GetValue("SSO");
if (b == null || (string)b != "True")
ssSSO = false;
else
ssSSO = true;
f.cbUseSSO.Checked = ssSSO;
// show dialog
while (true)
{
_ = f.ShowDialog();
if (f.DialogResult != DialogResult.OK)
return;
// store values to memory
ssUsername = f.tbUsername.Text;
ssPassword = f.tbPassword.Text;
ssUrl = f.tbSSURL.Text;
ssSSO = f.cbUseSSO.Checked;
ssOTP = f.tbOTP.Text;
// check connection first
try
{
if (TestCredentials() == true)
{
initdone = true;
break;
}
}
catch (Exception)
{
MessageBox.Show("Test Credentials failed - please check your credentials");
}
}
// write values to registry
key.SetValue("Username", ssUsername);
key.SetValue("URL", ssUrl);
key.SetValue("SSO", ssSSO);
}
catch (Exception)
{
throw;
}
finally
{
key.Close();
}
}
}
private static bool TestCredentials()
{
if (SSConnectionData.ssSSO)
{
// checking creds doesn't really make sense here, as we can't modify them anyway if something is wrong
return true;
}
else
{
if (!String.IsNullOrEmpty(GetToken()))
{
return true;
}
else
{
return false;
}
}
}
private static SecretsServiceClient ConstructSecretsServiceClient()
{
string baseURL = SSConnectionData.ssUrl;
if (SSConnectionData.ssSSO)
{
// REQUIRES IIS CONFIG! https://docs.thycotic.com/ss/11.0.0/api-scripting/webservice-iwa-powershell
var handler = new HttpClientHandler() { UseDefaultCredentials = true };
var httpClient = new HttpClient(handler);
{
// Call REST API:
return new SecretsServiceClient($"{baseURL}/winauthwebservices/api", httpClient);
}
}
else
{
var httpClient = new HttpClient();
{
var token = GetToken();
// Set credentials (token):
httpClient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", token);
// Call REST API:
return new SecretsServiceClient($"{baseURL}/api", httpClient);
}
}
}
private static void FetchSecret(int secretID, out string secretUsername, out string secretPassword, out string secretDomain, out string privatekey)
{
var client = ConstructSecretsServiceClient();
SecretModel secret = client.GetSecretAsync(false, true, secretID, null).Result;
// clear return variables
secretDomain = "";
secretUsername = "";
secretPassword = "";
privatekey = "";
string privatekeypassphrase = "";
// parse data and extract what we need
foreach (var item in secret.Items)
{
if (item.FieldName.ToLower().Equals("domain"))
secretDomain = item.ItemValue;
else if (item.FieldName.ToLower().Equals("username"))
secretUsername = item.ItemValue;
else if (item.FieldName.ToLower().Equals("password"))
secretPassword = item.ItemValue;
else if (item.FieldName.ToLower().Equals("private key"))
{
client.ReadResponseNoJSONConvert = true;
privatekey = client.GetFieldAsync(false, false, secretID, "private-key").Result;
client.ReadResponseNoJSONConvert = false;
}
else if (item.FieldName.ToLower().Equals("private key passphrase"))
privatekeypassphrase = item.ItemValue;
}
// need to decode the private key?
if (!string.IsNullOrEmpty(privatekeypassphrase))
{
try
{
var key = DecodePrivateKey(privatekey, privatekeypassphrase);
privatekey = key;
}
catch(Exception)
{
}
}
// conversion to putty format necessary?
if (!string.IsNullOrEmpty(privatekey) && !privatekey.StartsWith("PuTTY-User-Key-File-2"))
{
try
{
RSACryptoServiceProvider key = ImportPrivateKey(privatekey);
privatekey = PuttyKeyFileGenerator.ToPuttyPrivateKey(key);
}
catch (Exception)
{
}
}
}
#region PUTTY KEY HANDLING
// decode rsa private key with encryption password
private static string DecodePrivateKey(string encryptedPrivateKey, string password)
{
TextReader textReader = new StringReader(encryptedPrivateKey);
PemReader pemReader = new PemReader(textReader, new PasswordFinder(password));
AsymmetricCipherKeyPair keyPair = (AsymmetricCipherKeyPair)pemReader.ReadObject();
TextWriter textWriter = new StringWriter();
var pemWriter = new PemWriter(textWriter);
pemWriter.WriteObject(keyPair.Private);
pemWriter.Writer.Flush();
return ""+textWriter.ToString();
}
private class PasswordFinder : IPasswordFinder
{
private string password;
public PasswordFinder(string password)
{
this.password = password;
}
public char[] GetPassword()
{
return password.ToCharArray();
}
}
// read private key pem string to rsacryptoserviceprovider
public static RSACryptoServiceProvider ImportPrivateKey(string pem)
{
PemReader pr = new PemReader(new StringReader(pem));
AsymmetricCipherKeyPair KeyPair = (AsymmetricCipherKeyPair)pr.ReadObject();
RSAParameters rsaParams = DotNetUtilities.ToRSAParameters((RsaPrivateCrtKeyParameters)KeyPair.Private);
RSACryptoServiceProvider rsa = new RSACryptoServiceProvider();
rsa.ImportParameters(rsaParams);
return rsa;
}
#endregion
#region TOKEN
private static string GetToken()
{
// if there is no token, fetch a fresh one
if (String.IsNullOrEmpty(SSConnectionData.ssTokenBearer))
{
return GetTokenFresh();
}
// if there is a token, check if it is valid
if (SSConnectionData.ssTokenExpiresOn >= DateTime.UtcNow)
{
return SSConnectionData.ssTokenBearer;
}
else
{
// try using refresh token
using (var httpClient = new HttpClient())
{
var tokenClient = new OAuth2ServiceClient(SSConnectionData.ssUrl, httpClient);
TokenResponse token = new();
try
{
token = tokenClient.AuthorizeAsync(Grant_type.Refresh_token, null, null, SSConnectionData.ssTokenRefresh, null).Result;
var tokenResult = token.Access_token;
SSConnectionData.ssTokenBearer = tokenResult;
SSConnectionData.ssTokenRefresh = token.Refresh_token;
SSConnectionData.ssTokenExpiresOn = token.Expires_on;
return tokenResult;
}
catch (Exception)
{
// refresh token failed. clean memory and start fresh
SSConnectionData.ssTokenBearer = "";
SSConnectionData.ssTokenRefresh = "";
SSConnectionData.ssTokenExpiresOn = DateTime.Now;
// if OTP is required we need to ask user for a new OTP
if (!String.IsNullOrEmpty(SSConnectionData.ssOTP))
{
SSConnectionData.initdone = false;
// the call below executes a connection test, which fetches a valid token
SSConnectionData.Init();
// we now have a fresh token in memory. return it to caller
return SSConnectionData.ssTokenBearer;
}
else
{
// no user interaction required. get a fresh token and return it to caller
return GetTokenFresh();
}
}
}
}
}
static string GetTokenFresh()
{
using (var httpClient = new HttpClient())
{
// Authenticate:
var tokenClient = new OAuth2ServiceClient(SSConnectionData.ssUrl, httpClient);
// call below will throw an exception if the creds are invalid
var token = tokenClient.AuthorizeAsync(Grant_type.Password, SSConnectionData.ssUsername, SSConnectionData.ssPassword, null, SSConnectionData.ssOTP).Result;
// here we can be sure the creds are ok - return success state
var tokenResult = token.Access_token;
SSConnectionData.ssTokenBearer = tokenResult;
SSConnectionData.ssTokenRefresh = token.Refresh_token;
SSConnectionData.ssTokenExpiresOn = token.Expires_on;
return tokenResult;
}
}
#endregion
// input must be the secret id to fetch
public static void FetchSecretFromServer(string input, out string username, out string password, out string domain, out string privatekey)
{
// get secret id
int secretID = Int32.Parse(input);
// init connection credentials, display popup if necessary
SSConnectionData.Init();
// get the secret
FetchSecret(secretID, out username, out password, out domain, out privatekey);
}
}
}

View File

@@ -12,7 +12,7 @@
#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'"
#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant"
namespace SecretServerRestClient.TSS
namespace SecretServerRestClient.DSS
{
using System = global::System;
@@ -72886,6 +72886,9 @@ namespace SecretServerRestClient.TSS
}
public bool ReadResponseAsString { get; set; }
// RR 2022-09-97
public bool ReadResponseNoJSONConvert { get; set; }
// RR END
protected virtual async System.Threading.Tasks.Task<ObjectResponseResult<T>> ReadObjectResponseAsync<T>(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary<string, System.Collections.Generic.IEnumerable<string>> headers, System.Threading.CancellationToken cancellationToken)
{
@@ -72894,6 +72897,14 @@ namespace SecretServerRestClient.TSS
return new ObjectResponseResult<T>(default(T), string.Empty);
}
// RR 2022-09-97
if (ReadResponseNoJSONConvert)
{
var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
return new ObjectResponseResult<T>((T)(object)responseText, responseText); // not sure if this is best practice, but it works.
}
// RR END
if (ReadResponseAsString)
{
var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false);

View File

@@ -11,16 +11,17 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AWSSDK.Core" Version="3.7.5.13" />
<PackageReference Include="AWSSDK.EC2" Version="3.7.54" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="AWSSDK.Core" Version="3.7.105.13" />
<PackageReference Include="AWSSDK.EC2" Version="3.7.125" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0" />
</ItemGroup>
<ItemGroup>
<Compile Update="AWS\AWSConnectionForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Update="TSS\SSConnectionForm.cs">
<Compile Update="DSS\SSConnectionForm.cs">
<SubType>Form</SubType>
</Compile>
</ItemGroup>

View File

@@ -0,0 +1,109 @@
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
namespace ExternalConnectors;
public class PuttyKeyFileGenerator
{
private const int prefixSize = 4;
private const int paddedPrefixSize = prefixSize + 1;
private const int lineLength = 64;
private const string keyType = "ssh-rsa";
private const string encryptionType = "none";
// source from
// https://gist.github.com/canton7/5670788?permalink_comment_id=3240331
// https://gist.github.com/bosima/ee6630d30b533c7d7b2743a849e9b9d0
public static string ToPuttyPrivateKey(RSACryptoServiceProvider cryptoServiceProvider, string Comment = "imported-openssh-key")
{
var publicParameters = cryptoServiceProvider.ExportParameters(false);
byte[] publicBuffer = new byte[3 + keyType.Length + GetPrefixSize(publicParameters.Exponent) + publicParameters.Exponent.Length +
GetPrefixSize(publicParameters.Modulus) + publicParameters.Modulus.Length + 1];
using (var bw = new BinaryWriter(new MemoryStream(publicBuffer)))
{
bw.Write(new byte[] { 0x00, 0x00, 0x00 });
bw.Write(keyType);
PutPrefixed(bw, publicParameters.Exponent, CheckIsNeddPadding(publicParameters.Exponent));
PutPrefixed(bw, publicParameters.Modulus, CheckIsNeddPadding(publicParameters.Modulus));
}
var publicBlob = System.Convert.ToBase64String(publicBuffer);
var privateParameters = cryptoServiceProvider.ExportParameters(true);
byte[] privateBuffer = new byte[paddedPrefixSize + privateParameters.D.Length + paddedPrefixSize + privateParameters.P.Length + paddedPrefixSize + privateParameters.Q.Length + paddedPrefixSize + privateParameters.InverseQ.Length];
using (var bw = new BinaryWriter(new MemoryStream(privateBuffer)))
{
PutPrefixed(bw, privateParameters.D, true);
PutPrefixed(bw, privateParameters.P, true);
PutPrefixed(bw, privateParameters.Q, true);
PutPrefixed(bw, privateParameters.InverseQ, true);
}
var privateBlob = System.Convert.ToBase64String(privateBuffer);
HMACSHA1 hmacsha1 = new HMACSHA1(new SHA1CryptoServiceProvider().ComputeHash(Encoding.ASCII.GetBytes("putty-private-key-file-mac-key")));
//byte[] bytesToHash = new byte[4 + 7 + 4 + 4 + 4 + Comment.Length + 4 + publicBuffer.Length + 4 + privateBuffer.Length];
byte[] bytesToHash = new byte[prefixSize + keyType.Length + prefixSize + encryptionType.Length + prefixSize + Comment.Length +
prefixSize + publicBuffer.Length + prefixSize + privateBuffer.Length];
using (var bw = new BinaryWriter(new MemoryStream(bytesToHash)))
{
PutPrefixed(bw, Encoding.ASCII.GetBytes("ssh-rsa"));
PutPrefixed(bw, Encoding.ASCII.GetBytes("none"));
PutPrefixed(bw, Encoding.ASCII.GetBytes(Comment));
PutPrefixed(bw, publicBuffer);
PutPrefixed(bw, privateBuffer);
}
var hash = string.Join("", hmacsha1.ComputeHash(bytesToHash).Select(x => string.Format("{0:x2}", x)));
var sb = new StringBuilder();
sb.AppendLine("PuTTY-User-Key-File-2: " + keyType);
sb.AppendLine("Encryption: " + encryptionType);
sb.AppendLine("Comment: " + Comment);
var publicLines = SpliceText(publicBlob, lineLength);
sb.AppendLine("Public-Lines: " + publicLines.Length);
foreach (var line in publicLines)
{
sb.AppendLine(line);
}
var privateLines = SpliceText(privateBlob, lineLength);
sb.AppendLine("Private-Lines: " + privateLines.Length);
foreach (var line in privateLines)
{
sb.AppendLine(line);
}
sb.AppendLine("Private-MAC: " + hash);
return sb.ToString();
}
private static void PutPrefixed(BinaryWriter bw, byte[] bytes, bool addLeadingNull = false)
{
bw.Write(BitConverter.GetBytes(bytes.Length + (addLeadingNull ? 1 : 0)).Reverse().ToArray());
if (addLeadingNull)
bw.Write(new byte[] { 0x00 });
bw.Write(bytes);
}
private static string[] SpliceText(string text, int lineLength)
{
return Regex.Matches(text, ".{1," + lineLength + "}").Cast<Match>().Select(m => m.Value).ToArray();
}
private static int GetPrefixSize(byte[] bytes)
{
return CheckIsNeddPadding(bytes) ? paddedPrefixSize : prefixSize;
}
private static bool CheckIsNeddPadding(byte[] bytes)
{
// 128 == 10000000
// This means that the number of bits can be divided by 8.
// According to the algorithm in putty, you need to add a padding.
return bytes[0] >= 128;
}
}

View File

@@ -1,237 +0,0 @@
using Microsoft.Win32;
using SecretServerAuthentication.TSS;
using SecretServerRestClient.TSS;
namespace ExternalConnectors.TSS
{
public class SecretServerInterface
{
private static class SSConnectionData
{
public static string ssUsername = "";
public static string ssPassword = "";
public static string ssUrl = "";
public static string ssOTP = "";
public static bool ssSSO = false;
public static bool initdone = false;
//token
public static string ssTokenBearer = "";
public static DateTime ssTokenExpiresOn = DateTime.UtcNow;
public static string ssTokenRefresh = "";
public static void Init()
{
if (ssPassword != "" || initdone == true)
return;
RegistryKey key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\mRemoteSSInterface");
try
{
// display gui and ask for data
SSConnectionForm f = new SSConnectionForm();
string? un = key.GetValue("Username") as string;
f.tbUsername.Text = un ?? "";
string? url = key.GetValue("URL") as string;
if (url == null || !url.Contains("://"))
url = "https://cred.domain.local/SecretServer";
f.tbSSURL.Text = url;
var b = key.GetValue("SSO");
if (b == null || (string)b != "True")
ssSSO = false;
else
{
ssSSO = true;
initdone = true;
}
f.cbUseSSO.Checked = ssSSO;
// show dialog
while (true)
{
_ = f.ShowDialog();
if (f.DialogResult != DialogResult.OK)
return;
// store values to memory
ssUsername = f.tbUsername.Text;
ssPassword = f.tbPassword.Text;
ssUrl = f.tbSSURL.Text;
ssSSO = f.cbUseSSO.Checked;
ssOTP = f.tbOTP.Text;
// check connection first
try
{
if (TestCredentials() == true)
break;
}
catch (Exception)
{
MessageBox.Show("Test Credentials failed - please check your credentials");
}
}
// write values to registry
key.SetValue("Username", ssUsername);
key.SetValue("URL", ssUrl);
key.SetValue("SSO", ssSSO);
}
catch (Exception)
{
throw;
}
finally
{
key.Close();
}
}
}
private static bool TestCredentials()
{
if (SSConnectionData.ssSSO)
{
// checking creds doesn't really make sense here, as we can't modify them anyway if something is wrong
return true;
}
else
{
if (!String.IsNullOrEmpty(GetToken()))
{
return true;
}
else
{
return false;
}
}
}
private static void FetchSecret(int secretID, out string secretUsername, out string secretPassword, out string secretDomain)
{
string baseURL = SSConnectionData.ssUrl;
SecretModel secret;
if (SSConnectionData.ssSSO)
{
// REQUIRES IIS CONFIG! https://docs.thycotic.com/ss/11.0.0/api-scripting/webservice-iwa-powershell
var handler = new HttpClientHandler() { UseDefaultCredentials = true };
using (var httpClient = new HttpClient(handler))
{
// Call REST API:
var client = new SecretsServiceClient($"{baseURL}/winauthwebservices/api", httpClient);
secret = client.GetSecretAsync(false, true, secretID, null).Result;
}
}
else
{
using (var httpClient = new HttpClient())
{
var token = GetToken();
// Set credentials (token):
httpClient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", token);
// Call REST API:
var client = new SecretsServiceClient($"{baseURL}/api", httpClient);
secret = client.GetSecretAsync(false, true, secretID, null).Result;
}
}
// clear return variables
secretDomain = "";
secretUsername = "";
secretPassword = "";
// parse data and extract what we need
foreach (var item in secret.Items)
{
if (item.FieldName.ToLower().Equals("domain"))
secretDomain = item.ItemValue;
else if (item.FieldName.ToLower().Equals("username"))
secretUsername = item.ItemValue;
else if (item.FieldName.ToLower().Equals("password"))
secretPassword = item.ItemValue;
}
}
private static string GetToken()
{
string authUsername = SSConnectionData.ssUsername;
string authPassword = SSConnectionData.ssPassword;
string baseURL = SSConnectionData.ssUrl;
string OTP = SSConnectionData.ssOTP;
string Bearer = SSConnectionData.ssTokenBearer;
string Refresh = SSConnectionData.ssTokenRefresh;
DateTime ExpiresOn = SSConnectionData.ssTokenExpiresOn;
//Check if current token is valid
if (!String.IsNullOrEmpty(Bearer))
{
if (ExpiresOn >= DateTime.UtcNow)
{
return Bearer;
}
else
{
//try using refresh token
using (var httpClient = new HttpClient())
{
var tokenClient = new OAuth2ServiceClient(baseURL, httpClient);
var token = tokenClient.AuthorizeAsync(Grant_type.Refresh_token, null, null, Refresh, null).Result;
var tokenResult = token.Access_token;
SSConnectionData.ssTokenBearer = tokenResult;
return tokenResult;
}
}
}
else
{
using (var httpClient = new HttpClient())
{
// Authenticate:
var tokenClient = new OAuth2ServiceClient(baseURL, httpClient);
// call below will throw an exception if the creds are invalid
var token = tokenClient.AuthorizeAsync(Grant_type.Password, authUsername, authPassword, null, OTP).Result;
// here we can be sure the creds are ok - return success state
var tokenResult = token.Access_token;
SSConnectionData.ssTokenBearer = tokenResult;
SSConnectionData.ssTokenRefresh = token.Refresh_token;
SSConnectionData.ssTokenExpiresOn = token.Expires_on;
return tokenResult;
}
}
}
// input must be in form "SSAPI:xxxx" where xxx is the secret id to fetch
public static void FetchSecretFromServer(string input, out string username, out string password, out string domain)
{
// get secret id
if (!input.StartsWith("SSAPI:"))
throw new Exception("calling this function requires SSAPI: input");
int secretID = Int32.Parse(input.Substring(6));
// init connection credentials, display popup if necessary
SSConnectionData.Init();
// get the secret
FetchSecret(secretID, out username, out password, out domain);
}
}
}

View File

@@ -2,7 +2,7 @@
<br/><br/>
<p align="center">
<img width="450" src="https://github.com/mRemoteNG/mRemoteNG/blob/develop/mRemoteNGProjectFiles/Header_dark.png">
<img width="450" src="https://github.com/mRemoteNG/mRemoteNG/blob/mRemoteNGProjectFiles/Header_dark.png">
</p>
<p align="center">
@@ -51,7 +51,7 @@
| ---------------|--------------|-----------|
| Stable | ![Build status](https://ci.appveyor.com/api/projects/status/rqwxjxldail7btcf?svg=true) | [![Github Releases (by Release)](https://img.shields.io/github/downloads/mRemoteNG/mRemoteNG/v1.76.20/total.svg)](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.76.20) |
| Preview | ![Build status](https://ci.appveyor.com/api/projects/status/rqwxjxldail7btcf/branch/preview?svg=true) | [![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) |
| Nightly | ![Build status](https://ci.appveyor.com/api/projects/status/rqwxjxldail7btcf/branch/develop?svg=true) | [![Github Releases (by Release)](https://img.shields.io/github/downloads/mRemoteNG/mRemoteNG/2022.01.07-1.77.2-nb/total.svg)](https://github.com/mRemoteNG/mRemoteNG/releases/tag/2022.01.07-1.77.2-nb) |
| Nightly | ![Build status](https://ci.appveyor.com/api/projects/status/rqwxjxldail7btcf/branch/develop?svg=true) | [![Github Releases (by Release)](https://img.shields.io/github/downloads/mRemoteNG/mRemoteNG/2022.06.13-v1.77.3-nb/total.svg)](https://github.com/mRemoteNG/mRemoteNG/releases/tag/2022.06.13-v1.77.3-nb) |
## Features
@@ -88,12 +88,14 @@ You will need to compile it yourself using Visual Studio.
### Minimum Requirements
* [Microsoft Visual C++ Redistributable for Visual Studio 2015 - 2022](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads)
* [Microsoft .NET 6.0](https://dotnet.microsoft.com/download/dotnet/6.0)
* [Microsoft .NET 6.0 Desktop Runtime](https://dotnet.microsoft.com/download/dotnet/6.0)
* Microsoft Terminal Service Client 6.0 or later
* Needed if you use RDP. mstscax.dll and/or msrdp.ocx be registered.
### Download
> :star: Starting Windows 11 you can use winget to install mRemoteNG. Just run `winget install -e --id mRemoteNG.mRemoteNG`
mRemoteNG is available as a redistributable MSI package or as a portable ZIP package and can be downloaded from the following locations:
* [GitHub](https://github.com/mRemoteNG/mRemoteNG/releases)
* [Project Website](https://mremoteng.org/download)
@@ -116,13 +118,17 @@ The MSI package of mRemoteNG can be installed using the command line:
_If you are using the Portable version, simply deleting the folder that contains mRemoteNG should be sufficient. These uninstall instructions are only necessary for the normal binary .MSI installed version of mRemoteNG_
* Delete the folder where mRemoteNG was installed. By default, this is:
`%PROGRAMFILES%\mRemoteNG`
`%PROGRAMFILES%\mRemoteNG` (for versions before 1.77 on a x64 Windows its `%programfiles(x86)%\mRemoteNG`)
* Delete the mRemoteNG install entry from one of the following locations. Search for "mRemoteNG" in the DisplayName field:
* x86: ``HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\``
* x64: ``HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\``
* Delete the mRemoteNG install entry from the following location. You may search for "mRemoteNG" in the DisplayName field:
* x86 Windows or mRemoteNG starting with v1.77: `HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\`
* x64 Windows and mRemoteNG before 1.77: `HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\`
* Remove the following registry key: `HKLM\SOFTWARE\mRemoteNG` (on x64 Windows with mRemoteNG before 1.77 it's `HKLM\SOFTWARE\WOW6432Node\mRemoteNG`)
* (Optional) If you would also like to delete user data remove `%LOCALAPPDATA%\mRemoteNG`
* (Optional) If you would also like to remove the connection configuration, delete `%APPDATA%\mRemoteNG`
* (Optional) If no other software uses it, the "Microsoft Windows Desktop Runtime" may be uninstalled too.
## Featured Projects
@@ -141,5 +147,5 @@ Check out the [Wiki page](https://github.com/mRemoteNG/mRemoteNG/wiki) on how to
</br>
<p align="center">
<img alt="Developed with ReSharper" src="https://github.com/mRemoteNG/mRemoteNG/blob/develop/mRemoteNGProjectFiles/icon_ReSharper.png">
<img alt="Developed with ReSharper" src="https://github.com/mRemoteNG/mRemoteNG/blob/mRemoteNGProjectFiles/icon_ReSharper.png">
</p>

View File

@@ -40,4 +40,4 @@ Format-Table -AutoSize -Wrap -InputObject @{
& "$PSScriptRoot\sign_binaries.ps1" -TargetDir $TargetDir -CertificatePath $CertificatePath -CertificatePassword $CertificatePassword -ConfigurationName $ConfigurationName -Exclude $ExcludeFromSigning -SolutionDir $SolutionDir
& "$PSScriptRoot\verify_binary_signatures.ps1" -TargetDir $TargetDir -ConfigurationName $ConfigurationName -CertificatePath $CertificatePath -SolutionDir $SolutionDir
& "$PSScriptRoot\rename_and_copy_installer.ps1" -SolutionDir $SolutionDir
& "$PSScriptRoot\rename_and_copy_installer.ps1" -SolutionDir $SolutionDir -BuildConfiguration $ConfigurationName.Trim()

View File

@@ -1,13 +1,15 @@
param (
[string]
$SolutionDir
$SolutionDir,
[string]
$BuildConfiguration
)
$targetVersionedFile = "$SolutionDir\mRemoteNG\bin\x64\Release\mRemoteNG.exe"
$targetVersionedFile = "$SolutionDir\mRemoteNG\bin\x64\$BuildConfiguration\mRemoteNG.exe"
$version = &"$SolutionDir\Tools\exes\sigcheck.exe" /accepteula -q -n $targetVersionedFile
$src = $SolutionDir + "mRemoteNGInstaller\Installer\bin\Release\en-US\mRemoteNG-Installer.msi"
$dst = $SolutionDir + "mRemoteNG\bin\x64\Release\mRemoteNG-Installer-" + $version + ".msi"
$src = $SolutionDir + "mRemoteNGInstaller\Installer\bin\$BuildConfiguration\en-US\mRemoteNG-Installer.msi"
$dst = $SolutionDir + "mRemoteNG\bin\x64\$BuildConfiguration\mRemoteNG-Installer-" + $version + ".msi"
# Copy file
Copy-Item $src -Destination $dst -Force

View File

@@ -13,7 +13,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomActions", "mRemoteNGI
EndProject
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Installer", "mRemoteNGInstaller\Installer\Installer.wixproj", "{F0168B9F-6815-40DF-BA53-46CEE7683B68}"
ProjectSection(ProjectDependencies) = postProject
{4934A491-40BC-4E5B-9166-EA1169A220F6} = {4934A491-40BC-4E5B-9166-EA1169A220F6}
{5423D985-CB48-4344-B47F-E8C6D60C8B04} = {5423D985-CB48-4344-B47F-E8C6D60C8B04}
{A56A2029-79B8-492A-ABE5-D2BFE05801BD} = {A56A2029-79B8-492A-ABE5-D2BFE05801BD}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mRemoteNGSpecs", "mRemoteNGSpecs\mRemoteNGSpecs.csproj", "{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}"
@@ -22,6 +24,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ExternalConnectors", "Exter
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug Installer|x64 = Debug Installer|x64
Debug Portable|x64 = Debug Portable|x64
Debug|x64 = Debug|x64
Release Installer|x64 = Release Installer|x64
@@ -29,6 +32,8 @@ Global
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug Installer|x64.ActiveCfg = Debug|x64
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug Installer|x64.Build.0 = Debug|x64
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug Portable|x64.ActiveCfg = Debug Portable|x64
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug Portable|x64.Build.0 = Debug Portable|x64
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug|x64.ActiveCfg = Debug|x64
@@ -39,6 +44,7 @@ Global
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Portable|x64.Build.0 = Release Portable|x64
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release|x64.ActiveCfg = Release|x64
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release|x64.Build.0 = Release|x64
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Debug Installer|x64.ActiveCfg = Debug|x64
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Debug Portable|x64.ActiveCfg = Debug Portable|x64
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Debug|x64.ActiveCfg = Debug|x64
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release Installer|x64.ActiveCfg = Release|x64
@@ -46,23 +52,30 @@ Global
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release Portable|x64.Build.0 = Release Portable|x64
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release|x64.ActiveCfg = Release|x64
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release|x64.Build.0 = Release|x64
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Debug Installer|x64.ActiveCfg = Debug|x64
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Debug Installer|x64.Build.0 = Debug|x64
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Debug Portable|x64.ActiveCfg = Debug Portable|x64
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Debug|x64.ActiveCfg = Debug|x64
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Release Installer|x64.ActiveCfg = Release|x64
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Release Installer|x64.Build.0 = Release|x64
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Release Portable|x64.ActiveCfg = Release Portable|x64
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Release|x64.ActiveCfg = Release|x64
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Debug Installer|x64.ActiveCfg = Debug|x64
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Debug Installer|x64.Build.0 = Debug|x64
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Debug Portable|x64.ActiveCfg = Debug Portable|x64
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Debug|x64.ActiveCfg = Debug|x64
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release Installer|x64.ActiveCfg = Release|x64
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release Installer|x64.Build.0 = Release|x64
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release Portable|x64.ActiveCfg = Release Portable|x64
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release|x64.ActiveCfg = Release|x64
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug Installer|x64.ActiveCfg = Debug|x64
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug Portable|x64.ActiveCfg = Debug Portable|x64
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Debug|x64.ActiveCfg = Debug|x64
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Installer|x64.ActiveCfg = Release|x64
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release Portable|x64.ActiveCfg = Release Portable|x64
{16AA21E2-D6B7-427D-AB7D-AA8C611B724E}.Release|x64.ActiveCfg = Release|x64
{A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Debug Installer|x64.ActiveCfg = Debug|x64
{A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Debug Installer|x64.Build.0 = Debug|x64
{A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Debug Portable|x64.ActiveCfg = Debug Portable|x64
{A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Debug Portable|x64.Build.0 = Debug Portable|x64
{A56A2029-79B8-492A-ABE5-D2BFE05801BD}.Debug|x64.ActiveCfg = Debug|x64

3
mRemoteNG/App.config Normal file
View File

@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
</configuration>

View File

@@ -37,14 +37,9 @@ namespace mRemoteNG.App
messageCollector.AddMessage(MessageClass.ErrorMsg, errorText, true);
//About to pop up a message, let's not block it...
FrmSplashScreen.getInstance().Close();
FrmSplashScreenNew.GetInstance().Close();
var ShouldIStayOrShouldIGo = CTaskDialog.MessageBox(Application.ProductName,
Language.CompatibilityProblemDetected, errorText, "",
"",
Language.CheckboxDoNotShowThisMessageAgain,
ETaskDialogButtons.OkCancel, ESysIcons.Warning,
ESysIcons.Warning);
var ShouldIStayOrShouldIGo = CTaskDialog.MessageBox(Application.ProductName, Language.CompatibilityProblemDetected, errorText, "", "", Language.CheckboxDoNotShowThisMessageAgain, ETaskDialogButtons.OkCancel, ESysIcons.Warning, ESysIcons.Warning);
if (CTaskDialog.VerificationChecked && ShouldIStayOrShouldIGo == DialogResult.OK)
{
messageCollector.AddMessage(MessageClass.ErrorMsg, "User requests that FIPS check be overridden", true);

View File

@@ -38,8 +38,8 @@ namespace mRemoteNG.App
return;
HeadlessFileImport(
openFileDialog.FileNames,
importDestinationContainer,
openFileDialog.FileNames,
importDestinationContainer,
Runtime.ConnectionsService,
fileName => MessageBox.Show(string.Format(Language.ImportFileFailedContent, fileName), Language.AskUpdatesMainInstruction,
MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1));
@@ -51,9 +51,40 @@ namespace mRemoteNG.App
}
}
public static void ImportFromRemoteDesktopManagerCsv(ContainerInfo importDestinationContainer)
{
try
{
using (Runtime.ConnectionsService.BatchedSavingContext())
{
using (var openFileDialog = new OpenFileDialog())
{
openFileDialog.CheckFileExists = true;
openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
openFileDialog.Multiselect = false;
var fileTypes = new List<string>();
fileTypes.AddRange(new[] {Language.FiltermRemoteRemoteDesktopManagerCSV, "*.csv"});
openFileDialog.Filter = string.Join("|", fileTypes.ToArray());
if (openFileDialog.ShowDialog() != DialogResult.OK)
return;
var importer = new RemoteDesktopManagerImporter();
importer.Import(openFileDialog.FileName, importDestinationContainer);
}
}
}
catch (Exception ex)
{
Runtime.MessageCollector.AddExceptionMessage("App.Import.ImportFromRemoteDesktopManagerCsv() failed.", ex);
}
}
public static void HeadlessFileImport(
IEnumerable<string> filePaths,
ContainerInfo importDestinationContainer,
IEnumerable<string> filePaths,
ContainerInfo importDestinationContainer,
ConnectionsService connectionsService,
Action<string> exceptionAction = null)
{

View File

@@ -18,12 +18,7 @@ namespace mRemoteNG.App.Info
public const string UrlDocumentation = "https://mremoteng.readthedocs.io/en/latest/";
public static string ApplicationVersion = Application.ProductVersion;
public static readonly string ProductName = Application.ProductName;
public static readonly string Copyright =
((AssemblyCopyrightAttribute)Attribute.GetCustomAttribute(Assembly.GetExecutingAssembly(),
typeof(AssemblyCopyrightAttribute), false))
.Copyright;
public static readonly string Copyright = ((AssemblyCopyrightAttribute)Attribute.GetCustomAttribute(Assembly.GetExecutingAssembly(), typeof(AssemblyCopyrightAttribute), false)).Copyright;
public static readonly string HomePath = Path.GetDirectoryName(Assembly.GetEntryAssembly()?.Location);
//public static string ReportingFilePath = "";

View File

@@ -8,13 +8,9 @@ namespace mRemoteNG.App.Info
{
public static class SettingsFileInfo
{
private static readonly string ExePath =
Path.GetDirectoryName(Assembly.GetAssembly(typeof(ConnectionInfo))?.Location);
private static readonly string ExePath = Path.GetDirectoryName(Assembly.GetAssembly(typeof(ConnectionInfo))?.Location);
public static string SettingsPath =>
Runtime.IsPortableEdition
? ExePath
: Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\" + Application.ProductName;
public static string SettingsPath => Runtime.IsPortableEdition ? ExePath : Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\" + Application.ProductName;
public static string LayoutFileName { get; } = "pnlLayout.xml";
public static string ExtAppsFilesName { get; } = "extApps.xml";

View File

@@ -22,7 +22,7 @@ namespace mRemoteNG.App.Info
public static Uri GetUpdateChannelInfo()
{
var channel = IsValidChannel(Settings.Default.UpdateChannel) ? Settings.Default.UpdateChannel : STABLE;
var channel = IsValidChannel(Properties.OptionsUpdatesPage.Default.UpdateChannel) ? Properties.OptionsUpdatesPage.Default.UpdateChannel : STABLE;
return GetUpdateTxtUri(channel);
}
@@ -65,7 +65,7 @@ namespace mRemoteNG.App.Info
private static Uri GetUpdateTxtUri(string channel)
{
return new Uri(new Uri(Settings.Default.UpdateAddress),
return new Uri(new Uri(Properties.OptionsUpdatesPage.Default.UpdateAddress),
new Uri(GetChannelFileName(channel), UriKind.Relative));
}

View File

@@ -10,10 +10,8 @@ namespace mRemoteNG.App.Initialization
{
new SaveConnectionsOnEdit(Runtime.ConnectionsService);
if (Settings.Default.FirstStart && !Settings.Default.LoadConsFromCustomLocation &&
!File.Exists(Runtime.ConnectionsService.GetStartupConnectionFileName()))
Runtime.ConnectionsService.NewConnectionsFile(Runtime.ConnectionsService
.GetStartupConnectionFileName());
if (Properties.App.Default.FirstStart && !Properties.OptionsBackupPage.Default.LoadConsFromCustomLocation && !File.Exists(Runtime.ConnectionsService.GetStartupConnectionFileName()))
Runtime.ConnectionsService.NewConnectionsFile(Runtime.ConnectionsService.GetStartupConnectionFileName());
Runtime.LoadConnections();
}

View File

@@ -27,10 +27,10 @@ namespace mRemoteNG.App
private void Initialize()
{
XmlConfigurator.Configure(LogManager.CreateRepository("mRemoteNG"));
if (string.IsNullOrEmpty(Settings.Default.LogFilePath))
Settings.Default.LogFilePath = BuildLogFilePath();
if (string.IsNullOrEmpty(Properties.OptionsNotificationsPage.Default.LogFilePath))
Properties.OptionsNotificationsPage.Default.LogFilePath = BuildLogFilePath();
SetLogPath(Settings.Default.LogToApplicationDirectory ? DefaultLogPath : Settings.Default.LogFilePath);
SetLogPath(Properties.OptionsNotificationsPage.Default.LogToApplicationDirectory ? DefaultLogPath : Properties.OptionsNotificationsPage.Default.LogFilePath);
}
public void SetLogPath(string path)

View File

@@ -1,6 +1,8 @@
using System;
using System.Diagnostics;
using System.Drawing;
using System.Threading;
using System.Windows;
using System.Windows.Forms;
using mRemoteNG.Properties;
using mRemoteNG.UI.Forms;
@@ -17,7 +19,7 @@ namespace mRemoteNG.App
[STAThread]
public static void Main(string[] args)
{
if (Settings.Default.SingleInstance)
if (Properties.OptionsStartupExitPage.Default.SingleInstance)
StartApplicationAsSingleInstance();
else
StartApplication();
@@ -26,11 +28,23 @@ namespace mRemoteNG.App
private static void StartApplication()
{
CatchAllUnhandledExceptions();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
var frmSplashScreen = FrmSplashScreen.getInstance();
System.Windows.Forms.Application.EnableVisualStyles();
System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false);
var frmSplashScreen = FrmSplashScreenNew.GetInstance();
var targetScreen = Screen.PrimaryScreen;
Rectangle viewport = targetScreen.WorkingArea;
frmSplashScreen.Top = viewport.Top;
frmSplashScreen.Left = viewport.Left;
// normaly it should be screens[1] however due DPI apply 1 size "same" as default with 100%
frmSplashScreen.Left = viewport.Left + (targetScreen.Bounds.Size.Width / 2) - (frmSplashScreen.Width / 2);
frmSplashScreen.Top = viewport.Top + (targetScreen.Bounds.Size.Height / 2) - (frmSplashScreen.Height / 2);
frmSplashScreen.Show();
Application.Run(FrmMain.Default);
System.Windows.Forms.Application.Run(FrmMain.Default);
}
public static void CloseSingletonInstanceMutex()
@@ -78,15 +92,15 @@ namespace mRemoteNG.App
private static void CatchAllUnhandledExceptions()
{
Application.ThreadException += ApplicationOnThreadException;
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
System.Windows.Forms.Application.ThreadException += ApplicationOnThreadException;
System.Windows.Forms.Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException;
}
private static void ApplicationOnThreadException(object sender, ThreadExceptionEventArgs e)
{
if (!FrmSplashScreen.getInstance().IsDisposed)
FrmSplashScreen.getInstance().Close();
// if (PresentationSource.FromVisual(FrmSplashScreenNew))
FrmSplashScreenNew.GetInstance().Close();
if (FrmMain.Default.IsDisposed) return;
@@ -97,8 +111,9 @@ namespace mRemoteNG.App
private static void CurrentDomainOnUnhandledException(object sender, UnhandledExceptionEventArgs e)
{
if (!FrmSplashScreen.getInstance().IsDisposed)
FrmSplashScreen.getInstance().Close();
//TODO: Check if splash closed properly
//if (!FrmSplashScreenNew.GetInstance().IsDisposed)
// FrmSplashScreenNew.GetInstance().Close();
var window = new FrmUnhandledException(e.ExceptionObject as Exception, e.IsTerminating);
window.ShowDialog(FrmMain.Default);

View File

@@ -49,6 +49,8 @@ namespace mRemoteNG.App
public static ICredentialRepositoryList CredentialProviderCatalog { get; } = new CredentialRepositoryList();
public static ConnectionInitiator ConnectionInitiator { get; set; } = new ConnectionInitiator();
public static ConnectionsService ConnectionsService { get; } =
new ConnectionsService(PuttySessionsManager.Instance);
@@ -89,17 +91,17 @@ namespace mRemoteNG.App
return;
connectionFileName = loadDialog.FileName;
Settings.Default.UseSQLServer = false;
Settings.Default.Save();
Properties.OptionsDBsPage.Default.UseSQLServer = false;
Properties.OptionsDBsPage.Default.Save();
}
else if (!Settings.Default.UseSQLServer)
else if (!Properties.OptionsDBsPage.Default.UseSQLServer)
{
connectionFileName = ConnectionsService.GetStartupConnectionFileName();
}
ConnectionsService.LoadConnections(Settings.Default.UseSQLServer, false, connectionFileName);
ConnectionsService.LoadConnections(Properties.OptionsDBsPage.Default.UseSQLServer, false, connectionFileName);
if (Settings.Default.UseSQLServer)
if (Properties.OptionsDBsPage.Default.UseSQLServer)
{
ConnectionsService.LastSqlUpdate = DateTime.Now;
}
@@ -113,26 +115,20 @@ namespace mRemoteNG.App
}
catch (Exception ex)
{
FrmSplashScreen.getInstance().Close();
FrmSplashScreenNew.GetInstance().Close();
if (Settings.Default.UseSQLServer)
if (Properties.OptionsDBsPage.Default.UseSQLServer)
{
MessageCollector.AddExceptionMessage(Language.LoadFromSqlFailed, ex);
var commandButtons = string.Join("|", Language._TryAgain,
Language.CommandOpenConnectionFile,
string.Format(Language.CommandExitProgram,
Application.ProductName));
CTaskDialog.ShowCommandBox(Application.ProductName, Language.LoadFromSqlFailed,
Language.LoadFromSqlFailedContent,
MiscTools.GetExceptionMessageRecursive(ex), "", "",
commandButtons, false, ESysIcons.Error, ESysIcons.Error);
var commandButtons = string.Join("|", Language._TryAgain, Language.CommandOpenConnectionFile, string.Format(Language.CommandExitProgram, Application.ProductName));
CTaskDialog.ShowCommandBox(Application.ProductName, Language.LoadFromSqlFailed, Language.LoadFromSqlFailedContent, MiscTools.GetExceptionMessageRecursive(ex), "", "", commandButtons, false, ESysIcons.Error, ESysIcons.Error);
switch (CTaskDialog.CommandButtonResult)
{
case 0:
LoadConnections(withDialog);
return;
case 1:
Settings.Default.UseSQLServer = false;
Properties.OptionsDBsPage.Default.UseSQLServer = false;
LoadConnections(true);
return;
default:
@@ -161,14 +157,7 @@ namespace mRemoteNG.App
{
try
{
CTaskDialog.ShowTaskDialogBox(
GeneralAppInfo.ProductName,
Language.ConnectionFileNotFound,
"", "", "", "", "",
string.Join(" | ", commandButtons),
ETaskDialogButtons.None,
ESysIcons.Question,
ESysIcons.Question);
CTaskDialog.ShowTaskDialogBox(GeneralAppInfo.ProductName, Language.ConnectionFileNotFound, "", "", "", "", "", string.Join(" | ", commandButtons), ETaskDialogButtons.None, ESysIcons.Question, ESysIcons.Question);
switch (CTaskDialog.CommandButtonResult)
{
@@ -193,11 +182,7 @@ namespace mRemoteNG.App
}
catch (Exception exc)
{
MessageCollector.AddExceptionMessage(
string
.Format(Language.ConnectionsFileCouldNotBeLoadedNew,
connectionFileName), exc,
MessageClass.InformationMsg);
MessageCollector.AddExceptionMessage(string.Format(Language.ConnectionsFileCouldNotBeLoadedNew, connectionFileName), exc, MessageClass.InformationMsg);
}
}
@@ -213,12 +198,7 @@ namespace mRemoteNG.App
}
else
{
MessageBox.Show(FrmMain.Default,
string.Format(Language.ErrorStartupConnectionFileLoad, Environment.NewLine,
Application.ProductName,
ConnectionsService.GetStartupConnectionFileName(),
MiscTools.GetExceptionMessageRecursive(ex)),
@"Could not load startup file.", MessageBoxButtons.OK, MessageBoxIcon.Error);
MessageBox.Show(FrmMain.Default, string.Format(Language.ErrorStartupConnectionFileLoad, Environment.NewLine, Application.ProductName, ConnectionsService.GetStartupConnectionFileName(), MiscTools.GetExceptionMessageRecursive(ex)), @"Could not load startup file.", MessageBoxButtons.OK, MessageBoxIcon.Error);
Application.Exit();
}
}

View File

@@ -66,14 +66,14 @@ namespace mRemoteNG.App
DateTime currentDate = DateTime.Now;
//OBSOLETE: Settings.Default.SaveConsOnExit is obsolete and should be removed in a future release
if (Settings.Default.SaveConsOnExit || (Settings.Default.SaveConnectionsFrequency == (int)ConnectionsBackupFrequencyEnum.OnExit))
if (Properties.OptionsStartupExitPage.Default.SaveConnectionsOnExit || (Properties.OptionsBackupPage.Default.SaveConnectionsFrequency == (int)ConnectionsBackupFrequencyEnum.OnExit))
{
Runtime.ConnectionsService.SaveConnections();
return;
}
lastUpdate = Runtime.ConnectionsService.UsingDatabase ? Runtime.ConnectionsService.LastSqlUpdate : Runtime.ConnectionsService.LastFileUpdate;
switch (Settings.Default.SaveConnectionsFrequency)
switch (Properties.OptionsBackupPage.Default.SaveConnectionsFrequency)
{
case (int)ConnectionsBackupFrequencyEnum.Daily:
updateDate = lastUpdate.AddDays(1);

View File

@@ -38,8 +38,7 @@ namespace mRemoteNG.App
public void InitializeProgram(MessageCollector messageCollector)
{
Debug.Print("---------------------------" + Environment.NewLine + "[START] - " +
Convert.ToString(DateTime.Now, CultureInfo.InvariantCulture));
Debug.Print("---------------------------" + Environment.NewLine + "[START] - " + Convert.ToString(DateTime.Now, CultureInfo.InvariantCulture));
var startupLogger = new StartupDataLogger(messageCollector);
startupLogger.LogStartupData();
CompatibilityChecker.CheckCompatibility(messageCollector);
@@ -59,10 +58,9 @@ namespace mRemoteNG.App
public void CreateConnectionsProvider(MessageCollector messageCollector)
{
messageCollector.AddMessage(MessageClass.DebugMsg, "Determining if we need a database syncronizer");
if (!Settings.Default.UseSQLServer) return;
if (!Properties.OptionsDBsPage.Default.UseSQLServer) return;
messageCollector.AddMessage(MessageClass.DebugMsg, "Creating database syncronizer");
Runtime.ConnectionsService.RemoteConnectionsSyncronizer =
new RemoteConnectionsSyncronizer(new SqlConnectionsUpdateChecker());
Runtime.ConnectionsService.RemoteConnectionsSyncronizer = new RemoteConnectionsSyncronizer(new SqlConnectionsUpdateChecker());
Runtime.ConnectionsService.RemoteConnectionsSyncronizer.Enable();
}
@@ -78,12 +76,8 @@ namespace mRemoteNG.App
}
var nextUpdateCheck =
Convert.ToDateTime(Settings.Default.CheckForUpdatesLastCheck.Add(
TimeSpan
.FromDays(Convert.ToDouble(Settings
.Default
.CheckForUpdatesFrequencyDays))));
if (!Settings.Default.UpdatePending && DateTime.UtcNow < nextUpdateCheck)
Convert.ToDateTime(Properties.OptionsUpdatesPage.Default.CheckForUpdatesLastCheck.Add(TimeSpan.FromDays(Convert.ToDouble(Properties.OptionsUpdatesPage.Default.CheckForUpdatesFrequencyDays))));
if (!Properties.OptionsUpdatesPage.Default.UpdatePending && DateTime.UtcNow < nextUpdateCheck)
{
return;
}

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
@@ -22,7 +22,7 @@ namespace mRemoteNG.App
private SupportedCultures()
{
foreach (var CultureName in Settings.Default.SupportedUICultures.Split(','))
foreach (var CultureName in Properties.AppUI.Default.SupportedUICultures.Split(','))
{
try
{

View File

@@ -58,23 +58,18 @@ namespace mRemoteNG.App.Update
private void SetDefaultProxySettings()
{
var shouldWeUseProxy = Settings.Default.UpdateUseProxy;
var proxyAddress = Settings.Default.UpdateProxyAddress;
var port = Settings.Default.UpdateProxyPort;
var useAuthentication = Settings.Default.UpdateProxyUseAuthentication;
var username = Settings.Default.UpdateProxyAuthUser;
var shouldWeUseProxy = Properties.OptionsUpdatesPage.Default.UpdateUseProxy;
var proxyAddress = Properties.OptionsUpdatesPage.Default.UpdateProxyAddress;
var port = Properties.OptionsUpdatesPage.Default.UpdateProxyPort;
var useAuthentication = Properties.OptionsUpdatesPage.Default.UpdateProxyUseAuthentication;
var username = Properties.OptionsUpdatesPage.Default.UpdateProxyAuthUser;
var cryptographyProvider = new LegacyRijndaelCryptographyProvider();
var password = cryptographyProvider.Decrypt(Settings.Default.UpdateProxyAuthPass, Runtime.EncryptionKey);
var password = cryptographyProvider.Decrypt(Properties.OptionsUpdatesPage.Default.UpdateProxyAuthPass, Runtime.EncryptionKey);
SetProxySettings(shouldWeUseProxy, proxyAddress, port, useAuthentication, username, password);
}
public void SetProxySettings(bool useProxy,
string address,
int port,
bool useAuthentication,
string username,
string password)
public void SetProxySettings(bool useProxy, string address, int port, bool useAuthentication, string username, string password)
{
if (useProxy && !string.IsNullOrEmpty(address))
{
@@ -229,11 +224,11 @@ namespace mRemoteNG.App.Update
_getUpdateInfoCancelToken = new CancellationTokenSource();
var updateInfo = await _httpClient.GetStringAsync(UpdateChannelInfo.GetUpdateChannelInfo(), _getUpdateInfoCancelToken.Token);
CurrentUpdateInfo = UpdateInfo.FromString(updateInfo);
Settings.Default.CheckForUpdatesLastCheck = DateTime.UtcNow;
Properties.OptionsUpdatesPage.Default.CheckForUpdatesLastCheck = DateTime.UtcNow;
if (!Settings.Default.UpdatePending)
if (!Properties.OptionsUpdatesPage.Default.UpdatePending)
{
Settings.Default.UpdatePending = IsUpdateAvailable();
Properties.OptionsUpdatesPage.Default.UpdatePending = IsUpdateAvailable();
}
}
finally

View File

@@ -1,7 +1,10 @@
using System;
#region Usings
using System;
using mRemoteNG.Resources.Language;
using mRemoteNG.UI;
using mRemoteNG.UI.Forms;
using mRemoteNG.UI.Window;
#endregion
namespace mRemoteNG.App
{
@@ -39,11 +42,8 @@ namespace mRemoteNG.App
_adimportForm.Show(dockPanel);
break;
case WindowType.Options:
using (var optionsForm = new FrmOptions())
{
optionsForm.ShowDialog(dockPanel);
}
FrmMain.OptionsForm.SetActivatedPage(Language.StartupExit);
FrmMain.OptionsForm.Visible = true;
break;
case WindowType.SSHTransfer:
if (SshtransferForm == null || SshtransferForm.IsDisposed)

View File

@@ -0,0 +1,9 @@
namespace mRemoteNG.Config.ACL
{
public enum ACLPermissions
{
Hidden = 0,
ReadOnly = 1,
WriteAllow = 2
}
}

View File

@@ -20,8 +20,7 @@ namespace mRemoteNG.Config.Connections
connectionsService.ConnectionsLoaded += ConnectionsServiceOnConnectionsLoaded;
}
private void ConnectionsServiceOnConnectionsLoaded(object sender,
ConnectionsLoadedEventArgs connectionsLoadedEventArgs)
private void ConnectionsServiceOnConnectionsLoaded(object sender, ConnectionsLoadedEventArgs connectionsLoadedEventArgs)
{
connectionsLoadedEventArgs.NewConnectionTreeModel.CollectionChanged +=
ConnectionTreeModelOnCollectionChanged;
@@ -34,15 +33,12 @@ namespace mRemoteNG.Config.Connections
}
}
private void ConnectionTreeModelOnPropertyChanged(object sender,
PropertyChangedEventArgs propertyChangedEventArgs)
private void ConnectionTreeModelOnPropertyChanged(object sender, PropertyChangedEventArgs propertyChangedEventArgs)
{
SaveConnectionOnEdit(propertyChangedEventArgs.PropertyName);
}
private void ConnectionTreeModelOnCollectionChanged(object sender,
NotifyCollectionChangedEventArgs
notifyCollectionChangedEventArgs)
private void ConnectionTreeModelOnCollectionChanged(object sender, NotifyCollectionChangedEventArgs notifyCollectionChangedEventArgs)
{
SaveConnectionOnEdit();
}
@@ -50,7 +46,7 @@ namespace mRemoteNG.Config.Connections
private void SaveConnectionOnEdit(string propertyName = "")
{
//OBSOLETE: mRemoteNG.Settings.Default.SaveConnectionsAfterEveryEdit is obsolete and should be removed in a future release
if (mRemoteNG.Properties.Settings.Default.SaveConnectionsAfterEveryEdit || (mRemoteNG.Properties.Settings.Default.SaveConnectionsFrequency == (int)ConnectionsBackupFrequencyEnum.OnEdit))
if (Properties.OptionsBackupPage.Default.SaveConnectionsAfterEveryEdit || (Properties.OptionsBackupPage.Default.SaveConnectionsFrequency == (int)ConnectionsBackupFrequencyEnum.OnEdit))
{
if (FrmMain.Default.IsClosing)
return;

View File

@@ -18,6 +18,7 @@ using mRemoteNG.Tools;
using mRemoteNG.Tree;
using mRemoteNG.Tree.Root;
using mRemoteNG.Resources.Language;
using mRemoteNG.Properties;
namespace mRemoteNG.Config.Connections
{
@@ -27,10 +28,7 @@ namespace mRemoteNG.Config.Connections
private readonly ISerializer<IEnumerable<LocalConnectionPropertiesModel>, string> _localPropertiesSerializer;
private readonly IDataProvider<string> _dataProvider;
public SqlConnectionsSaver(SaveFilter saveFilter,
ISerializer<IEnumerable<LocalConnectionPropertiesModel>, string>
localPropertieSerializer,
IDataProvider<string> localPropertiesDataProvider)
public SqlConnectionsSaver(SaveFilter saveFilter, ISerializer<IEnumerable<LocalConnectionPropertiesModel>, string> localPropertieSerializer, IDataProvider<string> localPropertiesDataProvider)
{
if (saveFilter == null)
throw new ArgumentNullException(nameof(saveFilter));
@@ -47,15 +45,13 @@ namespace mRemoteNG.Config.Connections
if (PropertyIsLocalOnly(propertyNameTrigger))
{
Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg,
$"Property {propertyNameTrigger} is local only. Not saving to database.");
Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, $"Property {propertyNameTrigger} is local only. Not saving to database.");
return;
}
if (SqlUserIsReadOnly())
{
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg,
"Trying to save connection tree but the SQL read only checkbox is checked, aborting!");
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, "Trying to save connection tree but the SQL read only checkbox is checked, aborting!");
return;
}
@@ -68,8 +64,7 @@ namespace mRemoteNG.Config.Connections
if (!databaseVersionVerifier.VerifyDatabaseVersion(metaData.ConfVersion))
{
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg,
Language.ErrorConnectionListSaveFailed);
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, Language.ErrorConnectionListSaveFailed);
return;
}
@@ -178,7 +173,7 @@ namespace mRemoteNG.Config.Connections
private bool SqlUserIsReadOnly()
{
return Properties.Settings.Default.SQLReadOnly;
return Properties.OptionsDBsPage.Default.SQLReadOnly;
}
}
}

View File

@@ -7,6 +7,7 @@ using mRemoteNG.Security;
using mRemoteNG.Security.Factories;
using mRemoteNG.Tree;
using mRemoteNG.Tree.Root;
using mRemoteNG.Properties;
namespace mRemoteNG.Config.Connections
{
@@ -37,7 +38,7 @@ namespace mRemoteNG.Config.Connections
cryptographyProvider,
connectionTreeModel,
_saveFilter,
Properties.Settings.Default.EncryptCompleteConnectionsFile);
Properties.OptionsSecurityPage.Default.EncryptCompleteConnectionsFile);
var rootNode = connectionTreeModel.RootNodes.OfType<RootNodeInfo>().First();
var xml = xmlConnectionsSerializer.Serialize(rootNode);

View File

@@ -16,7 +16,7 @@ namespace mRemoteNG.Config.DataProviders
return;
var backupFileName =
string.Format(Properties.Settings.Default.BackupFileNameFormat, fileName, DateTime.Now);
string.Format(Properties.OptionsBackupPage.Default.BackupFileNameFormat, fileName, DateTime.Now);
File.Copy(fileName, backupFileName);
}
catch (Exception ex)
@@ -39,7 +39,7 @@ namespace mRemoteNG.Config.DataProviders
private bool FeatureIsTurnedOff()
{
return Properties.Settings.Default.BackupFileKeepCount == 0;
return Properties.OptionsBackupPage.Default.BackupFileKeepCount == 0;
}
}
}

View File

@@ -13,7 +13,7 @@ namespace mRemoteNG.Config.DataProviders
if (string.IsNullOrEmpty(fileName) || string.IsNullOrEmpty(directoryName))
return;
var searchPattern = string.Format(Properties.Settings.Default.BackupFileNameFormat, fileName, "*");
var searchPattern = string.Format(Properties.OptionsBackupPage.Default.BackupFileNameFormat, fileName, "*");
var files = Directory.GetFiles(directoryName, searchPattern);
if (files.Length <= maxBackupsToKeep)

View File

@@ -2,6 +2,7 @@
using mRemoteNG.Config.DatabaseConnectors;
using mRemoteNG.Messages;
using mRemoteNG.App;
using mRemoteNG.Properties;
using MySql.Data.MySqlClient;
using System.Data.SqlClient;
@@ -108,7 +109,7 @@ namespace mRemoteNG.Config.DataProviders
private bool DbUserIsReadOnly()
{
return Properties.Settings.Default.SQLReadOnly;
return Properties.OptionsDBsPage.Default.SQLReadOnly;
}
}
}

View File

@@ -1,4 +1,5 @@
using mRemoteNG.App;
using mRemoteNG.Properties;
using mRemoteNG.Security.SymmetricEncryption;
namespace mRemoteNG.Config.DatabaseConnectors
@@ -7,12 +8,12 @@ namespace mRemoteNG.Config.DatabaseConnectors
{
public static IDatabaseConnector DatabaseConnectorFromSettings()
{
var sqlType = Properties.Settings.Default.SQLServerType;
var sqlHost = Properties.Settings.Default.SQLHost;
var sqlCatalog = Properties.Settings.Default.SQLDatabaseName;
var sqlUsername = Properties.Settings.Default.SQLUser;
var sqlType = Properties.OptionsDBsPage.Default.SQLServerType;
var sqlHost = Properties.OptionsDBsPage.Default.SQLHost;
var sqlCatalog = Properties.OptionsDBsPage.Default.SQLDatabaseName;
var sqlUsername = Properties.OptionsDBsPage.Default.SQLUser;
var cryptographyProvider = new LegacyRijndaelCryptographyProvider();
var sqlPassword = cryptographyProvider.Decrypt(Properties.Settings.Default.SQLPass, Runtime.EncryptionKey);
var sqlPassword = cryptographyProvider.Decrypt(Properties.OptionsDBsPage.Default.SQLPass, Runtime.EncryptionKey);
return DatabaseConnector(sqlType, sqlHost, sqlCatalog, sqlUsername, sqlPassword);
}

View File

@@ -0,0 +1,47 @@
#region
using System.IO;
using Castle.Core.Internal;
using mRemoteNG.App;
using mRemoteNG.Config.DataProviders;
using mRemoteNG.Config.Serializers.ConnectionSerializers.Csv.RemoteDesktopManager;
using mRemoteNG.Container;
using mRemoteNG.Messages;
#endregion
namespace mRemoteNG.Config.Import;
public class RemoteDesktopManagerImporter : IConnectionImporter<string>
{
public void Import(string filePath, ContainerInfo destinationContainer)
{
if (string.IsNullOrEmpty(filePath))
{
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, "Unable to import file. File path is null.");
return;
}
if (!File.Exists(filePath))
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg,
$"Unable to import file. File does not exist. Path: {filePath}");
var dataProvider = new FileDataProvider(filePath);
var csvString = dataProvider.Load();
if (!string.IsNullOrEmpty(csvString))
{
var csvDeserializer = new CsvConnectionsDeserializerRdmFormat();
var connectionTreeModel = csvDeserializer.Deserialize(csvString);
var rootContainer = new ContainerInfo { Name = Path.GetFileNameWithoutExtension(filePath) };
rootContainer.AddChildRange(connectionTreeModel.RootNodes);
destinationContainer.AddChild(rootContainer);
}
else
{
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, "Unable to import file. File is empty.");
return;
}
}
}

View File

@@ -186,13 +186,25 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv
? connectionCsv[headers.IndexOf("RDGatewayDomain")]
: "";
connectionRecord.RDGatewayHostname = headers.Contains("RDGatewayHostname")
? connectionCsv[headers.IndexOf("RDGatewayHostname")]
: "";
if (headers.Contains("RDGatewayExternalCredentialProvider"))
{
if (Enum.TryParse(connectionCsv[headers.IndexOf("RDGatewayExternalCredentialProvider")], out ExternalCredentialProvider value))
connectionRecord.RDGatewayExternalCredentialProvider = value;
}
connectionRecord.RDGatewayUserViaAPI = headers.Contains("RDGatewayUserViaAPI")
? connectionCsv[headers.IndexOf("RDGatewayUserViaAPI")]
: "";
connectionRecord.VNCProxyIP = headers.Contains("VNCProxyIP")
? connectionCsv[headers.IndexOf("VNCProxyIP")]
: "";
connectionRecord.RDGatewayHostname = headers.Contains("RDGatewayHostname")
? connectionCsv[headers.IndexOf("RDGatewayHostname")]
: "";
connectionRecord.RDPStartProgram = headers.Contains("RDPStartProgram")
? connectionCsv[headers.IndexOf("RDPStartProgram")]
@@ -226,6 +238,18 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv
connectionRecord.UseCredSsp = value;
}
if (headers.Contains("UseRestrictedAdmin"))
{
if (bool.TryParse(connectionCsv[headers.IndexOf("UseRestrictedAdmin")], out bool value))
connectionRecord.UseRestrictedAdmin = value;
}
if (headers.Contains("UseRCG"))
{
if (bool.TryParse(connectionCsv[headers.IndexOf("UseRCG")], out bool value))
connectionRecord.UseRCG = value;
}
if (headers.Contains("UseVmId"))
{
if (bool.TryParse(connectionCsv[headers.IndexOf("UseVmId")], out bool value))
@@ -441,6 +465,16 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv
if (Enum.TryParse(connectionCsv[headers.IndexOf("RdpVersion")], true, out RdpVersion version))
connectionRecord.RdpVersion = version;
}
if (headers.Contains("ExternalCredentialProvider"))
{
if (Enum.TryParse(connectionCsv[headers.IndexOf("ExternalCredentialProvider")], out ExternalCredentialProvider value))
connectionRecord.ExternalCredentialProvider = value;
}
if (headers.Contains("ExternalAddressProvider"))
{
if (Enum.TryParse(connectionCsv[headers.IndexOf("ExternalAddressProvider")], out ExternalAddressProvider value))
connectionRecord.ExternalAddressProvider = value;
}
#region Inheritance
@@ -636,6 +670,19 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv
connectionRecord.Inheritance.UseCredSsp = value;
}
if (headers.Contains("InheritUseRestrictedAdmin"))
{
if (bool.TryParse(connectionCsv[headers.IndexOf("InheritUseRestrictedAdmin")], out bool value))
connectionRecord.Inheritance.UseRestrictedAdmin = value;
}
if (headers.Contains("InheritUseRCG"))
{
if (bool.TryParse(connectionCsv[headers.IndexOf("InheritUseRCG")], out bool value))
connectionRecord.Inheritance.UseRCG = value;
}
if (headers.Contains("InheritUseVmId"))
{
if (bool.TryParse(connectionCsv[headers.IndexOf("InheritUseVmId")], out bool value))
@@ -654,6 +701,11 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv
connectionRecord.Inheritance.RenderingEngine = value;
}
if (headers.Contains("InheritExternalCredentialProvider"))
{
if (bool.TryParse(connectionCsv[headers.IndexOf("InheritExternalCredentialProvider")], out bool value))
connectionRecord.Inheritance.ExternalCredentialProvider = value;
}
if (headers.Contains("InheritUserViaAPI"))
{
if (bool.TryParse(connectionCsv[headers.IndexOf("InheritUserViaAPI")], out bool value))
@@ -829,6 +881,18 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv
connectionRecord.Inheritance.RDGatewayDomain = value;
}
if (headers.Contains("InheritRDGatewayExternalCredentialProvider"))
{
if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRDGatewayExternalCredentialProvider")], out bool value))
connectionRecord.Inheritance.RDGatewayExternalCredentialProvider = value;
}
if (headers.Contains("InheritRDGatewayUserViaAPI"))
{
if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRDGatewayUserViaAPI")], out bool value))
connectionRecord.Inheritance.RDGatewayUserViaAPI = value;
}
if (headers.Contains("InheritRDPAlertIdleTimeout"))
{
if (bool.TryParse(connectionCsv[headers.IndexOf("InheritRDPAlertIdleTimeout")], out bool value))

View File

@@ -56,25 +56,25 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv
if (_saveFilter.SaveDomain)
sb.Append("Domain;");
sb.Append("Hostname;Port;VmId;Protocol;SSHTunnelConnectionName;OpeningCommand;SSHOptions;PuttySession;ConnectToConsole;UseCredSsp;UseVmId;UseEnhancedMode;RenderingEngine;RDPAuthenticationLevel;" +
sb.Append("Hostname;Port;VmId;Protocol;SSHTunnelConnectionName;OpeningCommand;SSHOptions;PuttySession;ConnectToConsole;UseCredSsp;UseRestrictedAdmin;UseRCG;UseVmId;UseEnhancedMode;RenderingEngine;RDPAuthenticationLevel;" +
"LoadBalanceInfo;Colors;Resolution;AutomaticResize;DisplayWallpaper;DisplayThemes;EnableFontSmoothing;EnableDesktopComposition;DisableFullWindowDrag;DisableMenuAnimations;DisableCursorShadow;DisableCursorBlinking;" +
"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;RDPStartProgram;RDPStartProgramWorkDir;UserViaAPI;EC2InstanceId;EC2Region;");
"RDGatewayUseConnectionCredentials;RDGatewayUsername;RDGatewayPassword;RDGatewayDomain;RDGatewayExternalCredentialProvider;RDGatewayUserViaAPI;RedirectAudioCapture;RdpVersion;RDPStartProgram;RDPStartProgramWorkDir;UserViaAPI;EC2InstanceId;EC2Region;ExternalCredentialProvider;ExternalAddressProvider;");
if (_saveFilter.SaveInheritance)
sb.Append("InheritCacheBitmaps;InheritColors;InheritDescription;InheritDisplayThemes;InheritDisplayWallpaper;" +
"InheritEnableFontSmoothing;InheritEnableDesktopComposition;InheritDisableFullWindowDrag;InheritDisableMenuAnimations;InheritDisableCursorShadow;InheritDisableCursorBlinking;InheritDomain;InheritIcon;InheritPanel;InheritPassword;InheritPort;" +
"InheritProtocol;InheritSSHTunnelConnectionName;InheritOpeningCommand;InheritSSHOptions;InheritPuttySession;InheritRedirectDiskDrives;InheritRedirectKeys;InheritRedirectPorts;InheritRedirectPrinters;" +
"InheritRedirectClipboard;InheritRedirectSmartCards;InheritRedirectSound;InheritResolution;InheritAutomaticResize;" +
"InheritUseConsoleSession;InheritUseCredSsp;InheritUseVmId;InheritUseEnhancedMode;InheritVmId;InheritRenderingEngine;InheritUsername;" +
"InheritUseConsoleSession;InheritUseCredSsp;InheritUseRestrictedAdmin;InheritUseRCG;InheritUseVmId;InheritUseEnhancedMode;InheritVmId;InheritRenderingEngine;InheritUsername;" +
"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;InheritUserViaAPI;" +
"InheritRedirectAudioCapture;InheritRdpVersion");
"InheritRDGatewayPassword;InheritRDGatewayDomain;InheritRDGatewayExternalCredentialProvider;InheritRDGatewayUserViaAPI;InheritRDPAlertIdleTimeout;InheritRDPMinutesToIdleTimeout;InheritSoundQuality;InheritUserViaAPI;" +
"InheritRedirectAudioCapture;InheritRdpVersion;InheritExternalCredentialProvider");
}
private void SerializeNodesRecursive(ConnectionInfo node, StringBuilder sb)
@@ -125,6 +125,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv
.Append(FormatForCsv(con.PuttySession))
.Append(FormatForCsv(con.UseConsoleSession))
.Append(FormatForCsv(con.UseCredSsp))
.Append(FormatForCsv(con.UseRestrictedAdmin))
.Append(FormatForCsv(con.UseRCG))
.Append(FormatForCsv(con.UseVmId))
.Append(FormatForCsv(con.UseEnhancedMode))
.Append(FormatForCsv(con.RenderingEngine))
@@ -172,13 +174,18 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv
.Append(FormatForCsv(con.RDGatewayUsername))
.Append(FormatForCsv(con.RDGatewayPassword))
.Append(FormatForCsv(con.RDGatewayDomain))
.Append(FormatForCsv(con.RDGatewayExternalCredentialProvider))
.Append(FormatForCsv(con.RDGatewayUserViaAPI))
.Append(FormatForCsv(con.RedirectAudioCapture))
.Append(FormatForCsv(con.RdpVersion))
.Append(FormatForCsv(con.RDPStartProgram))
.Append(FormatForCsv(con.RDPStartProgramWorkDir))
.Append(FormatForCsv(con.UserViaAPI))
.Append(FormatForCsv(con.EC2InstanceId))
.Append(FormatForCsv(con.EC2Region));
.Append(FormatForCsv(con.EC2Region))
.Append(FormatForCsv(con.ExternalCredentialProvider))
.Append(FormatForCsv(con.ExternalAddressProvider))
;
if (!_saveFilter.SaveInheritance)
@@ -216,6 +223,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv
.Append(FormatForCsv(con.Inheritance.AutomaticResize))
.Append(FormatForCsv(con.Inheritance.UseConsoleSession))
.Append(FormatForCsv(con.Inheritance.UseCredSsp))
.Append(FormatForCsv(con.Inheritance.UseRestrictedAdmin))
.Append(FormatForCsv(con.Inheritance.UseRCG))
.Append(FormatForCsv(con.Inheritance.UseVmId))
.Append(FormatForCsv(con.Inheritance.UseEnhancedMode))
.Append(FormatForCsv(con.Inheritance.VmId))
@@ -246,12 +255,15 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv
.Append(FormatForCsv(con.Inheritance.RDGatewayUsername))
.Append(FormatForCsv(con.Inheritance.RDGatewayPassword))
.Append(FormatForCsv(con.Inheritance.RDGatewayDomain))
.Append(FormatForCsv(con.Inheritance.RDGatewayExternalCredentialProvider))
.Append(FormatForCsv(con.Inheritance.RDGatewayUserViaAPI))
.Append(FormatForCsv(con.Inheritance.RDPAlertIdleTimeout))
.Append(FormatForCsv(con.Inheritance.RDPMinutesToIdleTimeout))
.Append(FormatForCsv(con.Inheritance.SoundQuality))
.Append(FormatForCsv(con.Inheritance.RedirectAudioCapture))
.Append(FormatForCsv(con.Inheritance.RdpVersion))
.Append(FormatForCsv(con.Inheritance.UserViaAPI));
.Append(FormatForCsv(con.Inheritance.UserViaAPI))
.Append(FormatForCsv(con.Inheritance.ExternalCredentialProvider));
}
private string FormatForCsv(object value)

View File

@@ -0,0 +1,226 @@
#region
using System;
using System.Collections.Generic;
using System.Linq;
using mRemoteNG.Connection;
using mRemoteNG.Connection.Protocol;
using mRemoteNG.Container;
using mRemoteNG.Tree;
#endregion
namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv.RemoteDesktopManager;
/// <summary>
/// Import of connections from the Remote Desktop Manager (RDM) in a CSV file format
/// </summary>
public partial class CsvConnectionsDeserializerRdmFormat : IDeserializer<string, ConnectionTreeModel>
{
private readonly List<RemoteDesktopManagerConnectionInfo> _connectionTypes;
private readonly HashSet<string> _groups;
public CsvConnectionsDeserializerRdmFormat()
{
_connectionTypes = new List<RemoteDesktopManagerConnectionInfo>
{
new(ProtocolType.RDP, "RDP (Microsoft Remote Desktop)", 3389, "Remote Desktop"),
new(ProtocolType.SSH2, "SSH Shell", 22, "SSH")
};
_groups = new HashSet<string>();
Containers = new List<ContainerInfo>();
}
private List<ContainerInfo> Containers { get; }
/// <summary>
/// Deserializes the CSV file into a <see cref="ConnectionTreeModel" />
/// </summary>
/// <param name="serializedData">Data from the CSV file</param>
/// <returns></returns>
public ConnectionTreeModel Deserialize(string serializedData)
{
var lines = serializedData.Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.RemoveEmptyEntries);
var csvHeaders = new List<string>();
var connections = new List<(ConnectionInfo, string)>(); // (ConnectionInfo, group)
for (var lineNumber = 0; lineNumber < lines.Length; lineNumber++)
{
var line = lines[lineNumber].Split(',');
if (lineNumber == 0)
{
csvHeaders = line.ToList();
}
else
{
var (connectionInfo, group) = ParseConnectionInfo(csvHeaders, line);
if (connectionInfo == default) continue;
connections.Add((connectionInfo, group));
}
}
var connectionTreeModel = new ConnectionTreeModel();
var unsortedConnections = new ContainerInfo { Name = "Unsorted" };
foreach (var containerInfo in Containers) connectionTreeModel.AddRootNode(containerInfo);
var allChildren = Containers.SelectMany(x => x.GetRecursiveChildList().Select(y => (ContainerInfo)y)).ToList();
foreach (var (connection, path) in connections)
if (string.IsNullOrEmpty(path))
{
unsortedConnections.AddChild(connection);
}
else
{
var container = allChildren.FirstOrDefault(x => x.ConstantID == path);
if (container == default) continue;
container.AddChild(connection);
}
if (unsortedConnections.HasChildren())
connectionTreeModel.AddRootNode(unsortedConnections);
return connectionTreeModel;
}
/// <summary>
/// Parses a line from the CSV file and returns <see cref="ConnectionInfo" />
/// </summary>
/// <param name="headers">CSV Headers</param>
/// <param name="connectionCsv">CSV Columns</param>
/// <returns></returns>
private (ConnectionInfo connectionInfo, string) ParseConnectionInfo(IList<string> headers, IReadOnlyList<string> connectionCsv)
{
if (headers.Count != connectionCsv.Count) return default;
var hostString = connectionCsv[headers.IndexOf("Host")].Trim();
if (string.IsNullOrEmpty(hostString)) return default;
var hostType = Uri.CheckHostName(hostString);
if (hostType == UriHostNameType.Unknown) return default;
var connectionTypeString = connectionCsv[headers.IndexOf("ConnectionType")];
if (string.IsNullOrEmpty(connectionTypeString)) return default;
var connectionType = _connectionTypes.FirstOrDefault(x => x.Name == connectionTypeString);
if (connectionType == default) return default;
var portString = connectionCsv[headers.IndexOf("Port")] ?? connectionType.Port.ToString();
if (!int.TryParse(portString, out var port)) port = connectionType.Port;
var name = connectionCsv[headers.IndexOf("Name")];
var description = connectionCsv[headers.IndexOf("Description")];
var group = connectionCsv[headers.IndexOf("Group")];
var username = connectionCsv[headers.IndexOf("CredentialUserName")];
var domain = connectionCsv[headers.IndexOf("CredentialDomain")];
var password = connectionCsv[headers.IndexOf("CredentialPassword")];
var connectionInfo = new ConnectionInfo(Guid.NewGuid().ToString())
{
Name = name,
Hostname = hostString,
Port = port,
Username = username,
Password = password,
Domain = domain,
Icon = connectionType.IconName ?? "mRemoteNG",
Description = description,
Protocol = connectionType.Protocol
};
if (!string.IsNullOrEmpty(group))
if (group.Contains('\\'))
{
var groupParts = group.Split('\\').ToList();
var parentContainerName = groupParts[0];
var parentContainer = Containers.FirstOrDefault(x => x.Name == parentContainerName);
if (parentContainer == default)
{
parentContainer = new ContainerInfo(group) { Name = parentContainerName };
Containers.Add(parentContainer);
}
groupParts.RemoveAt(0);
AddChildrenRecursive(group, groupParts, parentContainer);
}
return string.IsNullOrEmpty(group) ? (connectionInfo, default) : (connectionInfo, group);
}
/// <summary>
/// Adds a child to a container recursively
/// </summary>
/// <param name="group">Full path of the RDM Grouping</param>
/// <param name="groupParts">Segements of the group path</param>
/// <param name="parentContainer">Parent container to add children to</param>
private void AddChildrenRecursive(string group, IList<string> groupParts, ContainerInfo parentContainer)
{
if (_groups.Contains(group)) return;
var groupCount = groupParts.Count;
while (groupCount > 0)
{
var childName = groupParts[0];
var newContainer = new ContainerInfo(group) { Name = childName };
var childrenNames = parentContainer.GetRecursiveChildList().Select(x => x.Name).ToList();
if (!childrenNames.Any())
{
groupCount = AddChild(parentContainer, newContainer, groupCount);
_groups.Add(group);
continue;
}
if (groupParts.Count > 1)
{
var childContainer = (ContainerInfo)parentContainer.Children.FirstOrDefault(x => x.Name == childName);
if (childContainer == default)
{
groupCount = AddChild(parentContainer, newContainer, groupCount);
continue;
}
AddChildrenRecursive(group, groupParts.Skip(1).ToList(), childContainer);
}
else
{
parentContainer.AddChild(newContainer);
_groups.Add(group);
}
groupCount--;
}
}
/// <summary>
/// Adds a child to a container and returns the remaining group count
/// </summary>
/// <param name="parentContainer">Parent container</param>
/// <param name="newContainer">New child container</param>
/// <param name="groupCount">Remaining group count</param>
/// <returns></returns>
private static int AddChild(ContainerInfo parentContainer, ContainerInfo newContainer, int groupCount)
{
parentContainer.AddChild(newContainer);
groupCount--;
return groupCount;
}
}
/// <summary>
/// Record of supported connection types
/// </summary>
/// <param name="Protocol">Procotol</param>
/// <param name="Name">Display Name</param>
/// <param name="Port">Default Port</param>
/// <param name="IconName">Icon Name</param>
internal sealed record RemoteDesktopManagerConnectionInfo(ProtocolType Protocol, string Name, int Port, string IconName);

View File

@@ -0,0 +1,18 @@
#region
using System;
using mRemoteNG.Connection;
#endregion
namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv.RemoteDesktopManager;
public partial class CsvConnectionsDeserializerRdmFormat : ISerializer<ConnectionInfo, string>
{
public string Serialize(ConnectionInfo model)
{
throw new NotImplementedException();
}
public Version Version { get; }
}

View File

@@ -83,10 +83,15 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
connectionInfo.Description = (string)dataRow["Description"];
connectionInfo.Icon = (string)dataRow["Icon"];
connectionInfo.Panel = (string)dataRow["Panel"];
//connectionInfo.ExternalCredentialProvider = (ExternalCredentialProvider)Enum.Parse(typeof(ExternalCredentialProvider), (string)dataRow["ExternalCredentialProvider"]);
//connectionInfo.UserViaAPI = (string)dataRow["UserViaAPI"];
connectionInfo.Username = (string)dataRow["Username"];
connectionInfo.Domain = (string)dataRow["Domain"];
connectionInfo.Password = DecryptValue((string)dataRow["Password"]);
connectionInfo.Hostname = (string)dataRow["Hostname"];
//connectionInfo.ExternalAddressProvider = (ExternalAddressProvider)Enum.Parse(typeof(ExternalAddressProvider), (string)dataRow["ExternalAddressProvider"]);
//connectionInfo.EC2Region = (string)dataRow["EC2Region"];
//connectionInfo.EC2InstanceId = (string)dataRow["EC2InstanceId"];
connectionInfo.VmId = (string)dataRow["VmId"];
connectionInfo.UseEnhancedMode = (bool)dataRow["UseEnhancedMode"];
connectionInfo.Protocol = (ProtocolType)Enum.Parse(typeof(ProtocolType), (string)dataRow["Protocol"]);
@@ -97,6 +102,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
connectionInfo.Port = (int)dataRow["Port"];
connectionInfo.UseConsoleSession = (bool)dataRow["ConnectToConsole"];
connectionInfo.UseCredSsp = (bool)dataRow["UseCredSsp"];
connectionInfo.UseRestrictedAdmin = (bool)dataRow["UseRestrictedAdmin"];
connectionInfo.UseRCG = (bool)dataRow["UseRCG"];
connectionInfo.UseVmId = (bool)dataRow["UseVmId"];
connectionInfo.RenderingEngine = (HTTPBase.RenderingEngine)Enum.Parse(typeof(HTTPBase.RenderingEngine), (string)dataRow["RenderingEngine"]);
connectionInfo.RDPAuthenticationLevel = (AuthenticationLevel)Enum.Parse(typeof(AuthenticationLevel), (string)dataRow["RDPAuthenticationLevel"]);
@@ -149,6 +156,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
connectionInfo.RDGatewayUsername = (string)dataRow["RDGatewayUsername"];
connectionInfo.RDGatewayPassword = DecryptValue((string)dataRow["RDGatewayPassword"]);
connectionInfo.RDGatewayDomain = (string)dataRow["RDGatewayDomain"];
//connectionInfo.RDGatewayExternalCredentialProvider = (ExternalCredentialProvider)Enum.Parse(typeof(ExternalCredentialProvider), (string)dataRow["RDGatewayExternalCredentialProvider"]);
//connectionInfo.RDGatewayUserViaAPI = (string)dataRow["RDGatewayUserViaAPI"];
if (!dataRow.IsNull("RdpVersion")) // table allows null values which must be handled
if (Enum.TryParse((string)dataRow["RdpVersion"], true, out RdpVersion rdpVersion))
@@ -165,6 +174,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
connectionInfo.Inheritance.DisableMenuAnimations = (bool)dataRow["InheritDisableMenuAnimations"];
connectionInfo.Inheritance.DisableCursorShadow = (bool)dataRow["InheritDisableCursorShadow"];
connectionInfo.Inheritance.DisableCursorBlinking = (bool)dataRow["InheritDisableCursorBlinking"];
//connectionInfo.Inheritance.ExternalCredentialProvider = (bool)dataRow["InheritExternalCredentialProvider"];
//connectionInfo.Inheritance.UserViaAPI = (bool)dataRow["InheritUserViaAPI"];
connectionInfo.Inheritance.Domain = (bool)dataRow["InheritDomain"];
connectionInfo.Inheritance.Icon = (bool)dataRow["InheritIcon"];
connectionInfo.Inheritance.Panel = (bool)dataRow["InheritPanel"];
@@ -188,6 +199,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
connectionInfo.Inheritance.AutomaticResize = (bool)dataRow["InheritAutomaticResize"];
connectionInfo.Inheritance.UseConsoleSession = (bool)dataRow["InheritUseConsoleSession"];
connectionInfo.Inheritance.UseCredSsp = (bool)dataRow["InheritUseCredSsp"];
connectionInfo.Inheritance.UseRestrictedAdmin = (bool)dataRow["InheritUseRestrictedAdmin"];
connectionInfo.Inheritance.UseRCG = (bool)dataRow["InheritUseRCG"];
connectionInfo.Inheritance.UseVmId = (bool)dataRow["InheritUseVmId"];
connectionInfo.Inheritance.UseEnhancedMode = (bool)dataRow["InheritUseEnhancedMode"];
connectionInfo.Inheritance.VmId = (bool)dataRow["InheritVmId"];
@@ -220,6 +233,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
connectionInfo.Inheritance.RDGatewayUsername = (bool)dataRow["InheritRDGatewayUsername"];
connectionInfo.Inheritance.RDGatewayPassword = (bool)dataRow["InheritRDGatewayPassword"];
connectionInfo.Inheritance.RDGatewayDomain = (bool)dataRow["InheritRDGatewayDomain"];
//connectionInfo.Inheritance.RDGatewayExternalCredentialProvider = (bool)dataRow["InheritRDGatewayExternalCredentialProvider"];
//connectionInfo.Inheritance.RDGatewayUserViaAPI = (bool)dataRow["InheritRDGatewayUserViaAPI"];
connectionInfo.Inheritance.RdpVersion = (bool)dataRow["InheritRdpVersion"];
}

View File

@@ -105,10 +105,15 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataTable.Columns.Add("Description", typeof(string));
dataTable.Columns.Add("Icon", typeof(string));
dataTable.Columns.Add("Panel", typeof(string));
dataTable.Columns.Add("ExternalCredentialProvider", typeof(string));
dataTable.Columns.Add("UserViaAPI", typeof(string));
dataTable.Columns.Add("Username", typeof(string));
dataTable.Columns.Add("Domain", typeof(string));
dataTable.Columns.Add("Password", typeof(string));
dataTable.Columns.Add("Hostname", typeof(string));
dataTable.Columns.Add("ExternalAddressProvider", typeof(string));
dataTable.Columns.Add("EC2Region", typeof(string));
dataTable.Columns.Add("EC2InstanceId", typeof(string));
dataTable.Columns.Add("Port", typeof(int));
dataTable.Columns.Add("Protocol", typeof(string));
dataTable.Columns.Add("SSHTunnelConnectionName", typeof(string));
@@ -116,6 +121,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataTable.Columns.Add("PuttySession", typeof(string));
dataTable.Columns.Add("ConnectToConsole", typeof(bool));
dataTable.Columns.Add("UseCredSsp", typeof(bool));
dataTable.Columns.Add("UseRestrictedAdmin", typeof(bool));
dataTable.Columns.Add("UseRCG", typeof(bool));
dataTable.Columns.Add("RenderingEngine", typeof(string));
dataTable.Columns.Add("RDPAuthenticationLevel", typeof(string));
dataTable.Columns.Add("Colors", typeof(string));
@@ -161,6 +168,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataTable.Columns.Add("RDGatewayUsername", typeof(string));
dataTable.Columns.Add("RDGatewayPassword", typeof(string));
dataTable.Columns.Add("RDGatewayDomain", typeof(string));
dataTable.Columns.Add("RDGatewayExternalCredentialProvider", typeof(string));
dataTable.Columns.Add("RDGatewayUserViaAPI", typeof(string));
dataTable.Columns.Add("InheritCacheBitmaps", typeof(bool));
dataTable.Columns.Add("InheritColors", typeof(bool));
dataTable.Columns.Add("InheritDescription", typeof(bool));
@@ -178,6 +187,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataTable.Columns.Add("InheritPassword", typeof(bool));
dataTable.Columns.Add("InheritPort", typeof(bool));
dataTable.Columns.Add("InheritProtocol", typeof(bool));
dataTable.Columns.Add("InheritExternalCredentialProvider", typeof(bool));
dataTable.Columns.Add("InheritUserViaAPI", typeof(bool));
dataTable.Columns.Add("InheritSSHTunnelConnectionName", typeof(bool));
dataTable.Columns.Add("InheritSSHOptions", typeof(bool));
dataTable.Columns.Add("InheritPuttySession", typeof(bool));
@@ -192,6 +203,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataTable.Columns.Add("InheritResolution", typeof(bool));
dataTable.Columns.Add("InheritUseConsoleSession", typeof(bool));
dataTable.Columns.Add("InheritUseCredSsp", typeof(bool));
dataTable.Columns.Add("InheritUseRestrictedAdmin", typeof(bool));
dataTable.Columns.Add("InheritUseRCG", typeof(bool));
dataTable.Columns.Add("InheritRenderingEngine", typeof(bool));
dataTable.Columns.Add("InheritRDPAuthenticationLevel", typeof(bool));
dataTable.Columns.Add("InheritUsername", typeof(bool));
@@ -218,6 +231,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataTable.Columns.Add("InheritRDGatewayUsername", typeof(bool));
dataTable.Columns.Add("InheritRDGatewayPassword", typeof(bool));
dataTable.Columns.Add("InheritRDGatewayDomain", typeof(bool));
dataTable.Columns.Add("InheritRDGatewayExternalCredentialProvider", typeof(bool));
dataTable.Columns.Add("InheritRDGatewayUserViaAPI", typeof(bool));
dataTable.Columns.Add("LoadBalanceInfo", typeof(string));
dataTable.Columns.Add("AutomaticResize", typeof(bool));
dataTable.Columns.Add("InheritLoadBalanceInfo", typeof(bool));
@@ -275,7 +290,12 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataRow["Domain"].Equals(_saveFilter.SaveDomain ? connectionInfo.Domain : "");
isFieldNotChange = isFieldNotChange && dataRow["Hostname"].Equals(connectionInfo.Hostname);
isFieldNotChange = isFieldNotChange && dataRow["VmId"].Equals(connectionInfo.VmId);
isFieldNotChange = isFieldNotChange && dataRow["EC2Region"].Equals(connectionInfo.EC2Region);
isFieldNotChange = isFieldNotChange && dataRow["EC2InstanceId"].Equals(connectionInfo.EC2InstanceId);
isFieldNotChange = isFieldNotChange && dataRow["ExternalAddressProvider"].Equals(connectionInfo.ExternalAddressProvider);
isFieldNotChange = isFieldNotChange && dataRow["ExternalCredentialProvider"].Equals(connectionInfo.ExternalCredentialProvider);
isFieldNotChange = isFieldNotChange && dataRow["UserViaAPI"].Equals(connectionInfo.UserViaAPI);
isFieldNotChange = isFieldNotChange && dataRow["VmId"].Equals(connectionInfo.VmId);
isFieldNotChange = isFieldNotChange && dataRow["Protocol"].Equals(connectionInfo.Protocol.ToString());
isFieldNotChange = isFieldNotChange && dataRow["PuttySession"].Equals(connectionInfo.PuttySession);
isFieldNotChange = isFieldNotChange &&
@@ -285,6 +305,10 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
isFieldNotChange = isFieldNotChange &&
dataRow["UseCredSsp"].Equals(connectionInfo.UseCredSsp);
isFieldNotChange = isFieldNotChange &&
dataRow["UseRestrictedAdmin"].Equals(connectionInfo.UseRestrictedAdmin);
isFieldNotChange = isFieldNotChange &&
dataRow["UseRCG"].Equals(connectionInfo.UseRCG);
isFieldNotChange = isFieldNotChange &&
dataRow["UseVmId"].Equals(connectionInfo.UseVmId);
isFieldNotChange = isFieldNotChange &&
dataRow["UseEnhancedMode"].Equals(connectionInfo.UseEnhancedMode);
@@ -347,8 +371,10 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataRow["RDGatewayUsageMethod"].Equals(connectionInfo.RDGatewayUsageMethod.ToString()) &&
dataRow["RDGatewayHostname"].Equals(connectionInfo.RDGatewayHostname) &&
dataRow["RDGatewayUseConnectionCredentials"].Equals(connectionInfo.RDGatewayUseConnectionCredentials.ToString()) &&
dataRow["RDGatewayExternalCredentialProvider"].Equals(connectionInfo.RDGatewayExternalCredentialProvider) &&
dataRow["RDGatewayUsername"].Equals(connectionInfo.RDGatewayUsername) &&
dataRow["RDGatewayDomain"].Equals(connectionInfo.RDGatewayDomain) &&
dataRow["RDGatewayUserViaAPI"].Equals(connectionInfo.RDGatewayUserViaAPI) &&
dataRow["RdpVersion"].Equals(connectionInfo.RdpVersion.ToString());
var isInheritanceFieldNotChange = false;
@@ -371,6 +397,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataRow["InheritPassword"].Equals(connectionInfo.Inheritance.Password) &&
dataRow["InheritPort"].Equals(connectionInfo.Inheritance.Port) &&
dataRow["InheritProtocol"].Equals(connectionInfo.Inheritance.Protocol) &&
dataRow["InheritExternalCredentialProvider"].Equals(connectionInfo.Inheritance.ExternalCredentialProvider) &&
dataRow["InheritUserViaAPI"].Equals(connectionInfo.Inheritance.UserViaAPI) &&
dataRow["InheritPuttySession"].Equals(connectionInfo.Inheritance.PuttySession) &&
dataRow["InheritRedirectDiskDrives"].Equals(connectionInfo.Inheritance.RedirectDiskDrives) &&
dataRow["InheritRedirectKeys"].Equals(connectionInfo.Inheritance.RedirectKeys) &&
@@ -385,6 +413,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataRow["InheritAutomaticResize"].Equals(connectionInfo.Inheritance.AutomaticResize) &&
dataRow["InheritUseConsoleSession"].Equals(connectionInfo.Inheritance.UseConsoleSession) &&
dataRow["InheritUseCredSsp"].Equals(connectionInfo.Inheritance.UseCredSsp) &&
dataRow["InheritUseRestrictedAdmin"].Equals(connectionInfo.Inheritance.UseRestrictedAdmin) &&
dataRow["InheritUseRCG"].Equals(connectionInfo.Inheritance.UseRCG) &&
dataRow["InheritRenderingEngine"].Equals(connectionInfo.Inheritance.RenderingEngine) &&
dataRow["InheritUsername"].Equals(connectionInfo.Inheritance.Username) &&
dataRow["InheritVmId"].Equals(connectionInfo.Inheritance.VmId) &&
@@ -414,9 +444,11 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataRow["InheritRDGatewayUsageMethod"].Equals(connectionInfo.Inheritance.RDGatewayUsageMethod) &&
dataRow["InheritRDGatewayHostname"].Equals(connectionInfo.Inheritance.RDGatewayHostname) &&
dataRow["InheritRDGatewayUseConnectionCredentials"].Equals(connectionInfo.Inheritance.RDGatewayUseConnectionCredentials) &&
dataRow["InheritRDGatewayExternalCredentialProvider"].Equals(connectionInfo.Inheritance.RDGatewayExternalCredentialProvider) &&
dataRow["InheritRDGatewayUsername"].Equals(connectionInfo.Inheritance.RDGatewayUsername) &&
dataRow["InheritRDGatewayPassword"].Equals(connectionInfo.Inheritance.RDGatewayPassword) &&
dataRow["InheritRDGatewayDomain"].Equals(connectionInfo.Inheritance.RDGatewayDomain) &&
dataRow["InheritRDGatewayUserViaAPI"].Equals(connectionInfo.Inheritance.RDGatewayUserViaAPI) &&
dataRow["InheritRdpVersion"].Equals(connectionInfo.Inheritance.RdpVersion));
}
else
@@ -438,6 +470,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataRow["InheritPassword"].Equals(false) &&
dataRow["InheritPort"].Equals(false) &&
dataRow["InheritProtocol"].Equals(false) &&
dataRow["InheritExternalCredentialProvider"].Equals(false) &&
dataRow["InheritUserViaAPI"].Equals(false) &&
dataRow["InheritPuttySession"].Equals(false) &&
dataRow["InheritRedirectDiskDrives"].Equals(false) &&
dataRow["InheritRedirectKeys"].Equals(false) &&
@@ -452,6 +486,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataRow["InheritAutomaticResize"].Equals(false) &&
dataRow["InheritUseConsoleSession"].Equals(false) &&
dataRow["InheritUseCredSsp"].Equals(false) &&
dataRow["InheritUseRestrictedAdmin"].Equals(false) &&
dataRow["InheritUseRCG"].Equals(false) &&
dataRow["InheritRenderingEngine"].Equals(false) &&
dataRow["InheritUsername"].Equals(false) &&
dataRow["InheritRDPAuthenticationLevel"].Equals(false) &&
@@ -478,9 +514,11 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataRow["InheritRDGatewayUsageMethod"].Equals(false) &&
dataRow["InheritRDGatewayHostname"].Equals(false) &&
dataRow["InheritRDGatewayUseConnectionCredentials"].Equals(false) &&
dataRow["InheritRDGatewayExternalCredentialProvider"].Equals(connectionInfo.Inheritance.RDGatewayExternalCredentialProvider) &&
dataRow["InheritRDGatewayUsername"].Equals(false) &&
dataRow["InheritRDGatewayPassword"].Equals(false) &&
dataRow["InheritRDGatewayDomain"].Equals(false) &&
dataRow["InheritRDGatewayUserViaAPI"].Equals(false) &&
dataRow["InheritRdpVersion"].Equals(false));
}
@@ -534,6 +572,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataRow["Port"] = connectionInfo.Port;
dataRow["ConnectToConsole"] = connectionInfo.UseConsoleSession;
dataRow["UseCredSsp"] = connectionInfo.UseCredSsp;
dataRow["UseRestrictedAdmin"] = connectionInfo.UseRestrictedAdmin;
dataRow["UseRCG"] = connectionInfo.UseRCG;
dataRow["UseVmId"] = connectionInfo.UseVmId;
dataRow["UseEnhancedMode"] = connectionInfo.UseEnhancedMode;
dataRow["RenderingEngine"] = connectionInfo.RenderingEngine;
@@ -612,6 +652,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataRow["InheritPassword"] = connectionInfo.Inheritance.Password;
dataRow["InheritPort"] = connectionInfo.Inheritance.Port;
dataRow["InheritProtocol"] = connectionInfo.Inheritance.Protocol;
dataRow["InheritExternalCredentialProvider"] = connectionInfo.Inheritance.ExternalCredentialProvider;
dataRow["InheritUserViaAPI"] = connectionInfo.Inheritance.UserViaAPI;
dataRow["InheritSSHTunnelConnectionName"] = connectionInfo.Inheritance.SSHTunnelConnectionName;
dataRow["InheritOpeningCommand"] = connectionInfo.Inheritance.OpeningCommand;
dataRow["InheritSSHOptions"] = connectionInfo.Inheritance.SSHOptions;
@@ -629,6 +671,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataRow["InheritAutomaticResize"] = connectionInfo.Inheritance.AutomaticResize;
dataRow["InheritUseConsoleSession"] = connectionInfo.Inheritance.UseConsoleSession;
dataRow["InheritUseCredSsp"] = connectionInfo.Inheritance.UseCredSsp;
dataRow["InheritUseRestrictedAdmin"] = connectionInfo.Inheritance.UseRestrictedAdmin;
dataRow["InheritUseRCG"] = connectionInfo.Inheritance.UseRCG;
dataRow["InheritRenderingEngine"] = connectionInfo.Inheritance.RenderingEngine;
dataRow["InheritUsername"] = connectionInfo.Inheritance.Username;
dataRow["InheritVmId"] = connectionInfo.Inheritance.VmId;
@@ -658,9 +702,11 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataRow["InheritRDGatewayUsageMethod"] = connectionInfo.Inheritance.RDGatewayUsageMethod;
dataRow["InheritRDGatewayHostname"] = connectionInfo.Inheritance.RDGatewayHostname;
dataRow["InheritRDGatewayUseConnectionCredentials"] = connectionInfo.Inheritance.RDGatewayUseConnectionCredentials;
dataRow["InheritRDGatewayExternalCredentialProvider"] = connectionInfo.Inheritance.RDGatewayExternalCredentialProvider;
dataRow["InheritRDGatewayUsername"] = connectionInfo.Inheritance.RDGatewayUsername;
dataRow["InheritRDGatewayPassword"] = connectionInfo.Inheritance.RDGatewayPassword;
dataRow["InheritRDGatewayDomain"] = connectionInfo.Inheritance.RDGatewayDomain;
dataRow["InheritRDGatewayUserViaAPI"] = connectionInfo.Inheritance.RDGatewayUserViaAPI;
dataRow["InheritRdpVersion"] = connectionInfo.Inheritance.RdpVersion;
dataRow["InheritFavorite"] = connectionInfo.Inheritance.Favorite;
dataRow["InheritICAEncryptionStrength"] = false;
@@ -684,6 +730,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataRow["InheritPassword"] = false;
dataRow["InheritPort"] = false;
dataRow["InheritProtocol"] = false;
dataRow["InheritExternalCredentialProvider"] = false;
dataRow["InheritUserViaAPI"] = false;
dataRow["InheritSSHTunnelConnectionName"] = false;
dataRow["InheritSSHOptions"] = false;
dataRow["InheritPuttySession"] = false;
@@ -700,6 +748,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataRow["InheritAutomaticResize"] = false;
dataRow["InheritUseConsoleSession"] = false;
dataRow["InheritUseCredSsp"] = false;
dataRow["InheritUseRestrictedAdmin"] = false;
dataRow["InheritUseRCG"] = false;
dataRow["InheritRenderingEngine"] = false;
dataRow["InheritUsername"] = false;
dataRow["InheritRDPAuthenticationLevel"] = false;
@@ -726,9 +776,11 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
dataRow["InheritRDGatewayUsageMethod"] = false;
dataRow["InheritRDGatewayHostname"] = false;
dataRow["InheritRDGatewayUseConnectionCredentials"] = false;
dataRow["InheritRDGatewayExternalCredentialProvider"] = false;
dataRow["InheritRDGatewayUsername"] = false;
dataRow["InheritRDGatewayPassword"] = false;
dataRow["InheritRDGatewayDomain"] = false;
dataRow["InheritRDGatewayUserViaAPI"] = false;
dataRow["InheritRdpVersion"] = false;
dataRow["InheritFavorite"] = false;
dataRow["InheritICAEncryptionStrength"] = false;

View File

@@ -21,22 +21,33 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
try
{
var dbCommand = databaseConnector.DbCommand("SELECT * FROM tblRoot");
if (!databaseConnector.IsConnected)
databaseConnector.Connect();
if (!DoesDbTableExist(databaseConnector, "tblRoot"))
{
// database exists but is empty, initialize it with the schema
InitializeDatabaseSchema(databaseConnector);
}
DbCommand dbCommand = databaseConnector.DbCommand("SELECT * FROM tblRoot");
dbDataReader = dbCommand.ExecuteReader();
if (!dbDataReader.HasRows)
return null; // assume new empty database
{
// assume new empty database
return null;
}
else
{
dbDataReader.Read();
}
metaData = new SqlConnectionListMetaData
{
Name = dbDataReader["Name"] as string ?? "",
Protected = dbDataReader["Protected"] as string ?? "",
Export = (bool)dbDataReader["Export"],
ConfVersion =
new Version(Convert.ToString(dbDataReader["confVersion"], CultureInfo.InvariantCulture))
ConfVersion = new Version(Convert.ToString(dbDataReader["confVersion"], CultureInfo.InvariantCulture) ?? string.Empty)
};
}
catch (Exception ex)
@@ -55,40 +66,506 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql
public void WriteDatabaseMetaData(RootNodeInfo rootTreeNode, IDatabaseConnector databaseConnector)
{
var cryptographyProvider = new LegacyRijndaelCryptographyProvider();
string strProtected;
if (rootTreeNode != null)
{
if (rootTreeNode.Password)
{
var password = rootTreeNode.PasswordString.ConvertToSecureString();
strProtected = cryptographyProvider.Encrypt("ThisIsProtected", password);
}
else
{
strProtected = cryptographyProvider.Encrypt("ThisIsNotProtected", Runtime.EncryptionKey);
}
}
else
{
strProtected = cryptographyProvider.Encrypt("ThisIsNotProtected", Runtime.EncryptionKey);
}
var cryptographyProvider = new LegacyRijndaelCryptographyProvider();
string strProtected;
if (rootTreeNode != null)
{
if (rootTreeNode.Password)
{
var password = rootTreeNode.PasswordString.ConvertToSecureString();
strProtected = cryptographyProvider.Encrypt("ThisIsProtected", password);
}
else
{
strProtected = cryptographyProvider.Encrypt("ThisIsNotProtected", Runtime.EncryptionKey);
}
}
else
{
strProtected = cryptographyProvider.Encrypt("ThisIsNotProtected", Runtime.EncryptionKey);
}
var cmd = databaseConnector.DbCommand("DELETE FROM tblRoot");
cmd.ExecuteNonQuery();
if (rootTreeNode != null)
{
cmd = databaseConnector.DbCommand(
if (rootTreeNode != null)
{
cmd = databaseConnector.DbCommand(
"INSERT INTO tblRoot (Name, Export, Protected, ConfVersion) VALUES('" +
MiscTools.PrepareValueForDB(rootTreeNode.Name) + "', 0, '" + strProtected + "','" +
ConnectionsFileInfo.ConnectionFileVersion.ToString() + "')");
cmd.ExecuteNonQuery();
}
else
{
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, $"UpdateRootNodeTable: rootTreeNode was null. Could not insert!");
}
}
MiscTools.PrepareValueForDB(rootTreeNode.Name) + "', 0, '" + strProtected + "','" +
ConnectionsFileInfo.ConnectionFileVersion.ToString() + "')");
cmd.ExecuteNonQuery();
}
else
{
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, $"UpdateRootNodeTable: rootTreeNode was null. Could not insert!");
}
}
private bool DoesDbTableExist(IDatabaseConnector databaseConnector, string tableName)
{
bool exists;
try
{
// ANSI SQL way. Works in PostgreSQL, MSSQL, MySQL.
var cmd = databaseConnector.DbCommand("select case when exists((select * from information_schema.tables where table_name = '" + tableName + "')) then 1 else 0 end");
cmd.ExecuteNonQuery();
exists = (int)cmd.ExecuteScalar()! == 1;
}
catch
{
try
{
// Other RDBMS. Graceful degradation
exists = true;
var cmdOthers = databaseConnector.DbCommand("select 1 from " + tableName + " where 1 = 0");
cmdOthers.ExecuteNonQuery();
}
catch
{
exists = false;
}
}
return exists;
}
private void InitializeDatabaseSchema(IDatabaseConnector databaseConnector)
{
string sql;
var t = databaseConnector.GetType();
if (databaseConnector.GetType() == typeof(MSSqlDatabaseConnector))
{
sql = @"
if exists (select * from dbo.sysobjects
where id = object_id(N'[dbo].[tblCons]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tblCons]
if exists (select * from dbo.sysobjects
where id = object_id(N'[dbo].[tblRoot]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tblRoot]
if exists (select * from dbo.sysobjects
where id = object_id(N'[dbo].[tblUpdate]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tblUpdate]
CREATE TABLE [dbo].[tblCons] (
[ID] int NOT NULL IDENTITY(1,1),
[ConstantID] varchar(128) NOT NULL PRIMARY KEY,
[PositionID] int NOT NULL,
[ParentID] varchar(128),
[LastChange] datetime NOT NULL,
[Name] varchar(128) NOT NULL,
[Type] varchar(32) NOT NULL,
[Expanded] bit NOT NULL,
[AutomaticResize] bit NOT NULL DEFAULT ((1)),
[CacheBitmaps] bit NOT NULL,
[Colors] varchar(32) NOT NULL,
[ConnectToConsole] bit NOT NULL,
[Connected] bit NOT NULL,
[Description] varchar(1024),
[DisableCursorBlinking] bit NOT NULL,
[DisableCursorShadow] bit NOT NULL,
[DisableFullWindowDrag] bit NOT NULL,
[DisableMenuAnimations] bit NOT NULL,
[DisplayThemes] bit NOT NULL,
[DisplayWallpaper] bit NOT NULL,
[Domain] varchar(512),
[EnableDesktopComposition] bit NOT NULL,
[EnableFontSmoothing] bit NOT NULL,
[ExtApp] varchar(256),
[Favorite] tinyint NOT NULL,
[Hostname] varchar(512),
[Icon] varchar(128) NOT NULL,
[LoadBalanceInfo] varchar(1024),
[MacAddress] varchar(32),
[OpeningCommand] varchar(512),
[Panel] varchar(128) NOT NULL,
[Password] varchar(1024),
[Port] int NOT NULL,
[PostExtApp] varchar(256),
[PreExtApp] varchar(256),
[Protocol] varchar(32) NOT NULL,
[PuttySession] varchar(128),
[RDGatewayDomain] varchar(512),
[RDGatewayHostname] varchar(512),
[RDGatewayPassword] varchar(1024),
[RDGatewayUsageMethod] varchar(32) NOT NULL,
[RDGatewayUseConnectionCredentials] varchar(32) NOT NULL,
[RDGatewayUsername] varchar(512),
[RDPAlertIdleTimeout] bit NOT NULL,
[RDPAuthenticationLevel] varchar(32) NOT NULL,
[RDPMinutesToIdleTimeout] int NOT NULL,
[RdpVersion] varchar(10) NULL,
[RedirectAudioCapture] bit NOT NULL,
[RedirectClipboard] bit NOT NULL,
[RedirectDiskDrives] bit NOT NULL,
[RedirectKeys] bit NOT NULL,
[RedirectPorts] bit NOT NULL,
[RedirectPrinters] bit NOT NULL,
[RedirectSmartCards] bit NOT NULL,
[RedirectSound] varchar(64) NOT NULL,
[RenderingEngine] varchar(16) NULL,
[Resolution] varchar(32) NOT NULL,
[SSHOptions] varchar(1024) NOT NULL,
[SSHTunnelConnectionName] varchar(128) NOT NULL,
[SoundQuality] varchar(20) NOT NULL,
[UseCredSsp] bit NOT NULL,
[UseEnhancedMode] bit NOT NULL,
[UseVmId] bit NOT NULL,
[UserField] varchar(256) NULL,
[Username] varchar(512) NULL,
[VNCAuthMode] varchar(10) NULL,
[VNCColors] varchar(10) NULL,
[VNCCompression] varchar(10) NULL,
[VNCEncoding] varchar(20) NULL,
[VNCProxyIP] varchar(128) NULL,
[VNCProxyPassword] varchar(1024) NULL,
[VNCProxyPort] int NULL,
[VNCProxyType] varchar(20) NULL,
[VNCProxyUsername] varchar(512) NULL,
[VNCSmartSizeMode] varchar(20) NULL,
[VNCViewOnly] bit NOT NULL,
[VmId] varchar(100) NULL,
[ICAEncryptionStrength] varchar(32) NOT NULL,
[InheritAutomaticResize] bit NOT NULL,
[InheritCacheBitmaps] bit NOT NULL,
[InheritColors] bit NOT NULL,
[InheritDescription] bit NOT NULL,
[InheritDisableCursorBlinking] bit NOT NULL,
[InheritDisableCursorShadow] bit NOT NULL,
[InheritDisableFullWindowDrag] bit NOT NULL,
[InheritDisableMenuAnimations] bit NOT NULL,
[InheritDisplayThemes] bit NOT NULL,
[InheritDisplayWallpaper] bit NOT NULL,
[InheritDomain] bit NOT NULL,
[InheritEnableDesktopComposition] bit NOT NULL,
[InheritEnableFontSmoothing] bit NOT NULL,
[InheritExtApp] bit NOT NULL,
[InheritFavorite] bit NOT NULL,
[InheritICAEncryptionStrength] bit NOT NULL,
[InheritIcon] bit NOT NULL,
[InheritLoadBalanceInfo] bit NOT NULL,
[InheritMacAddress] bit NOT NULL,
[InheritOpeningCommand] bit NOT NULL,
[InheritPanel] bit NOT NULL,
[InheritPassword] bit NOT NULL,
[InheritPort] bit NOT NULL,
[InheritPostExtApp] bit NOT NULL,
[InheritPreExtApp] bit NOT NULL,
[InheritProtocol] bit NOT NULL,
[InheritPuttySession] bit NOT NULL,
[InheritRDGatewayDomain] bit NOT NULL,
[InheritRDGatewayHostname] bit NOT NULL,
[InheritRDGatewayPassword] bit NOT NULL,
[InheritRDGatewayUsageMethod] bit NOT NULL,
[InheritRDGatewayUseConnectionCredentials] bit NOT NULL,
[InheritRDGatewayExternalCredentialProvider] bit NOT NULL,
[InheritRDGatewayUsername] bit NOT NULL,
[InheritRDGatewayUserViaAPI] bit NOT NULL,
[InheritRDPAlertIdleTimeout] bit NOT NULL,
[InheritRDPAuthenticationLevel] bit NOT NULL,
[InheritRDPMinutesToIdleTimeout] bit NOT NULL,
[InheritRdpVersion] bit NOT NULL,
[InheritRedirectAudioCapture] bit NOT NULL,
[InheritRedirectClipboard] bit NOT NULL,
[InheritRedirectDiskDrives] bit NOT NULL,
[InheritRedirectKeys] bit NOT NULL,
[InheritRedirectPorts] bit NOT NULL,
[InheritRedirectPrinters] bit NOT NULL,
[InheritRedirectSmartCards] bit NOT NULL,
[InheritRedirectSound] bit NOT NULL,
[InheritRenderingEngine] bit NOT NULL,
[InheritResolution] bit NOT NULL,
[InheritSSHOptions] bit NOT NULL,
[InheritSSHTunnelConnectionName] bit NOT NULL,
[InheritSoundQuality] bit NOT NULL,
[InheritUseConsoleSession] bit NOT NULL,
[InheritUseCredSsp] bit NOT NULL,
[InheritUseRestrictedAdmin] bit NOT NULL,
[InheritUseRCG] bit NOT NULL,
[InheritExternalCredentialProvider] bit NOT NULL,
[InheritUserViaAPI] bit NOT NULL,
[UseRestrictedAdmin] bit NOT NULL,
[UseRCG] bit NOT NULL,
[InheritUseEnhancedMode] bit NOT NULL,
[InheritUseVmId] bit,
[InheritUserField] bit NOT NULL,
[InheritUsername] bit NOT NULL,
[InheritVNCAuthMode] bit NOT NULL,
[InheritVNCColors] bit NOT NULL,
[InheritVNCCompression] bit NOT NULL,
[InheritVNCEncoding] bit NOT NULL,
[InheritVNCProxyIP] bit NOT NULL,
[InheritVNCProxyPassword] bit NOT NULL,
[InheritVNCProxyPort] bit NOT NULL,
[InheritVNCProxyType] bit NOT NULL,
[InheritVNCProxyUsername] bit NOT NULL,
[InheritVNCSmartSizeMode] bit NOT NULL,
[InheritVNCViewOnly] bit NOT NULL,
[InheritVmId] bit NOT NULL,
[StartProgram] varchar(512) NULL,
[StartProgramWorkDir] varchar(512) NULL,
[EC2Region] varchar(32) NULL,
[EC2InstanceId] varchar(32) NULL,
[ExternalCredentialProvider] varchar(256) NULL,
[ExternalAddressProvider] varchar(256) NULL,
) ON [PRIMARY]
CREATE TABLE [dbo].[tblRoot] (
[Name] [varchar] (2048) NOT NULL,
[Export] [bit] NOT NULL,
[Protected] [varchar] (4048) NOT NULL,
[ConfVersion] [varchar] (15) NOT NULL
) ON [PRIMARY]
CREATE TABLE [dbo].[tblUpdate] (
[LastUpdate] [datetime] NULL
) ON [PRIMARY]
";
}
else if (databaseConnector.GetType() == typeof(MySqlDatabaseConnector))
{
sql = @"
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `tblCons`
--
DROP TABLE IF EXISTS `tblCons`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tblCons` (
`ID` int NOT NULL AUTO_INCREMENT,
`ConstantID` varchar(128) NOT NULL,
`PositionID` int NOT NULL,
`ParentID` varchar(128) DEFAULT NULL,
`LastChange` datetime NOT NULL,
`Name` varchar(128) NOT NULL,
`Type` varchar(32) NOT NULL,
`Expanded` tinyint(1) NOT NULL,
`AutomaticResize` tinyint(1) NOT NULL DEFAULT 1,
`CacheBitmaps` tinyint(1) NOT NULL,
`Colors` varchar(32) NOT NULL,
`ConnectToConsole` tinyint(1) NOT NULL,
`Connected` tinyint(1) NOT NULL,
`Description` varchar(1024) DEFAULT NULL,
`DisableCursorBlinking` tinyint(1) NOT NULL,
`DisableCursorShadow` tinyint(1) NOT NULL,
`DisableFullWindowDrag` tinyint(1) NOT NULL,
`DisableMenuAnimations` tinyint(1) NOT NULL,
`DisplayThemes` tinyint(1) NOT NULL,
`DisplayWallpaper` tinyint(1) NOT NULL,
`Domain` varchar(512) DEFAULT NULL,
`EnableDesktopComposition` tinyint(1) NOT NULL,
`EnableFontSmoothing` tinyint(1) NOT NULL,
`ExtApp` varchar(256) DEFAULT NULL,
`Favorite` tinyint(1) NOT NULL,
`Hostname` varchar(512) DEFAULT NULL,
`Icon` varchar(128) NOT NULL,
`LoadBalanceInfo` varchar(1024) DEFAULT NULL,
`MacAddress` varchar(32) DEFAULT NULL,
`OpeningCommand` varchar(512) DEFAULT NULL,
`Panel` varchar(128) NOT NULL,
`Password` varchar(1024) DEFAULT NULL,
`Port` int NOT NULL,
`PostExtApp` varchar(256) DEFAULT NULL,
`PreExtApp` varchar(256) DEFAULT NULL,
`Protocol` varchar(32) NOT NULL,
`PuttySession` varchar(128) DEFAULT NULL,
`RDGatewayDomain` varchar(512) DEFAULT NULL,
`RDGatewayHostname` varchar(512) DEFAULT NULL,
`RDGatewayPassword` varchar(1024) DEFAULT NULL,
`RDGatewayUsageMethod` varchar(32) NOT NULL,
`RDGatewayUseConnectionCredentials` varchar(32) NOT NULL,
`RDGatewayUsername` varchar(512) DEFAULT NULL,
`RDPAlertIdleTimeout` tinyint(1) NOT NULL,
`RDPAuthenticationLevel` varchar(32) NOT NULL,
`RDPMinutesToIdleTimeout` int(11) NOT NULL,
`RdpVersion` varchar(10) DEFAULT NULL,
`RedirectAudioCapture` tinyint(1) NOT NULL,
`RedirectClipboard` tinyint(1) NOT NULL,
`RedirectDiskDrives` tinyint(1) NOT NULL,
`RedirectKeys` tinyint(1) NOT NULL,
`RedirectPorts` tinyint(1) NOT NULL,
`RedirectPrinters` tinyint(1) NOT NULL,
`RedirectSmartCards` tinyint(1) NOT NULL,
`RedirectSound` varchar(64) NOT NULL,
`RenderingEngine` varchar(16) DEFAULT NULL,
`Resolution` varchar(32) NOT NULL,
`SSHOptions` varchar(1024) NOT NULL,
`SSHTunnelConnectionName` varchar(128) NOT NULL,
`SoundQuality` varchar(20) NOT NULL,
`UseCredSsp` tinyint(1) NOT NULL,
`UseEnhancedMode` tinyint(1) NOT NULL,
`UseVmId` tinyint(1) NOT NULL,
`UserField` varchar(256) DEFAULT NULL,
`Username` varchar(512) DEFAULT NULL,
`VNCAuthMode` varchar(10) DEFAULT NULL,
`VNCColors` varchar(10) DEFAULT NULL,
`VNCCompression` varchar(10) DEFAULT NULL,
`VNCEncoding` varchar(20) DEFAULT NULL,
`VNCProxyIP` varchar(128) DEFAULT NULL,
`VNCProxyPassword` varchar(1024) DEFAULT NULL,
`VNCProxyPort` int DEFAULT NULL,
`VNCProxyType` varchar(20) DEFAULT NULL,
`VNCProxyUsername` varchar(512) DEFAULT NULL,
`VNCSmartSizeMode` varchar(20) DEFAULT NULL,
`VNCViewOnly` tinyint(1) NOT NULL,
`VmId` varchar(512) DEFAULT NULL,
`ICAEncryptionStrength` varchar(32) NOT NULL,
`InheritAutomaticResize` tinyint(1) NOT NULL,
`InheritCacheBitmaps` tinyint(1) NOT NULL,
`InheritColors` tinyint(1) NOT NULL,
`InheritDescription` tinyint(1) NOT NULL,
`InheritDisableCursorBlinking` tinyint(1) NOT NULL,
`InheritDisableCursorShadow` tinyint(1) NOT NULL,
`InheritDisableFullWindowDrag` tinyint(1) NOT NULL,
`InheritDisableMenuAnimations` tinyint(1) NOT NULL,
`InheritDisplayThemes` tinyint(1) NOT NULL,
`InheritDisplayWallpaper` tinyint(1) NOT NULL,
`InheritDomain` tinyint(1) NOT NULL,
`InheritEnableDesktopComposition` tinyint(1) NOT NULL,
`InheritEnableFontSmoothing` tinyint(1) NOT NULL,
`InheritExtApp` tinyint(1) NOT NULL,
`InheritFavorite` tinyint(1) NOT NULL,
`InheritICAEncryptionStrength` tinyint(1) NOT NULL,
`InheritIcon` tinyint(1) NOT NULL,
`InheritLoadBalanceInfo` tinyint(1) NOT NULL,
`InheritMacAddress` tinyint(1) NOT NULL,
`InheritOpeningCommand` tinyint(1) NOT NULL,
`InheritPanel` tinyint(1) NOT NULL,
`InheritPassword` tinyint(1) NOT NULL,
`InheritPort` tinyint(1) NOT NULL,
`InheritPostExtApp` tinyint(1) NOT NULL,
`InheritPreExtApp` tinyint(1) NOT NULL,
`InheritProtocol` tinyint(1) NOT NULL,
`InheritPuttySession` tinyint(1) NOT NULL,
`InheritRDGatewayDomain` tinyint(1) NOT NULL,
`InheritRDGatewayHostname` tinyint(1) NOT NULL,
`InheritRDGatewayPassword` tinyint(1) NOT NULL,
`InheritRDGatewayUsageMethod` tinyint(1) NOT NULL,
`InheritRDGatewayUseConnectionCredentials` tinyint(1) NOT NULL,
`InheritRDGatewayExternalCredentialProvider` tinyint(1) NOT NULL,
`InheritRDGatewayUsername` tinyint(1) NOT NULL,
`InheritRDGatewayUserViaAPI` tinyint(1) NOT NULL,
`InheritRDPAlertIdleTimeout` tinyint(1) NOT NULL,
`InheritRDPAuthenticationLevel` tinyint(1) NOT NULL,
`InheritRDPMinutesToIdleTimeout` tinyint(1) NOT NULL,
`InheritRdpVersion` tinyint(1) NOT NULL,
`InheritRedirectAudioCapture` tinyint(1) NOT NULL,
`InheritRedirectClipboard` tinyint(1) NOT NULL,
`InheritRedirectDiskDrives` tinyint(1) NOT NULL,
`InheritRedirectKeys` tinyint(1) NOT NULL,
`InheritRedirectPorts` tinyint(1) NOT NULL,
`InheritRedirectPrinters` tinyint(1) NOT NULL,
`InheritRedirectSmartCards` tinyint(1) NOT NULL,
`InheritRedirectSound` tinyint(1) NOT NULL,
`InheritRenderingEngine` tinyint(1) NOT NULL,
`InheritResolution` tinyint(1) NOT NULL,
`InheritSSHOptions` tinyint(1) NOT NULL,
`InheritSSHTunnelConnectionName` tinyint(1) NOT NULL,
`InheritSoundQuality` tinyint(1) NOT NULL,
`InheritUseConsoleSession` tinyint(1) NOT NULL,
`InheritUseCredSsp` tinyint(1) NOT NULL,
`InheritUseRestrictedAdmin` tinyint(1) NOT NULL,
`InheritUseRCG` tinyint(1) NOT NULL,
`InheritExternalCredentialProvider` tinyint(1) NOT NULL,
`InheritUserViaAPI` tinyint(1) NOT NULL,
`UseRestrictedAdmin` tinyint(1) NOT NULL,
`UseRCG` tinyint(1) NOT NULL,
`InheritUseEnhancedMode` tinyint(1) DEFAULT NULL,
`InheritUseVmId` tinyint(1) DEFAULT NULL,
`InheritUserField` tinyint(1) NOT NULL,
`InheritUsername` tinyint(1) NOT NULL,
`InheritVNCAuthMode` tinyint(1) NOT NULL,
`InheritVNCColors` tinyint(1) NOT NULL,
`InheritVNCCompression` tinyint(1) NOT NULL,
`InheritVNCEncoding` tinyint(1) NOT NULL,
`InheritVNCProxyIP` tinyint(1) NOT NULL,
`InheritVNCProxyPassword` tinyint(1) NOT NULL,
`InheritVNCProxyPort` tinyint(1) NOT NULL,
`InheritVNCProxyType` tinyint(1) NOT NULL,
`InheritVNCProxyUsername` tinyint(1) NOT NULL,
`InheritVNCSmartSizeMode` tinyint(1) NOT NULL,
`InheritVNCViewOnly` tinyint(1) NOT NULL,
`InheritVmId` tinyint(1) NOT NULL,
`StartProgram` varchar(512) DEFAULT NULL,
`StartProgramWorkDir` varchar(512) DEFAULT NULL,
`EC2Region` varchar(32) DEFAULT NULL,
`EC2InstanceId` varchar(32) DEFAULT NULL,
`ExternalCredentialProvider` varchar(256) DEFAULT NULL,
`ExternalAddressProvider` varchar(256) DEFAULT NULL,
PRIMARY KEY (`ConstantID`),
UNIQUE KEY `ID_UNIQUE` (`ID`),
UNIQUE KEY `ConstantID_UNIQUE` (`ConstantID`)
) ENGINE=InnoDB AUTO_INCREMENT=3324 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `tblRoot`
--
DROP TABLE IF EXISTS `tblRoot`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tblRoot` (
`Name` varchar(2048) NOT NULL,
`Export` tinyint(1) NOT NULL,
`Protected` varchar(4048) NOT NULL,
`ConfVersion` varchar(15) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `tblUpdate`
--
DROP TABLE IF EXISTS `tblUpdate`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tblUpdate` (
`LastUpdate` datetime(3) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
";
}
else
{
throw new Exception("Unknown database backend");
}
DbCommand cmd = databaseConnector.DbCommand(sql);
cmd.ExecuteNonQuery();
}
}
}
}
//// MySql.Data.MySqlClient.MySqlException: 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(`ConstantID`),
//UNIQUE(`ID`)
// ) ENGINE = InnoDB AUTO_INCREMENT = 3324 DEFAULT ' at line 156'

View File

@@ -138,6 +138,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
element.Add(new XAttribute("RDGatewayUsageMethod", connectionInfo.RDGatewayUsageMethod));
element.Add(new XAttribute("RDGatewayHostname", connectionInfo.RDGatewayHostname));
element.Add(new XAttribute("RDGatewayUseConnectionCredentials", connectionInfo.RDGatewayUseConnectionCredentials));
element.Add(new XAttribute("RDGatewayExternalCredentialProvider", connectionInfo.RDGatewayExternalCredentialProvider));
element.Add(new XAttribute("RDGatewayUserViaAPI", connectionInfo.RDGatewayUserViaAPI));
element.Add(_saveFilter.SaveUsername
? new XAttribute("RDGatewayUsername", connectionInfo.RDGatewayUsername)
@@ -151,9 +153,14 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
? new XAttribute("RDGatewayDomain", connectionInfo.RDGatewayDomain)
: new XAttribute("RDGatewayDomain", ""));
element.Add(new XAttribute("UseRCG", connectionInfo.UseRCG));
element.Add(new XAttribute("UseRestrictedAdmin", connectionInfo.UseRestrictedAdmin));
element.Add(new XAttribute("UserViaAPI", connectionInfo.UserViaAPI));
element.Add(new XAttribute("EC2InstanceId", connectionInfo.EC2InstanceId));
element.Add(new XAttribute("EC2Region", connectionInfo.EC2Region));
element.Add(new XAttribute("ExternalCredentialProvider", connectionInfo.ExternalCredentialProvider));
element.Add(new XAttribute("ExternalAddressProvider", connectionInfo.ExternalAddressProvider));
}
private void SetInheritanceAttributes(XContainer element, IInheritable connectionInfo)
@@ -290,14 +297,25 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
element.Add(new XAttribute("InheritRDGatewayPassword", inheritance.RDGatewayPassword.ToString().ToLowerInvariant()));
if (inheritance.RDGatewayDomain)
element.Add(new XAttribute("InheritRDGatewayDomain", inheritance.RDGatewayDomain.ToString().ToLowerInvariant()));
if (inheritance.RDGatewayExternalCredentialProvider)
element.Add(new XAttribute("InheritRDGatewayExternalCredentialProvider", inheritance.RDGatewayExternalCredentialProvider.ToString().ToLowerInvariant()));
if (inheritance.RDGatewayUserViaAPI)
element.Add(new XAttribute("InheritRDGatewayUserViaAPI", inheritance.RDGatewayUserViaAPI.ToString().ToLowerInvariant()));
if (inheritance.VmId)
element.Add(new XAttribute("InheritVmId", inheritance.VmId.ToString().ToLowerInvariant()));
if (inheritance.UseVmId)
element.Add(new XAttribute("InheritUseVmId", inheritance.UseVmId.ToString().ToLowerInvariant()));
if (inheritance.UseEnhancedMode)
element.Add(new XAttribute("InheritUseEnhancedMode", inheritance.UseEnhancedMode.ToString().ToLowerInvariant()));
if (inheritance.ExternalCredentialProvider)
element.Add(new XAttribute("InheritExternalCredentialProvider", inheritance.ExternalCredentialProvider.ToString().ToLowerInvariant()));
if (inheritance.UserViaAPI)
element.Add(new XAttribute("InheritUserViaAPI", inheritance.UserViaAPI.ToString().ToLowerInvariant()));
if (inheritance.UseRCG)
element.Add(new XAttribute("InheritUseRCG", inheritance.UseRCG.ToString().ToLowerInvariant()));
if (inheritance.UseRestrictedAdmin)
element.Add(new XAttribute("InheritUseRestrictedAdmin", inheritance.UseRestrictedAdmin.ToString().ToLowerInvariant()));
}
}
}

View File

@@ -44,6 +44,7 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
public ConnectionTreeModel Deserialize(string xml, bool import)
{
if (string.IsNullOrEmpty(xml)) return null;
try
{
LoadXmlConnectionData(xml);
@@ -95,9 +96,11 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
{
CreateDecryptor(new RootNodeInfo(RootNodeType.Connection));
connections = _decryptor.LegacyFullFileDecrypt(connections);
_xmlDocument = new XmlDocument();
if (connections != "")
{
_xmlDocument = new XmlDocument();
_xmlDocument.LoadXml(connections);
}
}
private void ValidateConnectionFileVersion()
@@ -466,28 +469,19 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
if (_confVersion >= 2.2)
{
// Get settings
connectionInfo.RDGatewayUsageMethod =
xmlnode.GetAttributeAsEnum<RDGatewayUsageMethod>("RDGatewayUsageMethod");
connectionInfo.RDGatewayUsageMethod = xmlnode.GetAttributeAsEnum<RDGatewayUsageMethod>("RDGatewayUsageMethod");
connectionInfo.RDGatewayHostname = xmlnode.GetAttributeAsString("RDGatewayHostname");
connectionInfo.RDGatewayUseConnectionCredentials =
xmlnode.GetAttributeAsEnum<RDGatewayUseConnectionCredentials>(
"RDGatewayUseConnectionCredentials");
connectionInfo.RDGatewayUseConnectionCredentials = xmlnode.GetAttributeAsEnum<RDGatewayUseConnectionCredentials>("RDGatewayUseConnectionCredentials");
connectionInfo.RDGatewayUsername = xmlnode.GetAttributeAsString("RDGatewayUsername");
connectionInfo.RDGatewayPassword =
_decryptor.Decrypt(xmlnode.GetAttributeAsString("RDGatewayPassword"));
connectionInfo.RDGatewayPassword = _decryptor.Decrypt(xmlnode.GetAttributeAsString("RDGatewayPassword"));
connectionInfo.RDGatewayDomain = xmlnode.GetAttributeAsString("RDGatewayDomain");
// Get inheritance settings
connectionInfo.Inheritance.RDGatewayUsageMethod =
xmlnode.GetAttributeAsBool("InheritRDGatewayUsageMethod");
connectionInfo.Inheritance.RDGatewayHostname =
xmlnode.GetAttributeAsBool("InheritRDGatewayHostname");
connectionInfo.Inheritance.RDGatewayUseConnectionCredentials =
xmlnode.GetAttributeAsBool("InheritRDGatewayUseConnectionCredentials");
connectionInfo.Inheritance.RDGatewayUsername =
xmlnode.GetAttributeAsBool("InheritRDGatewayUsername");
connectionInfo.Inheritance.RDGatewayPassword =
xmlnode.GetAttributeAsBool("InheritRDGatewayPassword");
connectionInfo.Inheritance.RDGatewayUsageMethod = xmlnode.GetAttributeAsBool("InheritRDGatewayUsageMethod");
connectionInfo.Inheritance.RDGatewayHostname = xmlnode.GetAttributeAsBool("InheritRDGatewayHostname");
connectionInfo.Inheritance.RDGatewayUseConnectionCredentials = xmlnode.GetAttributeAsBool("InheritRDGatewayUseConnectionCredentials");
connectionInfo.Inheritance.RDGatewayUsername = xmlnode.GetAttributeAsBool("InheritRDGatewayUsername");
connectionInfo.Inheritance.RDGatewayPassword = xmlnode.GetAttributeAsBool("InheritRDGatewayPassword");
connectionInfo.Inheritance.RDGatewayDomain = xmlnode.GetAttributeAsBool("InheritRDGatewayDomain");
}
@@ -498,10 +492,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
connectionInfo.EnableDesktopComposition = xmlnode.GetAttributeAsBool("EnableDesktopComposition");
// Get inheritance settings
connectionInfo.Inheritance.EnableFontSmoothing =
xmlnode.GetAttributeAsBool("InheritEnableFontSmoothing");
connectionInfo.Inheritance.EnableDesktopComposition =
xmlnode.GetAttributeAsBool("InheritEnableDesktopComposition");
connectionInfo.Inheritance.EnableFontSmoothing = xmlnode.GetAttributeAsBool("InheritEnableFontSmoothing");
connectionInfo.Inheritance.EnableDesktopComposition = xmlnode.GetAttributeAsBool("InheritEnableDesktopComposition");
}
if (_confVersion >= 2.4)
@@ -520,15 +512,13 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
if (_confVersion >= 2.6)
{
connectionInfo.SoundQuality =
xmlnode.GetAttributeAsEnum<RDPSoundQuality>("SoundQuality");
connectionInfo.SoundQuality = xmlnode.GetAttributeAsEnum<RDPSoundQuality>("SoundQuality");
connectionInfo.Inheritance.SoundQuality = xmlnode.GetAttributeAsBool("InheritSoundQuality");
connectionInfo.RDPMinutesToIdleTimeout = xmlnode.GetAttributeAsInt("RDPMinutesToIdleTimeout");
connectionInfo.Inheritance.RDPMinutesToIdleTimeout =
xmlnode.GetAttributeAsBool("InheritRDPMinutesToIdleTimeout");
connectionInfo.Inheritance.RDPMinutesToIdleTimeout = xmlnode.GetAttributeAsBool("InheritRDPMinutesToIdleTimeout");
connectionInfo.RDPAlertIdleTimeout = xmlnode.GetAttributeAsBool("RDPAlertIdleTimeout");
connectionInfo.Inheritance.RDPAlertIdleTimeout =
xmlnode.GetAttributeAsBool("InheritRDPAlertIdleTimeout"); }
connectionInfo.Inheritance.RDPAlertIdleTimeout = xmlnode.GetAttributeAsBool("InheritRDPAlertIdleTimeout");
}
if (_confVersion >= 2.7)
{
@@ -562,10 +552,21 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
connectionInfo.Inheritance.DisableMenuAnimations = xmlnode.GetAttributeAsBool("InheritDisableMenuAnimations");
connectionInfo.Inheritance.DisableCursorShadow = xmlnode.GetAttributeAsBool("InheritDisableCursorShadow");
connectionInfo.Inheritance.DisableCursorBlinking = xmlnode.GetAttributeAsBool("InheritDisableCursorBlinking");
connectionInfo.ExternalCredentialProvider = xmlnode.GetAttributeAsEnum("ExternalCredentialProvider", ExternalCredentialProvider.None);
connectionInfo.Inheritance.ExternalCredentialProvider = xmlnode.GetAttributeAsBool("InheritExternalCredentialProvider");
connectionInfo.UserViaAPI = xmlnode.GetAttributeAsString("UserViaAPI");
connectionInfo.Inheritance.UserViaAPI = xmlnode.GetAttributeAsBool("InheritUserViaAPI");
connectionInfo.ExternalAddressProvider = xmlnode.GetAttributeAsEnum("ExternalAddressProvider", ExternalAddressProvider.None);
connectionInfo.EC2InstanceId = xmlnode.GetAttributeAsString("EC2InstanceId");
connectionInfo.EC2Region = xmlnode.GetAttributeAsString("EC2Region");
connectionInfo.UseRestrictedAdmin = xmlnode.GetAttributeAsBool("UseRestrictedAdmin");
connectionInfo.Inheritance.UseRestrictedAdmin = xmlnode.GetAttributeAsBool("InheritUseRestrictedAdmin");
connectionInfo.UseRCG = xmlnode.GetAttributeAsBool("UseRCG");
connectionInfo.Inheritance.UseRCG = xmlnode.GetAttributeAsBool("InheritUseRCG");
connectionInfo.RDGatewayExternalCredentialProvider = xmlnode.GetAttributeAsEnum("RDGatewayExternalCredentialProvider", ExternalCredentialProvider.None);
connectionInfo.RDGatewayUserViaAPI = xmlnode.GetAttributeAsString("RDGatewayUserViaAPI");
connectionInfo.Inheritance.RDGatewayExternalCredentialProvider = xmlnode.GetAttributeAsBool("InheritRDGatewayExternalCredentialProvider");
connectionInfo.Inheritance.RDGatewayUserViaAPI = xmlnode.GetAttributeAsBool("InheritRDGatewayUserViaAPI");
}
}
catch (Exception ex)

View File

@@ -57,7 +57,7 @@ namespace mRemoteNG.Config.Serializers.MiscSerializers
if (versionAttribute != null)
{
var version = new Version(versionAttribute);
if (!(version == new Version(2, 7)))
if (!(version == new Version(2, 7)) && !(version == new Version(2, 83)))
{
throw new FileFormatException($"Unsupported file version ({version}).");
}
@@ -183,8 +183,8 @@ namespace mRemoteNG.Config.Serializers.MiscSerializers
{
if (bool.TryParse(connectionSettingsNode.SelectSingleNode("./connectToConsole")?.InnerText, out var useConsole))
connectionInfo.UseConsoleSession = useConsole;
connectionInfo.RDPStartProgram = connectionSettingsNode.SelectSingleNode("./startProgram")?.InnerText;
connectionInfo.RDPStartProgramWorkDir = connectionSettingsNode.SelectSingleNode("./startProgramWorkDir")?.InnerText;
connectionInfo.RDPStartProgram = connectionSettingsNode.SelectSingleNode("./startProgram")?.InnerText ?? string.Empty;
connectionInfo.RDPStartProgramWorkDir = connectionSettingsNode.SelectSingleNode("./startProgramWorkDir")?.InnerText ?? string.Empty;
if (int.TryParse(connectionSettingsNode.SelectSingleNode("./port")?.InnerText, out var port))
connectionInfo.Port = port;
}

View File

@@ -1,75 +1,75 @@
using mRemoteNG.App;
using mRemoteNG.App.Info;
using mRemoteNG.Config.DatabaseConnectors;
using mRemoteNG.Messages;
using mRemoteNG.Resources.Language;
using System;
namespace mRemoteNG.Config.Serializers.Versioning
{
public class SqlDatabaseVersionVerifier
using mRemoteNG.App;
using mRemoteNG.App.Info;
using mRemoteNG.Config.DatabaseConnectors;
using mRemoteNG.Messages;
using mRemoteNG.Resources.Language;
using System;
namespace mRemoteNG.Config.Serializers.Versioning
{
public class SqlDatabaseVersionVerifier
{
protected readonly Version currentSupportedVersion = new Version(2, 9);
private readonly IDatabaseConnector _databaseConnector;
public SqlDatabaseVersionVerifier(IDatabaseConnector DatabaseConnector)
{
if (DatabaseConnector == null)
throw new ArgumentNullException(nameof(DatabaseConnector));
_databaseConnector = DatabaseConnector;
}
public bool VerifyDatabaseVersion(Version dbVersion)
{
var isVerified = false;
try
{
var databaseVersion = dbVersion;
if (databaseVersion.Equals(new Version()))
{
return true;
}
var dbUpgraders = new IVersionUpgrader[]
{
new SqlVersion22To23Upgrader(_databaseConnector),
new SqlVersion23To24Upgrader(_databaseConnector),
new SqlVersion24To25Upgrader(_databaseConnector),
new SqlVersion25To26Upgrader(_databaseConnector),
new SqlVersion26To27Upgrader(_databaseConnector),
new SqlVersion27To28Upgrader(_databaseConnector),
new SqlVersion28To29Upgrader(_databaseConnector),
};
foreach (var upgrader in dbUpgraders)
{
if (upgrader.CanUpgrade(databaseVersion))
{
databaseVersion = upgrader.Upgrade();
}
}
// DB is at the highest current supported version
if (databaseVersion.CompareTo(currentSupportedVersion) == 0)
isVerified = true;
if (isVerified == false)
Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg,
string.Format(Language.ErrorBadDatabaseVersion,
databaseVersion,
GeneralAppInfo.ProductName));
}
catch (Exception ex)
{
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg,
string.Format(Language.ErrorVerifyDatabaseVersionFailed,
ex.Message));
}
return isVerified;
}
}
private readonly IDatabaseConnector _databaseConnector;
public SqlDatabaseVersionVerifier(IDatabaseConnector DatabaseConnector)
{
if (DatabaseConnector == null)
throw new ArgumentNullException(nameof(DatabaseConnector));
_databaseConnector = DatabaseConnector;
}
public bool VerifyDatabaseVersion(Version dbVersion)
{
var isVerified = false;
try
{
var databaseVersion = dbVersion;
if (databaseVersion.Equals(new Version()))
{
return true;
}
var dbUpgraders = new IVersionUpgrader[]
{
new SqlVersion22To23Upgrader(_databaseConnector),
new SqlVersion23To24Upgrader(_databaseConnector),
new SqlVersion24To25Upgrader(_databaseConnector),
new SqlVersion25To26Upgrader(_databaseConnector),
new SqlVersion26To27Upgrader(_databaseConnector),
new SqlVersion27To28Upgrader(_databaseConnector),
new SqlVersion28To29Upgrader(_databaseConnector),
};
foreach (var upgrader in dbUpgraders)
{
if (upgrader.CanUpgrade(databaseVersion))
{
databaseVersion = upgrader.Upgrade();
}
}
// DB is at the highest current supported version
if (databaseVersion.CompareTo(currentSupportedVersion) == 0)
isVerified = true;
if (isVerified == false)
Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg,
string.Format(Language.ErrorBadDatabaseVersion,
databaseVersion,
GeneralAppInfo.ProductName));
}
catch (Exception ex)
{
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg,
string.Format(Language.ErrorVerifyDatabaseVersionFailed,
ex.Message));
}
return isVerified;
}
}
}

View File

@@ -2,6 +2,7 @@
using mRemoteNG.Config.DatabaseConnectors;
using mRemoteNG.Messages;
using System;
using System.Data.SqlClient;
namespace mRemoteNG.Config.Serializers.Versioning
{
@@ -23,24 +24,31 @@ namespace mRemoteNG.Config.Serializers.Versioning
{
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg,
"Upgrading database from version 2.6 to version 2.7.");
const string sqlText = @"
try
{
const string sqlText = @"
ALTER TABLE tblCons
ADD RedirectClipboard bit NOT NULL DEFAULT 0,
InheritRedirectClipboard bit NOT NULL DEFAULT 0,
VmId varchar NOT NULL DEFAULT '',
UseVmId bit NOT NULL DEFAULT 0,
UseEnhancedMode bit NOT NULL DEFAULT 0,
InheritVmId bit NOT NULL DEFAULT 0,
InheritUseVmId bit NOT NULL DEFAULT 0,
SSHTunnelConnectionName varchar NOT NULL DEFAULT '',
InheritSSHTunnelConnectionName bit NOT NULL DEFAULT 0,
SSHOptions varchar NOT NULL DEFAULT '',
InheritSSHOptions bit NOT NULL DEFAULT 0,
InheritUseEnhancedMode bit NOT NULL DEFAULT 0;
ADD RedirectClipboard bit NOT NULL,
InheritRedirectClipboard bit NOT NULL,
VmId varchar NOT NULL DEFAULT NULL,
UseVmId bit NOT NULL,
UseEnhancedMode bit NOT NULL,
InheritVmId bit NOT NULL,
InheritUseVmId bit NOT NULL,
SSHTunnelConnectionName varchar NOT NULL DEFAULT NULL,
InheritSSHTunnelConnectionName bit NOT NULL,
SSHOptions varchar NOT NULL DEFAULT NULL,
InheritSSHOptions bit NOT NULL,
InheritUseEnhancedMode bit NOT NULL;
UPDATE tblRoot
SET ConfVersion='2.7'";
var dbCommand = _databaseConnector.DbCommand(sqlText);
dbCommand.ExecuteNonQuery();
var dbCommand = _databaseConnector.DbCommand(sqlText);
dbCommand.ExecuteNonQuery();
}
catch (SqlException)
{
// no-op
}
return new Version(2, 7);
}

View File

@@ -3,6 +3,7 @@ using mRemoteNG.Config.DatabaseConnectors;
using mRemoteNG.Messages;
using System;
using System.Data.Common;
using System.Data.SqlClient;
namespace mRemoteNG.Config.Serializers.Versioning
{
@@ -25,39 +26,44 @@ namespace mRemoteNG.Config.Serializers.Versioning
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg,
"Upgrading database from version 2.7 to version 2.8.");
const string mySqlText = @"
try
{
const string mySqlText1 = @"
ALTER TABLE tblCons MODIFY COLUMN ID INT;
ALTER TABLE tblCons DROP PRIMARY KEY, ADD PRIMARY KEY (ConstantID);
ALTER TABLE tblCons ADD INDEX `id` (ID), MODIFY ID int auto_increment;
ALTER TABLE tblCons MODIFY COLUMN ID INT AUTO_INCREMENT, ADD UNIQUE(ID);
UPDATE tblRoot SET ConfVersion='2.8'";
const string msSqlText1 = @"
ALTER TABLE tblCons ADD DEFAULT 0 FOR UseEnhancedMode;
ALTER TABLE tblCons ADD DEFAULT 0 FOR InheritUseEnhancedMode;
const string msSqlText1 = @"
UPDATE tblCons SET UseEnhancedMode = 0 WHERE UseEnhancedMode IS NULL;
UPDATE tblCons SET InheritUseEnhancedMode = 0 WHERE InheritUseEnhancedMode IS NULL;
ALTER TABLE tblCons ALTER COLUMN ConstantID varchar(128) NOT NULL;";
const string msSqlText2 = @"
const string msSqlText2 = @"
ALTER TABLE tblCons ADD CONSTRAINT PK_tblCons PRIMARY KEY (ConstantID);
UPDATE tblRoot SET ConfVersion='2.8';";
DbCommand dbCommand;
if (_databaseConnector.GetType() == typeof(MSSqlDatabaseConnector))
{
dbCommand = _databaseConnector.DbCommand(msSqlText1);
DbCommand dbCommand;
if (_databaseConnector.GetType() == typeof(MSSqlDatabaseConnector))
{
dbCommand = _databaseConnector.DbCommand(msSqlText1);
dbCommand.ExecuteNonQuery();
dbCommand = _databaseConnector.DbCommand(msSqlText2);
} else if (_databaseConnector.GetType() == typeof(MySqlDatabaseConnector))
{
dbCommand = _databaseConnector.DbCommand(mySqlText1);
} else
{
throw new Exception("Unknown database backend");
}
dbCommand.ExecuteNonQuery();
dbCommand = _databaseConnector.DbCommand(msSqlText2);
} else if (_databaseConnector.GetType() == typeof(MySqlDatabaseConnector))
{
dbCommand = _databaseConnector.DbCommand(mySqlText);
} else
{
throw new Exception("Unknow database backend");
}
dbCommand.ExecuteNonQuery();
catch (SqlException)
{
// no-op
}
return new Version(2, 8);
}
}

View File

@@ -27,20 +27,68 @@ namespace mRemoteNG.Config.Serializers.Versioning
public Version Upgrade()
{
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg,
string.Format("Upgrading database to version {0}.", version));
$"Upgrading database to version {version}.");
// MYSQL
const string mySqlAlter = @"
ALTER TABLE tblCons ADD COLUMN StartProgram varchar(512) DEFAULT NULL;
ALTER TABLE tblCons ADD COLUMN StartProgramWorkDir varchar(512) DEFAULT NULL;
ALTER TABLE tblRoot CHANGE COLUMN ConfVersion ConfVersion VARCHAR(15) NOT NULL;";
ALTER TABLE tblCons ADD COLUMN `InheritUseRestrictedAdmin` tinyint(1) NOT NULL;
ALTER TABLE tblCons ADD COLUMN `UseRCG` tinyint(1) NOT NULL;
ALTER TABLE tblCons ADD COLUMN `UseRestrictedAdmin` tinyint(1) NOT NULL;
ALTER TABLE tblCons ADD COLUMN `InheritUseRCG` tinyint(1) NOT NULL;
ALTER TABLE tblCons ADD COLUMN `InheritRDGatewayExternalCredentialProvider` tinyint(1) NOT NULL;
ALTER TABLE tblCons ADD COLUMN `InheritRDGatewayUserViaAPI` tinyint(1) NOT NULL;
ALTER TABLE tblCons ADD COLUMN `InheritExternalCredentialProvider` tinyint(1) NOT NULL;
ALTER TABLE tblCons ADD COLUMN `InheritUserViaAPI` tinyint(1) NOT NULL;
ALTER TABLE tblCons ADD COLUMN `EC2Region` varchar(32) DEFAULT NULL;
ALTER TABLE tblCons ADD COLUMN `EC2InstanceId` varchar(32) DEFAULT NULL;
ALTER TABLE tblCons ADD COLUMN `ExternalCredentialProvider` varchar(256) DEFAULT NULL;
ALTER TABLE tblCons ADD COLUMN `ExternalAddressProvider` varchar(256) DEFAULT NULL;
SET SQL_SAFE_UPDATES=0;
UPDATE tblCons SET InheritUseEnhancedMode = 0 WHERE InheritUseEnhancedMode IS NULL;
ALTER TABLE tblCons MODIFY COLUMN InheritUseEnhancedMode tinyint(1) NOT NULL;
UPDATE tblCons SET UseEnhancedMode = 0 WHERE UseEnhancedMode IS NULL;
ALTER TABLE tblCons MODIFY COLUMN UseEnhancedMode tinyint(1) NOT NULL;
UPDATE tblCons SET InheritVmId = 0 WHERE InheritVmId IS NULL;
ALTER TABLE tblCons MODIFY COLUMN InheritVmId tinyint(1) NOT NULL;
UPDATE tblCons SET InheritUseVmId = 0 WHERE InheritUseVmId IS NULL;
ALTER TABLE tblCons MODIFY COLUMN InheritUseVmId tinyint(1) NOT NULL;
UPDATE tblCons SET UseVmId = 0 WHERE UseVmId IS NULL;
ALTER TABLE tblCons MODIFY COLUMN UseVmId tinyint(1) NOT NULL;
SET SQL_SAFE_UPDATES=1;
ALTER TABLE tblRoot ALTER COLUMN ConfVersion VARCHAR(15) NOT NULL;
";
const string mySqlUpdate = @"UPDATE tblRoot SET ConfVersion=?;";
// MS-SQL
const string msSqlAlter = @"
IF NOT EXISTS (SELECT * FROM sys.columns WHERE object_id = OBJECT_ID(N'[dbo].[tblCons]') AND name = 'StartProgram')
BEGIN
ALTER TABLE tblCons ADD StartProgram varchar(512), StartProgramWorkDir varchar(512);
END;GO;
ALTER TABLE tblRoot MODIFY COLUMN ConfVersion varchar(15);GO;";
ALTER TABLE tblCons ADD InheritUseRestrictedAdmin bit NOT NULL;
ALTER TABLE tblCons ADD UseRCG bit NOT NULL;
ALTER TABLE tblCons ADD UseRestrictedAdmin bit NOT NULL;
ALTER TABLE tblCons ADD InheritUseRCG bit NOT NULL;
ALTER TABLE tblCons ADD InheritRDGatewayExternalCredentialProvider bit NOT NULL;
ALTER TABLE tblCons ADD InheritRDGatewayUserViaAPI bit NOT NULL;
ALTER TABLE tblCons ADD InheritExternalCredentialProvider bit NOT NULL;
ALTER TABLE tblCons ADD InheritUserViaAPI bit NOT NULL;
ALTER TABLE tblCons ADD EC2Region varchar(32) NULL;
ALTER TABLE tblCons ADD EC2InstanceId varchar(32) NULL;
ALTER TABLE tblCons ADD ExternalCredentialProvider varchar(256) NULL;
ALTER TABLE tblCons ADD ExternalAddressProvider varchar(256) NULL;
UPDATE tblCons SET InheritUseEnhancedMode = 0 WHERE InheritUseEnhancedMode IS NULL;
ALTER TABLE tblCons ALTER COLUMN InheritUseEnhancedMode bit NOT NULL;
UPDATE tblCons SET UseEnhancedMode = 0 WHERE UseEnhancedMode IS NULL;
ALTER TABLE tblCons ALTER COLUMN UseEnhancedMode bit NOT NULL;
UPDATE tblCons SET InheritVmId = 0 WHERE InheritVmId IS NULL;
ALTER TABLE tblCons ALTER COLUMN InheritVmId bit NOT NULL;
UPDATE tblCons SET InheritUseVmId = 0 WHERE InheritUseVmId IS NULL;
ALTER TABLE tblCons ALTER COLUMN InheritUseVmId bit NOT NULL;
UPDATE tblCons SET UseVmId = 0 WHERE UseVmId IS NULL;
ALTER TABLE tblCons ALTER COLUMN UseVmId bit NOT NULL;
ALTER TABLE tblRoot ALTER COLUMN [ConfVersion] VARCHAR(15) NOT NULL;
";
const string msSqlUpdate = @"UPDATE tblRoot SET ConfVersion=@confVersion;";
using (var sqlTran = _databaseConnector.DbConnection().BeginTransaction(System.Data.IsolationLevel.Serializable))
{
DbCommand dbCommand;

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Drawing;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
@@ -27,12 +27,7 @@ namespace mRemoteNG.Config.Settings
private FrmMain MainForm { get; }
public SettingsLoader(FrmMain mainForm,
MessageCollector messageCollector,
QuickConnectToolStrip quickConnectToolStrip,
ExternalToolsToolStrip externalToolsToolStrip,
MultiSshToolStrip multiSshToolStrip,
MenuStrip mainMenu)
public SettingsLoader(FrmMain mainForm, MessageCollector messageCollector, QuickConnectToolStrip quickConnectToolStrip, ExternalToolsToolStrip externalToolsToolStrip, MultiSshToolStrip multiSshToolStrip, MenuStrip mainMenu)
{
if (mainForm == null)
throw new ArgumentNullException(nameof(mainForm));
@@ -74,7 +69,7 @@ namespace mRemoteNG.Config.Settings
LoadExternalAppsFromXml();
SetAlwaysShowPanelTabs();
if (Properties.Settings.Default.ResetToolbars)
if (Properties.App.Default.ResetToolbars)
SetToolbarsDefault();
else
LoadToolbarsFromSettings();
@@ -87,40 +82,37 @@ namespace mRemoteNG.Config.Settings
private static void SetAlwaysShowPanelTabs()
{
if (Properties.Settings.Default.AlwaysShowPanelTabs)
if (Properties.OptionsTabsPanelsPage.Default.AlwaysShowPanelTabs)
FrmMain.Default.pnlDock.DocumentStyle = DocumentStyle.DockingWindow;
}
private void SetSupportedCulture()
{
if (Properties.Settings.Default.OverrideUICulture == "" ||
!SupportedCultures.IsNameSupported(Properties.Settings.Default.OverrideUICulture)) return;
if (Properties.Settings.Default.OverrideUICulture == "" || !SupportedCultures.IsNameSupported(Properties.Settings.Default.OverrideUICulture)) return;
Thread.CurrentThread.CurrentUICulture = new CultureInfo(Properties.Settings.Default.OverrideUICulture);
_messageCollector.AddMessage(MessageClass.InformationMsg,
$"Override Culture: {Thread.CurrentThread.CurrentUICulture.Name}/{Thread.CurrentThread.CurrentUICulture.NativeName}",
true);
_messageCollector.AddMessage(MessageClass.InformationMsg, $"Override Culture: {Thread.CurrentThread.CurrentUICulture.Name}/{Thread.CurrentThread.CurrentUICulture.NativeName}", true);
}
private void SetApplicationWindowPositionAndSize()
{
MainForm.WindowState = FormWindowState.Normal;
if (Properties.Settings.Default.MainFormState == FormWindowState.Normal)
if (Properties.App.Default.MainFormState == FormWindowState.Normal)
{
if (!Properties.Settings.Default.MainFormLocation.IsEmpty)
MainForm.Location = Properties.Settings.Default.MainFormLocation;
if (!Properties.Settings.Default.MainFormSize.IsEmpty)
MainForm.Size = Properties.Settings.Default.MainFormSize;
if (!Properties.App.Default.MainFormLocation.IsEmpty)
MainForm.Location = Properties.App.Default.MainFormLocation;
if (!Properties.App.Default.MainFormSize.IsEmpty)
MainForm.Size = Properties.App.Default.MainFormSize;
}
else
{
if (!Properties.Settings.Default.MainFormRestoreLocation.IsEmpty)
MainForm.Location = Properties.Settings.Default.MainFormRestoreLocation;
if (!Properties.Settings.Default.MainFormRestoreSize.IsEmpty)
MainForm.Size = Properties.Settings.Default.MainFormRestoreSize;
if (!Properties.App.Default.MainFormRestoreLocation.IsEmpty)
MainForm.Location = Properties.App.Default.MainFormRestoreLocation;
if (!Properties.App.Default.MainFormRestoreSize.IsEmpty)
MainForm.Size = Properties.App.Default.MainFormRestoreSize;
}
if (Properties.Settings.Default.MainFormState == FormWindowState.Maximized)
if (Properties.App.Default.MainFormState == FormWindowState.Maximized)
{
MainForm.WindowState = FormWindowState.Maximized;
}
@@ -145,33 +137,31 @@ namespace mRemoteNG.Config.Settings
private void SetAutoSave()
{
if (Properties.Settings.Default.AutoSaveEveryMinutes <= 0) return;
MainForm.tmrAutoSave.Interval = Properties.Settings.Default.AutoSaveEveryMinutes * 60000;
if (Properties.OptionsConnectionsPage.Default.AutoSaveEveryMinutes <= 0) return;
MainForm.tmrAutoSave.Interval = Properties.OptionsConnectionsPage.Default.AutoSaveEveryMinutes * 60000;
MainForm.tmrAutoSave.Enabled = true;
}
private void SetKioskMode()
{
if (!Properties.Settings.Default.MainFormKiosk) return;
if (!Properties.App.Default.MainFormKiosk) return;
MainForm.Fullscreen.Value = true;
}
private static void SetShowSystemTrayIcon()
{
if (Properties.Settings.Default.ShowSystemTrayIcon)
if (Properties.OptionsAppearancePage.Default.ShowSystemTrayIcon)
Runtime.NotificationAreaIcon = new NotificationAreaIcon();
}
private static void SetPuttyPath()
{
PuttyBase.PuttyPath = Properties.Settings.Default.UseCustomPuttyPath
? Properties.Settings.Default.CustomPuttyPath
: GeneralAppInfo.PuttyPath;
PuttyBase.PuttyPath = Properties.OptionsAdvancedPage.Default.UseCustomPuttyPath ? Properties.OptionsAdvancedPage.Default.CustomPuttyPath : GeneralAppInfo.PuttyPath;
}
private void EnsureSettingsAreSavedInNewestVersion()
{
if (Properties.Settings.Default.DoUpgrade)
if (Properties.App.Default.DoUpgrade)
UpgradeSettingsVersion();
}
@@ -187,12 +177,12 @@ namespace mRemoteNG.Config.Settings
_messageCollector.AddExceptionMessage("Settings.Upgrade() failed", ex);
}
Properties.Settings.Default.DoUpgrade = false;
Properties.App.Default.DoUpgrade = false;
// Clear pending update flag
// This is used for automatic updates, not for settings migration, but it
// needs to be cleared here because we know that we just updated.
Properties.Settings.Default.UpdatePending = false;
Properties.OptionsUpdatesPage.Default.UpdatePending = false;
}
private void SetToolbarsDefault()
@@ -259,9 +249,7 @@ namespace mRemoteNG.Config.Settings
private void SetToolstripGripStyle(ToolStrip toolbar)
{
toolbar.GripStyle = Properties.Settings.Default.LockToolbars
? ToolStripGripStyle.Hidden
: ToolStripGripStyle.Visible;
toolbar.GripStyle = Properties.Settings.Default.LockToolbars ? ToolStripGripStyle.Hidden : ToolStripGripStyle.Visible;
}
private ToolStripPanel ToolStripPanelFromString(string panel)

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Windows.Forms;
using mRemoteNG.App;
using mRemoteNG.App.Info;
@@ -11,10 +11,7 @@ namespace mRemoteNG.Config.Settings
{
public static class SettingsSaver
{
public static void SaveSettings(Control quickConnectToolStrip,
ExternalToolsToolStrip externalToolsToolStrip,
MultiSshToolStrip multiSshToolStrip,
FrmMain frmMain)
public static void SaveSettings(Control quickConnectToolStrip, ExternalToolsToolStrip externalToolsToolStrip, MultiSshToolStrip multiSshToolStrip, FrmMain frmMain)
{
try
{
@@ -25,31 +22,45 @@ namespace mRemoteNG.Config.Settings
frmMain.WindowState = FormWindowState.Maximized;
}
Properties.Settings.Default.MainFormLocation = frmMain.Location;
Properties.Settings.Default.MainFormSize = frmMain.Size;
Properties.App.Default.MainFormLocation = frmMain.Location;
Properties.App.Default.MainFormSize = frmMain.Size;
if (frmMain.WindowState != FormWindowState.Normal)
{
Properties.Settings.Default.MainFormRestoreLocation = frmMain.RestoreBounds.Location;
Properties.Settings.Default.MainFormRestoreSize = frmMain.RestoreBounds.Size;
Properties.App.Default.MainFormRestoreLocation = frmMain.RestoreBounds.Location;
Properties.App.Default.MainFormRestoreSize = frmMain.RestoreBounds.Size;
}
Properties.Settings.Default.MainFormState = frmMain.WindowState;
Properties.App.Default.MainFormState = frmMain.WindowState;
if (frmMain.Fullscreen != null)
{
Properties.Settings.Default.MainFormKiosk = frmMain.Fullscreen.Value;
Properties.App.Default.MainFormKiosk = frmMain.Fullscreen.Value;
}
Properties.Settings.Default.FirstStart = false;
Properties.Settings.Default.ResetPanels = false;
Properties.Settings.Default.ResetToolbars = false;
Properties.Settings.Default.NoReconnect = false;
Properties.App.Default.FirstStart = false;
Properties.App.Default.ResetPanels = false;
Properties.App.Default.ResetToolbars = false;
SaveExternalAppsToolbarLocation(externalToolsToolStrip);
SaveQuickConnectToolbarLocation(quickConnectToolStrip);
SaveMultiSshToolbarLocation(multiSshToolStrip);
Properties.App.Default.Save();
Properties.AppUI.Default.Save();
Properties.OptionsAdvancedPage.Default.Save();
Properties.OptionsAppearancePage.Default.Save();
Properties.OptionsBackupPage.Default.Save();
Properties.OptionsConnectionsPage.Default.Save();
Properties.OptionsCredentialsPage.Default.Save();
Properties.OptionsDBsPage.Default.Save();
Properties.OptionsNotificationsPage.Default.Save();
Properties.OptionsSecurityPage.Default.Save();
Properties.OptionsStartupExitPage.Default.Save();
Properties.OptionsTabsPanelsPage.Default.Save();
Properties.OptionsThemePage.Default.Save();
Properties.OptionsUpdatesPage.Default.Save();
Properties.Settings.Default.Save();
SaveDockPanelLayout();

View File

@@ -9,7 +9,6 @@ using mRemoteNG.Tools;
using mRemoteNG.Tools.Attributes;
using mRemoteNG.Resources.Language;
namespace mRemoteNG.Connection
{
public abstract class AbstractConnectionRecord : INotifyPropertyChanged
@@ -22,8 +21,10 @@ namespace mRemoteNG.Connection
private string _panel;
private string _hostname;
private ExternalAddressProvider _externalAddressProvider;
private string _ec2InstanceId = "";
private string _ec2Region = "";
private ExternalCredentialProvider _externalCredentialProvider;
private string _userViaAPI = "";
private string _username = "";
private string _password = "";
@@ -45,6 +46,8 @@ namespace mRemoteNG.Connection
private string _loadBalanceInfo;
private HTTPBase.RenderingEngine _renderingEngine;
private bool _useCredSsp;
private bool _useRestrictedAdmin;
private bool _useRCG;
private bool _useVmId;
private RDGatewayUsageMethod _rdGatewayUsageMethod;
@@ -53,6 +56,9 @@ namespace mRemoteNG.Connection
private string _rdGatewayUsername;
private string _rdGatewayPassword;
private string _rdGatewayDomain;
private ExternalCredentialProvider _rdGatewayExternalCredentialProvider;
private string _rdGatewayUserViaAPI = "";
private RDPResolutions _resolution;
private bool _automaticResize;
@@ -165,15 +171,29 @@ namespace mRemoteNG.Connection
set => SetField(ref _port, value, "Port");
}
// external credential provider selector
[LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 2),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.ExternalCredentialProvider)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionExternalCredentialProvider)),
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
AttributeUsedInProtocol(ProtocolType.RDP, ProtocolType.SSH1, ProtocolType.SSH2)]
public ExternalCredentialProvider ExternalCredentialProvider
{
get => GetPropertyValue("ExternalCredentialProvider", _externalCredentialProvider);
set => SetField(ref _externalCredentialProvider, value, "ExternalCredentialProvider");
}
// credential record identifier for external credential provider
[LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 2),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.UserViaAPI)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionUserViaAPI)),
AttributeUsedInAllProtocolsExcept(ProtocolType.VNC, ProtocolType.Telnet, ProtocolType.Rlogin, ProtocolType.RAW)]
AttributeUsedInProtocol(ProtocolType.RDP, ProtocolType.SSH1, ProtocolType.SSH2)]
public virtual string UserViaAPI
{
get => GetPropertyValue("UserViaAPI", _userViaAPI);
set => SetField(ref _userViaAPI, value, "UserViaAPI");
}
[LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 2),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.Username)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionUsername)),
@@ -205,6 +225,19 @@ namespace mRemoteNG.Connection
set => SetField(ref _domain, value?.Trim(), "Domain");
}
// external address provider selector
[LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 2),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.ExternalAddressProvider)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionExternalAddressProvider)),
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
AttributeUsedInProtocol(ProtocolType.RDP, ProtocolType.SSH2)]
public ExternalAddressProvider ExternalAddressProvider
{
get => GetPropertyValue("ExternalAddressProvider", _externalAddressProvider);
set => SetField(ref _externalAddressProvider, value, "ExternalAddressProvider");
}
[LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 2),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.EC2InstanceId)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionEC2InstanceId)),
@@ -394,6 +427,28 @@ namespace mRemoteNG.Connection
set => SetField(ref _useCredSsp, value, "UseCredSsp");
}
[LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 3),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.UseRestrictedAdmin)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionUseRestrictedAdmin)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
AttributeUsedInProtocol(ProtocolType.RDP)]
public bool UseRestrictedAdmin
{
get => GetPropertyValue("UseRestrictedAdmin", _useRestrictedAdmin);
set => SetField(ref _useRestrictedAdmin, value, "UseRestrictedAdmin");
}
[LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 3),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.UseRCG)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionUseRCG)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
AttributeUsedInProtocol(ProtocolType.RDP)]
public bool UseRCG
{
get => GetPropertyValue("UseRCG", _useRCG);
set => SetField(ref _useRCG, value, "UseRCG");
}
[LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 3),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.UseVmId)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionUseVmId)),
@@ -419,7 +474,7 @@ namespace mRemoteNG.Connection
#region RD Gateway
[LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 4),
[LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 4),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.RdpGatewayUsageMethod)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRdpGatewayUsageMethod)),
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
@@ -430,7 +485,7 @@ namespace mRemoteNG.Connection
set => SetField(ref _rdGatewayUsageMethod, value, "RDGatewayUsageMethod");
}
[LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 4),
[LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 4),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.RdpGatewayHostname)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRDGatewayHostname)),
AttributeUsedInProtocol(ProtocolType.RDP)]
@@ -440,7 +495,7 @@ namespace mRemoteNG.Connection
set => SetField(ref _rdGatewayHostname, value?.Trim(), "RDGatewayHostname");
}
[LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 4),
[LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 4),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.RdpGatewayUseConnectionCredentials)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRDGatewayUseConnectionCredentials)),
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
@@ -451,7 +506,7 @@ namespace mRemoteNG.Connection
set => SetField(ref _rdGatewayUseConnectionCredentials, value, "RDGatewayUseConnectionCredentials");
}
[LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 4),
[LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 4),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.RdpGatewayUsername)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRDGatewayUsername)),
AttributeUsedInProtocol(ProtocolType.RDP)]
@@ -461,7 +516,7 @@ namespace mRemoteNG.Connection
set => SetField(ref _rdGatewayUsername, value?.Trim(), "RDGatewayUsername");
}
[LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 4),
[LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 4),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.RdpGatewayPassword)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRdpGatewayPassword)),
PasswordPropertyText(true),
@@ -472,7 +527,7 @@ namespace mRemoteNG.Connection
set => SetField(ref _rdGatewayPassword, value, "RDGatewayPassword");
}
[LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 4),
[LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 4),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.RdpGatewayDomain)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionRDGatewayDomain)),
AttributeUsedInProtocol(ProtocolType.RDP)]
@@ -481,7 +536,28 @@ namespace mRemoteNG.Connection
get => GetPropertyValue("RDGatewayDomain", _rdGatewayDomain).Trim();
set => SetField(ref _rdGatewayDomain, value?.Trim(), "RDGatewayDomain");
}
// external credential provider selector for rd gateway
[LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 4),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.ExternalCredentialProvider)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionExternalCredentialProvider)),
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
AttributeUsedInProtocol(ProtocolType.RDP)]
public ExternalCredentialProvider RDGatewayExternalCredentialProvider
{
get => GetPropertyValue("RDGatewayExternalCredentialProvider", _rdGatewayExternalCredentialProvider);
set => SetField(ref _rdGatewayExternalCredentialProvider, value, "RDGatewayExternalCredentialProvider");
}
// credential record identifier for external credential provider
[LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 4),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.UserViaAPI)),
LocalizedAttributes.LocalizedDescription(nameof(Language.PropertyDescriptionUserViaAPI)),
AttributeUsedInProtocol(ProtocolType.RDP)]
public virtual string RDGatewayUserViaAPI
{
get => GetPropertyValue("RDGatewayUserViaAPI", _rdGatewayUserViaAPI);
set => SetField(ref _rdGatewayUserViaAPI, value, "RDGatewayUserViaAPI");
}
#endregion
#region Appearance

View File

@@ -19,7 +19,6 @@ using mRemoteNG.Tree;
using mRemoteNG.Resources.Language;
using mRemoteNG.Tree.Root;
namespace mRemoteNG.Connection
{
[DefaultProperty("Name")]
@@ -296,7 +295,10 @@ namespace mRemoteNG.Connection
private void SetConnectionDefaults()
{
Hostname = string.Empty;
ExternalAddressProvider = (ExternalAddressProvider)Enum.Parse(typeof(ExternalAddressProvider), Settings.Default.ConDefaultExternalAddressProvider);
EC2Region = Settings.Default.ConDefaultEC2Region;
ExternalCredentialProvider = (ExternalCredentialProvider)Enum.Parse(typeof(ExternalCredentialProvider), Settings.Default.ConDefaultExternalCredentialProvider);
UserViaAPI = "";
}
private void SetProtocolDefaults()
@@ -312,6 +314,8 @@ namespace mRemoteNG.Connection
LoadBalanceInfo = Settings.Default.ConDefaultLoadBalanceInfo;
RenderingEngine = (HTTPBase.RenderingEngine)Enum.Parse(typeof(HTTPBase.RenderingEngine), Settings.Default.ConDefaultRenderingEngine);
UseCredSsp = Settings.Default.ConDefaultUseCredSsp;
UseRestrictedAdmin = Settings.Default.ConDefaultUseRestrictedAdmin;
UseRCG = Settings.Default.ConDefaultUseRCG;
UseVmId = Settings.Default.ConDefaultUseVmId;
UseEnhancedMode = Settings.Default.ConDefaultUseEnhancedMode;
}
@@ -330,6 +334,8 @@ namespace mRemoteNG.Connection
RDGatewayUsername = Settings.Default.ConDefaultRDGatewayUsername;
RDGatewayPassword = Settings.Default.ConDefaultRDGatewayPassword;
RDGatewayDomain = Settings.Default.ConDefaultRDGatewayDomain;
RDGatewayExternalCredentialProvider = (ExternalCredentialProvider)Enum.Parse(typeof(ExternalCredentialProvider), Settings.Default.ConDefaultRDGatewayExternalCredentialProvider);
RDGatewayUserViaAPI = Settings.Default.ConDefaultRDGatewayUserViaAPI;
}
private void SetAppearanceDefaults()
@@ -369,7 +375,7 @@ namespace mRemoteNG.Connection
UserField = Settings.Default.ConDefaultUserField;
Favorite = Settings.Default.ConDefaultFavorite;
RDPStartProgram = Settings.Default.ConDefaultRDPStartProgram;
RDPStartProgramWorkDir = Settings.Default.ConDefaultRDPStartProgram;
RDPStartProgramWorkDir = Settings.Default.ConDefaultRDPStartProgramWorkDir;
OpeningCommand = Settings.Default.OpeningCommand;
}

View File

@@ -51,6 +51,14 @@ namespace mRemoteNG.Connection
#endregion
#region Connection
[LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 3),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.ExternalCredentialProvider)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionExternalCredentialProvider)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
[Browsable(true)]
public bool ExternalCredentialProvider { get; set; }
[LocalizedAttributes.LocalizedCategory(nameof(Language.Connection), 3),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.UserViaAPI)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionUserViaAPI)),
@@ -184,6 +192,18 @@ namespace mRemoteNG.Connection
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool UseCredSsp { get; set; }
[LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 4),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.UseRestrictedAdmin)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionUseRestrictedAdmin)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool UseRestrictedAdmin { get; set; }
[LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 4),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.UseRCG)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionUseRCG)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool UseRCG { get; set; }
[LocalizedAttributes.LocalizedCategory(nameof(Language.Protocol), 4),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.UseVmId)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionUseVmId)),
@@ -200,42 +220,55 @@ namespace mRemoteNG.Connection
#region RD Gateway
[LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 5),
[LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 5),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.RdpGatewayUsageMethod)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRdpGatewayUsageMethod)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RDGatewayUsageMethod { get; set; }
[LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 5),
[LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 5),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.RdpGatewayHostname)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRDGatewayHostname)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RDGatewayHostname { get; set; }
[LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 5),
[LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 5),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.RdpGatewayUseConnectionCredentials)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRDGatewayUseConnectionCredentials)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RDGatewayUseConnectionCredentials { get; set; }
[LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 5),
[LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 5),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.RdpGatewayUsername)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRDGatewayUsername)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RDGatewayUsername { get; set; }
[LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 5),
[LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 5),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.RdpGatewayPassword)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRdpGatewayPassword)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RDGatewayPassword { get; set; }
[LocalizedAttributes.LocalizedCategory(nameof(Language.Gateway), 5),
[LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 5),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.RdpGatewayDomain)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionRDGatewayDomain)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RDGatewayDomain { get; set; }
[LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 5),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.ExternalCredentialProvider)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionExternalCredentialProvider)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RDGatewayExternalCredentialProvider { get; set; }
[LocalizedAttributes.LocalizedCategory(nameof(Language.RDPGateway), 5),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.UserViaAPI)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.PropertyDescriptionUserViaAPI)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RDGatewayUserViaAPI { get; set; }
#endregion
#region Appearance

View File

@@ -299,9 +299,7 @@ namespace mRemoteNG.Connection
private static string SetConnectionPanel(ConnectionInfo connectionInfo, ConnectionInfo.Force force)
{
if (connectionInfo.Panel != "" &&
!force.HasFlag(ConnectionInfo.Force.OverridePanel) &&
!Settings.Default.AlwaysShowPanelSelectionDlg)
if (connectionInfo.Panel != "" && !force.HasFlag(ConnectionInfo.Force.OverridePanel) && !Properties.OptionsTabsPanelsPage.Default.AlwaysShowPanelSelectionDlg)
return connectionInfo.Panel;
var frmPnl = new FrmChoosePanel();

View File

@@ -80,31 +80,36 @@ namespace mRemoteNG.Connection
{
var x = connectionString.Split('@');
uriBuilder.UserName = x[0];
uriBuilder.Host = x[1];
connectionString = x[1];
}
if (uriBuilder.Host.Contains(":"))
if (connectionString.Contains(":"))
{
var x = uriBuilder.Host.Split(':');
uriBuilder.Host = x[0];
var x = connectionString.Split(':');
connectionString = x[0];
uriBuilder.Port = Convert.ToInt32(x[1]);
}
else
uriBuilder.Host = connectionString;
uriBuilder.Host = connectionString;
var newConnectionInfo = new ConnectionInfo();
newConnectionInfo.CopyFrom(DefaultConnectionInfo.Instance);
newConnectionInfo.Name = Settings.Default.IdentifyQuickConnectTabs
newConnectionInfo.Name = Properties.OptionsTabsPanelsPage.Default.IdentifyQuickConnectTabs
? string.Format(Language.Quick, uriBuilder.Host)
: uriBuilder.Host;
newConnectionInfo.Protocol = protocol;
newConnectionInfo.Hostname = uriBuilder.Host;
newConnectionInfo.Username = uriBuilder.UserName;
if (uriBuilder.Port == -1)
{
newConnectionInfo.SetDefaultPort();
}
else
{
newConnectionInfo.Port = uriBuilder.Port;
}
if (string.IsNullOrEmpty(newConnectionInfo.Panel))
newConnectionInfo.Panel = Language.General;
@@ -133,8 +138,7 @@ namespace mRemoteNG.Connection
var oldIsUsingDatabaseValue = UsingDatabase;
var connectionLoader = useDatabase
? (IConnectionsLoader)new SqlConnectionsLoader(_localConnectionPropertiesSerializer,
_localConnectionPropertiesDataProvider)
? (IConnectionsLoader)new SqlConnectionsLoader(_localConnectionPropertiesSerializer, _localConnectionPropertiesDataProvider)
: new XmlConnectionsLoader(connectionFileName);
var newConnectionTreeModel = connectionLoader.Load();
@@ -144,8 +148,7 @@ namespace mRemoteNG.Connection
if (newConnectionTreeModel == null)
{
DialogFactory.ShowLoadConnectionsFailedDialog(connectionFileName, "Decrypting connection file failed",
IsConnectionsFileLoaded);
DialogFactory.ShowLoadConnectionsFailedDialog(connectionFileName, "Decrypting connection file failed", IsConnectionsFileLoaded);
return;
}
@@ -161,10 +164,8 @@ namespace mRemoteNG.Connection
ConnectionTreeModel = newConnectionTreeModel;
UpdateCustomConsPathSetting(connectionFileName);
RaiseConnectionsLoadedEvent(oldConnectionTreeModel, newConnectionTreeModel, oldIsUsingDatabaseValue,
useDatabase, connectionFileName);
Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg,
$"Connections loaded using {connectionLoader.GetType().Name}");
RaiseConnectionsLoadedEvent(oldConnectionTreeModel, newConnectionTreeModel, oldIsUsingDatabaseValue, useDatabase, connectionFileName);
Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, $"Connections loaded using {connectionLoader.GetType().Name}");
}
/// <summary>
@@ -228,12 +229,7 @@ namespace mRemoteNG.Connection
/// Optional. The name of the property that triggered
/// this save.
/// </param>
public void SaveConnections(ConnectionTreeModel connectionTreeModel,
bool useDatabase,
SaveFilter saveFilter,
string connectionFileName,
bool forceSave = false,
string propertyNameTrigger = "")
public void SaveConnections(ConnectionTreeModel connectionTreeModel, bool useDatabase, SaveFilter saveFilter, string connectionFileName, bool forceSave = false, string propertyNameTrigger = "")
{
if (connectionTreeModel == null)
return;
@@ -255,9 +251,7 @@ namespace mRemoteNG.Connection
var previouslyUsingDatabase = UsingDatabase;
var saver = useDatabase
? (ISaver<ConnectionTreeModel>)new SqlConnectionsSaver(saveFilter,
_localConnectionPropertiesSerializer,
_localConnectionPropertiesDataProvider)
? (ISaver<ConnectionTreeModel>)new SqlConnectionsSaver(saveFilter, _localConnectionPropertiesSerializer, _localConnectionPropertiesDataProvider)
: new XmlConnectionsSaver(connectionFileName, saveFilter);
saver.Save(connectionTreeModel, propertyNameTrigger);
@@ -273,9 +267,7 @@ namespace mRemoteNG.Connection
}
catch (Exception ex)
{
Runtime.MessageCollector?.AddExceptionMessage(
string.Format(Language.ConnectionsFileCouldNotSaveAs,
connectionFileName), ex, logOnly: false);
Runtime.MessageCollector?.AddExceptionMessage(string.Format(Language.ConnectionsFileCouldNotSaveAs, connectionFileName), ex, logOnly: false);
}
finally
{
@@ -302,12 +294,7 @@ namespace mRemoteNG.Connection
{
lock (SaveLock)
{
SaveConnections(
ConnectionTreeModel,
UsingDatabase,
new SaveFilter(),
ConnectionFileName,
propertyNameTrigger: propertyNameTrigger);
SaveConnections(ConnectionTreeModel, UsingDatabase, new SaveFilter(), ConnectionFileName, propertyNameTrigger: propertyNameTrigger);
}
});
t.SetApartmentState(ApartmentState.STA);
@@ -316,37 +303,45 @@ namespace mRemoteNG.Connection
public string GetStartupConnectionFileName()
{
return Settings.Default.LoadConsFromCustomLocation == false
? GetDefaultStartupConnectionFileName()
: Settings.Default.CustomConsPath;
/*
if (Properties.OptionsBackupPage.Default.LoadConsFromCustomLocation == true && Properties.OptionsBackupPage.Default.BackupLocation != "")
{
return Properties.OptionsBackupPage.Default.BackupLocation;
} else {
return GetDefaultStartupConnectionFileName();
}
*/
if (Properties.OptionsConnectionsPage.Default.ConnectrionFilePath != "")
{
return Properties.OptionsConnectionsPage.Default.ConnectrionFilePath;
}
else
{
return GetDefaultStartupConnectionFileName();
}
}
public string GetDefaultStartupConnectionFileName()
{
return Runtime.IsPortableEdition
? GetDefaultStartupConnectionFileNamePortableEdition()
: GetDefaultStartupConnectionFileNameNormalEdition();
return Runtime.IsPortableEdition ? GetDefaultStartupConnectionFileNamePortableEdition() : GetDefaultStartupConnectionFileNameNormalEdition();
}
private void UpdateCustomConsPathSetting(string filename)
{
if (filename == GetDefaultStartupConnectionFileName())
{
Settings.Default.LoadConsFromCustomLocation = false;
Properties.OptionsBackupPage.Default.LoadConsFromCustomLocation = false;
}
else
{
Settings.Default.LoadConsFromCustomLocation = true;
Settings.Default.CustomConsPath = filename;
Properties.OptionsBackupPage.Default.LoadConsFromCustomLocation = true;
Properties.OptionsBackupPage.Default.BackupLocation = filename;
}
}
private string GetDefaultStartupConnectionFileNameNormalEdition()
{
var appDataPath = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
Application.ProductName,
ConnectionsFileInfo.DefaultConnectionsFile);
var appDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), Application.ProductName, ConnectionsFileInfo.DefaultConnectionsFile);
return File.Exists(appDataPath) ? appDataPath : GetDefaultStartupConnectionFileNamePortableEdition();
}
@@ -360,29 +355,14 @@ namespace mRemoteNG.Connection
public event EventHandler<ConnectionsLoadedEventArgs> ConnectionsLoaded;
public event EventHandler<ConnectionsSavedEventArgs> ConnectionsSaved;
private void RaiseConnectionsLoadedEvent(Optional<ConnectionTreeModel> previousTreeModel,
ConnectionTreeModel newTreeModel,
bool previousSourceWasDatabase,
bool newSourceIsDatabase,
string newSourcePath)
private void RaiseConnectionsLoadedEvent(Optional<ConnectionTreeModel> previousTreeModel, ConnectionTreeModel newTreeModel, bool previousSourceWasDatabase, bool newSourceIsDatabase, string newSourcePath)
{
ConnectionsLoaded?.Invoke(this, new ConnectionsLoadedEventArgs(
previousTreeModel,
newTreeModel,
previousSourceWasDatabase,
newSourceIsDatabase,
newSourcePath));
ConnectionsLoaded?.Invoke(this, new ConnectionsLoadedEventArgs(previousTreeModel, newTreeModel, previousSourceWasDatabase, newSourceIsDatabase, newSourcePath));
}
private void RaiseConnectionsSavedEvent(ConnectionTreeModel modelThatWasSaved,
bool previouslyUsingDatabase,
bool usingDatabase,
string connectionFileName)
private void RaiseConnectionsSavedEvent(ConnectionTreeModel modelThatWasSaved, bool previouslyUsingDatabase, bool usingDatabase, string connectionFileName)
{
ConnectionsSaved?.Invoke(this,
new ConnectionsSavedEventArgs(modelThatWasSaved, previouslyUsingDatabase,
usingDatabase,
connectionFileName));
ConnectionsSaved?.Invoke(this, new ConnectionsSavedEventArgs(modelThatWasSaved, previouslyUsingDatabase, usingDatabase, connectionFileName));
}
#endregion

View File

@@ -28,9 +28,7 @@ namespace mRemoteNG.Connection
var propertyFromSettings = typeof(TSource).GetProperty(propertyNameMutator(property.Name));
if (propertyFromSettings == null)
{
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg,
$"DefaultConInherit-LoadFrom: Could not load {property.Name}",
true);
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, $"DefaultConInherit-LoadFrom: Could not load {property.Name}", true);
continue;
}
@@ -50,9 +48,7 @@ namespace mRemoteNG.Connection
var localValue = property.GetValue(Instance, null);
if (propertyFromSettings == null)
{
Runtime.MessageCollector?.AddMessage(Messages.MessageClass.ErrorMsg,
$"DefaultConInherit-SaveTo: Could not load {property.Name}",
true);
Runtime.MessageCollector?.AddMessage(Messages.MessageClass.ErrorMsg, $"DefaultConInherit-SaveTo: Could not load {property.Name}", true);
continue;
}

View File

@@ -0,0 +1,14 @@
using mRemoteNG.Resources.Language;
using mRemoteNG.Tools;
namespace mRemoteNG.Connection
{
public enum ExternalAddressProvider
{
[LocalizedAttributes.LocalizedDescription(nameof(Language.EAPNone))]
None = 0,
[LocalizedAttributes.LocalizedDescription(nameof(Language.EAPAmazonWebServices))]
AmazonWebServices = 1
}
}

View File

@@ -0,0 +1,14 @@
using mRemoteNG.Resources.Language;
using mRemoteNG.Tools;
namespace mRemoteNG.Connection
{
public enum ExternalCredentialProvider
{
[LocalizedAttributes.LocalizedDescription(nameof(Language.ECPNone))]
None = 0,
[LocalizedAttributes.LocalizedDescription(nameof(Language.ECPDelineaSecretServer))]
DelineaSecretServer = 1
}
}

View File

@@ -80,11 +80,11 @@ namespace mRemoteNG.Connection.Protocol
_process.Exited += ProcessExited;
_process.Start();
_process.WaitForInputIdle(Settings.Default.MaxPuttyWaitTime * 1000);
_process.WaitForInputIdle(Properties.OptionsAdvancedPage.Default.MaxPuttyWaitTime * 1000);
var startTicks = Environment.TickCount;
while (_handle.ToInt32() == 0 &
Environment.TickCount < startTicks + Settings.Default.MaxPuttyWaitTime * 1000)
Environment.TickCount < startTicks + Properties.OptionsAdvancedPage.Default.MaxPuttyWaitTime * 1000)
{
_process.Refresh();
if (_process.MainWindowTitle != "Default IME")

View File

@@ -60,7 +60,7 @@ namespace mRemoteNG.Connection.Protocol
public ConnectionInfo.Force Force { get; set; }
public readonly System.Timers.Timer tmrReconnect = new System.Timers.Timer(2000);
public readonly System.Timers.Timer tmrReconnect = new System.Timers.Timer(5000);
protected ReconnectGroup ReconnectGroup;
protected ProtocolBase(string name)

View File

@@ -23,7 +23,7 @@ namespace mRemoteNG.Connection.Protocol
{
case ProtocolType.RDP:
var rdp = _rdpProtocolFactory.Build(connectionInfo.RdpVersion);
rdp.LoadBalanceInfoUseUtf8 = Settings.Default.RdpLoadBalanceInfoUseUtf8;
rdp.LoadBalanceInfoUseUtf8 = Properties.OptionsAdvancedPage.Default.RdpLoadBalanceInfoUseUtf8;
return rdp;
case ProtocolType.VNC:
return new ProtocolVNC();

View File

@@ -11,6 +11,7 @@ using System.Threading;
using System.Windows.Forms;
using mRemoteNG.Properties;
using mRemoteNG.Resources.Language;
using System.IO;
// ReSharper disable ArrangeAccessorOwnerBody
@@ -56,6 +57,8 @@ namespace mRemoteNG.Connection.Protocol
public override bool Connect()
{
string optionalTemporaryPrivateKeyPath = ""; // path to ppk file instead of password. only temporary (extracted from credential vault).
try
{
_isPuttyNg = PuttyTypeDetector.GetPuttyType() == PuttyTypeDetector.PuttyType.PuttyNg;
@@ -79,51 +82,70 @@ namespace mRemoteNG.Connection.Protocol
if (PuttyProtocol == Putty_Protocol.ssh)
{
var username = "";
var password = "";
var username = InterfaceControl.Info?.Username ?? "";
var password = InterfaceControl.Info?.Password ?? "";
var domain = InterfaceControl.Info?.Domain ?? "";
var UserViaAPI = InterfaceControl.Info?.UserViaAPI ?? "";
string privatekey = "";
// access secret server api if necessary
if (!string.IsNullOrEmpty(InterfaceControl.Info?.UserViaAPI))
if (InterfaceControl.Info.ExternalCredentialProvider == ExternalCredentialProvider.DelineaSecretServer)
{
var domain = ""; // dummy
try
{
ExternalConnectors.TSS.SecretServerInterface.FetchSecretFromServer("SSAPI:" + InterfaceControl.Info?.UserViaAPI, out username, out password, out domain);
ExternalConnectors.DSS.SecretServerInterface.FetchSecretFromServer($"{UserViaAPI}", out username, out password, out domain, out privatekey);
if (!string.IsNullOrEmpty(privatekey))
{
optionalTemporaryPrivateKeyPath = Path.GetTempFileName();
File.WriteAllText(optionalTemporaryPrivateKeyPath, privatekey);
FileInfo fileInfo = new FileInfo(optionalTemporaryPrivateKeyPath);
fileInfo.Attributes = FileAttributes.Temporary;
}
}
catch (Exception ex)
{
Event_ErrorOccured(this, "Secret Server Interface Error: " + ex.Message, 0);
}
}
if (!string.IsNullOrEmpty(InterfaceControl.Info?.Username))
if (string.IsNullOrEmpty(username))
{
username = InterfaceControl.Info.Username;
}
else
{
// ReSharper disable once SwitchStatementMissingSomeCases
switch (Settings.Default.EmptyCredentials)
switch (Properties.OptionsCredentialsPage.Default.EmptyCredentials)
{
case "windows":
username = Environment.UserName;
break;
case "custom" when !string.IsNullOrEmpty(Properties.OptionsCredentialsPage.Default.DefaultUsername):
username = Properties.OptionsCredentialsPage.Default.DefaultUsername;
break;
case "custom":
username = Settings.Default.DefaultUsername;
if (Properties.OptionsCredentialsPage.Default.ExternalCredentialProviderDefault == ExternalCredentialProvider.DelineaSecretServer)
{
try
{
ExternalConnectors.DSS.SecretServerInterface.FetchSecretFromServer(
$"{Properties.OptionsCredentialsPage.Default.UserViaAPIDefault}", out username, out password, out domain, out privatekey);
}
catch (Exception ex)
{
Event_ErrorOccured(this, "Secret Server Interface Error: " + ex.Message, 0);
}
}
break;
}
}
if (!string.IsNullOrEmpty(InterfaceControl.Info?.Password))
if (string.IsNullOrEmpty(password) && !string.IsNullOrEmpty(optionalTemporaryPrivateKeyPath))
{
password = InterfaceControl.Info.Password;
}
else
{
if (Settings.Default.EmptyCredentials == "custom")
if (Properties.OptionsCredentialsPage.Default.EmptyCredentials == "custom")
{
var cryptographyProvider = new LegacyRijndaelCryptographyProvider();
password = cryptographyProvider.Decrypt(Settings.Default.DefaultPassword,
Runtime.EncryptionKey);
password = cryptographyProvider.Decrypt(Properties.OptionsCredentialsPage.Default.DefaultPassword, Runtime.EncryptionKey);
}
}
@@ -141,6 +163,13 @@ namespace mRemoteNG.Connection.Protocol
arguments.Add("-pw", password);
}
}
// use private key if specified
if (!string.IsNullOrEmpty(optionalTemporaryPrivateKeyPath))
{
arguments.Add("-i", optionalTemporaryPrivateKeyPath);
}
}
arguments.Add("-P", InterfaceControl.Info.Port.ToString());
@@ -163,16 +192,15 @@ namespace mRemoteNG.Connection.Protocol
PuttyProcess.Exited += ProcessExited;
PuttyProcess.Start();
PuttyProcess.WaitForInputIdle(Settings.Default.MaxPuttyWaitTime * 1000);
PuttyProcess.WaitForInputIdle(Properties.OptionsAdvancedPage.Default.MaxPuttyWaitTime * 1000);
var startTicks = Environment.TickCount;
while (PuttyHandle.ToInt32() == 0 &
Environment.TickCount < startTicks + Settings.Default.MaxPuttyWaitTime * 1000)
Environment.TickCount < startTicks + Properties.OptionsAdvancedPage.Default.MaxPuttyWaitTime * 1000)
{
if (_isPuttyNg)
{
PuttyHandle = NativeMethods.FindWindowEx(
InterfaceControl.Handle, new IntPtr(0), null, null);
PuttyHandle = NativeMethods.FindWindowEx(InterfaceControl.Handle, new IntPtr(0), null, null);
}
else
{
@@ -192,14 +220,9 @@ namespace mRemoteNG.Connection.Protocol
}
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, Language.PuttyStuff, true);
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg,
string.Format(Language.PuttyHandle, PuttyHandle), true);
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg,
string.Format(Language.PuttyTitle, PuttyProcess.MainWindowTitle),
true);
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg,
string.Format(Language.PanelHandle,
InterfaceControl.Parent.Handle), true);
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, string.Format(Language.PuttyHandle, PuttyHandle), true);
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, string.Format(Language.PuttyTitle, PuttyProcess.MainWindowTitle), true);
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, string.Format(Language.PanelHandle, InterfaceControl.Parent.Handle), true);
if (!string.IsNullOrEmpty(InterfaceControl.Info?.OpeningCommand))
{
@@ -214,11 +237,18 @@ namespace mRemoteNG.Connection.Protocol
}
catch (Exception ex)
{
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg,
Language.ConnectionFailed + Environment.NewLine +
ex.Message);
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, Language.ConnectionFailed + Environment.NewLine + ex.Message);
return false;
}
finally
{
// make sure to remove the private key file
if (!string.IsNullOrEmpty(optionalTemporaryPrivateKeyPath))
{
System.Threading.Thread.Sleep(500);
System.IO.File.Delete(optionalTemporaryPrivateKeyPath);
}
}
}
public override void Focus()
@@ -229,9 +259,7 @@ namespace mRemoteNG.Connection.Protocol
}
catch (Exception ex)
{
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg,
Language.PuttyFocusFailed + Environment.NewLine + ex.Message,
true);
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, Language.PuttyFocusFailed + Environment.NewLine + ex.Message, true);
}
}

View File

@@ -12,6 +12,9 @@ namespace mRemoteNG.Connection.Protocol.RDP
Yes = 1,
[LocalizedAttributes.LocalizedDescription(nameof(Language.UseSmartCard))]
SmartCard = 2
SmartCard = 2,
[LocalizedAttributes.LocalizedDescription(nameof(Language.UseExternalCredentialProvider))]
ExternalCredentialProvider = 3
}
}

View File

@@ -15,6 +15,8 @@ using mRemoteNG.UI.Forms;
using mRemoteNG.UI.Tabs;
using MSTSCLib;
using mRemoteNG.Resources.Language;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
using System.DirectoryServices.ActiveDirectory;
namespace mRemoteNG.Connection.Protocol.RDP
{
@@ -307,6 +309,16 @@ namespace mRemoteNG.Connection.Protocol.RDP
{
_rdpClient.AdvancedSettings7.EnableCredSspSupport = connectionInfo.UseCredSsp;
}
if(_rdpVersion >= Versions.RDC81)
{
if (connectionInfo.UseRestrictedAdmin)
SetExtendedProperty("RestrictedLogon", true);
else if (connectionInfo.UseRCG)
{
SetExtendedProperty("DisableCredentialsDelegation", true);
SetExtendedProperty("RedirectedAuthentication", true);
}
}
SetUseConsoleSession();
SetPort();
@@ -372,8 +384,7 @@ namespace mRemoteNG.Connection.Protocol.RDP
_rdpClient.TransportSettings.GatewayUsageMethod = (uint)connectionInfo.RDGatewayUsageMethod;
_rdpClient.TransportSettings.GatewayHostname = connectionInfo.RDGatewayHostname;
_rdpClient.TransportSettings.GatewayProfileUsageMethod = 1; // TSC_PROXY_PROFILE_MODE_EXPLICIT
if (connectionInfo.RDGatewayUseConnectionCredentials ==
RDGatewayUseConnectionCredentials.SmartCard)
if (connectionInfo.RDGatewayUseConnectionCredentials == RDGatewayUseConnectionCredentials.SmartCard)
{
_rdpClient.TransportSettings.GatewayCredsSource = 1; // TSC_PROXY_CREDS_MODE_SMARTCARD
}
@@ -386,17 +397,36 @@ namespace mRemoteNG.Connection.Protocol.RDP
_rdpClient.TransportSettings2.GatewayPassword = connectionInfo.Password;
_rdpClient.TransportSettings2.GatewayDomain = connectionInfo?.Domain;
}
else if (connectionInfo.RDGatewayUseConnectionCredentials ==
RDGatewayUseConnectionCredentials.SmartCard)
else if (connectionInfo.RDGatewayUseConnectionCredentials == RDGatewayUseConnectionCredentials.SmartCard)
{
_rdpClient.TransportSettings2.GatewayCredSharing = 0;
}
else
{
_rdpClient.TransportSettings2.GatewayUsername = connectionInfo.RDGatewayUsername;
_rdpClient.TransportSettings2.GatewayPassword = connectionInfo.RDGatewayPassword;
_rdpClient.TransportSettings2.GatewayDomain = connectionInfo.RDGatewayDomain;
_rdpClient.TransportSettings2.GatewayCredSharing = 0;
string gwu = connectionInfo.RDGatewayUsername;
string gwp = connectionInfo.RDGatewayPassword;
string gwd = connectionInfo.RDGatewayDomain;
string pkey = "";
// access secret server api if necessary
if (InterfaceControl.Info.RDGatewayExternalCredentialProvider == ExternalCredentialProvider.DelineaSecretServer)
{
try
{
string RDGUserViaAPI = InterfaceControl.Info.RDGatewayUserViaAPI;
ExternalConnectors.DSS.SecretServerInterface.FetchSecretFromServer($"{RDGUserViaAPI}", out gwu, out gwp, out gwd, out pkey);
}
catch (Exception ex)
{
Event_ErrorOccured(this, "Secret Server Interface Error: " + ex.Message, 0);
}
}
_rdpClient.TransportSettings2.GatewayUsername = gwu;
_rdpClient.TransportSettings2.GatewayPassword = gwp;
_rdpClient.TransportSettings2.GatewayDomain = gwd;
}
}
}
@@ -463,13 +493,15 @@ namespace mRemoteNG.Connection.Protocol.RDP
var userName = connectionInfo?.Username ?? "";
var password = connectionInfo?.Password ?? "";
var domain = connectionInfo?.Domain ?? "";
var UserViaAPI = connectionInfo?.UserViaAPI ?? "";
string pkey = "";
// access secret server api if necessary
if (!string.IsNullOrEmpty(connectionInfo?.UserViaAPI))
if (InterfaceControl.Info.ExternalCredentialProvider == ExternalCredentialProvider.DelineaSecretServer)
{
try
{
ExternalConnectors.TSS.SecretServerInterface.FetchSecretFromServer("SSAPI:" + connectionInfo?.UserViaAPI, out userName, out password, out domain);
ExternalConnectors.DSS.SecretServerInterface.FetchSecretFromServer($"{UserViaAPI}", out userName, out password, out domain, out pkey);
}
catch (Exception ex)
{
@@ -480,13 +512,26 @@ namespace mRemoteNG.Connection.Protocol.RDP
if (string.IsNullOrEmpty(userName))
{
if (Settings.Default.EmptyCredentials == "windows")
switch (Properties.OptionsCredentialsPage.Default.EmptyCredentials)
{
_rdpClient.UserName = Environment.UserName;
}
else if (Settings.Default.EmptyCredentials == "custom")
{
_rdpClient.UserName = Settings.Default.DefaultUsername;
case "windows":
_rdpClient.UserName = Environment.UserName;
break;
case "custom" when !string.IsNullOrEmpty(Properties.OptionsCredentialsPage.Default.DefaultUsername):
_rdpClient.UserName = Properties.OptionsCredentialsPage.Default.DefaultUsername;
break;
case "custom":
try
{
ExternalConnectors.DSS.SecretServerInterface.FetchSecretFromServer(Properties.OptionsCredentialsPage.Default.UserViaAPIDefault, out userName, out password, out domain, out pkey);
_rdpClient.UserName = userName;
}
catch (Exception ex)
{
Event_ErrorOccured(this, "Secret Server Interface Error: " + ex.Message, 0);
}
break;
}
}
else
@@ -496,13 +541,12 @@ namespace mRemoteNG.Connection.Protocol.RDP
if (string.IsNullOrEmpty(password))
{
if (Settings.Default.EmptyCredentials == "custom")
if (Properties.OptionsCredentialsPage.Default.EmptyCredentials == "custom")
{
if (Settings.Default.DefaultPassword != "")
if (Properties.OptionsCredentialsPage.Default.DefaultPassword != "")
{
var cryptographyProvider = new LegacyRijndaelCryptographyProvider();
_rdpClient.AdvancedSettings2.ClearTextPassword =
cryptographyProvider.Decrypt(Settings.Default.DefaultPassword, Runtime.EncryptionKey);
_rdpClient.AdvancedSettings2.ClearTextPassword = cryptographyProvider.Decrypt(Properties.OptionsCredentialsPage.Default.DefaultPassword, Runtime.EncryptionKey);
}
}
}
@@ -513,14 +557,12 @@ namespace mRemoteNG.Connection.Protocol.RDP
if (string.IsNullOrEmpty(domain))
{
if (Settings.Default.EmptyCredentials == "windows")
_rdpClient.Domain = Properties.OptionsCredentialsPage.Default.EmptyCredentials switch
{
_rdpClient.Domain = Environment.UserDomainName;
}
else if (Settings.Default.EmptyCredentials == "custom")
{
_rdpClient.Domain = Settings.Default.DefaultDomain;
}
"windows" => Environment.UserDomainName,
"custom" => Properties.OptionsCredentialsPage.Default.DefaultDomain,
_ => _rdpClient.Domain
};
}
else
{
@@ -728,7 +770,7 @@ namespace mRemoteNG.Connection.Protocol.RDP
Event_Disconnected(this, reason, discReason);
}
if (Settings.Default.ReconnectOnDisconnect)
if (Properties.OptionsAdvancedPage.Default.ReconnectOnDisconnect)
{
ReconnectGroup = new ReconnectGroup();
ReconnectGroup.CloseClicked += Event_ReconnectGroupCloseClicked;

View File

@@ -29,7 +29,7 @@ namespace mRemoteNG.Connection.Protocol.RDP
protected set
{
base.SmartSize = value;
ReconnectForResize();
DoResizeClient();
}
}
@@ -39,7 +39,7 @@ namespace mRemoteNG.Connection.Protocol.RDP
protected set
{
base.Fullscreen = value;
ReconnectForResize();
DoResizeClient();
}
}
@@ -50,19 +50,19 @@ namespace mRemoteNG.Connection.Protocol.RDP
public override void Resize(object sender, EventArgs e)
{
if (DoResize() && _controlBeginningSize.IsEmpty)
if (DoResizeControl() && _controlBeginningSize.IsEmpty)
{
ReconnectForResize();
DoResizeClient();
}
base.Resize(sender, e);
}
public override void ResizeEnd(object sender, EventArgs e)
{
DoResize();
DoResizeControl();
if (!(Control.Size == _controlBeginningSize))
{
ReconnectForResize();
DoResizeClient();
}
_controlBeginningSize = Size.Empty;
}
@@ -72,7 +72,7 @@ namespace mRemoteNG.Connection.Protocol.RDP
return new AxMsRdpClient8NotSafeForScripting();
}
private void ReconnectForResize()
private void DoResizeClient()
{
if (!loginComplete)
return;
@@ -94,8 +94,8 @@ namespace mRemoteNG.Connection.Protocol.RDP
{
var size = Fullscreen
? Screen.FromControl(Control).Bounds.Size
: Control.Size;
RdpClient8.Reconnect((uint)size.Width, (uint)size.Height);
: Control.Size;
UpdateSessionDisplaySettings((uint)size.Width, (uint)size.Height);
}
catch (Exception ex)
{
@@ -106,7 +106,7 @@ namespace mRemoteNG.Connection.Protocol.RDP
}
}
private bool DoResize()
private bool DoResizeControl()
{
Control.Location = InterfaceControl.Location;
// kmscode - this doesn't look right to me. But I'm not aware of any functionality issues with this currently...
@@ -120,5 +120,10 @@ namespace mRemoteNG.Connection.Protocol.RDP
return false;
}
}
protected virtual void UpdateSessionDisplaySettings(uint width, uint height)
{
RdpClient8.Reconnect(width, height);
}
}
}

View File

@@ -1,15 +1,26 @@
using System.Windows.Forms;
using AxMSTSCLib;
namespace mRemoteNG.Connection.Protocol.RDP
{
public class RdpProtocol9 : RdpProtocol8
{
protected override RdpVersion RdpProtocolVersion => RdpVersion.Rdc9;
protected override AxHost CreateActiveXRdpClientControl()
{
return new AxMsRdpClient9NotSafeForScripting();
}
}
}
using System;
using System.Windows.Forms;
using AxMSTSCLib;
using MSTSCLib;
namespace mRemoteNG.Connection.Protocol.RDP
{
public class RdpProtocol9 : RdpProtocol8
{
private MsRdpClient9NotSafeForScripting RdpClient9 =>
(MsRdpClient9NotSafeForScripting)((AxHost)Control).GetOcx();
protected override RdpVersion RdpProtocolVersion => RdpVersion.Rdc9;
protected override AxHost CreateActiveXRdpClientControl()
{
return new AxMsRdpClient9NotSafeForScripting();
}
protected override void UpdateSessionDisplaySettings(uint width, uint height)
{
RdpClient9.UpdateSessionDisplaySettings(width, height, width, height, 0, 1, 1);
}
}
}

View File

@@ -1,4 +1,5 @@
using mRemoteNG.Connection.Protocol;
using mRemoteNG.App;
using mRemoteNG.Connection.Protocol;
using mRemoteNG.Resources.Language;
namespace mRemoteNG.Connection
@@ -17,8 +18,7 @@ namespace mRemoteNG.Connection
if (string.IsNullOrEmpty(connectionInfo.Panel))
connectionInfo.Panel = Language.General;
connectionInfo.IsQuickConnect = true;
var connectionInitiator = new ConnectionInitiator();
connectionInitiator.OpenConnection(connectionInfo, ConnectionInfo.Force.DoNotJump);
Runtime.ConnectionInitiator.OpenConnection(connectionInfo, ConnectionInfo.Force.DoNotJump);
}
}
}

View File

@@ -222,6 +222,33 @@ namespace mRemoteNG.Resources.Language {
}
}
/// <summary>
/// Looks up a localized string similar to Hidden.
/// </summary>
internal static string ACLPermissionsHidden {
get {
return ResourceManager.GetString("ACLPermissionsHidden", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to ReadOnly.
/// </summary>
internal static string ACLPermissionsReadOnly {
get {
return ResourceManager.GetString("ACLPermissionsReadOnly", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to WriteAllow.
/// </summary>
internal static string ACLPermissionsWriteAllow {
get {
return ResourceManager.GetString("ACLPermissionsWriteAllow", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Active Directory.
/// </summary>
@@ -376,7 +403,7 @@ namespace mRemoteNG.Resources.Language {
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Apply default inheritance ähnelt.
/// Looks up a localized string similar to Apply default inheritance.
/// </summary>
internal static string ApplyDefaultInheritance {
get {
@@ -385,7 +412,7 @@ namespace mRemoteNG.Resources.Language {
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Apply inheritance to children ähnelt.
/// Looks up a localized string similar to Apply inheritance to children.
/// </summary>
internal static string ApplyInheritanceToChildren {
get {
@@ -394,7 +421,7 @@ namespace mRemoteNG.Resources.Language {
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Arguments ähnelt.
/// Looks up a localized string similar to Arguments.
/// </summary>
internal static string Arguments {
get {
@@ -528,6 +555,15 @@ namespace mRemoteNG.Resources.Language {
}
}
/// <summary>
/// Looks up a localized string similar to Browse.
/// </summary>
internal static string btnBrowsePath {
get {
return ResourceManager.GetString("btnBrowsePath", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Default Inheritance.
/// </summary>
@@ -790,7 +826,7 @@ namespace mRemoteNG.Resources.Language {
}
/// <summary>
/// Looks up a localized string similar to Colours.
/// Looks up a localized string similar to Colors.
/// </summary>
internal static string Colors {
get {
@@ -1626,50 +1662,7 @@ namespace mRemoteNG.Resources.Language {
return ResourceManager.GetString("Domain", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to EC2InstanceId.
/// </summary>
internal static string EC2InstanceId
{
get
{
return ResourceManager.GetString("EC2InstanceId", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to PropertyDescriptionEC2InstanceId.
/// </summary>
internal static string PropertyDescriptionEC2InstanceId
{
get
{
return ResourceManager.GetString("PropertyDescriptionEC2InstanceId", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to EC2InstanceId.
/// </summary>
internal static string EC2Region
{
get
{
return ResourceManager.GetString("EC2Region", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to PropertyDescriptionEC2InstanceId.
/// </summary>
internal static string PropertyDescriptionEC2Region
{
get
{
return ResourceManager.GetString("PropertyDescriptionEC2Region", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Donate.
/// </summary>
@@ -1769,6 +1762,60 @@ namespace mRemoteNG.Resources.Language {
}
}
/// <summary>
/// Looks up a localized string similar to AmazonEC2.
/// </summary>
internal static string EAPAmazonWebServices {
get {
return ResourceManager.GetString("EAPAmazonWebServices", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to None.
/// </summary>
internal static string EAPNone {
get {
return ResourceManager.GetString("EAPNone", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to EC2 Instance Id.
/// </summary>
internal static string EC2InstanceId {
get {
return ResourceManager.GetString("EC2InstanceId", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to EC2 Region.
/// </summary>
internal static string EC2Region {
get {
return ResourceManager.GetString("EC2Region", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Delinea Secret Server.
/// </summary>
internal static string ECPDelineaSecretServer {
get {
return ResourceManager.GetString("ECPDelineaSecretServer", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to None.
/// </summary>
internal static string ECPNone {
get {
return ResourceManager.GetString("ECPNone", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Do you want to continue with no password?.
/// </summary>
@@ -2079,6 +2126,24 @@ namespace mRemoteNG.Resources.Language {
}
}
/// <summary>
/// Looks up a localized string similar to External Address Provider.
/// </summary>
internal static string ExternalAddressProvider {
get {
return ResourceManager.GetString("ExternalAddressProvider", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to External Credential Provider.
/// </summary>
internal static string ExternalCredentialProvider {
get {
return ResourceManager.GetString("ExternalCredentialProvider", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to External Tool.
/// </summary>
@@ -2160,6 +2225,24 @@ namespace mRemoteNG.Resources.Language {
}
}
/// <summary>
/// Looks up a localized string similar to File menu.
/// </summary>
internal static string FileMenu {
get {
return ResourceManager.GetString("FileMenu", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to File menu is hidded now. Press Alt button to peek.
/// </summary>
internal static string FileMenuWillBeHiddenNow {
get {
return ResourceManager.GetString("FileMenuWillBeHiddenNow", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Filename.
/// </summary>
@@ -2214,6 +2297,15 @@ namespace mRemoteNG.Resources.Language {
}
}
/// <summary>
/// Looks up a localized string similar to Remote Desktop Manager Files (*.csv).
/// </summary>
internal static string FiltermRemoteRemoteDesktopManagerCSV {
get {
return ResourceManager.GetString("FiltermRemoteRemoteDesktopManagerCSV", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to mRemote XML Files (*.xml).
/// </summary>
@@ -2331,15 +2423,6 @@ namespace mRemoteNG.Resources.Language {
}
}
/// <summary>
/// Looks up a localized string similar to Gateway.
/// </summary>
internal static string Gateway {
get {
return ResourceManager.GetString("Gateway", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to General.
/// </summary>
@@ -2691,6 +2774,69 @@ namespace mRemoteNG.Resources.Language {
}
}
/// <summary>
/// Looks up a localized string similar to ACL for user.
/// </summary>
internal static string lblACL {
get {
return ResourceManager.GetString("lblACL", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Backups for connection data.
/// </summary>
internal static string lblBackupEnable {
get {
return ResourceManager.GetString("lblBackupEnable", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Backup file name format.
/// </summary>
internal static string lblBackupNameFormat {
get {
return ResourceManager.GetString("lblBackupNameFormat", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Backup type.
/// </summary>
internal static string lblBackupType {
get {
return ResourceManager.GetString("lblBackupType", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Connection Backup Frequency.
/// </summary>
internal static string lblConnectionsBackupFrequency {
get {
return ResourceManager.GetString("lblConnectionsBackupFrequency", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Maximum number of backups.
/// </summary>
internal static string lblConnectionsBackupMaxCount {
get {
return ResourceManager.GetString("lblConnectionsBackupMaxCount", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Select location for connection data backup folder.
/// </summary>
internal static string lblConnectionsBackupPath {
get {
return ResourceManager.GetString("lblConnectionsBackupPath", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to License.
/// </summary>
@@ -3188,7 +3334,7 @@ namespace mRemoteNG.Resources.Language {
}
/// <summary>
/// Looks up a localized string similar to Opening Command.
/// Looks up a localized string similar to OpeningCommand TODO.
/// </summary>
internal static string OpeningCommand {
get {
@@ -3295,6 +3441,15 @@ namespace mRemoteNG.Resources.Language {
}
}
/// <summary>
/// Looks up a localized string similar to Page control in Options menu.
/// </summary>
internal static string PageСontrolInOptionsMenu {
get {
return ResourceManager.GetString("PageСontrolInOptionsMenu", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Panel.
/// </summary>
@@ -3557,7 +3712,7 @@ namespace mRemoteNG.Resources.Language {
}
/// <summary>
/// Looks up a localized string similar to Select the colour quality to be used..
/// Looks up a localized string similar to Select the color quality to be used..
/// </summary>
internal static string PropertyDescriptionColors {
get {
@@ -3646,6 +3801,24 @@ namespace mRemoteNG.Resources.Language {
}
}
/// <summary>
/// Looks up a localized string similar to use this instance id to fetch public ip from aws ec2 instance.
/// </summary>
internal static string PropertyDescriptionEC2InstanceId {
get {
return ResourceManager.GetString("PropertyDescriptionEC2InstanceId", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to fetch aws instance info from this region.
/// </summary>
internal static string PropertyDescriptionEC2Region {
get {
return ResourceManager.GetString("PropertyDescriptionEC2Region", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Select whether to use desktop composition or not..
/// </summary>
@@ -3673,6 +3846,24 @@ namespace mRemoteNG.Resources.Language {
}
}
/// <summary>
/// Looks up a localized string similar to External provider to retrieve host address from.
/// </summary>
internal static string PropertyDescriptionExternalAddressProvider {
get {
return ResourceManager.GetString("PropertyDescriptionExternalAddressProvider", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to External credential provider / vault to retrieve credentials from.
/// </summary>
internal static string PropertyDescriptionExternalCredentialProvider {
get {
return ResourceManager.GetString("PropertyDescriptionExternalCredentialProvider", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Select the external tool to be started..
/// </summary>
@@ -3755,7 +3946,7 @@ namespace mRemoteNG.Resources.Language {
}
/// <summary>
/// Looks up a localized string similar to A command to run on the remote server after successfully connecting..
/// Looks up a localized string similar to Description of OpeningCommand TODO.
/// </summary>
internal static string PropertyDescriptionOpeningCommand {
get {
@@ -4077,18 +4268,25 @@ namespace mRemoteNG.Resources.Language {
return ResourceManager.GetString("PropertyDescriptionUser1", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Enter your username..
/// Looks up a localized string similar to Use Remote Credential Guard to tunnel authentication on target back to source through the RDP channel..
/// </summary>
internal static string PropertyDescriptionUserViaAPI
{
get
{
return ResourceManager.GetString("PropertyDescriptionUserViaAPI", resourceCulture);
internal static string PropertyDescriptionUseRCG {
get {
return ResourceManager.GetString("PropertyDescriptionUseRCG", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Use restricted admin mode on the target host (local system context)..
/// </summary>
internal static string PropertyDescriptionUseRestrictedAdmin {
get {
return ResourceManager.GetString("PropertyDescriptionUseRestrictedAdmin", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Enter your username..
/// </summary>
@@ -4098,6 +4296,15 @@ namespace mRemoteNG.Resources.Language {
}
}
/// <summary>
/// Looks up a localized string similar to Enter the ID of user data in external API (e.g. secret server). when used, leave username/password/domain fields empty.
/// </summary>
internal static string PropertyDescriptionUserViaAPI {
get {
return ResourceManager.GetString("PropertyDescriptionUserViaAPI", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Use VM ID to connect to VM running on Hyper-V..
/// </summary>
@@ -4487,7 +4694,7 @@ namespace mRemoteNG.Resources.Language {
}
/// <summary>
/// Looks up a localized string similar to 16777216 Colours (24-bit).
/// Looks up a localized string similar to 16777216 Colors (24-bit).
/// </summary>
internal static string Rdp16777216Colors {
get {
@@ -4505,7 +4712,7 @@ namespace mRemoteNG.Resources.Language {
}
/// <summary>
/// Looks up a localized string similar to 32768 Colours (15-bit).
/// Looks up a localized string similar to 32768 Colors (15-bit).
/// </summary>
internal static string Rdp32768Colors {
get {
@@ -4514,7 +4721,7 @@ namespace mRemoteNG.Resources.Language {
}
/// <summary>
/// Looks up a localized string similar to 16777216 Colours (32-bit).
/// Looks up a localized string similar to 16777216 Colors (32-bit).
/// </summary>
internal static string Rdp4294967296Colors {
get {
@@ -4523,7 +4730,7 @@ namespace mRemoteNG.Resources.Language {
}
/// <summary>
/// Looks up a localized string similar to 65536 Colours (16-bit).
/// Looks up a localized string similar to 65536 Colors (16-bit).
/// </summary>
internal static string Rdp65536Colors {
get {
@@ -4649,7 +4856,16 @@ namespace mRemoteNG.Resources.Language {
}
/// <summary>
/// Looks up a localized string similar to Gateway Domain.
/// Looks up a localized string similar to RDP-Gateway.
/// </summary>
internal static string RDPGateway {
get {
return ResourceManager.GetString("RDPGateway", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to RDP-Gateway Domain.
/// </summary>
internal static string RdpGatewayDomain {
get {
@@ -4658,7 +4874,7 @@ namespace mRemoteNG.Resources.Language {
}
/// <summary>
/// Looks up a localized string similar to Gateway Hostname.
/// Looks up a localized string similar to RDP-Gateway Hostname.
/// </summary>
internal static string RdpGatewayHostname {
get {
@@ -4685,7 +4901,7 @@ namespace mRemoteNG.Resources.Language {
}
/// <summary>
/// Looks up a localized string similar to Remote Desktop Gateway Password.
/// Looks up a localized string similar to RDP-Gateway Password.
/// </summary>
internal static string RdpGatewayPassword {
get {
@@ -4694,7 +4910,7 @@ namespace mRemoteNG.Resources.Language {
}
/// <summary>
/// Looks up a localized string similar to Use Gateway.
/// Looks up a localized string similar to Use RDP Gateway.
/// </summary>
internal static string RdpGatewayUsageMethod {
get {
@@ -4703,7 +4919,7 @@ namespace mRemoteNG.Resources.Language {
}
/// <summary>
/// Looks up a localized string similar to Gateway Credentials.
/// Looks up a localized string similar to RDP-Gateway Credentials.
/// </summary>
internal static string RdpGatewayUseConnectionCredentials {
get {
@@ -4712,7 +4928,7 @@ namespace mRemoteNG.Resources.Language {
}
/// <summary>
/// Looks up a localized string similar to Gateway Username.
/// Looks up a localized string similar to RDP-Gateway Username.
/// </summary>
internal static string RdpGatewayUsername {
get {
@@ -4990,15 +5206,6 @@ namespace mRemoteNG.Resources.Language {
}
}
/// <summary>
/// Looks up a localized string similar to Refresh.
/// </summary>
internal static string Refresh {
get {
return ResourceManager.GetString("Refresh", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Refresh Screen (VNC).
/// </summary>
@@ -5316,6 +5523,15 @@ namespace mRemoteNG.Resources.Language {
}
}
/// <summary>
/// Looks up a localized string similar to Show for user.
/// </summary>
internal static string ShowForUser {
get {
return ResourceManager.GetString("ShowForUser", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Show full connections file path in window title.
/// </summary>
@@ -6109,6 +6325,15 @@ namespace mRemoteNG.Resources.Language {
}
}
/// <summary>
/// Looks up a localized string similar to Use External Credential Provider.
/// </summary>
internal static string UseExternalCredentialProvider {
get {
return ResourceManager.GetString("UseExternalCredentialProvider", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to User.
/// </summary>
@@ -6118,6 +6343,24 @@ namespace mRemoteNG.Resources.Language {
}
}
/// <summary>
/// Looks up a localized string similar to Use Remote Credential Guard.
/// </summary>
internal static string UseRCG {
get {
return ResourceManager.GetString("UseRCG", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Use Restricted Admin.
/// </summary>
internal static string UseRestrictedAdmin {
get {
return ResourceManager.GetString("UseRestrictedAdmin", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to User Field.
/// </summary>
@@ -6126,18 +6369,7 @@ namespace mRemoteNG.Resources.Language {
return ResourceManager.GetString("UserField", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Username.
/// </summary>
internal static string UserViaAPI
{
get
{
return ResourceManager.GetString("UserViaAPI", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Username.
/// </summary>
@@ -6147,6 +6379,15 @@ namespace mRemoteNG.Resources.Language {
}
}
/// <summary>
/// Looks up a localized string similar to API User ID.
/// </summary>
internal static string UserViaAPI {
get {
return ResourceManager.GetString("UserViaAPI", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Use the same username and password.
/// </summary>
@@ -6327,15 +6568,6 @@ namespace mRemoteNG.Resources.Language {
}
}
/// <summary>
/// Looks up a localized string similar to WebView2 creation failed with exception.
/// </summary>
internal static string WebView2InitializationFailed {
get {
return ResourceManager.GetString("WebView2InitializationFailed", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Weekly.
/// </summary>

View File

@@ -163,7 +163,7 @@
<value>Poměr stran</value>
</data>
<data name="AutoSaveEvery" xml:space="preserve">
<value>Automaticky ukládat každých:</value>
<value>Automatické uložení v minutách (0 znamená vypnuto):</value>
</data>
<data name="AvailableVersion" xml:space="preserve">
<value>Poslední verze</value>
@@ -265,7 +265,7 @@
<value>Pro spojení použít proxy server</value>
</data>
<data name="Username" xml:space="preserve">
<value>Login</value>
<value>Přihlašovací jméno</value>
</data>
<data name="WaitForExit" xml:space="preserve">
<value>Čekat na logout</value>
@@ -376,7 +376,7 @@
<value>Protokol událostí připojen</value>
</data>
<data name="ConnectionEventConnectedDetail" xml:space="preserve">
<value>Připojení k "{0}" přes "{1}" bylo provedeno uživatelem "{2}" (Popis: "{3}"; Login: "{4}")</value>
<value>Připojení k "{0}" přes "{1}" bylo provedeno uživatelem "{2}" (Popis: "{3}"; Přihlašovací jméno: "{4}")</value>
</data>
<data name="ConnectionFailed" xml:space="preserve">
<value>Připojení selhalo!</value>
@@ -410,7 +410,7 @@ Otevírám nový prázdný soubor seznamu spojení.</value>
<value>Nepovedlo se uložit soubor seznamu spojení "{0}"!</value>
</data>
<data name="ConnectNoCredentials" xml:space="preserve">
<value>Připojit bez loginu</value>
<value>Připojit bez přihlašovacích údajů</value>
</data>
<data name="ConnectToConsoleSession" xml:space="preserve">
<value>Připojit k otevřenému sezení konzole</value>
@@ -455,7 +455,7 @@ Otevírám nový prázdný soubor seznamu spojení.</value>
<value>Přejete si pokračovat bez hesla?</value>
</data>
<data name="EmptyUsernamePasswordDomainFields" xml:space="preserve">
<value>Pro prázdná políčka Login, Heslo nebo Doména použít:</value>
<value>Pro prázdná políčka Přihlašovací jméno, Heslo nebo Doména použít:</value>
</data>
<data name="EncryptCompleteConnectionFile" xml:space="preserve">
<value>Zakódovat celý soubor seznamu připojení</value>
@@ -593,7 +593,7 @@ Otevírám nový prázdný soubor seznamu spojení.</value>
<value>Spojení HTTP selhalo!</value>
</data>
<data name="HttpConnectionFailed" xml:space="preserve">
<value>Nezdařilo se vytvoření noebého spojení HTTP!</value>
<value>Nezdařilo se vytvoření nového spojení HTTP!</value>
</data>
<data name="HttpDocumentTileChangeFailed" xml:space="preserve">
<value>Změna nadpisu dokumentu HTTP selhala!</value>
@@ -740,7 +740,7 @@ Otevírám nový prázdný soubor seznamu spojení.</value>
<value>Klonovat záložku tabu</value>
</data>
<data name="Exit" xml:space="preserve">
<value>Exit</value>
<value>Ukončit</value>
</data>
<data name="ExternalToolsToolbar" xml:space="preserve">
<value>Nástrojová lišta externích nástrojů</value>
@@ -1002,7 +1002,7 @@ Pokud k takové chybě dojde, prosím vytvořte nový soubor se seznamem spojen
<value>Pokud se využívá v externím nástroji, zadejte sem MAC adresu vzdáleného hostitele.</value>
</data>
<data name="PropertyDescriptionName" xml:space="preserve">
<value>Toto jméno bude zobrazeno ve stromě seznamu spojení a jejich složek.</value>
<value>Toto jméno bude zobrazeno v seznamu spojení a jejich složek.</value>
</data>
<data name="PropertyDescriptionPanel" xml:space="preserve">
<value>Zadaný název určí panel, ve kterém se má spojení otevřít.</value>
@@ -1149,7 +1149,7 @@ Pokud k takové chybě dojde, prosím vytvořte nový soubor se seznamem spojen
<value>Adresa MAC</value>
</data>
<data name="Name" xml:space="preserve">
<value>Jméno</value>
<value>Název</value>
</data>
<data name="Panel" xml:space="preserve">
<value>Panel</value>
@@ -1179,7 +1179,7 @@ Pokud k takové chybě dojde, prosím vytvořte nový soubor se seznamem spojen
<value>Přihl. údaje brány</value>
</data>
<data name="RdpGatewayUsername" xml:space="preserve">
<value>Login brány</value>
<value>Přihlašovací jméno brány</value>
</data>
<data name="DiskDrives" xml:space="preserve">
<value>Připojit lok. disky</value>
@@ -1227,7 +1227,7 @@ Pokud k takové chybě dojde, prosím vytvořte nový soubor se seznamem spojen
<value>Typ proxy</value>
</data>
<data name="ProxyUsername" xml:space="preserve">
<value>Login k proxy</value>
<value>Přihlašovací jméno k proxy</value>
</data>
<data name="ProtocolEventDisconnected" xml:space="preserve">
<value>Událost prokolu Odpojeno.
@@ -1497,7 +1497,7 @@ Zpráva:
<value>V názvu okna zobrazovat úplnou cestu k souboru seznamu spojení</value>
</data>
<data name="ShowLogonInfoOnTabs" xml:space="preserve">
<value>Zobrazovat v názvu záložek (tabech) informace o loginu</value>
<value>Zobrazovat v názvu záložek (tabech) informace o uživateli</value>
</data>
<data name="ShowProtocolOnTabs" xml:space="preserve">
<value>Zobrazovat v názvu záložek (tabech) protokol (typ spojení)</value>
@@ -1648,7 +1648,7 @@ mRemoteNG se nyní ukončí a zahájí instalaci.</value>
<value>Použít čipovou kartu</value>
</data>
<data name="UseSQLServer" xml:space="preserve">
<value>Použít SQL Server ke stažení &amp;&amp; uloženho seznamu spojení</value>
<value>Použít SQL Server ke stažení &amp;&amp; uloženého seznamu spojení</value>
</data>
<data name="Version" xml:space="preserve">
<value>Verze</value>
@@ -1804,4 +1804,81 @@ mRemoteNG se nyní ukončí a zahájí instalaci.</value>
+
+ <data name="AssignedCredential" xml:space="preserve">
<value>Přiřazené přihlašovací informace</value>
</data></root>
</data>
<data name="StartMinimized" xml:space="preserve">
<value>Po spuštění minimalizovat</value>
</data><data name="CreateEmptyPanelOnStartUp" xml:space="preserve">
<value>Otevřít prázdný panel při startu aplikace</value>
</data>
<data name="IdentifyQuickConnectTabs" xml:space="preserve">
<value>Zavřít záložku dvojklikem na ní</value>
</data>
<data name="CloseToSysTray" xml:space="preserve">
<value>Zavřít do oznamovací oblasti</value>
</data>
<data name="OptionsThemeNewThemeCaption" xml:space="preserve">
<value>Nový název šablony</value>
</data>
<data name="OptionsThemeNewThemeText" xml:space="preserve">
<value>Zadejte nový název šablony</value>
</data>
<data name="OptionsThemeNewThemeError" xml:space="preserve">
<value>Nepodařilo se vytvořit šablonu, buď již existuje šablona se stejným názvem nebo vámi zadaný název obsahuje speciální znaky.</value>
</data>
<data name="SetHostnameLikeDisplayNameNewConnection" xml:space="preserve">
<value>Při vytváření nového připojení nastaví stejný název zobrazení jako je název počítače</value>
</data>
<data name="RdpReconnectionCount" xml:space="preserve">
<value>Počet opětovných připojení k RDP</value>
</data>
<data name="RdpConnectionTimeout" xml:space="preserve">
<value>Časová prodleva připojení k RDP</value>
</data>
<data name="WhenClosingConnections" xml:space="preserve">
<value>Když se ukončí připojení:</value>
</data>
<data name="WarnMeWhenClosingConnections" xml:space="preserve">
<value>Upozornit mě na ukončení připojení</value>
</data>
<data name="WarnMeOnlyWhenClosingMultipleConnections" xml:space="preserve">
<value>Upozornit mě pouze při ukončení několika připojení</value>
</data>
<data name="WarnMeOnlyWhenExitingProgram" xml:space="preserve">
<value>Upozornit mě pouze při ukončení programu</value>
</data>
<data name="DoNotWarnMeWhenClosingConnections" xml:space="preserve">
<value>Neupozorňovat na ukončení připojení</value>
</data>
<data name="SaveConnectionsAfterEveryEdit" xml:space="preserve">
<value>Uložit připojení při každé úpravě</value>
</data>
<data name="StartFullScreen" xml:space="preserve">
<value>Při spuštění zobrazit na celou obrazovku</value>
</data>
<data name="FilterSearchMatchesInConnectionTree" xml:space="preserve">
<value>Filtrovat shody vyhledávání v seznamu připojení</value>
</data>
<data name="ReconnectToPreviouslyOpenedSessionsOnStartup" xml:space="preserve">
<value>Obnovit dříve spuštěná připojení po startu</value>
</data>
<data name="SaveConnectionsOnExit" xml:space="preserve">
<value>Uložit připojení při ukončení programu</value>
</data>
<data name="PlaceSearchBarAboveConnectionTree" xml:space="preserve">
<value>Umístit vyhledávací pole nad seznam připojení</value>
</data>
<data name="TrackActiveConnectionInTheConnectionTree" xml:space="preserve">
<value>Označovat aktivní připojení v seznamu</value>
</data>
<data name="DoNotTrimUsername" xml:space="preserve">
<value>Nezkracovat uživatelské jméno</value>
</data>
<data name="AutoSaveInMinutes" xml:space="preserve">
<value>Kliknutím na již otevřené připojení v seznamu otevře jeho záložku</value>
</data>
<data name="LoadBalanceInfoUseUtf8" xml:space="preserve">
<value>Použít kódování UTF8 pro vlastnost RDP "Load Balance Info"</value>
</data>
<data name="TestConnection" xml:space="preserve">
<value>Test spojení</value>
</data></root>

View File

@@ -112,10 +112,10 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="About" xml:space="preserve">
<value>About</value>
@@ -231,8 +231,8 @@
<data name="Display" xml:space="preserve">
<value>Display</value>
</data>
<data name="Gateway" xml:space="preserve">
<value>Gateway</value>
<data name="RDPGateway" xml:space="preserve">
<value>RDP-Gateway</value>
</data>
<data name="Miscellaneous" xml:space="preserve">
<value>Miscellaneous</value>
@@ -247,7 +247,7 @@
<value>Check failed!</value>
</data>
<data name="CheckboxAutomaticReconnect" xml:space="preserve">
<value>Automatically try to reconnect when disconnected from server (RDP &amp;&amp; ICA only)</value>
<value>Display reconnection dialog when disconnected from server (RDP &amp;&amp; ICA only)</value>
</data>
<data name="CheckboxDoNotShowThisMessageAgain" xml:space="preserve">
<value>Do not show this message again.</value>
@@ -1086,6 +1086,12 @@ If you run into such an error, please create a new connection file!</value>
<data name="PropertyDescriptionUseCredSsp" xml:space="preserve">
<value>Use the Credential Security Support Provider (CredSSP) for authentication if it is available.</value>
</data>
<data name="PropertyDescriptionUseRestrictedAdmin" xml:space="preserve">
<value>Use restricted admin mode on the target host (local system context).</value>
</data>
<data name="PropertyDescriptionUseRCG" xml:space="preserve">
<value>Use Remote Credential Guard to tunnel authentication on target back to source through the RDP channel.</value>
</data>
<data name="PropertyDescriptionUser1" xml:space="preserve">
<value>Feel free to enter any information you need here.</value>
</data>
@@ -1186,22 +1192,22 @@ If you run into such an error, please create a new connection file!</value>
<value>PuTTY Session</value>
</data>
<data name="RdpGatewayDomain" xml:space="preserve">
<value>Gateway Domain</value>
<value>RDP-Gateway Domain</value>
</data>
<data name="RdpGatewayHostname" xml:space="preserve">
<value>Gateway Hostname</value>
<value>RDP-Gateway Hostname</value>
</data>
<data name="RdpGatewayPassword" xml:space="preserve">
<value>Remote Desktop Gateway Password</value>
<value>RDP-Gateway Password</value>
</data>
<data name="RdpGatewayUsageMethod" xml:space="preserve">
<value>Use Gateway</value>
<value>Use RDP Gateway</value>
</data>
<data name="RdpGatewayUseConnectionCredentials" xml:space="preserve">
<value>Gateway Credentials</value>
<value>RDP-Gateway Credentials</value>
</data>
<data name="RdpGatewayUsername" xml:space="preserve">
<value>Gateway Username</value>
<value>RDP-Gateway Username</value>
</data>
<data name="DiskDrives" xml:space="preserve">
<value>Disk Drives</value>
@@ -1239,6 +1245,12 @@ If you run into such an error, please create a new connection file!</value>
<data name="UseCredSsp" xml:space="preserve">
<value>Use CredSSP</value>
</data>
<data name="UseRestrictedAdmin" xml:space="preserve">
<value>Use Restricted Admin</value>
</data>
<data name="UseRCG" xml:space="preserve">
<value>Use Remote Credential Guard</value>
</data>
<data name="UserField" xml:space="preserve">
<value>User Field</value>
</data>
@@ -1355,7 +1367,7 @@ If you run into such an error, please create a new connection file!</value>
<value>Couldn't create RDP control, please check mRemoteNG requirements.</value>
</data>
<data name="DisableCursorBlinking" xml:space="preserve">
<value>Disable Cursor blinking</value>
<value>Disable Cursor Blinking</value>
</data>
<data name="DisableCursorShadow" xml:space="preserve">
<value>Disable Cursor Shadow</value>
@@ -2188,10 +2200,10 @@ Nightly Channel includes Alphas, Betas &amp; Release Candidates.</value>
<comment>https://docs.microsoft.com/en-us/windows/win32/termserv/imstscsecuredsettings-workdir</comment>
</data>
<data name="OpeningCommand" xml:space="preserve">
<value>TODO</value>
<value>OpeningCommand TODO</value>
</data>
<data name="PropertyDescriptionOpeningCommand" xml:space="preserve">
<value>TODO</value>
<value>Description of OpeningCommand TODO</value>
</data>
<data name="RedirectDrives" xml:space="preserve">
<value>Disk Drives</value>
@@ -2223,4 +2235,85 @@ Nightly Channel includes Alphas, Betas &amp; Release Candidates.</value>
<data name="PropertyDescriptionEC2Region" xml:space="preserve">
<value>fetch aws instance info from this region</value>
</data>
<data name="ACLPermissionsHidden" xml:space="preserve">
<value>Hidden</value>
<comment>Permission then option will be hide completly from user</comment>
</data>
<data name="ACLPermissionsReadOnly" xml:space="preserve">
<value>ReadOnly</value>
<comment>Permission then option is visible but user can't modify it</comment>
</data>
<data name="ACLPermissionsWriteAllow" xml:space="preserve">
<value>WriteAllow</value>
<comment>Permission then user could modify an option value</comment>
</data>
<data name="lblConnectionsBackupPath" xml:space="preserve">
<value>Select location for connection data backup folder</value>
</data>
<data name="btnBrowsePath" xml:space="preserve">
<value>Browse</value>
</data>
<data name="lblACL" xml:space="preserve">
<value>ACL for user</value>
</data>
<data name="lblBackupEnable" xml:space="preserve">
<value>Backups for connection data</value>
</data>
<data name="lblBackupNameFormat" xml:space="preserve">
<value>Backup file name format</value>
</data>
<data name="lblBackupType" xml:space="preserve">
<value>Backup type</value>
</data>
<data name="lblConnectionsBackupFrequency" xml:space="preserve">
<value>Connection Backup Frequency</value>
</data>
<data name="lblConnectionsBackupMaxCount" xml:space="preserve">
<value>Maximum number of backups</value>
</data>
<data name="PageСontrolInOptionsMenu" xml:space="preserve">
<value>Page control in Options menu</value>
</data>
<data name="ShowForUser" xml:space="preserve">
<value>Show for user</value>
</data>
<data name="FiltermRemoteRemoteDesktopManagerCSV" xml:space="preserve">
<value>Remote Desktop Manager Files (*.csv)</value>
</data>
<data name="FileMenu" xml:space="preserve">
<value>File menu</value>
</data>
<data name="FileMenuWillBeHiddenNow" xml:space="preserve">
<value>File menu is hidded now. Press Alt button to peek</value>
</data>
<data name="ECPDelineaSecretServer" xml:space="preserve">
<value>Delinea Secret Server</value>
</data>
<data name="ECPNone" xml:space="preserve">
<value>None</value>
</data>
<data name="EAPAmazonWebServices" xml:space="preserve">
<value>AmazonEC2</value>
</data>
<data name="EAPNone" xml:space="preserve">
<value>None</value>
</data>
<data name="ExternalCredentialProvider" xml:space="preserve">
<value>External Credential Provider</value>
</data>
<data name="PropertyDescriptionExternalCredentialProvider" xml:space="preserve">
<value>External credential provider / vault to retrieve credentials from</value>
</data>
<data name="PropertyDescriptionExternalAddressProvider" xml:space="preserve">
<value>External provider to retrieve host address from</value>
</data>
<data name="ExternalAddressProvider" xml:space="preserve">
<value>External Address Provider</value>
</data>
<data name="UseExternalCredentialProvider" xml:space="preserve">
<value>Use External Credential Provider</value>
</data>
<data name="CheckboxNoReconnect" xml:space="preserve">
<value>Automatically try to reconnect when disconnected from server (RDP &amp;&amp; ICA only)</value>
</data>
</root>

File diff suppressed because it is too large Load Diff

View File

@@ -6,26 +6,26 @@ namespace mRemoteNG.Messages.MessageFilteringOptions
{
public bool AllowDebugMessages
{
get => Settings.Default.TextLogMessageWriterWriteDebugMsgs;
set => Settings.Default.TextLogMessageWriterWriteDebugMsgs = value;
get => Properties.OptionsNotificationsPage.Default.TextLogMessageWriterWriteDebugMsgs;
set => Properties.OptionsNotificationsPage.Default.TextLogMessageWriterWriteDebugMsgs = value;
}
public bool AllowInfoMessages
{
get => Settings.Default.TextLogMessageWriterWriteInfoMsgs;
set => Settings.Default.TextLogMessageWriterWriteInfoMsgs = value;
get => Properties.OptionsNotificationsPage.Default.TextLogMessageWriterWriteInfoMsgs;
set => Properties.OptionsNotificationsPage.Default.TextLogMessageWriterWriteInfoMsgs = value;
}
public bool AllowWarningMessages
{
get => Settings.Default.TextLogMessageWriterWriteWarningMsgs;
set => Settings.Default.TextLogMessageWriterWriteWarningMsgs = value;
get => Properties.OptionsNotificationsPage.Default.TextLogMessageWriterWriteWarningMsgs;
set => Properties.OptionsNotificationsPage.Default.TextLogMessageWriterWriteWarningMsgs = value;
}
public bool AllowErrorMessages
{
get => Settings.Default.TextLogMessageWriterWriteErrorMsgs;
set => Settings.Default.TextLogMessageWriterWriteErrorMsgs = value;
get => Properties.OptionsNotificationsPage.Default.TextLogMessageWriterWriteErrorMsgs;
set => Properties.OptionsNotificationsPage.Default.TextLogMessageWriterWriteErrorMsgs = value;
}
}
}

View File

@@ -6,26 +6,26 @@ namespace mRemoteNG.Messages.MessageFilteringOptions
{
public bool AllowDebugMessages
{
get => Settings.Default.NotificationPanelWriterWriteDebugMsgs;
set => Settings.Default.NotificationPanelWriterWriteDebugMsgs = value;
get => Properties.OptionsNotificationsPage.Default.NotificationPanelWriterWriteDebugMsgs;
set => Properties.OptionsNotificationsPage.Default.NotificationPanelWriterWriteDebugMsgs = value;
}
public bool AllowInfoMessages
{
get => Settings.Default.NotificationPanelWriterWriteInfoMsgs;
set => Settings.Default.NotificationPanelWriterWriteInfoMsgs = value;
get => Properties.OptionsNotificationsPage.Default.NotificationPanelWriterWriteInfoMsgs;
set => Properties.OptionsNotificationsPage.Default.NotificationPanelWriterWriteInfoMsgs = value;
}
public bool AllowWarningMessages
{
get => Settings.Default.NotificationPanelWriterWriteWarningMsgs;
set => Settings.Default.NotificationPanelWriterWriteWarningMsgs = value;
get => Properties.OptionsNotificationsPage.Default.NotificationPanelWriterWriteWarningMsgs;
set => Properties.OptionsNotificationsPage.Default.NotificationPanelWriterWriteWarningMsgs = value;
}
public bool AllowErrorMessages
{
get => Settings.Default.NotificationPanelWriterWriteErrorMsgs;
set => Settings.Default.NotificationPanelWriterWriteErrorMsgs = value;
get => Properties.OptionsNotificationsPage.Default.NotificationPanelWriterWriteErrorMsgs;
set => Properties.OptionsNotificationsPage.Default.NotificationPanelWriterWriteErrorMsgs = value;
}
}
}

View File

@@ -12,20 +12,20 @@ namespace mRemoteNG.Messages.MessageFilteringOptions
public bool AllowInfoMessages
{
get => Settings.Default.SwitchToMCOnInformation;
set => Settings.Default.SwitchToMCOnInformation = value;
get => Properties.OptionsNotificationsPage.Default.SwitchToMCOnInformation;
set => Properties.OptionsNotificationsPage.Default.SwitchToMCOnInformation = value;
}
public bool AllowWarningMessages
{
get => Settings.Default.SwitchToMCOnWarning;
set => Settings.Default.SwitchToMCOnWarning = value;
get => Properties.OptionsNotificationsPage.Default.SwitchToMCOnWarning;
set => Properties.OptionsNotificationsPage.Default.SwitchToMCOnWarning = value;
}
public bool AllowErrorMessages
{
get => Settings.Default.SwitchToMCOnError;
set => Settings.Default.SwitchToMCOnError = value;
get => Properties.OptionsNotificationsPage.Default.SwitchToMCOnError;
set => Properties.OptionsNotificationsPage.Default.SwitchToMCOnError = value;
}
}
}

View File

@@ -6,26 +6,26 @@ namespace mRemoteNG.Messages.MessageFilteringOptions
{
public bool AllowDebugMessages
{
get => Settings.Default.PopupMessageWriterWriteDebugMsgs;
set => Settings.Default.PopupMessageWriterWriteDebugMsgs = value;
get => Properties.OptionsNotificationsPage.Default.PopupMessageWriterWriteDebugMsgs;
set => Properties.OptionsNotificationsPage.Default.PopupMessageWriterWriteDebugMsgs = value;
}
public bool AllowInfoMessages
{
get => Settings.Default.PopupMessageWriterWriteInfoMsgs;
set => Settings.Default.PopupMessageWriterWriteInfoMsgs = value;
get => Properties.OptionsNotificationsPage.Default.PopupMessageWriterWriteInfoMsgs;
set => Properties.OptionsNotificationsPage.Default.PopupMessageWriterWriteInfoMsgs = value;
}
public bool AllowWarningMessages
{
get => Settings.Default.PopupMessageWriterWriteWarningMsgs;
set => Settings.Default.PopupMessageWriterWriteWarningMsgs = value;
get => Properties.OptionsNotificationsPage.Default.PopupMessageWriterWriteWarningMsgs;
set => Properties.OptionsNotificationsPage.Default.PopupMessageWriterWriteWarningMsgs = value;
}
public bool AllowErrorMessages
{
get => Settings.Default.PopupMessageWriterWriteErrorMsgs;
set => Settings.Default.PopupMessageWriterWriteErrorMsgs = value;
get => Properties.OptionsNotificationsPage.Default.PopupMessageWriterWriteErrorMsgs;
set => Properties.OptionsNotificationsPage.Default.PopupMessageWriterWriteErrorMsgs = value;
}
}
}

158
mRemoteNG/Properties/App.Designer.cs generated Normal file
View File

@@ -0,0 +1,158 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace mRemoteNG.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0")]
internal sealed partial class App : global::System.Configuration.ApplicationSettingsBase {
private static App defaultInstance = ((App)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new App())));
public static App Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0, 0")]
public global::System.Drawing.Point MainFormLocation {
get {
return ((global::System.Drawing.Point)(this["MainFormLocation"]));
}
set {
this["MainFormLocation"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0, 0")]
public global::System.Drawing.Size MainFormSize {
get {
return ((global::System.Drawing.Size)(this["MainFormSize"]));
}
set {
this["MainFormSize"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Normal")]
public global::System.Windows.Forms.FormWindowState MainFormState {
get {
return ((global::System.Windows.Forms.FormWindowState)(this["MainFormState"]));
}
set {
this["MainFormState"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0, 0")]
public global::System.Drawing.Size MainFormRestoreSize {
get {
return ((global::System.Drawing.Size)(this["MainFormRestoreSize"]));
}
set {
this["MainFormRestoreSize"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0, 0")]
public global::System.Drawing.Point MainFormRestoreLocation {
get {
return ((global::System.Drawing.Point)(this["MainFormRestoreLocation"]));
}
set {
this["MainFormRestoreLocation"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool MainFormKiosk {
get {
return ((bool)(this["MainFormKiosk"]));
}
set {
this["MainFormKiosk"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("1")]
public string StartOnScreen {
get {
return ((string)(this["StartOnScreen"]));
}
set {
this["StartOnScreen"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool FirstStart {
get {
return ((bool)(this["FirstStart"]));
}
set {
this["FirstStart"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool ResetPanels {
get {
return ((bool)(this["ResetPanels"]));
}
set {
this["ResetPanels"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool ResetToolbars {
get {
return ((bool)(this["ResetToolbars"]));
}
set {
this["ResetToolbars"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool DoUpgrade {
get {
return ((bool)(this["DoUpgrade"]));
}
set {
this["DoUpgrade"] = value;
}
}
}
}

View File

@@ -0,0 +1,39 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="mRemoteNG.Properties" GeneratedClassName="App">
<Profiles />
<Settings>
<Setting Name="MainFormLocation" Type="System.Drawing.Point" Scope="User">
<Value Profile="(Default)">0, 0</Value>
</Setting>
<Setting Name="MainFormSize" Type="System.Drawing.Size" Scope="User">
<Value Profile="(Default)">0, 0</Value>
</Setting>
<Setting Name="MainFormState" Type="System.Windows.Forms.FormWindowState" Scope="User">
<Value Profile="(Default)">Normal</Value>
</Setting>
<Setting Name="MainFormRestoreSize" Type="System.Drawing.Size" Scope="User">
<Value Profile="(Default)">0, 0</Value>
</Setting>
<Setting Name="MainFormRestoreLocation" Type="System.Drawing.Point" Scope="User">
<Value Profile="(Default)">0, 0</Value>
</Setting>
<Setting Name="MainFormKiosk" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="StartOnScreen" Type="System.String" Scope="User">
<Value Profile="(Default)">1</Value>
</Setting>
<Setting Name="FirstStart" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="ResetPanels" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="ResetToolbars" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="DoUpgrade" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>

36
mRemoteNG/Properties/AppUI.Designer.cs generated Normal file
View File

@@ -0,0 +1,36 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace mRemoteNG.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.1.0.0")]
internal sealed partial class AppUI : global::System.Configuration.ApplicationSettingsBase {
private static AppUI defaultInstance = ((AppUI)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new AppUI())));
public static AppUI Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("cs-CZ,de,el,en,en-US,es-AR,es,fr,hu,it,lt,ja-JP,ko-KR,nb-NO,nl,pt,pt-BR,pl,ru,uk," +
"tr-TR,zh-CN,zh-TW")]
public string SupportedUICultures {
get {
return ((string)(this["SupportedUICultures"]));
}
}
}
}

View File

@@ -0,0 +1,9 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="mRemoteNG.Properties" GeneratedClassName="AppUI">
<Profiles />
<Settings>
<Setting Name="SupportedUICultures" Type="System.String" Scope="Application">
<Value Profile="(Default)">cs-CZ,de,el,en,en-US,es-AR,es,fr,hu,it,lt,ja-JP,ko-KR,nb-NO,nl,pt,pt-BR,pl,ru,uk,tr-TR,zh-CN,zh-TW</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@@ -0,0 +1,22 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Resources;
// General Information
[assembly: AssemblyTitle("mRemoteNG")]
[assembly: AssemblyDescription("Multi-Remote Next Generation Connection Manager")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("mRemoteNG")]
[assembly: AssemblyProduct("mRemoteNG Connection Manager")]
[assembly: AssemblyCopyright("(c) 2023 mRemoteNG")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Version information
[assembly: AssemblyVersion("1.77.3.1782")]
[assembly: AssemblyFileVersion("1.77.3.1782")]
[assembly: NeutralResourcesLanguageAttribute("en-US")]
[assembly: AssemblyInformationalVersion("1.77.3 (Nightly Build: 1782)")]

View File

@@ -0,0 +1,47 @@
<#@ template debug="true" hostspecific="true" language="C#" #>
<#@ output extension=".cs" #>
<#@ import namespace="System.IO" #>
<#@ import namespace="System.Text.RegularExpressions" #>
<#
string output = File.ReadAllText(this.Host.ResolvePath("AssemblyInfo.cs"));
Regex pattern = new Regex("AssemblyVersion\\(\"(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<revision>\\d+)\\.(?<build>\\d+)\"\\)");
MatchCollection matches = pattern.Matches(output);
if( matches.Count == 1 )
{
major = Convert.ToInt32(matches[0].Groups["major"].Value);
minor = Convert.ToInt32(matches[0].Groups["minor"].Value);
revision = Convert.ToInt32(matches[0].Groups["revision"].Value);
build = Convert.ToInt32(matches[0].Groups["build"].Value);
if( this.Host.ResolveParameterValue("-","-","BuildConfiguration") == "Release" )
build++;
}
#>
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Resources;
// General Information
[assembly: AssemblyTitle("mRemoteNG")]
[assembly: AssemblyDescription("Multi-Remote Next Generation Connection Manager")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("mRemoteNG")]
[assembly: AssemblyProduct("mRemoteNG Connection Manager")]
[assembly: AssemblyCopyright("(c) 2023 mRemoteNG")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Version information
[assembly: AssemblyVersion("<#= this.major #>.<#= this.minor #>.<#= this.revision #>.<#= this.build #>")]
[assembly: AssemblyFileVersion("<#= this.major #>.<#= this.minor #>.<#= this.revision #>.<#= this.build #>")]
[assembly: NeutralResourcesLanguageAttribute("en-US")]
[assembly: AssemblyInformationalVersion("<#= this.major #>.<#= this.minor #>.<#= this.revision #> (<#= this.channel #>: <#= this.build #>)")]
<#+
int major = 1;
int minor = 77;
int revision = 3;
int build = 0;
string channel = "Nightly Build";
#>

View File

@@ -0,0 +1,122 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace mRemoteNG.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0")]
internal sealed partial class OptionsAdvancedPage : global::System.Configuration.ApplicationSettingsBase {
private static OptionsAdvancedPage defaultInstance = ((OptionsAdvancedPage)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new OptionsAdvancedPage())));
public static OptionsAdvancedPage Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool ReconnectOnDisconnect {
get {
return ((bool)(this["ReconnectOnDisconnect"]));
}
set {
this["ReconnectOnDisconnect"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string CustomPuttyPath {
get {
return ((string)(this["CustomPuttyPath"]));
}
set {
this["CustomPuttyPath"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool UseCustomPuttyPath {
get {
return ((bool)(this["UseCustomPuttyPath"]));
}
set {
this["UseCustomPuttyPath"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("2")]
public int MaxPuttyWaitTime {
get {
return ((int)(this["MaxPuttyWaitTime"]));
}
set {
this["MaxPuttyWaitTime"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("5500")]
public int UVNCSCPort {
get {
return ((int)(this["UVNCSCPort"]));
}
set {
this["UVNCSCPort"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool RdpLoadBalanceInfoUseUtf8 {
get {
return ((bool)(this["RdpLoadBalanceInfoUseUtf8"]));
}
set {
this["RdpLoadBalanceInfoUseUtf8"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool cbAdvancedPageInOptionMenu {
get {
return ((bool)(this["cbAdvancedPageInOptionMenu"]));
}
set {
this["cbAdvancedPageInOptionMenu"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool NoReconnect {
get {
return ((bool)(this["NoReconnect"]));
}
set {
this["NoReconnect"] = value;
}
}
}
}

View File

@@ -0,0 +1,30 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="mRemoteNG.Properties" GeneratedClassName="OptionsAdvancedPage">
<Profiles />
<Settings>
<Setting Name="ReconnectOnDisconnect" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="CustomPuttyPath" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="UseCustomPuttyPath" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="MaxPuttyWaitTime" Type="System.Int32" Scope="User">
<Value Profile="(Default)">2</Value>
</Setting>
<Setting Name="UVNCSCPort" Type="System.Int32" Scope="User">
<Value Profile="(Default)">5500</Value>
</Setting>
<Setting Name="RdpLoadBalanceInfoUseUtf8" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="cbAdvancedPageInOptionMenu" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="NoReconnect" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@@ -0,0 +1,98 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace mRemoteNG.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.1.0.0")]
internal sealed partial class OptionsAppearancePage : global::System.Configuration.ApplicationSettingsBase {
private static OptionsAppearancePage defaultInstance = ((OptionsAppearancePage)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new OptionsAppearancePage())));
public static OptionsAppearancePage Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool ShowSystemTrayIcon {
get {
return ((bool)(this["ShowSystemTrayIcon"]));
}
set {
this["ShowSystemTrayIcon"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool MinimizeToTray {
get {
return ((bool)(this["MinimizeToTray"]));
}
set {
this["MinimizeToTray"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool CloseToTray {
get {
return ((bool)(this["CloseToTray"]));
}
set {
this["CloseToTray"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool ShowDescriptionTooltipsInTree {
get {
return ((bool)(this["ShowDescriptionTooltipsInTree"]));
}
set {
this["ShowDescriptionTooltipsInTree"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool ShowCompleteConsPathInTitle {
get {
return ((bool)(this["ShowCompleteConsPathInTitle"]));
}
set {
this["ShowCompleteConsPathInTitle"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool cbAppearancePageInOptionMenu {
get {
return ((bool)(this["cbAppearancePageInOptionMenu"]));
}
set {
this["cbAppearancePageInOptionMenu"] = value;
}
}
}
}

View File

@@ -0,0 +1,24 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="mRemoteNG.Properties" GeneratedClassName="OptionsAppearancePage">
<Profiles />
<Settings>
<Setting Name="ShowSystemTrayIcon" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="MinimizeToTray" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="CloseToTray" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="ShowDescriptionTooltipsInTree" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="ShowCompleteConsPathInTitle" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="cbAppearancePageInOptionMenu" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@@ -0,0 +1,254 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace mRemoteNG.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.1.0.0")]
internal sealed partial class OptionsBackupPage : global::System.Configuration.ApplicationSettingsBase {
private static OptionsBackupPage defaultInstance = ((OptionsBackupPage)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new OptionsBackupPage())));
public static OptionsBackupPage Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("10")]
public int BackupFileKeepCount {
get {
return ((int)(this["BackupFileKeepCount"]));
}
set {
this["BackupFileKeepCount"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("{0}.{1:yyyyMMdd-HHmmssffff}.backup")]
public string BackupFileNameFormat {
get {
return ((string)(this["BackupFileNameFormat"]));
}
set {
this["BackupFileNameFormat"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string BackupLocation {
get {
return ((string)(this["BackupLocation"]));
}
set {
this["BackupLocation"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool SaveConsOnExit {
get {
return ((bool)(this["SaveConsOnExit"]));
}
set {
this["SaveConsOnExit"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int SaveConnectionsFrequency {
get {
return ((int)(this["SaveConnectionsFrequency"]));
}
set {
this["SaveConnectionsFrequency"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string CustomConsPath {
get {
return ((string)(this["CustomConsPath"]));
}
set {
this["CustomConsPath"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool SaveConnectionsAfterEveryEdit {
get {
return ((bool)(this["SaveConnectionsAfterEveryEdit"]));
}
set {
this["SaveConnectionsAfterEveryEdit"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("50")]
public int AutoSaveEveryMinutes {
get {
return ((int)(this["AutoSaveEveryMinutes"]));
}
set {
this["AutoSaveEveryMinutes"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool LoadConsFromCustomLocation {
get {
return ((bool)(this["LoadConsFromCustomLocation"]));
}
set {
this["LoadConsFromCustomLocation"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int cbBackupEnableACL {
get {
return ((int)(this["cbBackupEnableACL"]));
}
set {
this["cbBackupEnableACL"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int cbBackupTypeACL {
get {
return ((int)(this["cbBackupTypeACL"]));
}
set {
this["cbBackupTypeACL"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int cbBackupFrequencyACL {
get {
return ((int)(this["cbBackupFrequencyACL"]));
}
set {
this["cbBackupFrequencyACL"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int cbBackupNumberACL {
get {
return ((int)(this["cbBackupNumberACL"]));
}
set {
this["cbBackupNumberACL"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int cbBackupNameFormatACL {
get {
return ((int)(this["cbBackupNameFormatACL"]));
}
set {
this["cbBackupNameFormatACL"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int cbBackupLocationACL {
get {
return ((int)(this["cbBackupLocationACL"]));
}
set {
this["cbBackupLocationACL"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool cbBacupPageInOptionMenu {
get {
return ((bool)(this["cbBacupPageInOptionMenu"]));
}
set {
this["cbBacupPageInOptionMenu"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool BackupConnectionsOnExit {
get {
return ((bool)(this["BackupConnectionsOnExit"]));
}
set {
this["BackupConnectionsOnExit"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool BackupConnectionsOnEdit {
get {
return ((bool)(this["BackupConnectionsOnEdit"]));
}
set {
this["BackupConnectionsOnEdit"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool BackupConnectionsOnSave {
get {
return ((bool)(this["BackupConnectionsOnSave"]));
}
set {
this["BackupConnectionsOnSave"] = value;
}
}
}
}

View File

@@ -0,0 +1,63 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="mRemoteNG.Properties" GeneratedClassName="OptionsBackupPage">
<Profiles />
<Settings>
<Setting Name="BackupFileKeepCount" Type="System.Int32" Scope="User">
<Value Profile="(Default)">10</Value>
</Setting>
<Setting Name="BackupFileNameFormat" Type="System.String" Scope="User">
<Value Profile="(Default)">{0}.{1:yyyyMMdd-HHmmssffff}.backup</Value>
</Setting>
<Setting Name="BackupLocation" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="SaveConsOnExit" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="SaveConnectionsFrequency" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="CustomConsPath" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="SaveConnectionsAfterEveryEdit" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="AutoSaveEveryMinutes" Type="System.Int32" Scope="User">
<Value Profile="(Default)">50</Value>
</Setting>
<Setting Name="LoadConsFromCustomLocation" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="cbBackupEnableACL" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="cbBackupTypeACL" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="cbBackupFrequencyACL" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="cbBackupNumberACL" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="cbBackupNameFormatACL" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="cbBackupLocationACL" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="cbBacupPageInOptionMenu" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="BackupConnectionsOnExit" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="BackupConnectionsOnEdit" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="BackupConnectionsOnSave" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@@ -0,0 +1,62 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace mRemoteNG.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.1.0.0")]
internal sealed partial class OptionsConnectionsPage : global::System.Configuration.ApplicationSettingsBase {
private static OptionsConnectionsPage defaultInstance = ((OptionsConnectionsPage)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new OptionsConnectionsPage())));
public static OptionsConnectionsPage Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int AutoSaveEveryMinutes {
get {
return ((int)(this["AutoSaveEveryMinutes"]));
}
set {
this["AutoSaveEveryMinutes"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string ConnectrionFilePath {
get {
return ((string)(this["ConnectrionFilePath"]));
}
set {
this["ConnectrionFilePath"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool cbConnectionsPageInOptionMenu {
get {
return ((bool)(this["cbConnectionsPageInOptionMenu"]));
}
set {
this["cbConnectionsPageInOptionMenu"] = value;
}
}
}
}

View File

@@ -0,0 +1,15 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="mRemoteNG.Properties" GeneratedClassName="OptionsConnectionsPage">
<Profiles />
<Settings>
<Setting Name="AutoSaveEveryMinutes" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="ConnectrionFilePath" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="cbConnectionsPageInOptionMenu" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@@ -0,0 +1,116 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using mRemoteNG.Connection;
namespace mRemoteNG.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.1.0.0")]
internal sealed partial class OptionsCredentialsPage : global::System.Configuration.ApplicationSettingsBase {
private static OptionsCredentialsPage defaultInstance = ((OptionsCredentialsPage)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new OptionsCredentialsPage())));
public static OptionsCredentialsPage Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string DefaultUsername {
get {
return ((string)(this["DefaultUsername"]));
}
set {
this["DefaultUsername"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string DefaultPassword {
get {
return ((string)(this["DefaultPassword"]));
}
set {
this["DefaultPassword"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string DefaultDomain {
get {
return ((string)(this["DefaultDomain"]));
}
set {
this["DefaultDomain"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public ExternalCredentialProvider ExternalCredentialProviderDefault
{
get
{
return ((ExternalCredentialProvider)(this["ExternalCredentialProviderDefault"]));
}
set
{
this["ExternalCredentialProviderDefault"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string UserViaAPIDefault {
get {
return ((string)(this["UserViaAPIDefault"]));
}
set {
this["UserViaAPIDefault"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("noinfo")]
public string EmptyCredentials {
get {
return ((string)(this["EmptyCredentials"]));
}
set {
this["EmptyCredentials"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool cbCredentialsPageInOptionMenu {
get {
return ((bool)(this["cbCredentialsPageInOptionMenu"]));
}
set {
this["cbCredentialsPageInOptionMenu"] = value;
}
}
}
}

View File

@@ -0,0 +1,24 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="mRemoteNG.Properties" GeneratedClassName="OptionsCredentialsPage">
<Profiles />
<Settings>
<Setting Name="DefaultUsername" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="DefaultPassword" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="DefaultDomain" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="UserViaAPDefault" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="EmptyCredentials" Type="System.String" Scope="User">
<Value Profile="(Default)">noinfo</Value>
</Setting>
<Setting Name="cbCredentialsPageInOptionMenu" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@@ -0,0 +1,122 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace mRemoteNG.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.1.0.0")]
internal sealed partial class OptionsDBsPage : global::System.Configuration.ApplicationSettingsBase {
private static OptionsDBsPage defaultInstance = ((OptionsDBsPage)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new OptionsDBsPage())));
public static OptionsDBsPage Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool UseSQLServer {
get {
return ((bool)(this["UseSQLServer"]));
}
set {
this["UseSQLServer"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("mssql")]
public string SQLServerType {
get {
return ((string)(this["SQLServerType"]));
}
set {
this["SQLServerType"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string SQLHost {
get {
return ((string)(this["SQLHost"]));
}
set {
this["SQLHost"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool SQLReadOnly {
get {
return ((bool)(this["SQLReadOnly"]));
}
set {
this["SQLReadOnly"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string SQLDatabaseName {
get {
return ((string)(this["SQLDatabaseName"]));
}
set {
this["SQLDatabaseName"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string SQLUser {
get {
return ((string)(this["SQLUser"]));
}
set {
this["SQLUser"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string SQLPass {
get {
return ((string)(this["SQLPass"]));
}
set {
this["SQLPass"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool cbDBsPageInOptionMenu {
get {
return ((bool)(this["cbDBsPageInOptionMenu"]));
}
set {
this["cbDBsPageInOptionMenu"] = value;
}
}
}
}

View File

@@ -0,0 +1,30 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="mRemoteNG.Properties" GeneratedClassName="OptionsDBsPage">
<Profiles />
<Settings>
<Setting Name="UseSQLServer" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="SQLServerType" Type="System.String" Scope="User">
<Value Profile="(Default)">mssql</Value>
</Setting>
<Setting Name="SQLHost" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="SQLReadOnly" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="SQLDatabaseName" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="SQLUser" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="SQLPass" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="cbDBsPageInOptionMenu" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>

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