Compare commits

...

89 Commits

Author SHA1 Message Date
David Sparer
756950ff4e added import logic for rdm files 2020-01-26 17:59:30 -06:00
David Sparer
11ea575898 implemented importing of basic RDM connection types 2020-01-26 16:43:09 -06:00
Faryan Rezagholi
9257b7ac52 Merge pull request #1669 from Filippo125/sql_update#1589
Sql fixes
2020-01-16 16:36:31 +01:00
Faryan Rezagholi
28d131f74d fixed typo 2020-01-16 16:23:12 +01:00
Faryan Rezagholi
76e1ae3596 updated changelog 2020-01-16 15:16:08 +01:00
Filippo Ferrazini
8357cfc9b5 Add database migration
Update changelog and credits
2020-01-09 23:41:18 +01:00
Filippo Ferrazini
1250f389af Remove unnecessary code 2020-01-05 16:18:50 +01:00
Filippo Ferrazini
d0ae6ee21a Add check if sql row has to be updated 2020-01-04 14:15:02 +01:00
Filippo Ferrazini
40f5bd9444 Implement crud on mssql 2019-12-29 16:56:34 +01:00
Filippo Ferrazini
c3ea05b862 Fix mssql creation tblCons query 2019-12-29 16:56:15 +01:00
Filippo Ferrazini
488c6f5f64 Change tblCons primary key sql setup 2019-12-28 16:33:23 +01:00
Filippo Ferrazini
a1940e3ab9 Optimize code remove 2019-12-28 16:11:39 +01:00
Filippo Ferrazini
eda873911a Change behaviour in sql save, don't rewrite all database 2019-12-28 16:03:18 +01:00
Faryan Rezagholi
048f890dcb Merge pull request #1622 from wwj402/develop
update chinese simplified language 2019/10/16
2019-11-10 12:15:57 +01:00
Faryan Rezagholi
28c31fc101 fixed failing test 2019-11-10 12:05:24 +01:00
Faryan Rezagholi
852c6576cf Merge branch 'develop' into pr/1622 2019-11-09 19:32:50 +01:00
David Sparer
00a5fc0142 created user documentation for default connection properties 2019-10-16 11:46:33 -05:00
wwj402
48cca34055 update chinese simplified language 2019/10/16 2019-10-16 14:59:41 +08:00
Faryan Rezagholi
b2c5298400 removed incomplete variable example table 2019-10-07 22:23:34 +02:00
Faryan Rezagholi
cf5d5e6974 Merge pull request #1567 from mRemoteNG/powershell_remoting
Powershell remoting
2019-10-06 11:01:26 +02:00
Faryan Rezagholi
3266485307 Updated translated string, fixes #1611 2019-10-05 01:07:19 +02:00
Faryan Rezagholi
d27ae45512 fixed wrongly negated if statement 2019-10-04 21:48:00 +02:00
Faryan Rezagholi
c9f0ea47b7 merged develop into powershell_remoting 2019-10-04 00:59:24 +02:00
Faryan Rezagholi
d5100660fb added missing translation 2019-10-03 18:59:03 +02:00
Faryan Rezagholi
5c07327467 initialize settingsLoader earlier in code to prevent ui elements from being created before the language culture is propeperly set, part of #1497 2019-10-03 18:52:48 +02:00
Faryan Rezagholi
1e374d3a25 minimal code refractoring 2019-10-03 18:14:18 +02:00
Faryan Rezagholi
d68c419bab access language resources with nameof, part 2 2019-10-03 17:06:15 +02:00
Faryan Rezagholi
a9c4d0dee5 simply close options form instead of reverting settings, fixes #1610 2019-10-03 16:56:57 +02:00
Faryan Rezagholi
75a453e598 Merge pull request #1608 from Mant1kor/develop
Update Ukrainian translation
2019-10-03 12:13:44 +02:00
Faryan Rezagholi
404f23e7e6 fixed line break in credits 2019-10-03 11:49:30 +02:00
Mantikor
104be16061 Fixes 2019-10-03 10:33:23 +03:00
Mantikor
742301edf8 Update CREDITS.md 2019-10-03 10:31:57 +03:00
Mantikor
c3734f2e09 Add files via upload 2019-10-03 10:31:34 +03:00
Mantikor
e0cd4f2e0a Add files via upload 2019-10-03 10:30:22 +03:00
Faryan Rezagholi
db6042a30e updated nuget packages 2019-10-03 00:22:45 +02:00
Faryan Rezagholi
0e233e7027 Updated .NET to 4.7.2 2019-10-03 00:18:27 +02:00
Faryan Rezagholi
8e5d41bfea removed https in credits 2019-10-02 19:50:08 +02:00
Mantikor
8bb03195b5 Update CREDITS.md 2019-10-02 17:44:43 +03:00
Mantikor
de2bafd5a0 Update translation and fix errors 2019-10-02 17:28:01 +03:00
Faryan Rezagholi
4c08d06e93 fixed error where mrng would never close when set to "minimize to tray on close" 2019-10-01 14:01:10 +02:00
Faryan Rezagholi
ab5b58f3ae Merge branch 'develop' of https://github.com/mRemoteNG/mRemoteNG into develop 2019-10-01 09:31:36 +02:00
Faryan Rezagholi
31f637bc51 Added option to minimize to system tray on closing, fixes #545 2019-10-01 09:31:11 +02:00
Faryan Rezagholi
fbcfdb3fea Merge pull request #1601 from ryno2121/develop
Increased VNC test connection timeout from 150ms to 500ms
2019-09-30 14:13:58 +02:00
ryno2121
b1c650bb72 Increased VNC test connection timeout from 150ms to 500ms
It has been found at times that when connecting to a VNC host that the connection times-out even though the host is powered on. This happens mostly when you are connected to the network through WiFi. The time out value for the VNC test connection has been increased from 150ms to 500ms.
2019-09-30 06:05:42 +02:00
Faryan Rezagholi
209a3fb381 Merge pull request #1596 from ryno2121/develop
Handle VNC timeout
2019-09-27 23:51:37 +02:00
Faryan Rezagholi
772a11cb1d small code improvements and formatting 2019-09-27 23:29:44 +02:00
Faryan Rezagholi
758f7770a1 updated changelog 2019-09-27 23:02:52 +02:00
ryno2121
b319eb188a Update CHANGELOG.md 2019-09-27 18:56:37 +02:00
ryno2121
8ad7547640 Added code to report within 150ms a timeout error if no connection can be made on the VNC port for 150ms. 2019-09-27 17:26:45 +02:00
Faryan Rezagholi
8b060745ef do not try to display multi ssh command from history when there are none, fixes #1595 2019-09-27 09:50:01 +02:00
Faryan Rezagholi
baf2037ca1 Merge pull request #1583 from ng3727/fix_about_window_click
Fix about window url click, updated CREDITS.md
2019-09-19 14:38:11 +02:00
Faryan Rezagholi
7bf00e30e6 minor code formatting 2019-09-19 14:12:22 +02:00
ng3727
55c983c565 Update AboutWindow.cs
fix if the clicked isn't a link, i.e. empty status bar text caused the process start
to cause an exception
2019-09-17 21:45:48 +01:00
ng3727
6a4cd70811 Update CREDITS.md
changed gibhub.com urls to be http:// this allows the urls to be clickable
2019-09-17 21:43:25 +01:00
Faryan Rezagholi
652a580ec6 fixed typo 2019-09-14 12:04:12 +02:00
Faryan Rezagholi
0d2a2134b9 Merge branch 'develop' into powershell_remoting 2019-09-14 12:03:12 +02:00
Faryan Rezagholi
a330d3e943 fixed copy-paste error 2019-09-12 13:05:39 +02:00
Faryan Rezagholi
0034f78edc merged develop into powershell_remoting 2019-09-10 00:13:23 +02:00
Faryan Rezagholi
27e71ebfc7 get protocol type descriptions by nameof instead of accessing them directly 2019-09-09 23:50:36 +02:00
Faryan Rezagholi
f0f3ddef87 Set localized attributes values by nameof instead of accessing them directly
Makes tracking of used/unused items and renaming items easier
2019-09-09 23:40:04 +02:00
Faryan Rezagholi
f65478ee36 added missing translations 2019-09-09 23:37:48 +02:00
Faryan Rezagholi
4bd7d63d9c merged develop into powershell_remoting 2019-09-09 23:04:48 +02:00
Faryan Rezagholi
0343254cad Merge pull request #1569 from damianszczepanik/translations-pl
Add translations for Polish language
2019-09-09 09:03:36 +02:00
Damian Szczepanik
9aaafa5015 Add translations for Polish language 2019-09-08 23:15:53 +02:00
Faryan Rezagholi
04bd78e91a Merge pull request #1565 from mRemoteNG/vmid_enhancedmode
Added option to set enhanced mode
2019-09-08 15:57:29 +02:00
Faryan Rezagholi
7ce17c7fb3 added powershell connection icon 2019-09-08 15:27:56 +02:00
Faryan Rezagholi
2a796d3bf5 Update PULL_REQUEST_TEMPLATE.md 2019-09-08 14:58:25 +02:00
Faryan Rezagholi
944aa6b13e Changed background color to native powershell color 2019-09-08 14:56:52 +02:00
Faryan Rezagholi
58add600d6 Update PULL_REQUEST_TEMPLATE.md 2019-09-08 14:30:06 +02:00
Faryan Rezagholi
b1089de1ad Revert "Set language version to C#7.1"
This reverts commit 69c1e2ccc2.
2019-09-08 14:07:22 +02:00
Faryan Rezagholi
69c1e2ccc2 Set language version to C#7.1 2019-09-08 13:43:13 +02:00
Faryan Rezagholi
6ec23d9d69 removed unnecessary usings 2019-09-08 13:07:14 +02:00
Faryan Rezagholi
de3072c67e Added ConsoleControl, since it seems that the powershell.exe cannot be integrated 2019-09-08 13:02:58 +02:00
Faryan Rezagholi
35f6d3eb90 updated documentation 2019-09-08 02:30:55 +02:00
Faryan Rezagholi
f0ffcc6944 updated changelog 2019-09-08 02:25:42 +02:00
Faryan Rezagholi
5ab3f71551 removed redundant language resources 2019-09-08 02:23:53 +02:00
Faryan Rezagholi
cef3b9294d cleanup 2019-09-08 02:22:19 +02:00
Faryan Rezagholi
0008631771 Added PowerShell Protocol for remote PS-Sessions 2019-09-07 18:16:36 +02:00
Faryan Rezagholi
8e5caaca55 Merge branch 'develop' into vmid_enhancedmode 2019-09-07 16:46:57 +02:00
Faryan Rezagholi
8c962e8b60 Merge pull request #1555 from mRemoteNG/update_geckofx
Updated GeckoFX
2019-09-07 16:42:02 +02:00
Faryan Rezagholi
7ebcba3c21 fixed enhancedMode value not being translated 2019-09-07 06:08:24 +02:00
Faryan Rezagholi
7ac45dbd32 fixed failing tests 2019-09-06 21:02:15 +02:00
Faryan Rezagholi
b83488d08a Added option to det enhanced mode as requested in #1564 2019-09-06 14:59:41 +02:00
Faryan Rezagholi
5528b701fb fixed installer build error 2019-09-03 16:09:36 +02:00
Faryan Rezagholi
8767d103f0 Updated Changelog 2019-09-02 23:15:05 +02:00
Faryan Rezagholi
ca66656a8e updated geckofx from 45 to 60 2019-09-02 22:55:09 +02:00
David Sparer
41e299aaaf dev channel badge updated in readme 2019-09-02 12:33:27 -05:00
Faryan Rezagholi
c3f44ef70a corrected wrongly negated if-statement, fixes #1337 2019-09-02 19:31:08 +02:00
Faryan Rezagholi
fa44e66bd9 Revert "do not automatically enable inheritance on connections imported from AD, fixes #1518"
This reverts commit c1b6bd4679.
2019-09-02 19:25:31 +02:00
165 changed files with 8693 additions and 8064 deletions

View File

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

View File

@@ -3,6 +3,19 @@ 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).
## [Unreleased]
### Added
- #545: Option to minimize to system tray on closing
- #283: Support for native PowerShell remoting as new protocol
### Changed
- #1460: Updated GeckoFX to v60
### Fixed
- #1610: Menu bar changes to english when cancelling options form
- #1595: Unhandled exception when trying to browse through non existent multi ssh history with keyboard key strokes
- #1589: Update SQL tables instead of rewriting them
- #1337: Unhandled exception after closing mRemoteNG
- #359: Making a VNC connection to an unreachable host causes the application to not respond for 20-30 seconds
## [1.77.1] - 2019-09-02
### Added
- #1512: Added option to close panel from right click menu

View File

