mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-18 14:39:32 +08:00
Compare commits
141 Commits
1.74Alpha1
...
v1.74
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ebd255a22 | ||
|
|
6ec4bdd926 | ||
|
|
fe023b798d | ||
|
|
141c916b7b | ||
|
|
49c6219a84 | ||
|
|
0db444e78c | ||
|
|
57c2dc0a88 | ||
|
|
15ba2d3156 | ||
|
|
48e2ba11bf | ||
|
|
aa3e8344fb | ||
|
|
df5e619349 | ||
|
|
0c06983411 | ||
|
|
dda9c1f1af | ||
|
|
6779a02cf9 | ||
|
|
ba7608602b | ||
|
|
92dcd8981d | ||
|
|
cbe18b70ca | ||
|
|
ab26b94808 | ||
|
|
0e176cee74 | ||
|
|
23eaba0d47 | ||
|
|
c6b079c9cb | ||
|
|
9d544fa7fe | ||
|
|
8aba1be3e6 | ||
|
|
72d28c5219 | ||
|
|
283714f88c | ||
|
|
063be0dbe2 | ||
|
|
1e4656769e | ||
|
|
3079cad8d6 | ||
|
|
d5c86b91c3 | ||
|
|
d5de0b8fa3 | ||
|
|
167c02f433 | ||
|
|
327e03c3b1 | ||
|
|
5304ecb71d | ||
|
|
64dfa2fa33 | ||
|
|
8f6431f657 | ||
|
|
5a59c8c179 | ||
|
|
2a7fa03df1 | ||
|
|
be009d55f4 | ||
|
|
d8789926a7 | ||
|
|
e7de6bd42b | ||
|
|
3f6b70e783 | ||
|
|
d1ab5cc40f | ||
|
|
a8376ebb96 | ||
|
|
f0456cce0e | ||
|
|
bc46f8c432 | ||
|
|
4de8a8e915 | ||
|
|
4f0d425711 | ||
|
|
7679c255f3 | ||
|
|
3027ba6dc7 | ||
|
|
9b556436bb | ||
|
|
1c84205a5e | ||
|
|
d39373a4f5 | ||
|
|
3dbfdf3b5b | ||
|
|
286cfc961e | ||
|
|
3148879bf7 | ||
|
|
70924b6823 | ||
|
|
2a63fe6a09 | ||
|
|
91c09ebd7e | ||
|
|
4957e62765 | ||
|
|
80ef32b8b5 | ||
|
|
39bf3e754d | ||
|
|
3d8c0ce181 | ||
|
|
07042d16b0 | ||
|
|
fce583a346 | ||
|
|
7ba5a3b8cd | ||
|
|
ae16c021da | ||
|
|
70ff34438f | ||
|
|
b105585f5a | ||
|
|
29c7859ea1 | ||
|
|
678194f4f7 | ||
|
|
60353be2c0 | ||
|
|
6410acbb48 | ||
|
|
731c2e22b8 | ||
|
|
cd950f39b4 | ||
|
|
8cbf56f7a5 | ||
|
|
17f986ea26 | ||
|
|
e5f9fce01e | ||
|
|
4c34a88a10 | ||
|
|
324d34aa3c | ||
|
|
3f984fb65e | ||
|
|
c108c60c30 | ||
|
|
cf1a84f4b2 | ||
|
|
350afcdb70 | ||
|
|
e5b319e518 | ||
|
|
a43785d1f0 | ||
|
|
b90981a17c | ||
|
|
47bbe20001 | ||
|
|
668b9dd903 | ||
|
|
6ca98149a7 | ||
|
|
af2de33809 | ||
|
|
737054873e | ||
|
|
1dd0961a48 | ||
|
|
3fcb6bcbd0 | ||
|
|
53660cc7dc | ||
|
|
996af9b268 | ||
|
|
512044617c | ||
|
|
a91f712735 | ||
|
|
fb7a0fcb50 | ||
|
|
749ed5432b | ||
|
|
53be4c259e | ||
|
|
e32630511d | ||
|
|
c9a6d69d6f | ||
|
|
5a78a71316 | ||
|
|
da9680d210 | ||
|
|
1ec37d657d | ||
|
|
99df3df42c | ||
|
|
1c83609971 | ||
|
|
32da8433bb | ||
|
|
485536dc90 | ||
|
|
0b605ddb70 | ||
|
|
755d7b0742 | ||
|
|
15030ab7cb | ||
|
|
a438d6c3c3 | ||
|
|
865a926047 | ||
|
|
a36ec166cf | ||
|
|
77e702da6c | ||
|
|
1560339377 | ||
|
|
f0aaab1299 | ||
|
|
4eced42981 | ||
|
|
1da2839cc3 | ||
|
|
0200281732 | ||
|
|
3d9f9ff4c2 | ||
|
|
60048b4450 | ||
|
|
4bd67c15c0 | ||
|
|
3237e18d2d | ||
|
|
fe17123707 | ||
|
|
a51df79925 | ||
|
|
efbe78a77e | ||
|
|
9f860a3f3e | ||
|
|
9dc5442743 | ||
|
|
e2d66235b5 | ||
|
|
cafad5599d | ||
|
|
6d8f375ae1 | ||
|
|
a055d7f4a8 | ||
|
|
09102325eb | ||
|
|
33c9774b21 | ||
|
|
d7f64fec4f | ||
|
|
eab5a42d93 | ||
|
|
5c7f120a7e | ||
|
|
d7d78d8053 | ||
|
|
cde7f114f9 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -279,3 +279,6 @@ Installer/Resources/License.rtf
|
||||
Installer/Fragments/FilesFragment.wxs
|
||||
Installer Projects/Installer/Resources/License.rtf
|
||||
Installer Projects/Installer/Fragments/FilesFragment.wxs
|
||||
Installer Projects/Installer/Fragments/HelpFilesFragment.wxs
|
||||
InstallerProjects/Installer/Fragments/FilesFragment.wxs
|
||||
InstallerProjects/Installer/Resources/License.rtf
|
||||
|
||||
117
CHANGELOG.TXT
117
CHANGELOG.TXT
@@ -1,8 +1,72 @@
|
||||
1.73 Beta 2 ():
|
||||
1.74 (2016-06-28):
|
||||
|
||||
Supported Platforms/Components:
|
||||
-------------------------------
|
||||
Windows 7 SP1 (with RDP Client v8: KB2592687/KB2923545) or later
|
||||
.NET Framework 4 or later
|
||||
XULRunner is no longer required for Gecko support (see below)
|
||||
|
||||
|
||||
General Changes:
|
||||
----------------
|
||||
Converted source from Visual Basic to C Sharp
|
||||
Lots of code refactoring/clean up/general stability changes
|
||||
MR-714: Removed Keyboard shortcut functionality
|
||||
- Introduced in 1.73 beta that was never officially released
|
||||
- This caused stability issues
|
||||
- May be re-added in a future release
|
||||
- Removal does *NOT* impact the ability to send keyboard shortcuts to RDP sessions (when redirect key combinations is set to "yes")
|
||||
MR-559: Removed RDP Sessions panel functionality. This required a library for which no trusted origin/source could be located
|
||||
Removed a bunch of old code/libraries and replaced them accordingly
|
||||
|
||||
|
||||
Security Updates:
|
||||
-----------------
|
||||
MR-775, MR-745: Updated PuTTY to 0.67
|
||||
|
||||
|
||||
Features/Enhancements:
|
||||
----------------------
|
||||
Updated to latest DockPanelSuite and enabled a slick new theme!
|
||||
MR-145: Installer is now MSI based
|
||||
MR-255: Updated RDP Client to version 8
|
||||
MR-389: Updates to IE rendering engine
|
||||
- Support for latest version of IE (9-11)
|
||||
- Dropped support for IE 7 & IE 8
|
||||
MR-850: Replaced XULRunner with GeckoFx
|
||||
- No need to manually configure to have the Gecko rendering engine available now
|
||||
- Install image is now significantly larger due to the inclusion of the Gecko Engine
|
||||
MR-821: Initial Japanese translation included
|
||||
Port Scan is now Asynchronous (and is significantly faster)
|
||||
|
||||
|
||||
Fixes:
|
||||
------
|
||||
MR-874: Added work-around to installer to ignore installation prerequisites
|
||||
MR-884: Slow startup in some scnearios checking authenticode certificate
|
||||
MR-872: Crash in External Tools when arguments aren't quoted
|
||||
MR-854: crashes when right clicking on connection tab
|
||||
MR-852: Option "Allow only a single instance of the application" non-functional
|
||||
MR-836: Trying to delete a folder of connections only deletes 2 connections at a time
|
||||
MR-824, MR-706: Suppress Script Errors when using the IE rendering engine
|
||||
MR-822: Improve RDP error code messages
|
||||
MR-640: Fixed Inheritance not working
|
||||
MR-639: RDP: Connect to console session
|
||||
MR-610, MR-582, MR-451: RDP: Protocol Error 3334 or exceptions with large number of connections open
|
||||
- This problem appears largely resolved by most reports and testing
|
||||
- Further workarounds/problem avoidance: Disable Bitmap Caching on all RDP session configuration
|
||||
MR-429: Display issue on the Options -> Advanced panel
|
||||
MR-385: Inheritance settings lost when moving item to the root of the tree
|
||||
|
||||
|
||||
|
||||
1.73 Beta 2 (NEVER RELEASED):
|
||||
Fixed issue MR-619 - Keyboard shortcuts stop working after locking the screen with Win+L
|
||||
Added support for importing files from PuTTY Connection Manager.
|
||||
Improved the import and export functionality.
|
||||
|
||||
|
||||
|
||||
1.73 Beta 1 (2013-11-19):
|
||||
Added feature MR-16 - Add keyboard shortcuts to switch between tabs
|
||||
Added feature MR-141 - Add a default protocol option
|
||||
@@ -19,7 +83,7 @@
|
||||
Fixed issue MR-556 - Export fails when overwriting an existing file
|
||||
Fixed issue MR-594 - Crash on startup if write access is denied to the IE browser emulation registry key
|
||||
Fixed issue MR-603 - Some configuration options are still shown even when inheritance is enabled
|
||||
Added "Reset" to config panel context menu to allow resetting some config settings to their default value.
|
||||
MR-590: Added "Reset" to config panel context menu to allow resetting some config settings to their default value.
|
||||
Added and improved menu icons.
|
||||
Removed misleading log messages about RD Gateway support.
|
||||
Removed invalid "Site" configuration option from PuTTY Saved Sessions.
|
||||
@@ -27,10 +91,14 @@
|
||||
Fixed config panel showing settings from previously loaded connection file after loading a new one.
|
||||
Improved handling of variables in external tool arguments.
|
||||
|
||||
|
||||
|
||||
1.72 (2013-11-13):
|
||||
Fixed issue MR-592 - Unable to run VBS script as an external tool
|
||||
Fixed issue MR-596 - Incorrect escaping of quotation marks in external tool arguments
|
||||
|
||||
|
||||
|
||||
1.71 (2013-10-29):
|
||||
Fixed issue MR-574 - Crash when retrieving RDP session list if eolwtscom.dll is not registered
|
||||
Fixed issue MR-578 - Connections file is reset
|
||||
@@ -40,12 +108,16 @@
|
||||
Improved error reporting when loading connections files.
|
||||
Removed warning message when mRemoteNG is started for the first time about new connections file being created.
|
||||
|
||||
|
||||
|
||||
1.71 Release Candidate 2 (2013-10-16):
|
||||
Fixed issue MR-560 - Cannot Auto-Update With Open Connections: Unable to find an entry point named 'TaskDialogIndirect' in DLL 'ComCtl32'
|
||||
Fixed issue MR-565 - Double Folder keep heritage on the initial Folder
|
||||
Fixed issue MR-566 - Typo in German UI Automatic Update Settings
|
||||
Fixed duplicated folders possibly being named "New Connection" instead of the original folder's name.
|
||||
|
||||
|
||||
|
||||
1.71 Release Candidate 1 (2013-10-01):
|
||||
Fixed issue MR-495 - Having a negative range in port scan creates memory exhaustion.
|
||||
Fixed issue MR-514 - Window Proxy test failed without close button
|
||||
@@ -62,11 +134,15 @@
|
||||
Added Chinese (Traditional) translation.
|
||||
Added partial Greek and Hungarian translations.
|
||||
|
||||
|
||||
|
||||
1.71 Beta 5 (2013-06-09):
|
||||
Fixed issue MR-491 - Could not start RDP Connection
|
||||
Fixed issue MR-499 - TS Gateway is not working in latest release 1.71
|
||||
Fixed typo in SQL queries.
|
||||
|
||||
|
||||
|
||||
1.71 Beta 4 (2013-05-28):
|
||||
Added feature MR-435 - Add digital signature check to updater
|
||||
Fixed issue MR-255 - The version of the RDP AX client should be updated to 7
|
||||
@@ -98,6 +174,8 @@
|
||||
Lowered required version of RDC from 6.1 to 6.0.
|
||||
Updated VncSharpNG to 1.3.4896.25007.
|
||||
|
||||
|
||||
|
||||
1.71 Beta 3 (2013-03-20):
|
||||
Fixed issue MR-397 - Putty disappears from the screen
|
||||
Fixed issue MR-398 - Full Screen mode doesn't correctly make use of available space
|
||||
@@ -109,6 +187,8 @@
|
||||
Fixed the category names in the themes tab of the options dialog on Windows XP not showing correctly.
|
||||
Fixed PuTTY saved sessions with spaces or special characters not being listed.
|
||||
|
||||
|
||||
|
||||
1.71 Beta 2 (2013-03-19):
|
||||
Added feature MR-336 - Customizable background color for the windows/panels
|
||||
Added feature MR-345 - Two separate options for confirming closure of Tabs and Connection Panels
|
||||
@@ -124,6 +204,8 @@
|
||||
Changed "Automatically get session information" to be disabled by default.
|
||||
RDP connections can now be switched to full screen mode when redirect key combinations is enabled.
|
||||
|
||||
|
||||
|
||||
1.71 Beta 1 (2013-03-04):
|
||||
Added feature MR-329 - Create Option to disable the "Quick: " prefix
|
||||
Fixed issue MR-67 - Sort does not recursively sort
|
||||
@@ -142,6 +224,8 @@
|
||||
If RDC 7.0 or higher is installed, the connection bar is no longer briefly shown when connecting to an RDP connection with redirect key combinations enabled.
|
||||
If RDC 8.0 or higher is installed, RDP connections automatically adjust their size when the window is resized or when toggling full screen mode.
|
||||
|
||||
|
||||
|
||||
1.70 (2013-03-07):
|
||||
Fixed issue MR-339 - Connection group collapses with just one click
|
||||
Fixed issue MR-340 - Object reference not set to an instance of an object.
|
||||
@@ -150,11 +234,15 @@
|
||||
Fixed issue MR-355 - Moving sub folders to top level causes property loss
|
||||
Fixed tabs not closing on double-click when the active tab is a PuTTY connection.
|
||||
|
||||
|
||||
|
||||
1.70 Release Candidate 2 (2013-02-25):
|
||||
Fixed issue MR-332 - Can't select different tab with one click after disconnecting existing tab
|
||||
Fixed issue MR-338 - PuTTYNG crashing on fresh install of mRemoteNG
|
||||
Re-enabled PuTTYNG integration enhancements on Windows 8
|
||||
|
||||
|
||||
|
||||
1.70 Release Candidate 1 (2013-02-22):
|
||||
Fixed issue MR-183 - Error trying to save connections when using SQL - Invalid column name _parentConstantId
|
||||
Fixed issue MR-225 - Tabs do not open in a panel until multiple panels are displayed.
|
||||
@@ -168,6 +256,8 @@
|
||||
Fixed "Decryption failed. Padding is invalid and cannot be removed." notification.
|
||||
Fixed KiTTY opening in a separate window when using a saved session.
|
||||
|
||||
|
||||
|
||||
1.70 Beta 2 (2013-02-18):
|
||||
Fixed issue MR-47 - Silent Installation Prompts for Language
|
||||
Fixed issue MR-54 - Error When disconnecting from SSL channel RDP
|
||||
@@ -210,6 +300,7 @@
|
||||
Improved the use of Tab and Shift-Tab to cycle through entries in the Config grid.
|
||||
Improved loading of XML files from older versions of mRemote/mRemoteNG.
|
||||
|
||||
|
||||
1.70 Beta 1 (2012-02-27):
|
||||
Fixed issue MR-77 - VerifyDatabaseVersion (Config.Connections.Save) failed. Version string portion was too short or too long.
|
||||
Fixed issue MR-78 - Renaming Connections
|
||||
@@ -234,6 +325,8 @@
|
||||
Updated VncSharpNG to version 1.2.4440.36644.
|
||||
Added debugging symbols for VncSharpNG.
|
||||
|
||||
|
||||
|
||||
1.69 (2011-12-09):
|
||||
Fixed issue #66 - Fresh Install Fails to Create Config
|
||||
Fixed issue #69 - Connection file gets erased
|
||||
@@ -245,11 +338,15 @@
|
||||
Binaries are now digitally signed
|
||||
Added Credits, License, and Version History items to the Start Menu and made Start Menu item names localizable.
|
||||
|
||||
|
||||
|
||||
1.68 (2011-07-07):
|
||||
Fixed issue #48 - VerifyDatabaseVersion fails with new (empty) database tables.
|
||||
Fixed issue #60 - Can't save connections file
|
||||
Fixed issue #62 - Connection file error upon launch.
|
||||
|
||||
|
||||
|
||||
1.67 (2011-06-05):
|
||||
Fixed migration of external tools configuration and panel layout from Local to Roaming folder.
|
||||
Disable ICA Hotkeys for Citrix connections. Fixes issue with international users.
|
||||
@@ -281,9 +378,13 @@
|
||||
Fixed tab order of controls in Options dialog.
|
||||
Fixed bug 45 - Changing some settings in the config file may not save.
|
||||
|
||||
|
||||
|
||||
1.66 (2011-05-02):
|
||||
Fixed connections not working
|
||||
|
||||
|
||||
|
||||
1.65 (2011-05-02):
|
||||
Fixed Ctrl-Tab and Ctrl-Shift-Tab not working in any other applications while mRemoteNG is running
|
||||
Ctrl-Tab and Ctrl-Shift-Tab no longer work to switch tabs within mRemoteNG
|
||||
@@ -291,6 +392,8 @@
|
||||
Fixed bug 38 - Application uses the wrong Application Data settings folder (in Local Settings)
|
||||
Added code to the installer to check that the user is in the 'Power Users' or 'Administrators' group
|
||||
|
||||
|
||||
|
||||
1.64 (2011-04-27):
|
||||
Fixed bug 6 - VNC CTRL+key & keyboard combo mappings are broken
|
||||
Fixed bug 12 - Tab switch is not working in config panel
|
||||
@@ -310,6 +413,8 @@
|
||||
Updated DockPanel Suite to version 2.5 RC1
|
||||
Updated VNCSharpNG to correct Ctrl and Alt key pass-through behavior
|
||||
|
||||
|
||||
|
||||
1.63 (2010-02-02):
|
||||
New icon and logo
|
||||
Fixed problems moving or resizing the main window while PuTTY (SSH/telnet/rlogin/raw) connections are open
|
||||
@@ -325,6 +430,8 @@
|
||||
Popups can now be allowed in Internet Explorer by holding Ctrl+Alt when clicking a link
|
||||
Added PuTTY Settings item to tab context menu
|
||||
|
||||
|
||||
|
||||
1.62 (2010-01-19):
|
||||
Switched to VncSharp, an open source VNC component
|
||||
VNC is supported again except for the following features:
|
||||
@@ -341,10 +448,14 @@
|
||||
Added RDP, VNC and ICA version numbers to Components Check page
|
||||
Fixed a bug with the inheritance buttons on the Config panel disappearing after awhile
|
||||
|
||||
|
||||
|
||||
1.61 (2010-01-14):
|
||||
Removed unlicensed SmartCode Solutions ViewerX VNC Viewer ActiveX
|
||||
This version of mRemoteNG does not support VNC
|
||||
|
||||
|
||||
|
||||
1.60 (2010-01-09):
|
||||
Changed name to mRemoteNG
|
||||
Fixed menu bar not staying docked to left side
|
||||
@@ -357,6 +468,8 @@
|
||||
Moved Check for Updates to the Help menu
|
||||
Changed website links in Help menu and About page to load within mRemoteNG instead of launching an external browser
|
||||
|
||||
-----
|
||||
|
||||
1.50:
|
||||
Added the following formats to the "Save Connections As" function:
|
||||
mRemote CSV (standard CSV file with all properties)
|
||||
|
||||
53
CREDITS.TXT
53
CREDITS.TXT
@@ -1,20 +1,28 @@
|
||||
Contributors
|
||||
============
|
||||
|
||||
Current mRemoteNG dev team:
|
||||
David Sparer (github.com/sparerd)
|
||||
Hayato Iriumi (github.com/hiriumi)
|
||||
Sean Kaim (github.com/kmscode)
|
||||
|
||||
Felix Deimel - mRemote original developer
|
||||
Riley McArdle - mRemoteNG original developer
|
||||
|
||||
github.com/Brandhor
|
||||
|
||||
|
||||
Past Contributors
|
||||
=================
|
||||
Jason Barbier
|
||||
Wiktor Beryt
|
||||
Lionel Caignec
|
||||
Ruben d'Arco
|
||||
Felix Deimel
|
||||
Holger Henke
|
||||
Tom Hiller
|
||||
Riley McArdle
|
||||
Apisitt Rattana
|
||||
Andreas Rehm
|
||||
David Vidmar
|
||||
David Sparer
|
||||
Hayato Iriumi
|
||||
Sean Kaim
|
||||
|
||||
|
||||
Translators
|
||||
@@ -24,6 +32,8 @@ Eugenio "Ryo567" Mart
|
||||
Mathieu Pape
|
||||
Emanuel Silva
|
||||
Robert Siwiec
|
||||
Hayato Iriumi
|
||||
Sebastien Thieury (github.com/SebThieu)
|
||||
|
||||
|
||||
Included Source Code
|
||||
@@ -34,15 +44,18 @@ Copyright
|
||||
MIT License
|
||||
http://www.codeproject.com/KB/recipes/command_line.aspx
|
||||
|
||||
DotNetVer
|
||||
Copyright <20> 2010 David Grinberg
|
||||
Copyright <20> 2010-2011 Brandon Hansen
|
||||
http://nsis.sourceforge.net/DotNetVer
|
||||
FilteredPropertyGrid
|
||||
Copyright <20> 2006 Azuria
|
||||
http://www.codeproject.com/KB/cs/FilteredPropertyGrid.aspx
|
||||
|
||||
Hotkey Selection Control for .NET
|
||||
Copyright <20> 2006 Thomas Backman
|
||||
http://www.codeproject.com/Articles/15085/A-simple-hotkey-selection-control-for-NET
|
||||
|
||||
InputBox
|
||||
Copyright <20> 2016 Jan Slama
|
||||
http://www.csharp-examples.net/inputbox/
|
||||
|
||||
IP TextBox
|
||||
Copyright <20> 2005 mawnkay
|
||||
http://www.codeproject.com/Articles/11576/IP-TextBox
|
||||
@@ -61,19 +74,15 @@ Copyright
|
||||
Modified New BSD License
|
||||
http://www.mentalis.org/
|
||||
|
||||
DockPanel Suite 2.3.1
|
||||
Copyright <20> 2007 Weifen Luo
|
||||
DockPanel Suite 2.10.0.beta2
|
||||
Copyright <20> 2015 @roken and @lextm (formerly Weifen Luo)
|
||||
MIT License
|
||||
http://sourceforge.net/projects/dockpanelsuite/
|
||||
https://github.com/dockpanelsuite/dockpanelsuite
|
||||
|
||||
FilteredPropertyGrid 1.0.0.0
|
||||
Copyright <20> 2006 Azuria
|
||||
http://www.codeproject.com/KB/cs/FilteredPropertyGrid.aspx
|
||||
|
||||
GeckoFX 1.8.1.4
|
||||
Copyright <20> 2008 Skybound Software
|
||||
Mozilla Public License 1.1
|
||||
http://www.geckofx.org/
|
||||
GeckoFX 45
|
||||
Copyright <20> 2016 Tom Hindle
|
||||
Mozilla Public License
|
||||
https://bitbucket.org/geckofx/
|
||||
|
||||
log4net 1.2.15.0
|
||||
Copyright <20> 2001-2015 The Apache Software Foundation
|
||||
@@ -90,10 +99,6 @@ Copyright
|
||||
Modified New BSD License
|
||||
http://www.mentalis.org/
|
||||
|
||||
MiniGeckoBrowser 1.0
|
||||
Copyright <20> 2008 Felix Deimel
|
||||
http://www.appjuice.org/
|
||||
|
||||
PuTTY 0.67
|
||||
Copyright <20> 1997-2016 Simon Tatham
|
||||
MIT License
|
||||
|
||||
@@ -8,13 +8,13 @@ xmlns:wix="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<xsl:apply-templates select="@*|node()"/>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
<xsl:key name="service-search" match="wix:Component[contains(wix:File/@Source, '.pdb')]" use="@Id" />
|
||||
<xsl:key name="service-search" match="wix:Component[contains(wix:File/@Source, '.xml')]" use="@Id" />
|
||||
<xsl:key name="service-search" match="wix:Component[contains(wix:File/@Source, 'app.config')]" use="@Id" />
|
||||
<xsl:key name="service-search" match="wix:Component[contains(wix:File/@Source, 'vshost')]" use="@Id" />
|
||||
<xsl:key name="service-search" match="wix:Component[contains(wix:File/@Source, 'manifest')]" use="@Id" />
|
||||
<xsl:key name="service-search" match="wix:Component[contains(wix:File/@Source, '.application')]" use="@Id" />
|
||||
<xsl:key name="service-search" match="wix:Component[wix:File/@Source = '$(var.HarvestPath)\mRemoteNG.exe']" use="@Id" />
|
||||
<xsl:key name="service-search" match="wix:Component[wix:File/@Source = '$(var.HarvestPath)\PuTTYNG.exe']" use="@Id" />
|
||||
<xsl:template match="wix:Component[key('service-search', @Id)]" />
|
||||
<xsl:template match="wix:ComponentRef[key('service-search', @Id)]" />
|
||||
</xsl:stylesheet>
|
||||
@@ -4,7 +4,8 @@
|
||||
<Fragment>
|
||||
<Directory Id="TARGETDIR" Name="SourceDir">
|
||||
<Directory Id="$(var.PlatformProgramFilesFolder)">
|
||||
<Directory Id="APPLICATIONROOTDIRECTORY" Name="$(var.ProductName)" />
|
||||
<Directory Id="APPLICATIONROOTDIRECTORY" Name="$(var.ProductName)">
|
||||
</Directory>
|
||||
</Directory>
|
||||
|
||||
<Directory Id="DesktopFolder" Name="!(loc.Folders_Desktop)" />
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<Fragment>
|
||||
<DirectoryRef Id="APPLICATIONROOTDIRECTORY">
|
||||
<Component Id="C.PuttyNGFile" Guid="*">
|
||||
<File Id="PuttyNGFile" Name="PuTTYNG.exe" Source="Dependencies\PuTTYNG.exe" KeyPath="yes" />
|
||||
<File Id="PuttyNGFile" Name="PuTTYNG.exe" Source="$(var.HarvestPath)\PuTTYNG.exe" KeyPath="yes" />
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
</Fragment>
|
||||
@@ -18,6 +18,7 @@
|
||||
<?define RequiredDotNetFrameworkVersion = "$(var.RequiredDotNetFrameworkMajorVersion).$(var.RequiredDotNetFrameworkMinorVersion)" ?>
|
||||
<?define RDP80KB = "KB2592687" ?>
|
||||
<?define RDP81KB = "KB2923545" ?>
|
||||
<?define IGNOREPREREQUISITES = 0 ?>
|
||||
|
||||
<?if $(var.Platform) = x64 ?>
|
||||
<?define ProductNameWithPlatform = "$(var.ProductName) (64 bit)" ?>
|
||||
@@ -98,22 +98,46 @@
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<LinkerAdditionalOptions>
|
||||
</LinkerAdditionalOptions>
|
||||
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteV1\bin\Release;</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>REM Harvest bin directory of the mRemoteV1 project
|
||||
call "$(WIX)bin\heat.exe" dir "$(SolutionDir)mRemoteV1\bin\$(Configuration)" -ag -dr APPLICATIONROOTDIRECTORY -var var.HarvestPath -srd -cg MandatoryComponents -template fragment -out "$(ProjectDir)Fragments\FilesFragment.wxs" -t "$(ProjectDir)Filters\Harvest_Filter.xslt" -v
|
||||
REM Convert the license file "COPYING.TXT" to "License.rtf" to be shown in the installer GUI
|
||||
call "$(ProjectDir)Resources\Pandoc\pandoc.exe" -s -t rtf -o "$(ProjectDir)\Resources\License.rtf" "$(SolutionDir)COPYING.TXT"</PreBuildEvent>
|
||||
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteV1\bin\Release;HelpFilesHarvestPath=$(SolutionDir)mRemoteV1\Resources\Help</DefineConstants>
|
||||
<Cultures>en-US</Cultures>
|
||||
<SuppressPdbOutput>True</SuppressPdbOutput>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<Cultures>en-US</Cultures>
|
||||
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteV1\bin\Debug;</DefineConstants>
|
||||
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteV1\bin\Debug;HelpFilesHarvestPath=$(SolutionDir)mRemoteV1\Resources\Help</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug Portable|x86' ">
|
||||
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteV1\bin\Debug Portable;</DefineConstants>
|
||||
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteV1\bin\Debug Portable;HelpFilesHarvestPath=$(SolutionDir)mRemoteV1\Resources\Help</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release Portable|x86' ">
|
||||
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteV1\bin\Release Portable;</DefineConstants>
|
||||
<DefineConstants>HarvestPath=$(SolutionDir)mRemoteV1\bin\Release Portable;HelpFilesHarvestPath=$(SolutionDir)mRemoteV1\Resources\Help</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>REM Clean the TargetDir
|
||||
rmdir /S /Q "$(TargetDir)"
|
||||
|
||||
echo $(ConfigurationName) > buildenv.tmp
|
||||
|
||||
REM Harvest bin directory of the mRemoteV1 project
|
||||
call "$(WIX)bin\heat.exe" dir "$(SolutionDir)mRemoteV1\bin\$(Configuration)" -ag -dr APPLICATIONROOTDIRECTORY -var var.HarvestPath -srd -cg MandatoryComponents -template fragment -out "$(ProjectDir)Fragments\FilesFragment.wxs" -t "$(ProjectDir)Filters\Harvest_Filter.xslt" -v
|
||||
|
||||
REM Convert the license file "COPYING.TXT" to "License.rtf" to be shown in the installer GUI
|
||||
call "$(ProjectDir)Resources\Pandoc\pandoc.exe" -s -t rtf -o "$(ProjectDir)\Resources\License.rtf" "$(SolutionDir)COPYING.TXT"</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>set /p buildenv=<buildenv.tmp
|
||||
|
||||
REM Sign MSI
|
||||
IF EXIST C:\mRemoteNG_code_signing_cert.pfx (
|
||||
IF %25buildenv: Portable=%25==Release (
|
||||
powershell "&""$(SolutionDir)Tools\signfiles.ps1""" %27%25cd%25%27
|
||||
)
|
||||
)
|
||||
|
||||
REM Rename MSI to include version number
|
||||
powershell "&""$(SolutionDir)Tools\rename_installer_with_version.ps1""" %27$(SolutionDir)%27 %27!(TargetPath)%27
|
||||
|
||||
REM Copy MSI to Release folder
|
||||
IF %25buildenv: Portable=%25==Release (powershell "&""$(SolutionDir)Tools\copy_release_installer.ps1""" %27$(TargetDir)%27 %27$(SolutionDir)Release%27)</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 83 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 451 KiB After Width: | Height: | Size: 451 KiB |
@@ -9,7 +9,7 @@
|
||||
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
|
||||
<MajorUpgrade DowngradeErrorMessage="!(loc.Upgrade_NewerVersionInstalled)" Schedule="afterInstallExecute" />
|
||||
<MediaTemplate EmbedCab="yes" />
|
||||
<Binary Id="CustomActions.CA.dll" SourceFile="$(var.SolutionDir)Installer Projects\CustomActions\bin\$(var.Configuration)\CustomActions.CA.dll" />
|
||||
<Binary Id="CustomActions.CA.dll" SourceFile="$(var.SolutionDir)InstallerProjects\CustomActions\bin\$(var.Configuration)\CustomActions.CA.dll" />
|
||||
<Property Id="ARPPRODUCTICON" Value="mRemoteNG.ico" />
|
||||
<Property Id="ARPHELPLINK" Value="http://www.mremoteng.org" />
|
||||
<Property Id="MAINEXE" Value="$(var.ExeProcessName)" />
|
||||
@@ -22,6 +22,7 @@
|
||||
<PropertyRef Id="WIX_IS_NETFRAMEWORK_40_OR_LATER_INSTALLED" />
|
||||
<Icon Id="mRemoteNG.ico" SourceFile="Resources\mRemoteNG.ico" />
|
||||
|
||||
|
||||
<InstallUISequence>
|
||||
<Custom Action="SetRDP80KBValue" After="AppSearch" />
|
||||
<Custom Action="CheckIfRDP80Installed" After="SetRDP80KBValue">(NOT Installed) AND (VersionNT = 601 OR VersionNT64 = 601)</Custom>
|
||||
@@ -37,19 +38,19 @@
|
||||
</Condition>
|
||||
<!-- Windows 7 or higher required -->
|
||||
<Condition Message="!(loc.Install_OSVersionRequirement)">
|
||||
<![CDATA[Installed OR (VersionNT >= 601) OR (VersionNT64 >= 601)]]>
|
||||
<![CDATA[Installed OR (IGNOREPREREQUISITES = 1) OR (VersionNT >= 601) OR (VersionNT64 >= 601)]]>
|
||||
</Condition>
|
||||
<!-- If Windows 7, SP 1 is required -->
|
||||
<Condition Message="!(loc.Install_Win7RequiresSP1)">
|
||||
<![CDATA[Installed OR (VersionNT >= 602 OR VersionNT64 >= 602) OR ((VersionNT = 601 OR VersionNT64 = 601) AND ServicePackLevel >= 1)]]>
|
||||
<![CDATA[Installed OR (IGNOREPREREQUISITES = 1) OR (VersionNT >= 602 OR VersionNT64 >= 602) OR ((VersionNT = 601 OR VersionNT64 = 601) AND ServicePackLevel >= 1)]]>
|
||||
</Condition>
|
||||
<!-- .Net Framework Version Condition -->
|
||||
<Condition Message="!(loc.Install_NeedDotNetFrameworkVersion)">
|
||||
<![CDATA[Installed OR WIX_IS_NETFRAMEWORK_40_OR_LATER_INSTALLED = 1]]>
|
||||
<![CDATA[Installed OR (IGNOREPREREQUISITES = 1) OR WIX_IS_NETFRAMEWORK_40_OR_LATER_INSTALLED = 1]]>
|
||||
</Condition>
|
||||
<!-- If Win7, require RDP 8.0 update (KB2592687) -->
|
||||
<Condition Message="!(loc.Install_RDP80Requirement)">
|
||||
<![CDATA[Installed OR (VersionNT >= 602 OR VersionNT64 >= 602) OR ((VersionNT = 601 OR VersionNT64 = 601) ]]>AND ($(var.RDP80KB) = 1 OR $(var.RDP81KB) = 1))
|
||||
<![CDATA[Installed OR (IGNOREPREREQUISITES = 1) OR (VersionNT >= 602 OR VersionNT64 >= 602) OR ((VersionNT = 601 OR VersionNT64 = 601) ]]>AND ($(var.RDP80KB) = 1 OR $(var.RDP81KB) = 1))
|
||||
</Condition>
|
||||
|
||||
|
||||
@@ -71,7 +72,6 @@
|
||||
|
||||
<Feature Id="F.ApplicationStartMenuShortcut" Title="!(loc.Feature_StartMenuShortcut)" Absent="allow" AllowAdvertise="no" Level="1">
|
||||
<ComponentRef Id="C.ApplicationStartMenuShortcut" Primary="yes" />
|
||||
|
||||
</Feature>
|
||||
</Feature>
|
||||
|
||||
11
Jenkinsfile
vendored
11
Jenkinsfile
vendored
@@ -1,5 +1,6 @@
|
||||
node('windows') {
|
||||
def jobDir = pwd()
|
||||
def solutionFilePath = "\"${jobDir}\\mRemoteV1.sln\""
|
||||
def vsToolsDir = "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\Tools"
|
||||
def vsExtensionsDir = "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\CommonExtensions\\Microsoft\\TestWindow"
|
||||
|
||||
@@ -9,11 +10,15 @@ node('windows') {
|
||||
echo "BranchName: ${branchName}"
|
||||
git([url: gitUrl, branch: branchName])
|
||||
|
||||
stage 'Restore NuGet Packages'
|
||||
def nugetPath = "C:\\nuget.exe"
|
||||
bat "${nugetPath} restore ${solutionFilePath}"
|
||||
|
||||
stage 'Build mRemoteNG (Normal)'
|
||||
bat "\"${vsToolsDir}\\VsDevCmd.bat\" && msbuild.exe /nologo \"${jobDir}\\mRemoteV1.sln\""
|
||||
bat "\"${vsToolsDir}\\VsDevCmd.bat\" && msbuild.exe /nologo /p:Platform=x86 \"${jobDir}\\mRemoteV1.sln\""
|
||||
|
||||
stage 'Build mRemoteNG (Portable)'
|
||||
bat "\"${vsToolsDir}\\VsDevCmd.bat\" && msbuild.exe /nologo /p:Configuration=\"Debug Portable\" \"${jobDir}\\mRemoteV1.sln\""
|
||||
bat "\"${vsToolsDir}\\VsDevCmd.bat\" && msbuild.exe /nologo /p:Configuration=\"Debug Portable\";Platform=x86 \"${jobDir}\\mRemoteV1.sln\""
|
||||
|
||||
stage 'Run Unit Tests'
|
||||
def nunitTestAdapterPath = "C:\\Users\\Administrator\\AppData\\Local\\Microsoft\\VisualStudio\\14.0\\Extensions"
|
||||
@@ -31,7 +36,7 @@ def GetBranchName() {
|
||||
def GetPatternToMatchBranchNameFromDirectory() {
|
||||
def patternToUse = ""
|
||||
def folderSeparator = ""
|
||||
def branchNamePattern = "[a-zA-Z0-9\\-_]*"
|
||||
def branchNamePattern = "[a-zA-Z0-9\\-_.]*"
|
||||
def jenkinsJobInfoTag = "@*[0-9]*"
|
||||
echo "isUnix: ${isUnix()}"
|
||||
if (isUnix()) {
|
||||
|
||||
14
README.txt
14
README.txt
@@ -11,4 +11,16 @@ Currently these protocols are supported:
|
||||
* Telnet (TELecommunication NETwork)
|
||||
* HTTP/S (Hypertext Transfer Protocol)
|
||||
* Rlogin (Rlogin)
|
||||
* RAW
|
||||
* RAW
|
||||
|
||||
mRemoteNG can be installed on Windows 7 or later.
|
||||
|
||||
Windows 7 systems require RDP version 8:
|
||||
https://support.microsoft.com/en-us/kb/2592687
|
||||
OR
|
||||
https://support.microsoft.com/en-us/kb/2923545
|
||||
|
||||
Windows 8+ support RDP version 8+ out of the box.
|
||||
|
||||
RDP versions are backwards compatible, so an mRemoteNG client running on Windows 10 can
|
||||
connection successfully to a Windows 2003 host (for example).
|
||||
BIN
Tools/7zip/7za.dll
Normal file
BIN
Tools/7zip/7za.dll
Normal file
Binary file not shown.
BIN
Tools/7zip/7za.exe
Normal file
BIN
Tools/7zip/7za.exe
Normal file
Binary file not shown.
BIN
Tools/7zip/7zxa.dll
Normal file
BIN
Tools/7zip/7zxa.dll
Normal file
Binary file not shown.
31
Tools/7zip/License.txt
Normal file
31
Tools/7zip/License.txt
Normal file
@@ -0,0 +1,31 @@
|
||||
7-Zip Extra
|
||||
~~~~~~~~~~~
|
||||
License for use and distribution
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Copyright (C) 1999-2016 Igor Pavlov.
|
||||
|
||||
7-Zip Extra files are under the GNU LGPL license.
|
||||
|
||||
|
||||
Notes:
|
||||
You can use 7-Zip Extra on any computer, including a computer in a commercial
|
||||
organization. You don't need to register or pay for 7-Zip.
|
||||
|
||||
|
||||
GNU LGPL information
|
||||
--------------------
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You can receive a copy of the GNU Lesser General Public License from
|
||||
http://www.gnu.org/
|
||||
|
||||
77
Tools/7zip/history.txt
Normal file
77
Tools/7zip/history.txt
Normal file
@@ -0,0 +1,77 @@
|
||||
7-Zip Extra history
|
||||
-------------------
|
||||
|
||||
9.35 beta 2014-12-07
|
||||
------------------------------
|
||||
- SFX modules were moved to LZMA SDK package.
|
||||
|
||||
|
||||
9.34 alpha 2014-06-22
|
||||
------------------------------
|
||||
- Minimum supported system now is Windows 2000 for EXE and DLL files.
|
||||
- all EXE and DLL files use msvcrt.dll.
|
||||
- 7zr.exe now support AES encryption.
|
||||
|
||||
|
||||
9.18 2010-11-02
|
||||
------------------------------
|
||||
- New small SFX module for installers.
|
||||
|
||||
|
||||
9.17 2010-10-04
|
||||
------------------------------
|
||||
- New 7-Zip plugin for FAR Manager x64.
|
||||
|
||||
|
||||
9.10 2009-12-30
|
||||
------------------------------
|
||||
- 7-Zip for installers now supports LZMA2.
|
||||
|
||||
|
||||
9.09 2009-12-12
|
||||
------------------------------
|
||||
- LZMA2 compression method support.
|
||||
- Some bugs were fixed.
|
||||
|
||||
|
||||
4.65 2009-02-03
|
||||
------------------------------
|
||||
- Some bugs were fixed.
|
||||
|
||||
|
||||
4.38 beta 2006-04-13
|
||||
------------------------------
|
||||
- SFX for installers now supports new properties in config file:
|
||||
Progress, Directory, ExecuteFile, ExecuteParameters.
|
||||
|
||||
|
||||
4.34 beta 2006-02-27
|
||||
------------------------------
|
||||
- ISetProperties::SetProperties:
|
||||
it's possible to specify desirable number of CPU threads:
|
||||
PROPVARIANT: name=L"mt", vt = VT_UI4, ulVal = NumberOfThreads
|
||||
If "mt" is not defined, 7za.dll will check number of processors in system to set
|
||||
number of desirable threads.
|
||||
Now 7za.dll can use:
|
||||
2 threads for LZMA compressing
|
||||
N threads for BZip2 compressing
|
||||
4 threads for BZip2 decompressing
|
||||
Other codecs use only one thread.
|
||||
Note: 7za.dll can use additional "small" threads with low CPU load.
|
||||
- It's possible to call ISetProperties::SetProperties to specify "mt" property for decoder.
|
||||
|
||||
|
||||
4.33 beta 2006-02-05
|
||||
------------------------------
|
||||
- Compressing speed and Memory requirements were increased.
|
||||
Default dictionary size was increased: Fastest: 64 KB, Fast: 1 MB,
|
||||
Normal: 4 MB, Max: 16 MB, Ultra: 64 MB.
|
||||
- 7z/LZMA now can use only these match finders: HC4, BT2, BT3, BT4
|
||||
|
||||
|
||||
4.27 2005-09-21
|
||||
------------------------------
|
||||
- Some GUIDs/interfaces were changed.
|
||||
IStream.h:
|
||||
ISequentialInStream::Read now works as old ReadPart
|
||||
ISequentialOutStream::Write now works as old WritePart
|
||||
124
Tools/7zip/readme.txt
Normal file
124
Tools/7zip/readme.txt
Normal file
@@ -0,0 +1,124 @@
|
||||
7-Zip Extra 16.02
|
||||
-----------------
|
||||
|
||||
7-Zip Extra is package of extra modules of 7-Zip.
|
||||
|
||||
7-Zip Copyright (C) 1999-2016 Igor Pavlov.
|
||||
|
||||
7-Zip is free software. Read License.txt for more information about license.
|
||||
|
||||
Source code of binaries can be found at:
|
||||
http://www.7-zip.org/
|
||||
|
||||
This package contains the following files:
|
||||
|
||||
7za.exe - standalone console version of 7-Zip with reduced formats support.
|
||||
7za.dll - library for working with 7z archives
|
||||
7zxa.dll - library for extracting from 7z archives
|
||||
License.txt - license information
|
||||
readme.txt - this file
|
||||
|
||||
Far\ - plugin for Far Manager
|
||||
x64\ - binaries for x64
|
||||
|
||||
|
||||
All 32-bit binaries can work in:
|
||||
Windows 2000 / 2003 / 2008 / XP / Vista / 7 / 8 / 10
|
||||
and in any Windows x64 version with WoW64 support.
|
||||
All x64 binaries can work in any Windows x64 version.
|
||||
|
||||
All binaries use msvcrt.dll.
|
||||
|
||||
7za.exe
|
||||
-------
|
||||
|
||||
7za.exe - is a standalone console version of 7-Zip with reduced formats support.
|
||||
|
||||
Extra: 7za.exe : support for only some formats of 7-Zip.
|
||||
7-Zip: 7z.exe with 7z.dll : support for all formats of 7-Zip.
|
||||
|
||||
7za.exe and 7z.exe from 7-Zip have same command line interface.
|
||||
7za.exe doesn't use external DLL files.
|
||||
|
||||
You can read Help File (7-zip.chm) from 7-Zip package for description
|
||||
of all commands and switches for 7za.exe and 7z.exe.
|
||||
|
||||
7za.exe features:
|
||||
|
||||
- High compression ratio in 7z format
|
||||
- Supported formats:
|
||||
- Packing / unpacking: 7z, xz, ZIP, GZIP, BZIP2 and TAR
|
||||
- Unpacking only: Z, lzma, CAB.
|
||||
- Highest compression ratio for ZIP and GZIP formats.
|
||||
- Fast compression and decompression
|
||||
- Strong AES-256 encryption in 7z and ZIP formats.
|
||||
|
||||
Note: LZMA SDK contains 7zr.exe - more reduced version of 7za.exe.
|
||||
But you can use 7zr.exe as "public domain" code.
|
||||
|
||||
|
||||
|
||||
DLL files
|
||||
---------
|
||||
|
||||
7za.dll and 7zxa.dll are reduced versions of 7z.dll from 7-Zip.
|
||||
7za.dll and 7zxa.dll support only 7z format.
|
||||
Note: 7z.dll is main DLL file that works with all archive types in 7-Zip.
|
||||
|
||||
7za.dll and 7zxa.dll support the following decoding methods:
|
||||
- LZMA, LZMA2, PPMD, BCJ, BCJ2, COPY, 7zAES, BZip2, Deflate.
|
||||
|
||||
7za.dll also supports 7z encoding with the following encoding methods:
|
||||
- LZMA, LZMA2, PPMD, BCJ, BCJ2, COPY, 7zAES.
|
||||
|
||||
7za.dll and 7zxa.dll work via COM interfaces.
|
||||
But these DLLs don't use standard COM interfaces for objects creating.
|
||||
|
||||
Look also example code that calls DLL functions (in source code of 7-Zip):
|
||||
|
||||
7zip\UI\Client7z
|
||||
|
||||
Another example of binary that uses these interface is 7-Zip itself.
|
||||
The following binaries from 7-Zip use 7z.dll:
|
||||
- 7z.exe (console version)
|
||||
- 7zG.exe (GUI version)
|
||||
- 7zFM.exe (7-Zip File Manager)
|
||||
|
||||
Note: The source code of LZMA SDK also contains the code for similar DLLs
|
||||
(DLLs without BZip2, Deflate support). And these files from LZMA SDK can be
|
||||
used as "public domain" code. If you use LZMA SDK files, you don't need to
|
||||
follow GNU LGPL rules, if you want to change the code.
|
||||
|
||||
|
||||
|
||||
|
||||
License FAQ
|
||||
-----------
|
||||
|
||||
Can I use the EXE or DLL files from 7-Zip in a commercial application?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Yes, but you are required to specify in documentation for your application:
|
||||
(1) that you used parts of the 7-Zip program,
|
||||
(2) that 7-Zip is licensed under the GNU LGPL license and
|
||||
(3) you must give a link to www.7-zip.org, where the source code can be found.
|
||||
|
||||
|
||||
Can I use the source code of 7-Zip in a commercial application?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Since 7-Zip is licensed under the GNU LGPL you must follow the rules of that license.
|
||||
In brief, it means that any LGPL'ed code must remain licensed under the LGPL.
|
||||
For instance, you can change the code from 7-Zip or write a wrapper for some
|
||||
code from 7-Zip and compile it into a DLL; but, the source code of that DLL
|
||||
(including your modifications / additions / wrapper) must be licensed under
|
||||
the LGPL or GPL.
|
||||
Any other code in your application can be licensed as you wish. This scheme allows
|
||||
users and developers to change LGPL'ed code and recompile that DLL. That is the
|
||||
idea of free software. Read more here: http://www.gnu.org/.
|
||||
|
||||
|
||||
|
||||
Note: You can look also LZMA SDK, which is available under a more liberal license.
|
||||
|
||||
|
||||
---
|
||||
End of document
|
||||
45
Tools/build-relport.cmd
Normal file
45
Tools/build-relport.cmd
Normal file
@@ -0,0 +1,45 @@
|
||||
@echo off
|
||||
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
set SOLUTIONDIR=%~dp0..
|
||||
|
||||
rem Windows Sysinternals Sigcheck from http://technet.microsoft.com/en-us/sysinternals/bb897441
|
||||
set SIGCHECK="%SOLUTIONDIR%\Tools\sigcheck.exe"
|
||||
set SEVENZIP="%SOLUTIONDIR%\Tools\7zip\7za.exe"
|
||||
|
||||
set VCVARSALL="%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
|
||||
call %VCVARSALL% x86
|
||||
|
||||
IF NOT "%~1"=="build" goto skipbuild
|
||||
echo Building...
|
||||
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe" "%SOLUTIONDIR%\mRemoteV1.sln" /Rebuild "Release Portable"
|
||||
|
||||
:skipbuild
|
||||
IF NOT EXIST "%SOLUTIONDIR%\mRemoteV1\bin\Release Portable\mRemoteNG.exe" echo Did you forget to build? && goto end
|
||||
set SIGCHECK=!SIGCHECK:"=^"!
|
||||
set SIGCHECK=!SIGCHECK: =^^ !
|
||||
set SIGCHECK=!SIGCHECK:(=^^(!
|
||||
set SIGCHECK=!SIGCHECK:)=^^)!
|
||||
for /F "usebackq delims=. tokens=1-4" %%i in (`!SIGCHECK! /accepteula -q -n "%SOLUTIONDIR%\mRemoteV1\bin\Release Portable\mRemoteNG.exe"`) do (
|
||||
set PRODUCT_VERSION_SHORT=%%i.%%j
|
||||
set PRODUCT_VERSION=%%i.%%j.%%k.%%l
|
||||
)
|
||||
echo Version is %PRODUCT_VERSION%
|
||||
|
||||
set PORTABLEZIP="%SOLUTIONDIR%\Release\mRemoteNG-Portable-%PRODUCT_VERSION%.zip"
|
||||
|
||||
rmdir /S /Q "%SOLUTIONDIR%\mRemoteV1\bin\package"
|
||||
mkdir "%SOLUTIONDIR%\mRemoteV1\bin\package"
|
||||
copy "%SOLUTIONDIR%\*.txt" "%SOLUTIONDIR%\mRemoteV1\bin\package"
|
||||
copy "%SOLUTIONDIR%\Installer Projects\Installer\Dependencies\PuTTYNG.exe" "%SOLUTIONDIR%\mRemoteV1\bin\package"
|
||||
|
||||
xcopy /S /Y "%SOLUTIONDIR%\mRemoteV1\bin\Release Portable" "%SOLUTIONDIR%\mRemoteV1\bin\package"
|
||||
|
||||
echo Creating portable ZIP file...
|
||||
echo %PORTABLEZIP%
|
||||
del /f /q %PORTABLEZIP% > nul 2>&1
|
||||
%SEVENZIP% a -bt -mx=9 -tzip -y -r %PORTABLEZIP% "%SOLUTIONDIR%\mRemoteV1\bin\package\*.*"
|
||||
%SEVENZIP% a -bt -mx=9 -tzip -y %PORTABLEZIP% "%SOLUTIONDIR%\*.TXT"
|
||||
|
||||
:end
|
||||
13
Tools/copy_release_installer.ps1
Normal file
13
Tools/copy_release_installer.ps1
Normal file
@@ -0,0 +1,13 @@
|
||||
$sourcePath = $args[0]
|
||||
$destinationDir = $args[1]
|
||||
|
||||
if (!(Test-Path -Path $destinationDir))
|
||||
{
|
||||
New-Item -Path $destinationDir -ItemType "directory"
|
||||
}
|
||||
|
||||
$sourceFiles = Get-ChildItem -Path $sourcePath -Recurse | ?{$_.Extension -match "exe|msi"}
|
||||
foreach ($item in $sourceFiles)
|
||||
{
|
||||
Copy-Item -Path $item.FullName -Destination $destinationDir -Force
|
||||
}
|
||||
21
Tools/rename_installer_with_version.ps1
Normal file
21
Tools/rename_installer_with_version.ps1
Normal file
@@ -0,0 +1,21 @@
|
||||
#$solutionDir = $args[0] -replace "\\$"
|
||||
$solutionDir = "C:\Users\vsparda\Documents\Repositories\mRemoteNG Project\mRemoteNG\"
|
||||
#$renameTarget = $args[1]
|
||||
$renameTarget = "C:\Users\vsparda\Documents\Repositories\mRemoteNG Project\mRemoteNG\InstallerProjects\Installer\bin\Release\en-US\mRemoteNG-Installer.msi"
|
||||
$targetVersionedFile = "$solutionDir\mRemoteV1\bin\Release\mRemoteNG.exe"
|
||||
$version = &"$solutionDir\Tools\sigcheck.exe" /accepteula -q -n $targetVersionedFile
|
||||
|
||||
|
||||
$renameTargetFileObject = Get-Item -Path $renameTarget -ErrorAction SilentlyContinue
|
||||
if ($renameTargetFileObject)
|
||||
{
|
||||
# Build the new file name
|
||||
$oldFileName = $renameTargetFileObject.Name
|
||||
$newFileName = $oldFileName -replace "$("\"+$renameTargetFileObject.Extension)",$("-"+$version+$renameTargetFileObject.Extension)
|
||||
|
||||
# Delete any items that already exist with the new name (effectively an overwrite)
|
||||
Remove-Item -Path "$($renameTargetFileObject.Directory.FullName)\$newFileName" -ErrorAction SilentlyContinue
|
||||
|
||||
# Rename file
|
||||
Rename-Item -Path $renameTarget -NewName $newFileName -ErrorAction SilentlyContinue
|
||||
}
|
||||
BIN
Tools/sigcheck.exe
Normal file
BIN
Tools/sigcheck.exe
Normal file
Binary file not shown.
13
Tools/signfiles.ps1
Normal file
13
Tools/signfiles.ps1
Normal file
@@ -0,0 +1,13 @@
|
||||
$timeserver = "http://timestamp.verisign.com/scripts/timstamp.dll"
|
||||
$certPath = "C:\mRemoteNG_code_signing_cert.pfx"
|
||||
$certPassword = (Get-Credential -Message "Enter the password for the certificate" -UserName "USERNAME NOT NEEDED").Password
|
||||
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($certPath, $certPassword)
|
||||
$targetPath = $args[0]
|
||||
|
||||
|
||||
Write-Output "Getting files from path: $targetPath"
|
||||
$signableFiles = Get-ChildItem -Path $targetPath -Recurse | ?{$_.Extension -match "dll|exe|msi"}
|
||||
Write-Output "Signable files count: $($signableFiles.Count)"
|
||||
foreach ($file in $signableFiles) {
|
||||
Set-AuthenticodeSignature -Certificate $cert -TimestampServer $timeserver -IncludeChain all -FilePath $file.FullName
|
||||
}
|
||||
67
mRemoteNGTests/BinaryFileTests.cs
Normal file
67
mRemoteNGTests/BinaryFileTests.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
using NUnit.Framework;
|
||||
using System.IO;
|
||||
|
||||
namespace mRemoteNGTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class BinaryFileTests
|
||||
{
|
||||
[Test]
|
||||
public void LargeAddressAwareFlagIsSet()
|
||||
{
|
||||
var exePath = GetTargetPath();
|
||||
Assert.That(IsLargeAware(exePath), Is.True);
|
||||
}
|
||||
|
||||
static string GetTargetPath()
|
||||
{
|
||||
string debugOrRelease = "";
|
||||
string normalOrPortable = "";
|
||||
#if DEBUG
|
||||
debugOrRelease = "Debug";
|
||||
#else
|
||||
debugOrRelease = "Release";
|
||||
#endif
|
||||
#if PORTABLE
|
||||
normalOrPortable = " Portable";
|
||||
#else
|
||||
normalOrPortable = "";
|
||||
#endif
|
||||
string path = string.Format(".\\mRemoteV1\\bin\\{0}{1}\\mRemoteNG.exe", debugOrRelease, normalOrPortable);
|
||||
return path;
|
||||
}
|
||||
|
||||
static bool IsLargeAware(string file)
|
||||
{
|
||||
using (var fs = File.OpenRead(file))
|
||||
{
|
||||
return IsLargeAware(fs);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Checks if the stream is a MZ header and if it is large address aware
|
||||
/// </summary>
|
||||
/// <param name="stream">Stream to check, make sure its at the start of the MZ header</param>
|
||||
/// <exception cref=""></exception>
|
||||
/// <returns></returns>
|
||||
static bool IsLargeAware(Stream stream)
|
||||
{
|
||||
const int IMAGE_FILE_LARGE_ADDRESS_AWARE = 0x20;
|
||||
|
||||
var br = new BinaryReader(stream);
|
||||
|
||||
if (br.ReadInt16() != 0x5A4D) //No MZ Header
|
||||
return false;
|
||||
|
||||
br.BaseStream.Position = 0x3C;
|
||||
var peloc = br.ReadInt32(); //Get the PE header location.
|
||||
|
||||
br.BaseStream.Position = peloc;
|
||||
if (br.ReadInt32() != 0x4550) //No PE header
|
||||
return false;
|
||||
|
||||
br.BaseStream.Position += 0x12;
|
||||
return (br.ReadInt16() & IMAGE_FILE_LARGE_ADDRESS_AWARE) == IMAGE_FILE_LARGE_ADDRESS_AWARE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,24 +17,41 @@
|
||||
<IsCodedUITest>False</IsCodedUITest>
|
||||
<TestProjectType>UnitTest</TestProjectType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug Portable|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug Portable\</OutputPath>
|
||||
<DefineConstants>TRACE;DEBUG;PORTABLE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release Portable|x86'">
|
||||
<OutputPath>bin\x86\Release Portable\</OutputPath>
|
||||
<DefineConstants>TRACE;PORTABLE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL">
|
||||
@@ -76,6 +93,7 @@
|
||||
</Choose>
|
||||
<ItemGroup>
|
||||
<Compile Include="App\LoggerTests.cs" />
|
||||
<Compile Include="BinaryFileTests.cs" />
|
||||
<Compile Include="Connection\ConnectionInfoInheritanceTests.cs" />
|
||||
<Compile Include="ListViewTester.cs" />
|
||||
<Compile Include="Config\Connections\SqlConnectionUpdateCheckerTests.cs" />
|
||||
|
||||
@@ -7,88 +7,47 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mRemoteV1", "mRemoteV1\mRem
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mRemoteNGTests", "mRemoteNGTests\mRemoteNGTests.csproj", "{1453B37F-8621-499E-B0B2-6091F76DC0BB}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Installer Projects", "Installer Projects", "{4FE795BE-646E-4F1B-BAD0-A68EA26394DD}"
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "InstallerProjects", "InstallerProjects", "{4FE795BE-646E-4F1B-BAD0-A68EA26394DD}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomActions", "Installer Projects\CustomActions\CustomActions.csproj", "{5423D985-CB48-4344-B47F-E8C6D60C8B04}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomActions", "InstallerProjects\CustomActions\CustomActions.csproj", "{5423D985-CB48-4344-B47F-E8C6D60C8B04}"
|
||||
EndProject
|
||||
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Installer", "Installer Projects\Installer\Installer.wixproj", "{F0168B9F-6815-40DF-BA53-46CEE7683B68}"
|
||||
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "Installer", "InstallerProjects\Installer\Installer.wixproj", "{F0168B9F-6815-40DF-BA53-46CEE7683B68}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{5423D985-CB48-4344-B47F-E8C6D60C8B04} = {5423D985-CB48-4344-B47F-E8C6D60C8B04}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug Portable|Any CPU = Debug Portable|Any CPU
|
||||
Debug Portable|x86 = Debug Portable|x86
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x86 = Debug|x86
|
||||
Release Portable|Any CPU = Release Portable|Any CPU
|
||||
Release Portable|x86 = Release Portable|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug Portable|Any CPU.ActiveCfg = Debug Portable|Any CPU
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug Portable|Any CPU.Build.0 = Debug Portable|Any CPU
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug Portable|x86.ActiveCfg = Debug Portable|Any CPU
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug Portable|x86.Build.0 = Debug Portable|Any CPU
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Portable|Any CPU.ActiveCfg = Release Portable|Any CPU
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Portable|Any CPU.Build.0 = Release Portable|Any CPU
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Portable|x86.ActiveCfg = Release Portable|Any CPU
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Portable|x86.Build.0 = Release Portable|Any CPU
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release|x86.Build.0 = Release|Any CPU
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Debug Portable|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Debug Portable|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Debug Portable|x86.ActiveCfg = Debug|Any CPU
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Debug Portable|x86.Build.0 = Debug|Any CPU
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release Portable|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release Portable|Any CPU.Build.0 = Release|Any CPU
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release Portable|x86.ActiveCfg = Release|Any CPU
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release Portable|x86.Build.0 = Release|Any CPU
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release|x86.Build.0 = Release|Any CPU
|
||||
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Debug Portable|Any CPU.ActiveCfg = Debug|x86
|
||||
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Debug Portable|Any CPU.Build.0 = Debug|x86
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug Portable|x86.ActiveCfg = Debug Portable|x86
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug Portable|x86.Build.0 = Debug Portable|x86
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug|x86.Build.0 = Debug|x86
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Portable|x86.ActiveCfg = Release Portable|x86
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release Portable|x86.Build.0 = Release Portable|x86
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release|x86.ActiveCfg = Release|x86
|
||||
{4934A491-40BC-4E5B-9166-EA1169A220F6}.Release|x86.Build.0 = Release|x86
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Debug Portable|x86.ActiveCfg = Debug Portable|x86
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Debug Portable|x86.Build.0 = Debug Portable|x86
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Debug|x86.Build.0 = Debug|x86
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release Portable|x86.ActiveCfg = Release Portable|x86
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release Portable|x86.Build.0 = Release Portable|x86
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release|x86.ActiveCfg = Release|x86
|
||||
{1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release|x86.Build.0 = Release|x86
|
||||
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Debug Portable|x86.ActiveCfg = Debug|x86
|
||||
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Debug Portable|x86.Build.0 = Debug|x86
|
||||
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Debug|Any CPU.Build.0 = Debug|x86
|
||||
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Debug|x86.Build.0 = Debug|x86
|
||||
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Release Portable|Any CPU.ActiveCfg = Release|x86
|
||||
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Release Portable|Any CPU.Build.0 = Release|x86
|
||||
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Release Portable|x86.ActiveCfg = Release|x86
|
||||
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Release Portable|x86.Build.0 = Release|x86
|
||||
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Release|Any CPU.Build.0 = Release|x86
|
||||
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Release|x86.ActiveCfg = Release|x86
|
||||
{5423D985-CB48-4344-B47F-E8C6D60C8B04}.Release|x86.Build.0 = Release|x86
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Debug Portable|Any CPU.ActiveCfg = Debug Portable|x86
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Debug Portable|x86.ActiveCfg = Debug Portable|x86
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Debug Portable|x86.Build.0 = Debug Portable|x86
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Debug|x86.Build.0 = Debug|x86
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release Portable|Any CPU.ActiveCfg = Release Portable|x86
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release Portable|x86.ActiveCfg = Release Portable|x86
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release Portable|x86.Build.0 = Release Portable|x86
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release|Any CPU.Build.0 = Release|x86
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release|x86.ActiveCfg = Release|x86
|
||||
{F0168B9F-6815-40DF-BA53-46CEE7683B68}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
////using System;
|
||||
////using System.Diagnostics;
|
||||
////using Microsoft.VisualBasic.CompilerServices;
|
||||
|
||||
//using System;
|
||||
//using System.Diagnostics;
|
||||
//using Microsoft.VisualBasic.CompilerServices;
|
||||
|
||||
//namespace mRemoteNG.App
|
||||
//{
|
||||
// // The following events are available for MyApplication:
|
||||
// //
|
||||
// // Startup: Raised when the application starts, before the startup form is created.
|
||||
// // Shutdown: Raised after all application forms are closed. This event is not raised if the application terminates abnormally.
|
||||
// // UnhandledException: Raised if the application encounters an unhandled exception.
|
||||
// // StartupNextInstance: Raised when launching a single-instance application and the application is already active.
|
||||
// // NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected.
|
||||
// partial class MyApplication : Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase
|
||||
//{
|
||||
// public System.Threading.Mutex mutex;
|
||||
|
||||
// private void MyApplication_Startup(object sender, Microsoft.VisualBasic.ApplicationServices.StartupEventArgs e)
|
||||
// {
|
||||
// if (mRemoteNG.Settings.Default.SingleInstance)
|
||||
// {
|
||||
// string mutexID = "mRemoteNG_SingleInstanceMutex";
|
||||
// mutex = new System.Threading.Mutex(false, mutexID);
|
||||
|
||||
// if (!mutex.WaitOne(0, false))
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// SwitchToCurrentInstance();
|
||||
// }
|
||||
// catch (Exception)
|
||||
// {
|
||||
// }
|
||||
|
||||
// ProjectData.EndApp();
|
||||
// }
|
||||
|
||||
// GC.KeepAlive(mutex);
|
||||
// }
|
||||
// }
|
||||
|
||||
// private IntPtr GetCurrentInstanceWindowHandle()
|
||||
// {
|
||||
// IntPtr hWnd = IntPtr.Zero;
|
||||
// Process curProc = Process.GetCurrentProcess();
|
||||
// foreach (Process proc in Process.GetProcessesByName(curProc.ProcessName))
|
||||
// {
|
||||
// if (proc.Id != curProc.Id && proc.MainModule.FileName == curProc.MainModule.FileName && proc.MainWindowHandle != IntPtr.Zero)
|
||||
// {
|
||||
// hWnd = proc.MainWindowHandle;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// return hWnd;
|
||||
// }
|
||||
|
||||
// private void SwitchToCurrentInstance()
|
||||
// {
|
||||
// IntPtr hWnd = GetCurrentInstanceWindowHandle();
|
||||
// if (hWnd != IntPtr.Zero)
|
||||
// {
|
||||
// //Restore window if minimized. Do not restore if already in
|
||||
// //normal or maximised window state, since we don't want to
|
||||
// //change the current state of the window.
|
||||
// if (App.NativeMethods.IsIconic(hWnd) != 0)
|
||||
// {
|
||||
// App.NativeMethods.ShowWindow(hWnd, App.NativeMethods.SW_RESTORE);
|
||||
// }
|
||||
// App.NativeMethods.SetForegroundWindow(hWnd);
|
||||
// }
|
||||
// }
|
||||
|
||||
// private void MyApplication_Shutdown(object sender, System.EventArgs e)
|
||||
// {
|
||||
// mutex?.Close();
|
||||
// }
|
||||
//}
|
||||
//}
|
||||
76
mRemoteV1/App/CompatibilityChecker.cs
Normal file
76
mRemoteV1/App/CompatibilityChecker.cs
Normal file
@@ -0,0 +1,76 @@
|
||||
using Microsoft.Win32;
|
||||
using mRemoteNG.App.Info;
|
||||
using mRemoteNG.UI.Forms;
|
||||
using mRemoteNG.UI.TaskDialog;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace mRemoteNG.App
|
||||
{
|
||||
public class CompatibilityChecker
|
||||
{
|
||||
public CompatibilityChecker()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void CheckCompatibility()
|
||||
{
|
||||
CheckFipsPolicy();
|
||||
CheckLenovoAutoScrollUtility();
|
||||
}
|
||||
|
||||
private void CheckFipsPolicy()
|
||||
{
|
||||
if (FipsPolicyEnabledForServer2003() || FipsPolicyEnabledForServer2008AndNewer())
|
||||
{
|
||||
MessageBox.Show(frmMain.Default, string.Format(Language.strErrorFipsPolicyIncompatible, GeneralAppInfo.ProdName, GeneralAppInfo.ProdName, MessageBoxButtons.OK, MessageBoxIcon.Error));
|
||||
Environment.Exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
private bool FipsPolicyEnabledForServer2003()
|
||||
{
|
||||
var regKey = Registry.LocalMachine.OpenSubKey("System\\CurrentControlSet\\Control\\Lsa");
|
||||
var fipsPolicy = regKey?.GetValue("FIPSAlgorithmPolicy");
|
||||
if (fipsPolicy != null && (int)fipsPolicy != 0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool FipsPolicyEnabledForServer2008AndNewer()
|
||||
{
|
||||
var regKey = Registry.LocalMachine.OpenSubKey("System\\CurrentControlSet\\Control\\Lsa\\FIPSAlgorithmPolicy");
|
||||
var fipsPolicy = regKey?.GetValue("Enabled");
|
||||
if (fipsPolicy != null && (int)fipsPolicy != 0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
private void CheckLenovoAutoScrollUtility()
|
||||
{
|
||||
if (!Settings.Default.CompatibilityWarnLenovoAutoScrollUtility)
|
||||
return;
|
||||
|
||||
Process[] proccesses = new Process[] { };
|
||||
try
|
||||
{
|
||||
proccesses = Process.GetProcessesByName("virtscrl");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage("Error in CheckLenovoAutoScrollUtility", ex);
|
||||
}
|
||||
|
||||
if (proccesses?.Length > 0)
|
||||
{
|
||||
CTaskDialog.MessageBox(Application.ProductName, Language.strCompatibilityProblemDetected, string.Format(Language.strCompatibilityLenovoAutoScrollUtilityDetected, Application.ProductName), "", "", Language.strCheckboxDoNotShowThisMessageAgain, ETaskDialogButtons.Ok, ESysIcons.Warning, ESysIcons.Warning);
|
||||
if (CTaskDialog.VerificationChecked)
|
||||
Settings.Default.CompatibilityWarnLenovoAutoScrollUtility = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using static System.Environment;
|
||||
|
||||
|
||||
@@ -14,7 +15,10 @@ namespace mRemoteNG.App.Info
|
||||
public static readonly string UrlDonate = "http://donate.mremoteng.org/";
|
||||
public static readonly string UrlForum = "http://forum.mremoteng.org/";
|
||||
public static readonly string UrlBugs = "http://bugs.mremoteng.org/";
|
||||
public static readonly string HomePath = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
|
||||
public static readonly string version = Application.ProductVersion;
|
||||
public static readonly string ProdName = Application.ProductName;
|
||||
public static readonly string copyright = ((AssemblyCopyrightAttribute)Attribute.GetCustomAttribute(Assembly.GetExecutingAssembly(), typeof(AssemblyCopyrightAttribute), false)).Copyright;
|
||||
public static readonly string HomePath = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
|
||||
public static readonly string EncryptionKey = "mR3m";
|
||||
public static string ReportingFilePath = "";
|
||||
public static readonly string PuttyPath = HomePath + "\\PuTTYNG.exe";
|
||||
@@ -33,8 +37,15 @@ namespace mRemoteNG.App.Info
|
||||
details.Add($".NET CLR {Environment.Version}");
|
||||
string detailsString = string.Join("; ", details.ToArray());
|
||||
|
||||
return $"Mozilla/5.0 ({detailsString}) {System.Windows.Forms.Application.ProductName}/{System.Windows.Forms.Application.ProductVersion}";
|
||||
return $"Mozilla/5.0 ({detailsString}) {ProdName}/{version}";
|
||||
}
|
||||
}
|
||||
|
||||
public static Version getVer()
|
||||
{
|
||||
System.Version v = new Version();
|
||||
System.Version.TryParse(version, out v);
|
||||
return v;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,11 +32,17 @@ namespace mRemoteNG.App
|
||||
internal static extern bool MoveWindow(IntPtr hWnd, int x, int y, int cx, int cy, bool repaint);
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
|
||||
internal static extern bool PostMessage(IntPtr hWnd, UInt32 Msg, int wParam, int lParam);
|
||||
internal static extern bool PostMessage(IntPtr hWnd, uint Msg, int wParam, int lParam);
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
|
||||
internal static extern int SendMessage(IntPtr hWnd, int msg, int wparam, int lparam);
|
||||
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
|
||||
public static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
|
||||
public static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, System.Text.StringBuilder lParam);
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
|
||||
internal static extern IntPtr SetClipboardViewer(IntPtr hWndNewViewer);
|
||||
|
||||
@@ -57,8 +63,20 @@ namespace mRemoteNG.App
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
|
||||
internal static extern IntPtr WindowFromPoint(Point point);
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
|
||||
public static extern void GetClassName(IntPtr hWnd, System.Text.StringBuilder lpClassName, int nMaxCount);
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
|
||||
public static extern int GetDlgCtrlID(int hwndCtl);
|
||||
|
||||
[DllImport("user32", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)]
|
||||
public static extern bool GetWindowPlacement(IntPtr hWnd, ref WINDOWPLACEMENT lpwndpl);
|
||||
|
||||
[DllImport("user32", ExactSpelling = true, CharSet = CharSet.Ansi, SetLastError = true)]
|
||||
public static extern bool SetWindowPlacement(IntPtr hWnd, ref WINDOWPLACEMENT lpwndpl);
|
||||
#endregion
|
||||
|
||||
|
||||
#region Structures
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct WINDOWPOS
|
||||
@@ -71,8 +89,32 @@ namespace mRemoteNG.App
|
||||
public int cy;
|
||||
public int flags;
|
||||
}
|
||||
|
||||
public struct WINDOWPLACEMENT
|
||||
{
|
||||
public uint length;
|
||||
public uint flags;
|
||||
public uint showCmd;
|
||||
public POINT ptMinPosition;
|
||||
public POINT ptMaxPosition;
|
||||
public RECT rcNormalPosition;
|
||||
}
|
||||
|
||||
public struct POINT
|
||||
{
|
||||
public long x;
|
||||
public long y;
|
||||
}
|
||||
|
||||
public struct RECT
|
||||
{
|
||||
public long left;
|
||||
public long top;
|
||||
public long right;
|
||||
public long bottom;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region Helpers
|
||||
public static int MAKELONG(int wLow, int wHigh)
|
||||
{
|
||||
@@ -106,6 +148,8 @@ namespace mRemoteNG.App
|
||||
#endregion
|
||||
|
||||
#region Constants
|
||||
public const int TRUE = 1;
|
||||
|
||||
#region GetWindowLong
|
||||
public const int GWL_STYLE = (-16);
|
||||
#endregion
|
||||
@@ -123,8 +167,17 @@ namespace mRemoteNG.App
|
||||
#endregion
|
||||
|
||||
#region ShowWindow
|
||||
public const int SW_SHOWMAXIMIZED = 3;
|
||||
public const int SW_RESTORE = 9;
|
||||
public const uint SW_HIDE = 0;
|
||||
public const uint SW_SHOWNORMAL = 1;
|
||||
public const uint SW_SHOWMINIMIZED = 2;
|
||||
public const uint SW_SHOWMAXIMIZED = 3;
|
||||
public const uint SW_MAXIMIZE = 3;
|
||||
public const uint SW_SHOWNOACTIVATE = 4;
|
||||
public const uint SW_SHOW = 5;
|
||||
public const uint SW_MINIMIZE = 6;
|
||||
public const uint SW_SHOWMINNOACTIVE = 7;
|
||||
public const uint SW_SHOWNA = 8;
|
||||
public const uint SW_RESTORE = 9;
|
||||
#endregion
|
||||
|
||||
#region SetWindowPos / WM_WINDOWPOSCHANGING / WM_WINDOWPOSCHANGED
|
||||
@@ -214,6 +267,12 @@ namespace mRemoteNG.App
|
||||
public const int SWP_STATECHANGED = 0x8000;
|
||||
#endregion
|
||||
|
||||
#region Window Placement Flags (WPF)
|
||||
public const uint WPF_SETMINPOSITION = 0x1;
|
||||
public const uint WPF_RESTORETOMAXIMIZED = 0x2;
|
||||
public const uint WPF_ASYNCWINDOWPLACEMENT = 0x4;
|
||||
#endregion
|
||||
|
||||
#region WM_ACTIVATE
|
||||
/// <summary>
|
||||
///
|
||||
@@ -247,6 +306,11 @@ namespace mRemoteNG.App
|
||||
/// </summary>
|
||||
public const int WM_ACTIVATE = 0x6;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public const int WM_SETTEXT = 0xC;
|
||||
|
||||
/// <summary>
|
||||
/// Copies the text that corresponds to a window into a buffer provided by the caller.
|
||||
/// </summary>
|
||||
@@ -292,6 +356,11 @@ namespace mRemoteNG.App
|
||||
/// </summary>
|
||||
public const int WM_KEYUP = 0x101;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public const int WM_COMMAND = 0x111;
|
||||
|
||||
/// <summary>
|
||||
/// A window receives this message when the user chooses a command from the Window menu (formerly known as the system or control menu) or when the user chooses the maximize button, minimize button, restore button, or close button.
|
||||
/// </summary>
|
||||
@@ -379,6 +448,12 @@ namespace mRemoteNG.App
|
||||
public const int VK_CONTROL = 0x11;
|
||||
public const int VK_C = 0x67;
|
||||
#endregion
|
||||
|
||||
#region LB
|
||||
public const int LB_ERR = -1;
|
||||
public const int LB_SELECTSTRING = 0x18C;
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,73 @@
|
||||
using System;
|
||||
using mRemoteNG.UI.Forms;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.UI.Forms;
|
||||
|
||||
namespace mRemoteNG.App
|
||||
{
|
||||
public static class ProgramRoot
|
||||
{
|
||||
private static Mutex mutex;
|
||||
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
Startup.InitializeProgram();
|
||||
if (Settings.Default.SingleInstance)
|
||||
StartApplicationAsSingleInstance();
|
||||
else
|
||||
StartApplication();
|
||||
}
|
||||
|
||||
private static void StartApplication()
|
||||
{
|
||||
Startup.Instance.InitializeProgram();
|
||||
Application.Run(frmMain.Default);
|
||||
}
|
||||
|
||||
public static void CloseSingletonInstanceMutex()
|
||||
{
|
||||
mutex?.Close();
|
||||
}
|
||||
|
||||
private static void StartApplicationAsSingleInstance()
|
||||
{
|
||||
var mutexID = "mRemoteNG_SingleInstanceMutex";
|
||||
bool newInstanceCreated;
|
||||
mutex = new Mutex(false, mutexID, out newInstanceCreated);
|
||||
if (!newInstanceCreated)
|
||||
{
|
||||
SwitchToCurrentInstance();
|
||||
return;
|
||||
}
|
||||
|
||||
StartApplication();
|
||||
GC.KeepAlive(mutex);
|
||||
}
|
||||
|
||||
private static void SwitchToCurrentInstance()
|
||||
{
|
||||
var singletonInstanceWindowHandle = GetRunningSingletonInstanceWindowHandle();
|
||||
if (singletonInstanceWindowHandle != IntPtr.Zero)
|
||||
{
|
||||
if (NativeMethods.IsIconic(singletonInstanceWindowHandle) != 0)
|
||||
NativeMethods.ShowWindow(singletonInstanceWindowHandle, (int)NativeMethods.SW_RESTORE);
|
||||
}
|
||||
}
|
||||
|
||||
private static IntPtr GetRunningSingletonInstanceWindowHandle()
|
||||
{
|
||||
var windowHandle = IntPtr.Zero;
|
||||
var currentProcess = Process.GetCurrentProcess();
|
||||
foreach (Process enumeratedProcess in Process.GetProcessesByName(currentProcess.ProcessName))
|
||||
{
|
||||
if (enumeratedProcess.Id != currentProcess.Id && enumeratedProcess.MainModule.FileName == currentProcess.MainModule.FileName && enumeratedProcess.MainWindowHandle != IntPtr.Zero)
|
||||
windowHandle = enumeratedProcess.MainWindowHandle;
|
||||
}
|
||||
return windowHandle;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,3 @@
|
||||
using log4net;
|
||||
using Microsoft.VisualBasic;
|
||||
using mRemoteNG.App.Info;
|
||||
using mRemoteNG.Config.Connections;
|
||||
using mRemoteNG.Connection;
|
||||
@@ -7,7 +5,6 @@ using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.Connection.Protocol.RDP;
|
||||
using mRemoteNG.Container;
|
||||
using mRemoteNG.Credential;
|
||||
using mRemoteNG.Images;
|
||||
using mRemoteNG.Messages;
|
||||
using mRemoteNG.Tools;
|
||||
using mRemoteNG.Tree;
|
||||
@@ -21,6 +18,7 @@ using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml;
|
||||
using mRemoteNG.UI.Forms;
|
||||
using mRemoteNG.UI.Forms.Input;
|
||||
using mRemoteNG.UI.TaskDialog;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
using TabPage = Crownwood.Magic.Controls.TabPage;
|
||||
@@ -286,9 +284,10 @@ namespace mRemoteNG.App
|
||||
try
|
||||
{
|
||||
ConnectionWindow conW = default(ConnectionWindow);
|
||||
conW = (ConnectionWindow)((Control)sender).Tag;
|
||||
conW = (ConnectionWindow)((ToolStripMenuItem)sender).Tag;
|
||||
|
||||
string nTitle = Interaction.InputBox(Prompt: Language.strNewTitle + ":", DefaultResponse: Convert.ToString(((Control)((Control)sender).Tag).Text.Replace("&&", "&")));
|
||||
string nTitle = "";
|
||||
input.InputBox(Language.strNewTitle, Language.strNewTitle + ":", ref nTitle);
|
||||
|
||||
if (!string.IsNullOrEmpty(nTitle))
|
||||
{
|
||||
@@ -555,7 +554,9 @@ namespace mRemoteNG.App
|
||||
}
|
||||
else
|
||||
{
|
||||
Interaction.MsgBox(string.Format(Language.strErrorStartupConnectionFileLoad, Environment.NewLine, Application.ProductName, GetStartupConnectionFileName(), MiscTools.GetExceptionMessageRecursive(ex)), (int)MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, null);
|
||||
MessageBox.Show(frmMain.Default,
|
||||
string.Format(Language.strErrorStartupConnectionFileLoad, Environment.NewLine, Application.ProductName, GetStartupConnectionFileName(), MiscTools.GetExceptionMessageRecursive(ex)),
|
||||
"Could not load startup file.", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
Application.Exit();
|
||||
return;
|
||||
}
|
||||
@@ -1094,19 +1095,12 @@ namespace mRemoteNG.App
|
||||
ProtocolBase Prot = (ProtocolBase)sender;
|
||||
if (Prot.InterfaceControl.Info.Protocol == ProtocolType.RDP)
|
||||
{
|
||||
string[] Reason = DisconnectedMessage.Split("\r\n".ToCharArray());
|
||||
string ReasonCode = Reason[0];
|
||||
string ReasonDescription = Reason[1];
|
||||
string ReasonCode = DisconnectedMessage.Split("\r\n".ToCharArray())[0];
|
||||
string desc = DisconnectedMessage.Replace("\r\n", " ");
|
||||
|
||||
if (Convert.ToInt32(ReasonCode) > 3)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(ReasonDescription))
|
||||
{
|
||||
MessageCollector.AddMessage(MessageClass.WarningMsg, Language.strRdpDisconnected + Environment.NewLine + ReasonDescription + Environment.NewLine + string.Format(Language.strErrorCode, ReasonCode));
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageCollector.AddMessage(MessageClass.WarningMsg, Language.strRdpDisconnected + Environment.NewLine + string.Format(Language.strErrorCode, ReasonCode));
|
||||
}
|
||||
MessageCollector.AddMessage(MessageClass.WarningMsg, Language.strRdpDisconnected + Environment.NewLine + desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace mRemoteNG.App
|
||||
{
|
||||
_updateFilePath = updateFilePath;
|
||||
frmMain.Default.Close();
|
||||
ProgramRoot.CloseSingletonInstanceMutex();
|
||||
}
|
||||
|
||||
public static void Cleanup()
|
||||
|
||||
@@ -1,33 +1,38 @@
|
||||
using Microsoft.Win32;
|
||||
using mRemoteNG.App.Info;
|
||||
using mRemoteNG.App.Update;
|
||||
using mRemoteNG.Config.Connections;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Messages;
|
||||
using mRemoteNG.Tools;
|
||||
using mRemoteNG.UI.Forms;
|
||||
using mRemoteNG.UI.Window;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Management;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
using mRemoteNG.Config.Connections;
|
||||
using mRemoteNG.UI.Forms;
|
||||
using mRemoteNG.UI.TaskDialog;
|
||||
using System.Globalization;
|
||||
using mRemoteNG.App.Info;
|
||||
|
||||
namespace mRemoteNG.App
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
private static readonly Startup _singletonInstance = new Startup();
|
||||
private CompatibilityChecker _compatibilityChecker;
|
||||
private AppUpdater _appUpdate;
|
||||
|
||||
public static Startup Instance
|
||||
{
|
||||
get { return _singletonInstance; }
|
||||
}
|
||||
|
||||
private Startup()
|
||||
{
|
||||
_compatibilityChecker = new CompatibilityChecker();
|
||||
_appUpdate = new AppUpdater();
|
||||
}
|
||||
|
||||
@@ -35,84 +40,18 @@ namespace mRemoteNG.App
|
||||
{
|
||||
}
|
||||
|
||||
public static void InitializeProgram()
|
||||
public void InitializeProgram()
|
||||
{
|
||||
Debug.Print("---------------------------" + Environment.NewLine + "[START] - " + Convert.ToString(DateTime.Now, CultureInfo.InvariantCulture));
|
||||
_singletonInstance.LogStartupData();
|
||||
//CheckCompatibility();
|
||||
_singletonInstance.ParseCommandLineArgs();
|
||||
LogStartupData();
|
||||
_compatibilityChecker.CheckCompatibility();
|
||||
ParseCommandLineArgs();
|
||||
IeBrowserEmulation.Register();
|
||||
_singletonInstance.GetConnectionIcons();
|
||||
GetConnectionIcons();
|
||||
}
|
||||
|
||||
private void CheckCompatibility()
|
||||
{
|
||||
CheckFipsPolicy();
|
||||
CheckLenovoAutoScrollUtility();
|
||||
}
|
||||
private void CheckFipsPolicy()
|
||||
{
|
||||
RegistryKey regKey = default(RegistryKey);
|
||||
|
||||
bool isFipsPolicyEnabled = false;
|
||||
|
||||
// Windows XP/Windows Server 2003
|
||||
regKey = Registry.LocalMachine.OpenSubKey("System\\CurrentControlSet\\Control\\Lsa");
|
||||
if (regKey != null)
|
||||
{
|
||||
if ((int)regKey.GetValue("FIPSAlgorithmPolicy") != 0)
|
||||
{
|
||||
isFipsPolicyEnabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Windows Vista/Windows Server 2008 and newer
|
||||
regKey = Registry.LocalMachine.OpenSubKey("System\\CurrentControlSet\\Control\\Lsa\\FIPSAlgorithmPolicy");
|
||||
if (regKey != null)
|
||||
{
|
||||
if ((int)regKey.GetValue("Enabled") != 0)
|
||||
{
|
||||
isFipsPolicyEnabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (isFipsPolicyEnabled)
|
||||
{
|
||||
MessageBox.Show(frmMain.Default, string.Format(Language.strErrorFipsPolicyIncompatible, (new Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase()).Info.ProductName), (new Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase()).Info.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
Environment.Exit(1);
|
||||
}
|
||||
}
|
||||
private void CheckLenovoAutoScrollUtility()
|
||||
{
|
||||
if (!Settings.Default.CompatibilityWarnLenovoAutoScrollUtility)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Process[] proccesses = new Process[] { };
|
||||
try
|
||||
{
|
||||
proccesses = Process.GetProcessesByName("virtscrl");
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage("Error in CheckLenovoAutoScrollUtility", ex);
|
||||
}
|
||||
if (proccesses.Length == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
CTaskDialog.MessageBox(Application.ProductName, Language.strCompatibilityProblemDetected, string.Format(Language.strCompatibilityLenovoAutoScrollUtilityDetected, Application.ProductName), "", "", Language.strCheckboxDoNotShowThisMessageAgain, ETaskDialogButtons.Ok, ESysIcons.Warning, ESysIcons.Warning);
|
||||
if (CTaskDialog.VerificationChecked)
|
||||
{
|
||||
Settings.Default.CompatibilityWarnLenovoAutoScrollUtility = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void SetDefaultLayout()
|
||||
public void SetDefaultLayout()
|
||||
{
|
||||
frmMain.Default.pnlDock.Visible = false;
|
||||
|
||||
@@ -129,6 +68,7 @@ namespace mRemoteNG.App
|
||||
|
||||
frmMain.Default.pnlDock.Visible = true;
|
||||
}
|
||||
|
||||
private void GetConnectionIcons()
|
||||
{
|
||||
string iPath = GeneralAppInfo.HomePath + "\\Icons\\";
|
||||
@@ -157,12 +97,14 @@ namespace mRemoteNG.App
|
||||
LogCultureData();
|
||||
}
|
||||
}
|
||||
|
||||
private void LogSystemData()
|
||||
{
|
||||
string osData = GetOperatingSystemData();
|
||||
string architecture = GetArchitectureData();
|
||||
Logger.Instance.InfoFormat(string.Join(" ", Array.FindAll(new string[] { osData, architecture }, s => !string.IsNullOrEmpty(Convert.ToString(s)))));
|
||||
Logger.Instance.InfoFormat(string.Join(" ", Array.FindAll(new[] { osData, architecture }, s => !string.IsNullOrEmpty(Convert.ToString(s)))));
|
||||
}
|
||||
|
||||
private string GetOperatingSystemData()
|
||||
{
|
||||
string osVersion = string.Empty;
|
||||
@@ -170,73 +112,78 @@ namespace mRemoteNG.App
|
||||
|
||||
try
|
||||
{
|
||||
foreach (ManagementObject managementObject in new ManagementObjectSearcher("SELECT * FROM Win32_OperatingSystem WHERE Primary=True").Get())
|
||||
foreach (var o in new ManagementObjectSearcher("SELECT * FROM Win32_OperatingSystem WHERE Primary=True").Get())
|
||||
{
|
||||
osVersion = GetOSVersion(osVersion, managementObject);
|
||||
var managementObject = (ManagementObject) o;
|
||||
osVersion = Convert.ToString(managementObject.GetPropertyValue("Caption")).Trim();
|
||||
servicePack = GetOSServicePack(servicePack, managementObject);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Instance.WarnFormat("Error retrieving operating system information from WMI. {0}", ex.Message);
|
||||
Logger.Instance.WarnFormat($"Error retrieving operating system information from WMI. {ex.Message}");
|
||||
}
|
||||
string osData = string.Join(" ", new string[] { osVersion, servicePack });
|
||||
return osData;
|
||||
}
|
||||
private string GetOSVersion(string osVersion, ManagementObject managementObject)
|
||||
{
|
||||
osVersion = Convert.ToString(managementObject.GetPropertyValue("Caption")).Trim();
|
||||
return osVersion;
|
||||
}
|
||||
|
||||
private string GetOSServicePack(string servicePack, ManagementObject managementObject)
|
||||
{
|
||||
int servicePackNumber = Convert.ToInt32(managementObject.GetPropertyValue("ServicePackMajorVersion"));
|
||||
if (!(servicePackNumber == 0))
|
||||
if (servicePackNumber != 0)
|
||||
{
|
||||
servicePack = string.Format("Service Pack {0}", servicePackNumber);
|
||||
servicePack = $"Service Pack {servicePackNumber}";
|
||||
}
|
||||
return servicePack;
|
||||
}
|
||||
|
||||
private string GetArchitectureData()
|
||||
{
|
||||
string architecture = string.Empty;
|
||||
try
|
||||
{
|
||||
foreach (ManagementObject managementObject in new ManagementObjectSearcher("SELECT * FROM Win32_Processor WHERE DeviceID=\'CPU0\'").Get())
|
||||
foreach (var o in new ManagementObjectSearcher("SELECT * FROM Win32_Processor WHERE DeviceID=\'CPU0\'").Get())
|
||||
{
|
||||
var managementObject = (ManagementObject) o;
|
||||
int addressWidth = Convert.ToInt32(managementObject.GetPropertyValue("AddressWidth"));
|
||||
architecture = string.Format("{0}-bit", addressWidth);
|
||||
architecture = $"{addressWidth}-bit";
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Instance.WarnFormat("Error retrieving operating system address width from WMI. {0}", ex.Message);
|
||||
Logger.Instance.WarnFormat($"Error retrieving operating system address width from WMI. {ex.Message}");
|
||||
}
|
||||
return architecture;
|
||||
}
|
||||
|
||||
private void LogApplicationData()
|
||||
{
|
||||
#if !PORTABLE
|
||||
Logger.Instance.InfoFormat("{0} {1} starting.", System.Windows.Forms.Application.ProductName, System.Windows.Forms.Application.ProductVersion);
|
||||
Logger.Instance.InfoFormat($"{Application.ProductName} {Application.ProductVersion} starting.");
|
||||
#else
|
||||
Logger.Instance.InfoFormat("{0} {1} {2} starting.", Application.ProductName, Application.ProductVersion, Language.strLabelPortableEdition);
|
||||
Logger.Instance.InfoFormat(
|
||||
$"{Application.ProductName} {Application.ProductVersion} {Language.strLabelPortableEdition} starting.");
|
||||
#endif
|
||||
}
|
||||
|
||||
private void LogCmdLineArgs()
|
||||
{
|
||||
Logger.Instance.InfoFormat("Command Line: {0}", Environment.GetCommandLineArgs());
|
||||
Logger.Instance.InfoFormat($"Command Line: {Environment.GetCommandLineArgs()}");
|
||||
}
|
||||
|
||||
private void LogCLRData()
|
||||
{
|
||||
Logger.Instance.InfoFormat("Microsoft .NET CLR {0}", Environment.Version);
|
||||
Logger.Instance.InfoFormat($"Microsoft .NET CLR {Environment.Version}");
|
||||
}
|
||||
|
||||
private void LogCultureData()
|
||||
{
|
||||
Logger.Instance.InfoFormat("System Culture: {0}/{1}", Thread.CurrentThread.CurrentUICulture.Name, Thread.CurrentThread.CurrentUICulture.NativeName);
|
||||
Logger.Instance.InfoFormat(
|
||||
$"System Culture: {Thread.CurrentThread.CurrentUICulture.Name}/{Thread.CurrentThread.CurrentUICulture.NativeName}");
|
||||
}
|
||||
|
||||
|
||||
public static void CreateConnectionsProvider()
|
||||
public void CreateConnectionsProvider()
|
||||
{
|
||||
if (Settings.Default.UseSQLServer)
|
||||
{
|
||||
@@ -264,6 +211,7 @@ namespace mRemoteNG.App
|
||||
_appUpdate.GetUpdateInfoCompletedEvent += GetUpdateInfoCompleted;
|
||||
_appUpdate.GetUpdateInfoAsync();
|
||||
}
|
||||
|
||||
private void GetUpdateInfoCompleted(object sender, AsyncCompletedEventArgs e)
|
||||
{
|
||||
if (frmMain.Default.InvokeRequired)
|
||||
@@ -307,6 +255,7 @@ namespace mRemoteNG.App
|
||||
_appUpdate.GetAnnouncementInfoCompletedEvent += GetAnnouncementInfoCompleted;
|
||||
_appUpdate.GetAnnouncementInfoAsync();
|
||||
}
|
||||
|
||||
private void GetAnnouncementInfoCompleted(object sender, AsyncCompletedEventArgs e)
|
||||
{
|
||||
if (frmMain.Default.InvokeRequired)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
@@ -6,6 +5,7 @@ using System.ComponentModel;
|
||||
using System.Threading;
|
||||
using mRemoteNG.Tools;
|
||||
using System.Reflection;
|
||||
using mRemoteNG.App.Info;
|
||||
|
||||
|
||||
namespace mRemoteNG.App.Update
|
||||
@@ -107,7 +107,7 @@ namespace mRemoteNG.App.Update
|
||||
|
||||
public void SetProxySettings()
|
||||
{
|
||||
SetProxySettings(Convert.ToBoolean(mRemoteNG.Settings.Default.UpdateUseProxy), Convert.ToString(mRemoteNG.Settings.Default.UpdateProxyAddress), Convert.ToInt32(mRemoteNG.Settings.Default.UpdateProxyPort), Convert.ToBoolean(mRemoteNG.Settings.Default.UpdateProxyUseAuthentication), Convert.ToString(mRemoteNG.Settings.Default.UpdateProxyAuthUser), Security.Crypt.Decrypt(Convert.ToString(mRemoteNG.Settings.Default.UpdateProxyAuthPass), Info.GeneralAppInfo.EncryptionKey));
|
||||
SetProxySettings(Convert.ToBoolean(Settings.Default.UpdateUseProxy), Convert.ToString(Settings.Default.UpdateProxyAddress), Convert.ToInt32(Settings.Default.UpdateProxyPort), Convert.ToBoolean(Settings.Default.UpdateProxyUseAuthentication), Convert.ToString(Settings.Default.UpdateProxyAuthUser), Security.Crypt.Decrypt(Convert.ToString(Settings.Default.UpdateProxyAuthPass), GeneralAppInfo.EncryptionKey));
|
||||
}
|
||||
|
||||
public void SetProxySettings(bool useProxy, string address, int port, bool useAuthentication, string username, string password)
|
||||
@@ -145,7 +145,7 @@ namespace mRemoteNG.App.Update
|
||||
return false;
|
||||
}
|
||||
|
||||
return _currentUpdateInfo.Version > (new Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase()).Info.Version;
|
||||
return _currentUpdateInfo.Version > GeneralAppInfo.getVer();
|
||||
}
|
||||
|
||||
public bool IsAnnouncementAvailable()
|
||||
@@ -155,7 +155,7 @@ namespace mRemoteNG.App.Update
|
||||
return false;
|
||||
}
|
||||
|
||||
return !(_currentAnnouncementInfo.Name == mRemoteNG.Settings.Default.LastAnnouncement);
|
||||
return (_currentAnnouncementInfo.Name != Settings.Default.LastAnnouncement);
|
||||
}
|
||||
|
||||
public void GetUpdateInfoAsync()
|
||||
@@ -165,7 +165,7 @@ namespace mRemoteNG.App.Update
|
||||
_getUpdateInfoThread.Abort();
|
||||
}
|
||||
|
||||
_getUpdateInfoThread = new Thread(new System.Threading.ThreadStart(GetUpdateInfo));
|
||||
_getUpdateInfoThread = new Thread(new ThreadStart(GetUpdateInfo));
|
||||
_getUpdateInfoThread.SetApartmentState(ApartmentState.STA);
|
||||
_getUpdateInfoThread.IsBackground = true;
|
||||
_getUpdateInfoThread.Start();
|
||||
@@ -183,7 +183,7 @@ namespace mRemoteNG.App.Update
|
||||
_getChangeLogThread.Abort();
|
||||
}
|
||||
|
||||
_getChangeLogThread = new Thread(new System.Threading.ThreadStart(GetChangeLog));
|
||||
_getChangeLogThread = new Thread(new ThreadStart(GetChangeLog));
|
||||
_getChangeLogThread.SetApartmentState(ApartmentState.STA);
|
||||
_getChangeLogThread.IsBackground = true;
|
||||
_getChangeLogThread.Start();
|
||||
@@ -196,7 +196,7 @@ namespace mRemoteNG.App.Update
|
||||
_getAnnouncementInfoThread.Abort();
|
||||
}
|
||||
|
||||
_getAnnouncementInfoThread = new Thread(new System.Threading.ThreadStart(GetAnnouncementInfo));
|
||||
_getAnnouncementInfoThread = new Thread(new ThreadStart(GetAnnouncementInfo));
|
||||
_getAnnouncementInfoThread.SetApartmentState(ApartmentState.STA);
|
||||
_getAnnouncementInfoThread.IsBackground = true;
|
||||
_getAnnouncementInfoThread.Start();
|
||||
@@ -244,7 +244,7 @@ namespace mRemoteNG.App.Update
|
||||
private WebClient CreateWebClient()
|
||||
{
|
||||
WebClient webClient = new WebClient();
|
||||
webClient.Headers.Add("user-agent", Info.GeneralAppInfo.UserAgent);
|
||||
webClient.Headers.Add("user-agent", GeneralAppInfo.UserAgent);
|
||||
webClient.Proxy = _webProxy;
|
||||
return webClient;
|
||||
}
|
||||
@@ -285,17 +285,17 @@ namespace mRemoteNG.App.Update
|
||||
|
||||
private void GetUpdateInfo()
|
||||
{
|
||||
Uri updateFileUri = new Uri(new Uri(Convert.ToString(mRemoteNG.Settings.Default.UpdateAddress)), new Uri(Info.UpdateChannelInfo.FileName, UriKind.Relative));
|
||||
Uri updateFileUri = new Uri(new Uri(Convert.ToString(Settings.Default.UpdateAddress)), new Uri(UpdateChannelInfo.FileName, UriKind.Relative));
|
||||
DownloadStringCompletedEventArgs e = DownloadString(updateFileUri);
|
||||
|
||||
if (!e.Cancelled && e.Error == null)
|
||||
{
|
||||
_currentUpdateInfo = UpdateInfo.FromString(e.Result);
|
||||
|
||||
mRemoteNG.Settings.Default.CheckForUpdatesLastCheck = DateTime.UtcNow;
|
||||
if (!mRemoteNG.Settings.Default.UpdatePending)
|
||||
|
||||
Settings.Default.CheckForUpdatesLastCheck = DateTime.UtcNow;
|
||||
if (!Settings.Default.UpdatePending)
|
||||
{
|
||||
mRemoteNG.Settings.Default.UpdatePending = IsUpdateAvailable();
|
||||
Settings.Default.UpdatePending = IsUpdateAvailable();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -318,7 +318,7 @@ namespace mRemoteNG.App.Update
|
||||
|
||||
private void GetAnnouncementInfo()
|
||||
{
|
||||
Uri announcementFileUri = new Uri(Convert.ToString(mRemoteNG.Settings.Default.AnnouncementAddress));
|
||||
Uri announcementFileUri = new Uri(Convert.ToString(Settings.Default.AnnouncementAddress));
|
||||
DownloadStringCompletedEventArgs e = DownloadString(announcementFileUri);
|
||||
|
||||
if (!e.Cancelled && e.Error == null)
|
||||
@@ -327,7 +327,7 @@ namespace mRemoteNG.App.Update
|
||||
|
||||
if (!string.IsNullOrEmpty(_currentAnnouncementInfo.Name))
|
||||
{
|
||||
mRemoteNG.Settings.Default.LastAnnouncement = _currentAnnouncementInfo.Name;
|
||||
Settings.Default.LastAnnouncement = _currentAnnouncementInfo.Name;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -341,7 +341,7 @@ namespace mRemoteNG.App.Update
|
||||
DownloadUpdateProgressChangedEventEvent(sender, e);
|
||||
}
|
||||
|
||||
private void DownloadUpdateCompleted(object sender, System.ComponentModel.AsyncCompletedEventArgs e)
|
||||
private void DownloadUpdateCompleted(object sender, AsyncCompletedEventArgs e)
|
||||
{
|
||||
AsyncCompletedEventArgs raiseEventArgs = e;
|
||||
|
||||
@@ -353,7 +353,7 @@ namespace mRemoteNG.App.Update
|
||||
updateAuthenticode.RequireThumbprintMatch = true;
|
||||
updateAuthenticode.ThumbprintToMatch = _currentUpdateInfo.CertificateThumbprint;
|
||||
|
||||
if (!(updateAuthenticode.Verify() == Authenticode.StatusValue.Verified))
|
||||
if (updateAuthenticode.Verify() != Authenticode.StatusValue.Verified)
|
||||
{
|
||||
if (updateAuthenticode.Status == Authenticode.StatusValue.UnhandledException)
|
||||
{
|
||||
@@ -390,11 +390,11 @@ namespace mRemoteNG.App.Update
|
||||
{
|
||||
add
|
||||
{
|
||||
GetUpdateInfoCompletedEventEvent = (AsyncCompletedEventHandler)System.Delegate.Combine(GetUpdateInfoCompletedEventEvent, value);
|
||||
GetUpdateInfoCompletedEventEvent = (AsyncCompletedEventHandler)Delegate.Combine(GetUpdateInfoCompletedEventEvent, value);
|
||||
}
|
||||
remove
|
||||
{
|
||||
GetUpdateInfoCompletedEventEvent = (AsyncCompletedEventHandler)System.Delegate.Remove(GetUpdateInfoCompletedEventEvent, value);
|
||||
GetUpdateInfoCompletedEventEvent = (AsyncCompletedEventHandler)Delegate.Remove(GetUpdateInfoCompletedEventEvent, value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -403,11 +403,11 @@ namespace mRemoteNG.App.Update
|
||||
{
|
||||
add
|
||||
{
|
||||
GetChangeLogCompletedEventEvent = (AsyncCompletedEventHandler)System.Delegate.Combine(GetChangeLogCompletedEventEvent, value);
|
||||
GetChangeLogCompletedEventEvent = (AsyncCompletedEventHandler)Delegate.Combine(GetChangeLogCompletedEventEvent, value);
|
||||
}
|
||||
remove
|
||||
{
|
||||
GetChangeLogCompletedEventEvent = (AsyncCompletedEventHandler)System.Delegate.Remove(GetChangeLogCompletedEventEvent, value);
|
||||
GetChangeLogCompletedEventEvent = (AsyncCompletedEventHandler)Delegate.Remove(GetChangeLogCompletedEventEvent, value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -416,11 +416,11 @@ namespace mRemoteNG.App.Update
|
||||
{
|
||||
add
|
||||
{
|
||||
GetAnnouncementInfoCompletedEventEvent = (AsyncCompletedEventHandler)System.Delegate.Combine(GetAnnouncementInfoCompletedEventEvent, value);
|
||||
GetAnnouncementInfoCompletedEventEvent = (AsyncCompletedEventHandler)Delegate.Combine(GetAnnouncementInfoCompletedEventEvent, value);
|
||||
}
|
||||
remove
|
||||
{
|
||||
GetAnnouncementInfoCompletedEventEvent = (AsyncCompletedEventHandler)System.Delegate.Remove(GetAnnouncementInfoCompletedEventEvent, value);
|
||||
GetAnnouncementInfoCompletedEventEvent = (AsyncCompletedEventHandler)Delegate.Remove(GetAnnouncementInfoCompletedEventEvent, value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -429,11 +429,11 @@ namespace mRemoteNG.App.Update
|
||||
{
|
||||
add
|
||||
{
|
||||
DownloadUpdateProgressChangedEventEvent = (DownloadProgressChangedEventHandler)System.Delegate.Combine(DownloadUpdateProgressChangedEventEvent, value);
|
||||
DownloadUpdateProgressChangedEventEvent = (DownloadProgressChangedEventHandler)Delegate.Combine(DownloadUpdateProgressChangedEventEvent, value);
|
||||
}
|
||||
remove
|
||||
{
|
||||
DownloadUpdateProgressChangedEventEvent = (DownloadProgressChangedEventHandler)System.Delegate.Remove(DownloadUpdateProgressChangedEventEvent, value);
|
||||
DownloadUpdateProgressChangedEventEvent = (DownloadProgressChangedEventHandler)Delegate.Remove(DownloadUpdateProgressChangedEventEvent, value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -442,11 +442,11 @@ namespace mRemoteNG.App.Update
|
||||
{
|
||||
add
|
||||
{
|
||||
DownloadUpdateCompletedEventEvent = (AsyncCompletedEventHandler)System.Delegate.Combine(DownloadUpdateCompletedEventEvent, value);
|
||||
DownloadUpdateCompletedEventEvent = (AsyncCompletedEventHandler)Delegate.Combine(DownloadUpdateCompletedEventEvent, value);
|
||||
}
|
||||
remove
|
||||
{
|
||||
DownloadUpdateCompletedEventEvent = (AsyncCompletedEventHandler)System.Delegate.Remove(DownloadUpdateCompletedEventEvent, value);
|
||||
DownloadUpdateCompletedEventEvent = (AsyncCompletedEventHandler)Delegate.Remove(DownloadUpdateCompletedEventEvent, value);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -15,7 +15,6 @@ using mRemoteNG.Tree;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Container;
|
||||
using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.Images;
|
||||
using mRemoteNG.UI.Forms;
|
||||
using mRemoteNG.Tree.Root;
|
||||
using mRemoteNG.UI.TaskDialog;
|
||||
|
||||
@@ -1,19 +1,23 @@
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Connection.Protocol.RDP;
|
||||
using mRemoteNG.Container;
|
||||
using mRemoteNG.Tools;
|
||||
using mRemoteNG.Tree;
|
||||
using System;
|
||||
using System.Data.SqlClient;
|
||||
using System.Drawing;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml;
|
||||
using mRemoteNG.My;
|
||||
using mRemoteNG.UI.Forms;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.App.Info;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.Connection.Protocol.RDP;
|
||||
using mRemoteNG.Container;
|
||||
using mRemoteNG.Messages;
|
||||
using mRemoteNG.Security;
|
||||
using mRemoteNG.Tools;
|
||||
using mRemoteNG.Tree;
|
||||
using mRemoteNG.Tree.Root;
|
||||
using mRemoteNG.UI.Forms;
|
||||
|
||||
namespace mRemoteNG.Config.Connections
|
||||
{
|
||||
@@ -38,7 +42,7 @@ namespace mRemoteNG.Config.Connections
|
||||
private SqlConnection _sqlConnection;
|
||||
private SqlCommand _sqlQuery;
|
||||
|
||||
private int _currentNodeIndex = 0;
|
||||
private int _currentNodeIndex;
|
||||
private string _parentConstantId = Convert.ToString(0);
|
||||
#endregion
|
||||
|
||||
@@ -52,7 +56,7 @@ namespace mRemoteNG.Config.Connections
|
||||
public TreeNode RootTreeNode {get; set;}
|
||||
public bool Export {get; set;}
|
||||
public Format SaveFormat {get; set;}
|
||||
public Security.Save SaveSecurity {get; set;}
|
||||
public Save SaveSecurity {get; set;}
|
||||
public ConnectionList ConnectionList {get; set;}
|
||||
public ContainerList ContainerList {get; set;}
|
||||
#endregion
|
||||
@@ -95,7 +99,7 @@ namespace mRemoteNG.Config.Connections
|
||||
{
|
||||
bool isVerified = false;
|
||||
SqlDataReader sqlDataReader = null;
|
||||
System.Version databaseVersion = null;
|
||||
Version databaseVersion = null;
|
||||
try
|
||||
{
|
||||
SqlCommand sqlCommand = new SqlCommand("SELECT * FROM tblRoot", sqlConnection);
|
||||
@@ -110,17 +114,17 @@ namespace mRemoteNG.Config.Connections
|
||||
|
||||
sqlDataReader.Close();
|
||||
|
||||
if (databaseVersion.CompareTo(new System.Version(2, 2)) == 0) // 2.2
|
||||
if (databaseVersion.CompareTo(new Version(2, 2)) == 0) // 2.2
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(Messages.MessageClass.InformationMsg, string.Format("Upgrading database from version {0} to version {1}.", databaseVersion.ToString(), "2.3"));
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, string.Format("Upgrading database from version {0} to version {1}.", databaseVersion, "2.3"));
|
||||
sqlCommand = new SqlCommand("ALTER TABLE tblCons ADD EnableFontSmoothing bit NOT NULL DEFAULT 0, EnableDesktopComposition bit NOT NULL DEFAULT 0, InheritEnableFontSmoothing bit NOT NULL DEFAULT 0, InheritEnableDesktopComposition bit NOT NULL DEFAULT 0;", sqlConnection);
|
||||
sqlCommand.ExecuteNonQuery();
|
||||
databaseVersion = new System.Version(2, 3);
|
||||
databaseVersion = new Version(2, 3);
|
||||
}
|
||||
|
||||
if (databaseVersion.CompareTo(new System.Version(2, 3)) == 0) // 2.3
|
||||
if (databaseVersion.CompareTo(new Version(2, 3)) == 0) // 2.3
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(Messages.MessageClass.InformationMsg, string.Format("Upgrading database from version {0} to version {1}.", databaseVersion.ToString(), "2.4"));
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, string.Format("Upgrading database from version {0} to version {1}.", databaseVersion, "2.4"));
|
||||
sqlCommand = new SqlCommand("ALTER TABLE tblCons ADD UseCredSsp bit NOT NULL DEFAULT 1, InheritUseCredSsp bit NOT NULL DEFAULT 0;", sqlConnection);
|
||||
sqlCommand.ExecuteNonQuery();
|
||||
databaseVersion = new Version(2, 4);
|
||||
@@ -128,7 +132,7 @@ namespace mRemoteNG.Config.Connections
|
||||
|
||||
if (databaseVersion.CompareTo(new Version(2, 4)) == 0) // 2.4
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(Messages.MessageClass.InformationMsg, string.Format("Upgrading database from version {0} to version {1}.", databaseVersion.ToString(), "2.5"));
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, string.Format("Upgrading database from version {0} to version {1}.", databaseVersion, "2.5"));
|
||||
sqlCommand = new SqlCommand("ALTER TABLE tblCons ADD LoadBalanceInfo varchar (1024) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, AutomaticResize bit NOT NULL DEFAULT 1, InheritLoadBalanceInfo bit NOT NULL DEFAULT 0, InheritAutomaticResize bit NOT NULL DEFAULT 0;", sqlConnection);
|
||||
sqlCommand.ExecuteNonQuery();
|
||||
databaseVersion = new Version(2, 5);
|
||||
@@ -141,12 +145,12 @@ namespace mRemoteNG.Config.Connections
|
||||
|
||||
if (isVerified == false)
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(Messages.MessageClass.WarningMsg, string.Format(Language.strErrorBadDatabaseVersion, databaseVersion.ToString(), (new Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase()).Info.ProductName));
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, string.Format(Language.strErrorBadDatabaseVersion, databaseVersion, GeneralAppInfo.ProdName));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, string.Format(Language.strErrorVerifyDatabaseVersionFailed, ex.Message));
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, string.Format(Language.strErrorVerifyDatabaseVersionFailed, ex.Message));
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -176,48 +180,46 @@ namespace mRemoteNG.Config.Connections
|
||||
|
||||
if (!VerifyDatabaseVersion(_sqlConnection))
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, Language.strErrorConnectionListSaveFailed);
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, Language.strErrorConnectionListSaveFailed);
|
||||
return ;
|
||||
}
|
||||
|
||||
var tN = (TreeNode)RootTreeNode.Clone();
|
||||
|
||||
TreeNode tN = default(TreeNode);
|
||||
tN = (TreeNode)RootTreeNode.Clone();
|
||||
|
||||
string strProtected = "";
|
||||
string strProtected;
|
||||
if (tN.Tag != null)
|
||||
{
|
||||
if ((tN.Tag as RootNodeInfo).Password == true)
|
||||
if (((RootNodeInfo) tN.Tag).Password)
|
||||
{
|
||||
_password = Convert.ToString((tN.Tag as RootNodeInfo).PasswordString);
|
||||
strProtected = Security.Crypt.Encrypt("ThisIsProtected", _password);
|
||||
_password = Convert.ToString(((RootNodeInfo) tN.Tag).PasswordString);
|
||||
strProtected = Crypt.Encrypt("ThisIsProtected", _password);
|
||||
}
|
||||
else
|
||||
{
|
||||
strProtected = Security.Crypt.Encrypt("ThisIsNotProtected", _password);
|
||||
strProtected = Crypt.Encrypt("ThisIsNotProtected", _password);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
strProtected = Security.Crypt.Encrypt("ThisIsNotProtected", _password);
|
||||
strProtected = Crypt.Encrypt("ThisIsNotProtected", _password);
|
||||
}
|
||||
|
||||
_sqlQuery = new SqlCommand("DELETE FROM tblRoot", _sqlConnection);
|
||||
_sqlQuery.ExecuteNonQuery();
|
||||
|
||||
_sqlQuery = new SqlCommand("INSERT INTO tblRoot (Name, Export, Protected, ConfVersion) VALUES(\'" + MiscTools.PrepareValueForDB(tN.Text) + "\', 0, \'" + strProtected + "\'," + App.Info.ConnectionsFileInfo.ConnectionFileVersion.ToString(CultureInfo.InvariantCulture) + ")", _sqlConnection);
|
||||
_sqlQuery = new SqlCommand("INSERT INTO tblRoot (Name, Export, Protected, ConfVersion) VALUES(\'" + MiscTools.PrepareValueForDB(tN.Text) + "\', 0, \'" + strProtected + "\'," + ConnectionsFileInfo.ConnectionFileVersion.ToString(CultureInfo.InvariantCulture) + ")", _sqlConnection);
|
||||
_sqlQuery.ExecuteNonQuery();
|
||||
|
||||
_sqlQuery = new SqlCommand("DELETE FROM tblCons", _sqlConnection);
|
||||
_sqlQuery.ExecuteNonQuery();
|
||||
|
||||
TreeNodeCollection tNC = default(TreeNodeCollection);
|
||||
tNC = tN.Nodes;
|
||||
|
||||
TreeNodeCollection tNC = tN.Nodes;
|
||||
|
||||
SaveNodesSQL(tNC);
|
||||
|
||||
_sqlQuery = new SqlCommand("DELETE FROM tblUpdate", _sqlConnection);
|
||||
_sqlQuery.ExecuteNonQuery();
|
||||
_sqlQuery = new SqlCommand("INSERT INTO tblUpdate (LastUpdate) VALUES(\'" + Tools.MiscTools.DBDate(DateTime.Now) + "\')", _sqlConnection);
|
||||
_sqlQuery = new SqlCommand("INSERT INTO tblUpdate (LastUpdate) VALUES(\'" + MiscTools.DBDate(DateTime.Now) + "\')", _sqlConnection);
|
||||
_sqlQuery.ExecuteNonQuery();
|
||||
|
||||
_sqlConnection.Close();
|
||||
@@ -234,33 +236,33 @@ namespace mRemoteNG.Config.Connections
|
||||
+ "InheritUseCredSsp, " + "PositionID, ParentID, ConstantID, LastChange)" + "VALUES (", _sqlConnection
|
||||
);
|
||||
|
||||
if (Tree.ConnectionTreeNode.GetNodeType(node) == TreeNodeType.Connection | Tree.ConnectionTreeNode.GetNodeType(node) == TreeNodeType.Container)
|
||||
if (ConnectionTreeNode.GetNodeType(node) == TreeNodeType.Connection | ConnectionTreeNode.GetNodeType(node) == TreeNodeType.Container)
|
||||
{
|
||||
//_xmlTextWriter.WriteStartElement("Node")
|
||||
_sqlQuery.CommandText += "\'" + MiscTools.PrepareValueForDB(node.Text) + "\',"; //Name
|
||||
_sqlQuery.CommandText += "\'" + Tree.ConnectionTreeNode.GetNodeType(node).ToString() + "\',"; //Type
|
||||
_sqlQuery.CommandText += "\'" + ConnectionTreeNode.GetNodeType(node) + "\',"; //Type
|
||||
}
|
||||
|
||||
if (Tree.ConnectionTreeNode.GetNodeType(node) == TreeNodeType.Container) //container
|
||||
if (ConnectionTreeNode.GetNodeType(node) == TreeNodeType.Container) //container
|
||||
{
|
||||
_sqlQuery.CommandText += "\'" + this.ContainerList[node.Tag].IsExpanded + "\',"; //Expanded
|
||||
curConI = this.ContainerList[node.Tag].ConnectionInfo;
|
||||
_sqlQuery.CommandText += "\'" + ContainerList[node.Tag].IsExpanded + "\',"; //Expanded
|
||||
curConI = ContainerList[node.Tag].ConnectionInfo;
|
||||
SaveConnectionFieldsSQL(curConI);
|
||||
|
||||
_sqlQuery.CommandText = Tools.MiscTools.PrepareForDB(_sqlQuery.CommandText);
|
||||
_sqlQuery.CommandText = MiscTools.PrepareForDB(_sqlQuery.CommandText);
|
||||
_sqlQuery.ExecuteNonQuery();
|
||||
//_parentConstantId = _currentNodeIndex
|
||||
SaveNodesSQL(node.Nodes);
|
||||
//_xmlTextWriter.WriteEndElement()
|
||||
}
|
||||
|
||||
if (Tree.ConnectionTreeNode.GetNodeType(node) == TreeNodeType.Connection)
|
||||
if (ConnectionTreeNode.GetNodeType(node) == TreeNodeType.Connection)
|
||||
{
|
||||
_sqlQuery.CommandText += "\'" + Convert.ToString(false) + "\',";
|
||||
curConI = this.ConnectionList[node.Tag];
|
||||
curConI = ConnectionList[node.Tag];
|
||||
SaveConnectionFieldsSQL(curConI);
|
||||
//_xmlTextWriter.WriteEndElement()
|
||||
_sqlQuery.CommandText = Tools.MiscTools.PrepareForDB(_sqlQuery.CommandText);
|
||||
_sqlQuery.CommandText = MiscTools.PrepareForDB(_sqlQuery.CommandText);
|
||||
_sqlQuery.ExecuteNonQuery();
|
||||
}
|
||||
|
||||
@@ -275,7 +277,7 @@ namespace mRemoteNG.Config.Connections
|
||||
_sqlQuery.CommandText += "\'" + MiscTools.PrepareValueForDB(with_1.Icon) + "\',";
|
||||
_sqlQuery.CommandText += "\'" + MiscTools.PrepareValueForDB(with_1.Panel) + "\',";
|
||||
|
||||
if (this.SaveSecurity.Username == true)
|
||||
if (SaveSecurity.Username)
|
||||
{
|
||||
_sqlQuery.CommandText += "\'" + MiscTools.PrepareValueForDB(with_1.Username) + "\',";
|
||||
}
|
||||
@@ -284,7 +286,7 @@ namespace mRemoteNG.Config.Connections
|
||||
_sqlQuery.CommandText += "\'" + "" + "\',";
|
||||
}
|
||||
|
||||
if (this.SaveSecurity.Domain == true)
|
||||
if (SaveSecurity.Domain)
|
||||
{
|
||||
_sqlQuery.CommandText += "\'" + MiscTools.PrepareValueForDB(with_1.Domain) + "\',";
|
||||
}
|
||||
@@ -293,9 +295,9 @@ namespace mRemoteNG.Config.Connections
|
||||
_sqlQuery.CommandText += "\'" + "" + "\',";
|
||||
}
|
||||
|
||||
if (this.SaveSecurity.Password == true)
|
||||
if (SaveSecurity.Password)
|
||||
{
|
||||
_sqlQuery.CommandText += "\'" + MiscTools.PrepareValueForDB(Security.Crypt.Encrypt(with_1.Password, _password)) + "\',";
|
||||
_sqlQuery.CommandText += "\'" + MiscTools.PrepareValueForDB(Crypt.Encrypt(with_1.Password, _password)) + "\',";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -303,16 +305,16 @@ namespace mRemoteNG.Config.Connections
|
||||
}
|
||||
|
||||
_sqlQuery.CommandText += "\'" + MiscTools.PrepareValueForDB(with_1.Hostname) + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.Protocol.ToString() + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.Protocol + "\',";
|
||||
_sqlQuery.CommandText += "\'" + MiscTools.PrepareValueForDB(with_1.PuttySession) + "\',";
|
||||
_sqlQuery.CommandText += "\'" + Convert.ToString(with_1.Port) + "\',";
|
||||
_sqlQuery.CommandText += "\'" + Convert.ToString(with_1.UseConsoleSession) + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.RenderingEngine.ToString() + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.ICAEncryption.ToString() + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.RDPAuthenticationLevel.ToString() + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.RenderingEngine + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.ICAEncryption + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.RDPAuthenticationLevel + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.LoadBalanceInfo + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.Colors.ToString() + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.Resolution.ToString() + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.Colors + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.Resolution + "\',";
|
||||
_sqlQuery.CommandText += "\'" + Convert.ToString(with_1.AutomaticResize) + "\',";
|
||||
_sqlQuery.CommandText += "\'" + Convert.ToString(with_1.DisplayWallpaper) + "\',";
|
||||
_sqlQuery.CommandText += "\'" + Convert.ToString(with_1.DisplayThemes) + "\',";
|
||||
@@ -323,7 +325,7 @@ namespace mRemoteNG.Config.Connections
|
||||
_sqlQuery.CommandText += "\'" + Convert.ToString(with_1.RedirectPorts) + "\',";
|
||||
_sqlQuery.CommandText += "\'" + Convert.ToString(with_1.RedirectPrinters) + "\',";
|
||||
_sqlQuery.CommandText += "\'" + Convert.ToString(with_1.RedirectSmartCards) + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.RedirectSound.ToString() + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.RedirectSound + "\',";
|
||||
_sqlQuery.CommandText += "\'" + Convert.ToString(with_1.RedirectKeys) + "\',";
|
||||
|
||||
if (curConI.OpenConnections.Count > 0)
|
||||
@@ -341,23 +343,23 @@ namespace mRemoteNG.Config.Connections
|
||||
_sqlQuery.CommandText += "\'" + with_1.UserField + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.ExtApp + "\',";
|
||||
|
||||
_sqlQuery.CommandText += "\'" + with_1.VNCCompression.ToString() + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.VNCEncoding.ToString() + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.VNCAuthMode.ToString() + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.VNCProxyType.ToString() + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.VNCCompression + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.VNCEncoding + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.VNCAuthMode + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.VNCProxyType + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.VNCProxyIP + "\',";
|
||||
_sqlQuery.CommandText += "\'" + Convert.ToString(with_1.VNCProxyPort) + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.VNCProxyUsername + "\',";
|
||||
_sqlQuery.CommandText += "\'" + Security.Crypt.Encrypt(with_1.VNCProxyPassword, _password) + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.VNCColors.ToString() + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.VNCSmartSizeMode.ToString() + "\',";
|
||||
_sqlQuery.CommandText += "\'" + Crypt.Encrypt(with_1.VNCProxyPassword, _password) + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.VNCColors + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.VNCSmartSizeMode + "\',";
|
||||
_sqlQuery.CommandText += "\'" + Convert.ToString(with_1.VNCViewOnly) + "\',";
|
||||
|
||||
_sqlQuery.CommandText += "\'" + with_1.RDGatewayUsageMethod.ToString() + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.RDGatewayUsageMethod + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.RDGatewayHostname + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.RDGatewayUseConnectionCredentials.ToString() + "\',";
|
||||
_sqlQuery.CommandText += "\'" + with_1.RDGatewayUseConnectionCredentials + "\',";
|
||||
|
||||
if (this.SaveSecurity.Username == true)
|
||||
if (SaveSecurity.Username)
|
||||
{
|
||||
_sqlQuery.CommandText += "\'" + with_1.RDGatewayUsername + "\',";
|
||||
}
|
||||
@@ -366,16 +368,16 @@ namespace mRemoteNG.Config.Connections
|
||||
_sqlQuery.CommandText += "\'" + "" + "\',";
|
||||
}
|
||||
|
||||
if (this.SaveSecurity.Password == true)
|
||||
if (SaveSecurity.Password)
|
||||
{
|
||||
_sqlQuery.CommandText += "\'" + Security.Crypt.Encrypt(with_1.RDGatewayPassword, _password) + "\',";
|
||||
_sqlQuery.CommandText += "\'" + Crypt.Encrypt(with_1.RDGatewayPassword, _password) + "\',";
|
||||
}
|
||||
else
|
||||
{
|
||||
_sqlQuery.CommandText += "\'" + "" + "\',";
|
||||
}
|
||||
|
||||
if (this.SaveSecurity.Domain == true)
|
||||
if (SaveSecurity.Domain)
|
||||
{
|
||||
_sqlQuery.CommandText += "\'" + with_1.RDGatewayDomain + "\',";
|
||||
}
|
||||
@@ -386,7 +388,7 @@ namespace mRemoteNG.Config.Connections
|
||||
|
||||
_sqlQuery.CommandText += "\'" + Convert.ToString(with_1.UseCredSsp) + "\',";
|
||||
|
||||
if (this.SaveSecurity.Inheritance == true)
|
||||
if (SaveSecurity.Inheritance)
|
||||
{
|
||||
_sqlQuery.CommandText += "\'" + Convert.ToString(with_1.Inheritance.CacheBitmaps) + "\',";
|
||||
_sqlQuery.CommandText += "\'" + Convert.ToString(with_1.Inheritance.Colors) + "\',";
|
||||
@@ -507,7 +509,7 @@ namespace mRemoteNG.Config.Connections
|
||||
{
|
||||
if (with_1.Parent != null)
|
||||
{
|
||||
_parentConstantId = Convert.ToString((with_1.Parent as ContainerInfo).ConnectionInfo.ConstantID);
|
||||
_parentConstantId = Convert.ToString(with_1.Parent.ConnectionInfo.ConstantID);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -516,9 +518,9 @@ namespace mRemoteNG.Config.Connections
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((with_1.Parent as ContainerInfo).Parent != null)
|
||||
if (with_1.Parent.Parent != null)
|
||||
{
|
||||
_parentConstantId = Convert.ToString(((with_1.Parent as ContainerInfo).Parent as ContainerInfo).ConnectionInfo.ConstantID);
|
||||
_parentConstantId = Convert.ToString(with_1.Parent.Parent.ConnectionInfo.ConstantID);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -526,7 +528,7 @@ namespace mRemoteNG.Config.Connections
|
||||
}
|
||||
}
|
||||
|
||||
_sqlQuery.CommandText += _currentNodeIndex + ",\'" + _parentConstantId + "\',\'" + with_1.ConstantID + "\',\'" + Tools.MiscTools.DBDate(DateTime.Now) + "\')";
|
||||
_sqlQuery.CommandText += _currentNodeIndex + ",\'" + _parentConstantId + "\',\'" + with_1.ConstantID + "\',\'" + MiscTools.DBDate(DateTime.Now) + "\')";
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -535,14 +537,14 @@ namespace mRemoteNG.Config.Connections
|
||||
{
|
||||
StreamReader streamReader = new StreamReader(ConnectionFileName);
|
||||
|
||||
string fileContents = "";
|
||||
string fileContents;
|
||||
fileContents = streamReader.ReadToEnd();
|
||||
streamReader.Close();
|
||||
|
||||
if (!string.IsNullOrEmpty(fileContents))
|
||||
{
|
||||
StreamWriter streamWriter = new StreamWriter(ConnectionFileName);
|
||||
streamWriter.Write(Security.Crypt.Encrypt(fileContents, _password));
|
||||
streamWriter.Write(Crypt.Encrypt(fileContents, _password));
|
||||
streamWriter.Close();
|
||||
}
|
||||
}
|
||||
@@ -558,18 +560,18 @@ namespace mRemoteNG.Config.Connections
|
||||
|
||||
TreeNode treeNode = default(TreeNode);
|
||||
|
||||
if (Tree.ConnectionTreeNode.GetNodeType(RootTreeNode) == Tree.TreeNodeType.Root)
|
||||
if (ConnectionTreeNode.GetNodeType(RootTreeNode) == TreeNodeType.Root)
|
||||
{
|
||||
treeNode = (TreeNode)RootTreeNode.Clone();
|
||||
}
|
||||
else
|
||||
{
|
||||
treeNode = new TreeNode("mR|Export (" + Tools.MiscTools.DBDate(DateTime.Now) + ")");
|
||||
treeNode = new TreeNode("mR|Export (" + MiscTools.DBDate(DateTime.Now) + ")");
|
||||
treeNode.Nodes.Add(Convert.ToString(RootTreeNode.Clone()));
|
||||
}
|
||||
|
||||
string tempFileName = Path.GetTempFileName();
|
||||
_xmlTextWriter = new XmlTextWriter(tempFileName, System.Text.Encoding.UTF8);
|
||||
_xmlTextWriter = new XmlTextWriter(tempFileName, Encoding.UTF8);
|
||||
|
||||
_xmlTextWriter.Formatting = Formatting.Indented;
|
||||
_xmlTextWriter.Indentation = 4;
|
||||
@@ -582,22 +584,22 @@ namespace mRemoteNG.Config.Connections
|
||||
|
||||
if (Export)
|
||||
{
|
||||
_xmlTextWriter.WriteAttributeString("Protected", "", Security.Crypt.Encrypt("ThisIsNotProtected", _password));
|
||||
_xmlTextWriter.WriteAttributeString("Protected", "", Crypt.Encrypt("ThisIsNotProtected", _password));
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((treeNode.Tag as RootNodeInfo).Password == true)
|
||||
if (((RootNodeInfo) treeNode.Tag).Password)
|
||||
{
|
||||
_password = Convert.ToString((treeNode.Tag as RootNodeInfo).PasswordString);
|
||||
_xmlTextWriter.WriteAttributeString("Protected", "", Security.Crypt.Encrypt("ThisIsProtected", _password));
|
||||
_password = Convert.ToString(((RootNodeInfo) treeNode.Tag).PasswordString);
|
||||
_xmlTextWriter.WriteAttributeString("Protected", "", Crypt.Encrypt("ThisIsProtected", _password));
|
||||
}
|
||||
else
|
||||
{
|
||||
_xmlTextWriter.WriteAttributeString("Protected", "", Security.Crypt.Encrypt("ThisIsNotProtected", _password));
|
||||
_xmlTextWriter.WriteAttributeString("Protected", "", Crypt.Encrypt("ThisIsNotProtected", _password));
|
||||
}
|
||||
}
|
||||
|
||||
_xmlTextWriter.WriteAttributeString("ConfVersion", "", App.Info.ConnectionsFileInfo.ConnectionFileVersion.ToString(CultureInfo.InvariantCulture));
|
||||
_xmlTextWriter.WriteAttributeString("ConfVersion", "", ConnectionsFileInfo.ConnectionFileVersion.ToString(CultureInfo.InvariantCulture));
|
||||
|
||||
TreeNodeCollection treeNodeCollection = default(TreeNodeCollection);
|
||||
treeNodeCollection = treeNode.Nodes;
|
||||
@@ -624,7 +626,7 @@ namespace mRemoteNG.Config.Connections
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, "SaveToXml failed" + Environment.NewLine + ex.Message, false);
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, "SaveToXml failed" + Environment.NewLine + ex.Message, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -636,25 +638,25 @@ namespace mRemoteNG.Config.Connections
|
||||
{
|
||||
ConnectionInfo curConI = default(ConnectionInfo);
|
||||
|
||||
if (Tree.ConnectionTreeNode.GetNodeType(node) == Tree.TreeNodeType.Connection | Tree.ConnectionTreeNode.GetNodeType(node) == Tree.TreeNodeType.Container)
|
||||
if (ConnectionTreeNode.GetNodeType(node) == TreeNodeType.Connection | ConnectionTreeNode.GetNodeType(node) == TreeNodeType.Container)
|
||||
{
|
||||
_xmlTextWriter.WriteStartElement("Node");
|
||||
_xmlTextWriter.WriteAttributeString("Name", "", node.Text);
|
||||
_xmlTextWriter.WriteAttributeString("Type", "", Tree.ConnectionTreeNode.GetNodeType(node).ToString());
|
||||
_xmlTextWriter.WriteAttributeString("Type", "", ConnectionTreeNode.GetNodeType(node).ToString());
|
||||
}
|
||||
|
||||
if (Tree.ConnectionTreeNode.GetNodeType(node) == Tree.TreeNodeType.Container) //container
|
||||
if (ConnectionTreeNode.GetNodeType(node) == TreeNodeType.Container) //container
|
||||
{
|
||||
_xmlTextWriter.WriteAttributeString("Expanded", "", Convert.ToString(this.ContainerList[node.Tag].TreeNode.IsExpanded));
|
||||
curConI = this.ContainerList[node.Tag].ConnectionInfo;
|
||||
_xmlTextWriter.WriteAttributeString("Expanded", "", Convert.ToString(ContainerList[node.Tag].TreeNode.IsExpanded));
|
||||
curConI = ContainerList[node.Tag].ConnectionInfo;
|
||||
SaveConnectionFields(curConI);
|
||||
SaveNode(node.Nodes);
|
||||
_xmlTextWriter.WriteEndElement();
|
||||
}
|
||||
|
||||
if (Tree.ConnectionTreeNode.GetNodeType(node) == Tree.TreeNodeType.Connection)
|
||||
if (ConnectionTreeNode.GetNodeType(node) == TreeNodeType.Connection)
|
||||
{
|
||||
curConI = this.ConnectionList[node.Tag];
|
||||
curConI = ConnectionList[node.Tag];
|
||||
SaveConnectionFields(curConI);
|
||||
_xmlTextWriter.WriteEndElement();
|
||||
}
|
||||
@@ -662,7 +664,7 @@ namespace mRemoteNG.Config.Connections
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, "SaveNode failed" + Environment.NewLine + ex.Message, true);
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, "SaveNode failed" + Environment.NewLine + ex.Message, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -676,7 +678,7 @@ namespace mRemoteNG.Config.Connections
|
||||
|
||||
_xmlTextWriter.WriteAttributeString("Panel", "", curConI.Panel);
|
||||
|
||||
if (this.SaveSecurity.Username == true)
|
||||
if (SaveSecurity.Username)
|
||||
{
|
||||
_xmlTextWriter.WriteAttributeString("Username", "", curConI.Username);
|
||||
}
|
||||
@@ -685,7 +687,7 @@ namespace mRemoteNG.Config.Connections
|
||||
_xmlTextWriter.WriteAttributeString("Username", "", "");
|
||||
}
|
||||
|
||||
if (this.SaveSecurity.Domain == true)
|
||||
if (SaveSecurity.Domain)
|
||||
{
|
||||
_xmlTextWriter.WriteAttributeString("Domain", "", curConI.Domain);
|
||||
}
|
||||
@@ -694,9 +696,9 @@ namespace mRemoteNG.Config.Connections
|
||||
_xmlTextWriter.WriteAttributeString("Domain", "", "");
|
||||
}
|
||||
|
||||
if (this.SaveSecurity.Password == true)
|
||||
if (SaveSecurity.Password)
|
||||
{
|
||||
_xmlTextWriter.WriteAttributeString("Password", "", Security.Crypt.Encrypt(curConI.Password, _password));
|
||||
_xmlTextWriter.WriteAttributeString("Password", "", Crypt.Encrypt(curConI.Password, _password));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -773,7 +775,7 @@ namespace mRemoteNG.Config.Connections
|
||||
_xmlTextWriter.WriteAttributeString("VNCProxyIP", "", curConI.VNCProxyIP);
|
||||
_xmlTextWriter.WriteAttributeString("VNCProxyPort", "", Convert.ToString(curConI.VNCProxyPort));
|
||||
_xmlTextWriter.WriteAttributeString("VNCProxyUsername", "", curConI.VNCProxyUsername);
|
||||
_xmlTextWriter.WriteAttributeString("VNCProxyPassword", "", Security.Crypt.Encrypt(curConI.VNCProxyPassword, _password));
|
||||
_xmlTextWriter.WriteAttributeString("VNCProxyPassword", "", Crypt.Encrypt(curConI.VNCProxyPassword, _password));
|
||||
_xmlTextWriter.WriteAttributeString("VNCColors", "", curConI.VNCColors.ToString());
|
||||
_xmlTextWriter.WriteAttributeString("VNCSmartSizeMode", "", curConI.VNCSmartSizeMode.ToString());
|
||||
_xmlTextWriter.WriteAttributeString("VNCViewOnly", "", Convert.ToString(curConI.VNCViewOnly));
|
||||
@@ -783,7 +785,7 @@ namespace mRemoteNG.Config.Connections
|
||||
|
||||
_xmlTextWriter.WriteAttributeString("RDGatewayUseConnectionCredentials", "", curConI.RDGatewayUseConnectionCredentials.ToString());
|
||||
|
||||
if (this.SaveSecurity.Username == true)
|
||||
if (SaveSecurity.Username)
|
||||
{
|
||||
_xmlTextWriter.WriteAttributeString("RDGatewayUsername", "", curConI.RDGatewayUsername);
|
||||
}
|
||||
@@ -792,16 +794,16 @@ namespace mRemoteNG.Config.Connections
|
||||
_xmlTextWriter.WriteAttributeString("RDGatewayUsername", "", "");
|
||||
}
|
||||
|
||||
if (this.SaveSecurity.Password == true)
|
||||
if (SaveSecurity.Password)
|
||||
{
|
||||
_xmlTextWriter.WriteAttributeString("RDGatewayPassword", "", Security.Crypt.Encrypt(curConI.RDGatewayPassword, _password));
|
||||
_xmlTextWriter.WriteAttributeString("RDGatewayPassword", "", Crypt.Encrypt(curConI.RDGatewayPassword, _password));
|
||||
}
|
||||
else
|
||||
{
|
||||
_xmlTextWriter.WriteAttributeString("RDGatewayPassword", "", "");
|
||||
}
|
||||
|
||||
if (this.SaveSecurity.Domain == true)
|
||||
if (SaveSecurity.Domain)
|
||||
{
|
||||
_xmlTextWriter.WriteAttributeString("RDGatewayDomain", "", curConI.RDGatewayDomain);
|
||||
}
|
||||
@@ -810,7 +812,7 @@ namespace mRemoteNG.Config.Connections
|
||||
_xmlTextWriter.WriteAttributeString("RDGatewayDomain", "", "");
|
||||
}
|
||||
|
||||
if (this.SaveSecurity.Inheritance == true)
|
||||
if (SaveSecurity.Inheritance)
|
||||
{
|
||||
_xmlTextWriter.WriteAttributeString("InheritCacheBitmaps", "", Convert.ToString(curConI.Inheritance.CacheBitmaps));
|
||||
_xmlTextWriter.WriteAttributeString("InheritColors", "", Convert.ToString(curConI.Inheritance.Colors));
|
||||
@@ -920,7 +922,7 @@ namespace mRemoteNG.Config.Connections
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, "SaveConnectionFields failed" + Environment.NewLine + ex.Message, true);
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, "SaveConnectionFields failed" + Environment.NewLine + ex.Message, true);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -930,7 +932,7 @@ namespace mRemoteNG.Config.Connections
|
||||
|
||||
private void SaveTomRCSV()
|
||||
{
|
||||
if (App.Runtime.IsConnectionsFileLoaded == false)
|
||||
if (Runtime.IsConnectionsFileLoaded == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -981,13 +983,13 @@ namespace mRemoteNG.Config.Connections
|
||||
{
|
||||
foreach (TreeNode node in tNC)
|
||||
{
|
||||
if (Tree.ConnectionTreeNode.GetNodeType(node) == Tree.TreeNodeType.Connection)
|
||||
if (ConnectionTreeNode.GetNodeType(node) == TreeNodeType.Connection)
|
||||
{
|
||||
ConnectionInfo curConI = (ConnectionInfo)node.Tag;
|
||||
|
||||
WritemRCSVLine(curConI);
|
||||
}
|
||||
else if (Tree.ConnectionTreeNode.GetNodeType(node) == Tree.TreeNodeType.Container)
|
||||
else if (ConnectionTreeNode.GetNodeType(node) == TreeNodeType.Container)
|
||||
{
|
||||
SaveNodemRCSV(node.Nodes);
|
||||
}
|
||||
@@ -1030,7 +1032,7 @@ namespace mRemoteNG.Config.Connections
|
||||
csvLn += con.Domain + ";";
|
||||
}
|
||||
|
||||
csvLn += con.Hostname + ";" + con.Protocol.ToString() + ";" + con.PuttySession + ";" + Convert.ToString(con.Port) + ";" + Convert.ToString(con.UseConsoleSession) + ";" + Convert.ToString(con.UseCredSsp) + ";" + con.RenderingEngine.ToString() + ";" + con.ICAEncryption.ToString() + ";" + con.RDPAuthenticationLevel.ToString() + ";" + con.LoadBalanceInfo + ";" + con.Colors.ToString() + ";" + con.Resolution.ToString() + ";" + Convert.ToString(con.AutomaticResize) + ";" + Convert.ToString(con.DisplayWallpaper) + ";" + Convert.ToString(con.DisplayThemes) + ";" + Convert.ToString(con.EnableFontSmoothing) + ";" + Convert.ToString(con.EnableDesktopComposition) + ";" + Convert.ToString(con.CacheBitmaps) + ";" + Convert.ToString(con.RedirectDiskDrives) + ";" + Convert.ToString(con.RedirectPorts) + ";" + Convert.ToString(con.RedirectPrinters) + ";" + Convert.ToString(con.RedirectSmartCards) + ";" + con.RedirectSound.ToString() + ";" + Convert.ToString(con.RedirectKeys) + ";" + con.PreExtApp + ";" + con.PostExtApp + ";" + con.MacAddress + ";" + con.UserField + ";" + con.ExtApp + ";" + con.VNCCompression.ToString() + ";" + con.VNCEncoding.ToString() + ";" + con.VNCAuthMode.ToString() + ";" + con.VNCProxyType.ToString() + ";" + con.VNCProxyIP + ";" + Convert.ToString(con.VNCProxyPort) + ";" + con.VNCProxyUsername + ";" + con.VNCProxyPassword + ";" + con.VNCColors.ToString() + ";" + con.VNCSmartSizeMode.ToString() + ";" + Convert.ToString(con.VNCViewOnly) + ";";
|
||||
csvLn += con.Hostname + ";" + con.Protocol + ";" + con.PuttySession + ";" + Convert.ToString(con.Port) + ";" + Convert.ToString(con.UseConsoleSession) + ";" + Convert.ToString(con.UseCredSsp) + ";" + con.RenderingEngine + ";" + con.ICAEncryption + ";" + con.RDPAuthenticationLevel + ";" + con.LoadBalanceInfo + ";" + con.Colors + ";" + con.Resolution + ";" + Convert.ToString(con.AutomaticResize) + ";" + Convert.ToString(con.DisplayWallpaper) + ";" + Convert.ToString(con.DisplayThemes) + ";" + Convert.ToString(con.EnableFontSmoothing) + ";" + Convert.ToString(con.EnableDesktopComposition) + ";" + Convert.ToString(con.CacheBitmaps) + ";" + Convert.ToString(con.RedirectDiskDrives) + ";" + Convert.ToString(con.RedirectPorts) + ";" + Convert.ToString(con.RedirectPrinters) + ";" + Convert.ToString(con.RedirectSmartCards) + ";" + con.RedirectSound + ";" + Convert.ToString(con.RedirectKeys) + ";" + con.PreExtApp + ";" + con.PostExtApp + ";" + con.MacAddress + ";" + con.UserField + ";" + con.ExtApp + ";" + con.VNCCompression + ";" + con.VNCEncoding + ";" + con.VNCAuthMode + ";" + con.VNCProxyType + ";" + con.VNCProxyIP + ";" + Convert.ToString(con.VNCProxyPort) + ";" + con.VNCProxyUsername + ";" + con.VNCProxyPassword + ";" + con.VNCColors + ";" + con.VNCSmartSizeMode + ";" + Convert.ToString(con.VNCViewOnly) + ";";
|
||||
|
||||
if (SaveSecurity.Inheritance)
|
||||
{
|
||||
@@ -1045,7 +1047,7 @@ namespace mRemoteNG.Config.Connections
|
||||
#region vRD CSV
|
||||
private void SaveTovRDCSV()
|
||||
{
|
||||
if (App.Runtime.IsConnectionsFileLoaded == false)
|
||||
if (Runtime.IsConnectionsFileLoaded == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1067,16 +1069,16 @@ namespace mRemoteNG.Config.Connections
|
||||
{
|
||||
foreach (TreeNode node in tNC)
|
||||
{
|
||||
if (Tree.ConnectionTreeNode.GetNodeType(node) == Tree.TreeNodeType.Connection)
|
||||
if (ConnectionTreeNode.GetNodeType(node) == TreeNodeType.Connection)
|
||||
{
|
||||
ConnectionInfo curConI = (ConnectionInfo)node.Tag;
|
||||
|
||||
if (curConI.Protocol == Connection.Protocol.ProtocolType.RDP)
|
||||
if (curConI.Protocol == ProtocolType.RDP)
|
||||
{
|
||||
WritevRDCSVLine(curConI);
|
||||
}
|
||||
}
|
||||
else if (Tree.ConnectionTreeNode.GetNodeType(node) == Tree.TreeNodeType.Container)
|
||||
else if (ConnectionTreeNode.GetNodeType(node) == TreeNodeType.Container)
|
||||
{
|
||||
SaveNodevRDCSV(node.Nodes);
|
||||
}
|
||||
@@ -1107,7 +1109,7 @@ namespace mRemoteNG.Config.Connections
|
||||
#region vRD VRE
|
||||
private void SaveToVRE()
|
||||
{
|
||||
if (App.Runtime.IsConnectionsFileLoaded == false)
|
||||
if (Runtime.IsConnectionsFileLoaded == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1118,7 +1120,7 @@ namespace mRemoteNG.Config.Connections
|
||||
TreeNodeCollection tNC = default(TreeNodeCollection);
|
||||
tNC = tN.Nodes;
|
||||
|
||||
_xmlTextWriter = new XmlTextWriter(ConnectionFileName, System.Text.Encoding.UTF8);
|
||||
_xmlTextWriter = new XmlTextWriter(ConnectionFileName, Encoding.UTF8);
|
||||
_xmlTextWriter.Formatting = Formatting.Indented;
|
||||
_xmlTextWriter.Indentation = 4;
|
||||
|
||||
@@ -1140,11 +1142,11 @@ namespace mRemoteNG.Config.Connections
|
||||
{
|
||||
foreach (TreeNode node in tNC)
|
||||
{
|
||||
if (Tree.ConnectionTreeNode.GetNodeType(node) == Tree.TreeNodeType.Connection)
|
||||
if (ConnectionTreeNode.GetNodeType(node) == TreeNodeType.Connection)
|
||||
{
|
||||
ConnectionInfo curConI = (ConnectionInfo)node.Tag;
|
||||
|
||||
if (curConI.Protocol == Connection.Protocol.ProtocolType.RDP)
|
||||
if (curConI.Protocol == ProtocolType.RDP)
|
||||
{
|
||||
_xmlTextWriter.WriteStartElement("Connection");
|
||||
_xmlTextWriter.WriteAttributeString("Id", "", "");
|
||||
|
||||
@@ -1,17 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using AxWFICALib;
|
||||
using System.Drawing;
|
||||
using System.Diagnostics;
|
||||
using System.Data;
|
||||
using AxMSTSCLib;
|
||||
using Microsoft.VisualBasic;
|
||||
using System.Collections;
|
||||
using System.Windows.Forms;
|
||||
using System.DirectoryServices;
|
||||
using mRemoteNG.App;
|
||||
using System.Text.RegularExpressions;
|
||||
using mRemoteNG.My;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Container;
|
||||
using mRemoteNG.Tree;
|
||||
@@ -24,14 +15,14 @@ namespace mRemoteNG.Config.Import
|
||||
{
|
||||
try
|
||||
{
|
||||
TreeNode treeNode = Tree.ConnectionTreeNode.AddNode(TreeNodeType.Container);
|
||||
var treeNode = ConnectionTreeNode.AddNode(TreeNodeType.Container);
|
||||
|
||||
ContainerInfo containerInfo = new ContainerInfo();
|
||||
var containerInfo = new ContainerInfo();
|
||||
containerInfo.TreeNode = treeNode;
|
||||
containerInfo.ConnectionInfo = new ConnectionInfo(containerInfo);
|
||||
|
||||
string name = "";
|
||||
Match match = Regex.Match(ldapPath, "ou=([^,]*)", RegexOptions.IgnoreCase);
|
||||
var name = "";
|
||||
var match = Regex.Match(ldapPath, "ou=([^,]*)", RegexOptions.IgnoreCase);
|
||||
if (match.Success)
|
||||
{
|
||||
name = match.Groups[1].Captures[0].Value;
|
||||
@@ -64,7 +55,7 @@ namespace mRemoteNG.Config.Import
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage(message: "Config.Import.ActiveDirectory.Import() failed.", ex: ex, logOnly: true);
|
||||
Runtime.MessageCollector.AddExceptionMessage("Config.Import.ActiveDirectory.Import() failed.", ex, logOnly: true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,15 +63,11 @@ namespace mRemoteNG.Config.Import
|
||||
{
|
||||
try
|
||||
{
|
||||
string strDisplayName = "";
|
||||
string strDescription = "";
|
||||
string strHostName = "";
|
||||
const string ldapFilter = "(objectClass=computer)";
|
||||
|
||||
const string ldapFilter = "(objectClass=computer)";
|
||||
|
||||
DirectorySearcher ldapSearcher = new DirectorySearcher();
|
||||
SearchResultCollection ldapResults = default(SearchResultCollection);
|
||||
SearchResult ldapResult = default(SearchResult);
|
||||
var ldapSearcher = new DirectorySearcher();
|
||||
var ldapResults = default(SearchResultCollection);
|
||||
var ldapResult = default(SearchResult);
|
||||
|
||||
ldapSearcher.SearchRoot = new DirectoryEntry(ldapPath);
|
||||
ldapSearcher.PropertiesToLoad.AddRange(new[] {"securityEquals", "cn"});
|
||||
@@ -92,26 +79,26 @@ namespace mRemoteNG.Config.Import
|
||||
foreach (SearchResult tempLoopVar_ldapResult in ldapResults)
|
||||
{
|
||||
ldapResult = tempLoopVar_ldapResult;
|
||||
System.DirectoryServices.DirectoryEntry with_2 = ldapResult.GetDirectoryEntry();
|
||||
strDisplayName = Convert.ToString(with_2.Properties["cn"].Value);
|
||||
strDescription = Convert.ToString(with_2.Properties["Description"].Value);
|
||||
strHostName = Convert.ToString(with_2.Properties["dNSHostName"].Value);
|
||||
var with_2 = ldapResult.GetDirectoryEntry();
|
||||
var displayName = Convert.ToString(with_2.Properties["cn"].Value);
|
||||
var description = Convert.ToString(with_2.Properties["Description"].Value);
|
||||
var hostName = Convert.ToString(with_2.Properties["dNSHostName"].Value);
|
||||
|
||||
TreeNode treeNode = Tree.ConnectionTreeNode.AddNode(TreeNodeType.Connection, strDisplayName);
|
||||
var treeNode = ConnectionTreeNode.AddNode(TreeNodeType.Connection, displayName);
|
||||
|
||||
ConnectionInfo connectionInfo = new ConnectionInfo();
|
||||
ConnectionInfoInheritance inheritanceInfo = new ConnectionInfoInheritance(connectionInfo, true);
|
||||
var connectionInfo = new ConnectionInfo();
|
||||
var inheritanceInfo = new ConnectionInfoInheritance(connectionInfo, true);
|
||||
inheritanceInfo.Description = false;
|
||||
if (parentTreeNode.Tag is ContainerInfo)
|
||||
{
|
||||
connectionInfo.Parent = (ContainerInfo)parentTreeNode.Tag;
|
||||
}
|
||||
connectionInfo.Inheritance = inheritanceInfo;
|
||||
connectionInfo.Name = strDisplayName;
|
||||
connectionInfo.Hostname = strHostName;
|
||||
connectionInfo.Description = strDescription;
|
||||
connectionInfo.Name = displayName;
|
||||
connectionInfo.Hostname = hostName;
|
||||
connectionInfo.Description = description;
|
||||
connectionInfo.TreeNode = treeNode;
|
||||
treeNode.Name = strDisplayName;
|
||||
treeNode.Name = displayName;
|
||||
treeNode.Tag = connectionInfo; //set the nodes tag to the conI
|
||||
//add connection to connections
|
||||
Runtime.ConnectionList.Add(connectionInfo);
|
||||
@@ -121,7 +108,7 @@ namespace mRemoteNG.Config.Import
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage(message: "Config.Import.ActiveDirectory.ImportComputers() failed.", ex: ex, logOnly: true);
|
||||
Runtime.MessageCollector.AddExceptionMessage("Config.Import.ActiveDirectory.ImportComputers() failed.", ex, logOnly: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,33 +1,26 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using AxWFICALib;
|
||||
using System.Drawing;
|
||||
using System.Diagnostics;
|
||||
using System.Data;
|
||||
using AxMSTSCLib;
|
||||
using Microsoft.VisualBasic;
|
||||
using System.Collections;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.Container;
|
||||
using mRemoteNG.Tools;
|
||||
|
||||
|
||||
namespace mRemoteNG.Config.Import
|
||||
{
|
||||
public class PortScan
|
||||
public static class PortScan
|
||||
{
|
||||
public static void Import(IEnumerable hosts, ProtocolType protocol, TreeNode parentTreeNode)
|
||||
{
|
||||
foreach (Tools.PortScan.ScanHost host in hosts)
|
||||
foreach (ScanHost host in hosts)
|
||||
{
|
||||
ProtocolType finalProtocol = default(ProtocolType);
|
||||
bool protocolValid = false;
|
||||
var finalProtocol = default(ProtocolType);
|
||||
var protocolValid = false;
|
||||
|
||||
TreeNode treeNode = Tree.ConnectionTreeNode.AddNode(Tree.TreeNodeType.Connection, host.HostNameWithoutDomain);
|
||||
var treeNode = Tree.ConnectionTreeNode.AddNode(Tree.TreeNodeType.Connection, host.HostNameWithoutDomain);
|
||||
|
||||
ConnectionInfo connectionInfo = new ConnectionInfo();
|
||||
var connectionInfo = new ConnectionInfo();
|
||||
connectionInfo.Inheritance = new ConnectionInfoInheritance(connectionInfo);
|
||||
|
||||
connectionInfo.Name = host.HostNameWithoutDomain;
|
||||
|
||||
@@ -1,18 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using AxWFICALib;
|
||||
using System.Drawing;
|
||||
using System.Diagnostics;
|
||||
using System.Data;
|
||||
using AxMSTSCLib;
|
||||
using Microsoft.VisualBasic;
|
||||
using System.Collections;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml;
|
||||
using System.IO;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.Images;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Tree;
|
||||
using mRemoteNG.Container;
|
||||
|
||||
@@ -1,20 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using AxWFICALib;
|
||||
using System.Drawing;
|
||||
using System.Diagnostics;
|
||||
using System.Data;
|
||||
using AxMSTSCLib;
|
||||
using Microsoft.VisualBasic;
|
||||
using System.Collections;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Connection.Protocol.RDP;
|
||||
using mRemoteNG.Images;
|
||||
using mRemoteNG.Container;
|
||||
using mRemoteNG.Connection;
|
||||
|
||||
using mRemoteNG.Tree;
|
||||
|
||||
namespace mRemoteNG.Config.Import
|
||||
{
|
||||
|
||||
@@ -5,7 +5,6 @@ using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Connection.Protocol.RDP;
|
||||
using mRemoteNG.Images;
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Container;
|
||||
using mRemoteNG.Tree;
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using AxWFICALib;
|
||||
using System.Drawing;
|
||||
using System.Diagnostics;
|
||||
using System.Data;
|
||||
using AxMSTSCLib;
|
||||
using Microsoft.VisualBasic;
|
||||
using System.Collections;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Images;
|
||||
using mRemoteNG.Config.Connections;
|
||||
using mRemoteNG.Container;
|
||||
using mRemoteNG.Connection;
|
||||
@@ -23,11 +13,11 @@ namespace mRemoteNG.Config.Import
|
||||
{
|
||||
public static void Import(string fileName, TreeNode parentTreeNode)
|
||||
{
|
||||
string name = Path.GetFileNameWithoutExtension(fileName);
|
||||
TreeNode treeNode = new TreeNode(name);
|
||||
var name = Path.GetFileNameWithoutExtension(fileName);
|
||||
var treeNode = new TreeNode(name);
|
||||
parentTreeNode.Nodes.Add(treeNode);
|
||||
|
||||
ContainerInfo containerInfo = new ContainerInfo
|
||||
var containerInfo = new ContainerInfo
|
||||
{
|
||||
TreeNode = treeNode,
|
||||
Name = name
|
||||
@@ -51,14 +41,16 @@ namespace mRemoteNG.Config.Import
|
||||
treeNode.Tag = containerInfo;
|
||||
treeNode.ImageIndex = (int)TreeImageType.Container;
|
||||
treeNode.SelectedImageIndex = (int)TreeImageType.Container;
|
||||
|
||||
ConnectionsLoader connectionsLoad = new ConnectionsLoader();
|
||||
connectionsLoad.ConnectionFileName = fileName;
|
||||
connectionsLoad.RootTreeNode = treeNode;
|
||||
connectionsLoad.ConnectionList = Runtime.ConnectionList;
|
||||
connectionsLoad.ContainerList = Runtime.ContainerList;
|
||||
|
||||
connectionsLoad.LoadConnections(true);
|
||||
|
||||
var connectionsLoad = new ConnectionsLoader
|
||||
{
|
||||
ConnectionFileName = fileName,
|
||||
RootTreeNode = treeNode,
|
||||
ConnectionList = Runtime.ConnectionList,
|
||||
ContainerList = Runtime.ContainerList
|
||||
};
|
||||
|
||||
connectionsLoad.LoadConnections(true);
|
||||
|
||||
Runtime.ContainerList.Add(containerInfo);
|
||||
}
|
||||
|
||||
@@ -1,22 +1,13 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using AxWFICALib;
|
||||
using System.Drawing;
|
||||
using System.Diagnostics;
|
||||
using System.Data;
|
||||
using AxMSTSCLib;
|
||||
using Microsoft.VisualBasic;
|
||||
using System.Collections;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.My;
|
||||
using mRemoteNG.Tree;
|
||||
using mRemoteNG.Images;
|
||||
using mRemoteNG.Connection;
|
||||
|
||||
|
||||
namespace mRemoteNG.Config.Putty
|
||||
{
|
||||
public abstract class Provider
|
||||
public abstract class Provider
|
||||
{
|
||||
#region Public Methods
|
||||
private TreeNode _rootTreeNode;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using mRemoteNG.Connection;
|
||||
using mRemoteNG.Images;
|
||||
using mRemoteNG.Tools;
|
||||
using mRemoteNG.Tree;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace mRemoteNG.Config.Settings
|
||||
|
||||
public void LoadExternalAppsFromXML()
|
||||
{
|
||||
string oldPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\" + (new Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase()).Info.ProductName + "\\" + SettingsFileInfo.ExtAppsFilesName;
|
||||
string oldPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\" + GeneralAppInfo.ProdName + "\\" + SettingsFileInfo.ExtAppsFilesName;
|
||||
string newPath = SettingsFileInfo.SettingsPath + "\\" + SettingsFileInfo.ExtAppsFilesName;
|
||||
XmlDocument xDom = new XmlDocument();
|
||||
if (File.Exists(newPath))
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace mRemoteNG.Config.Settings
|
||||
|
||||
CreatePanels();
|
||||
#if !PORTABLE
|
||||
string oldPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\" + (new Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase()).Info.ProductName + "\\" + SettingsFileInfo.LayoutFileName;
|
||||
string oldPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\" + GeneralAppInfo.ProdName + "\\" + SettingsFileInfo.LayoutFileName;
|
||||
#endif
|
||||
string newPath = SettingsFileInfo.SettingsPath + "\\" + SettingsFileInfo.LayoutFileName;
|
||||
if (File.Exists(newPath))
|
||||
@@ -49,7 +49,7 @@ namespace mRemoteNG.Config.Settings
|
||||
}
|
||||
else
|
||||
{
|
||||
Startup.SetDefaultLayout();
|
||||
Startup.Instance.SetDefaultLayout();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using Microsoft.VisualBasic;
|
||||
using System.ComponentModel;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.App.Info;
|
||||
@@ -9,14 +8,14 @@ namespace mRemoteNG.Connection
|
||||
{
|
||||
public class ConnectionIcon : StringConverter
|
||||
{
|
||||
public static string[] Icons = new string[] {};
|
||||
public static string[] Icons = {};
|
||||
|
||||
public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(System.ComponentModel.ITypeDescriptorContext context)
|
||||
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
|
||||
{
|
||||
return new StandardValuesCollection(Icons);
|
||||
}
|
||||
|
||||
public override bool GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext context)
|
||||
public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -26,21 +25,22 @@ namespace mRemoteNG.Connection
|
||||
return true;
|
||||
}
|
||||
|
||||
public static System.Drawing.Icon FromString(string IconName)
|
||||
public static System.Drawing.Icon FromString(string iconName)
|
||||
{
|
||||
try
|
||||
{
|
||||
string IconPath = GeneralAppInfo.HomePath + "\\Icons\\" + IconName +".ico";
|
||||
var iconPath = $"{GeneralAppInfo.HomePath}\\Icons\\{iconName}.ico";
|
||||
|
||||
if (System.IO.File.Exists(IconPath))
|
||||
if (System.IO.File.Exists(iconPath))
|
||||
{
|
||||
System.Drawing.Icon nI = new System.Drawing.Icon(IconPath);
|
||||
var nI = new System.Drawing.Icon(iconPath);
|
||||
return nI;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, "Couldn\'t get Icon from String" + Environment.NewLine + ex.Message);
|
||||
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg,
|
||||
$"Couldn\'t get Icon from String" + Environment.NewLine + ex.Message);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using Gecko;
|
||||
using mRemoteNG.Tools;
|
||||
using mRemoteNG.App;
|
||||
using TabPage = Crownwood.Magic.Controls.TabPage;
|
||||
@@ -24,8 +25,10 @@ namespace mRemoteNG.Connection.Protocol.Http
|
||||
{
|
||||
if (RenderingEngine == RenderingEngine.Gecko)
|
||||
{
|
||||
Control = new MiniGeckoBrowser.MiniGeckoBrowser();
|
||||
((MiniGeckoBrowser.MiniGeckoBrowser)Control).XULrunnerPath = Convert.ToString(Settings.Default.XULRunnerPath);
|
||||
if(!Xpcom.IsInitialized)
|
||||
Xpcom.Initialize("Firefox");
|
||||
|
||||
Control = new GeckoWebBrowser();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -64,14 +67,14 @@ namespace mRemoteNG.Connection.Protocol.Http
|
||||
|
||||
if (InterfaceControl.Info.RenderingEngine == RenderingEngine.Gecko)
|
||||
{
|
||||
MiniGeckoBrowser.MiniGeckoBrowser objMiniGeckoBrowser = wBrowser as MiniGeckoBrowser.MiniGeckoBrowser;
|
||||
if (objMiniGeckoBrowser != null)
|
||||
{
|
||||
objMiniGeckoBrowser.TitleChanged += geckoBrowser_DocumentTitleChanged;
|
||||
objMiniGeckoBrowser.LastTabRemoved += wBrowser_LastTabRemoved;
|
||||
}
|
||||
}
|
||||
else
|
||||
GeckoWebBrowser GeckoBrowser = (GeckoWebBrowser) wBrowser;
|
||||
if (GeckoBrowser != null)
|
||||
{
|
||||
GeckoBrowser.DocumentTitleChanged += geckoBrowser_DocumentTitleChanged;
|
||||
//GeckoBrowser.Tab.LastTabRemoved += wBrowser_LastTabRemoved;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
WebBrowser objWebBrowser = (WebBrowser)wBrowser;
|
||||
//SHDocVw.WebBrowserClass objAxWebBrowser = (SHDocVw.WebBrowserClass)objWebBrowser.ActiveXInstance;
|
||||
@@ -121,7 +124,7 @@ namespace mRemoteNG.Connection.Protocol.Http
|
||||
|
||||
if (InterfaceControl.Info.RenderingEngine == RenderingEngine.Gecko)
|
||||
{
|
||||
((MiniGeckoBrowser.MiniGeckoBrowser)wBrowser).Navigate(strHost + ":" + InterfaceControl.Info.Port);
|
||||
((GeckoWebBrowser)wBrowser).Navigate(strHost + ":" + InterfaceControl.Info.Port);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -137,7 +140,7 @@ namespace mRemoteNG.Connection.Protocol.Http
|
||||
|
||||
if (InterfaceControl.Info.RenderingEngine == RenderingEngine.Gecko)
|
||||
{
|
||||
((MiniGeckoBrowser.MiniGeckoBrowser)wBrowser).Navigate(strHost);
|
||||
((GeckoWebBrowser)wBrowser).Navigate(strHost);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -203,13 +206,13 @@ namespace mRemoteNG.Connection.Protocol.Http
|
||||
|
||||
if (InterfaceControl.Info.RenderingEngine == RenderingEngine.Gecko)
|
||||
{
|
||||
if (((MiniGeckoBrowser.MiniGeckoBrowser) wBrowser).Title.Length >= 30)
|
||||
if (((GeckoWebBrowser) wBrowser).DocumentTitle.Length >= 30)
|
||||
{
|
||||
shortTitle = ((MiniGeckoBrowser.MiniGeckoBrowser) wBrowser).Title.Substring(0, 29) + " ...";
|
||||
shortTitle = ((GeckoWebBrowser) wBrowser).DocumentTitle.Substring(0, 29) + " ...";
|
||||
}
|
||||
else
|
||||
{
|
||||
shortTitle = ((MiniGeckoBrowser.MiniGeckoBrowser) wBrowser).Title;
|
||||
shortTitle = ((GeckoWebBrowser) wBrowser).DocumentTitle;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -226,7 +229,7 @@ namespace mRemoteNG.Connection.Protocol.Http
|
||||
|
||||
if (!string.IsNullOrEmpty(tabTitle))
|
||||
{
|
||||
tabP.Title = tabTitle + " - " + shortTitle;
|
||||
tabP.Title = tabTitle + @" - " + shortTitle;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -241,7 +244,7 @@ namespace mRemoteNG.Connection.Protocol.Http
|
||||
}
|
||||
|
||||
|
||||
private void geckoBrowser_DocumentTitleChanged(object sender, string e)
|
||||
private void geckoBrowser_DocumentTitleChanged(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -253,13 +256,13 @@ namespace mRemoteNG.Connection.Protocol.Http
|
||||
|
||||
if (InterfaceControl.Info.RenderingEngine == RenderingEngine.Gecko)
|
||||
{
|
||||
if (((MiniGeckoBrowser.MiniGeckoBrowser) wBrowser).Title.Length >= 30)
|
||||
if (((GeckoWebBrowser)wBrowser).DocumentTitle.Length >= 30)
|
||||
{
|
||||
shortTitle = ((MiniGeckoBrowser.MiniGeckoBrowser) wBrowser).Title.Substring(0, 29) + " ...";
|
||||
shortTitle = ((GeckoWebBrowser) wBrowser).DocumentTitle.Substring(0, 29) + " ...";
|
||||
}
|
||||
else
|
||||
{
|
||||
shortTitle = ((MiniGeckoBrowser.MiniGeckoBrowser) wBrowser).Title;
|
||||
shortTitle = ((GeckoWebBrowser) wBrowser).DocumentTitle;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -276,7 +279,7 @@ namespace mRemoteNG.Connection.Protocol.Http
|
||||
|
||||
if (!string.IsNullOrEmpty(tabTitle))
|
||||
{
|
||||
tabP.Title = tabTitle + " - " + shortTitle;
|
||||
tabP.Title = tabTitle + @" - " + shortTitle;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
using System;
|
||||
using AxWFICALib;
|
||||
using System.Drawing;
|
||||
using Microsoft.VisualBasic;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.App;
|
||||
using System.Threading;
|
||||
using mRemoteNG.Tools;
|
||||
using mRemoteNG.Connection.Protocol.RDP;
|
||||
using mRemoteNG.My;
|
||||
using mRemoteNG.UI.Forms;
|
||||
|
||||
|
||||
@@ -340,7 +338,7 @@ namespace mRemoteNG.Connection.Protocol.ICA
|
||||
#region Reconnect Stuff
|
||||
public void tmrReconnect_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
|
||||
{
|
||||
bool srvReady = Tools.PortScan.Scanner.IsPortOpen(_Info.Hostname, Convert.ToString(_Info.Port));
|
||||
bool srvReady = Scanner.IsPortOpen(_Info.Hostname, Convert.ToString(_Info.Port));
|
||||
|
||||
ReconnectGroup.ServerReady = srvReady;
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ namespace mRemoteNG.Connection.Protocol
|
||||
[LocalizedAttributes.LocalizedDescription("strICA")]
|
||||
ICA = 9,
|
||||
[LocalizedAttributes.LocalizedDescription("strExtApp")]
|
||||
IntApp = 20,
|
||||
SSH = 10
|
||||
IntApp = 20
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,6 @@ using System;
|
||||
using System.Drawing;
|
||||
using System.Diagnostics;
|
||||
using AxMSTSCLib;
|
||||
using Microsoft.VisualBasic;
|
||||
using System.Collections;
|
||||
using System.Windows.Forms;
|
||||
using System.Threading;
|
||||
@@ -153,7 +152,7 @@ namespace mRemoteNG.Connection.Protocol.RDP
|
||||
SetLoadBalanceInfo();
|
||||
SetRdGateway();
|
||||
|
||||
_rdpClient.ColorDepth = Convert.ToInt32(Conversion.Int(_connectionInfo.Colors));
|
||||
_rdpClient.ColorDepth = (int)_connectionInfo.Colors;
|
||||
|
||||
SetPerformanceFlags();
|
||||
|
||||
@@ -537,7 +536,7 @@ namespace mRemoteNG.Connection.Protocol.RDP
|
||||
_rdpClient.AdvancedSettings2.RedirectPorts = _connectionInfo.RedirectPorts;
|
||||
_rdpClient.AdvancedSettings2.RedirectPrinters = _connectionInfo.RedirectPrinters;
|
||||
_rdpClient.AdvancedSettings2.RedirectSmartCards = _connectionInfo.RedirectSmartCards;
|
||||
_rdpClient.SecuredSettings2.AudioRedirectionMode = Convert.ToInt32(Conversion.Int(_connectionInfo.RedirectSound));
|
||||
_rdpClient.SecuredSettings2.AudioRedirectionMode = (int)_connectionInfo.RedirectSound;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -552,22 +551,22 @@ namespace mRemoteNG.Connection.Protocol.RDP
|
||||
int pFlags = 0;
|
||||
if (_connectionInfo.DisplayThemes == false)
|
||||
{
|
||||
pFlags += Convert.ToInt32(Conversion.Int(RDPPerformanceFlags.DisableThemes));
|
||||
pFlags += Convert.ToInt32(RDPPerformanceFlags.DisableThemes);
|
||||
}
|
||||
|
||||
if (_connectionInfo.DisplayWallpaper == false)
|
||||
{
|
||||
pFlags += Convert.ToInt32(Conversion.Int(RDPPerformanceFlags.DisableWallpaper));
|
||||
pFlags += Convert.ToInt32(RDPPerformanceFlags.DisableWallpaper);
|
||||
}
|
||||
|
||||
if (_connectionInfo.EnableFontSmoothing)
|
||||
{
|
||||
pFlags += Convert.ToInt32(Conversion.Int(RDPPerformanceFlags.EnableFontSmoothing));
|
||||
pFlags += Convert.ToInt32(RDPPerformanceFlags.EnableFontSmoothing);
|
||||
}
|
||||
|
||||
if (_connectionInfo.EnableDesktopComposition)
|
||||
{
|
||||
pFlags += Convert.ToInt32(Conversion.Int(RDPPerformanceFlags.EnableDesktopComposition));
|
||||
pFlags += Convert.ToInt32(RDPPerformanceFlags.EnableDesktopComposition);
|
||||
}
|
||||
|
||||
_rdpClient.AdvancedSettings2.PerformanceFlags = pFlags;
|
||||
@@ -869,7 +868,7 @@ namespace mRemoteNG.Connection.Protocol.RDP
|
||||
#region Reconnect Stuff
|
||||
public void tmrReconnect_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
|
||||
{
|
||||
bool srvReady = Tools.PortScan.Scanner.IsPortOpen(_connectionInfo.Hostname, Convert.ToString(_connectionInfo.Port));
|
||||
bool srvReady = Scanner.IsPortOpen(_connectionInfo.Hostname, Convert.ToString(_connectionInfo.Port));
|
||||
|
||||
ReconnectGroup.ServerReady = srvReady;
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using System;
|
||||
using Microsoft.VisualBasic;
|
||||
using mRemoteNG.App;
|
||||
using System.ComponentModel;
|
||||
using mRemoteNG.My;
|
||||
using mRemoteNG.Tools;
|
||||
using mRemoteNG.UI.Forms;
|
||||
|
||||
|
||||
BIN
mRemoteV1/Firefox/AccessibleMarshal.dll
Normal file
BIN
mRemoteV1/Firefox/AccessibleMarshal.dll
Normal file
Binary file not shown.
BIN
mRemoteV1/Firefox/D3DCompiler_43.dll
Normal file
BIN
mRemoteV1/Firefox/D3DCompiler_43.dll
Normal file
Binary file not shown.
BIN
mRemoteV1/Firefox/breakpadinjector.dll
Normal file
BIN
mRemoteV1/Firefox/breakpadinjector.dll
Normal file
Binary file not shown.
BIN
mRemoteV1/Firefox/d3dcompiler_47.dll
Normal file
BIN
mRemoteV1/Firefox/d3dcompiler_47.dll
Normal file
Binary file not shown.
BIN
mRemoteV1/Firefox/freebl3.dll
Normal file
BIN
mRemoteV1/Firefox/freebl3.dll
Normal file
Binary file not shown.
BIN
mRemoteV1/Firefox/icudt56.dll
Normal file
BIN
mRemoteV1/Firefox/icudt56.dll
Normal file
Binary file not shown.
BIN
mRemoteV1/Firefox/icuin56.dll
Normal file
BIN
mRemoteV1/Firefox/icuin56.dll
Normal file
Binary file not shown.
BIN
mRemoteV1/Firefox/icuuc56.dll
Normal file
BIN
mRemoteV1/Firefox/icuuc56.dll
Normal file
Binary file not shown.
BIN
mRemoteV1/Firefox/lgpllibs.dll
Normal file
BIN
mRemoteV1/Firefox/lgpllibs.dll
Normal file
Binary file not shown.
BIN
mRemoteV1/Firefox/libEGL.dll
Normal file
BIN
mRemoteV1/Firefox/libEGL.dll
Normal file
Binary file not shown.
BIN
mRemoteV1/Firefox/libGLESv2.dll
Normal file
BIN
mRemoteV1/Firefox/libGLESv2.dll
Normal file
Binary file not shown.
BIN
mRemoteV1/Firefox/mozglue.dll
Normal file
BIN
mRemoteV1/Firefox/mozglue.dll
Normal file
Binary file not shown.
BIN
mRemoteV1/Firefox/msvcp120.dll
Normal file
BIN
mRemoteV1/Firefox/msvcp120.dll
Normal file
Binary file not shown.
BIN
mRemoteV1/Firefox/msvcr120.dll
Normal file
BIN
mRemoteV1/Firefox/msvcr120.dll
Normal file
Binary file not shown.
BIN
mRemoteV1/Firefox/nss3.dll
Normal file
BIN
mRemoteV1/Firefox/nss3.dll
Normal file
Binary file not shown.
BIN
mRemoteV1/Firefox/nssckbi.dll
Normal file
BIN
mRemoteV1/Firefox/nssckbi.dll
Normal file
Binary file not shown.
BIN
mRemoteV1/Firefox/nssdbm3.dll
Normal file
BIN
mRemoteV1/Firefox/nssdbm3.dll
Normal file
Binary file not shown.
BIN
mRemoteV1/Firefox/omni.ja
Normal file
BIN
mRemoteV1/Firefox/omni.ja
Normal file
Binary file not shown.
BIN
mRemoteV1/Firefox/plugin-container.exe
Normal file
BIN
mRemoteV1/Firefox/plugin-container.exe
Normal file
Binary file not shown.
BIN
mRemoteV1/Firefox/plugin-hang-ui.exe
Normal file
BIN
mRemoteV1/Firefox/plugin-hang-ui.exe
Normal file
Binary file not shown.
BIN
mRemoteV1/Firefox/sandboxbroker.dll
Normal file
BIN
mRemoteV1/Firefox/sandboxbroker.dll
Normal file
Binary file not shown.
BIN
mRemoteV1/Firefox/softokn3.dll
Normal file
BIN
mRemoteV1/Firefox/softokn3.dll
Normal file
Binary file not shown.
BIN
mRemoteV1/Firefox/xul.dll
Normal file
BIN
mRemoteV1/Firefox/xul.dll
Normal file
Binary file not shown.
@@ -1,9 +0,0 @@
|
||||
namespace mRemoteNG.Images
|
||||
{
|
||||
public enum ErrorImageType
|
||||
{
|
||||
_Information = 0,
|
||||
_Warning = 1,
|
||||
_Error = 2
|
||||
}
|
||||
}
|
||||
@@ -12,10 +12,10 @@ using System.Runtime.InteropServices;
|
||||
// Review the values of the assembly attributes
|
||||
|
||||
[assembly:AssemblyTitle("mRemoteNG")]
|
||||
[assembly:AssemblyDescription("")]
|
||||
[assembly:AssemblyCompany("")]
|
||||
[assembly: AssemblyDescription("Multi-protocol remote connections manager")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly:AssemblyProduct("mRemoteNG")]
|
||||
[assembly:AssemblyCopyright("Copyright © 2007-2009 Felix Deimel, 2010-2013 Riley McArdle, 2016 David Sparer")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016 mRemoteNG Dev Team; 2010-2013 Riley McArdle; 2007-2009 Felix Deimel")]
|
||||
[assembly:AssemblyTrademark("")]
|
||||
|
||||
[assembly:ComVisible(false)]
|
||||
|
||||
20
mRemoteV1/Properties/Resources.Designer.cs
generated
20
mRemoteV1/Properties/Resources.Designer.cs
generated
@@ -480,6 +480,26 @@ namespace mRemoteNG {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap green_arrow1 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("green_arrow1", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap green_arrow2 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("green_arrow2", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user