diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 7e556aa3..477cc55f 100644 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -1,8 +1,68 @@ -1.73 Beta 2 (): +1.74 (2016-06-1X): + + 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 + Port Scan is now Asynchronous (and is significantly faster) + Initial Japanese translation included + + + Fixes: + ------ + 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-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 +79,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 +87,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 +104,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 +130,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 +170,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 +183,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 +200,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 +220,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 +230,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 +252,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 +296,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 +321,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 +334,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 +374,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 +388,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 +409,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 +426,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 +444,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 +464,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) diff --git a/CREDITS.TXT b/CREDITS.TXT index 6011ce3c..b79c7942 100644 --- a/CREDITS.TXT +++ b/CREDITS.TXT @@ -34,15 +34,18 @@ Copyright MIT License http://www.codeproject.com/KB/recipes/command_line.aspx -DotNetVer -Copyright 2010 David Grinberg -Copyright 2010-2011 Brandon Hansen -http://nsis.sourceforge.net/DotNetVer +FilteredPropertyGrid +Copyright 2006 Azuria +http://www.codeproject.com/KB/cs/FilteredPropertyGrid.aspx Hotkey Selection Control for .NET Copyright 2006 Thomas Backman http://www.codeproject.com/Articles/15085/A-simple-hotkey-selection-control-for-NET +InputBox +Copyright 2016 Jan Slama +http://www.csharp-examples.net/inputbox/ + IP TextBox Copyright 2005 mawnkay http://www.codeproject.com/Articles/11576/IP-TextBox @@ -61,19 +64,15 @@ Copyright Modified New BSD License http://www.mentalis.org/ -DockPanel Suite 2.3.1 -Copyright 2007 Weifen Luo +DockPanel Suite 2.10.0.beta2 +Copyright 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 2006 Azuria -http://www.codeproject.com/KB/cs/FilteredPropertyGrid.aspx - -GeckoFX 1.8.1.4 -Copyright 2008 Skybound Software -Mozilla Public License 1.1 -http://www.geckofx.org/ +GeckoFX 45 +Copyright 2016 Tom Hindle +Mozilla Public License +https://bitbucket.org/geckofx/ log4net 1.2.15.0 Copyright 2001-2015 The Apache Software Foundation @@ -90,10 +89,6 @@ Copyright Modified New BSD License http://www.mentalis.org/ -MiniGeckoBrowser 1.0 -Copyright 2008 Felix Deimel -http://www.appjuice.org/ - PuTTY 0.67 Copyright 1997-2016 Simon Tatham MIT License diff --git a/Jenkinsfile b/Jenkinsfile index b2ca99d1..9839d31e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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" diff --git a/README.txt b/README.txt index 13e1a21c..7dadf700 100644 --- a/README.txt +++ b/README.txt @@ -11,4 +11,16 @@ Currently these protocols are supported: * Telnet (TELecommunication NETwork) * HTTP/S (Hypertext Transfer Protocol) * Rlogin (Rlogin) - * RAW \ No newline at end of file + * 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). \ No newline at end of file diff --git a/build-relport.cmd b/build-relport.cmd new file mode 100644 index 00000000..c91e62e1 --- /dev/null +++ b/build-relport.cmd @@ -0,0 +1,53 @@ +@echo off + +setlocal enabledelayedexpansion + +rem Windows Sysinternals Sigcheck from http://technet.microsoft.com/en-us/sysinternals/bb897441 +set SIGCHECK="%ProgramFiles(x86)%\Sigcheck\sigcheck.exe" +set SEVENZIP="%ProgramFiles%\7-Zip\7z.exe" + +set VCVARSALL="%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" +call %VCVARSALL% x86 + +echo Building... +"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe" "%~dp0\mRemoteV1.sln" /Rebuild "Release Portable" + +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 "%~dp0\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="%~dp0\Release\mRemoteNG-Portable-%PRODUCT_VERSION%.zip" + +rmdir /S /Q %~dp0\mRemoteV1\bin\package +mkdir %~dp0\mRemoteV1\bin\package +copy %~dp0\*.txt %~dp0\mRemoteV1\bin\package +copy "%~dp0\Installer Projects\Installer\Dependencies\PuTTYNG.exe" %~dp0\mRemoteV1\bin\package + +xcopy /S /Y "%~dp0\mRemoteV1\bin\Release Portable" %~dp0\mRemoteV1\bin\package + +rem Move the help files to the proper location +move %~dp0\mRemoteV1\bin\package\Resources\Help %~dp0\mRemoteV1\bin\package\ + +rem These del's can error out, that's OK. We don't want these files in the release. +del /s /q "%~dp0\mRemoteV1\bin\package\app.publish" +rmdir "%~dp0\mRemoteV1\bin\package\app.publish" +del /s /q "%~dp0\mRemoteV1\bin\package\Resources" +rmdir "%~dp0\mRemoteV1\bin\package\Resources" +del "%~dp0\mRemoteV1\bin\package\confCons*" +del "%~dp0\mRemoteV1\bin\package\mRemoteNG.log" +del "%~dp0\mRemoteV1\bin\package\pnlLayout.xml" +del "%~dp0\mRemoteV1\bin\package\extApps.xml" +del "%~dp0\mRemoteV1\bin\package\*.pdb" +del "%~dp0\mRemoteV1\bin\package\*vshost*" + +echo Creating portable ZIP file... +echo %PORTABLEZIP% +del /f /q %PORTABLEZIP% > nul 2>&1 +%SEVENZIP% a -bt -mx=9 -mm=LZMA -tzip -y -r %PORTABLEZIP% "%~dp0\mRemoteV1\bin\package\*.*" +%SEVENZIP% a -bt -mx=9 -mm=LZMA -tzip -y %PORTABLEZIP% "%~dp0\*.TXT" \ No newline at end of file diff --git a/mRemoteNGTests/BinaryFileTests.cs b/mRemoteNGTests/BinaryFileTests.cs new file mode 100644 index 00000000..80aacbc0 --- /dev/null +++ b/mRemoteNGTests/BinaryFileTests.cs @@ -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); + } + } + /// + /// Checks if the stream is a MZ header and if it is large address aware + /// + /// Stream to check, make sure its at the start of the MZ header + /// + /// + 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; + } + } +} \ No newline at end of file diff --git a/mRemoteNGTests/mRemoteNGTests.csproj b/mRemoteNGTests/mRemoteNGTests.csproj index d10d75c2..4e7d7295 100644 --- a/mRemoteNGTests/mRemoteNGTests.csproj +++ b/mRemoteNGTests/mRemoteNGTests.csproj @@ -17,24 +17,41 @@ False UnitTest - + true - full - false bin\Debug\ DEBUG;TRACE + full + AnyCPU prompt - 4 - x86 + MinimumRecommendedRules.ruleset - - pdbonly - true + bin\Release\ TRACE + true + pdbonly + AnyCPU prompt - 4 - x86 + MinimumRecommendedRules.ruleset + + + true + bin\x86\Debug Portable\ + TRACE;DEBUG;PORTABLE + full + AnyCPU + prompt + MinimumRecommendedRules.ruleset + + + bin\x86\Release Portable\ + TRACE;PORTABLE + true + pdbonly + AnyCPU + prompt + MinimumRecommendedRules.ruleset @@ -76,6 +93,7 @@ + diff --git a/mRemoteV1.sln b/mRemoteV1.sln index 3a12b8ca..2caba97d 100644 --- a/mRemoteV1.sln +++ b/mRemoteV1.sln @@ -28,63 +28,51 @@ Global 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 + {4934A491-40BC-4E5B-9166-EA1169A220F6}.Debug Portable|Any CPU.ActiveCfg = Debug Portable|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|Any CPU.ActiveCfg = Debug|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|Any CPU.ActiveCfg = Release Portable|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|Any CPU.ActiveCfg = Release|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|Any CPU.ActiveCfg = Release|x86 + {1453B37F-8621-499E-B0B2-6091F76DC0BB}.Debug Portable|Any CPU.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|Any CPU.ActiveCfg = Debug|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|Any CPU.ActiveCfg = Release|x86 + {1453B37F-8621-499E-B0B2-6091F76DC0BB}.Release Portable|Any CPU.Build.0 = Release|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|Any CPU.ActiveCfg = Release|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|Any CPU.ActiveCfg = Debug|x86 {5423D985-CB48-4344-B47F-E8C6D60C8B04}.Debug Portable|Any CPU.Build.0 = Debug|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 diff --git a/mRemoteV1/App/ApplicationEvents.cs b/mRemoteV1/App/ApplicationEvents.cs deleted file mode 100644 index a933a190..00000000 --- a/mRemoteV1/App/ApplicationEvents.cs +++ /dev/null @@ -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(); -// } -//} -//} diff --git a/mRemoteV1/App/CompatibilityChecker.cs b/mRemoteV1/App/CompatibilityChecker.cs new file mode 100644 index 00000000..a4acf639 --- /dev/null +++ b/mRemoteV1/App/CompatibilityChecker.cs @@ -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; + } + } + } +} diff --git a/mRemoteV1/App/NativeMethods.cs b/mRemoteV1/App/NativeMethods.cs index d1e7df0c..cb4e2a45 100644 --- a/mRemoteV1/App/NativeMethods.cs +++ b/mRemoteV1/App/NativeMethods.cs @@ -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 /// /// @@ -247,6 +306,11 @@ namespace mRemoteNG.App /// public const int WM_ACTIVATE = 0x6; + /// + /// + /// + public const int WM_SETTEXT = 0xC; + /// /// Copies the text that corresponds to a window into a buffer provided by the caller. /// @@ -292,6 +356,11 @@ namespace mRemoteNG.App /// public const int WM_KEYUP = 0x101; + /// + /// + /// + public const int WM_COMMAND = 0x111; + /// /// 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. /// @@ -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 } } \ No newline at end of file diff --git a/mRemoteV1/App/ProgramRoot.cs b/mRemoteV1/App/ProgramRoot.cs index 4d3af29f..038e3221 100644 --- a/mRemoteV1/App/ProgramRoot.cs +++ b/mRemoteV1/App/ProgramRoot.cs @@ -24,7 +24,7 @@ namespace mRemoteNG.App private static void StartApplication() { - Startup.InitializeProgram(); + Startup.Instance.InitializeProgram(); Application.Run(frmMain.Default); } @@ -54,7 +54,7 @@ namespace mRemoteNG.App if (singletonInstanceWindowHandle != IntPtr.Zero) { if (NativeMethods.IsIconic(singletonInstanceWindowHandle) != 0) - NativeMethods.ShowWindow(singletonInstanceWindowHandle, NativeMethods.SW_RESTORE); + NativeMethods.ShowWindow(singletonInstanceWindowHandle, (int)NativeMethods.SW_RESTORE); } } diff --git a/mRemoteV1/App/Runtime.cs b/mRemoteV1/App/Runtime.cs index 81c0526c..cb4ac203 100644 --- a/mRemoteV1/App/Runtime.cs +++ b/mRemoteV1/App/Runtime.cs @@ -1,4 +1,3 @@ -using Microsoft.VisualBasic; using mRemoteNG.App.Info; using mRemoteNG.Config.Connections; using mRemoteNG.Connection; @@ -6,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; @@ -20,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; @@ -285,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)) { @@ -1095,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); } } } diff --git a/mRemoteV1/App/Startup.cs b/mRemoteV1/App/Startup.cs index 4ad9b8d8..3fbbd2fd 100644 --- a/mRemoteV1/App/Startup.cs +++ b/mRemoteV1/App/Startup.cs @@ -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, GeneralAppInfo.ProdName, GeneralAppInfo.ProdName, 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))))); } + private string GetOperatingSystemData() { string osVersion = string.Empty; @@ -183,11 +125,13 @@ namespace mRemoteNG.App 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")); @@ -197,6 +141,7 @@ namespace mRemoteNG.App } return servicePack; } + private string GetArchitectureData() { string architecture = string.Empty; @@ -214,29 +159,33 @@ namespace mRemoteNG.App } 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("{0} {1} starting.", Application.ProductName, Application.ProductVersion); #else Logger.Instance.InfoFormat("{0} {1} {2} starting.", Application.ProductName, Application.ProductVersion, Language.strLabelPortableEdition); #endif } + private void LogCmdLineArgs() { Logger.Instance.InfoFormat("Command Line: {0}", Environment.GetCommandLineArgs()); } + private void LogCLRData() { Logger.Instance.InfoFormat("Microsoft .NET CLR {0}", Environment.Version); } + private void LogCultureData() { Logger.Instance.InfoFormat("System Culture: {0}/{1}", Thread.CurrentThread.CurrentUICulture.Name, Thread.CurrentThread.CurrentUICulture.NativeName); } - public static void CreateConnectionsProvider() + public void CreateConnectionsProvider() { if (Settings.Default.UseSQLServer) { @@ -264,6 +213,7 @@ namespace mRemoteNG.App _appUpdate.GetUpdateInfoCompletedEvent += GetUpdateInfoCompleted; _appUpdate.GetUpdateInfoAsync(); } + private void GetUpdateInfoCompleted(object sender, AsyncCompletedEventArgs e) { if (frmMain.Default.InvokeRequired) @@ -307,6 +257,7 @@ namespace mRemoteNG.App _appUpdate.GetAnnouncementInfoCompletedEvent += GetAnnouncementInfoCompleted; _appUpdate.GetAnnouncementInfoAsync(); } + private void GetAnnouncementInfoCompleted(object sender, AsyncCompletedEventArgs e) { if (frmMain.Default.InvokeRequired) diff --git a/mRemoteV1/Config/Connections/ConnectionsLoader.cs b/mRemoteV1/Config/Connections/ConnectionsLoader.cs index 0406db85..ee37c4d5 100644 --- a/mRemoteV1/Config/Connections/ConnectionsLoader.cs +++ b/mRemoteV1/Config/Connections/ConnectionsLoader.cs @@ -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; diff --git a/mRemoteV1/Config/Import/PortScan.cs b/mRemoteV1/Config/Import/PortScan.cs index 4749a71b..90374531 100644 --- a/mRemoteV1/Config/Import/PortScan.cs +++ b/mRemoteV1/Config/Import/PortScan.cs @@ -4,15 +4,16 @@ 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) { var finalProtocol = default(ProtocolType); var protocolValid = false; diff --git a/mRemoteV1/Config/Import/PuttyConnectionManager.cs b/mRemoteV1/Config/Import/PuttyConnectionManager.cs index 2cf232d6..d4ac496c 100644 --- a/mRemoteV1/Config/Import/PuttyConnectionManager.cs +++ b/mRemoteV1/Config/Import/PuttyConnectionManager.cs @@ -4,7 +4,6 @@ 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; diff --git a/mRemoteV1/Config/Import/RemoteDesktopConnection.cs b/mRemoteV1/Config/Import/RemoteDesktopConnection.cs index d7cb11ca..4f873d8b 100644 --- a/mRemoteV1/Config/Import/RemoteDesktopConnection.cs +++ b/mRemoteV1/Config/Import/RemoteDesktopConnection.cs @@ -3,10 +3,9 @@ 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 { diff --git a/mRemoteV1/Config/Import/RemoteDesktopConnectionManager.cs b/mRemoteV1/Config/Import/RemoteDesktopConnectionManager.cs index 6c9798bf..e1c9e3e0 100644 --- a/mRemoteV1/Config/Import/RemoteDesktopConnectionManager.cs +++ b/mRemoteV1/Config/Import/RemoteDesktopConnectionManager.cs @@ -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; diff --git a/mRemoteV1/Config/Import/mRemoteNG.cs b/mRemoteV1/Config/Import/mRemoteNG.cs index 620df1d9..a3577882 100644 --- a/mRemoteV1/Config/Import/mRemoteNG.cs +++ b/mRemoteV1/Config/Import/mRemoteNG.cs @@ -1,7 +1,6 @@ using System.Windows.Forms; using System.IO; using mRemoteNG.App; -using mRemoteNG.Images; using mRemoteNG.Config.Connections; using mRemoteNG.Container; using mRemoteNG.Connection; diff --git a/mRemoteV1/Config/Putty/Config.Putty.Provider.cs b/mRemoteV1/Config/Putty/Config.Putty.Provider.cs index 2a35a5b4..a3eb9ea5 100644 --- a/mRemoteV1/Config/Putty/Config.Putty.Provider.cs +++ b/mRemoteV1/Config/Putty/Config.Putty.Provider.cs @@ -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; diff --git a/mRemoteV1/Config/Putty/Config.Putty.Sessions.cs b/mRemoteV1/Config/Putty/Config.Putty.Sessions.cs index 24623c79..d4bd17df 100644 --- a/mRemoteV1/Config/Putty/Config.Putty.Sessions.cs +++ b/mRemoteV1/Config/Putty/Config.Putty.Sessions.cs @@ -1,5 +1,4 @@ using mRemoteNG.Connection; -using mRemoteNG.Images; using mRemoteNG.Tools; using mRemoteNG.Tree; using System.Collections.Generic; diff --git a/mRemoteV1/Config/Settings/LayoutSettingsLoader.cs b/mRemoteV1/Config/Settings/LayoutSettingsLoader.cs index 7eb8c6e5..70a3150a 100644 --- a/mRemoteV1/Config/Settings/LayoutSettingsLoader.cs +++ b/mRemoteV1/Config/Settings/LayoutSettingsLoader.cs @@ -49,7 +49,7 @@ namespace mRemoteNG.Config.Settings } else { - Startup.SetDefaultLayout(); + Startup.Instance.SetDefaultLayout(); } } catch (Exception ex) diff --git a/mRemoteV1/Connection/ConnectionIcon.cs b/mRemoteV1/Connection/ConnectionIcon.cs index d5ffa7c3..fc4397c1 100644 --- a/mRemoteV1/Connection/ConnectionIcon.cs +++ b/mRemoteV1/Connection/ConnectionIcon.cs @@ -1,5 +1,4 @@ using System; -using Microsoft.VisualBasic; using System.ComponentModel; using mRemoteNG.App; using mRemoteNG.App.Info; diff --git a/mRemoteV1/Connection/Protocol/Http/Connection.Protocol.HTTPBase.cs b/mRemoteV1/Connection/Protocol/Http/Connection.Protocol.HTTPBase.cs index fd60ecc5..6a1de38a 100644 --- a/mRemoteV1/Connection/Protocol/Http/Connection.Protocol.HTTPBase.cs +++ b/mRemoteV1/Connection/Protocol/Http/Connection.Protocol.HTTPBase.cs @@ -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 { diff --git a/mRemoteV1/Connection/Protocol/ICA/Connection.Protocol.ICA.cs b/mRemoteV1/Connection/Protocol/ICA/Connection.Protocol.ICA.cs index d6a39b22..3a374e22 100644 --- a/mRemoteV1/Connection/Protocol/ICA/Connection.Protocol.ICA.cs +++ b/mRemoteV1/Connection/Protocol/ICA/Connection.Protocol.ICA.cs @@ -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; diff --git a/mRemoteV1/Connection/Protocol/RDP/Connection.Protocol.RDP.cs b/mRemoteV1/Connection/Protocol/RDP/Connection.Protocol.RDP.cs index 58bdf3e9..5366c56e 100644 --- a/mRemoteV1/Connection/Protocol/RDP/Connection.Protocol.RDP.cs +++ b/mRemoteV1/Connection/Protocol/RDP/Connection.Protocol.RDP.cs @@ -868,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; diff --git a/mRemoteV1/Connection/Protocol/VNC/Connection.Protocol.VNC.cs b/mRemoteV1/Connection/Protocol/VNC/Connection.Protocol.VNC.cs index 664e33b0..5a4eac5e 100644 --- a/mRemoteV1/Connection/Protocol/VNC/Connection.Protocol.VNC.cs +++ b/mRemoteV1/Connection/Protocol/VNC/Connection.Protocol.VNC.cs @@ -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; diff --git a/mRemoteV1/Firefox/AccessibleMarshal.dll b/mRemoteV1/Firefox/AccessibleMarshal.dll new file mode 100644 index 00000000..2eb2de76 Binary files /dev/null and b/mRemoteV1/Firefox/AccessibleMarshal.dll differ diff --git a/mRemoteV1/Firefox/D3DCompiler_43.dll b/mRemoteV1/Firefox/D3DCompiler_43.dll new file mode 100644 index 00000000..ab961619 Binary files /dev/null and b/mRemoteV1/Firefox/D3DCompiler_43.dll differ diff --git a/mRemoteV1/Firefox/breakpadinjector.dll b/mRemoteV1/Firefox/breakpadinjector.dll new file mode 100644 index 00000000..2e6204d8 Binary files /dev/null and b/mRemoteV1/Firefox/breakpadinjector.dll differ diff --git a/mRemoteV1/Firefox/d3dcompiler_47.dll b/mRemoteV1/Firefox/d3dcompiler_47.dll new file mode 100644 index 00000000..e5bf5cf5 Binary files /dev/null and b/mRemoteV1/Firefox/d3dcompiler_47.dll differ diff --git a/mRemoteV1/Firefox/freebl3.dll b/mRemoteV1/Firefox/freebl3.dll new file mode 100644 index 00000000..791e2a09 Binary files /dev/null and b/mRemoteV1/Firefox/freebl3.dll differ diff --git a/mRemoteV1/Firefox/icudt56.dll b/mRemoteV1/Firefox/icudt56.dll new file mode 100644 index 00000000..913a6923 Binary files /dev/null and b/mRemoteV1/Firefox/icudt56.dll differ diff --git a/mRemoteV1/Firefox/icuin56.dll b/mRemoteV1/Firefox/icuin56.dll new file mode 100644 index 00000000..8d53bba1 Binary files /dev/null and b/mRemoteV1/Firefox/icuin56.dll differ diff --git a/mRemoteV1/Firefox/icuuc56.dll b/mRemoteV1/Firefox/icuuc56.dll new file mode 100644 index 00000000..98a6b018 Binary files /dev/null and b/mRemoteV1/Firefox/icuuc56.dll differ diff --git a/mRemoteV1/Firefox/lgpllibs.dll b/mRemoteV1/Firefox/lgpllibs.dll new file mode 100644 index 00000000..74e0c424 Binary files /dev/null and b/mRemoteV1/Firefox/lgpllibs.dll differ diff --git a/mRemoteV1/Firefox/libEGL.dll b/mRemoteV1/Firefox/libEGL.dll new file mode 100644 index 00000000..8328285e Binary files /dev/null and b/mRemoteV1/Firefox/libEGL.dll differ diff --git a/mRemoteV1/Firefox/libGLESv2.dll b/mRemoteV1/Firefox/libGLESv2.dll new file mode 100644 index 00000000..bf7b6f05 Binary files /dev/null and b/mRemoteV1/Firefox/libGLESv2.dll differ diff --git a/mRemoteV1/Firefox/mozglue.dll b/mRemoteV1/Firefox/mozglue.dll new file mode 100644 index 00000000..286ca417 Binary files /dev/null and b/mRemoteV1/Firefox/mozglue.dll differ diff --git a/mRemoteV1/Firefox/msvcp120.dll b/mRemoteV1/Firefox/msvcp120.dll new file mode 100644 index 00000000..a237d2d7 Binary files /dev/null and b/mRemoteV1/Firefox/msvcp120.dll differ diff --git a/mRemoteV1/Firefox/msvcr120.dll b/mRemoteV1/Firefox/msvcr120.dll new file mode 100644 index 00000000..8c36149a Binary files /dev/null and b/mRemoteV1/Firefox/msvcr120.dll differ diff --git a/mRemoteV1/Firefox/nss3.dll b/mRemoteV1/Firefox/nss3.dll new file mode 100644 index 00000000..235cda51 Binary files /dev/null and b/mRemoteV1/Firefox/nss3.dll differ diff --git a/mRemoteV1/Firefox/nssckbi.dll b/mRemoteV1/Firefox/nssckbi.dll new file mode 100644 index 00000000..b72fdf37 Binary files /dev/null and b/mRemoteV1/Firefox/nssckbi.dll differ diff --git a/mRemoteV1/Firefox/nssdbm3.dll b/mRemoteV1/Firefox/nssdbm3.dll new file mode 100644 index 00000000..4916b9be Binary files /dev/null and b/mRemoteV1/Firefox/nssdbm3.dll differ diff --git a/mRemoteV1/Firefox/omni.ja b/mRemoteV1/Firefox/omni.ja new file mode 100644 index 00000000..df0d5e4a Binary files /dev/null and b/mRemoteV1/Firefox/omni.ja differ diff --git a/mRemoteV1/Firefox/plugin-container.exe b/mRemoteV1/Firefox/plugin-container.exe new file mode 100644 index 00000000..e2c0300e Binary files /dev/null and b/mRemoteV1/Firefox/plugin-container.exe differ diff --git a/mRemoteV1/Firefox/plugin-hang-ui.exe b/mRemoteV1/Firefox/plugin-hang-ui.exe new file mode 100644 index 00000000..25853084 Binary files /dev/null and b/mRemoteV1/Firefox/plugin-hang-ui.exe differ diff --git a/mRemoteV1/Firefox/sandboxbroker.dll b/mRemoteV1/Firefox/sandboxbroker.dll new file mode 100644 index 00000000..c20b7a0a Binary files /dev/null and b/mRemoteV1/Firefox/sandboxbroker.dll differ diff --git a/mRemoteV1/Firefox/softokn3.dll b/mRemoteV1/Firefox/softokn3.dll new file mode 100644 index 00000000..2afd93aa Binary files /dev/null and b/mRemoteV1/Firefox/softokn3.dll differ diff --git a/mRemoteV1/Firefox/xul.dll b/mRemoteV1/Firefox/xul.dll new file mode 100644 index 00000000..16f9a294 Binary files /dev/null and b/mRemoteV1/Firefox/xul.dll differ diff --git a/mRemoteV1/Images/ErrorImageType.cs b/mRemoteV1/Images/ErrorImageType.cs deleted file mode 100644 index 43465de2..00000000 --- a/mRemoteV1/Images/ErrorImageType.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace mRemoteNG.Images -{ - public enum ErrorImageType - { - _Information = 0, - _Warning = 1, - _Error = 2 - } -} \ No newline at end of file diff --git a/mRemoteV1/References/FilteredPropertyGrid.dll b/mRemoteV1/References/FilteredPropertyGrid.dll deleted file mode 100644 index 4561e8a9..00000000 Binary files a/mRemoteV1/References/FilteredPropertyGrid.dll and /dev/null differ diff --git a/mRemoteV1/References/MiniGeckoBrowser.dll b/mRemoteV1/References/MiniGeckoBrowser.dll deleted file mode 100644 index 901b73cf..00000000 Binary files a/mRemoteV1/References/MiniGeckoBrowser.dll and /dev/null differ diff --git a/mRemoteV1/References/Skybound.Gecko.dll b/mRemoteV1/References/Skybound.Gecko.dll deleted file mode 100644 index 19abc441..00000000 Binary files a/mRemoteV1/References/Skybound.Gecko.dll and /dev/null differ diff --git a/mRemoteV1/Resources/Language/Language.Designer.cs b/mRemoteV1/Resources/Language/Language.Designer.cs index 681a329b..cb19fa8c 100644 --- a/mRemoteV1/Resources/Language/Language.Designer.cs +++ b/mRemoteV1/Resources/Language/Language.Designer.cs @@ -608,7 +608,7 @@ namespace mRemoteNG { } /// - /// Looks up a localized string similar to XULrunner was found and seems to be installed properly.. + /// Looks up a localized string similar to GeckoFx was found and seems to be installed properly.. /// internal static string strCcGeckoOK { get { @@ -5704,7 +5704,7 @@ namespace mRemoteNG { } /// - /// Looks up a localized string similar to Single click on opened connection switches to it. + /// Looks up a localized string similar to Single click on opened connection in Connection Tree switches to opened Connection Tab. /// internal static string strSingleClickOnOpenConnectionSwitchesToIt { get { diff --git a/mRemoteV1/Resources/Language/Language.de.resx b/mRemoteV1/Resources/Language/Language.de.resx index cd12fbca..628e37dc 100644 --- a/mRemoteV1/Resources/Language/Language.de.resx +++ b/mRemoteV1/Resources/Language/Language.de.resx @@ -299,7 +299,7 @@ Wenn der Download abgeschlossen ist, entpacken Sie das Paket (Der Speicherort is Wenn Sie noch immer Probleme mit der Gecko Engine in mRemote haben, konsultieren Sie bitte das mRemoteNG-Forum: http://forum.mremoteng.org/ - XULrunner wurde gefunden und scheint korrekt installiert zu sein. + GeckoFx wurde gefunden und scheint korrekt installiert zu sein. ICA benötigt eine funktionierende XenDesktop-Online-Plugin-Installation und dass die Datei wfica.ocx korrekt registriert ist. Hier können Sie das Plugin herunterladen: http://www.citrix.com/download/ diff --git a/mRemoteV1/Resources/Language/Language.el.resx b/mRemoteV1/Resources/Language/Language.el.resx index b8496b2d..b1f9b8c4 100644 --- a/mRemoteV1/Resources/Language/Language.el.resx +++ b/mRemoteV1/Resources/Language/Language.el.resx @@ -290,7 +290,7 @@ Για να χρησιμοποιήσετε το μηχανισμό απόδοσης Gecko πρέπει να έχετε XULrunner 1.8.1.x και ο δρόμος για την εγκατάσταση ορίστε στις επιλογές σας. Μπορείτε να κατεβάσετε XULrunner 1.8.1.3 εδώ: ftp://ftp.mozilla.org/pub/xulrunner/releases/1.8.1.3/contrib/win32/ όταν ολοκληρώσετε τη λήψη κάντε εξαγωγή του πακέτου για την πορεία της επιλογής σας. Στη συνέχεια, στο mRemoteNG πηγαίνετε στο εργαλεία - επιλογές - προηγμένες και πληκτρολογήσει τη σωστή διαδρομή στο πεδίο διαδρομή XULrunner. Εάν είστε ακόμα δεν είναι σε θέση να περάσει ο έλεγχος αυτός ή χρησιμοποιούν την μηχανή Gecko στο mRemoteNG συμβουλευτείτε το mRemoteNG φόρουμ στο http://forum.mremoteng.org/ - Το XULrunner βρέθηκε και φαίνεται να έχει εγκατασταθεί σωστά. + Το GeckoFx βρέθηκε και φαίνεται να έχει εγκατασταθεί σωστά. ICA απαιτεί ότι είναι εγκατεστημένο το XenDesktop Online Plugin και ότι καταχωρείται η βιβλιοθήκη wfica.ocx. Μπορείτε να κατεβάσετε τον πελάτη εδώ: http://www.citrix.com/download/ αν έχετε το XenDesktop Online Plugin εγκατασταθεί και ο έλεγχος συνεχίσει να αποτυγχάνει, προσπαθήστε να εγγραφείτε wfica.ocx με μη αυτόματο τρόπο. Να κάνει αυτό ανοίγω πάνω στο τρέχω διάλογος (έναρξη - Run) και πληκτρολογήστε τα παρακάτω: regsvr32 "c:\Program Files\Citrix\ICA Client\wfica.ocx" (όπου c:\Program Files\Citrix\ICA Client\ είναι η διαδρομή στην εγκατάσταση XenDesktop Online Plugin). Εάν είστε ακόμα δεν είναι σε θέση να περάσει ο έλεγχος αυτός ή να χρησιμοποιήσετε ICA στο mRemoteNG συμβουλευτείτε το mRemoteNG φόρουμ στο http://forum.mremoteng.org/" diff --git a/mRemoteV1/Resources/Language/Language.es.resx b/mRemoteV1/Resources/Language/Language.es.resx index f24ff293..36a2f5b6 100644 --- a/mRemoteV1/Resources/Language/Language.es.resx +++ b/mRemoteV1/Resources/Language/Language.es.resx @@ -299,7 +299,7 @@ Cuando haya concluido la descarga, extraiga el paquete en un directorio de su el Si continúa sin funcionar la comprobación ó no puede utilizar el motor Gecko en mRemoteNG, consulte el Foro de mRemoteNG en http://forum.mremoteng.org/ - XULrunner ha sido localizado y parece estar instalado correctamente. + GeckoFx ha sido localizado y parece estar instalado correctamente. ICA necesita que esté instalado XenDesktop Online Plugin y que la librería wfica.ocx esté registrada. Puede descargar el cliente aquí: http://www.citrix.com/download/ diff --git a/mRemoteV1/Resources/Language/Language.fr.resx b/mRemoteV1/Resources/Language/Language.fr.resx index 93d03f60..73fb7d62 100644 --- a/mRemoteV1/Resources/Language/Language.fr.resx +++ b/mRemoteV1/Resources/Language/Language.fr.resx @@ -293,7 +293,7 @@ Veuillez utiliser le menu Fichier - Ouvrir un fichier de connexion pour les fich Pour utiliser le moteur de rendu Gecko, vous devez avoir XULrunner 1.8.1.x et le chemin d'accès correctement renseigné dans vos Options. Vous pouvez télécharger XULrunner 1.8.1.3 ici : ftp://ftp.mozilla.org/pub/xulrunner/releases/1.8.1.3/contrib/win32/ Lorsque vous avez terminé le téléchargement, extraire le package vers le chemin de votre choix. Puis dans mRemoteNG, allez dans Outils - Options - Avancées et entrez le chemin d'accès correct dans "chemin de XULrunner". Si vous n'êtes toujours pas en mesure de passer cette vérification ou d'utiliser le moteur Gecko dans mRemoteNG, veuillez consulter le Forum de mRemoteNG sur http://forum.mremoteng.org/ - XULRunner a été trouvé et semble être installé correctement. + GeckoFx a été trouvé et semble être installé correctement. ICA requiert l'installation du Plugin XenDesktop Online, ainsi que l'enregistrement de la librairie wfica.ocx. Vous pouvez télécharger le client ici : http://www.citrix.com/download/ diff --git a/mRemoteV1/Resources/Language/Language.it.resx b/mRemoteV1/Resources/Language/Language.it.resx index d1dfa802..b8fda473 100644 --- a/mRemoteV1/Resources/Language/Language.it.resx +++ b/mRemoteV1/Resources/Language/Language.it.resx @@ -297,7 +297,7 @@ Quando il download è terminato, è sufficiente estrarre il pacchetto in una car Se il controllo fallisce o risulta impossibile utilizzare il motore di rendering Gecko con mRemoteNG, per favore consultare il forum di mRemoteNG all'indirizzo http://forum.mremoteng.org/ - XULrunner è stato rilevato e sembra installato correttamente. + GeckoFx è stato rilevato e sembra installato correttamente. ICA richiede che il plugin XenDesktop Online sia installato e che la libreria wfica.ocx sia registrata. Il client è scaricabile all'indirizzo http://www.citrix.com/download/ diff --git a/mRemoteV1/Resources/Language/Language.ja-JP.resx b/mRemoteV1/Resources/Language/Language.ja-JP.resx index 660b4980..19fb1b12 100644 --- a/mRemoteV1/Resources/Language/Language.ja-JP.resx +++ b/mRemoteV1/Resources/Language/Language.ja-JP.resx @@ -142,7 +142,8 @@ AddNodesFromSQL failed! - Allow only a single instance of the application (mRemoteNG restart required) + アプリケーションの単一インスタンスのみを許可する(mRemoteNGを再起動する必要があります) + Allow only a single instance of the application (mRemoteNG restart required) 常時 @@ -157,7 +158,7 @@ 常にパネルのタブを表示 - Always show notification area icon + 常に通知領域アイコンを表示 もう一度後で聞く @@ -166,7 +167,7 @@ Customize the settings now - Use the recommended settings + 推奨設定を使用 {0} can automatically check for updates that may provide new features and bug fixes. It is recommended that you allow {0} to check for updates weekly. @@ -306,7 +307,7 @@ When you are finished downloading extract the package to a path of your choice. If you are still not able to pass this check or use the Gecko Engine in mRemoteNG please consult the mRemoteNG Forum at http://forum.mremoteng.org/ - XULrunner was found and seems to be installed properly. + GeckoFx was found and seems to be installed properly. ICA requires that the XenDesktop Online Plugin is installed and that the wfica.ocx library is registered. You can download the client here: http://www.citrix.com/download/ @@ -319,7 +320,7 @@ If you are still not able to pass this check or use ICA in mRemoteNG please cons Citrix ICA Client Control Version {0} - not installed properly + 正しくインストールされていません The SSH, Telnet, Rlogin and RAW protocols need PuTTY to work. PuTTY comes with every mRemoteNG package and is located in the installation path. @@ -390,19 +391,21 @@ VncSharpNG Control Version {0} 点検する - Check proper installation of components at startup + 起動時に必要なコンポネントがインストールされているかを確認する + Check proper installation of components at startup - Choose panel before connecting + 接続時にパネルを選択する + Choose panel before connecting - Closed Ports + 閉じているポート - Collapse all folders + すべてのフォルダを折りたたむ - Arguments + パラメータ ディスプレイ名 @@ -427,7 +430,7 @@ VncSharpNG Control Version {0} E&xit {0} - Couldn't parse command line args! + コマンドのパラメータが正しくありません 接続ファイルを開く(&O) @@ -439,13 +442,13 @@ VncSharpNG Control Version {0} {0} has detected the Lenovo Auto Scroll Utility running on this system. This utility is known to cause problems with {0}. It is recommended that you disable or uninstall it. - Compatibility problem detected + 互換性の問題が検出されました - Components Check + コンポーネントの確認 - btnIcon_Click failed! + btnIcon_Clickがエラーを発生しました ShowHideGridItems failed! @@ -466,7 +469,8 @@ VncSharpNG Control Version {0} Config UI load failed! - Do you want to close the connection, "{0}"? + 接続「{0}」を切断しますか? + Do you want to close the connection, "{0}"? Are you sure you want to close the panel, "{0}"? Any connections that it contains will also be closed. @@ -481,7 +485,7 @@ VncSharpNG Control Version {0} Are you sure you want to delete the connection, "{0}"? - Are you sure you want to delete the empty folder, "{0}"? + 空のフォルダ「{0}」削除してもよろしいですか? Are you sure you want to delete the folder, "{0}"? Any folders or connections that it contains will also be deleted. @@ -490,7 +494,7 @@ VncSharpNG Control Version {0} すべてのセッションを切断しますか? - Are you sure you want to reset the panels to their default layout? + パネル配置を初期化しますか? 接続 @@ -517,7 +521,7 @@ VncSharpNG Control Version {0} 接続の開始に失敗しました - Cannot open connection: No hostname specified! + ホスト名が入力されていないので接続出来ません RDP error! @@ -550,22 +554,23 @@ Starting with new connections file. Couldn't save connections file as "{0}"! - Connect without credentials + 資格情報なしで接続 - Connect to console session + コンソールセッションに接続 - Connect (with options) + オプションを使用して接続 - Connection to {0} via {1} closed by user {2}. + ユーザー{1}によって接続「{0}」は切断されました + Connection to {0} via {1} closed by user {2}. Connection to {0} via {1} closed by user {2}. (Description: "{3}"; User Field: "{4}") - Connection Event Closed + 接続イベントに失敗しました Connection Event Closed failed! @@ -577,13 +582,13 @@ Starting with new connections file. Could not find ToolStrip control in FilteredPropertyGrid. - Installed version + バージョン - Default Theme + デフォルトのテーマ - Detect + 検出する Don't connect to console session @@ -592,37 +597,37 @@ Starting with new connections file. Don't connect if authentication fails - Double click on tab closes it + ダブルクリックでタブを閉じる - Download and Install + ダウンロードとインストール - Duplicate + 複製 - Do you want to continue with no password? + パスワード無しでよろしいですか? For empty Username, Password or Domain fields use: - 128-bit + 128ビット 128-bit (logon only) - 40-bit + 40ビット - 56-bit + 56ビット Basic - Completely encrypt connection file + 接続設定ファイルをすべて暗号化する End IP @@ -674,10 +679,10 @@ See the Microsoft Support article at http://support.microsoft.com/kb/811833 for VerifyDatabaseVersion (Config.Connections.Save) failed. {0} - Expand all folders + すべてのフォルダを展開 - Experimental + 試験的機能 エクスポート @@ -686,10 +691,10 @@ See the Microsoft Support article at http://support.microsoft.com/kb/811833 for すべてエクスポート - Export File + ファイルをエクスポート - Export Items + アイテムをエクスポート Export mRemote/mRemoteNG XML @@ -704,13 +709,13 @@ See the Microsoft Support article at http://support.microsoft.com/kb/811833 for Export the currently selected folder - &Export to File... + ファイルへの書き出し...(&E) Ext. App - New External Tool + 新規外部ツール Includes icons by [FAMFAMFAM] @@ -731,10 +736,10 @@ See the Microsoft Support article at http://support.microsoft.com/kb/811833 for 実行ファイル(*.exe) - mRemote CSV Files (*.csv) + mRemote CSVファイル(*.csv) - mRemote XML Files (*.xml) + mRemote XMLファイル(*.xml) PuTTY Connection Manager files @@ -761,10 +766,10 @@ See the Microsoft Support article at http://support.microsoft.com/kb/811833 for 全画面 - General + 一般 - Get Connection Info From SQL failed + SQLサーバーからの接続情報の取得に失敗しました An error occured while loading the connection entry for "{0}" from "{1}". {2} @@ -788,10 +793,10 @@ See the Microsoft Support article at http://support.microsoft.com/kb/811833 for HTTP - HTTP Connect Failed! + HTTP接続に失敗しました - Couldn't create new HTTP Connection! + 新規のHTTP接続に失敗しました Changing HTTP Document Tile Failed! @@ -833,19 +838,19 @@ See the Microsoft Support article at http://support.microsoft.com/kb/811833 for Identify quick connect tabs by adding the prefix "Quick:" - Import from Active Directory + アクティブディレクトリからインポート - Import/Export + インポート/エクスポート - An error occurred while importing the file, "{0}". + ファイル「{0}」のインポート中にエラーが発生しました - Import failed + インポートに失敗しました - Import from &File... + ファイルからインポート...(&F) Under the root{0}{1}|Under the selected folder{0}{2} @@ -857,13 +862,13 @@ See the Microsoft Support article at http://support.microsoft.com/kb/811833 for Import location - &Import + インポート(&I) Import mRemote/mRemoteNG XML - Import from Port Scan + ポートスキャンからインポート Import from .RDP file(s) @@ -872,13 +877,13 @@ See the Microsoft Support article at http://support.microsoft.com/kb/811833 for Inactive - Informations + 情報 - mRemoteNG is up to date + mRemoteNGは最新バージョンです - Connection failed! + 接続に失敗しました Dispose of Int App process failed! @@ -911,25 +916,25 @@ See the Microsoft Support article at http://support.microsoft.com/kb/811833 for CTRL-ESC - Address: + アドレス: - Arguments: + パラメータ: - Change Log: + 履歴: - When closing connections: + 切断時: - &Connect: + 接続(&C): - Display Name + ディスプレイ名 - Domain: + ドメイン: ファイル名: @@ -965,7 +970,8 @@ See the Microsoft Support article at http://support.microsoft.com/kb/811833 for - Select a panel from the list below or click New to add a new one. Click OK to continue. + パネルを選択するか新規パネルを追加してください。 + Select a panel from the list below or click New to add a new one. Click OK to continue. サーバーの状態: @@ -980,34 +986,36 @@ See the Microsoft Support article at http://support.microsoft.com/kb/811833 for ユーザー名: - Verify: + 確認: - Language + 言語 (自動検出) - {0} must be restarted before changes to the language will take effect. + 言語設定の変更を有効にするには{0}の再起動が必要です + {0} must be restarted before changes to the language will take effect. - Load from SQL failed + SQLサーバーからの読み込みに失敗しました - The connection information could not be loaded from the SQL server. + 接続情報はSQLサーバーから読み込むことが出来ませんでした + The connection information could not be loaded from the SQL server. - Load From XML failed! + XMLファイルからの読み込みに失敗しました - Local file + ローカルファイル - Local file does not exist! + ファイルが存在しません - Logoff + ログオフ Writing to report file failed! @@ -1148,7 +1156,7 @@ See the Microsoft Support article at http://support.microsoft.com/kb/811833 for ポートをスキャンする - Quick Connect Toolbar + クイック接続ツールバー 再接続 @@ -1178,7 +1186,7 @@ See the Microsoft Support article at http://support.microsoft.com/kb/811833 for 接続ファイルの保存 - Save Connection File As... + 接続ファイルを別名で保存... スクリーンキャプチャ @@ -1199,7 +1207,8 @@ See the Microsoft Support article at http://support.microsoft.com/kb/811833 for セッションとスクリーンキャプチャ - &Show Help Text + ヘルプ文字を表示(&S) + &Show Help Text 文字の表示 @@ -1298,7 +1307,8 @@ If you run into such an error, please create a new connection file! If you run into such an error, please create a new connection file! - Open new tab to the right of the currently selected tab + 選択されているタブの右側に新規タブを作成 + Open new tab to the right of the currently selected tab Open Ports @@ -1356,7 +1366,7 @@ If you run into such an error, please create a new connection file! 同じパスワードを入力してください - The password must be at least 3 characters long. + パスワードは最低3文字必要です 全て入力してください @@ -1371,7 +1381,7 @@ If you run into such an error, please create a new connection file! (These properties will only be saved if you select mRemote/mRemoteNG XML as output file format!) - Enter the hostname or ip you want to connect to. + ホスト名かIPアドレスを入力してください Toggle all inheritance options. @@ -1440,13 +1450,15 @@ If you run into such an error, please create a new connection file! This is the name that will be displayed in the connections tree. - Sets the panel in which the connection will open. + 接続をするパネルを指定 + Sets the panel in which the connection will open. - パスワードを入力してください + パスワードを入力 - Enter the port the selected protocol is listening on. + プロトコルのポートを入力 + Enter the port the selected protocol is listening on. Choose the protocol mRemoteNG should use to connect to the host. @@ -1527,55 +1539,55 @@ If you run into such an error, please create a new connection file! Enter your username for authenticating against the proxy. - Hostname/IP + ホスト名またはIPアドレス 全て - Server Authentication + サーバー認証 - Authentication Mode + 認証モード - Automatic Resize + 自動サイズ変更 - Cache Bitmaps + ビットマップをキャッシュ - Compression + 圧縮 - Description + 説明 - Display Themes + テーマの表示 - Display Wallpaper + ウォールペーパーを表示 - Domain + ドメイン Desktop Composition - Font Smoothing + フォントの滑らかさ - Encoding + エンコード Encryption Strength - External Tool + 外部ツール External Tool After @@ -1611,28 +1623,28 @@ If you run into such an error, please create a new connection file! PuTTYのセッション - Gateway Domain + ゲートウェイのドメイン - Gateway Hostname + ゲートウェイのホスト名 Remote Desktop Gateway Password - Use Gateway + ゲートウェイを使用 - Gateway Credentials + ゲートウェイの資格情報 - Gateway Username + ゲートウェイのユーザー名 - Disk Drives + ディスク・ドライブ - Key Combinations + キーの組み合わせ ポート @@ -1647,16 +1659,16 @@ If you run into such an error, please create a new connection file! サウンド - Rendering Engine + レンダリングエンジン - Resolution + 解像度 - SmartSize Mode + スマートサイズモード - Use Console Session + コンソールセッションを使用 Use CredSSP @@ -1665,25 +1677,27 @@ If you run into such an error, please create a new connection file! User Field - Username + ユーザー名 - View Only + 表示のみ - Proxy Address + プロキシーのアドレス + Proxy Address - Proxy Password + プロキシーのパスワード + Proxy Password - Proxy Port + プロキシーのポート - Proxy Type + プロキシーの種類 - Proxy Username + プロキシーのユーザー名 Protocol Event Disconnected. @@ -1704,7 +1718,7 @@ Message: Proxy test succeeded! - Connection failed! + 接続に失敗しました Dispose of Putty process failed! @@ -1752,7 +1766,7 @@ Message: Quick: {0} - Quick Connect + クイック接続 Quick Connect Add Failed! @@ -1821,16 +1835,16 @@ Message: Disable Full Window drag - Disable Menu Animations + メニューのアニメーションを無効にする - Disable Themes + テーマを無効にする Disable Wallpaper - RDP disconnected! + リモートデスクトップが切断されました RDP Disconnect failed, trying to close! @@ -1869,7 +1883,7 @@ Message: Winsock initialization error. - Couldn't import rdp file! + RDPファイルのインポートに失敗しました Fit To Panel @@ -1932,13 +1946,13 @@ Message: Smart Size - Bring to this computer + このコンピューターで再生 - Do not play + 再生しない - Leave at remote computer + 遠隔コンピューターで再生 RDP ToggleFullscreen failed! @@ -1947,10 +1961,11 @@ Message: RDP ToggleSmartSize failed! - Reconnect to previously opened sessions on startup + 起動時に前セッション時の接続を開始する + Reconnect to previously opened sessions on startup - Refresh + 更新 遠隔ファイル @@ -1974,25 +1989,25 @@ Message: Do you want to save the current connections file before loading another? - Save connections on exit + 終了時に保存する Graphics Interchange Format File (.gif)|*.gif|Joint Photographic Experts Group File (.jpeg)|*.jpeg|Joint Photographic Experts Group File (.jpg)|*.jpg|Portable Network Graphics File (.png)|*.png - Screen + スクリーン スクリーンショット - スクリーンショット + 複数のスクリーンショット - Search + 検索 - Send To... + 送信... Get Sessions Background failed @@ -2010,10 +2025,12 @@ Message: Couldn't save settings or dispose SysTray Icon! - Show description tooltips in connection tree + 接続ツリーに接続の説明をツールチップを表示する + Show description tooltips in connection tree - Show full connections file path in window title + ウィンドウのタイトルに接続設定ファイルへのフルパス名を表示する + Show full connections file path in window title Show logon information on tab names @@ -2085,7 +2102,7 @@ Message: 開始のポート - Startup/Exit + 起動と終了 ステータス @@ -2094,22 +2111,22 @@ Message: Switch to Notifications panel on: - Advanced + 詳細設定 外観 - Tabs && Panels + タブとパネル - 更新 + タブの更新 Telnet - The following: + 以下: 設定パネル @@ -2121,7 +2138,7 @@ Message: General - The background colour of the config panel. + 設定パネルの背景色 The colour of the category text in the config panel. diff --git a/mRemoteV1/Resources/Language/Language.nb-NO.resx b/mRemoteV1/Resources/Language/Language.nb-NO.resx index 746d165c..67fb482a 100644 --- a/mRemoteV1/Resources/Language/Language.nb-NO.resx +++ b/mRemoteV1/Resources/Language/Language.nb-NO.resx @@ -299,7 +299,7 @@ Når nedlastingen er ferdig, pakk den ut til et passende sted. I mRemoteNG, gå Hvis du fremdeles ikke passerer denne kontrollen eller brukre Gecko-renderingsmotoren i mRemoteNG, vennligst konsulter mRemoteNG-forumet på http://forum.mremoteng.org/ - XULrunner ble funnet å ser ut til å være korrekt installert. + GeckoFx ble funnet å ser ut til å være korrekt installert. ICA krever at XenDesktop Online Plugin er installert og at wfica.ocx-biblioteket er registrert. Du kan laste ned klienten herfra: http://www.citrix.com/download/ diff --git a/mRemoteV1/Resources/Language/Language.nl.resx b/mRemoteV1/Resources/Language/Language.nl.resx index 486df665..6699f822 100644 --- a/mRemoteV1/Resources/Language/Language.nl.resx +++ b/mRemoteV1/Resources/Language/Language.nl.resx @@ -299,7 +299,7 @@ Wanneer de download van het pakket is voltooid kunt u deze uitpakken naar een wi Als u nog steeds niet in staat bent om de langs check te komen gebruik dan de Gecko Engine in mRemoteNG of raadpleeg mRemoteNG Forum op http://forum.mremoteng.org/ - XULrunner werd gevonden en lijkt correct te zijn geïnstalleerd. + GeckoFx werd gevonden en lijkt correct te zijn geïnstalleerd. ICA vereist dat de XenDesktop Online Plugin is geïnstalleerd is en dat de wfica.ocx bibliotheek is geregistreerd. U kunt de cliënt van deze locatie downloaden: http://www.citrix.com/download/ diff --git a/mRemoteV1/Resources/Language/Language.pl.resx b/mRemoteV1/Resources/Language/Language.pl.resx index 3de582ad..bfeb5a38 100644 --- a/mRemoteV1/Resources/Language/Language.pl.resx +++ b/mRemoteV1/Resources/Language/Language.pl.resx @@ -295,7 +295,7 @@ Jeśli nadal nie można sprawdzić lub użyć fukcji Sesji (RDP) skonsultuj to n Aby użyć Gecko Rendering Engine, musisz mieć XULrunner 1.8.1.x oraz podać ścieżkę instalacji w opcjach. XULrunner 1.8.1.3 możesz pobrać ze ftp: ftp://ftp.mozilla.org/pub/xulrunner/releases/1.8.1.3/contrib/win32/ Po zakończeniu pobierania wypakuj pakiet do właściwego katalogu. Następnie w mRemoteNG przejdź do menu Narzędzia - Opcje - Zaawansowane i wprowadź poprawną ścieżkę w polu Ścieżka XULrunner. Jeśli to nadal nie pomogło prosimy o kontakt na mRemoteNG Forum na stronie http://forum.mremoteng.org/ - XULrunner został znaleziony i wydaje się być zainstalowany prawidłowo. + GeckoFx został znaleziony i wydaje się być zainstalowany prawidłowo. ICA wymaga zainstalowania wtyczki Online XenDesktop, i aby była zarejestrowana biblioteka wfica.ocx. Możesz pobrać klienta tutaj: http://www.citrix.com/download/ Jeżeli masz zainstalowany Plugin Online XenDesktop a nadal nie działa, spróbuj ręcznie zarejestrować bibliotekę wfica.ocx. Aby to zrobić wybierz polecenie Uruchom (Start - Uruchom) i wprowadź w linii komend: regsvr32 "c:\Program Files\Citrix\ICA Client\wfica.ocx" (gdzie c:\Program Files\Citrix\ICA Client\ jest ścieżką instalacji XenDesktop Online Plugin). Jeśli nadal nie można użyć ICA w mRemoteNG prosimy o kontakt mRemoteNG Forum na http://forum.mremoteng.org/ diff --git a/mRemoteV1/Resources/Language/Language.pt-BR.resx b/mRemoteV1/Resources/Language/Language.pt-BR.resx index dbb75877..e2748bb4 100644 --- a/mRemoteV1/Resources/Language/Language.pt-BR.resx +++ b/mRemoteV1/Resources/Language/Language.pt-BR.resx @@ -296,7 +296,7 @@ Em seguida, emtre no mRemoteNG e vá em ferramentas - opções - avançadas e di Se ainda não conseguir passar esta verificação ou usar o motor Gecko em mRemoteNG por favor consultar o fórum de mRemoteNG em http://forum.mremoteng.org/ - XULrunner foi encontrado e aparenta estar instalado corretamente. + GeckoFx foi encontrado e aparenta estar instalado corretamente. ICA requer que o XenDesktop Online Plugin esteja instalado e a biblioteca wfica.ocs registrada. Você pode baixar o cliente aqui: http://www.citrix.com/download/ diff --git a/mRemoteV1/Resources/Language/Language.pt.resx b/mRemoteV1/Resources/Language/Language.pt.resx index 269d8bca..273199a3 100644 --- a/mRemoteV1/Resources/Language/Language.pt.resx +++ b/mRemoteV1/Resources/Language/Language.pt.resx @@ -292,7 +292,7 @@ Para usar o motor de renderização Gecko, você precisará ter o XULrunner 1.8.1.x e o caminho configurado nas opções. Você pode baixar o XULrunner 1.8.1.3 em: ftp://ftp.mozilla.org/pub/xulrunner/releases/1.8.1.3/contrib/win32/ quando terminar de descarregar, extraia o pacote para um caminho de sua escolha. Em seguida, em mRemoteNG vá em ferramentas - opções - avançadas e digite o caminho correto no campo caminho XULrunner. Se você ainda não pode executar esta seleção ou usar o motor Gecko em mRemoteNG, por favor, consulte o fórum de mRemoteNG em http://forum.mremoteng.org/ - XULrunner foi encontrado e aparenta estar instalado corretamente. + GeckoFx foi encontrado e aparenta estar instalado corretamente. ICA requer que o XenDesktop Online Plugin esteja instalado e a biblioteca wfica registrada. Você pode baixar o cliente aqui: http://www.citrix.com/download/ se você tiver o Plugin Online XenDesktop instalado e a verificação ainda falhar, tente registrar manualmente o wfica. Para fazer isso abra a caixa de diálogo Executar (Iniciar - Executar) e digite o seguinte: regsvr32 "c:\Program Files\Citrix\ICA Client\wfica.ocx" (onde c:\Program Files\Citrix\ICA Client\ é o caminho para a instalação do Plugin Online do XenDesktop). Se você ainda não pode passar essa verificação ou usar ICA em mRemoteNG, por favor, consulte o fórum de mRemoteNG no http://forum.mremoteng.org/" diff --git a/mRemoteV1/Resources/Language/Language.resx b/mRemoteV1/Resources/Language/Language.resx index bb6c8a01..f9ec80b8 100644 --- a/mRemoteV1/Resources/Language/Language.resx +++ b/mRemoteV1/Resources/Language/Language.resx @@ -305,7 +305,7 @@ When you are finished downloading extract the package to a path of your choice. If you are still not able to pass this check or use the Gecko Engine in mRemoteNG please consult the mRemoteNG Forum at http://forum.mremoteng.org/ - XULrunner was found and seems to be installed properly. + GeckoFx was found and seems to be installed properly. ICA requires that the XenDesktop Online Plugin is installed and that the wfica.ocx library is registered. You can download the client here: http://www.citrix.com/download/ @@ -2018,7 +2018,7 @@ Message: Single click on connection opens it - Single click on opened connection switches to it + Single click on opened connection in Connection Tree switches to opened Connection Tab Aspect diff --git a/mRemoteV1/Resources/Language/Language.ru.resx b/mRemoteV1/Resources/Language/Language.ru.resx index dfc1bbbf..6bc1963a 100644 --- a/mRemoteV1/Resources/Language/Language.ru.resx +++ b/mRemoteV1/Resources/Language/Language.ru.resx @@ -299,7 +299,7 @@ Если у вас ничего не получилось обратитесь на форум mRemoteNG http://forum.mremoteng.org/ - XULRunner был найден и установлен правильно. + GeckoFx был найден и установлен правильно. ICA требуется установленный XenDesktop Online Plugin и зарегистрированная библиотека wfica.ocx. Вы можете скачать клиент здесь: http://www.citrix.com/download/ diff --git a/mRemoteV1/Resources/Language/Language.uk.resx b/mRemoteV1/Resources/Language/Language.uk.resx index 8d32a793..53b4cce1 100644 --- a/mRemoteV1/Resources/Language/Language.uk.resx +++ b/mRemoteV1/Resources/Language/Language.uk.resx @@ -296,7 +296,7 @@ mRemoteNG завантажиться з цим компонентом, але н Якщо у вас нічого не вийшло зверніться на форум mRemoteNG http://forum.mremoteng.org/ - XULRunner було знайдено і встановлено правильно. + GeckoFx було знайдено і встановлено правильно. ICA потрібний встановлений XenDesktop Online Plugin і зареєстрована бібліотека wfica.ocx. Ви можете завантажити клієнт тут: http://www.citrix.com/download/ diff --git a/mRemoteV1/Resources/Language/Language.zh-CN.resx b/mRemoteV1/Resources/Language/Language.zh-CN.resx index ed27b0b0..fe02fdd6 100644 --- a/mRemoteV1/Resources/Language/Language.zh-CN.resx +++ b/mRemoteV1/Resources/Language/Language.zh-CN.resx @@ -295,7 +295,7 @@ 如果执行此操作后,依然无法通过Gecko渲染引擎的检测,请在mRemoteNG论坛中咨询,地址是:http://forum.mremoteng.org/ - 发现XULrunner组件。 + 发现GeckoFx组件。 启用ICA需要提前安装 XenDesktop Online 插件,并正确注册wfica.ocx库文件。您可以在此下载此插件:http://www.citrix.com/download/ diff --git a/mRemoteV1/Resources/Language/Language.zh-TW.resx b/mRemoteV1/Resources/Language/Language.zh-TW.resx index adb3f60c..d17a2dbe 100644 --- a/mRemoteV1/Resources/Language/Language.zh-TW.resx +++ b/mRemoteV1/Resources/Language/Language.zh-TW.resx @@ -287,7 +287,7 @@ 找到 EOLWTSCOM 並似乎正確註冊。 - 找到 XULrunner 並似乎正確註冊。 + 找到 GeckoFx 並似乎正確註冊。 找到所有 ICA 元件並似乎正確註冊。 diff --git a/mRemoteV1/Themes/ThemeSerializer.cs b/mRemoteV1/Themes/ThemeSerializer.cs index 75a6f49b..a4205647 100644 --- a/mRemoteV1/Themes/ThemeSerializer.cs +++ b/mRemoteV1/Themes/ThemeSerializer.cs @@ -1,10 +1,8 @@ using System.Collections.Generic; using System; using System.Drawing; -using Microsoft.VisualBasic; using System.IO; using System.Xml; -using System.Reflection; namespace mRemoteNG.Themes @@ -119,7 +117,8 @@ namespace mRemoteNG.Themes private static string EncodeColorName(Color color) { - return color.IsNamedColor ? color.Name : Conversion.Hex(color.ToArgb()).PadLeft(8, '0'); + // best/simplest answer to converting to hex: http://stackoverflow.com/questions/12078942/how-to-convert-from-argb-to-hex-aarrggbb + return color.IsNamedColor ? color.Name : $"{color.A:X2}{color.R:X2}{color.G:X2}{color.B:X2}"; } private static Color DecodeColorName(string name) diff --git a/mRemoteV1/Tools/ArgumentParser.cs b/mRemoteV1/Tools/ArgumentParser.cs index f0affe36..d79e5be4 100644 --- a/mRemoteV1/Tools/ArgumentParser.cs +++ b/mRemoteV1/Tools/ArgumentParser.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Text; using mRemoteNG.Connection; namespace mRemoteNG.Tools @@ -68,7 +67,7 @@ namespace mRemoteNG.Tools variableNameLength--; variableName = input.Substring(variableNameStart, variableNameLength); - replacements.Add(new Replacement(tokenStart, tokenLength, string.Format("%{0}%", variableName))); + replacements.Add(new Replacement(tokenStart, tokenLength, $"%{variableName}%")); index = tokenEnd; continue; @@ -89,7 +88,7 @@ namespace mRemoteNG.Tools break; } - if (!(escape == EscapeType.All)) + if (escape != EscapeType.All) { // Remove the escape character from the name variableNameStart++; @@ -112,7 +111,7 @@ namespace mRemoteNG.Tools bool haveReplacement = false; - if (!(replacementValue == token)) + if (replacementValue != token) { haveReplacement = true; } @@ -138,7 +137,7 @@ namespace mRemoteNG.Tools replacementValue = CommandLineArguments.EscapeBackslashesForTrailingQuote(replacementValue); } - if (escape == EscapeType.All | escape == EscapeType.ShellMetacharacters) + if (escape == EscapeType.All || escape == EscapeType.ShellMetacharacters) replacementValue = CommandLineArguments.EscapeShellMetacharacters(replacementValue); replacements.Add(new Replacement(tokenStart, tokenLength, replacementValue)); @@ -156,7 +155,7 @@ namespace mRemoteNG.Tools { foreach (Replacement replacement in replacements) { - if (!(replacement.Start == index)) + if (replacement.Start != index) { continue; } diff --git a/mRemoteV1/Tools/Authenticode.cs b/mRemoteV1/Tools/Authenticode.cs index 2df72f94..14b8abdb 100644 --- a/mRemoteV1/Tools/Authenticode.cs +++ b/mRemoteV1/Tools/Authenticode.cs @@ -1,5 +1,4 @@ using System; -using Microsoft.VisualBasic; using System.Windows.Forms; using System.IO; using System.Security.Cryptography.X509Certificates; @@ -172,7 +171,16 @@ namespace mRemoteNG.Tools case StatusValue.NoThumbprintToMatch: return "A thumbprint match is required but no thumbprint to match against was specified."; case StatusValue.ThumbprintNotMatch: - return string.Format("The thumbprint does not match. {0} {1} {2}.", _thumbprint, Strings.ChrW(0x2260), ThumbprintToMatch); + /* (char)0x2260 == the "not equal to" symbol (which I cannot print in here without changing the encoding of the file) + * Fancy... + * + * "<>" is fiarly cryptic for non-programers + * So is "!=" + * "=/=" gets the job done, no? + * What about plain old English (or localized value): X is not equal to Y? + * :P + */ + return string.Format("The thumbprint does not match. {0} {1} {2}.", _thumbprint, (char)0x2260, ThumbprintToMatch); case StatusValue.TrustProviderError: Win32Exception ex = new Win32Exception(_trustProviderErrorCode); return string.Format("The trust provider returned an error. {0}", ex.Message); diff --git a/mRemoteV1/Tools/MiscTools.cs b/mRemoteV1/Tools/MiscTools.cs index c48088e7..f2c1baab 100644 --- a/mRemoteV1/Tools/MiscTools.cs +++ b/mRemoteV1/Tools/MiscTools.cs @@ -1,4 +1,3 @@ -using Microsoft.VisualBasic; using mRemoteNG.App; using mRemoteNG.Forms; using mRemoteNG.UI.Window; @@ -142,8 +141,7 @@ namespace mRemoteNG.Tools } public static string PrepareValueForDB(string Text) { - Text = Strings.Replace(Expression: Text, Find: "\'", Replacement: "\'\'", Compare: CompareMethod.Text); - return Text; + return Text.Replace("\'", "\'\'"); } diff --git a/mRemoteV1/Tools/ProcessController.cs b/mRemoteV1/Tools/ProcessController.cs index fc42217e..d275f4d2 100644 --- a/mRemoteV1/Tools/ProcessController.cs +++ b/mRemoteV1/Tools/ProcessController.cs @@ -1,9 +1,8 @@ using System.Collections.Generic; using System; using System.Diagnostics; -using System.Runtime.InteropServices; using System.Text; - +using mRemoteNG.App; namespace mRemoteNG.Tools { @@ -15,14 +14,10 @@ namespace mRemoteNG.Tools Process.StartInfo.UseShellExecute = false; Process.StartInfo.FileName = fileName; if (arguments != null) - { Process.StartInfo.Arguments = arguments.ToString(); - } if (!Process.Start()) - { return false; - } GetMainWindowHandle(); return true; @@ -31,104 +26,66 @@ namespace mRemoteNG.Tools public bool SetControlVisible(string className, string text, bool visible = true) { if (Process == null || Process.HasExited) - { return false; - } if (Handle == IntPtr.Zero) - { return false; - } IntPtr controlHandle = GetControlHandle(className, text); if (controlHandle == IntPtr.Zero) - { return false; - } - int nCmdShow = 0; + uint nCmdShow = 0; if (visible) - { - nCmdShow = Win32.SW_SHOW; - } + nCmdShow = NativeMethods.SW_SHOW; else - { - nCmdShow = Win32.SW_HIDE; - } - Win32.ShowWindow(controlHandle, nCmdShow); + nCmdShow = NativeMethods.SW_HIDE; + NativeMethods.ShowWindow(controlHandle, (int)nCmdShow); return true; } public bool SetControlText(string className, string oldText, string newText) { - if (Process == null || Process.HasExited) - { + if (Process == null || Process.HasExited || Handle == IntPtr.Zero) return false; - } - if (Handle == IntPtr.Zero) - { - return false; - } - + IntPtr controlHandle = GetControlHandle(className, oldText); if (controlHandle == IntPtr.Zero) - { return false; - } - IntPtr result = Win32.SendMessage(controlHandle, Win32.WM_SETTEXT, (IntPtr)0, new StringBuilder(newText)); - if (!(result.ToInt32() == Win32.TRUE)) - { + IntPtr result = NativeMethods.SendMessage(controlHandle, NativeMethods.WM_SETTEXT, (IntPtr)0, new StringBuilder(newText)); + if (!(result.ToInt32() == NativeMethods.TRUE)) return false; - } return true; } public bool SelectListBoxItem(string itemText) { - if (Process == null || Process.HasExited) - { + if (Process == null || Process.HasExited || Handle == IntPtr.Zero) return false; - } - if (Handle == IntPtr.Zero) - { - return false; - } IntPtr listBoxHandle = GetControlHandle("ListBox"); if (listBoxHandle == IntPtr.Zero) - { return false; - } - IntPtr result = Win32.SendMessage(listBoxHandle, Win32.LB_SELECTSTRING, (IntPtr)(-1), new StringBuilder(itemText)); - if (result.ToInt32() == Win32.LB_ERR) - { + IntPtr result = NativeMethods.SendMessage(listBoxHandle, NativeMethods.LB_SELECTSTRING, (IntPtr)(-1), new StringBuilder(itemText)); + if (result.ToInt32() == NativeMethods.LB_ERR) return false; - } return true; } public bool ClickButton(string text) { - if (Process == null || Process.HasExited) - { + if (Process == null || Process.HasExited || Handle == IntPtr.Zero) return false; - } - if (Handle == IntPtr.Zero) - { - return false; - } IntPtr buttonHandle = GetControlHandle("Button", text); if (buttonHandle == IntPtr.Zero) - { return false; - } - int buttonControlId = Win32.GetDlgCtrlID(buttonHandle.ToInt32()); - Win32.SendMessage(Handle, Win32.WM_COMMAND, (IntPtr)buttonControlId, buttonHandle); + int buttonControlId = NativeMethods.GetDlgCtrlID(buttonHandle.ToInt32()); + NativeMethods.SendMessage(Handle, NativeMethods.WM_COMMAND, (IntPtr)buttonControlId, buttonHandle); return true; } @@ -136,32 +93,28 @@ namespace mRemoteNG.Tools public void WaitForExit() { if (Process == null || Process.HasExited) - { return ; - } Process.WaitForExit(); } #endregion -#region Protected Fields + #region Protected Fields protected Process Process = new Process(); protected IntPtr Handle = IntPtr.Zero; protected List Controls = new List(); -#endregion - -#region Protected Methods + #endregion + + #region Protected Methods protected IntPtr GetMainWindowHandle() { if (Process == null || Process.HasExited) - { return IntPtr.Zero; - } - Process.WaitForInputIdle(mRemoteNG.Settings.Default.MaxPuttyWaitTime * 1000); + Process.WaitForInputIdle(Settings.Default.MaxPuttyWaitTime * 1000); Handle = IntPtr.Zero; int startTicks = Environment.TickCount; - while (Handle == IntPtr.Zero && Environment.TickCount < startTicks + (mRemoteNG.Settings.Default.MaxPuttyWaitTime * 1000)) + while (Handle == IntPtr.Zero && Environment.TickCount < startTicks + (Settings.Default.MaxPuttyWaitTime * 1000)) { Process.Refresh(); Handle = Process.MainWindowHandle; @@ -173,29 +126,23 @@ namespace mRemoteNG.Tools return Handle; } - + protected IntPtr GetControlHandle(string className, string text = "") { - if (Process == null || Process.HasExited) - { + if (Process == null || Process.HasExited || Handle == IntPtr.Zero) return IntPtr.Zero; - } - if (Handle == IntPtr.Zero) - { - return IntPtr.Zero; - } if (Controls.Count == 0) { EnumWindows windowEnumerator = new EnumWindows(); Controls = windowEnumerator.EnumChildWindows(Handle); } - - System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(); + + StringBuilder stringBuilder = new StringBuilder(); IntPtr controlHandle = IntPtr.Zero; foreach (IntPtr control in Controls) { - Win32.GetClassName(control, stringBuilder, stringBuilder.Capacity); + NativeMethods.GetClassName(control, stringBuilder, stringBuilder.Capacity); if (stringBuilder.ToString() == className) { if (string.IsNullOrEmpty(text)) @@ -205,7 +152,7 @@ namespace mRemoteNG.Tools } else { - Win32.SendMessage(control, Win32.WM_GETTEXT, new IntPtr(stringBuilder.Capacity), stringBuilder); + NativeMethods.SendMessage(control, NativeMethods.WM_GETTEXT, new IntPtr(stringBuilder.Capacity), stringBuilder); if (stringBuilder.ToString() == text) { controlHandle = control; @@ -217,39 +164,6 @@ namespace mRemoteNG.Tools return controlHandle; } -#endregion - -#region Win32 - // ReSharper disable ClassNeverInstantiated.Local - private class Win32 - { - // ReSharper restore ClassNeverInstantiated.Local - // ReSharper disable InconsistentNaming - // ReSharper disable UnusedMethodReturnValue.Local - [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 IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, IntPtr lParam); - - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]public static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, System.Text.StringBuilder lParam); - - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]public static extern int GetDlgCtrlID(int hwndCtl); - - [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow); - - public const int LB_ERR = -1; - public const int LB_SELECTSTRING = 0x18C; - - public const int WM_SETTEXT = 0xC; - public const int WM_GETTEXT = 0xD; - public const int WM_COMMAND = 0x111; - - public const int SW_HIDE = 0; - public const int SW_SHOW = 5; - - public const int TRUE = 1; - // ReSharper restore UnusedMethodReturnValue.Local - // ReSharper restore InconsistentNaming - } -#endregion + #endregion } } diff --git a/mRemoteV1/Tools/Tools.Controls.cs b/mRemoteV1/Tools/Tools.Controls.cs index 95b2de36..03a41879 100644 --- a/mRemoteV1/Tools/Tools.Controls.cs +++ b/mRemoteV1/Tools/Tools.Controls.cs @@ -1,9 +1,6 @@ using System; -using Microsoft.VisualBasic; -using System.Collections; using System.Windows.Forms; using mRemoteNG.App; -using mRemoteNG.My; using mRemoteNG.UI.Forms; diff --git a/mRemoteV1/Tools/Tools.PortScan.cs b/mRemoteV1/Tools/Tools.PortScan.cs index 1269e1c9..127d248b 100644 --- a/mRemoteV1/Tools/Tools.PortScan.cs +++ b/mRemoteV1/Tools/Tools.PortScan.cs @@ -1,10 +1,3 @@ -using mRemoteNG.App; -using mRemoteNG.Connection.Protocol.Http; -using mRemoteNG.Connection.Protocol.SSH; -using mRemoteNG.Connection.Protocol.VNC; -using mRemoteNG.Connection.Protocol.RDP; -using mRemoteNG.Connection.Protocol.Telnet; -using mRemoteNG.Connection.Protocol.Rlogin; using System; using System.Collections; using System.Collections.Generic; @@ -13,84 +6,41 @@ using System.Net; using System.Net.NetworkInformation; using System.Threading; using System.Windows.Forms; -using mRemoteNG.My; +using mRemoteNG.App; +using mRemoteNG.Connection.Protocol.Http; +using mRemoteNG.Connection.Protocol.RDP; +using mRemoteNG.Connection.Protocol.Rlogin; +using mRemoteNG.Connection.Protocol.SSH; +using mRemoteNG.Connection.Protocol.Telnet; +using mRemoteNG.Connection.Protocol.VNC; +using mRemoteNG.Messages; - -namespace mRemoteNG.Tools.PortScan +namespace mRemoteNG.Tools { public class ScanHost { #region Private Variables - private static int _SSHPort = (int)ProtocolSSH1.Defaults.Port; - private static int _TelnetPort = (int)ProtocolTelnet.Defaults.Port; - private static int _HTTPPort = (int)ProtocolHTTP.Defaults.Port; - private static int _HTTPSPort = (int)ProtocolHTTPS.Defaults.Port; - private static int _RloginPort = (int)ProtocolRlogin.Defaults.Port; - private static int _RDPPort = (int)ProtocolRDP.Defaults.Port; - private static int _VNCPort = (int)ProtocolVNC.Defaults.Port; - private string _hostName = ""; - private string _hostIp; - private ArrayList _openPorts = new ArrayList(); - private ArrayList _closedPorts; - private bool _RDP; - private bool _VNC; - private bool _SSH; - private bool _Telnet; - private bool _Rlogin; - private bool _HTTP; - private bool _HTTPS; - #endregion + + #endregion #region Properties - public static int SSHPort - { - get { return _SSHPort; } - set { _SSHPort = value; } - } + public static int SSHPort { get; set; } = (int)ProtocolSSH1.Defaults.Port; - public static int TelnetPort - { - get { return _TelnetPort; } - set { _TelnetPort = value; } - } + public static int TelnetPort { get; set; } = (int)ProtocolTelnet.Defaults.Port; - public static int HTTPPort - { - get { return _HTTPPort; } - set { _HTTPPort = value; } - } + public static int HTTPPort { get; set; } = (int)ProtocolHTTP.Defaults.Port; - public static int HTTPSPort - { - get { return _HTTPSPort; } - set { _HTTPSPort = value; } - } + public static int HTTPSPort { get; set; } = (int)ProtocolHTTPS.Defaults.Port; - public static int RloginPort - { - get { return _RloginPort; } - set { _RloginPort = value; } - } + public static int RloginPort { get; set; } = (int)ProtocolRlogin.Defaults.Port; - public static int RDPPort - { - get { return _RDPPort; } - set { _RDPPort = value; } - } + public static int RDPPort { get; set; } = (int)ProtocolRDP.Defaults.Port; - public static int VNCPort - { - get { return _VNCPort; } - set { _VNCPort = value; } - } + public static int VNCPort { get; set; } = (int)ProtocolVNC.Defaults.Port; - public string HostName - { - get { return _hostName; } - set { _hostName = value; } - } - - public string HostNameWithoutDomain + public string HostName { get; set; } = ""; + + public string HostNameWithoutDomain { get { @@ -102,84 +52,45 @@ namespace mRemoteNG.Tools.PortScan } } - public string HostIp - { - get { return _hostIp; } - set { _hostIp = value; } - } + public string HostIp { get; set; } - public ArrayList OpenPorts - { - get { return _openPorts; } - set { _openPorts = value; } - } + public ArrayList OpenPorts { get; set; } = new ArrayList(); - public ArrayList ClosedPorts - { - get { return _closedPorts; } - set { _closedPorts = value; } - } + public ArrayList ClosedPorts { get; set; } - public bool RDP - { - get { return _RDP; } - set { _RDP = value; } - } + public bool RDP { get; set; } - public bool VNC - { - get { return _VNC; } - set { _VNC = value; } - } + public bool VNC { get; set; } - public bool SSH - { - get { return _SSH; } - set { _SSH = value; } - } - - public bool Telnet - { - get { return _Telnet; } - set { _Telnet = value; } - } + public bool SSH { get; set; } - public bool Rlogin - { - get { return _Rlogin; } - set { _Rlogin = value; } - } + public bool Telnet { get; set; } - public bool HTTP - { - get { return _HTTP; } - set { _HTTP = value; } - } + public bool Rlogin { get; set; } - public bool HTTPS - { - get { return _HTTPS; } - set { _HTTPS = value; } - } - #endregion + public bool HTTP { get; set; } + + public bool HTTPS { get; set; } + + #endregion #region Methods public ScanHost(string host) { - _hostIp = host; - _openPorts = new ArrayList(); - _closedPorts = new ArrayList(); + HostIp = host; + OpenPorts = new ArrayList(); + ClosedPorts = new ArrayList(); } public override string ToString() { try { - return "SSH: " + Convert.ToString(_SSH) + " Telnet: " + Convert.ToString(_Telnet) + " HTTP: " + Convert.ToString(_HTTP) + " HTTPS: " + Convert.ToString(_HTTPS) + " Rlogin: " + Convert.ToString(_Rlogin) + " RDP: " + Convert.ToString(_RDP) + " VNC: " + Convert.ToString(_VNC); + return "SSH: " + Convert.ToString(SSH) + " Telnet: " + Convert.ToString(Telnet) + " HTTP: " + Convert.ToString(HTTP) + " HTTPS: " + Convert.ToString(HTTPS) + " Rlogin: " + Convert.ToString(Rlogin) + " RDP: " + Convert.ToString(RDP) + " VNC: " + Convert.ToString(VNC); } catch (Exception) { - Runtime.MessageCollector.AddMessage(Messages.MessageClass.WarningMsg, "ToString failed (Tools.PortScan)", true); + Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, "ToString failed (Tools.PortScan)", true); return ""; } } @@ -190,36 +101,33 @@ namespace mRemoteNG.Tools.PortScan { ListViewItem listViewItem = new ListViewItem(); listViewItem.Tag = this; - if (!string.IsNullOrEmpty(_hostName)) + listViewItem.Text = !string.IsNullOrEmpty(HostName) ? HostName : HostIp; + + /* flipped the UI around a bit + * Show the open/closed port numbers in import mode in case custom ports are scanned. + * Since (currently) the non-import mode doesn't allow custom ports, just show the standard port columns. + */ + if (!import) { - listViewItem.Text = _hostName; - } - else - { - listViewItem.Text = _hostIp; - } - - if (import) - { - listViewItem.SubItems.Add(BoolToYesNo(_SSH)); - listViewItem.SubItems.Add(BoolToYesNo(_Telnet)); - listViewItem.SubItems.Add(BoolToYesNo(_HTTP)); - listViewItem.SubItems.Add(BoolToYesNo(_HTTPS)); - listViewItem.SubItems.Add(BoolToYesNo(_Rlogin)); - listViewItem.SubItems.Add(BoolToYesNo(_RDP)); - listViewItem.SubItems.Add(BoolToYesNo(_VNC)); + listViewItem.SubItems.Add(BoolToYesNo(SSH)); + listViewItem.SubItems.Add(BoolToYesNo(Telnet)); + listViewItem.SubItems.Add(BoolToYesNo(HTTP)); + listViewItem.SubItems.Add(BoolToYesNo(HTTPS)); + listViewItem.SubItems.Add(BoolToYesNo(Rlogin)); + listViewItem.SubItems.Add(BoolToYesNo(RDP)); + listViewItem.SubItems.Add(BoolToYesNo(VNC)); } else { string strOpen = ""; string strClosed = ""; - foreach (int p in _openPorts) + foreach (int p in OpenPorts) { strOpen += p + ", "; } - foreach (int p in _closedPorts) + foreach (int p in ClosedPorts) { strClosed += p + ", "; } @@ -232,32 +140,25 @@ namespace mRemoteNG.Tools.PortScan } catch (Exception ex) { - Runtime.MessageCollector.AddExceptionMessage("Tools.PortScan.ToListViewItem() failed.", ex, Messages.MessageClass.WarningMsg, true); + Runtime.MessageCollector.AddExceptionMessage("Tools.PortScan.ToListViewItem() failed.", ex, MessageClass.WarningMsg, true); return null; } } private string BoolToYesNo(bool value) { - if (value) - { - return Language.strYes; - } - else - { - return Language.strNo; - } + return value ? Language.strYes : Language.strNo; } - - public void SetAllProtocols(bool value) + + public void SetAllProtocols(bool value) { - _VNC = value; - _Telnet = value; - _SSH = value; - _Rlogin = value; - _RDP = value; - _HTTPS = value; - _HTTP = value; + VNC = value; + Telnet = value; + SSH = value; + Rlogin = value; + RDP = value; + HTTPS = value; + HTTP = value; } #endregion } @@ -278,7 +179,7 @@ namespace mRemoteNG.Tools.PortScan IPAddress ipAddressEnd = IpAddressMax(ipAddress1, ipAddress2); _ports.Clear(); - _ports.AddRange(new int[] { ScanHost.SSHPort, ScanHost.TelnetPort, ScanHost.HTTPPort, ScanHost.HTTPSPort, ScanHost.RloginPort, ScanHost.RDPPort, ScanHost.VNCPort }); + _ports.AddRange(new[] { ScanHost.SSHPort, ScanHost.TelnetPort, ScanHost.HTTPPort, ScanHost.HTTPSPort, ScanHost.RloginPort, ScanHost.RDPPort, ScanHost.VNCPort }); _ipAddresses.Clear(); _ipAddresses.AddRange(IpAddressArrayFromRange(ipAddressStart, ipAddressEnd)); @@ -301,7 +202,7 @@ namespace mRemoteNG.Tools.PortScan public void StartScan() { - _scanThread = new Thread(new System.Threading.ThreadStart(ScanAsync)); + _scanThread = new Thread(ScanAsync); _scanThread.SetApartmentState(ApartmentState.STA); _scanThread.IsBackground = true; _scanThread.Start(); @@ -310,13 +211,14 @@ namespace mRemoteNG.Tools.PortScan public void StopScan() { _scanThread.Abort(); - } + } public static bool IsPortOpen(string hostname, string port) { try { System.Net.Sockets.TcpClient tcpClient = new System.Net.Sockets.TcpClient(hostname, Convert.ToInt32(port)); + tcpClient.Close(); return true; } catch (Exception) @@ -325,124 +227,144 @@ namespace mRemoteNG.Tools.PortScan } } #endregion - + #region Private Methods - private void ScanAsync() + + private int hostCount; + private void ScanAsync() { try { - int hostCount = 0; - foreach (IPAddress ipAddress in _ipAddresses) + hostCount = 0; + Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, $"Tools.PortScan: Starting scan of {_ipAddresses.Count} hosts...", true); + foreach (IPAddress ipAddress in _ipAddresses) { - if (BeginHostScanEvent != null) - BeginHostScanEvent(ipAddress.ToString()); - - ScanHost scanHost = new ScanHost(ipAddress.ToString()); - hostCount++; - - if (!IsHostAlive(ipAddress)) - { - scanHost.ClosedPorts.AddRange(_ports); - scanHost.SetAllProtocols(false); - } - else - { - foreach (int port in _ports) - { - bool isPortOpen = false; - try - { - System.Net.Sockets.TcpClient tcpClient = new System.Net.Sockets.TcpClient(ipAddress.ToString(), port); - isPortOpen = true; - scanHost.OpenPorts.Add(port); - } - catch (Exception) - { - isPortOpen = false; - scanHost.ClosedPorts.Add(port); - } - - if (port == ScanHost.SSHPort) - { - scanHost.SSH = isPortOpen; - } - else if (port == ScanHost.TelnetPort) - { - scanHost.Telnet = isPortOpen; - } - else if (port == ScanHost.HTTPPort) - { - scanHost.HTTP = isPortOpen; - } - else if (port == ScanHost.HTTPSPort) - { - scanHost.HTTPS = isPortOpen; - } - else if (port == ScanHost.RloginPort) - { - scanHost.Rlogin = isPortOpen; - } - else if (port == ScanHost.RDPPort) - { - scanHost.RDP = isPortOpen; - } - else if (port == ScanHost.VNCPort) - { - scanHost.VNC = isPortOpen; - } - } - } - - try - { - scanHost.HostName = Dns.GetHostEntry(scanHost.HostIp).HostName; - } - catch (Exception) - { - } - if (string.IsNullOrEmpty(scanHost.HostName)) - { - scanHost.HostName = scanHost.HostIp; - } - - _scannedHosts.Add(scanHost); - if (HostScannedEvent != null) - HostScannedEvent(scanHost, hostCount, _ipAddresses.Count); - } - - if (ScanCompleteEvent != null) - ScanCompleteEvent(_scannedHosts); - } + BeginHostScanEvent?.Invoke(ipAddress.ToString()); + + Ping pingSender = new Ping(); + + try + { + pingSender.PingCompleted += PingSender_PingCompleted; + pingSender.SendAsync(ipAddress, ipAddress); + } + catch (Exception ex) + { + Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, $"Tools.PortScan: Ping failed for {ipAddress} {Environment.NewLine} {ex.Message}", true); + } + } + } catch (Exception ex) { - Runtime.MessageCollector.AddMessage(Messages.MessageClass.WarningMsg, "StartScanBG failed (Tools.PortScan)" + Environment.NewLine + ex.Message, true); + Runtime.MessageCollector.AddMessage(MessageClass.WarningMsg, $"StartScanBG failed (Tools.PortScan) {Environment.NewLine} {ex.Message}", true); } } - - private static bool IsHostAlive(IPAddress ipAddress) - { - Ping pingSender = new Ping(); - PingReply pingReply; - - try - { - pingReply = pingSender.Send(ipAddress); - - if (pingReply.Status == IPStatus.Success) - { - return true; - } - else - { - return false; - } - } - catch (Exception) - { - return false; - } - } - + + /* Some examples found here: + * http://stackoverflow.com/questions/2114266/convert-ping-application-to-multithreaded-version-to-increase-speed-c-sharp + */ + private void PingSender_PingCompleted(object sender, PingCompletedEventArgs e) + { + // UserState is the IP Address + var ip = e.UserState.ToString(); + ScanHost scanHost = new ScanHost(ip); + hostCount++; + + Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, $"Tools.PortScan: Scanning {hostCount} of {_ipAddresses.Count} hosts: {scanHost.HostIp}", true); + + if (e.Error != null) + { + Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, $"Ping failed to {e.UserState} {Environment.NewLine} {e.Error.Message}", true); + scanHost.ClosedPorts.AddRange(_ports); + scanHost.SetAllProtocols(false); + } + else if (e.Reply.Status == IPStatus.Success) + { + /* ping was successful, try to resolve the hostname */ + try + { + scanHost.HostName = Dns.GetHostEntry(scanHost.HostIp).HostName; + } + catch (Exception dnsex) + { + Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, + $"Tools.PortScan: Could not resolve {scanHost.HostIp} {Environment.NewLine} {dnsex.Message}", + true); + } + + if (string.IsNullOrEmpty(scanHost.HostName)) + { + scanHost.HostName = scanHost.HostIp; + } + + foreach (int port in _ports) + { + bool isPortOpen = false; + try + { + System.Net.Sockets.TcpClient tcpClient = new System.Net.Sockets.TcpClient(ip, port); + isPortOpen = true; + scanHost.OpenPorts.Add(port); + tcpClient.Close(); + } + catch (Exception) + { + isPortOpen = false; + scanHost.ClosedPorts.Add(port); + } + + if (port == ScanHost.SSHPort) + { + scanHost.SSH = isPortOpen; + } + else if (port == ScanHost.TelnetPort) + { + scanHost.Telnet = isPortOpen; + } + else if (port == ScanHost.HTTPPort) + { + scanHost.HTTP = isPortOpen; + } + else if (port == ScanHost.HTTPSPort) + { + scanHost.HTTPS = isPortOpen; + } + else if (port == ScanHost.RloginPort) + { + scanHost.Rlogin = isPortOpen; + } + else if (port == ScanHost.RDPPort) + { + scanHost.RDP = isPortOpen; + } + else if (port == ScanHost.VNCPort) + { + scanHost.VNC = isPortOpen; + } + } + } + else if(e.Reply.Status != IPStatus.Success) + { + Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, $"Ping did not complete to {e.UserState} : {e.Reply.Status}", true); + scanHost.ClosedPorts.AddRange(_ports); + scanHost.SetAllProtocols(false); + } + + // cleanup + var p = (Ping)sender; + p.PingCompleted -= PingSender_PingCompleted; + p.Dispose(); + + var h = string.IsNullOrEmpty(scanHost.HostName) ? "HostNameNotFound" : scanHost.HostName; + Runtime.MessageCollector.AddMessage(MessageClass.InformationMsg, $"Tools.PortScan: Scan of {scanHost.HostIp} ({h}) complete.", true); + + _scannedHosts.Add(scanHost); + HostScannedEvent?.Invoke(scanHost, hostCount, _ipAddresses.Count); + + if (_scannedHosts.Count == _ipAddresses.Count) + ScanCompleteEvent?.Invoke(_scannedHosts); + } + private static IPAddress[] IpAddressArrayFromRange(IPAddress ipAddress1, IPAddress ipAddress2) { IPAddress startIpAddress = IpAddressMin(ipAddress1, ipAddress2); @@ -494,7 +416,7 @@ namespace mRemoteNG.Tools.PortScan private static int IpAddressToInt32(IPAddress ipAddress) { - if (!(ipAddress.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)) + if (ipAddress.AddressFamily != System.Net.Sockets.AddressFamily.InterNetwork) { throw (new ArgumentException("ipAddress")); } @@ -530,11 +452,11 @@ namespace mRemoteNG.Tools.PortScan { add { - BeginHostScanEvent = (BeginHostScanEventHandler) System.Delegate.Combine(BeginHostScanEvent, value); + BeginHostScanEvent = (BeginHostScanEventHandler) Delegate.Combine(BeginHostScanEvent, value); } remove { - BeginHostScanEvent = (BeginHostScanEventHandler) System.Delegate.Remove(BeginHostScanEvent, value); + BeginHostScanEvent = (BeginHostScanEventHandler) Delegate.Remove(BeginHostScanEvent, value); } } @@ -545,11 +467,11 @@ namespace mRemoteNG.Tools.PortScan { add { - HostScannedEvent = (HostScannedEventHandler) System.Delegate.Combine(HostScannedEvent, value); + HostScannedEvent = (HostScannedEventHandler) Delegate.Combine(HostScannedEvent, value); } remove { - HostScannedEvent = (HostScannedEventHandler) System.Delegate.Remove(HostScannedEvent, value); + HostScannedEvent = (HostScannedEventHandler) Delegate.Remove(HostScannedEvent, value); } } @@ -560,11 +482,11 @@ namespace mRemoteNG.Tools.PortScan { add { - ScanCompleteEvent = (ScanCompleteEventHandler) System.Delegate.Combine(ScanCompleteEvent, value); + ScanCompleteEvent = (ScanCompleteEventHandler) Delegate.Combine(ScanCompleteEvent, value); } remove { - ScanCompleteEvent = (ScanCompleteEventHandler) System.Delegate.Remove(ScanCompleteEvent, value); + ScanCompleteEvent = (ScanCompleteEventHandler) Delegate.Remove(ScanCompleteEvent, value); } } #endregion diff --git a/mRemoteV1/Tools/Tools.WindowPlacement.cs b/mRemoteV1/Tools/Tools.WindowPlacement.cs index 533e6ccd..60adac28 100644 --- a/mRemoteV1/Tools/Tools.WindowPlacement.cs +++ b/mRemoteV1/Tools/Tools.WindowPlacement.cs @@ -1,78 +1,21 @@ using System; using System.Windows.Forms; using System.Runtime.InteropServices; - +using mRemoteNG.App; namespace mRemoteNG.Tools { public class WindowPlacement { - #region Windows API - #region Functions - [DllImport("user32", ExactSpelling=true, CharSet=CharSet.Ansi, SetLastError=true)] - private static extern bool GetWindowPlacement(System.IntPtr hWnd, ref WINDOWPLACEMENT lpwndpl); - [DllImport("user32", ExactSpelling=true, CharSet=CharSet.Ansi, SetLastError=true)] - private static extern bool SetWindowPlacement(System.IntPtr hWnd, ref WINDOWPLACEMENT lpwndpl); - #endregion - - #region Structures - private struct WINDOWPLACEMENT - { - public UInt32 length; - public UInt32 flags; - public UInt32 showCmd; - public POINT ptMinPosition; - public POINT ptMaxPosition; - public RECT rcNormalPosition; - } - - private struct POINT - { - public long x; - public long y; - } - - private struct RECT - { - public long left; - public long top; - public long right; - public long bottom; - } - #endregion - - #region Constants - // WINDOWPLACEMENT.flags values - private const UInt32 WPF_SETMINPOSITION = 0x1; - private const UInt32 WPF_RESTORETOMAXIMIZED = 0x2; - private const UInt32 WPF_ASYNCWINDOWPLACEMENT = 0x4; - - // WINDOWPLACEMENT.showCmd values - private const UInt32 SW_HIDE = 0; - private const UInt32 SW_SHOWNORMAL = 1; - private const UInt32 SW_SHOWMINIMIZED = 2; - private const UInt32 SW_SHOWMAXIMIZED = 3; - private const UInt32 SW_MAXIMIZE = 3; - private const UInt32 SW_SHOWNOACTIVATE = 4; - private const UInt32 SW_SHOW = 5; - private const UInt32 SW_MINIMIZE = 6; - private const UInt32 SW_SHOWMINNOACTIVE = 7; - private const UInt32 SW_SHOWNA = 8; - private const UInt32 SW_RESTORE = 9; - #endregion - #endregion - - #region Private Variables private Form _form; - #endregion - - #region Constructors/Destructors + + public WindowPlacement(Form form) { _form = form; } - #endregion - + + #region Public Properties public Form Form { @@ -90,19 +33,19 @@ namespace mRemoteNG.Tools { get { - WINDOWPLACEMENT windowPlacement = GetWindowPlacement(); - return Convert.ToBoolean(windowPlacement.flags & WPF_RESTORETOMAXIMIZED); + NativeMethods.WINDOWPLACEMENT windowPlacement = GetWindowPlacement(); + return Convert.ToBoolean(windowPlacement.flags & NativeMethods.WPF_RESTORETOMAXIMIZED); } set { - WINDOWPLACEMENT windowPlacement = GetWindowPlacement(); + NativeMethods.WINDOWPLACEMENT windowPlacement = GetWindowPlacement(); if (value) { - windowPlacement.flags = windowPlacement.flags | WPF_RESTORETOMAXIMIZED; + windowPlacement.flags = windowPlacement.flags | NativeMethods.WPF_RESTORETOMAXIMIZED; } else { - windowPlacement.flags = windowPlacement.flags & ~WPF_RESTORETOMAXIMIZED; + windowPlacement.flags = windowPlacement.flags & ~NativeMethods.WPF_RESTORETOMAXIMIZED; } SetWindowPlacement(windowPlacement); } @@ -110,17 +53,17 @@ namespace mRemoteNG.Tools #endregion #region Private Functions - private WINDOWPLACEMENT GetWindowPlacement() + private NativeMethods.WINDOWPLACEMENT GetWindowPlacement() { if (_form == null) { - throw (new System.NullReferenceException("WindowPlacement.Form is not set.")); + throw (new NullReferenceException("WindowPlacement.Form is not set.")); } - WINDOWPLACEMENT windowPlacement = new WINDOWPLACEMENT(); + NativeMethods.WINDOWPLACEMENT windowPlacement = new NativeMethods.WINDOWPLACEMENT(); windowPlacement.length = (uint)Marshal.SizeOf(windowPlacement); try { - GetWindowPlacement(_form.Handle, ref windowPlacement); + NativeMethods.GetWindowPlacement(_form.Handle, ref windowPlacement); return windowPlacement; } catch (Exception) @@ -129,16 +72,16 @@ namespace mRemoteNG.Tools } } - private bool SetWindowPlacement(WINDOWPLACEMENT windowPlacement) + private bool SetWindowPlacement(NativeMethods.WINDOWPLACEMENT windowPlacement) { if (_form == null) { - throw (new System.NullReferenceException("WindowPlacement.Form is not set.")); + throw (new NullReferenceException("WindowPlacement.Form is not set.")); } windowPlacement.length = (uint)Marshal.SizeOf(windowPlacement); try { - return SetWindowPlacement(_form.Handle, ref windowPlacement); + return NativeMethods.SetWindowPlacement(_form.Handle, ref windowPlacement); } catch (Exception) { diff --git a/mRemoteV1/Tree/ConnectionTreeNode.cs b/mRemoteV1/Tree/ConnectionTreeNode.cs index 08452f7e..6bbc66b2 100644 --- a/mRemoteV1/Tree/ConnectionTreeNode.cs +++ b/mRemoteV1/Tree/ConnectionTreeNode.cs @@ -1,7 +1,6 @@ using mRemoteNG.App; using mRemoteNG.Connection; using mRemoteNG.Container; -using mRemoteNG.Images; using System; using System.Windows.Forms; using mRemoteNG.Messages; diff --git a/mRemoteV1/Images/TreeImageType.cs b/mRemoteV1/Tree/TreeImageType.cs similarity index 82% rename from mRemoteV1/Images/TreeImageType.cs rename to mRemoteV1/Tree/TreeImageType.cs index 956e9574..19beba36 100644 --- a/mRemoteV1/Images/TreeImageType.cs +++ b/mRemoteV1/Tree/TreeImageType.cs @@ -1,4 +1,4 @@ -namespace mRemoteNG.Images +namespace mRemoteNG.Tree { public enum TreeImageType { diff --git a/mRemoteV1/UI/Controls/FilteredPropertyGrid/FilteredPropertyGrid.cs b/mRemoteV1/UI/Controls/FilteredPropertyGrid/FilteredPropertyGrid.cs new file mode 100644 index 00000000..7531970e --- /dev/null +++ b/mRemoteV1/UI/Controls/FilteredPropertyGrid/FilteredPropertyGrid.cs @@ -0,0 +1,173 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Windows.Forms; +using mRemoteNG.App; + +namespace mRemoteNG.UI.Controls.FilteredPropertyGrid +{ + /// + /// This class overrides the standard PropertyGrid provided by Microsoft. + /// It also allows to hide (or filter) the properties of the SelectedObject displayed by the PropertyGrid. + /// + public partial class FilteredPropertyGrid : PropertyGrid + { + /// Contain a reference to the collection of properties to show in the parent PropertyGrid. + /// By default, m_PropertyDescriptors contain all the properties of the object. + List m_PropertyDescriptors = new List(); + /// Contain a reference to the array of properties to display in the PropertyGrid. + private AttributeCollection m_HiddenAttributes = null, m_BrowsableAttributes = null; + /// Contain references to the arrays of properties or categories to hide. + private string[] m_BrowsableProperties = null, m_HiddenProperties = null; + /// Contain a reference to the wrapper that contains the object to be displayed into the PropertyGrid. + private ObjectWrapper m_Wrapper = null; + + /// Public constructor. + public FilteredPropertyGrid() { + InitializeComponent(); + base.SelectedObject = m_Wrapper; + } + + public new AttributeCollection BrowsableAttributes { + get { return m_BrowsableAttributes; } + set { + if(m_BrowsableAttributes != value) { + m_HiddenAttributes = null; + m_BrowsableAttributes = value; + RefreshProperties(); + } + } + } + + /// Get or set the categories to hide. + public AttributeCollection HiddenAttributes { + get { return m_HiddenAttributes; } + set { + if(value != m_HiddenAttributes) { + m_HiddenAttributes = value; + m_BrowsableAttributes = null; + RefreshProperties(); + } + } + } + /// Get or set the properties to show. + /// if one or several properties don't exist. + public string[] BrowsableProperties { + get { return m_BrowsableProperties; } + set { + if(value != m_BrowsableProperties) { + m_BrowsableProperties = value; + //m_HiddenProperties = null; + RefreshProperties(); + } + } + } + + /// Get or set the properties to hide. + public string[] HiddenProperties { + get { return m_HiddenProperties; } + set { + if(value != m_HiddenProperties) { + //m_BrowsableProperties = null; + m_HiddenProperties = value; + RefreshProperties(); + } + } + } + + /// Overwrite the PropertyGrid.SelectedObject property. + /// The object passed to the base PropertyGrid is the wrapper. + public new object SelectedObject { + get { return m_Wrapper != null ? ((ObjectWrapper)base.SelectedObject).SelectedObject : null; } + set { + // Set the new object to the wrapper and create one if necessary. + if(m_Wrapper == null) { + m_Wrapper = new ObjectWrapper(value); + RefreshProperties(); + } + else if(m_Wrapper.SelectedObject != value) { + bool needrefresh = value.GetType() != m_Wrapper.SelectedObject.GetType(); + m_Wrapper.SelectedObject = value; + if(needrefresh) RefreshProperties(); + } + // Set the list of properties to the wrapper. + m_Wrapper.PropertyDescriptors = m_PropertyDescriptors; + // Link the wrapper to the parent PropertyGrid. + base.SelectedObject = m_Wrapper; + } + } + + /// Called when the browsable properties have changed. + private void OnBrowsablePropertiesChanged() { + if(m_Wrapper == null) return; + } + + /// Build the list of the properties to be displayed in the PropertyGrid, following the filters defined the Browsable and Hidden properties. + private void RefreshProperties() { + if(m_Wrapper == null) return; + // Clear the list of properties to be displayed. + m_PropertyDescriptors.Clear(); + // Check whether the list is filtered + if(m_BrowsableAttributes != null && m_BrowsableAttributes.Count > 0) { + // Add to the list the attributes that need to be displayed. + foreach(Attribute attribute in m_BrowsableAttributes) ShowAttribute(attribute); + } else { + // Fill the collection with all the properties. + PropertyDescriptorCollection originalpropertydescriptors = TypeDescriptor.GetProperties(m_Wrapper.SelectedObject); + foreach(PropertyDescriptor propertydescriptor in originalpropertydescriptors) m_PropertyDescriptors.Add(propertydescriptor); + // Remove from the list the attributes that mustn't be displayed. + if(m_HiddenAttributes != null) foreach(Attribute attribute in m_HiddenAttributes) HideAttribute(attribute); + } + // Get all the properties of the SelectedObject + PropertyDescriptorCollection allproperties = TypeDescriptor.GetProperties(m_Wrapper.SelectedObject); + // Hide if necessary, some properties + if(m_HiddenProperties != null && m_HiddenProperties.Length > 0) { + // Remove from the list the properties that mustn't be displayed. + foreach(string propertyname in m_HiddenProperties) { + try { + PropertyDescriptor property = allproperties[propertyname]; + // Remove from the list the property + HideProperty(property); + } catch(Exception ex) { + Runtime.MessageCollector.AddExceptionMessage("FilteredPropertyGrid: Could not hide Property.", ex); + } + } + } + // Display if necessary, some properties + if(m_BrowsableProperties != null && m_BrowsableProperties.Length > 0) { + foreach(string propertyname in m_BrowsableProperties) { + try { + ShowProperty(allproperties[propertyname]); + } catch(Exception knfe) { + Runtime.MessageCollector.AddExceptionMessage("FilteredPropertyGrid: Property not found", knfe); + } + } + } + } + /// Allows to hide a set of properties to the parent PropertyGrid. + /// A set of attributes that filter the original collection of properties. + /// For better performance, include the BrowsableAttribute with true value. + private void HideAttribute(Attribute attribute) { + PropertyDescriptorCollection filteredoriginalpropertydescriptors = TypeDescriptor.GetProperties(m_Wrapper.SelectedObject,new Attribute[] { attribute }); + if(filteredoriginalpropertydescriptors == null || filteredoriginalpropertydescriptors.Count == 0) throw new ArgumentException("Attribute not found",attribute.ToString()); + foreach(PropertyDescriptor propertydescriptor in filteredoriginalpropertydescriptors) HideProperty(propertydescriptor); + } + /// Add all the properties that match an attribute to the list of properties to be displayed in the PropertyGrid. + /// The attribute to be added. + private void ShowAttribute(Attribute attribute) { + PropertyDescriptorCollection filteredoriginalpropertydescriptors = TypeDescriptor.GetProperties(m_Wrapper.SelectedObject,new Attribute[] { attribute }); + if(filteredoriginalpropertydescriptors == null || filteredoriginalpropertydescriptors.Count == 0) throw new ArgumentException("Attribute not found",attribute.ToString()); + foreach(PropertyDescriptor propertydescriptor in filteredoriginalpropertydescriptors) ShowProperty(propertydescriptor); + } + /// Add a property to the list of properties to be displayed in the PropertyGrid. + /// The property to be added. + private void ShowProperty(PropertyDescriptor property) { + if(!m_PropertyDescriptors.Contains(property)) m_PropertyDescriptors.Add(property); + } + /// Allows to hide a property to the parent PropertyGrid. + /// The name of the property to be hidden. + private void HideProperty(PropertyDescriptor property) { + if(m_PropertyDescriptors.Contains(property)) m_PropertyDescriptors.Remove(property); + } + } +} \ No newline at end of file diff --git a/mRemoteV1/UI/Controls/FilteredPropertyGrid/FilteredPropertyGrid.designer.cs b/mRemoteV1/UI/Controls/FilteredPropertyGrid/FilteredPropertyGrid.designer.cs new file mode 100644 index 00000000..586b8813 --- /dev/null +++ b/mRemoteV1/UI/Controls/FilteredPropertyGrid/FilteredPropertyGrid.designer.cs @@ -0,0 +1,34 @@ +namespace mRemoteNG.UI.Controls.FilteredPropertyGrid +{ + partial class FilteredPropertyGrid + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) { + if(disposing && (components != null)) { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() { + components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + } + + #endregion + } +} diff --git a/mRemoteV1/UI/Controls/FilteredPropertyGrid/ObjectWrapper.cs b/mRemoteV1/UI/Controls/FilteredPropertyGrid/ObjectWrapper.cs new file mode 100644 index 00000000..3f2f1d62 --- /dev/null +++ b/mRemoteV1/UI/Controls/FilteredPropertyGrid/ObjectWrapper.cs @@ -0,0 +1,99 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; + +namespace mRemoteNG.UI.Controls.FilteredPropertyGrid +{ + /// This class is a wrapper. It contains the object the propertyGrid has to display. + internal class ObjectWrapper : ICustomTypeDescriptor + { + /// Contain a reference to the selected objet that will linked to the parent PropertyGrid. + private object m_SelectedObject = null; + /// Contain a reference to the collection of properties to show in the parent PropertyGrid. + /// By default, m_PropertyDescriptors contain all the properties of the object. + List m_PropertyDescriptors = new List(); + + /// Simple constructor. + /// A reference to the selected object that will linked to the parent PropertyGrid. + internal ObjectWrapper(object obj) { + m_SelectedObject = obj; + } + + /// Get or set a reference to the selected objet that will linked to the parent PropertyGrid. + public object SelectedObject { + get { return m_SelectedObject; } + set { if(m_SelectedObject != value) m_SelectedObject = value; } + } + + /// Get or set a reference to the collection of properties to show in the parent PropertyGrid. + public List PropertyDescriptors { + get { return m_PropertyDescriptors; } + set { m_PropertyDescriptors = value; } + } + + #region ICustomTypeDescriptor Members + public PropertyDescriptorCollection GetProperties(Attribute[] attributes) { + return GetProperties(); + } + + public PropertyDescriptorCollection GetProperties() { + return new PropertyDescriptorCollection(m_PropertyDescriptors.ToArray(),true); + } + + /// GetAttributes. + /// AttributeCollection + public AttributeCollection GetAttributes() { + return TypeDescriptor.GetAttributes(m_SelectedObject,true); + } + /// Get Class Name. + /// String + public String GetClassName() { + return TypeDescriptor.GetClassName(m_SelectedObject,true); + } + /// GetComponentName. + /// String + public String GetComponentName() { + return TypeDescriptor.GetComponentName(m_SelectedObject,true); + } + + /// GetConverter. + /// TypeConverter + public TypeConverter GetConverter() { + return TypeDescriptor.GetConverter(m_SelectedObject,true); + } + + /// GetDefaultEvent. + /// EventDescriptor + public EventDescriptor GetDefaultEvent() { + return TypeDescriptor.GetDefaultEvent(m_SelectedObject,true); + } + + /// GetDefaultProperty. + /// PropertyDescriptor + public PropertyDescriptor GetDefaultProperty() { + return TypeDescriptor.GetDefaultProperty(m_SelectedObject,true); + } + + /// GetEditor. + /// editorBaseType + /// object + public object GetEditor(Type editorBaseType) { + return TypeDescriptor.GetEditor(this,editorBaseType,true); + } + + public EventDescriptorCollection GetEvents(Attribute[] attributes) { + return TypeDescriptor.GetEvents(m_SelectedObject,attributes,true); + } + + public EventDescriptorCollection GetEvents() { + return TypeDescriptor.GetEvents(m_SelectedObject,true); + } + + public object GetPropertyOwner(PropertyDescriptor pd) { + return m_SelectedObject; + } + + #endregion + + } +} diff --git a/mRemoteV1/UI/Controls/QuickConnectComboBox.cs b/mRemoteV1/UI/Controls/QuickConnectComboBox.cs index f8e54654..6c44c674 100644 --- a/mRemoteV1/UI/Controls/QuickConnectComboBox.cs +++ b/mRemoteV1/UI/Controls/QuickConnectComboBox.cs @@ -1,17 +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 mRemoteNG.Connection; using mRemoteNG.Connection.Protocol; using mRemoteNG.App; -using mRemoteNG.My; namespace mRemoteNG.Controls diff --git a/mRemoteV1/UI/Controls/TextBox.cs b/mRemoteV1/UI/Controls/TextBox.cs index 0de3b7b9..04a0b9a5 100644 --- a/mRemoteV1/UI/Controls/TextBox.cs +++ b/mRemoteV1/UI/Controls/TextBox.cs @@ -1,12 +1,4 @@ -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.ComponentModel; diff --git a/mRemoteV1/UI/Forms/Input/input.cs b/mRemoteV1/UI/Forms/Input/input.cs new file mode 100644 index 00000000..0cb65ebd --- /dev/null +++ b/mRemoteV1/UI/Forms/Input/input.cs @@ -0,0 +1,59 @@ +/* + * http://www.csharp-examples.net/inputbox/ + * + */ +using System; +using System.Windows.Forms; +using System.Drawing; + +namespace mRemoteNG.UI.Forms.Input +{ + internal class input + { + public static DialogResult InputBox(string title, string promptText, ref string value) + { + var form = new Form(); + var label = new Label(); + var textBox = new TextBox(); + var buttonOk = new Button(); + var buttonCancel = new Button(); + + label.Text = promptText; + label.AutoSize = true; + label.SetBounds(9, 20, 372, 13); + + textBox.Text = value; + textBox.BorderStyle = BorderStyle.Fixed3D; + textBox.Anchor = textBox.Anchor | AnchorStyles.Right; + textBox.SetBounds(12, 36, 372, 20); + + buttonOk.Text = "OK"; + buttonOk.DialogResult = DialogResult.OK; + buttonOk.FlatStyle = FlatStyle.Flat; + buttonOk.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonOk.SetBounds(228, 72, 75, 23); + + buttonCancel.Text = "Cancel"; + buttonCancel.DialogResult = DialogResult.Cancel; + buttonCancel.FlatStyle = FlatStyle.Flat; + buttonCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; + buttonCancel.SetBounds(309, 72, 75, 23); + + form.Text = title; + form.ClientSize = new Size(396, 107); + form.Controls.AddRange(new Control[] {label, textBox, buttonOk, buttonCancel}); + form.ClientSize = new Size(Math.Max(300, label.Right + 10), form.ClientSize.Height); + form.FormBorderStyle = FormBorderStyle.FixedDialog; + form.StartPosition = FormStartPosition.CenterScreen; + form.MinimizeBox = false; + form.MaximizeBox = false; + form.AcceptButton = buttonOk; + form.CancelButton = buttonCancel; + + var dialogResult = form.ShowDialog(); + value = textBox.Text; + return dialogResult; + } + } +} + diff --git a/mRemoteV1/UI/Forms/OptionsPages/AdvancedPage.Designer.cs b/mRemoteV1/UI/Forms/OptionsPages/AdvancedPage.Designer.cs index b8163b40..6402063c 100644 --- a/mRemoteV1/UI/Forms/OptionsPages/AdvancedPage.Designer.cs +++ b/mRemoteV1/UI/Forms/OptionsPages/AdvancedPage.Designer.cs @@ -35,15 +35,12 @@ namespace mRemoteNG.UI.Forms.OptionsPages System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AdvancedPage)); this.chkWriteLogFile = new System.Windows.Forms.CheckBox(); this.chkAutomaticallyGetSessionInfo = new System.Windows.Forms.CheckBox(); - this.lblXulRunnerPath = new System.Windows.Forms.Label(); this.lblMaximumPuttyWaitTime = new System.Windows.Forms.Label(); this.chkEncryptCompleteFile = new System.Windows.Forms.CheckBox(); this.chkAutomaticReconnect = new System.Windows.Forms.CheckBox(); - this.btnBrowseXulRunnerPath = new System.Windows.Forms.Button(); this.numPuttyWaitTime = new System.Windows.Forms.NumericUpDown(); this.chkUseCustomPuttyPath = new System.Windows.Forms.CheckBox(); this.lblConfigurePuttySessions = new System.Windows.Forms.Label(); - this.txtXULrunnerPath = new System.Windows.Forms.TextBox(); this.numUVNCSCPort = new System.Windows.Forms.NumericUpDown(); this.txtCustomPuttyPath = new System.Windows.Forms.TextBox(); this.btnLaunchPutty = new System.Windows.Forms.Button(); @@ -74,15 +71,6 @@ namespace mRemoteNG.UI.Forms.OptionsPages this.chkAutomaticallyGetSessionInfo.Text = "Automatically get session information"; this.chkAutomaticallyGetSessionInfo.UseVisualStyleBackColor = true; // - // lblXulRunnerPath - // - this.lblXulRunnerPath.AutoSize = true; - this.lblXulRunnerPath.Location = new System.Drawing.Point(3, 240); - this.lblXulRunnerPath.Name = "lblXulRunnerPath"; - this.lblXulRunnerPath.Size = new System.Drawing.Size(90, 13); - this.lblXulRunnerPath.TabIndex = 29; - this.lblXulRunnerPath.Text = "XULRunner path:"; - // // lblMaximumPuttyWaitTime // this.lblMaximumPuttyWaitTime.Location = new System.Drawing.Point(3, 195); @@ -112,16 +100,6 @@ namespace mRemoteNG.UI.Forms.OptionsPages this.chkAutomaticReconnect.Text = "Automatically try to reconnect when disconnected from server (RDP && ICA only)"; this.chkAutomaticReconnect.UseVisualStyleBackColor = true; // - // btnBrowseXulRunnerPath - // - this.btnBrowseXulRunnerPath.Location = new System.Drawing.Point(373, 262); - this.btnBrowseXulRunnerPath.Name = "btnBrowseXulRunnerPath"; - this.btnBrowseXulRunnerPath.Size = new System.Drawing.Size(75, 23); - this.btnBrowseXulRunnerPath.TabIndex = 31; - this.btnBrowseXulRunnerPath.Text = "Browse..."; - this.btnBrowseXulRunnerPath.UseVisualStyleBackColor = true; - this.btnBrowseXulRunnerPath.Click += new System.EventHandler(this.btnBrowseXulRunnerPath_Click); - // // numPuttyWaitTime // this.numPuttyWaitTime.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; @@ -160,14 +138,6 @@ namespace mRemoteNG.UI.Forms.OptionsPages this.lblConfigurePuttySessions.Text = "To configure PuTTY sessions click this button:"; this.lblConfigurePuttySessions.TextAlign = System.Drawing.ContentAlignment.TopRight; // - // txtXULrunnerPath - // - this.txtXULrunnerPath.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtXULrunnerPath.Location = new System.Drawing.Point(21, 264); - this.txtXULrunnerPath.Name = "txtXULrunnerPath"; - this.txtXULrunnerPath.Size = new System.Drawing.Size(346, 20); - this.txtXULrunnerPath.TabIndex = 30; - // // numUVNCSCPort // this.numUVNCSCPort.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; @@ -199,7 +169,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages // // btnLaunchPutty // - this.btnLaunchPutty.Image = Resources.PuttyConfig; + this.btnLaunchPutty.Image = global::mRemoteNG.Resources.PuttyConfig; this.btnLaunchPutty.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.btnLaunchPutty.Location = new System.Drawing.Point(373, 159); this.btnLaunchPutty.Name = "btnLaunchPutty"; @@ -246,15 +216,12 @@ namespace mRemoteNG.UI.Forms.OptionsPages this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.chkWriteLogFile); this.Controls.Add(this.chkAutomaticallyGetSessionInfo); - this.Controls.Add(this.lblXulRunnerPath); this.Controls.Add(this.lblMaximumPuttyWaitTime); this.Controls.Add(this.chkEncryptCompleteFile); this.Controls.Add(this.chkAutomaticReconnect); - this.Controls.Add(this.btnBrowseXulRunnerPath); this.Controls.Add(this.numPuttyWaitTime); this.Controls.Add(this.chkUseCustomPuttyPath); this.Controls.Add(this.lblConfigurePuttySessions); - this.Controls.Add(this.txtXULrunnerPath); this.Controls.Add(this.numUVNCSCPort); this.Controls.Add(this.txtCustomPuttyPath); this.Controls.Add(this.btnLaunchPutty); @@ -272,15 +239,12 @@ namespace mRemoteNG.UI.Forms.OptionsPages } internal System.Windows.Forms.CheckBox chkWriteLogFile; internal System.Windows.Forms.CheckBox chkAutomaticallyGetSessionInfo; - internal System.Windows.Forms.Label lblXulRunnerPath; internal System.Windows.Forms.Label lblMaximumPuttyWaitTime; internal System.Windows.Forms.CheckBox chkEncryptCompleteFile; internal System.Windows.Forms.CheckBox chkAutomaticReconnect; - internal System.Windows.Forms.Button btnBrowseXulRunnerPath; internal System.Windows.Forms.NumericUpDown numPuttyWaitTime; internal System.Windows.Forms.CheckBox chkUseCustomPuttyPath; internal System.Windows.Forms.Label lblConfigurePuttySessions; - internal System.Windows.Forms.TextBox txtXULrunnerPath; internal System.Windows.Forms.NumericUpDown numUVNCSCPort; internal System.Windows.Forms.TextBox txtCustomPuttyPath; internal System.Windows.Forms.Button btnLaunchPutty; diff --git a/mRemoteV1/UI/Forms/OptionsPages/AdvancedPage.cs b/mRemoteV1/UI/Forms/OptionsPages/AdvancedPage.cs index 7ac0ef69..00d1ed0d 100644 --- a/mRemoteV1/UI/Forms/OptionsPages/AdvancedPage.cs +++ b/mRemoteV1/UI/Forms/OptionsPages/AdvancedPage.cs @@ -38,8 +38,6 @@ namespace mRemoteNG.UI.Forms.OptionsPages chkAutomaticallyGetSessionInfo.Text = Language.strAutomaticallyGetSessionInfo; chkWriteLogFile.Text = Language.strWriteLogFile; lblUVNCSCPort.Text = Language.strUltraVNCSCListeningPort; - lblXulRunnerPath.Text = Language.strXULrunnerPath; - btnBrowseXulRunnerPath.Text = Language.strButtonBrowse; chkEncryptCompleteFile.Text = Language.strEncryptCompleteConnectionFile; } @@ -59,8 +57,6 @@ namespace mRemoteNG.UI.Forms.OptionsPages SetPuttyLaunchButtonEnabled(); numUVNCSCPort.Value = Settings.Default.UVNCSCPort; - - txtXULrunnerPath.Text = Settings.Default.XULRunnerPath; } public override void SaveSettings() @@ -89,7 +85,6 @@ namespace mRemoteNG.UI.Forms.OptionsPages Settings.Default.MaxPuttyWaitTime = (int) numPuttyWaitTime.Value; Settings.Default.UVNCSCPort = (int) numUVNCSCPort.Value; - Settings.Default.XULRunnerPath = txtXULrunnerPath.Text; Settings.Default.Save(); } @@ -148,18 +143,6 @@ namespace mRemoteNG.UI.Forms.OptionsPages } } - public void btnBrowseXulRunnerPath_Click(object sender, EventArgs e) - { - var oDlg = new FolderBrowserDialog {ShowNewFolderButton = false}; - - if (oDlg.ShowDialog() == DialogResult.OK) - { - txtXULrunnerPath.Text = oDlg.SelectedPath; - } - - oDlg.Dispose(); - } - #endregion private void SetPuttyLaunchButtonEnabled() diff --git a/mRemoteV1/UI/Forms/OptionsPages/ConnectionsPage.Designer.cs b/mRemoteV1/UI/Forms/OptionsPages/ConnectionsPage.Designer.cs index b98a022e..44322b67 100644 --- a/mRemoteV1/UI/Forms/OptionsPages/ConnectionsPage.Designer.cs +++ b/mRemoteV1/UI/Forms/OptionsPages/ConnectionsPage.Designer.cs @@ -238,7 +238,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages this.chkSingleClickOnOpenedConnectionSwitchesToIt.Name = "chkSingleClickOnOpenedConnectionSwitchesToIt"; this.chkSingleClickOnOpenedConnectionSwitchesToIt.Size = new System.Drawing.Size(254, 17); this.chkSingleClickOnOpenedConnectionSwitchesToIt.TabIndex = 8; - this.chkSingleClickOnOpenedConnectionSwitchesToIt.Text = "Single click on opened connection switches to it"; + this.chkSingleClickOnOpenedConnectionSwitchesToIt.Text = Language.strSingleClickOnOpenConnectionSwitchesToIt; this.chkSingleClickOnOpenedConnectionSwitchesToIt.UseVisualStyleBackColor = true; // //pnlAutoSave diff --git a/mRemoteV1/UI/Forms/PasswordForm.Designer.cs b/mRemoteV1/UI/Forms/PasswordForm.Designer.cs index 55377e7c..e7bf9ab8 100644 --- a/mRemoteV1/UI/Forms/PasswordForm.Designer.cs +++ b/mRemoteV1/UI/Forms/PasswordForm.Designer.cs @@ -34,134 +34,134 @@ namespace mRemoteNG.Forms [System.Diagnostics.DebuggerStepThrough()] private void InitializeComponent() { - this.lblPassword = new System.Windows.Forms.Label(); - this.Load += new System.EventHandler(frmPassword_Load); - this.lblVerify = new System.Windows.Forms.Label(); - this.btnOK = new System.Windows.Forms.Button(); - this.btnOK.Click += new System.EventHandler(this.btnOK_Click); - this.btnCancel = new System.Windows.Forms.Button(); - this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); - this.lblStatus = new System.Windows.Forms.Label(); - this.pbLock = new System.Windows.Forms.PictureBox(); - this.txtVerify = new mRemoteNG.Controls.TextBox(); - this.txtVerify.TextChanged += new System.EventHandler(this.txtPassword_TextChanged); - this.txtPassword = new mRemoteNG.Controls.TextBox(); - this.txtPassword.TextChanged += new System.EventHandler(this.txtPassword_TextChanged); - ((System.ComponentModel.ISupportInitialize) this.pbLock).BeginInit(); - this.SuspendLayout(); - // - //lblPassword - // - this.lblPassword.AutoSize = true; - this.lblPassword.Location = new System.Drawing.Point(82, 12); - this.lblPassword.Name = "lblPassword"; - this.lblPassword.Size = new System.Drawing.Size(56, 13); - this.lblPassword.TabIndex = 1; - this.lblPassword.Text = "Password:"; - // - //lblVerify - // - this.lblVerify.AutoSize = true; - this.lblVerify.Location = new System.Drawing.Point(82, 51); - this.lblVerify.Name = "lblVerify"; - this.lblVerify.Size = new System.Drawing.Size(36, 13); - this.lblVerify.TabIndex = 3; - this.lblVerify.Text = "Verify:"; - // - //btnOK - // - this.btnOK.Anchor = (System.Windows.Forms.AnchorStyles) (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right); - this.btnOK.Location = new System.Drawing.Point(291, 119); - this.btnOK.Name = "btnOK"; - this.btnOK.Size = new System.Drawing.Size(75, 23); - this.btnOK.TabIndex = 7; - this.btnOK.Text = Language.strButtonOK; - this.btnOK.UseVisualStyleBackColor = true; - // - //btnCancel - // - this.btnCancel.Anchor = (System.Windows.Forms.AnchorStyles) (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right); - this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(210, 119); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(75, 23); - this.btnCancel.TabIndex = 6; - this.btnCancel.Text = Language.strButtonCancel; - this.btnCancel.UseVisualStyleBackColor = true; - // - //lblStatus - // - this.lblStatus.Anchor = (System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right); - this.lblStatus.ForeColor = System.Drawing.Color.Red; - this.lblStatus.Location = new System.Drawing.Point(85, 90); - this.lblStatus.Name = "lblStatus"; - this.lblStatus.Size = new System.Drawing.Size(281, 13); - this.lblStatus.TabIndex = 5; - this.lblStatus.Text = "Status"; - this.lblStatus.TextAlign = System.Drawing.ContentAlignment.TopRight; - this.lblStatus.Visible = false; - // - //pbLock - // - this.pbLock.Image = Resources.Lock; - this.pbLock.Location = new System.Drawing.Point(12, 12); - this.pbLock.Name = "pbLock"; - this.pbLock.Size = new System.Drawing.Size(64, 64); - this.pbLock.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; - this.pbLock.TabIndex = 7; - this.pbLock.TabStop = false; - // - //txtVerify - // - this.txtVerify.Anchor = (System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right); - this.txtVerify.Location = new System.Drawing.Point(85, 67); - this.txtVerify.Name = "txtVerify"; - this.txtVerify.SelectAllOnFocus = true; - this.txtVerify.Size = new System.Drawing.Size(281, 20); - this.txtVerify.TabIndex = 4; - this.txtVerify.UseSystemPasswordChar = true; - // - //txtPassword - // - this.txtPassword.Anchor = (System.Windows.Forms.AnchorStyles) ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right); - this.txtPassword.Location = new System.Drawing.Point(85, 28); - this.txtPassword.Name = "txtPassword"; - this.txtPassword.SelectAllOnFocus = true; - this.txtPassword.Size = new System.Drawing.Size(281, 20); - this.txtPassword.TabIndex = 2; - this.txtPassword.UseSystemPasswordChar = true; - // - //frmPassword - // - this.AcceptButton = this.btnOK; - this.AutoScaleDimensions = new System.Drawing.SizeF((float) (6.0F), (float) (13.0F)); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.btnCancel; - this.ClientSize = new System.Drawing.Size(378, 154); - this.ControlBox = false; - this.Controls.Add(this.pbLock); - this.Controls.Add(this.txtVerify); - this.Controls.Add(this.txtPassword); - this.Controls.Add(this.lblStatus); - this.Controls.Add(this.lblVerify); - this.Controls.Add(this.lblPassword); - this.Controls.Add(this.btnCancel); - this.Controls.Add(this.btnOK); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "PasswordForm"; - this.ShowIcon = false; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "Password"; - ((System.ComponentModel.ISupportInitialize) this.pbLock).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - + this.lblPassword = new System.Windows.Forms.Label(); + this.lblVerify = new System.Windows.Forms.Label(); + this.btnOK = new System.Windows.Forms.Button(); + this.btnCancel = new System.Windows.Forms.Button(); + this.lblStatus = new System.Windows.Forms.Label(); + this.pbLock = new System.Windows.Forms.PictureBox(); + this.txtVerify = new mRemoteNG.Controls.TextBox(); + this.txtPassword = new mRemoteNG.Controls.TextBox(); + ((System.ComponentModel.ISupportInitialize)(this.pbLock)).BeginInit(); + this.SuspendLayout(); + // + // lblPassword + // + this.lblPassword.AutoSize = true; + this.lblPassword.Location = new System.Drawing.Point(82, 12); + this.lblPassword.Name = "lblPassword"; + this.lblPassword.Size = new System.Drawing.Size(64, 15); + this.lblPassword.TabIndex = 1; + this.lblPassword.Text = "Password:"; + // + // lblVerify + // + this.lblVerify.AutoSize = true; + this.lblVerify.Location = new System.Drawing.Point(82, 51); + this.lblVerify.Name = "lblVerify"; + this.lblVerify.Size = new System.Drawing.Size(39, 15); + this.lblVerify.TabIndex = 3; + this.lblVerify.Text = "Verify:"; + // + // btnOK + // + this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnOK.Location = new System.Drawing.Point(210, 119); + this.btnOK.Name = "btnOK"; + this.btnOK.Size = new System.Drawing.Size(75, 23); + this.btnOK.TabIndex = 7; + this.btnOK.Text = global::mRemoteNG.Language.strButtonOK; + this.btnOK.UseVisualStyleBackColor = true; + this.btnOK.Click += new System.EventHandler(this.btnOK_Click); + // + // btnCancel + // + this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btnCancel.Location = new System.Drawing.Point(291, 119); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(75, 23); + this.btnCancel.TabIndex = 6; + this.btnCancel.Text = global::mRemoteNG.Language.strButtonCancel; + this.btnCancel.UseVisualStyleBackColor = true; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + // + // lblStatus + // + this.lblStatus.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lblStatus.ForeColor = System.Drawing.Color.Red; + this.lblStatus.Location = new System.Drawing.Point(85, 90); + this.lblStatus.Name = "lblStatus"; + this.lblStatus.Size = new System.Drawing.Size(281, 13); + this.lblStatus.TabIndex = 5; + this.lblStatus.Text = "Status"; + this.lblStatus.TextAlign = System.Drawing.ContentAlignment.TopRight; + this.lblStatus.Visible = false; + // + // pbLock + // + this.pbLock.Image = global::mRemoteNG.Resources.Lock; + this.pbLock.Location = new System.Drawing.Point(12, 12); + this.pbLock.Name = "pbLock"; + this.pbLock.Size = new System.Drawing.Size(64, 64); + this.pbLock.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; + this.pbLock.TabIndex = 7; + this.pbLock.TabStop = false; + // + // txtVerify + // + this.txtVerify.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtVerify.Location = new System.Drawing.Point(85, 67); + this.txtVerify.Name = "txtVerify"; + this.txtVerify.SelectAllOnFocus = true; + this.txtVerify.Size = new System.Drawing.Size(281, 20); + this.txtVerify.TabIndex = 4; + this.txtVerify.UseSystemPasswordChar = true; + this.txtVerify.TextChanged += new System.EventHandler(this.txtPassword_TextChanged); + // + // txtPassword + // + this.txtPassword.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtPassword.Location = new System.Drawing.Point(85, 28); + this.txtPassword.Name = "txtPassword"; + this.txtPassword.SelectAllOnFocus = true; + this.txtPassword.Size = new System.Drawing.Size(281, 20); + this.txtPassword.TabIndex = 2; + this.txtPassword.UseSystemPasswordChar = true; + this.txtPassword.TextChanged += new System.EventHandler(this.txtPassword_TextChanged); + // + // PasswordForm + // + this.AcceptButton = this.btnOK; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.btnCancel; + this.ClientSize = new System.Drawing.Size(378, 154); + this.ControlBox = false; + this.Controls.Add(this.pbLock); + this.Controls.Add(this.txtVerify); + this.Controls.Add(this.txtPassword); + this.Controls.Add(this.lblStatus); + this.Controls.Add(this.lblVerify); + this.Controls.Add(this.lblPassword); + this.Controls.Add(this.btnCancel); + this.Controls.Add(this.btnOK); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "PasswordForm"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Password"; + this.Load += new System.EventHandler(this.frmPassword_Load); + ((System.ComponentModel.ISupportInitialize)(this.pbLock)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + } private Controls.TextBox txtPassword; private Controls.TextBox txtVerify; diff --git a/mRemoteV1/UI/Forms/PasswordForm.resx b/mRemoteV1/UI/Forms/PasswordForm.resx index 19dc0dd8..d58980a3 100644 --- a/mRemoteV1/UI/Forms/PasswordForm.resx +++ b/mRemoteV1/UI/Forms/PasswordForm.resx @@ -112,9 +112,9 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 \ No newline at end of file diff --git a/mRemoteV1/UI/Forms/frmChoosePanel.Designer.cs b/mRemoteV1/UI/Forms/frmChoosePanel.Designer.cs index 783f1e13..bda982d7 100644 --- a/mRemoteV1/UI/Forms/frmChoosePanel.Designer.cs +++ b/mRemoteV1/UI/Forms/frmChoosePanel.Designer.cs @@ -31,91 +31,88 @@ namespace mRemoteNG //Do not modify it using the code editor. [System.Diagnostics.DebuggerStepThrough()]private void InitializeComponent() { - this.cbPanels = new System.Windows.Forms.ComboBox(); - base.Load += new System.EventHandler(frmChoosePanel_Load); - this.btnOK = new System.Windows.Forms.Button(); - this.btnOK.Click += new System.EventHandler(this.btnOK_Click); - this.lblDescription = new System.Windows.Forms.Label(); - this.btnNew = new System.Windows.Forms.Button(); - this.btnNew.Click += new System.EventHandler(this.btnNew_Click); - this.btnCancel = new System.Windows.Forms.Button(); - this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); - this.SuspendLayout(); - // - //cbPanels - // - this.cbPanels.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbPanels.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.cbPanels.FormattingEnabled = true; - this.cbPanels.Location = new System.Drawing.Point(79, 45); - this.cbPanels.Name = "cbPanels"; - this.cbPanels.Size = new System.Drawing.Size(157, 21); - this.cbPanels.TabIndex = 10; - // - //btnOK - // - this.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnOK.Location = new System.Drawing.Point(167, 74); - this.btnOK.Name = "btnOK"; - this.btnOK.Size = new System.Drawing.Size(69, 23); - this.btnOK.TabIndex = 20; - this.btnOK.Text = Language.strButtonOK; - this.btnOK.UseVisualStyleBackColor = true; - // - //lblDescription - // - this.lblDescription.Location = new System.Drawing.Point(7, 8); - this.lblDescription.Name = "lblDescription"; - this.lblDescription.Size = new System.Drawing.Size(229, 29); - this.lblDescription.TabIndex = 0; - this.lblDescription.Text = Language.strLabelSelectPanel; - // - //btnNew - // - this.btnNew.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnNew.Image = Resources.Panel_Add; - this.btnNew.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.btnNew.Location = new System.Drawing.Point(10, 44); - this.btnNew.Name = "btnNew"; - this.btnNew.Size = new System.Drawing.Size(57, 23); - this.btnNew.TabIndex = 40; - this.btnNew.Text = Language.strButtonNew; - this.btnNew.TextAlign = System.Drawing.ContentAlignment.MiddleRight; - this.btnNew.UseVisualStyleBackColor = true; - // - //btnCancel - // - this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnCancel.Location = new System.Drawing.Point(92, 74); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(69, 23); - this.btnCancel.TabIndex = 30; - this.btnCancel.Text = Language.strButtonCancel; - this.btnCancel.UseVisualStyleBackColor = true; - // - //frmChoosePanel - // - this.AcceptButton = this.btnOK; - this.AutoScaleDimensions = new System.Drawing.SizeF((float) (6.0F), (float) (13.0F)); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.btnCancel; - this.ClientSize = new System.Drawing.Size(245, 107); - this.Controls.Add(this.lblDescription); - this.Controls.Add(this.btnNew); - this.Controls.Add(this.btnCancel); - this.Controls.Add(this.btnOK); - this.Controls.Add(this.cbPanels); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; - this.Icon = Resources.Panels_Icon; - this.MaximizeBox = false; - this.MinimizeBox = false; - this.Name = "frmChoosePanel"; - this.ShowInTaskbar = false; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = Language.strTitleSelectPanel; - this.ResumeLayout(false); - + this.cbPanels = new System.Windows.Forms.ComboBox(); + this.btnOK = new System.Windows.Forms.Button(); + this.lblDescription = new System.Windows.Forms.Label(); + this.btnNew = new System.Windows.Forms.Button(); + this.btnCancel = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // cbPanels + // + this.cbPanels.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbPanels.FormattingEnabled = true; + this.cbPanels.Location = new System.Drawing.Point(79, 42); + this.cbPanels.Name = "cbPanels"; + this.cbPanels.Size = new System.Drawing.Size(157, 21); + this.cbPanels.TabIndex = 10; + // + // btnOK + // + this.btnOK.Location = new System.Drawing.Point(92, 73); + this.btnOK.Name = "btnOK"; + this.btnOK.Size = new System.Drawing.Size(69, 23); + this.btnOK.TabIndex = 20; + this.btnOK.Text = global::mRemoteNG.Language.strButtonOK; + this.btnOK.UseVisualStyleBackColor = true; + this.btnOK.Click += new System.EventHandler(this.btnOK_Click); + // + // lblDescription + // + this.lblDescription.Location = new System.Drawing.Point(7, 8); + this.lblDescription.Name = "lblDescription"; + this.lblDescription.Size = new System.Drawing.Size(229, 29); + this.lblDescription.TabIndex = 0; + this.lblDescription.Text = "Select a panel from the list below or click New to add a new one. Click OK to con" + + "tinue."; + // + // btnNew + // + this.btnNew.Image = global::mRemoteNG.Resources.Panel_Add; + this.btnNew.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnNew.Location = new System.Drawing.Point(10, 38); + this.btnNew.Name = "btnNew"; + this.btnNew.Size = new System.Drawing.Size(60, 27); + this.btnNew.TabIndex = 40; + this.btnNew.Text = global::mRemoteNG.Language.strButtonNew; + this.btnNew.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.btnNew.UseVisualStyleBackColor = true; + this.btnNew.Click += new System.EventHandler(this.btnNew_Click); + // + // btnCancel + // + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btnCancel.Location = new System.Drawing.Point(167, 73); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(69, 23); + this.btnCancel.TabIndex = 30; + this.btnCancel.Text = global::mRemoteNG.Language.strButtonCancel; + this.btnCancel.UseVisualStyleBackColor = true; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + // + // frmChoosePanel + // + this.AcceptButton = this.btnOK; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.btnCancel; + this.ClientSize = new System.Drawing.Size(245, 107); + this.Controls.Add(this.lblDescription); + this.Controls.Add(this.btnNew); + this.Controls.Add(this.btnCancel); + this.Controls.Add(this.btnOK); + this.Controls.Add(this.cbPanels); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.Icon = global::mRemoteNG.Resources.Panels_Icon; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "frmChoosePanel"; + this.ShowInTaskbar = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Select Panel"; + this.Load += new System.EventHandler(this.frmChoosePanel_Load); + this.ResumeLayout(false); + } internal System.Windows.Forms.ComboBox cbPanels; internal System.Windows.Forms.Button btnOK; diff --git a/mRemoteV1/UI/Forms/frmChoosePanel.cs b/mRemoteV1/UI/Forms/frmChoosePanel.cs index f622711d..de142629 100644 --- a/mRemoteV1/UI/Forms/frmChoosePanel.cs +++ b/mRemoteV1/UI/Forms/frmChoosePanel.cs @@ -1,6 +1,6 @@ -using Microsoft.VisualBasic; +using System.Windows.Forms; using mRemoteNG.App; -using mRemoteNG.My; +using mRemoteNG.UI.Forms.Input; namespace mRemoteNG { @@ -22,7 +22,7 @@ namespace mRemoteNG } } - public void frmChoosePanel_Load(System.Object sender, System.EventArgs e) + public void frmChoosePanel_Load(object sender, System.EventArgs e) { ApplyLanguage(); @@ -60,11 +60,11 @@ namespace mRemoteNG } } - public void btnNew_Click(System.Object sender, System.EventArgs e) + public void btnNew_Click(object sender, System.EventArgs e) { - string pnlName = Interaction.InputBox(Language.strPanelName + ":", Language.strNewPanel, Language.strNewPanel); + string pnlName = Language.strNewPanel; - if (!string.IsNullOrEmpty(pnlName)) + if (input.InputBox(Language.strNewPanel, Language.strPanelName + ":", ref pnlName) == DialogResult.OK && !string.IsNullOrEmpty(pnlName)) { Runtime.AddPanel(pnlName); AddAvailablePanels(); @@ -73,14 +73,14 @@ namespace mRemoteNG } } - public void btnOK_Click(System.Object sender, System.EventArgs e) + public void btnOK_Click(object sender, System.EventArgs e) { - this.DialogResult = System.Windows.Forms.DialogResult.OK; + DialogResult = DialogResult.OK; } - public void btnCancel_Click(System.Object sender, System.EventArgs e) + public void btnCancel_Click(object sender, System.EventArgs e) { - this.DialogResult = System.Windows.Forms.DialogResult.Cancel; + DialogResult = DialogResult.Cancel; } } } diff --git a/mRemoteV1/UI/Forms/frmChoosePanel.resx b/mRemoteV1/UI/Forms/frmChoosePanel.resx index 19dc0dd8..d58980a3 100644 --- a/mRemoteV1/UI/Forms/frmChoosePanel.resx +++ b/mRemoteV1/UI/Forms/frmChoosePanel.resx @@ -112,9 +112,9 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 \ No newline at end of file diff --git a/mRemoteV1/UI/Forms/frmMain.cs b/mRemoteV1/UI/Forms/frmMain.cs index 23577ba4..614669e1 100644 --- a/mRemoteV1/UI/Forms/frmMain.cs +++ b/mRemoteV1/UI/Forms/frmMain.cs @@ -162,7 +162,7 @@ namespace mRemoteNG.UI.Forms ApplySpecialSettingsForPortableVersion(); - Startup.CreateConnectionsProvider(); + Startup.Instance.CreateConnectionsProvider(); AddSysMenuItems(); Microsoft.Win32.SystemEvents.DisplaySettingsChanged += DisplayChanged; Opacity = 1; @@ -706,10 +706,11 @@ namespace mRemoteNG.UI.Forms private void mMenViewResetLayout_Click(object sender, EventArgs e) { - var msgBoxResult = MessageBox.Show(Language.strConfirmResetLayout, "", MessageBoxButtons.YesNo); + var msgBoxResult = MessageBox.Show(Language.strConfirmResetLayout, string.Empty, MessageBoxButtons.YesNo, + MessageBoxIcon.Question); if (msgBoxResult == DialogResult.Yes) { - Startup.SetDefaultLayout(); + Startup.Instance.SetDefaultLayout(); } } diff --git a/mRemoteV1/UI/Forms/frmOptions.cs b/mRemoteV1/UI/Forms/frmOptions.cs index 0b52fe6a..830cc460 100644 --- a/mRemoteV1/UI/Forms/frmOptions.cs +++ b/mRemoteV1/UI/Forms/frmOptions.cs @@ -25,6 +25,15 @@ namespace mRemoteNG.UI.Forms SetImageListForListView(); AddOptionsPagesToListView(); SetInitiallyActivatedPage(); + ApplyLanguage(); + } + + private void ApplyLanguage() + { + foreach (var optionPage in _pages.Values) + { + optionPage.ApplyLanguage(); + } } private void CompileListOfOptionsPages() diff --git a/mRemoteV1/UI/Window/ComponentsCheckWindow.cs b/mRemoteV1/UI/Window/ComponentsCheckWindow.cs index 7e30c750..73352a53 100644 --- a/mRemoteV1/UI/Window/ComponentsCheckWindow.cs +++ b/mRemoteV1/UI/Window/ComponentsCheckWindow.cs @@ -4,6 +4,7 @@ using WeifenLuo.WinFormsUI.Docking; using System.IO; using mRemoteNG.App; using System.Threading; +using Gecko; using mRemoteNG.App.Info; using mRemoteNG.Connection.Protocol.RDP; @@ -578,30 +579,31 @@ namespace mRemoteNG.UI.Window bool GeckoBad = false; - - if (Settings.Default.XULRunnerPath == "") - { - GeckoBad = true; - } - - if (Directory.Exists(Convert.ToString(Settings.Default.XULRunnerPath))) - { - if (File.Exists(Path.Combine(Convert.ToString(Settings.Default.XULRunnerPath), "xpcom.dll")) == false) - { - GeckoBad = true; - } - } - else - { - GeckoBad = true; - } - - if (GeckoBad == false) + var GeckoFxPath = Path.Combine(GeneralAppInfo.HomePath, "Firefox"); + + if(File.Exists(Path.Combine(GeneralAppInfo.HomePath, "Geckofx-Core.dll"))) + { + if (Directory.Exists(GeckoFxPath)) + { + if (!File.Exists(Path.Combine(GeckoFxPath, "xul.dll"))) + { + GeckoBad = true; + } + } + else + { + GeckoBad = true; + } + } + + if (GeckoBad == false) { pbCheck5.Image = Resources.Good_Symbol; lblCheck5.ForeColor = Color.DarkOliveGreen; lblCheck5.Text = "Gecko (Firefox) Rendering Engine (HTTP/S) " + Language.strCcCheckSucceeded; - txtCheck5.Text = Language.strCcGeckoOK; + if (!Xpcom.IsInitialized) + Xpcom.Initialize("Firefox"); + txtCheck5.Text = Language.strCcGeckoOK + " Version: " + Xpcom.XulRunnerVersion; } else { @@ -611,7 +613,7 @@ namespace mRemoteNG.UI.Window txtCheck5.Text = Language.strCcGeckoFailed; Runtime.MessageCollector.AddMessage(Messages.MessageClass.WarningMsg, "Gecko " + errorMsg, true); - Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, "XULrunner was not found in " + Settings.Default.XULRunnerPath, true); + Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, "GeckoFx was not found in " + GeckoFxPath, true); } } diff --git a/mRemoteV1/UI/Window/ConfigWindow.cs b/mRemoteV1/UI/Window/ConfigWindow.cs index 55c04088..790dc7bf 100644 --- a/mRemoteV1/UI/Window/ConfigWindow.cs +++ b/mRemoteV1/UI/Window/ConfigWindow.cs @@ -1,4 +1,3 @@ -using Azuria.Common.Controls; using mRemoteNG.App; using mRemoteNG.Connection; using mRemoteNG.Connection.Protocol.RDP; @@ -13,6 +12,7 @@ using System.Drawing; using System.IO; using System.Net.NetworkInformation; using System.Windows.Forms; +using mRemoteNG.UI.Controls.FilteredPropertyGrid; using WeifenLuo.WinFormsUI.Docking; diff --git a/mRemoteV1/UI/Window/ConnectionTreeWindow.cs b/mRemoteV1/UI/Window/ConnectionTreeWindow.cs index ace1ca3a..ba0a634a 100644 --- a/mRemoteV1/UI/Window/ConnectionTreeWindow.cs +++ b/mRemoteV1/UI/Window/ConnectionTreeWindow.cs @@ -589,7 +589,7 @@ namespace mRemoteNG.UI.Window private static void cMenTreeToolsExternalAppsEntry_Click(object sender, EventArgs e) { - StartExternalApp((mRemoteNG.Tools.ExternalTool)((System.Windows.Forms.Control)sender).Tag); + StartExternalApp((mRemoteNG.Tools.ExternalTool)((System.Windows.Forms.ToolStripMenuItem)sender).Tag); } public void cMenTreeDuplicate_Click(System.Object sender, EventArgs e) @@ -802,8 +802,8 @@ namespace mRemoteNG.UI.Window //since new items are added below, we have to dispose of any previous items first if (cMenTreeToolsExternalApps.DropDownItems.Count > 0) { - foreach (ToolStripMenuItem mitem in cMenTreeToolsExternalApps.DropDownItems) - mitem.Dispose(); + for (int i = cMenTreeToolsExternalApps.DropDownItems.Count - 1; i >= 0; i--) + cMenTreeToolsExternalApps.DropDownItems[i].Dispose(); cMenTreeToolsExternalApps.DropDownItems.Clear(); } diff --git a/mRemoteV1/UI/Window/ConnectionWindow.cs b/mRemoteV1/UI/Window/ConnectionWindow.cs index 7611199b..b193277a 100644 --- a/mRemoteV1/UI/Window/ConnectionWindow.cs +++ b/mRemoteV1/UI/Window/ConnectionWindow.cs @@ -1,6 +1,5 @@ using System; using System.Drawing; -using Microsoft.VisualBasic; using System.Windows.Forms; using mRemoteNG.Connection; using mRemoteNG.App; @@ -12,6 +11,7 @@ using mRemoteNG.Connection.Protocol; using mRemoteNG.UI.Forms; using mRemoteNG.UI.TaskDialog; using mRemoteNG.App.Info; +using mRemoteNG.UI.Forms.Input; namespace mRemoteNG.UI.Window { @@ -973,8 +973,8 @@ namespace mRemoteNG.UI.Window //since new items are added below, we have to dispose of any previous items first if (cmenTabExternalApps.DropDownItems.Count > 0) { - foreach (ToolStripMenuItem mitem in cmenTabExternalApps.DropDownItems) - mitem.Dispose(); + for (int i = cmenTabExternalApps.DropDownItems.Count - 1; i >= 0; i--) + cmenTabExternalApps.DropDownItems[i].Dispose(); cmenTabExternalApps.DropDownItems.Clear(); } @@ -1070,9 +1070,9 @@ namespace mRemoteNG.UI.Window { try { - string nTitle = Interaction.InputBox(Prompt: Language.strNewTitle + ":", DefaultResponse: TabController.SelectedTab.Title.Replace("&&", "&")); + string nTitle = ""; - if (!string.IsNullOrEmpty(nTitle)) + if (input.InputBox(Language.strNewTitle, Language.strNewTitle + ":", ref nTitle) == DialogResult.OK && !string.IsNullOrEmpty(nTitle)) { TabController.SelectedTab.Title = nTitle.Replace("&", "&&"); } diff --git a/mRemoteV1/UI/Window/ErrorAndInfoWindow.cs b/mRemoteV1/UI/Window/ErrorAndInfoWindow.cs index c27d5a1e..df511971 100644 --- a/mRemoteV1/UI/Window/ErrorAndInfoWindow.cs +++ b/mRemoteV1/UI/Window/ErrorAndInfoWindow.cs @@ -1,12 +1,10 @@ using System; using System.Drawing; -using Microsoft.VisualBasic; using System.Collections; using System.Windows.Forms; using System.Text; using WeifenLuo.WinFormsUI.Docking; using mRemoteNG.App; -using mRemoteNG.My; using mRemoteNG.UI.Forms; diff --git a/mRemoteV1/UI/Window/PortScanWindow.Designer.cs b/mRemoteV1/UI/Window/PortScanWindow.Designer.cs index 31f50fbc..7ce0b735 100644 --- a/mRemoteV1/UI/Window/PortScanWindow.Designer.cs +++ b/mRemoteV1/UI/Window/PortScanWindow.Designer.cs @@ -78,7 +78,7 @@ namespace mRemoteNG.UI.Window // // ipEnd // - this.ipEnd.Location = new System.Drawing.Point(167, 25); + this.ipEnd.Location = new System.Drawing.Point(148, 25); this.ipEnd.Name = "ipEnd"; this.ipEnd.Size = new System.Drawing.Size(130, 20); this.ipEnd.TabIndex = 15; @@ -89,16 +89,16 @@ namespace mRemoteNG.UI.Window this.lblStartIP.AutoSize = true; this.lblStartIP.Location = new System.Drawing.Point(12, 7); this.lblStartIP.Name = "lblStartIP"; - this.lblStartIP.Size = new System.Drawing.Size(45, 13); + this.lblStartIP.Size = new System.Drawing.Size(57, 19); this.lblStartIP.TabIndex = 0; this.lblStartIP.Text = "Start IP:"; // // lblEndIP // this.lblEndIP.AutoSize = true; - this.lblEndIP.Location = new System.Drawing.Point(164, 7); + this.lblEndIP.Location = new System.Drawing.Point(148, 7); this.lblEndIP.Name = "lblEndIP"; - this.lblEndIP.Size = new System.Drawing.Size(42, 13); + this.lblEndIP.Size = new System.Drawing.Size(51, 19); this.lblEndIP.TabIndex = 5; this.lblEndIP.Text = "End IP:"; // @@ -106,7 +106,7 @@ namespace mRemoteNG.UI.Window // this.btnScan.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.btnScan.Image = global::mRemoteNG.Resources.Search; - this.btnScan.Location = new System.Drawing.Point(461, 9); + this.btnScan.Location = new System.Drawing.Point(597, 9); this.btnScan.Name = "btnScan"; this.btnScan.Size = new System.Drawing.Size(86, 58); this.btnScan.TabIndex = 20; @@ -126,7 +126,7 @@ namespace mRemoteNG.UI.Window this.lvHosts.HideSelection = false; this.lvHosts.Location = new System.Drawing.Point(12, 73); this.lvHosts.Name = "lvHosts"; - this.lvHosts.Size = new System.Drawing.Size(535, 222); + this.lvHosts.Size = new System.Drawing.Size(671, 265); this.lvHosts.TabIndex = 26; this.lvHosts.UseCompatibleStateImageBehavior = false; this.lvHosts.View = System.Windows.Forms.View.Details; @@ -134,9 +134,9 @@ namespace mRemoteNG.UI.Window // btnImport // this.btnImport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnImport.Location = new System.Drawing.Point(460, 6); + this.btnImport.Location = new System.Drawing.Point(585, 3); this.btnImport.Name = "btnImport"; - this.btnImport.Size = new System.Drawing.Size(75, 23); + this.btnImport.Size = new System.Drawing.Size(75, 31); this.btnImport.TabIndex = 101; this.btnImport.Text = "&Import"; this.btnImport.UseVisualStyleBackColor = true; @@ -155,18 +155,18 @@ namespace mRemoteNG.UI.Window "Rlogin", "RDP", "VNC"}); - this.cbProtocol.Location = new System.Drawing.Point(98, 8); + this.cbProtocol.Location = new System.Drawing.Point(157, 6); this.cbProtocol.Name = "cbProtocol"; - this.cbProtocol.Size = new System.Drawing.Size(122, 21); + this.cbProtocol.Size = new System.Drawing.Size(122, 27); this.cbProtocol.TabIndex = 28; // // lblOnlyImport // this.lblOnlyImport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.lblOnlyImport.AutoSize = true; - this.lblOnlyImport.Location = new System.Drawing.Point(0, 11); + this.lblOnlyImport.Location = new System.Drawing.Point(5, 13); this.lblOnlyImport.Name = "lblOnlyImport"; - this.lblOnlyImport.Size = new System.Drawing.Size(92, 13); + this.lblOnlyImport.Size = new System.Drawing.Size(125, 19); this.lblOnlyImport.TabIndex = 1; this.lblOnlyImport.Text = "Protocol to import:"; // @@ -226,7 +226,7 @@ namespace mRemoteNG.UI.Window | System.Windows.Forms.AnchorStyles.Right))); this.prgBar.Location = new System.Drawing.Point(12, 51); this.prgBar.Name = "prgBar"; - this.prgBar.Size = new System.Drawing.Size(443, 16); + this.prgBar.Size = new System.Drawing.Size(579, 16); this.prgBar.Step = 1; this.prgBar.TabIndex = 28; // @@ -236,52 +236,52 @@ namespace mRemoteNG.UI.Window this.pnlPorts.Controls.Add(this.portStart); this.pnlPorts.Controls.Add(this.Label2); this.pnlPorts.Controls.Add(this.Label1); - this.pnlPorts.Location = new System.Drawing.Point(303, 7); + this.pnlPorts.Location = new System.Drawing.Point(284, 7); this.pnlPorts.Name = "pnlPorts"; - this.pnlPorts.Size = new System.Drawing.Size(152, 38); + this.pnlPorts.Size = new System.Drawing.Size(307, 38); this.pnlPorts.TabIndex = 18; // // portEnd // - this.portEnd.Location = new System.Drawing.Point(79, 18); + this.portEnd.Location = new System.Drawing.Point(232, 5); this.portEnd.Maximum = new decimal(new int[] { 65535, 0, 0, 0}); this.portEnd.Name = "portEnd"; - this.portEnd.Size = new System.Drawing.Size(67, 20); + this.portEnd.Size = new System.Drawing.Size(67, 26); this.portEnd.TabIndex = 15; this.portEnd.Enter += new System.EventHandler(this.portEnd_Enter); // // portStart // - this.portStart.Location = new System.Drawing.Point(6, 18); + this.portStart.Location = new System.Drawing.Point(79, 5); this.portStart.Maximum = new decimal(new int[] { 65535, 0, 0, 0}); this.portStart.Name = "portStart"; - this.portStart.Size = new System.Drawing.Size(67, 20); + this.portStart.Size = new System.Drawing.Size(67, 26); this.portStart.TabIndex = 5; this.portStart.Enter += new System.EventHandler(this.portStart_Enter); // // Label2 // this.Label2.AutoSize = true; - this.Label2.Location = new System.Drawing.Point(76, 2); + this.Label2.Location = new System.Drawing.Point(162, 7); this.Label2.Name = "Label2"; - this.Label2.Size = new System.Drawing.Size(51, 13); + this.Label2.Size = new System.Drawing.Size(64, 19); this.Label2.TabIndex = 10; this.Label2.Text = "End Port:"; // // Label1 // this.Label1.AutoSize = true; - this.Label1.Location = new System.Drawing.Point(3, 2); + this.Label1.Location = new System.Drawing.Point(3, 7); this.Label1.Name = "Label1"; - this.Label1.Size = new System.Drawing.Size(54, 13); + this.Label1.Size = new System.Drawing.Size(70, 19); this.Label1.TabIndex = 0; this.Label1.Text = "Start Port:"; // @@ -292,15 +292,15 @@ namespace mRemoteNG.UI.Window this.pnlImport.Controls.Add(this.btnImport); this.pnlImport.Controls.Add(this.lblOnlyImport); this.pnlImport.Controls.Add(this.cbProtocol); - this.pnlImport.Location = new System.Drawing.Point(12, 295); + this.pnlImport.Location = new System.Drawing.Point(12, 344); this.pnlImport.Name = "pnlImport"; - this.pnlImport.Size = new System.Drawing.Size(535, 29); + this.pnlImport.Size = new System.Drawing.Size(671, 40); this.pnlImport.TabIndex = 102; // // PortScanWindow // this.AcceptButton = this.btnImport; - this.ClientSize = new System.Drawing.Size(559, 336); + this.ClientSize = new System.Drawing.Size(695, 396); this.Controls.Add(this.pnlImport); this.Controls.Add(this.lvHosts); this.Controls.Add(this.pnlPorts); diff --git a/mRemoteV1/UI/Window/PortScanWindow.cs b/mRemoteV1/UI/Window/PortScanWindow.cs index 48ae5c03..16d5790c 100644 --- a/mRemoteV1/UI/Window/PortScanWindow.cs +++ b/mRemoteV1/UI/Window/PortScanWindow.cs @@ -3,11 +3,13 @@ using System; using System.Windows.Forms; using WeifenLuo.WinFormsUI.Docking; using mRemoteNG.App; +using mRemoteNG.Tools; +using static mRemoteNG.Tools.MiscTools; namespace mRemoteNG.UI.Window { - public partial class PortScanWindow : BaseWindow + public partial class PortScanWindow { #region Constructors public PortScanWindow(DockContent panel, bool import) @@ -66,28 +68,33 @@ namespace mRemoteNG.UI.Window #region Private Fields private bool _import; - private Tools.PortScan.Scanner _portScanner; + private Scanner _portScanner; private bool _scanning = false; #endregion #region Private Methods #region Event Handlers - public void PortScan_Load(System.Object sender, EventArgs e) + + private void PortScan_Load(object sender, EventArgs e) { ApplyLanguage(); try { + /* flipped the UI around a bit + * Show the open/closed port numbers in import mode in case custom ports are scanned. + * Since (currently) the non-import mode doesn't allow custom ports, just show the standard port columns. + */ if (_import) { - lvHosts.Columns.AddRange(new ColumnHeader[] {clmHost, clmSSH, clmTelnet, clmHTTP, clmHTTPS, clmRlogin, clmRDP, clmVNC}); + lvHosts.Columns.AddRange(new[] { clmHost, clmOpenPorts, clmClosedPorts }); ShowImportControls(true); cbProtocol.SelectedIndex = 0; } else { - lvHosts.Columns.AddRange(new ColumnHeader[] {clmHost, clmOpenPorts, clmClosedPorts}); - ShowImportControls(false); + lvHosts.Columns.AddRange(new[] { clmHost, clmSSH, clmTelnet, clmHTTP, clmHTTPS, clmRlogin, clmRDP, clmVNC }); + ShowImportControls(false); } } catch (Exception ex) @@ -95,18 +102,18 @@ namespace mRemoteNG.UI.Window Runtime.MessageCollector.AddExceptionMessage(Language.strPortScanCouldNotLoadPanel, ex); } } - - public void portStart_Enter(System.Object sender, EventArgs e) + + private void portStart_Enter(object sender, EventArgs e) { portStart.Select(0, portStart.Text.Length); } - - public void portEnd_Enter(System.Object sender, EventArgs e) + + private void portEnd_Enter(object sender, EventArgs e) { portEnd.Select(0, portEnd.Text.Length); } - - public void btnScan_Click(System.Object sender, EventArgs e) + + private void btnScan_Click(object sender, EventArgs e) { if (_scanning) { @@ -124,21 +131,21 @@ namespace mRemoteNG.UI.Window } } } - - public void btnImport_Click(System.Object sender, EventArgs e) + + private void btnImport_Click(object sender, EventArgs e) { - mRemoteNG.Connection.Protocol.ProtocolType protocol = (mRemoteNG.Connection.Protocol.ProtocolType)Tools.MiscTools.StringToEnum(typeof(mRemoteNG.Connection.Protocol.ProtocolType), Convert.ToString(cbProtocol.SelectedItem)); + Connection.Protocol.ProtocolType protocol = (Connection.Protocol.ProtocolType)StringToEnum(typeof(Connection.Protocol.ProtocolType), Convert.ToString(cbProtocol.SelectedItem)); - List hosts = new List(); + List hosts = new List(); foreach (ListViewItem item in lvHosts.SelectedItems) { - Tools.PortScan.ScanHost scanHost = (Tools.PortScan.ScanHost)item.Tag; + var scanHost = (ScanHost)item.Tag; if (scanHost != null) { hosts.Add(scanHost); } } - App.Import.ImportFromPortScan(hosts, protocol); + Import.ImportFromPortScan(hosts, protocol); DialogResult = DialogResult.OK; Close(); } @@ -146,16 +153,16 @@ namespace mRemoteNG.UI.Window private void ApplyLanguage() { - lblStartIP.Text = string.Format("{0}:", Language.strStartIP); - lblEndIP.Text = string.Format("{0}:", Language.strEndIP); + lblStartIP.Text = $"{Language.strStartIP}:"; + lblEndIP.Text = $"{Language.strEndIP}:"; btnScan.Text = Language.strButtonScan; btnImport.Text = Language.strButtonImport; - lblOnlyImport.Text = string.Format("{0}:", Language.strProtocolToImport); + lblOnlyImport.Text = $"{Language.strProtocolToImport}:"; clmHost.Text = Language.strColumnHostnameIP; clmOpenPorts.Text = Language.strOpenPorts; clmClosedPorts.Text = Language.strClosedPorts; - Label2.Text = string.Format("{0}:", Language.strEndPort); - Label1.Text = string.Format("{0}:", Language.strStartPort); + Label2.Text = $"{Language.strEndPort}:"; + Label1.Text = $"{Language.strStartPort}:"; TabText = Language.strMenuPortScan; Text = Language.strMenuPortScan; } @@ -184,14 +191,15 @@ namespace mRemoteNG.UI.Window System.Net.IPAddress ipAddressStart = System.Net.IPAddress.Parse(ipStart.Text); System.Net.IPAddress ipAddressEnd = System.Net.IPAddress.Parse(ipEnd.Text); - - if (_import) + + // reversed logic here. port values are only available on the import screen + if (!_import) { - _portScanner = new Tools.PortScan.Scanner(ipAddressStart, ipAddressEnd); + _portScanner = new Scanner(ipAddressStart, ipAddressEnd); } else { - _portScanner = new Tools.PortScan.Scanner(ipAddressStart, ipAddressEnd, (int) portStart.Value, (int) portEnd.Value); + _portScanner = new Scanner(ipAddressStart, ipAddressEnd, (int) portStart.Value, (int) portEnd.Value); } _portScanner.BeginHostScan += PortScanner_BeginHostScan; @@ -208,11 +216,8 @@ namespace mRemoteNG.UI.Window private void StopScan() { - if (_portScanner != null) - { - _portScanner.StopScan(); - } - _scanning = false; + _portScanner?.StopScan(); + _scanning = false; SwitchButtonText(); } @@ -236,8 +241,8 @@ namespace mRemoteNG.UI.Window Runtime.MessageCollector.AddMessage(Messages.MessageClass.InformationMsg, "Scanning " + host, true); } - private delegate void PortScannerHostScannedDelegate(Tools.PortScan.ScanHost host, int scannedCount, int totalCount); - private void PortScanner_HostScanned(Tools.PortScan.ScanHost host, int scannedCount, int totalCount) + private delegate void PortScannerHostScannedDelegate(ScanHost host, int scannedCount, int totalCount); + private void PortScanner_HostScanned(ScanHost host, int scannedCount, int totalCount) { if (InvokeRequired) { @@ -258,8 +263,8 @@ namespace mRemoteNG.UI.Window prgBar.Value = scannedCount; } - private delegate void PortScannerScanComplete(List hosts); - private void PortScanner_ScanComplete(List hosts) + private delegate void PortScannerScanComplete(List hosts); + private void PortScanner_ScanComplete(List hosts) { if (InvokeRequired) { @@ -273,5 +278,5 @@ namespace mRemoteNG.UI.Window SwitchButtonText(); } #endregion - } + } } \ No newline at end of file diff --git a/mRemoteV1/UI/Window/ScreenshotManagerWindow.cs b/mRemoteV1/UI/Window/ScreenshotManagerWindow.cs index 3aa34047..ec399ae2 100644 --- a/mRemoteV1/UI/Window/ScreenshotManagerWindow.cs +++ b/mRemoteV1/UI/Window/ScreenshotManagerWindow.cs @@ -1,11 +1,9 @@ using System; using System.Drawing; -using Microsoft.VisualBasic; using System.Windows.Forms; using WeifenLuo.WinFormsUI.Docking; using mRemoteNG.App; using System.IO; -using mRemoteNG.My; using mRemoteNG.UI.Forms; diff --git a/mRemoteV1/UI/Window/UltraVNCWindow.cs b/mRemoteV1/UI/Window/UltraVNCWindow.cs index 8e0e85aa..69624e62 100644 --- a/mRemoteV1/UI/Window/UltraVNCWindow.cs +++ b/mRemoteV1/UI/Window/UltraVNCWindow.cs @@ -1,7 +1,5 @@ using System; -using Microsoft.VisualBasic; using mRemoteNG.App; -using mRemoteNG.My; using WeifenLuo.WinFormsUI.Docking; diff --git a/mRemoteV1/mRemoteV1.csproj b/mRemoteV1/mRemoteV1.csproj index f139dcd9..ba64f4b5 100644 --- a/mRemoteV1/mRemoteV1.csproj +++ b/mRemoteV1/mRemoteV1.csproj @@ -42,60 +42,18 @@ false true true - - - true - full - true - true - bin\Debug\ - - - 1591,660,661 - x86 - MinimumRecommendedRules.ruleset - DEBUG - false - - - pdbonly - false - true - false - bin\Release\ - - - 1591,660,661 - true - x86 - AllRules.ruleset - - - true - bin\Release Portable\ - false - 1591,660,661 - pdbonly - x86 - PORTABLE - true - AllRules.ruleset - false - - - true - true - true - bin\Debug Portable\ - 1591,660,661 - full - x86 - DEBUG;PORTABLE - MinimumRecommendedRules.ruleset - false - false + + + + ..\packages\Geckofx45.45.0.19.0\lib\net40\Geckofx-Core.dll + True + + + ..\packages\Geckofx45.45.0.19.0\lib\net40\Geckofx-Winforms.dll + True + False @@ -105,10 +63,6 @@ False References\DiffieHellman.dll - - False - References\FilteredPropertyGrid.dll - False References\log4net.dll @@ -118,18 +72,10 @@ References\MagicLibrary.dll True - - False - References\MiniGeckoBrowser.dll - False References\Org.Mentalis.Security.dll - - False - References\Skybound.Gecko.dll - @@ -160,7 +106,7 @@ - + @@ -216,7 +162,6 @@ - @@ -227,6 +172,13 @@ + + Component + + + FilteredPropertyGrid.cs + + UserControl @@ -248,6 +200,7 @@ frmOptions.cs + AdvancedPage.cs @@ -358,7 +311,7 @@ Form - + True True @@ -499,7 +452,9 @@ - + + Designer + IPTextBox.cs @@ -545,7 +500,9 @@ Designer - + + Designer + Designer @@ -563,7 +520,9 @@ Designer - + + Designer + Designer @@ -674,12 +633,36 @@ + + MyApplicationCodeGenerator Application.Designer.cs + + + + + + + + + + + + + + + + + + + + + + PreserveNewest @@ -1209,12 +1192,55 @@ - call "$(DevEnvDir)..\tools\vsvars32.bat" -editbin /largeaddressaware $(TargetPath) +editbin /largeaddressaware mRemoteNG.exe + + + true + true + true + bin\Debug\ + DEBUG + 1591,660,661 + full + x86 + false + MinimumRecommendedRules.ruleset + + + true + true + bin\Release\ + 1591,660,661 + pdbonly + x86 + AllRules.ruleset + + + true + true + bin\Release Portable\ + PORTABLE + 1591,660,661 + pdbonly + x86 + false + AllRules.ruleset + + + true + true + true + bin\Debug Portable\ + DEBUG;PORTABLE + 1591,660,661 + full + x86 + false + MinimumRecommendedRules.ruleset + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + \ No newline at end of file diff --git a/mRemoteV1/packages.config b/mRemoteV1/packages.config new file mode 100644 index 00000000..cfe52582 --- /dev/null +++ b/mRemoteV1/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file