@@ -1,37 +1,38 @@
# Contributors
## Current mRemoteNG dev team
David Sparer (github.com/sparerd)
Sean Kaim (github.com/kmscode)
Faryan Rezagholi (github.com/farosch)
David Sparer (http://github.com/sparerd)
Sean Kaim (http://github.com/kmscode)
Faryan Rezagholi (http://github.com/farosch)
Thanks for the awesome new website!
Bennett Blodinger (github.com/benwa)
Bennett Blodinger (http://github.com/benwa)
Joe Cefoli (github.com/jcefoli)
countchappy (github.com/countchappy)
Joe Cefoli (http://github.com/jcefoli)
countchappy (http://github.com/countchappy)
Tony Lambert
Julien Roncaglia (github.com/vbfox)
github.com/peterchenadded
Brandon Wulf (github.com/mrwulf)
Pedro Rodrigues (github.com/pedro2555)
github.com/dekelMP
Bruce (github.com/brucetp)
Camilo Alvarez (github.com/jotatsu)
github.com/DamianBis
github.com/pfjason
github.com/sirLoaf
github.com/Fyers
Vladimir Semenov (github.com/sli-pro)
Stephan (github.com/st-schuler)
Aleksey Reytsman (github.com/areytsman)
Cristian Abelleira (github.com/CrAbelleira)
github.com/MitchellBot
Julien Roncaglia (http://github.com/vbfox)
http://github.com/peterchenadded
Brandon Wulf (http://github.com/mrwulf)
Pedro Rodrigues (http://github.com/pedro2555)
http://github.com/dekelMP
Bruce (http://github.com/brucetp)
Camilo Alvarez (http://github.com/jotatsu)
http://github.com/DamianBis
http://github.com/pfjason
http://github.com/sirLoaf
http://github.com/Fyers
Vladimir Semenov (http://github.com/sli-pro)
Stephan (http://github.com/st-schuler)
Aleksey Reytsman (http://github.com/areytsman)
Cristian Abelleira (http://github.com/CrAbelleira)
http://github.com/MitchellBot
Filippo Ferrazini (http://github.com/Filippo125)
## Past Contributors
Felix Deimel - mRemote original developer
Riley McArdle - mRemoteNG original developer
Hayato Iriumi (github.com/hiriumi)
Hayato Iriumi (http://github.com/hiriumi)
Jason Barbier
Wiktor Beryt
Lionel Caignec
@@ -41,8 +42,8 @@ Tom Hiller
Apisitt Rattana
Andreas Rehm
David Vidmar
github.com/Brandhor
Dimitrij (github.com/Kvarkas)
http://github.com/Brandhor
Dimitrij (http://github.com/Kvarkas)
## Translators
Eugenio "Ryo567" Martínez
@@ -50,17 +51,19 @@ Mathieu Pape
Emanuel Silva
Robert Siwiec
Hayato Iriumi
Sebastien Thieury (github.com/SebThieu)
Sebastien Thieury (http://github.com/SebThieu)
Riza Emet
Lukas Plachy (github.com/rheingold)
Lukas Plachy (http://github.com/rheingold)
Gyuha Shin
Stefan (github.com/polluks)
github.com/emazv72
Vladimir Semenov (github.com/sli-pro)
Marco Sousa (github.com/marcomsousa)
github.com/wwj402
github.com/Fyers
github.com/pablomh
Stefan (http://github.com/polluks)
http://github.com/emazv72
Vladimir Semenov (http://github.com/sli-pro)
Marco Sousa (http://github.com/marcomsousa)
http://github.com/wwj402
http://github.com/Fyers
http://github.com/pablomh
Damian Szczepanik (http://github.com/damianszczepanik)
Mant1kor (http://github.com/Mant1kor)
## Included Source Code
Command Line Arguments Parser
@@ -129,7 +132,7 @@ https://github.com/sshnet/SSH.NET
VncSharp
Copyright © 2004-2009 David Humphrey
GNU General Public License (GPL) Version 2
https://github.com/humphd/VncSharp
https://github.com/humphd/VncSharp [Archived]
ObjectListView
Copyright © 2006-2016 Phillip Piper
@@ -140,3 +143,8 @@ Markdig
Copyright © 2016-2019 Alexandre Mutel
BSD 2-Clause "Simplified"
https://github.com/lunet-io/markdig
ConsoleControl
Copyright © 2015 Dave Kerr
MIT License
https://github.com/dwmkerr/consolecontrol

View File

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

View File

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

View File

@@ -13,7 +13,7 @@
| ---------------|--------------|-----------|
| Stable | [![Build status](https://ci.appveyor.com/api/projects/status/k0sdbxmq90fgdmj6/branch/master?svg=true)](https://ci.appveyor.com/project/mremoteng/mremoteng/branch/master) | [![Github Releases (by Release)](https://img.shields.io/github/downloads/mRemoteNG/mRemoteNG/v1.76.15/total.svg)](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.76.15) |
| Beta | | [![Github Releases (by Release)](https://img.shields.io/github/downloads/mRemoteNG/mRemoteNG/v1.76.15/total.svg)](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.76.15) |
| Development | [![Build status](https://ci.appveyor.com/api/projects/status/k0sdbxmq90fgdmj6/branch/develop?svg=true)](https://ci.appveyor.com/project/mremoteng/mremoteng/branch/develop) | [![Github Releases (by Release)](https://img.shields.io/github/downloads/mRemoteNG/mRemoteNG/v1.76.15/total.svg)](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.76.15) |
| Development | [![Build status](https://ci.appveyor.com/api/projects/status/k0sdbxmq90fgdmj6/branch/develop?svg=true)](https://ci.appveyor.com/project/mremoteng/mremoteng/branch/develop) | [![Github Releases (by Release)](https://img.shields.io/github/downloads/mRemoteNG/mRemoteNG/v1.77.1/total.svg)](https://github.com/mRemoteNG/mRemoteNG/releases/tag/v1.77.1) |
mRemoteNG is the next generation of mRemote, a full-featured, multi-tab remote connections manager.

View File

@@ -17,7 +17,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
@@ -25,12 +25,16 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Google.Protobuf" publicKeyToken="a7d26565bac4d604" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.8.0.0" newVersion="3.8.0.0" />
<bindingRedirect oldVersion="0.0.0.0-3.9.2.0" newVersion="3.9.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
</configuration>

View File

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

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\SpecFlow.NUnit.3.0.224\build\SpecFlow.NUnit.props" Condition="Exists('..\packages\SpecFlow.NUnit.3.0.224\build\SpecFlow.NUnit.props')" />
<Import Project="..\packages\SpecFlow.NUnit.3.0.225\build\SpecFlow.NUnit.props" Condition="Exists('..\packages\SpecFlow.NUnit.3.0.225\build\SpecFlow.NUnit.props')" />
<Import Project="..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props')" />
<Import Project="..\packages\NUnit.3.12.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" />
<Import Project="..\packages\NUnit3TestAdapter.3.13.0\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\packages\NUnit3TestAdapter.3.13.0\build\net35\NUnit3TestAdapter.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -12,7 +12,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>mRemoteNG.Specs</RootNamespace>
<AssemblyName>mRemoteNG.Specs</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
@@ -51,11 +51,11 @@
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.6.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.2\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll</HintPath>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
@@ -67,10 +67,10 @@
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="TechTalk.SpecFlow, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0778194805d6db41, processorArchitecture=MSIL">
<HintPath>..\packages\SpecFlow.3.0.224\lib\net45\TechTalk.SpecFlow.dll</HintPath>
<HintPath>..\packages\SpecFlow.3.0.225\lib\net45\TechTalk.SpecFlow.dll</HintPath>
</Reference>
<Reference Include="TechTalk.SpecFlow.NUnit.SpecFlowPlugin, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0778194805d6db41, processorArchitecture=MSIL">
<HintPath>..\packages\SpecFlow.NUnit.3.0.224\lib\net45\TechTalk.SpecFlow.NUnit.SpecFlowPlugin.dll</HintPath>
<HintPath>..\packages\SpecFlow.NUnit.3.0.225\lib\net45\TechTalk.SpecFlow.NUnit.SpecFlowPlugin.dll</HintPath>
</Reference>
<Reference Include="Utf8Json, Version=1.3.7.0, Culture=neutral, PublicKeyToken=8a73d3ba7e392e27, processorArchitecture=MSIL">
<HintPath>..\packages\Utf8Json.1.3.7\lib\net45\Utf8Json.dll</HintPath>
@@ -120,12 +120,12 @@
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\NUnit3TestAdapter.3.13.0\build\net35\NUnit3TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit3TestAdapter.3.13.0\build\net35\NUnit3TestAdapter.props'))" />
<Error Condition="!Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.12.0\build\NUnit.props'))" />
<Error Condition="!Exists('..\packages\SpecFlow.NUnit.3.0.224\build\SpecFlow.NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SpecFlow.NUnit.3.0.224\build\SpecFlow.NUnit.props'))" />
<Error Condition="!Exists('..\packages\SpecFlow.NUnit.3.0.224\build\SpecFlow.NUnit.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SpecFlow.NUnit.3.0.224\build\SpecFlow.NUnit.targets'))" />
<Error Condition="!Exists('..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props'))" />
<Error Condition="!Exists('..\packages\SpecFlow.NUnit.3.0.225\build\SpecFlow.NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SpecFlow.NUnit.3.0.225\build\SpecFlow.NUnit.props'))" />
<Error Condition="!Exists('..\packages\SpecFlow.NUnit.3.0.225\build\SpecFlow.NUnit.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\SpecFlow.NUnit.3.0.225\build\SpecFlow.NUnit.targets'))" />
</Target>
<Import Project="..\packages\SpecFlow.NUnit.3.0.224\build\SpecFlow.NUnit.targets" Condition="Exists('..\packages\SpecFlow.NUnit.3.0.224\build\SpecFlow.NUnit.targets')" />
<Import Project="..\packages\SpecFlow.NUnit.3.0.225\build\SpecFlow.NUnit.targets" Condition="Exists('..\packages\SpecFlow.NUnit.3.0.225\build\SpecFlow.NUnit.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

View File

@@ -9,17 +9,17 @@
<package id="NUnit.Extension.NUnitProjectLoader" version="3.6.0" targetFramework="net46" />
<package id="NUnit.Extension.NUnitV2Driver" version="3.7.0" targetFramework="net46" />
<package id="NUnit.Extension.NUnitV2ResultWriter" version="3.6.0" targetFramework="net46" />
<package id="NUnit.Extension.TeamCityEventListener" version="1.0.6" targetFramework="net46" />
<package id="NUnit.Extension.TeamCityEventListener" version="1.0.7" targetFramework="net472" />
<package id="NUnit.Extension.VSProjectLoader" version="3.8.0" targetFramework="net46" />
<package id="NUnit.Runners" version="3.10.0" targetFramework="net46" />
<package id="NUnit3TestAdapter" version="3.13.0" targetFramework="net46" />
<package id="SpecFlow" version="3.0.224" targetFramework="net46" />
<package id="SpecFlow.NUnit" version="3.0.224" targetFramework="net46" />
<package id="SpecFlow.NUnit.Runners" version="3.0.224" targetFramework="net46" />
<package id="System.Reflection.Emit" version="4.3.0" targetFramework="net46" />
<package id="System.Reflection.Emit.Lightweight" version="4.3.0" targetFramework="net46" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net46" />
<package id="System.Threading.Tasks.Extensions" version="4.5.2" targetFramework="net46" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net46" />
<package id="Utf8Json" version="1.3.7" targetFramework="net46" />
<package id="NUnit3TestAdapter" version="3.15.1" targetFramework="net472" />
<package id="SpecFlow" version="3.0.225" targetFramework="net472" />
<package id="SpecFlow.NUnit" version="3.0.225" targetFramework="net472" />
<package id="SpecFlow.NUnit.Runners" version="3.0.225" targetFramework="net472" />
<package id="System.Reflection.Emit" version="4.6.0" targetFramework="net472" />
<package id="System.Reflection.Emit.Lightweight" version="4.6.0" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.6.0" targetFramework="net472" />
<package id="System.Threading.Tasks.Extensions" version="4.5.3" targetFramework="net472" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net46" requireReinstallation="true" />
<package id="Utf8Json" version="1.3.7" targetFramework="net46" requireReinstallation="true" />
</packages>

View File

@@ -98,6 +98,7 @@ namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Csv
UseConsoleSession = true,
UseCredSsp = true,
UseVmId = false,
UseEnhancedMode = false,
RenderingEngine = HTTPBase.RenderingEngine.Gecko,
ICAEncryptionStrength = IcaProtocol.EncryptionStrength.Encr40Bit,
RDPAuthenticationLevel = AuthenticationLevel.WarnOnFailedAuth,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -64,6 +64,7 @@
public TType VNCColors { get; set; }
public TType VNCSmartSizeMode { get; set; }
public TType VNCViewOnly { get; set; }
public TType RdpVersion { get; set; }
}
public TType RdpVersion { get; set; }
public TType UseEnhancedMode { get; set; }
}
}

View File

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

View File

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

View File

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

View File

@@ -342,6 +342,15 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
nameof(ConnectionInfo.CacheBitmaps),
});
break;
case ProtocolType.PowerShell:
expectedProperties.AddRange(new[]
{
nameof(ConnectionInfo.Username),
nameof(ConnectionInfo.Password),
nameof(ConnectionInfo.Domain),
nameof(ConnectionInfo.Port),
});
break;
case ProtocolType.IntApp:
expectedProperties.AddRange(new[]
{

View File

@@ -1,5 +1,4 @@
using mRemoteNG.Connection;
using mRemoteNG.Connection.Protocol;
using mRemoteNG.Connection.Protocol;
using mRemoteNG.Connection.Protocol.RDP;
using NUnit.Framework;

View File

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

View File

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\ReportGenerator.4.3.0\build\netstandard2.0\ReportGenerator.props" Condition="Exists('..\packages\ReportGenerator.4.3.0\build\netstandard2.0\ReportGenerator.props')" />
<Import Project="..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props')" />
<Import Project="..\packages\NUnit.3.12.0\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" />
<Import Project="..\packages\NUnit3TestAdapter.3.13.0\build\net35\NUnit3TestAdapter.props" Condition="Exists('..\packages\NUnit3TestAdapter.3.13.0\build\net35\NUnit3TestAdapter.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -10,7 +11,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>mRemoteNGTests</RootNamespace>
<AssemblyName>mRemoteNGTests</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
@@ -70,7 +71,7 @@
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="NSubstitute, Version=4.2.0.0, Culture=neutral, PublicKeyToken=92dd2e9066daa5ca, processorArchitecture=MSIL">
<HintPath>..\packages\NSubstitute.4.2.0\lib\net46\NSubstitute.dll</HintPath>
<HintPath>..\packages\NSubstitute.4.2.1\lib\net46\NSubstitute.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=3.12.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.12.0\lib\net45\nunit.framework.dll</HintPath>
@@ -86,11 +87,11 @@
<Reference Include="System.Data" />
<Reference Include="System.DirectoryServices" />
<Reference Include="System.Drawing" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard1.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.5.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.6.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.2\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll</HintPath>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
@@ -122,6 +123,7 @@
<Compile Include="Config\DataProviders\FileBackupCreatorTests.cs" />
<Compile Include="Config\DataProviders\FileDataProviderTests.cs" />
<Compile Include="Config\DataProviders\FileDataProviderWithRollingBackupTests.cs" />
<Compile Include="Config\Serializers\MiscSerializers\RemoteDesktopManagerDeserializerTests.cs" />
<Compile Include="Config\Serializers\ConnectionSerializers\Xml\ValidateXmlSchemas.cs" />
<Compile Include="Config\Serializers\DataTableDeserializerTests.cs" />
<Compile Include="Config\CredentialHarvesterTests.cs" />
@@ -253,6 +255,10 @@
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="Resources\rdp.rdm" />
<None Include="Resources\ssh.rdm" />
<None Include="Resources\vnc.rdm" />
<None Include="Resources\website.rdm" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
@@ -272,6 +278,7 @@
<ItemGroup>
<None Include="packages.config" />
<None Include="Resources\confCons_v2_5.xml" />
<None Include="Resources\telnet.rdm" />
<None Include="Resources\test_puttyConnectionManager_database.dat" />
<None Include="Resources\test_rdcman_badVersionNumber.rdg" />
<None Include="Resources\test_rdcman_noversion.rdg" />
@@ -342,8 +349,9 @@
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\NUnit3TestAdapter.3.13.0\build\net35\NUnit3TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit3TestAdapter.3.13.0\build\net35\NUnit3TestAdapter.props'))" />
<Error Condition="!Exists('..\packages\NUnit.3.12.0\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.12.0\build\NUnit.props'))" />
<Error Condition="!Exists('..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit3TestAdapter.3.15.1\build\net35\NUnit3TestAdapter.props'))" />
<Error Condition="!Exists('..\packages\ReportGenerator.4.3.0\build\netstandard2.0\ReportGenerator.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ReportGenerator.4.3.0\build\netstandard2.0\ReportGenerator.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View File

@@ -4,19 +4,19 @@
<package id="Castle.Core" version="4.4.0" targetFramework="net46" />
<package id="DockPanelSuite" version="3.0.6" targetFramework="net46" />
<package id="log4net" version="2.0.8" targetFramework="net46" />
<package id="NSubstitute" version="4.2.0" targetFramework="net46" />
<package id="NSubstitute" version="4.2.1" targetFramework="net472" />
<package id="NUnit" version="3.12.0" targetFramework="net46" />
<package id="NUnit.Console" version="3.10.0" targetFramework="net46" />
<package id="NUnit.ConsoleRunner" version="3.10.0" targetFramework="net46" />
<package id="NUnit.Extension.NUnitProjectLoader" version="3.6.0" targetFramework="net46" />
<package id="NUnit.Extension.NUnitV2Driver" version="3.7.0" targetFramework="net46" />
<package id="NUnit.Extension.NUnitV2ResultWriter" version="3.6.0" targetFramework="net46" />
<package id="NUnit.Extension.TeamCityEventListener" version="1.0.6" targetFramework="net46" />
<package id="NUnit.Extension.TeamCityEventListener" version="1.0.7" targetFramework="net472" />
<package id="NUnit.Extension.VSProjectLoader" version="3.8.0" targetFramework="net46" />
<package id="NUnit3TestAdapter" version="3.13.0" targetFramework="net46" />
<package id="NUnit3TestAdapter" version="3.15.1" targetFramework="net472" />
<package id="ObjectListView.Official" version="2.9.1" targetFramework="net46" />
<package id="OpenCover" version="4.7.922" targetFramework="net46" />
<package id="ReportGenerator" version="3.0.2" targetFramework="net46" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net46" />
<package id="System.Threading.Tasks.Extensions" version="4.5.2" targetFramework="net46" />
<package id="ReportGenerator" version="4.3.0" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.6.0" targetFramework="net472" />
<package id="System.Threading.Tasks.Extensions" version="4.5.3" targetFramework="net472" />
</packages>

View File

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

View File

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

View File

@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Globalization;
using System.Linq;
using mRemoteNG.App;
@@ -154,14 +153,16 @@ namespace mRemoteNG.Config.Connections
private void UpdateConnectionsTable(RootNodeInfo rootTreeNode, IDatabaseConnector databaseConnector)
{
var dataProvider = new SqlDataProvider(databaseConnector);
var currentDataTable = dataProvider.Load();
var cryptoProvider = new LegacyRijndaelCryptographyProvider();
var serializer = new DataTableSerializer(_saveFilter, cryptoProvider,
rootTreeNode.PasswordString.ConvertToSecureString());
serializer.SetSourceDataTable(currentDataTable);
var dataTable = serializer.Serialize(rootTreeNode);
var dataProvider = new SqlDataProvider(databaseConnector);
var dbQuery = databaseConnector.DbCommand("DELETE FROM tblCons");
dbQuery.ExecuteNonQuery();
//var dbQuery = databaseConnector.DbCommand("DELETE FROM tblCons");
//dbQuery.ExecuteNonQuery();
dataProvider.Save(dataTable);
}

View File

@@ -2,7 +2,6 @@
using System.Linq;
using mRemoteNG.App;
using mRemoteNG.Config.DataProviders;
using mRemoteNG.Config.Serializers;
using mRemoteNG.Config.Serializers.Xml;
using mRemoteNG.Security;
using mRemoteNG.Security.Factories;

View File

@@ -44,12 +44,31 @@ namespace mRemoteNG.Config.DataProviders
OpenConnection();
if (DatabaseConnector.GetType() == typeof(MSSqlDatabaseConnector))
{
using (var sqlBulkCopy = new SqlBulkCopy((SqlConnection)DatabaseConnector.DbConnection()))
SqlConnection sqlConnection = (SqlConnection)DatabaseConnector.DbConnection();
using (SqlTransaction transaction = sqlConnection.BeginTransaction(System.Data.IsolationLevel.Serializable))
{
foreach (DataColumn col in dataTable.Columns)
sqlBulkCopy.ColumnMappings.Add(col.ColumnName, col.ColumnName);
sqlBulkCopy.DestinationTableName = "dbo.tblCons";
sqlBulkCopy.WriteToServer(dataTable);
using (SqlCommand sqlCommand = new SqlCommand())
{
sqlCommand.Connection = sqlConnection;
sqlCommand.Transaction = transaction;
sqlCommand.CommandText = "SELECT * FROM tblCons";
using (SqlDataAdapter dataAdpater = new SqlDataAdapter())
{
dataAdpater.SelectCommand = sqlCommand;
SqlCommandBuilder builder = new SqlCommandBuilder(dataAdpater);
// Avoid optimistic concurrency, check if it is necessary.
builder.ConflictOption = ConflictOption.OverwriteChanges;
dataAdpater.UpdateCommand = builder.GetUpdateCommand();
dataAdpater.DeleteCommand = builder.GetDeleteCommand();
dataAdpater.InsertCommand = builder.GetInsertCommand();
dataAdpater.Update(dataTable);
transaction.Commit();
}
}
}
}

View File

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

View File

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

View File

@@ -164,6 +164,13 @@ namespace mRemoteNG.Config.Serializers.Csv
connectionRecord.UseVmId = value;
}
if (headers.Contains("UseEnhancedMode"))
{
bool value;
if (bool.TryParse(connectionCsv[headers.IndexOf("UseEnhancedMode")], out value))
connectionRecord.UseEnhancedMode = value;
}
if (headers.Contains("RenderingEngine"))
{
HTTPBase.RenderingEngine value;
@@ -564,6 +571,13 @@ namespace mRemoteNG.Config.Serializers.Csv
connectionRecord.Inheritance.UseVmId = value;
}
if (headers.Contains("InheritUseEnhancedMode"))
{
bool value;
if (bool.TryParse(connectionCsv[headers.IndexOf("InheritUseEnhancedMode")], out value))
connectionRecord.Inheritance.UseEnhancedMode = value;
}
if (headers.Contains("InheritRenderingEngine"))
{
bool value;

View File

@@ -56,7 +56,7 @@ namespace mRemoteNG.Config.Serializers.Csv
if (_saveFilter.SaveDomain)
sb.Append("Domain;");
sb.Append("Hostname;VmId;Protocol;PuttySession;Port;ConnectToConsole;UseCredSsp;UseVmId;RenderingEngine;ICAEncryptionStrength;RDPAuthenticationLevel;" +
sb.Append("Hostname;Port;VmId;Protocol;PuttySession;ConnectToConsole;UseCredSsp;UseVmId;UseEnhancedMode;RenderingEngine;ICAEncryptionStrength;RDPAuthenticationLevel;" +
"LoadBalanceInfo;Colors;Resolution;AutomaticResize;DisplayWallpaper;DisplayThemes;EnableFontSmoothing;EnableDesktopComposition;" +
"CacheBitmaps;RedirectDiskDrives;RedirectPorts;RedirectPrinters;RedirectClipboard;RedirectSmartCards;RedirectSound;RedirectKeys;" +
"PreExtApp;PostExtApp;MacAddress;UserField;ExtApp;Favorite;VNCCompression;VNCEncoding;VNCAuthMode;VNCProxyType;VNCProxyIP;" +
@@ -68,7 +68,7 @@ namespace mRemoteNG.Config.Serializers.Csv
"InheritEnableFontSmoothing;InheritEnableDesktopComposition;InheritDomain;InheritIcon;InheritPanel;InheritPassword;InheritPort;" +
"InheritProtocol;InheritPuttySession;InheritRedirectDiskDrives;InheritRedirectKeys;InheritRedirectPorts;InheritRedirectPrinters;" +
"InheritRedirectClipboard;InheritRedirectSmartCards;InheritRedirectSound;InheritResolution;InheritAutomaticResize;" +
"InheritUseConsoleSession;InheritUseCredSsp;InheritUseVmId;InheritVmId;InheritRenderingEngine;InheritUsername;InheritICAEncryptionStrength;" +
"InheritUseConsoleSession;InheritUseCredSsp;InheritUseVmId;InheritUseEnhancedMode;InheritVmId;InheritRenderingEngine;InheritUsername;InheritICAEncryptionStrength;" +
"InheritRDPAuthenticationLevel;InheritLoadBalanceInfo;InheritPreExtApp;InheritPostExtApp;InheritMacAddress;InheritUserField;" +
"InheritFavorite;InheritExtApp;InheritVNCCompression;InheritVNCEncoding;InheritVNCAuthMode;InheritVNCProxyType;InheritVNCProxyIP;" +
"InheritVNCProxyPort;InheritVNCProxyUsername;InheritVNCProxyPassword;InheritVNCColors;InheritVNCSmartSizeMode;InheritVNCViewOnly;" +
@@ -116,13 +116,14 @@ namespace mRemoteNG.Config.Serializers.Csv
sb.Append(FormatForCsv(con.Domain));
sb.Append(FormatForCsv(con.Hostname))
.Append(FormatForCsv(con.Port))
.Append(FormatForCsv(con.VmId))
.Append(FormatForCsv(con.Protocol))
.Append(FormatForCsv(con.PuttySession))
.Append(FormatForCsv(con.Port))
.Append(FormatForCsv(con.UseConsoleSession))
.Append(FormatForCsv(con.UseCredSsp))
.Append(FormatForCsv(con.UseVmId))
.Append(FormatForCsv(con.UseEnhancedMode))
.Append(FormatForCsv(con.RenderingEngine))
.Append(FormatForCsv(con.ICAEncryptionStrength))
.Append(FormatForCsv(con.RDPAuthenticationLevel))
@@ -198,6 +199,7 @@ namespace mRemoteNG.Config.Serializers.Csv
.Append(FormatForCsv(con.Inheritance.UseConsoleSession))
.Append(FormatForCsv(con.Inheritance.UseCredSsp))
.Append(FormatForCsv(con.Inheritance.UseVmId))
.Append(FormatForCsv(con.Inheritance.UseEnhancedMode))
.Append(FormatForCsv(con.Inheritance.VmId))
.Append(FormatForCsv(con.Inheritance.RenderingEngine))
.Append(FormatForCsv(con.Inheritance.Username))

View File

@@ -14,7 +14,6 @@ using System.Data;
using System.Linq;
using System.Security;
using mRemoteNG.Security;
using mRemoteNG.Security.SymmetricEncryption;
using mRemoteNG.Tools;
namespace mRemoteNG.Config.Serializers.MsSql
@@ -90,6 +89,7 @@ namespace mRemoteNG.Config.Serializers.MsSql
connectionInfo.Password = DecryptValue((string)dataRow["Password"]);
connectionInfo.Hostname = (string)dataRow["Hostname"];
connectionInfo.VmId = (string)dataRow["VmId"];
connectionInfo.UseEnhancedMode = (bool)dataRow["UseEnhancedMode"];
connectionInfo.Protocol = (ProtocolType)Enum.Parse(typeof(ProtocolType), (string)dataRow["Protocol"]);
connectionInfo.PuttySession = (string)dataRow["PuttySession"];
connectionInfo.Port = (int)dataRow["Port"];
@@ -196,6 +196,7 @@ namespace mRemoteNG.Config.Serializers.MsSql
connectionInfo.Inheritance.UseConsoleSession = (bool)dataRow["InheritUseConsoleSession"];
connectionInfo.Inheritance.UseCredSsp = (bool)dataRow["InheritUseCredSsp"];
connectionInfo.Inheritance.UseVmId = (bool)dataRow["InheritUseVmId"];
connectionInfo.Inheritance.UseEnhancedMode = (bool)dataRow["InheritUseEnhancedMode"];
connectionInfo.Inheritance.VmId = (bool)dataRow["InheritVmId"];
connectionInfo.Inheritance.RenderingEngine = (bool)dataRow["InheritRenderingEngine"];
connectionInfo.Inheritance.Username = (bool)dataRow["InheritUsername"];

View File

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

View File

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

View File

@@ -47,6 +47,7 @@ namespace mRemoteNG.Config.Serializers.Xml
element.Add(new XAttribute("Name", connectionInfo.Name));
element.Add(new XAttribute("VmId", connectionInfo.VmId));
element.Add(new XAttribute("UseVmId", connectionInfo.UseVmId));
element.Add(new XAttribute("UseEnhancedMode", connectionInfo.UseVmId));
element.Add(new XAttribute("Type", connectionInfo.GetTreeNodeType().ToString()));
if (nodeAsContainer != null)
element.Add(new XAttribute("Expanded", nodeAsContainer.IsExpanded.ToString().ToLowerInvariant()));
@@ -296,6 +297,8 @@ namespace mRemoteNG.Config.Serializers.Xml
connectionInfo.Inheritance.VmId.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritUseVmId",
connectionInfo.Inheritance.UseVmId.ToString().ToLowerInvariant()));
element.Add(new XAttribute("InheritUseEnhancedMode",
connectionInfo.Inheritance.UseEnhancedMode.ToString().ToLowerInvariant()));
}
else
{

View File

@@ -542,12 +542,14 @@ namespace mRemoteNG.Config.Serializers.Xml
connectionInfo.Favorite = xmlnode.GetAttributeAsBool("Favorite");
connectionInfo.UseVmId = xmlnode.GetAttributeAsBool("UseVmId");
connectionInfo.VmId = xmlnode.GetAttributeAsString("VmId");
connectionInfo.UseEnhancedMode = xmlnode.GetAttributeAsBool("UseEnhancedMode");
connectionInfo.Inheritance.RedirectClipboard = xmlnode.GetAttributeAsBool("InheritRedirectClipboard");
connectionInfo.Inheritance.Favorite = xmlnode.GetAttributeAsBool("InheritFavorite");
connectionInfo.RdpVersion = xmlnode.GetAttributeAsEnum("RdpVersion", RdpVersion.Highest);
connectionInfo.Inheritance.RdpVersion = xmlnode.GetAttributeAsBool("InheritRdpVersion");
connectionInfo.Inheritance.UseVmId = xmlnode.GetAttributeAsBool("InheritUseVmId");
connectionInfo.Inheritance.VmId = xmlnode.GetAttributeAsBool("InheritVmId");
connectionInfo.Inheritance.UseEnhancedMode = xmlnode.GetAttributeAsBool("InheritUseEnhancedMode");
}
}
catch (Exception ex)

View File

@@ -1,5 +1,6 @@
using System;
using System.Xml;
using System.Xml.Linq;
namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
{
@@ -44,5 +45,45 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
? valueAsEnum
: defaultValue;
}
public static string GetChildElementAsString(this XElement xmlNode, string elementName, string defaultValue = "")
{
var value = xmlNode?.Element(elementName)?.Value;
return value ?? defaultValue;
}
public static bool GetChildElementAsBool(this XElement xmlNode, string elementName, bool defaultValue = false)
{
var value = xmlNode?.GetChildElementAsString(elementName);
if (string.IsNullOrWhiteSpace(value))
return defaultValue;
return bool.TryParse(value, out var valueAsBool)
? valueAsBool
: defaultValue;
}
public static int GetChildElementAsInt(this XElement xmlNode, string elementName, int defaultValue = 0)
{
var value = xmlNode?.GetChildElementAsString(elementName);
if (string.IsNullOrWhiteSpace(value))
return defaultValue;
return int.TryParse(value, out var valueAsBool)
? valueAsBool
: defaultValue;
}
public static T GetChildElementAsEnum<T>(this XElement xmlNode, string elementName, T defaultValue = default(T))
where T : struct
{
var value = xmlNode?.GetChildElementAsString(elementName);
if (string.IsNullOrWhiteSpace(value))
return defaultValue;
return Enum.TryParse<T>(value, true, out var valueAsEnum)
? valueAsEnum
: defaultValue;
}
}
}

View File

@@ -80,7 +80,8 @@ namespace mRemoteNG.Config.Serializers
}
catch (Exception ex)
{
Runtime.MessageCollector.AddExceptionMessage("Config.Import.ActiveDirectory.ImportComputers() failed.", ex);
Runtime.MessageCollector.AddExceptionMessage("Config.Import.ActiveDirectory.ImportComputers() failed.",
ex);
}
}
@@ -97,6 +98,8 @@ namespace mRemoteNG.Config.Serializers
Description = description,
Protocol = ProtocolType.RDP
};
newConnectionInfo.Inheritance.TurnOnInheritanceCompletely();
newConnectionInfo.Inheritance.Description = false;
parentContainer.AddChild(newConnectionInfo);
}

View File

@@ -0,0 +1,366 @@
using System;
using System.Text.RegularExpressions;
using System.Xml.Linq;
using mRemoteNG.Config.Serializers.ConnectionSerializers.Xml;
using mRemoteNG.Connection;
using mRemoteNG.Connection.Protocol;
using mRemoteNG.Connection.Protocol.Http;
using mRemoteNG.Connection.Protocol.RDP;
using mRemoteNG.Connection.Protocol.VNC;
using mRemoteNG.Tree;
using mRemoteNG.Tree.Root;
namespace mRemoteNG.Config.Serializers.MiscSerializers
{
public class RemoteDesktopManagerDeserializer : IDeserializer<string, ConnectionTreeModel>
{
public ConnectionTreeModel Deserialize(string serializedData)
{
var connectionTreeModel = new ConnectionTreeModel();
var root = new RootNodeInfo(RootNodeType.Connection);
connectionTreeModel.AddRootNode(root);
var xdoc = XDocument.Parse(serializedData);
var descendants = xdoc.Root.Descendants("Connection");
foreach (var descendant in descendants)
{
var connection = CreateConnectionFromXml(descendant);
root.AddChild(connection);
}
return connectionTreeModel;
}
private ConnectionInfo CreateConnectionFromXml(XElement xml)
{
var protocol = ParseProtocol(xml);
var protocolSpecificNode = GetProtocolSpecificNode(xml, protocol);
var metaInfoNode = xml.Element("MetaInformation");
var connectionId = xml.GetChildElementAsString("ID", Guid.NewGuid().ToString());
var connection = new ConnectionInfo(connectionId)
{
Name = xml.GetChildElementAsString("Name"),
Protocol = protocol,
Description = xml.GetChildElementAsString("Description"),
Username = protocolSpecificNode.GetChildElementAsString("UserName",
protocolSpecificNode.GetChildElementAsString("Username",
protocolSpecificNode.GetChildElementAsString("MsUser"))),
Domain = protocolSpecificNode.GetChildElementAsString("Domain",
protocolSpecificNode.GetChildElementAsString("MsDomain")),
Password = protocolSpecificNode.GetChildElementAsString("SafePassword"),
Resolution = ParseResolution(xml),
AutomaticResize = protocolSpecificNode.GetChildElementAsString("ScreenSizingMode") == "AutoScale",
RedirectSound = ParseSoundRedirection(xml),
Colors = ParseScreenColors(xml),
CacheBitmaps = !xml.GetChildElementAsBool("DisableBitmapCache"),
DisplayThemes = !xml.GetChildElementAsBool("DisableThemes"),
DisplayWallpaper = !xml.GetChildElementAsBool("DisableWallpaper"),
EnableDesktopComposition = xml.GetChildElementAsBool("DesktopComposition"),
EnableFontSmoothing = xml.GetChildElementAsBool("FontSmoothing"),
RedirectAudioCapture = protocolSpecificNode.GetChildElementAsBool("AudioCaptureRedirectionMode"),
RedirectClipboard = xml.GetChildElementAsBool("UsesClipboard", DefaultConnectionInfo.Instance.RedirectClipboard),
RedirectDiskDrives = xml.GetChildElementAsBool("UsesHardDrives", DefaultConnectionInfo.Instance.RedirectDiskDrives),
RedirectPrinters = xml.GetChildElementAsBool("UsesPrinters", DefaultConnectionInfo.Instance.RedirectPrinters),
RedirectPorts = xml.GetChildElementAsBool("UsesSerialPorts", DefaultConnectionInfo.Instance.RedirectPorts),
RedirectSmartCards = xml.GetChildElementAsBool("UsesSmartDevices", DefaultConnectionInfo.Instance.RedirectSmartCards),
RDPMinutesToIdleTimeout = xml.GetChildElementAsInt("AutomaticallyCloseInterval"),
MacAddress = metaInfoNode.GetChildElementAsString("MAC"),
RdpVersion = ParseRdpVersion(protocolSpecificNode),
RedirectKeys = xml.GetChildElementAsString("KeyboardHook") == "OnTheRemoteComputer",
UseConsoleSession = xml.GetChildElementAsBool("Console"),
RDPAuthenticationLevel = ParseAuthenticationLevel(xml),
UseCredSsp = protocolSpecificNode.GetChildElementAsBool("EnableCredSSPSupport"),
RDGatewayUsageMethod = ParseRdpGatewayUsageMethod(protocolSpecificNode),
RDGatewayHostname = protocolSpecificNode.GetChildElementAsString("GatewayHostname"),
UseEnhancedMode = protocolSpecificNode.GetChildElementAsBool("UseEnhancedSessionMode"),
UseVmId = protocolSpecificNode.GetChildElementAsString("RDPType") == "HyperV",
VmId = protocolSpecificNode.GetChildElementAsString("HyperVInstanceID"),
VNCEncoding = ParseVncEncoding(protocolSpecificNode),
VNCCompression = ParseVncCompressionLevel(protocolSpecificNode),
VNCAuthMode = DetermineVncAuthMode(protocolSpecificNode),
VNCViewOnly = protocolSpecificNode.GetChildElementAsBool("ViewOnly"),
RenderingEngine = ParseWebRenderingEngine(xml),
};
SetHostnameAndPort(connection, xml, protocolSpecificNode);
SetRdpGatewayCredentials(connection, protocolSpecificNode);
SetVncProxyHostAndPort(connection, protocolSpecificNode);
return connection;
}
private ProtocolType ParseProtocol(XElement xml)
{
switch (xml.GetChildElementAsString("ConnectionType"))
{
case "RDPConfigured":
return ProtocolType.RDP;
case "SSHShell":
return ProtocolType.SSH2;
case "VNC":
return ProtocolType.VNC;
case "Telnet":
return ProtocolType.Telnet;
case "WebBrowser":
return xml.GetChildElementAsString("WebBrowserUrl").StartsWith("http://")
? ProtocolType.HTTP
: ProtocolType.HTTPS;
default:
throw new Exception();
}
}
private XElement GetProtocolSpecificNode(XElement xml, ProtocolType protocol)
{
switch (protocol)
{
case ProtocolType.RDP:
return xml.Element("RDP");
case ProtocolType.SSH1:
case ProtocolType.SSH2:
case ProtocolType.Telnet:
return xml.Element("Terminal");
case ProtocolType.VNC:
return xml.Element("VNC");
case ProtocolType.HTTP:
case ProtocolType.HTTPS:
return xml.Element("Web");
default:
throw new Exception();
}
}
private void SetHostnameAndPort(ConnectionInfo connection, XElement xml, XElement protocolSpecificNode)
{
var urlElement = xml.Element("Url") ?? xml.Element("WebBrowserUrl");
if (urlElement != null)
{
var urlRegex = new Regex(@"((?<protocol>https?)://)?(?<host>[\w\.]+):?(?<port>\d*)");
var urlMatch = urlRegex.Match(urlElement.Value);
connection.Hostname = urlMatch.Groups["host"]?.Value ?? string.Empty;
if (int.TryParse(urlMatch.Groups["port"]?.Value, out var port))
{
connection.Port = port;
}
}
else
{
connection.Hostname = protocolSpecificNode.GetChildElementAsString("Host");
if (protocolSpecificNode.Element("HostPort") != null)
{
connection.Port = protocolSpecificNode.GetChildElementAsInt("HostPort");
}
if (protocolSpecificNode.Element("Port") != null)
{
connection.Port = protocolSpecificNode.GetChildElementAsInt("Port");
}
}
}
private RDPResolutions ParseResolution(XElement xml)
{
var resolution = xml.GetChildElementAsString("ScreenSize");
// attempt to convert "R800x600" style descriptors
// to our "Res800x600" style enum
if (resolution.StartsWith("R"))
{
var fixedResolution = resolution.Replace("R", "Res");
if (Enum.TryParse<RDPResolutions>(fixedResolution, out var convertedRes))
{
return convertedRes;
}
}
switch (resolution)
{
case "FullScreen":
return RDPResolutions.Fullscreen;
case "CurrentWorkAreaSize":
case "CurrentScreenSize":
return RDPResolutions.FitToWindow;
}
switch (xml.GetChildElementAsString("ScreenSizingMode"))
{
// This is confusing, but what they show as "Smart sizing" in the UI
// gets serialized to FitToWindow in the xml.
case "FitToWindow":
return RDPResolutions.SmartSize;
}
return DefaultConnectionInfo.Instance.Resolution;
}
private RDPSounds ParseSoundRedirection(XElement xml)
{
switch (xml.GetChildElementAsString("SoundHook"))
{
case "LeaveAtRemoteComputer":
return RDPSounds.LeaveAtRemoteComputer;
case "DoNotPlay":
return RDPSounds.DoNotPlay;
default: // there is no xml element when set to BringToThisComputer
return RDPSounds.BringToThisComputer;
}
}
private RDPColors ParseScreenColors(XElement xml)
{
switch (xml.GetChildElementAsString("ScreenColor"))
{
case "C15Bits":
return RDPColors.Colors15Bit;
case "C16Bits":
return RDPColors.Colors16Bit;
case "C24Bits":
return RDPColors.Colors24Bit;
case "C32Bits":
return RDPColors.Colors32Bit;
case "C256":
return RDPColors.Colors256;
default:
return DefaultConnectionInfo.Instance.Colors;
}
}
private RdpVersion ParseRdpVersion(XElement xml)
{
switch (xml.GetChildElementAsString("Version"))
{
case "RDP50":
case "RDP60":
case "RDP61":
return RdpVersion.Rdc6;
case "RDP70":
return RdpVersion.Rdc7;
case "RDP80":
case "RDP81":
return RdpVersion.Rdc8;
default: // no xml node = use latest
return RdpVersion.Highest;
}
}
private AuthenticationLevel ParseAuthenticationLevel(XElement xml)
{
switch (xml.GetChildElementAsString("AuthentificationLevel"))
{
case "WarnMe":
return AuthenticationLevel.WarnOnFailedAuth;
case "DontConnect":
return AuthenticationLevel.AuthRequired;
default: // "Connect and don't warn me"
return AuthenticationLevel.NoAuth;
}
}
private RDGatewayUsageMethod ParseRdpGatewayUsageMethod(XElement xml)
{
switch (xml.GetChildElementAsString("GatewayUsageMethod"))
{
case "ModeDirect":
return RDGatewayUsageMethod.Always;
case "NoneDetect":
return RDGatewayUsageMethod.Never;
default: // no xml node = detect
return RDGatewayUsageMethod.Detect;
}
}
private void SetRdpGatewayCredentials(ConnectionInfo connection, XElement xml)
{
if (xml.GetChildElementAsString("GatewayCredentialsSource") == "Smartcard")
{
connection.RDGatewayUseConnectionCredentials = RDGatewayUseConnectionCredentials.SmartCard;
}
else
{
connection.RDGatewayUseConnectionCredentials =
xml.GetChildElementAsBool("PromptCredentialOnce")
? RDGatewayUseConnectionCredentials.Yes
: RDGatewayUseConnectionCredentials.No;
}
connection.RDGatewayUsername = xml.GetChildElementAsString("GatewayUserName");
connection.RDGatewayDomain = xml.GetChildElementAsString("GatewayDomain");
connection.RDGatewayPassword = xml.GetChildElementAsString("GatewaySafePassword");
}
private ProtocolVNC.Encoding ParseVncEncoding(XElement xml)
{
switch (xml.GetChildElementAsString("PreferredEncoding"))
{
case "CoRRE":
return ProtocolVNC.Encoding.EncCorre;
case "Hextile":
return ProtocolVNC.Encoding.EncHextile;
case "Raw":
return ProtocolVNC.Encoding.EncRaw;
case "RRE":
return ProtocolVNC.Encoding.EncRRE;
case "Tight":
return ProtocolVNC.Encoding.EncTight;
case "Zlib":
return ProtocolVNC.Encoding.EncZlib;
case "ZlibHEX":
return ProtocolVNC.Encoding.EncZLibHex;
case "ZRLE":
return ProtocolVNC.Encoding.EncZRLE;
default:
return DefaultConnectionInfo.Instance.VNCEncoding;
}
}
private ProtocolVNC.Compression ParseVncCompressionLevel(XElement xml)
{
var compressionXml = xml.GetChildElementAsString("CustomCompressionLevel");
return Enum.TryParse<ProtocolVNC.Compression>("Comp" + compressionXml, out var compression)
? compression
: DefaultConnectionInfo.Instance.VNCCompression;
}
private ProtocolVNC.AuthMode DetermineVncAuthMode(XElement xml)
{
return xml.Element("MsUser") != null
? ProtocolVNC.AuthMode.AuthWin
: ProtocolVNC.AuthMode.AuthVNC;
}
private void SetVncProxyHostAndPort(ConnectionInfo connection, XElement xml)
{
var proxy = xml.GetChildElementAsString("ProxyHost").Split(':');
if (proxy.Length >= 1)
{
connection.VNCProxyIP = proxy[0];
}
if (proxy.Length >= 2 && int.TryParse(proxy[1], out var port))
{
connection.VNCProxyPort = port;
}
}
private HTTPBase.RenderingEngine ParseWebRenderingEngine(XElement xml)
{
if (xml.GetChildElementAsString("ConnectionType") != "WebBrowser")
return DefaultConnectionInfo.Instance.RenderingEngine;
switch (xml.GetChildElementAsString("ConnectionSubType"))
{
case "IE":
return HTTPBase.RenderingEngine.IE;
case "FireFox":
return HTTPBase.RenderingEngine.Gecko;
default:
return DefaultConnectionInfo.Instance.RenderingEngine;
}
}
}
}

View File

@@ -37,6 +37,7 @@ namespace mRemoteNG.Config.Serializers.Versioning
new SqlVersion24To25Upgrader(_databaseConnector),
new SqlVersion25To26Upgrader(_databaseConnector),
new SqlVersion26To27Upgrader(_databaseConnector),
new SqlVersion27To28Upgrader(_databaseConnector),
};
foreach (var upgrader in dbUpgraders)
@@ -48,7 +49,7 @@ namespace mRemoteNG.Config.Serializers.Versioning
}
// DB is at the highest current supported version
if (databaseVersion.CompareTo(new Version(2, 7)) == 0)
if (databaseVersion.CompareTo(new Version(2, 8)) == 0)
isVerified = true;
if (isVerified == false)

View File

@@ -29,8 +29,10 @@ ADD RedirectClipboard bit NOT NULL DEFAULT 0,
InheritRedirectClipboard bit NOT NULL DEFAULT 0,
VmId varchar NOT NULL DEFAULT 0,
UseVmId bit NOT NULL DEFAULT 0,
UseEnhancedMode bit NOT NULL DEFAULT 0,
InheritVmId bit NOT NULL DEFAULT 0,
InheritUseVmId bit NOT NULL DEFAULT 0;
InheritUseVmId bit NOT NULL DEFAULT 0,
InheritUseEnhancedMode bit NOT NULL DEFAULT 0;
UPDATE tblRoot
SET ConfVersion='2.7'";
var dbCommand = _databaseConnector.DbCommand(sqlText);

View File

@@ -0,0 +1,64 @@
using mRemoteNG.App;
using mRemoteNG.Config.DatabaseConnectors;
using mRemoteNG.Messages;
using System;
using System.Data.Common;
namespace mRemoteNG.Config.Serializers.Versioning
{
public class SqlVersion27To28Upgrader : IVersionUpgrader
{
private readonly IDatabaseConnector _databaseConnector;
public SqlVersion27To28Upgrader(IDatabaseConnector databaseConnector)
{
_databaseConnector = databaseConnector ?? throw new ArgumentNullException(nameof(databaseConnector));
}
public bool CanUpgrade(Version currentVersion)
{
return currentVersion.CompareTo(new Version(2, 7)) == 0;
}
public Version Upgrade()
{
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg,
"Upgrading database from version 2.7 to version 2.8.");
const string mySqlText = @"
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;
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 = @"
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.ExecuteNonQuery();
dbCommand = _databaseConnector.DbCommand(msSqlText2);
} else if (_databaseConnector.GetType() == typeof(MySqlDatabaseConnector))
{
dbCommand = _databaseConnector.DbCommand(mySqlText);
} else
{
throw new Exception("Unknow database backend");
}
dbCommand.ExecuteNonQuery();
return new Version(2, 8);
}
}
}

View File

@@ -25,6 +25,7 @@ namespace mRemoteNG.Connection
private string _password = "";
private string _domain = "";
private string _vmId = "";
private bool _useEnhancedMode;
private ProtocolType _protocol;
private RdpVersion _rdpProtocolVersion;
@@ -91,37 +92,37 @@ namespace mRemoteNG.Connection
#region Display
[LocalizedAttributes.LocalizedCategory("strCategoryDisplay"),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameName"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionName")]
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryDisplay)),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameName)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionName))]
public virtual string Name
{
get => _name;
set => SetField(ref _name, value, "Name");
}
[LocalizedAttributes.LocalizedCategory("strCategoryDisplay"),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameDescription"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionDescription")]
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryDisplay)),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameDescription)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionDescription))]
public virtual string Description
{
get => GetPropertyValue("Description", _description);
set => SetField(ref _description, value, "Description");
}
[LocalizedAttributes.LocalizedCategory("strCategoryDisplay"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryDisplay)),
TypeConverter(typeof(ConnectionIcon)),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameIcon"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionIcon")]
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameIcon)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionIcon))]
public virtual string Icon
{
get => GetPropertyValue("Icon", _icon);
set => SetField(ref _icon, value, "Icon");
}
[LocalizedAttributes.LocalizedCategory("strCategoryDisplay"),
LocalizedAttributes.LocalizedDisplayName("strPropertyNamePanel"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionPanel")]
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryDisplay)),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNamePanel)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionPanel))]
public virtual string Panel
{
get => GetPropertyValue("Panel", _panel);
@@ -132,9 +133,9 @@ namespace mRemoteNG.Connection
#region Connection
[LocalizedAttributes.LocalizedCategory("strCategoryConnection", 2),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameAddress"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionAddress"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryConnection), 2),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameAddress)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionAddress)),
UsedInAllProtocolsExcept()]
public virtual string Hostname
{
@@ -142,9 +143,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _hostname, value?.Trim(), "Hostname");
}
[LocalizedAttributes.LocalizedCategory("strCategoryConnection", 2),
LocalizedAttributes.LocalizedDisplayName("strPropertyNamePort"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionPort"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryConnection), 2),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNamePort)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionPort)),
UsedInAllProtocolsExcept(ProtocolType.ICA)]
public virtual int Port
{
@@ -152,9 +153,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _port, value, "Port");
}
[LocalizedAttributes.LocalizedCategory("strCategoryConnection", 2),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameUsername"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionUsername"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryConnection), 2),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameUsername)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionUsername)),
UsedInAllProtocolsExcept(ProtocolType.VNC, ProtocolType.Telnet, ProtocolType.Rlogin, ProtocolType.RAW)]
public virtual string Username
{
@@ -162,9 +163,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _username, Settings.Default.DoNotTrimUsername ? value : value?.Trim(), "Username");
}
[LocalizedAttributes.LocalizedCategory("strCategoryConnection", 2),
LocalizedAttributes.LocalizedDisplayName("strPropertyNamePassword"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionPassword"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryConnection), 2),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNamePassword)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionPassword)),
PasswordPropertyText(true),
UsedInAllProtocolsExcept(ProtocolType.Telnet, ProtocolType.Rlogin, ProtocolType.RAW)]
public virtual string Password
@@ -173,19 +174,19 @@ namespace mRemoteNG.Connection
set => SetField(ref _password, value, "Password");
}
[LocalizedAttributes.LocalizedCategory("strCategoryConnection", 2),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameDomain"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionDomain"),
UsedInProtocol(ProtocolType.RDP, ProtocolType.ICA, ProtocolType.IntApp)]
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryConnection), 2),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameDomain)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionDomain)),
UsedInProtocol(ProtocolType.RDP, ProtocolType.ICA, ProtocolType.IntApp, ProtocolType.PowerShell)]
public string Domain
{
get => GetPropertyValue("Domain", _domain).Trim();
set => SetField(ref _domain, value?.Trim(), "Domain");
}
[LocalizedAttributes.LocalizedCategory("strCategoryConnection", 2),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameVmId"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionVmId"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryConnection), 2),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameVmId)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionVmId)),
UsedInProtocol(ProtocolType.RDP)]
public string VmId
{
@@ -197,9 +198,9 @@ namespace mRemoteNG.Connection
#region Protocol
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 3),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameProtocol"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionProtocol"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 3),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameProtocol)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionProtocol)),
TypeConverter(typeof(MiscTools.EnumTypeConverter))]
public virtual ProtocolType Protocol
{
@@ -207,20 +208,20 @@ namespace mRemoteNG.Connection
set => SetField(ref _protocol, value, "Protocol");
}
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 3),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRdpVersion"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRdpVersion"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 3),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameRdpVersion)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionRdpVersion)),
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
UsedInProtocol(ProtocolType.RDP)]
public virtual RdpVersion RdpVersion
{
get => GetPropertyValue(nameof(RdpVersion), _rdpProtocolVersion);
get => GetPropertyValue("RdpVersion", _rdpProtocolVersion);
set => SetField(ref _rdpProtocolVersion, value, nameof(RdpVersion));
}
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 3),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameExternalTool"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionExternalTool"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 3),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameExternalTool)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionExternalTool)),
TypeConverter(typeof(ExternalToolsTypeConverter)),
UsedInProtocol(ProtocolType.IntApp)]
public string ExtApp
@@ -229,9 +230,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _extApp, value, "ExtApp");
}
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 3),
LocalizedAttributes.LocalizedDisplayName("strPropertyNamePuttySession"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionPuttySession"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 3),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNamePuttySession)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionPuttySession)),
TypeConverter(typeof(Config.Putty.PuttySessionsManager.SessionList)),
UsedInProtocol(ProtocolType.SSH1, ProtocolType.SSH2, ProtocolType.Telnet,
ProtocolType.RAW, ProtocolType.Rlogin)]
@@ -241,9 +242,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _puttySession, value, "PuttySession");
}
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 3),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameEncryptionStrength"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionEncryptionStrength"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 3),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameEncryptionStrength)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionEncryptionStrength)),
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
UsedInProtocol(ProtocolType.ICA)]
public IcaProtocol.EncryptionStrength ICAEncryptionStrength
@@ -252,9 +253,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _icaEncryption, value, "ICAEncryptionStrength");
}
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 3),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameUseConsoleSession"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionUseConsoleSession"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 3),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameUseConsoleSession)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionUseConsoleSession)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
UsedInProtocol(ProtocolType.RDP)]
public bool UseConsoleSession
@@ -263,9 +264,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _useConsoleSession, value, "UseConsoleSession");
}
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 3),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameAuthenticationLevel"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionAuthenticationLevel"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 3),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameAuthenticationLevel)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionAuthenticationLevel)),
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
UsedInProtocol(ProtocolType.RDP)]
public AuthenticationLevel RDPAuthenticationLevel
@@ -274,9 +275,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _rdpAuthenticationLevel, value, "RDPAuthenticationLevel");
}
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 3),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRDPMinutesToIdleTimeout"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRDPMinutesToIdleTimeout"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 3),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameRDPMinutesToIdleTimeout)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionRDPMinutesToIdleTimeout)),
UsedInProtocol(ProtocolType.RDP)]
public virtual int RDPMinutesToIdleTimeout
{
@@ -291,9 +292,9 @@ namespace mRemoteNG.Connection
}
}
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 3),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRDPAlertIdleTimeout"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRDPAlertIdleTimeout"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 3),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameRDPAlertIdleTimeout)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionRDPAlertIdleTimeout)),
UsedInProtocol(ProtocolType.RDP)]
public bool RDPAlertIdleTimeout
{
@@ -301,9 +302,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _rdpAlertIdleTimeout, value, "RDPAlertIdleTimeout");
}
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 3),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameLoadBalanceInfo"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionLoadBalanceInfo"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 3),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameLoadBalanceInfo)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionLoadBalanceInfo)),
UsedInProtocol(ProtocolType.RDP)]
public string LoadBalanceInfo
{
@@ -311,9 +312,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _loadBalanceInfo, value?.Trim(), "LoadBalanceInfo");
}
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 3),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRenderingEngine"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRenderingEngine"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 3),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameRenderingEngine)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionRenderingEngine)),
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
UsedInProtocol(ProtocolType.HTTP, ProtocolType.HTTPS)]
public HTTPBase.RenderingEngine RenderingEngine
@@ -322,9 +323,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _renderingEngine, value, "RenderingEngine");
}
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 3),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameUseCredSsp"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionUseCredSsp"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 3),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameUseCredSsp)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionUseCredSsp)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
UsedInProtocol(ProtocolType.RDP)]
public bool UseCredSsp
@@ -333,9 +334,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _useCredSsp, value, "UseCredSsp");
}
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 3),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameUseVmId"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionUseVmId"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 3),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameUseVmId)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionUseVmId)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
UsedInProtocol(ProtocolType.RDP)]
public bool UseVmId
@@ -344,13 +345,23 @@ namespace mRemoteNG.Connection
set => SetField(ref _useVmId, value, "UseVmId");
}
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 3),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameUseEnhancedMode)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionUseEnhancedMode)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
UsedInProtocol(ProtocolType.RDP)]
public bool UseEnhancedMode
{
get => GetPropertyValue("UseEnhancedMode", _useEnhancedMode);
set => SetField(ref _useEnhancedMode, value, "UseEnhancedMode");
}
#endregion
#region RD Gateway
[LocalizedAttributes.LocalizedCategory("strCategoryGateway", 4),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRDGatewayUsageMethod"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRDGatewayUsageMethod"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryGateway), 4),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameRDGatewayUsageMethod)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionRDGatewayUsageMethod)),
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
UsedInProtocol(ProtocolType.RDP)]
public RDGatewayUsageMethod RDGatewayUsageMethod
@@ -359,9 +370,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _rdGatewayUsageMethod, value, "RDGatewayUsageMethod");
}
[LocalizedAttributes.LocalizedCategory("strCategoryGateway", 4),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRDGatewayHostname"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRDGatewayHostname"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryGateway), 4),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameRDGatewayHostname)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionRDGatewayHostname)),
UsedInProtocol(ProtocolType.RDP)]
public string RDGatewayHostname
{
@@ -369,9 +380,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _rdGatewayHostname, value?.Trim(), "RDGatewayHostname");
}
[LocalizedAttributes.LocalizedCategory("strCategoryGateway", 4),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRDGatewayUseConnectionCredentials"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRDGatewayUseConnectionCredentials"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryGateway), 4),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameRDGatewayUseConnectionCredentials)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionRDGatewayUseConnectionCredentials)),
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
UsedInProtocol(ProtocolType.RDP)]
public RDGatewayUseConnectionCredentials RDGatewayUseConnectionCredentials
@@ -380,9 +391,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _rdGatewayUseConnectionCredentials, value, "RDGatewayUseConnectionCredentials");
}
[LocalizedAttributes.LocalizedCategory("strCategoryGateway", 4),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRDGatewayUsername"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRDGatewayUsername"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryGateway), 4),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameRDGatewayUsername)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionRDGatewayUsername)),
UsedInProtocol(ProtocolType.RDP)]
public string RDGatewayUsername
{
@@ -390,9 +401,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _rdGatewayUsername, value?.Trim(), "RDGatewayUsername");
}
[LocalizedAttributes.LocalizedCategory("strCategoryGateway", 4),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRDGatewayPassword"),
LocalizedAttributes.LocalizedDescription("strPropertyNameRDGatewayPassword"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryGateway), 4),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameRDGatewayPassword)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyNameRDGatewayPassword)),
PasswordPropertyText(true),
UsedInProtocol(ProtocolType.RDP)]
public string RDGatewayPassword
@@ -401,9 +412,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _rdGatewayPassword, value, "RDGatewayPassword");
}
[LocalizedAttributes.LocalizedCategory("strCategoryGateway", 4),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRDGatewayDomain"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRDGatewayDomain"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryGateway), 4),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameRDGatewayDomain)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionRDGatewayDomain)),
UsedInProtocol(ProtocolType.RDP)]
public string RDGatewayDomain
{
@@ -415,9 +426,9 @@ namespace mRemoteNG.Connection
#region Appearance
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 5),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameResolution"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionResolution"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryAppearance), 5),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameResolution)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionResolution)),
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
UsedInProtocol(ProtocolType.RDP, ProtocolType.ICA)]
public RDPResolutions Resolution
@@ -426,9 +437,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _resolution, value, "Resolution");
}
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 5),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameAutomaticResize"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionAutomaticResize"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryAppearance), 5),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameAutomaticResize)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionAutomaticResize)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
UsedInProtocol(ProtocolType.RDP)]
public bool AutomaticResize
@@ -437,9 +448,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _automaticResize, value, "AutomaticResize");
}
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 5),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameColors"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionColors"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryAppearance), 5),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameColors)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionColors)),
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
UsedInProtocol(ProtocolType.RDP, ProtocolType.ICA)]
public RDPColors Colors
@@ -448,9 +459,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _colors, value, "Colors");
}
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 5),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameCacheBitmaps"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionCacheBitmaps"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryAppearance), 5),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameCacheBitmaps)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionCacheBitmaps)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
UsedInProtocol(ProtocolType.RDP, ProtocolType.ICA)]
public bool CacheBitmaps
@@ -459,9 +470,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _cacheBitmaps, value, "CacheBitmaps");
}
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 5),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameDisplayWallpaper"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionDisplayWallpaper"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryAppearance), 5),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameDisplayWallpaper)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionDisplayWallpaper)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
UsedInProtocol(ProtocolType.RDP)]
public bool DisplayWallpaper
@@ -470,9 +481,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _displayWallpaper, value, "DisplayWallpaper");
}
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 5),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameDisplayThemes"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionDisplayThemes"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryAppearance), 5),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameDisplayThemes)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionDisplayThemes)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
UsedInProtocol(ProtocolType.RDP)]
public bool DisplayThemes
@@ -481,9 +492,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _displayThemes, value, "DisplayThemes");
}
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 5),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameEnableFontSmoothing"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionEnableFontSmoothing"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryAppearance), 5),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameEnableFontSmoothing)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionEnableFontSmoothing)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
UsedInProtocol(ProtocolType.RDP)]
public bool EnableFontSmoothing
@@ -492,9 +503,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _enableFontSmoothing, value, "EnableFontSmoothing");
}
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 5),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameEnableDesktopComposition"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionEnableDesktopComposition"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryAppearance), 5),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameEnableDesktopComposition)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionEnableDesktopComposition)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
UsedInProtocol(ProtocolType.RDP)]
public bool EnableDesktopComposition
@@ -507,9 +518,9 @@ namespace mRemoteNG.Connection
#region Redirect
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 6),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRedirectKeys"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRedirectKeys"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryRedirect), 6),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameRedirectKeys)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionRedirectKeys)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
UsedInProtocol(ProtocolType.RDP)]
public bool RedirectKeys
@@ -518,9 +529,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _redirectKeys, value, "RedirectKeys");
}
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 6),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRedirectDrives"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRedirectDrives"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryRedirect), 6),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameRedirectDrives)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionRedirectDrives)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
UsedInProtocol(ProtocolType.RDP)]
public bool RedirectDiskDrives
@@ -529,9 +540,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _redirectDiskDrives, value, "RedirectDiskDrives");
}
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 6),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRedirectPrinters"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRedirectPrinters"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryRedirect), 6),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameRedirectPrinters)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionRedirectPrinters)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
UsedInProtocol(ProtocolType.RDP)]
public bool RedirectPrinters
@@ -540,9 +551,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _redirectPrinters, value, "RedirectPrinters");
}
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 6),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRedirectClipboard"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRedirectClipboard"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryRedirect), 6),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameRedirectClipboard)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionRedirectClipboard)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
UsedInProtocol(ProtocolType.RDP)]
public bool RedirectClipboard
@@ -552,9 +563,9 @@ namespace mRemoteNG.Connection
}
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 6),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRedirectPorts"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRedirectPorts"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryRedirect), 6),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameRedirectPorts)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionRedirectPorts)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
UsedInProtocol(ProtocolType.RDP)]
public bool RedirectPorts
@@ -563,9 +574,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _redirectPorts, value, "RedirectPorts");
}
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 6),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRedirectSmartCards"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRedirectSmartCards"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryRedirect), 6),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameRedirectSmartCards)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionRedirectSmartCards)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
UsedInProtocol(ProtocolType.RDP)]
public bool RedirectSmartCards
@@ -574,9 +585,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _redirectSmartCards, value, "RedirectSmartCards");
}
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 6),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRedirectSounds"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRedirectSounds"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryRedirect), 6),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameRedirectSounds)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionRedirectSounds)),
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
UsedInProtocol(ProtocolType.RDP)]
public RDPSounds RedirectSound
@@ -585,9 +596,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _redirectSound, value, "RedirectSound");
}
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 6),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameSoundQuality"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionSoundQuality"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryRedirect), 6),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameSoundQuality)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionSoundQuality)),
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
UsedInProtocol(ProtocolType.RDP)]
public RDPSoundQuality SoundQuality
@@ -596,14 +607,14 @@ namespace mRemoteNG.Connection
set => SetField(ref _soundQuality, value, "SoundQuality");
}
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 6),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRedirectAudioCapture"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRedirectAudioCapture"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryRedirect), 6),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameRedirectAudioCapture)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionRedirectAudioCapture)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
UsedInProtocol(ProtocolType.RDP)]
public bool RedirectAudioCapture
{
get => GetPropertyValue(nameof(RedirectAudioCapture), _redirectAudioCapture);
get => GetPropertyValue("RedirectAudioCapture", _redirectAudioCapture);
set => SetField(ref _redirectAudioCapture, value, nameof(RedirectAudioCapture));
}
@@ -613,9 +624,9 @@ namespace mRemoteNG.Connection
[Browsable(false)] public string ConstantID { get; }
[LocalizedAttributes.LocalizedCategory("strCategoryMiscellaneous", 7),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameExternalToolBefore"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionExternalToolBefore"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryMiscellaneous), 7),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameExternalToolBefore)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionExternalToolBefore)),
TypeConverter(typeof(ExternalToolsTypeConverter))]
public virtual string PreExtApp
{
@@ -623,9 +634,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _preExtApp, value, "PreExtApp");
}
[LocalizedAttributes.LocalizedCategory("strCategoryMiscellaneous", 7),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameExternalToolAfter"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionExternalToolAfter"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryMiscellaneous), 7),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameExternalToolAfter)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionExternalToolAfter)),
TypeConverter(typeof(ExternalToolsTypeConverter))]
public virtual string PostExtApp
{
@@ -633,27 +644,27 @@ namespace mRemoteNG.Connection
set => SetField(ref _postExtApp, value, "PostExtApp");
}
[LocalizedAttributes.LocalizedCategory("strCategoryMiscellaneous", 7),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameMACAddress"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionMACAddress")]
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryMiscellaneous), 7),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameMACAddress)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionMACAddress))]
public virtual string MacAddress
{
get => GetPropertyValue("MacAddress", _macAddress);
set => SetField(ref _macAddress, value, "MacAddress");
}
[LocalizedAttributes.LocalizedCategory("strCategoryMiscellaneous", 7),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameUser1"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionUser1")]
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryMiscellaneous), 7),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameUser1)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionUser1))]
public virtual string UserField
{
get => GetPropertyValue("UserField", _userField);
set => SetField(ref _userField, value, "UserField");
}
[LocalizedAttributes.LocalizedCategory("strCategoryMiscellaneous", 7),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameFavorite"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionFavorite"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryMiscellaneous), 7),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameFavorite)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionFavorite)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public virtual bool Favorite
{
@@ -665,9 +676,9 @@ namespace mRemoteNG.Connection
#region VNC
// TODO: it seems all these VNC properties were added and serialized but
// never hooked up to the VNC protocol or shown to the user
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 5),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameCompression"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionCompression"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryAppearance), 5),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameCompression)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionCompression)),
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
UsedInProtocol(ProtocolType.VNC),
Browsable(false)]
@@ -677,9 +688,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _vncCompression, value, "VNCCompression");
}
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 5),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameEncoding"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionEncoding"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryAppearance), 5),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameEncoding)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionEncoding)),
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
UsedInProtocol(ProtocolType.VNC),
Browsable(false)]
@@ -689,9 +700,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _vncEncoding, value, "VNCEncoding");
}
[LocalizedAttributes.LocalizedCategory("strCategoryConnection", 2),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameAuthenticationMode"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionAuthenticationMode"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryConnection), 2),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameAuthenticationMode)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionAuthenticationMode)),
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
UsedInProtocol(ProtocolType.VNC),
Browsable(false)]
@@ -701,9 +712,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _vncAuthMode, value, "VNCAuthMode");
}
[LocalizedAttributes.LocalizedCategory("strCategoryProxy", 7),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameVNCProxyType"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionVNCProxyType"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProxy), 7),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameVNCProxyType)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionVNCProxyType)),
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
UsedInProtocol(ProtocolType.VNC),
Browsable(false)]
@@ -713,9 +724,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _vncProxyType, value, "VNCProxyType");
}
[LocalizedAttributes.LocalizedCategory("strCategoryProxy", 7),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameVNCProxyAddress"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionVNCProxyAddress"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProxy), 7),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameVNCProxyAddress)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionVNCProxyAddress)),
UsedInProtocol(ProtocolType.VNC),
Browsable(false)]
public string VNCProxyIP
@@ -724,9 +735,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _vncProxyIp, value, "VNCProxyIP");
}
[LocalizedAttributes.LocalizedCategory("strCategoryProxy", 7),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameVNCProxyPort"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionVNCProxyPort"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProxy), 7),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameVNCProxyPort)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionVNCProxyPort)),
UsedInProtocol(ProtocolType.VNC),
Browsable(false)]
public int VNCProxyPort
@@ -735,9 +746,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _vncProxyPort, value, "VNCProxyPort");
}
[LocalizedAttributes.LocalizedCategory("strCategoryProxy", 7),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameVNCProxyUsername"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionVNCProxyUsername"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProxy), 7),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameVNCProxyUsername)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionVNCProxyUsername)),
UsedInProtocol(ProtocolType.VNC),
Browsable(false)]
public string VNCProxyUsername
@@ -746,9 +757,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _vncProxyUsername, value, "VNCProxyUsername");
}
[LocalizedAttributes.LocalizedCategory("strCategoryProxy", 7),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameVNCProxyPassword"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionVNCProxyPassword"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProxy), 7),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameVNCProxyPassword)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionVNCProxyPassword)),
PasswordPropertyText(true),
UsedInProtocol(ProtocolType.VNC),
Browsable(false)]
@@ -758,9 +769,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _vncProxyPassword, value, "VNCProxyPassword");
}
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 5),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameColors"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionColors"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryAppearance), 5),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameColors)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionColors)),
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
UsedInProtocol(ProtocolType.VNC),
Browsable(false)]
@@ -770,9 +781,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _vncColors, value, "VNCColors");
}
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 5),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameSmartSizeMode"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionSmartSizeMode"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryAppearance), 5),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameSmartSizeMode)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionSmartSizeMode)),
TypeConverter(typeof(MiscTools.EnumTypeConverter)),
UsedInProtocol(ProtocolType.VNC)]
public ProtocolVNC.SmartSizeMode VNCSmartSizeMode
@@ -781,9 +792,9 @@ namespace mRemoteNG.Connection
set => SetField(ref _vncSmartSizeMode, value, "VNCSmartSizeMode");
}
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 5),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameViewOnly"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionViewOnly"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryAppearance), 5),
LocalizedAttributes.LocalizedDisplayName(nameof(Language.strPropertyNameViewOnly)),
LocalizedAttributes.LocalizedDescription(nameof(Language.strPropertyDescriptionViewOnly)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter)),
UsedInProtocol(ProtocolType.VNC)]
public bool VNCViewOnly

View File

@@ -7,6 +7,7 @@ using mRemoteNG.App;
using mRemoteNG.Connection.Protocol;
using mRemoteNG.Connection.Protocol.Http;
using mRemoteNG.Connection.Protocol.ICA;
using mRemoteNG.Connection.Protocol.PowerShell;
using mRemoteNG.Connection.Protocol.RAW;
using mRemoteNG.Connection.Protocol.RDP;
using mRemoteNG.Connection.Protocol.Rlogin;
@@ -265,6 +266,8 @@ namespace mRemoteNG.Connection
return (int)ProtocolHTTPS.Defaults.Port;
case ProtocolType.ICA:
return (int)IcaProtocol.Defaults.Port;
case ProtocolType.PowerShell:
return (int)ProtocolPowerShell.Defaults.Port;
case ProtocolType.IntApp:
return (int)IntegratedProgram.Defaults.Port;
}
@@ -309,6 +312,7 @@ namespace mRemoteNG.Connection
Settings.Default.ConDefaultRenderingEngine);
UseCredSsp = Settings.Default.ConDefaultUseCredSsp;
UseVmId = Settings.Default.ConDefaultUseVmId;
UseEnhancedMode = Settings.Default.ConDefaultUseEnhancedMode;
}
private void SetRdGatewayDefaults()
@@ -344,11 +348,9 @@ namespace mRemoteNG.Connection
RedirectClipboard = Settings.Default.ConDefaultRedirectClipboard;
RedirectPorts = Settings.Default.ConDefaultRedirectPorts;
RedirectSmartCards = Settings.Default.ConDefaultRedirectSmartCards;
RedirectSound = (RDPSounds)Enum.Parse(typeof(RDPSounds),
Settings.Default.ConDefaultRedirectSound);
SoundQuality = (RDPSoundQuality)Enum.Parse(typeof(RDPSoundQuality),
Settings.Default.ConDefaultSoundQuality);
RedirectAudioCapture = Settings.Default.ConDefaultRedirectAudioCapture;
RedirectSound = (RDPSounds)Enum.Parse(typeof(RDPSounds), Settings.Default.ConDefaultRedirectSound);
SoundQuality = (RDPSoundQuality)Enum.Parse(typeof(RDPSoundQuality), Settings.Default.ConDefaultSoundQuality);
}
private void SetMiscDefaults()

View File

@@ -14,9 +14,9 @@ namespace mRemoteNG.Connection
#region General
[LocalizedAttributes.LocalizedCategory("strCategoryGeneral"),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameAll"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionAll"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryGeneral)),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameAll)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionAll)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool EverythingInherited
{
@@ -28,21 +28,21 @@ namespace mRemoteNG.Connection
#region Display
[LocalizedAttributes.LocalizedCategory("strCategoryDisplay", 2),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameDescription"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionDescription"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryDisplay), 2),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameDescription)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionDescription)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool Description { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryDisplay", 2),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameIcon"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionIcon"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryDisplay), 2),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameIcon)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionIcon)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool Icon { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryDisplay", 2),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNamePanel"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionPanel"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryDisplay), 2),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNamePanel)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionPanel)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool Panel { get; set; }
@@ -50,37 +50,37 @@ namespace mRemoteNG.Connection
#region Connection
[LocalizedAttributes.LocalizedCategory("strCategoryConnection", 3),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameUsername"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionUsername"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryConnection), 3),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameUsername)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionUsername)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
[Browsable(true)]
public bool Username { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryConnection", 3),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameVmId"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionVmId"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryConnection), 3),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameVmId)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionVmId)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
[Browsable(true)]
public bool VmId { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryConnection", 3),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNamePassword"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionPassword"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryConnection), 3),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNamePassword)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionPassword)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
[Browsable(true)]
public bool Password { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryConnection", 3),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameDomain"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionDomain"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryConnection), 3),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameDomain)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionDomain)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
[Browsable(true)]
public bool Domain { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryConnection", 3),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNamePort"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionPort"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryConnection), 3),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNamePort)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionPort)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool Port { get; set; }
@@ -88,122 +88,127 @@ namespace mRemoteNG.Connection
#region Protocol
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 4),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameProtocol"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionProtocol"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 4),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameProtocol)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionProtocol)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool Protocol { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 4),
LocalizedAttributes.LocalizedDisplayName("strPropertyNameRdpVersion"),
LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRdpVersion"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 4),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameRdpVersion)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionRdpVersion)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RdpVersion { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 4),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameExternalTool"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionExternalTool"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 4),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameExternalTool)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionExternalTool)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool ExtApp { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 4),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNamePuttySession"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionPuttySession"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 4),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNamePuttySession)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionPuttySession)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool PuttySession { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 4),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameEncryptionStrength"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionEncryptionStrength"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 4),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameEncryptionStrength)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionEncryptionStrength)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool ICAEncryptionStrength { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 4),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameAuthenticationLevel"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionAuthenticationLevel"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 4),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameAuthenticationLevel)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionAuthenticationLevel)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RDPAuthenticationLevel { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 4),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRDPMinutesToIdleTimeout"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRDPMinutesToIdleTimeout"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 4),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameRDPMinutesToIdleTimeout)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionRDPMinutesToIdleTimeout)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RDPMinutesToIdleTimeout { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 4),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRDPAlertIdleTimeout"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRDPAlertIdleTimeout"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 4),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameRDPAlertIdleTimeout)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionRDPAlertIdleTimeout)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RDPAlertIdleTimeout { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 4),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameLoadBalanceInfo"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionLoadBalanceInfo"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 4),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameLoadBalanceInfo)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionLoadBalanceInfo)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool LoadBalanceInfo { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 4),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRenderingEngine"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRenderingEngine"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 4),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameRenderingEngine)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionRenderingEngine)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RenderingEngine { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 4),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameUseConsoleSession"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionUseConsoleSession"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 4),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameUseConsoleSession)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionUseConsoleSession)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool UseConsoleSession { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 4),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameUseCredSsp"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionUseCredSsp"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 4),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameUseCredSsp)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionUseCredSsp)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool UseCredSsp { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryProtocol", 4),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameUseVmId"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionUseVmId"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 4),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameUseVmId)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionUseVmId)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool UseVmId { get; set; }
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProtocol), 4),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameUseEnhancedMode)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionUseEnhancedMode)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool UseEnhancedMode { get; set; }
#endregion
#region RD Gateway
[LocalizedAttributes.LocalizedCategory("strCategoryGateway", 5),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRDGatewayUsageMethod"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRDGatewayUsageMethod"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryGateway), 5),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameRDGatewayUsageMethod)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionRDGatewayUsageMethod)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RDGatewayUsageMethod { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryGateway", 5),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRDGatewayHostname"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRDGatewayHostname"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryGateway), 5),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameRDGatewayHostname)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionRDGatewayHostname)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RDGatewayHostname { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryGateway", 5),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRDGatewayUseConnectionCredentials"),
LocalizedAttributes.LocalizedDescriptionInherit(
"strPropertyDescriptionRDGatewayUseConnectionCredentials"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryGateway), 5),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameRDGatewayUseConnectionCredentials)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionRDGatewayUseConnectionCredentials)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RDGatewayUseConnectionCredentials { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryGateway", 5),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRDGatewayUsername"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRDGatewayUsername"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryGateway), 5),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameRDGatewayUsername)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionRDGatewayUsername)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RDGatewayUsername { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryGateway", 5),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRDGatewayPassword"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRDGatewayPassword"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryGateway), 5),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameRDGatewayPassword)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionRDGatewayPassword)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RDGatewayPassword { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryGateway", 5),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRDGatewayDomain"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRDGatewayDomain"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryGateway), 5),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameRDGatewayDomain)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionRDGatewayDomain)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RDGatewayDomain { get; set; }
@@ -211,52 +216,51 @@ namespace mRemoteNG.Connection
#region Appearance
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 6),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameResolution"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionResolution"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryAppearance), 6),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameResolution)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionResolution)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool Resolution { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 6),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameAutomaticResize"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionAutomaticResize"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryAppearance), 6),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameAutomaticResize)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionAutomaticResize)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool AutomaticResize { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 6),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameColors"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionColors"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryAppearance), 6),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameColors)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionColors)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool Colors { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 6),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameCacheBitmaps"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionCacheBitmaps"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryAppearance), 6),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameCacheBitmaps)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionCacheBitmaps)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool CacheBitmaps { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 6),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameDisplayWallpaper"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionDisplayWallpaper"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryAppearance), 6),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameDisplayWallpaper)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionDisplayWallpaper)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool DisplayWallpaper { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 6),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameDisplayThemes"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionDisplayThemes"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryAppearance), 6),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameDisplayThemes)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionDisplayThemes)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool DisplayThemes { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 6),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameEnableFontSmoothing"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionEnableFontSmoothing"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryAppearance), 6),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameEnableFontSmoothing)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionEnableFontSmoothing)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool EnableFontSmoothing { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 6),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameEnableDesktopComposition"),
LocalizedAttributes.LocalizedDescriptionInherit(
"strPropertyDescriptionEnableEnableDesktopComposition"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryAppearance), 6),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameEnableDesktopComposition)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionEnableDesktopComposition)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool EnableDesktopComposition { get; set; }
@@ -264,57 +268,57 @@ namespace mRemoteNG.Connection
#region Redirect
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 7),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRedirectKeys"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRedirectKeys"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryRedirect), 7),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameRedirectKeys)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionRedirectKeys)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RedirectKeys { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 7),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRedirectDrives"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRedirectDrives"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryRedirect), 7),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameRedirectDrives)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionRedirectDrives)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RedirectDiskDrives { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 7),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRedirectPrinters"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRedirectPrinters"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryRedirect), 7),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameRedirectPrinters)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionRedirectPrinters)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RedirectPrinters { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 7),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRedirectClipboard"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRedirectClipboard"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryRedirect), 7),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameRedirectClipboard)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionRedirectClipboard)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RedirectClipboard { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 7),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRedirectPorts"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRedirectPorts"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryRedirect), 7),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameRedirectPorts)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionRedirectPorts)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RedirectPorts { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 7),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRedirectSmartCards"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRedirectSmartCards"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryRedirect), 7),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameRedirectSmartCards)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionRedirectSmartCards)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RedirectSmartCards { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 7),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRedirectSounds"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRedirectSounds"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryRedirect), 7),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameRedirectSounds)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionRedirectSounds)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RedirectSound { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 7),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameSoundQuality"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionSoundQuality"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryRedirect), 7),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameSoundQuality)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionSoundQuality)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool SoundQuality { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryRedirect", 7),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameRedirectAudioCapture"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionRedirectAudioCapture"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryRedirect), 7),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameRedirectAudioCapture)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionRedirectAudioCapture)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool RedirectAudioCapture { get; set; }
@@ -322,91 +326,91 @@ namespace mRemoteNG.Connection
#region Misc
[LocalizedAttributes.LocalizedCategory("strCategoryMiscellaneous", 8),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameExternalToolBefore"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionExternalToolBefore"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryMiscellaneous), 8),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameExternalToolBefore)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionExternalToolBefore)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool PreExtApp { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryMiscellaneous", 8),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameExternalToolAfter"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionExternalToolAfter"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryMiscellaneous), 8),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameExternalToolAfter)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionExternalToolAfter)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool PostExtApp { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryMiscellaneous", 8),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameMACAddress"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionMACAddress"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryMiscellaneous), 8),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameMACAddress)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionMACAddress)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool MacAddress { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryMiscellaneous", 8),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameUser1"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionUser1"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryMiscellaneous), 8),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameUser1)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionUser1)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool UserField { get; set; }
[LocalizedAttributes.LocalizedCategory("strCategoryMiscellaneous", 8),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameFavorite"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionFavorite"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryMiscellaneous), 8),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameFavorite)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionFavorite)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]
public bool Favorite { get; set; }
#endregion
#region VNC
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 9),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameCompression"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionCompression"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryAppearance), 9),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameCompression)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionCompression)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCCompression {get; set;}
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 9),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameEncoding"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionEncoding"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryAppearance), 9),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameEncoding)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionEncoding)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCEncoding {get; set;}
[LocalizedAttributes.LocalizedCategory("strCategoryConnection", 9),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameAuthenticationMode"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionAuthenticationMode"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryConnection), 9),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameAuthenticationMode)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionAuthenticationMode)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCAuthMode {get; set;}
[LocalizedAttributes.LocalizedCategory("strCategoryProxy", 9),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameVNCProxyType"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionVNCProxyType"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProxy), 9),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameVNCProxyType)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionVNCProxyType)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCProxyType {get; set;}
[LocalizedAttributes.LocalizedCategory("strCategoryProxy", 9),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameVNCProxyAddress"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionVNCProxyAddress"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProxy), 9),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameVNCProxyAddress)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionVNCProxyAddress)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCProxyIP {get; set;}
[LocalizedAttributes.LocalizedCategory("strCategoryProxy", 9),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameVNCProxyPort"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionVNCProxyPort"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProxy), 9),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameVNCProxyPort)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionVNCProxyPort)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCProxyPort {get; set;}
[LocalizedAttributes.LocalizedCategory("strCategoryProxy", 9),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameVNCProxyUsername"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionVNCProxyUsername"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProxy), 9),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameVNCProxyUsername)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionVNCProxyUsername)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCProxyUsername {get; set;}
[LocalizedAttributes.LocalizedCategory("strCategoryProxy", 9),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameVNCProxyPassword"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionVNCProxyPassword"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryProxy), 9),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameVNCProxyPassword)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionVNCProxyPassword)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCProxyPassword {get; set;}
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 9),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameColors"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionColors"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryAppearance), 9),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameColors)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionColors)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCColors {get; set;}
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 9),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameSmartSizeMode"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionSmartSizeMode"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryAppearance), 9),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameSmartSizeMode)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionSmartSizeMode)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCSmartSizeMode {get; set;}
[LocalizedAttributes.LocalizedCategory("strCategoryAppearance", 9),
LocalizedAttributes.LocalizedDisplayNameInherit("strPropertyNameViewOnly"),
LocalizedAttributes.LocalizedDescriptionInherit("strPropertyDescriptionViewOnly"),
[LocalizedAttributes.LocalizedCategory(nameof(Language.strCategoryAppearance), 9),
LocalizedAttributes.LocalizedDisplayNameInherit(nameof(Language.strPropertyNameViewOnly)),
LocalizedAttributes.LocalizedDescriptionInherit(nameof(Language.strPropertyDescriptionViewOnly)),
TypeConverter(typeof(MiscTools.YesNoTypeConverter))]public bool VNCViewOnly {get; set;}
#endregion

View File

@@ -5,7 +5,6 @@ using mRemoteNG.App;
using mRemoteNG.Connection.Protocol;
using mRemoteNG.Container;
using mRemoteNG.Messages;
using mRemoteNG.Tools;
using mRemoteNG.UI.Forms;
using mRemoteNG.UI.Panels;
using mRemoteNG.UI.Tabs;
@@ -297,7 +296,7 @@ namespace mRemoteNG.Connection
}
catch (Exception ex)
{
Runtime.MessageCollector.AddExceptionStackTrace(Language.strConnectionEventConnectionFailed, ex);
Runtime.MessageCollector.AddExceptionStackTrace(Language.ConnectionFailed, ex);
}
}

View File

@@ -219,14 +219,14 @@ namespace mRemoteNG.Connection.Protocol.Http
}
}
if (!string.IsNullOrEmpty(tabTitle))
{
tabP.TabText = tabTitle + @" - " + shortTitle;
}
else
{
tabP.TabText = shortTitle;
}
if (!string.IsNullOrEmpty(tabTitle))
{
tabP.TabText = tabTitle + @" - " + shortTitle;
}
else
{
tabP.TabText = shortTitle;
}
}
catch (Exception ex)
{
@@ -265,14 +265,14 @@ namespace mRemoteNG.Connection.Protocol.Http
}
}
if (!string.IsNullOrEmpty(tabTitle))
{
tabP.TabText = tabTitle + @" - " + shortTitle;
}
else
{
tabP.TabText = shortTitle;
}
if (!string.IsNullOrEmpty(tabTitle))
{
tabP.TabText = tabTitle + @" - " + shortTitle;
}
else
{
tabP.TabText = shortTitle;
}
}
catch (Exception ex)
{
@@ -282,7 +282,7 @@ namespace mRemoteNG.Connection.Protocol.Http
private void geckoBrowser_LauncherDialog_Download(object sender, Gecko.LauncherDialogEvent e)
{
var objTarget = Xpcom.CreateInstance<nsILocalFile>("@mozilla.org/file/local;1");
var objTarget = Xpcom.CreateInstance<nsILocalFileWin>("@mozilla.org/file/local;1");
using (var tmp = new nsAString(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\mremoteng.download"))
{
objTarget.InitWithPath(tmp);
@@ -320,10 +320,10 @@ namespace mRemoteNG.Connection.Protocol.Http
public enum RenderingEngine
{
[LocalizedAttributes.LocalizedDescription("strHttpInternetExplorer")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strHttpInternetExplorer))]
IE = 1,
[LocalizedAttributes.LocalizedDescription("strHttpGecko")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strHttpGecko))]
Gecko = 2
}

View File

@@ -361,19 +361,19 @@ namespace mRemoteNG.Connection.Protocol.ICA
public enum EncryptionStrength
{
[LocalizedAttributes.LocalizedDescription("strEncBasic")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strEncBasic))]
EncrBasic = 1,
[LocalizedAttributes.LocalizedDescription("strEnc128BitLogonOnly")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strEnc128BitLogonOnly))]
Encr128BitLogonOnly = 127,
[LocalizedAttributes.LocalizedDescription("strEnc40Bit")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strEnc40Bit))]
Encr40Bit = 40,
[LocalizedAttributes.LocalizedDescription("strEnc56Bit")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strEnc56Bit))]
Encr56Bit = 56,
[LocalizedAttributes.LocalizedDescription("strEnc128Bit")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strEnc128Bit))]
Encr128Bit = 128
}

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Diagnostics;
using System.Drawing;
using System.Threading;
@@ -113,7 +113,7 @@ namespace mRemoteNG.Connection.Protocol
}
catch (Exception ex)
{
Runtime.MessageCollector?.AddExceptionMessage(Language.strIntAppConnectionFailed, ex);
Runtime.MessageCollector?.AddExceptionMessage(Language.ConnectionFailed, ex);
return false;
}
}

View File

@@ -0,0 +1,100 @@
using System;
using System.Drawing;
using System.Windows.Forms;
using mRemoteNG.App;
using mRemoteNG.Messages;
namespace mRemoteNG.Connection.Protocol.PowerShell
{
public class ProtocolPowerShell : ProtocolBase
{
#region Private Fields
private IntPtr _handle;
private readonly ConnectionInfo _connectionInfo;
private ConsoleControl.ConsoleControl _consoleControl;
public ProtocolPowerShell(ConnectionInfo connectionInfo)
{
_connectionInfo = connectionInfo;
}
#endregion
#region Public Methods
public override bool Connect()
{
try
{
Runtime.MessageCollector?.AddMessage(MessageClass.InformationMsg,
"Attempting to start remote PowerShell session.", true);
_consoleControl = new ConsoleControl.ConsoleControl
{
Dock = DockStyle.Fill,
BackColor = ColorTranslator.FromHtml("#012456"),
ForeColor = Color.White,
IsInputEnabled = true,
Padding = new Padding(0, 20, 0, 0)
};
_consoleControl.StartProcess(@"C:\Windows\system32\WindowsPowerShell\v1.0\PowerShell.exe",
$@"-NoExit -Command ""$password = ConvertTo-SecureString '{_connectionInfo.Password}' -AsPlainText -Force; $cred = New-Object System.Management.Automation.PSCredential -ArgumentList @('{_connectionInfo.Domain}\{_connectionInfo.Username}', $password); Enter-PSSession -ComputerName {_connectionInfo.Hostname} -Credential $cred""");
while (!_consoleControl.IsHandleCreated) break;
_handle = _consoleControl.Handle;
NativeMethods.SetParent(_handle, InterfaceControl.Handle);
Resize(this, new EventArgs());
base.Connect();
return true;
}
catch (Exception ex)
{
Runtime.MessageCollector?.AddExceptionMessage(Language.ConnectionFailed, ex);
return false;
}
}
public override void Focus()
{
try
{
NativeMethods.SetForegroundWindow(_handle);
}
catch (Exception ex)
{
Runtime.MessageCollector.AddExceptionMessage(Language.strIntAppFocusFailed, ex);
}
}
public override void Resize(object sender, EventArgs e)
{
try
{
if (InterfaceControl.Size == Size.Empty) return;
NativeMethods.MoveWindow(_handle, -SystemInformation.FrameBorderSize.Width,
-(SystemInformation.CaptionHeight + SystemInformation.FrameBorderSize.Height),
InterfaceControl.Width + SystemInformation.FrameBorderSize.Width * 2,
InterfaceControl.Height + SystemInformation.CaptionHeight +
SystemInformation.FrameBorderSize.Height * 2, true);
}
catch (Exception ex)
{
Runtime.MessageCollector.AddExceptionMessage(Language.strIntAppResizeFailed, ex);
}
}
#endregion
#region Enumerations
public enum Defaults
{
Port = 5985
}
#endregion
}
}

View File

@@ -333,10 +333,8 @@ namespace mRemoteNG.Connection.Protocol
private void Dispose(bool disposing)
{
if (!disposing) return;
if(tmrReconnect != null)
tmrReconnect.Dispose();
if (disposing) return;
tmrReconnect?.Dispose();
}
public void Dispose()

View File

@@ -7,6 +7,7 @@ using mRemoteNG.Connection.Protocol.SSH;
using mRemoteNG.Connection.Protocol.Telnet;
using mRemoteNG.Connection.Protocol.VNC;
using System;
using mRemoteNG.Connection.Protocol.PowerShell;
namespace mRemoteNG.Connection.Protocol
{
@@ -43,6 +44,8 @@ namespace mRemoteNG.Connection.Protocol
var icaProtocol = new IcaProtocol();
icaProtocol.tmrReconnect.Elapsed += icaProtocol.tmrReconnect_Elapsed;
return icaProtocol;
case ProtocolType.PowerShell:
return new ProtocolPowerShell(connectionInfo);
case ProtocolType.IntApp:
if (connectionInfo.ExtApp == "")
{
@@ -51,7 +54,7 @@ namespace mRemoteNG.Connection.Protocol
return new IntegratedProgram();
}
return default(ProtocolBase);
return default;
}
}
}

View File

@@ -1,40 +1,43 @@
using mRemoteNG.Tools;
using mRemoteNG.Tools;
namespace mRemoteNG.Connection.Protocol
{
public enum ProtocolType
{
[LocalizedAttributes.LocalizedDescription("strRDP")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strRDP))]
RDP = 0,
[LocalizedAttributes.LocalizedDescription("strVnc")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strVnc))]
VNC = 1,
[LocalizedAttributes.LocalizedDescription("strSsh1")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strSsh1))]
SSH1 = 2,
[LocalizedAttributes.LocalizedDescription("strSsh2")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strSsh2))]
SSH2 = 3,
[LocalizedAttributes.LocalizedDescription("strTelnet")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strTelnet))]
Telnet = 4,
[LocalizedAttributes.LocalizedDescription("strRlogin")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strRlogin))]
Rlogin = 5,
[LocalizedAttributes.LocalizedDescription("strRAW")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strRAW))]
RAW = 6,
[LocalizedAttributes.LocalizedDescription("strHttp")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strHttp))]
HTTP = 7,
[LocalizedAttributes.LocalizedDescription("strHttps")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strHttps))]
HTTPS = 8,
[LocalizedAttributes.LocalizedDescription("strICA")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strICA))]
ICA = 9,
[LocalizedAttributes.LocalizedDescription("strExtApp")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strPowerShell))]
PowerShell = 10,
[LocalizedAttributes.LocalizedDescription(nameof(Language.strExtApp))]
IntApp = 20
}
}

View File

@@ -1,4 +1,4 @@
using mRemoteNG.App;
using mRemoteNG.App;
using mRemoteNG.Messages;
using mRemoteNG.Security.SymmetricEncryption;
using mRemoteNG.Tools;
@@ -186,7 +186,7 @@ namespace mRemoteNG.Connection.Protocol
catch (Exception ex)
{
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg,
Language.strPuttyConnectionFailed + Environment.NewLine +
Language.ConnectionFailed + Environment.NewLine +
ex.Message);
return false;
}

View File

@@ -4,13 +4,13 @@ namespace mRemoteNG.Connection.Protocol.RDP
{
public enum AuthenticationLevel
{
[LocalizedAttributes.LocalizedDescription("strAlwaysConnectEvenIfAuthFails")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strAlwaysConnectEvenIfAuthFails))]
NoAuth = 0,
[LocalizedAttributes.LocalizedDescription("strDontConnectWhenAuthFails")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strDontConnectWhenAuthFails))]
AuthRequired = 1,
[LocalizedAttributes.LocalizedDescription("strWarnIfAuthFails")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strWarnIfAuthFails))]
WarnOnFailedAuth = 2
}
}

View File

@@ -4,13 +4,13 @@ namespace mRemoteNG.Connection.Protocol.RDP
{
public enum RDGatewayUsageMethod
{
[LocalizedAttributes.LocalizedDescription("strNever")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strNever))]
Never = 0, // TSC_PROXY_MODE_NONE_DIRECT
[LocalizedAttributes.LocalizedDescription("strAlways")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strAlways))]
Always = 1, // TSC_PROXY_MODE_DIRECT
[LocalizedAttributes.LocalizedDescription("strDetect")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strDetect))]
Detect = 2 // TSC_PROXY_MODE_DETECT
}
}

View File

@@ -4,13 +4,13 @@ namespace mRemoteNG.Connection.Protocol.RDP
{
public enum RDGatewayUseConnectionCredentials
{
[LocalizedAttributes.LocalizedDescription("strUseDifferentUsernameAndPassword")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strUseDifferentUsernameAndPassword))]
No = 0,
[LocalizedAttributes.LocalizedDescription("strUseSameUsernameAndPassword")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strUseSameUsernameAndPassword))]
Yes = 1,
[LocalizedAttributes.LocalizedDescription("strUseSmartCard")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strUseSmartCard))]
SmartCard = 2
}
}

View File

@@ -4,19 +4,19 @@ namespace mRemoteNG.Connection.Protocol.RDP
{
public enum RDPColors
{
[LocalizedAttributes.LocalizedDescription("strRDP256Colors")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strRDP256Colors))]
Colors256 = 8,
[LocalizedAttributes.LocalizedDescription("strRDP32768Colors")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strRDP32768Colors))]
Colors15Bit = 15,
[LocalizedAttributes.LocalizedDescription("strRDP65536Colors")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strRDP65536Colors))]
Colors16Bit = 16,
[LocalizedAttributes.LocalizedDescription("strRDP16777216Colors")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strRDP16777216Colors))]
Colors24Bit = 24,
[LocalizedAttributes.LocalizedDescription("strRDP4294967296Colors")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strRDP4294967296Colors))]
Colors32Bit = 32
}
}

View File

@@ -5,13 +5,13 @@ namespace mRemoteNG.Connection.Protocol.RDP
{
public enum RDPResolutions
{
[LocalizedAttributes.LocalizedDescription("strRDPFitToPanel")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strRDPFitToPanel))]
FitToWindow,
[LocalizedAttributes.LocalizedDescription("strFullscreen")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strFullscreen))]
Fullscreen,
[LocalizedAttributes.LocalizedDescription("strRDPSmartSize")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strRDPSmartSize))]
SmartSize,
[Description("800x600")] Res800x600,
[Description("1024x768")] Res1024x768,

View File

@@ -4,13 +4,13 @@ namespace mRemoteNG.Connection.Protocol.RDP
{
public enum RDPSoundQuality
{
[LocalizedAttributes.LocalizedDescription("strRDPSoundQualityDynamic")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strRDPSoundQualityDynamic))]
Dynamic = 0,
[LocalizedAttributes.LocalizedDescription("strRDPSoundQualityMedium")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strRDPSoundQualityMedium))]
Medium = 1,
[LocalizedAttributes.LocalizedDescription("strRDPSoundQualityHigh")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strRDPSoundQualityHigh))]
High = 2
}
}

View File

@@ -4,13 +4,13 @@ namespace mRemoteNG.Connection.Protocol.RDP
{
public enum RDPSounds
{
[LocalizedAttributes.LocalizedDescription("strRDPSoundBringToThisComputer")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strRDPSoundBringToThisComputer))]
BringToThisComputer = 0,
[LocalizedAttributes.LocalizedDescription("strRDPSoundLeaveAtRemoteComputer")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strRDPSoundLeaveAtRemoteComputer))]
LeaveAtRemoteComputer = 1,
[LocalizedAttributes.LocalizedDescription("strRDPSoundDoNotPlay")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strRDPSoundDoNotPlay))]
DoNotPlay = 2
}
}

View File

@@ -28,7 +28,9 @@ namespace mRemoteNG.Connection.Protocol.RDP
rdpClient7.AdvancedSettings7.AuthenticationServiceClass = "Microsoft Virtual Console Service";
rdpClient7.AdvancedSettings8.EnableCredSspSupport = true;
rdpClient7.AdvancedSettings8.NegotiateSecurityLayer = false;
rdpClient7.AdvancedSettings7.PCB = $"{connectionInfo.VmId};EnhancedMode=1";
rdpClient7.AdvancedSettings7.PCB = $"{connectionInfo.VmId}";
if (connectionInfo.UseEnhancedMode)
rdpClient7.AdvancedSettings7.PCB += ";EnhancedMode=1";
}
}
catch (Exception ex)

View File

@@ -1,316 +1,362 @@
using System;
using System.ComponentModel;
using mRemoteNG.App;
using mRemoteNG.Tools;
using mRemoteNG.UI.Forms;
// ReSharper disable ArrangeAccessorOwnerBody
namespace mRemoteNG.Connection.Protocol.VNC
{
public class ProtocolVNC : ProtocolBase, ISupportsViewOnly
{
#region Properties
public bool SmartSize
{
get { return _VNC.Scaled; }
set { _VNC.Scaled = value; }
}
public bool ViewOnly
{
get { return _VNC.ViewOnly; }
set { _VNC.ViewOnly = value; }
}
#endregion
#region Private Declarations
private VncSharp.RemoteDesktop _VNC;
private ConnectionInfo Info;
#endregion
#region Public Methods
public ProtocolVNC()
{
Control = new VncSharp.RemoteDesktop();
}
public override bool Initialize()
{
base.Initialize();
try
{
_VNC = (VncSharp.RemoteDesktop)Control;
Info = InterfaceControl.Info;
_VNC.VncPort = Info.Port;
return true;
}
catch (Exception ex)
{
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg,
Language.strVncSetPropsFailed + Environment.NewLine + ex.Message,
true);
return false;
}
}
public override bool Connect()
{
SetEventHandlers();
try
{
_VNC.Connect(Info.Hostname, Info.VNCViewOnly, Info.VNCSmartSizeMode != SmartSizeMode.SmartSNo);
}
catch (Exception ex)
{
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg,
Language.strConnectionOpenFailed + Environment.NewLine +
ex.Message);
return false;
}
return true;
}
public override void Disconnect()
{
try
{
_VNC.Disconnect();
}
catch (Exception ex)
{
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg,
Language.strVncConnectionDisconnectFailed + Environment.NewLine +
ex.Message, true);
}
}
public void SendSpecialKeys(SpecialKeys Keys)
{
try
{
// ReSharper disable once SwitchStatementMissingSomeCases
switch (Keys)
{
case SpecialKeys.CtrlAltDel:
_VNC.SendSpecialKeys(VncSharp.SpecialKeys.CtrlAltDel);
break;
case SpecialKeys.CtrlEsc:
_VNC.SendSpecialKeys(VncSharp.SpecialKeys.CtrlEsc);
break;
}
}
catch (Exception ex)
{
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg,
Language.strVncSendSpecialKeysFailed + Environment.NewLine +
ex.Message, true);
}
}
public void ToggleSmartSize()
{
try
{
SmartSize = !SmartSize;
RefreshScreen();
}
catch (Exception ex)
{
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg,
Language.strVncToggleSmartSizeFailed + Environment.NewLine +
ex.Message, true);
}
}
public void ToggleViewOnly()
{
try
{
ViewOnly = !ViewOnly;
}
catch (Exception ex)
{
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg,
Language.strVncToggleViewOnlyFailed + Environment.NewLine +
ex.Message, true);
}
}
public void StartChat()
{
throw new NotImplementedException();
}
public void StartFileTransfer()
{
throw new NotImplementedException();
}
public void RefreshScreen()
{
try
{
_VNC.FullScreenUpdate();
}
catch (Exception ex)
{
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg,
Language.strVncRefreshFailed + Environment.NewLine + ex.Message,
true);
}
}
#endregion
#region Private Methods
private void SetEventHandlers()
{
try
{
_VNC.ConnectComplete += VNCEvent_Connected;
_VNC.ConnectionLost += VNCEvent_Disconnected;
FrmMain.ClipboardChanged += VNCEvent_ClipboardChanged;
if (!Force.HasFlag(ConnectionInfo.Force.NoCredentials) && Info?.Password?.Length > 0)
{
_VNC.GetPassword = VNCEvent_Authenticate;
}
}
catch (Exception ex)
{
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg,
Language.strVncSetEventHandlersFailed + Environment.NewLine +
ex.Message, true);
}
}
#endregion
#region Private Events & Handlers
private void VNCEvent_Connected(object sender, EventArgs e)
{
Event_Connected(this);
_VNC.AutoScroll = Info.VNCSmartSizeMode == SmartSizeMode.SmartSNo;
}
private void VNCEvent_Disconnected(object sender, EventArgs e)
{
FrmMain.ClipboardChanged -= VNCEvent_ClipboardChanged;
Event_Disconnected(sender, @"VncSharp Disconnected.", null);
Close();
}
private void VNCEvent_ClipboardChanged()
{
_VNC.FillServerClipboard();
}
private string VNCEvent_Authenticate()
{
return Info.Password;
}
#endregion
#region Enums
public enum Defaults
{
Port = 5900
}
public enum SpecialKeys
{
CtrlAltDel,
CtrlEsc
}
public enum Compression
{
[LocalizedAttributes.LocalizedDescription("strNoCompression")]
CompNone = 99,
[Description("0")] Comp0 = 0,
[Description("1")] Comp1 = 1,
[Description("2")] Comp2 = 2,
[Description("3")] Comp3 = 3,
[Description("4")] Comp4 = 4,
[Description("5")] Comp5 = 5,
[Description("6")] Comp6 = 6,
[Description("7")] Comp7 = 7,
[Description("8")] Comp8 = 8,
[Description("9")] Comp9 = 9
}
public enum Encoding
{
[Description("Raw")] EncRaw,
[Description("RRE")] EncRRE,
[Description("CoRRE")] EncCorre,
[Description("Hextile")] EncHextile,
[Description("Zlib")] EncZlib,
[Description("Tight")] EncTight,
[Description("ZlibHex")] EncZLibHex,
[Description("ZRLE")] EncZRLE
}
public enum AuthMode
{
[LocalizedAttributes.LocalizedDescription("VNC")]
AuthVNC,
[LocalizedAttributes.LocalizedDescription("Windows")]
AuthWin
}
public enum ProxyType
{
[LocalizedAttributes.LocalizedDescription("strNone")]
ProxyNone,
[LocalizedAttributes.LocalizedDescription("strHttp")]
ProxyHTTP,
[LocalizedAttributes.LocalizedDescription("strSocks5")]
ProxySocks5,
[LocalizedAttributes.LocalizedDescription("strUltraVncRepeater")]
ProxyUltra
}
public enum Colors
{
[LocalizedAttributes.LocalizedDescription("strNormal")]
ColNormal,
[Description("8-bit")] Col8Bit
}
public enum SmartSizeMode
{
[LocalizedAttributes.LocalizedDescription("strNoSmartSize")]
SmartSNo,
[LocalizedAttributes.LocalizedDescription("strFree")]
SmartSFree,
[LocalizedAttributes.LocalizedDescription("strAspect")]
SmartSAspect
}
#endregion
}
}
using System;
using System.Threading;
using System.ComponentModel;
using System.Net.Sockets;
using mRemoteNG.App;
using mRemoteNG.Tools;
using mRemoteNG.UI.Forms;
// ReSharper disable ArrangeAccessorOwnerBody
namespace mRemoteNG.Connection.Protocol.VNC
{
public class ProtocolVNC : ProtocolBase, ISupportsViewOnly
{
#region Properties
public bool SmartSize
{
get { return _vnc.Scaled; }
set { _vnc.Scaled = value; }
}
public bool ViewOnly
{
get { return _vnc.ViewOnly; }
set { _vnc.ViewOnly = value; }
}
#endregion
#region Private Declarations
private VncSharp.RemoteDesktop _vnc;
private ConnectionInfo _info;
private static bool _isConnectionSuccessful;
private static Exception _socketexception;
private static readonly ManualResetEvent TimeoutObject = new ManualResetEvent(false);
#endregion
#region Public Methods
public ProtocolVNC()
{
Control = new VncSharp.RemoteDesktop();
}
public override bool Initialize()
{
base.Initialize();
try
{
_vnc = (VncSharp.RemoteDesktop)Control;
_info = InterfaceControl.Info;
_vnc.VncPort = _info.Port;
return true;
}
catch (Exception ex)
{
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg,
Language.strVncSetPropsFailed + Environment.NewLine + ex.Message,
true);
return false;
}
}
public override bool Connect()
{
SetEventHandlers();
try
{
if (TestConnect(_info.Hostname, _info.Port, 500))
_vnc.Connect(_info.Hostname, _info.VNCViewOnly, _info.VNCSmartSizeMode != SmartSizeMode.SmartSNo);
}
catch (Exception ex)
{
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg,
Language.strConnectionOpenFailed + Environment.NewLine +
ex.Message);
return false;
}
return true;
}
public override void Disconnect()
{
try
{
_vnc.Disconnect();
}
catch (Exception ex)
{
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg,
Language.strVncConnectionDisconnectFailed + Environment.NewLine +
ex.Message, true);
}
}
public void SendSpecialKeys(SpecialKeys Keys)
{
try
{
// ReSharper disable once SwitchStatementMissingSomeCases
switch (Keys)
{
case SpecialKeys.CtrlAltDel:
_vnc.SendSpecialKeys(VncSharp.SpecialKeys.CtrlAltDel);
break;
case SpecialKeys.CtrlEsc:
_vnc.SendSpecialKeys(VncSharp.SpecialKeys.CtrlEsc);
break;
}
}
catch (Exception ex)
{
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg,
Language.strVncSendSpecialKeysFailed + Environment.NewLine +
ex.Message, true);
}
}
public void ToggleSmartSize()
{
try
{
SmartSize = !SmartSize;
RefreshScreen();
}
catch (Exception ex)
{
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg,
Language.strVncToggleSmartSizeFailed + Environment.NewLine +
ex.Message, true);
}
}
public void ToggleViewOnly()
{
try
{
ViewOnly = !ViewOnly;
}
catch (Exception ex)
{
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg,
Language.strVncToggleViewOnlyFailed + Environment.NewLine +
ex.Message, true);
}
}
public void StartChat()
{
throw new NotImplementedException();
}
public void StartFileTransfer()
{
throw new NotImplementedException();
}
public void RefreshScreen()
{
try
{
_vnc.FullScreenUpdate();
}
catch (Exception ex)
{
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg,
Language.strVncRefreshFailed + Environment.NewLine + ex.Message,
true);
}
}
#endregion
#region Private Methods
private void SetEventHandlers()
{
try
{
_vnc.ConnectComplete += VNCEvent_Connected;
_vnc.ConnectionLost += VNCEvent_Disconnected;
FrmMain.ClipboardChanged += VNCEvent_ClipboardChanged;
if (!Force.HasFlag(ConnectionInfo.Force.NoCredentials) && _info?.Password?.Length > 0)
{
_vnc.GetPassword = VNCEvent_Authenticate;
}
}
catch (Exception ex)
{
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg,
Language.strVncSetEventHandlersFailed + Environment.NewLine +
ex.Message, true);
}
}
private static bool TestConnect(string hostName, int port, int timeoutMSec)
{
var tcpclient = new TcpClient();
TimeoutObject.Reset();
tcpclient.BeginConnect(hostName, port, CallBackMethod, tcpclient);
if (TimeoutObject.WaitOne(timeoutMSec, false))
{
if (_isConnectionSuccessful) return true;
}
else
{
tcpclient.Close();
throw new TimeoutException($"Connection timed out to host " + hostName + " on port " + port);
}
return false;
}
private static void CallBackMethod(IAsyncResult asyncresult)
{
try
{
_isConnectionSuccessful = false;
var tcpclient = asyncresult.AsyncState as TcpClient;
if (tcpclient?.Client == null) return;
tcpclient.EndConnect(asyncresult);
_isConnectionSuccessful = true;
}
catch (Exception ex)
{
_isConnectionSuccessful = false;
_socketexception = ex;
}
finally
{
TimeoutObject.Set();
}
}
#endregion
#region Private Events & Handlers
private void VNCEvent_Connected(object sender, EventArgs e)
{
Event_Connected(this);
_vnc.AutoScroll = _info.VNCSmartSizeMode == SmartSizeMode.SmartSNo;
}
private void VNCEvent_Disconnected(object sender, EventArgs e)
{
FrmMain.ClipboardChanged -= VNCEvent_ClipboardChanged;
Event_Disconnected(sender, @"VncSharp Disconnected.", null);
Close();
}
private void VNCEvent_ClipboardChanged()
{
_vnc.FillServerClipboard();
}
private string VNCEvent_Authenticate()
{
return _info.Password;
}
#endregion
#region Enums
public enum Defaults
{
Port = 5900
}
public enum SpecialKeys
{
CtrlAltDel,
CtrlEsc
}
public enum Compression
{
[LocalizedAttributes.LocalizedDescription(nameof(Language.strNoCompression))]
CompNone = 99,
[Description("0")] Comp0 = 0,
[Description("1")] Comp1 = 1,
[Description("2")] Comp2 = 2,
[Description("3")] Comp3 = 3,
[Description("4")] Comp4 = 4,
[Description("5")] Comp5 = 5,
[Description("6")] Comp6 = 6,
[Description("7")] Comp7 = 7,
[Description("8")] Comp8 = 8,
[Description("9")] Comp9 = 9
}
public enum Encoding
{
[Description("Raw")] EncRaw,
[Description("RRE")] EncRRE,
[Description("CoRRE")] EncCorre,
[Description("Hextile")] EncHextile,
[Description("Zlib")] EncZlib,
[Description("Tight")] EncTight,
[Description("ZlibHex")] EncZLibHex,
[Description("ZRLE")] EncZRLE
}
public enum AuthMode
{
[LocalizedAttributes.LocalizedDescription(nameof(Language.strVnc))]
AuthVNC,
[LocalizedAttributes.LocalizedDescription(nameof(Language.strWindows))]
AuthWin
}
public enum ProxyType
{
[LocalizedAttributes.LocalizedDescription(nameof(Language.strNone))]
ProxyNone,
[LocalizedAttributes.LocalizedDescription(nameof(Language.strHttp))]
ProxyHTTP,
[LocalizedAttributes.LocalizedDescription(nameof(Language.strSocks5))]
ProxySocks5,
[LocalizedAttributes.LocalizedDescription(nameof(Language.strUltraVncRepeater))]
ProxyUltra
}
public enum Colors
{
[LocalizedAttributes.LocalizedDescription(nameof(Language.strNormal))]
ColNormal,
[Description("8-bit")] Col8Bit
}
public enum SmartSizeMode
{
[LocalizedAttributes.LocalizedDescription(nameof(Language.strNoSmartSize))]
SmartSNo,
[LocalizedAttributes.LocalizedDescription(nameof(Language.strFree))]
SmartSFree,
[LocalizedAttributes.LocalizedDescription(nameof(Language.strAspect))]
SmartSAspect
}
#endregion
}
}

View File

@@ -16,7 +16,7 @@ namespace mRemoteNG.Connection.Protocol.VNC
public enum Compression
{
[LocalizedAttributes.LocalizedDescription("strNoCompression")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strNoCompression))]
CompNone = 99,
[Description("0")] Comp0 = 0,
[Description("1")] Comp1 = 1,
@@ -44,44 +44,44 @@ namespace mRemoteNG.Connection.Protocol.VNC
public enum AuthMode
{
[LocalizedAttributes.LocalizedDescription("VNC")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strVnc))]
AuthVNC,
[LocalizedAttributes.LocalizedDescription("Windows")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strWindows))]
AuthWin
}
public enum ProxyType
{
[LocalizedAttributes.LocalizedDescription("strNone")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strNone))]
ProxyNone,
[LocalizedAttributes.LocalizedDescription("strHttp")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strHttp))]
ProxyHTTP,
[LocalizedAttributes.LocalizedDescription("strSocks5")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strSocks5))]
ProxySocks5,
[LocalizedAttributes.LocalizedDescription("strUltraVncRepeater")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strUltraVncRepeater))]
ProxyUltra
}
public enum Colors
{
[LocalizedAttributes.LocalizedDescription("strNormal")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strNormal))]
ColNormal,
[Description("8-bit")] Col8Bit
}
public enum SmartSizeMode
{
[LocalizedAttributes.LocalizedDescription("strNoSmartSize")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strNoSmartSize))]
SmartSNo,
[LocalizedAttributes.LocalizedDescription("strFree")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strFree))]
SmartSFree,
[LocalizedAttributes.LocalizedDescription("strAspect")]
[LocalizedAttributes.LocalizedDescription(nameof(Language.strAspect))]
SmartSAspect
}
}

BIN
mRemoteV1/Console.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -12,7 +12,7 @@ The application is released under the GPLv2_ and is being managed on GitHub_.
As of now mRemoteNG supports the following protocols:
RDP - SSH - VNC - ICA - Telnet - RAW - RLogin - HTTP/S
RDP - SSH - VNC - ICA - Telnet - RAW - RLogin - HTTP/S - PowerShell
.. toctree::
:maxdepth: 2

View File

@@ -110,7 +110,7 @@ This will allow you to connect to a specific COM serial port using PuTTY.
Create a new connection entry with the following information:
- Name: Serial COM***X***
- Name: Serial COM**X**
- Protocol: Ext. App
- External Tool: COM Serial Port
- Port: your desired COM port # here
@@ -122,11 +122,3 @@ Windows PowerShell is a task-based command-line shell and scripting language des
- Filename: %WINDIR%\\system32\\WindowsPowerShell\\v1.0\\PowerShell_ISE.exe
- Arguments: args here
- Can integrate: Yes
PowerShell, Enter-PSSession
===========================
This will allow you to right-click a Windows connection entry and use the hostname and user/password entry to begin a remote PowerShell session.
- Filename: %WINDIR%\\system32\\WindowsPowerShell\\v1.0\\PowerShell.exe
- Arguments: -NoExit -Command "$password = ConvertTo-SecureString '%PASSWORD%' -AsPlainText -Force; $cred = New-Object System.Management.Automation.PSCredential -ArgumentList @('%Domain%\\%Username%', $password); Enter-PSSession -ComputerName %Hostname% -Credential $cred"
- Can integrate: No

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -15,7 +15,7 @@ GO
CREATE TABLE [dbo].[tblCons] (
ID int NOT NULL IDENTITY(1,1),
ConstantID varchar(128),
ConstantID varchar(128) NOT NULL PRIMARY KEY,
PositionID int NOT NULL,
ParentID varchar(128),
LastChange datetime NOT NULL,
@@ -140,9 +140,12 @@ CREATE TABLE [dbo].[tblCons] (
InheritRdpVersion bit DEFAULT ((0)) NOT NULL,
VmId varchar(100),
UseVmId bit,
InheritVmId bit,
InheritUseVmId bit
) GO
UseEnhancedMode bit DEFAULT ((0)),
InheritVmId bit ,
InheritUseVmId bit,
InheritUseEnhancedMode bit DEFAULT ((0))
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[tblRoot] (
[Name] [varchar] (2048) NOT NULL ,

View File

@@ -18,7 +18,7 @@ DROP TABLE IF EXISTS `tblCons`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tblCons` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`ConstantID` varchar(128) DEFAULT NULL,
`ConstantID` varchar(128) NOT NULL,
`PositionID` int(11) NOT NULL,
`ParentID` varchar(128) DEFAULT NULL,
`LastChange` datetime NOT NULL,
@@ -143,9 +143,12 @@ CREATE TABLE `tblCons` (
`InheritRdpVersion` tinyint(1) NOT NULL DEFAULT 0,
`VmId` varchar(512) DEFAULT NULL,
`UseVmId` tinyint(1) DEFAULT NULL,
`UseEnhancedMode` tinyint(1) DEFAULT NULL,
`InheritVmId` tinyint(1) DEFAULT NULL,
`InheritUseVmId` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`ID`)
`InheritUseEnhancedMode` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`ConstantID`),
UNIQUE (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=3324 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

View File

@@ -11,6 +11,7 @@ User Interface
user_interface/panels.rst
user_interface/menus.rst
user_interface/connections.rst
user_interface/default_connection_properties.rst
user_interface/quick_connect.rst
user_interface/port_scan.rst
user_interface/screenshot_manager.rst

View File

@@ -0,0 +1,34 @@
*****************************
Default Connection Properties
*****************************
Default connection properties are a template that is applied when creating new connections. You can set both property values and inheritance settings that will be set in new connections.
.. note::
Currently, default connection properties are saved within the user settings of mRemoteNG and not with the connection file. Sharing a connection file between multiple machines will not share default connection properties.
How it is used
==============
New Folders/Connections
-----------------------
When a new folder or connection is created, all default properties and default inheritance are applied to it.
.. note::
Changing default properties does not affect existing connections. The default values are only applied when the connection is first created.
Quick Connections
-----------------
Default connection properties are also used when establishing quick connections. See :doc:`quick_connect` for more details.
How to set them
===============
You can set default properties and inheritance by going to the Connection Tree and clicking the appropriate button for the default settings you would like to change.
.. figure:: /images/default_properties.png
- **Red** - Default connection properties
- **Green** - Default connection inheritance

View File

@@ -162,37 +162,3 @@ To disable both argument splitting and shell metacharacter escaping for a variab
For example, %!USERFIELD%. This is not recommended and may cause unexpected results.
Only variables that have been expanded will be escaped. It is up to you to escape the rest of the arguments.
Variable Examples
=================
+-------------------+----------------+------------------------+
| Arguments | User Field | Result |
+===================+================+========================+
| %USERFIELD% | "Example" Text | |
+-------------------+----------------+------------------------+
| %-USERFIELD% | "Example" Text | |
+-------------------+----------------+------------------------+
| %!USERFIELD% | "Example" Text | |
+-------------------+----------------+------------------------+
| ^%USERFIELD^% | "Example" Text | |
+-------------------+----------------+------------------------+
| ^^%USERFIELD^^% | "Example" Text | |
+-------------------+----------------+------------------------+
| -d "%USERFIELD%" | c:\\Example\\ | |
+-------------------+----------------+------------------------+
| -d "%-USERFIELD%" | c:\\Example\\ | |
+-------------------+----------------+------------------------+
| -d "%USERFIELD%" | Left & Right | |
+-------------------+----------------+------------------------+
| -d "%!USERFIELD%" | Left & Right | |
+-------------------+----------------+------------------------+
| %WINDIR% | N/A | |
+-------------------+----------------+------------------------+
| \\%WINDIR\\% | N/A | |
+-------------------+----------------+------------------------+
| \\^%WINDIR\\^% | N/A | |
+-------------------+----------------+------------------------+
| \\%WINDIR\\% | N/A | |
+-------------------+----------------+------------------------+

View File

@@ -23,4 +23,14 @@ Select the appropriate network protocol by clicking the arrow next to the Connec
.. figure:: /images/quick_connect_03.png
If you wish to use an existing connection, select the globe icon next to the protocol button and select the appropriate connection.
If you wish to use an existing connection, select the globe icon next to the protocol button and select the appropriate connection.
Configuration
=============
Quick connections take most of their configuration from the :doc:`default_connection_properties`.
All default properties are used `except` for:
- Hostname
- Protocol
- Port (the default port for the selected protocol is used)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

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