mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Compare commits
38 Commits
mRemoteNGP
...
v1.77.2-de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
15149f9e2c | ||
|
|
ab3d85b089 | ||
|
|
2f3a03eab7 | ||
|
|
629515b81a | ||
|
|
05c8da3ee4 | ||
|
|
859d12b450 | ||
|
|
cd7c594b76 | ||
|
|
39862e15f6 | ||
|
|
87b0cf5c3f | ||
|
|
a14219e1e2 | ||
|
|
ee4660707c | ||
|
|
ccdf15c79c | ||
|
|
b31362afab | ||
|
|
74d6c88565 | ||
|
|
638f64b888 | ||
|
|
ffff9c1529 | ||
|
|
39968c7c6e | ||
|
|
2c3edf0ff2 | ||
|
|
2c4445a2d9 | ||
|
|
09114a5ed3 | ||
|
|
22e7825d65 | ||
|
|
62862141a8 | ||
|
|
920461920c | ||
|
|
f5d0e93ecd | ||
|
|
952a2f536b | ||
|
|
fbb9d849b4 | ||
|
|
65a13dee68 | ||
|
|
09d26b37c7 | ||
|
|
47de6905df | ||
|
|
c0cf316c16 | ||
|
|
c055f8069d | ||
|
|
575356214f | ||
|
|
33e007ad48 | ||
|
|
efea9f0857 | ||
|
|
aa755a0093 | ||
|
|
807e80acbe | ||
|
|
4096247ee8 | ||
|
|
782d09ddbc |
@@ -2,9 +2,6 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
## [1.77.3]
|
||||
### Added
|
||||
- # #2123: Thycotic Secret Server - Added 2FA OTP support
|
||||
|
||||
## [1.77.2]
|
||||
### Added
|
||||
@@ -37,6 +34,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
- #1325: Language resource files cleanup
|
||||
- #xxxx: Secret Server connector via new field "API User ID" instead of SSAPI: prefix
|
||||
### Fixed
|
||||
- #2125: Fixed string parsing logic for Quick Connect toolbar.
|
||||
- #2122: Fix to avoid throwing exception incase if not able decrypt connections and ask to open another one or create a new.
|
||||
- #2117: Fix of broken Links due migration to .NET 6 and branch renaming
|
||||
- #2098: Fix failed BinaryFileTest
|
||||
- #2097: Fix failed tests related to mRemoteNGTests.UI.Window.ConfigWindowTests
|
||||
- #2096: Corrected encryption code of LegacyRijndaelCryptographyProvider
|
||||
|
||||
127
CREDITS.md
Normal file
127
CREDITS.md
Normal file
@@ -0,0 +1,127 @@
|
||||
# Contributors
|
||||
|
||||
## Current mRemoteNG dev team
|
||||
|
||||
[David Sparer](http://github.com/sparerd)
|
||||
[Sean Kaim](http://github.com/kmscode)
|
||||
[Faryan Rezagholi](http://github.com/farosch)
|
||||
[Bennett Blodinger](http://github.com/benwa)
|
||||
|
||||
[Joe Cefoli](http://github.com/jcefoli)
|
||||
[countchappy](http://github.com/countchappy)
|
||||
Tony Lambert
|
||||
[Julien Roncaglia](http://github.com/vbfox)
|
||||
[peterchenadded](http://github.com/peterchenadded)
|
||||
[Brandon Wulf](http://github.com/mrwulf)
|
||||
[Pedro Rodrigues](http://github.com/pedro2555)
|
||||
[dekelMP](http://github.com/dekelMP)
|
||||
[Bruce](http://github.com/brucetp)
|
||||
[Camilo Alvarez](http://github.com/jotatsu)
|
||||
[DamianBis](http://github.com/DamianBis)
|
||||
[pfjason](http://github.com/pfjason)
|
||||
[sirLoaf](http://github.com/sirLoaf)
|
||||
[Fyers](http://github.com/Fyers)
|
||||
[Vladimir Semenov](http://github.com/sli-pro)
|
||||
[Stephan](http://github.com/st-schuler)
|
||||
[Aleksey Reytsman](http://github.com/areytsman)
|
||||
[Cristian Abelleira](http://github.com/CrAbelleira)
|
||||
[MitchellBot](http://github.com/MitchellBot)
|
||||
[Filippo Ferrazini](http://github.com/Filippo125)
|
||||
|
||||
## Past Contributors
|
||||
|
||||
Felix Deimel - mRemote original developer
|
||||
Riley McArdle - mRemoteNG original developer
|
||||
|
||||
[Hayato Iriumi](http://github.com/hiriumi)
|
||||
Jason Barbier
|
||||
Wiktor Beryt
|
||||
Lionel Caignec
|
||||
Ruben d'Arco
|
||||
Holger Henke
|
||||
Tom Hiller
|
||||
Apisitt Rattana
|
||||
Andreas Rehm
|
||||
David Vidmar
|
||||
[Brandhor](http://github.com/Brandhor)
|
||||
[Dimitrij](http://github.com/Kvarkas)
|
||||
|
||||
## Translators
|
||||
|
||||
Eugenio "Ryo567" Martínez
|
||||
Mathieu Pape
|
||||
Emanuel Silva
|
||||
Robert Siwiec
|
||||
Hayato Iriumi
|
||||
[Sebastien Thieury](http://github.com/SebThieu)
|
||||
Riza Emet
|
||||
[Lukas Plachy](http://github.com/rheingold)
|
||||
Gyuha Shin
|
||||
[Stefan](http://github.com/polluks)
|
||||
[emazv72](http://github.com/emazv72)
|
||||
[Vladimir Semenov](http://github.com/sli-pro)
|
||||
[Marco Sousa](http://github.com/marcomsousa)
|
||||
[wwj402](http://github.com/wwj402)
|
||||
[Fyers](http://github.com/Fyers)
|
||||
[pablomh](http://github.com/pablomh)
|
||||
[Damian Szczepanik](http://github.com/damianszczepanik)
|
||||
[Mant1kor](http://github.com/Mant1kor)
|
||||
|
||||
# Included Source Code
|
||||
|
||||
**[Command Line Arguments Parser](http://www.codeproject.com/KB/recipes/command_line.aspx)**
|
||||
Copyright © 2002 Richard Lopes
|
||||
MIT License
|
||||
|
||||
**[FilteredPropertyGrid](http://www.codeproject.com/KB/cs/FilteredPropertyGrid.aspx)**
|
||||
Copyright © 2006 Azuria
|
||||
|
||||
**[InputBox](http://www.csharp-examples.net/inputbox/)**
|
||||
Copyright © 2016 Jan Slama
|
||||
|
||||
**[IP TextBox](http://www.codeproject.com/Articles/11576/IP-TextBox)**
|
||||
Copyright © 2005 mawnkay
|
||||
|
||||
**[PortableSettingsProvider](https://github.com/crdx/PortableSettingsProvider)**
|
||||
Copyright © 2014 crdx
|
||||
|
||||
**[ADTree](http://www.codeproject.com/KB/selection/ADPickerCtrl.aspx)**
|
||||
Copyright © 2004 Marc Merritt © 2008 Felix Deimel
|
||||
|
||||
# Included Components
|
||||
|
||||
**[CefSharp](https://github.com/cefsharp/CefSharp)**
|
||||
Copyright © The CefSharp Authors
|
||||
MIT License
|
||||
|
||||
**[DockPanel Suite](https://github.com/dockpanelsuite/dockpanelsuite)**
|
||||
Copyright © 2018 @roken and @lextm (formerly Weifen Luo)
|
||||
MIT License
|
||||
|
||||
**[log4net](http://logging.apache.org/log4net/)**
|
||||
Copyright © 2001-2015 The Apache Software Foundation
|
||||
Apache License Version 2.0
|
||||
|
||||
**[PuTTY](http://www.chiark.greenend.org.uk/~sgtatham/putty/)**
|
||||
Copyright © 1997-2017 Simon Tatham
|
||||
MIT License
|
||||
|
||||
**[Silk Icon Set](http://www.famfamfam.com/)**
|
||||
Copyright © 2005-2008 FAMFAMFAM
|
||||
Creative Commons Attribution 2.5 License
|
||||
|
||||
**[SSH.NET](https://github.com/sshnet/SSH.NET)**
|
||||
Copyright © 2016
|
||||
MIT License
|
||||
|
||||
**[VncSharp](https://github.com/humphd/VncSharp) (Archived)**
|
||||
Copyright © 2004-2009 David Humphrey
|
||||
GNU General Public License (GPL) Version 2
|
||||
|
||||
**[ObjectListView](https://sourceforge.net/projects/objectlistview/)**
|
||||
Copyright © 2006-2016 Phillip Piper
|
||||
GNU General Public License (GPL) Version 3
|
||||
|
||||
**[ConsoleControl](https://github.com/dwmkerr/consolecontrol)**
|
||||
Copyright © 2015 Dave Kerr
|
||||
MIT License
|
||||
@@ -11,8 +11,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AWSSDK.Core" Version="3.7.5.13" />
|
||||
<PackageReference Include="AWSSDK.EC2" Version="3.7.54" />
|
||||
<PackageReference Include="AWSSDK.Core" Version="3.7.6" />
|
||||
<PackageReference Include="AWSSDK.EC2" Version="3.7.55.3" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<br/><br/>
|
||||
<p align="center">
|
||||
<img width="450" src="https://github.com/mRemoteNG/mRemoteNG/blob/develop/mRemoteNGProjectFiles/Header_dark.png">
|
||||
<img width="450" src="https://github.com/mRemoteNG/mRemoteNG/blob/mRemoteNGProjectFiles/Header_dark.png">
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@@ -116,13 +116,17 @@ The MSI package of mRemoteNG can be installed using the command line:
|
||||
_If you are using the Portable version, simply deleting the folder that contains mRemoteNG should be sufficient. These uninstall instructions are only necessary for the normal binary .MSI installed version of mRemoteNG_
|
||||
|
||||
* Delete the folder where mRemoteNG was installed. By default, this is:
|
||||
`%PROGRAMFILES%\mRemoteNG`
|
||||
`%PROGRAMFILES%\mRemoteNG` (for versions before 1.77 on a x64 Windows its `%programfiles(x86)%\mRemoteNG`)
|
||||
|
||||
* Delete the mRemoteNG install entry from one of the following locations. Search for "mRemoteNG" in the DisplayName field:
|
||||
* x86: ``HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\``
|
||||
* x64: ``HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\``
|
||||
* Delete the mRemoteNG install entry from the following location. You may search for "mRemoteNG" in the DisplayName field:
|
||||
* x86 Windows or mRemoteNG starting with v1.77: `HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\`
|
||||
* x64 Windows and mRemoteNG before 1.77: `HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\`
|
||||
* Remove the following registry key: `HKLM\SOFTWARE\mRemoteNG` (on x64 Windows with mRemoteNG before 1.77 it's `HKLM\SOFTWARE\WOW6432Node\mRemoteNG`)
|
||||
|
||||
* (Optional) If you would also like to delete user data remove `%LOCALAPPDATA%\mRemoteNG`
|
||||
* (Optional) If you would also like to remove the connection configuration, delete `%APPDATA%\mRemoteNG`
|
||||
|
||||
* (Optional) If no other software uses it, the "Microsoft Windows Desktop Runtime" may be uninstalled too.
|
||||
|
||||
## Featured Projects
|
||||
|
||||
@@ -141,5 +145,5 @@ Check out the [Wiki page](https://github.com/mRemoteNG/mRemoteNG/wiki) on how to
|
||||
|
||||
</br>
|
||||
<p align="center">
|
||||
<img alt="Developed with ReSharper" src="https://github.com/mRemoteNG/mRemoteNG/blob/develop/mRemoteNGProjectFiles/icon_ReSharper.png">
|
||||
<img alt="Developed with ReSharper" src="https://github.com/mRemoteNG/mRemoteNG/blob/mRemoteNGProjectFiles/icon_ReSharper.png">
|
||||
</p>
|
||||
@@ -28,6 +28,7 @@ namespace mRemoteNG.App.Info
|
||||
|
||||
//public static string ReportingFilePath = "";
|
||||
public static readonly string PuttyPath = HomePath + "\\PuTTYNG.exe";
|
||||
public static readonly string WinboxPath = HomePath + "\\winbox.exe";
|
||||
|
||||
public static string UserAgent
|
||||
{
|
||||
|
||||
@@ -49,6 +49,8 @@ namespace mRemoteNG.App
|
||||
|
||||
public static ICredentialRepositoryList CredentialProviderCatalog { get; } = new CredentialRepositoryList();
|
||||
|
||||
public static ConnectionInitiator ConnectionInitiator { get; set; } = new ConnectionInitiator();
|
||||
|
||||
public static ConnectionsService ConnectionsService { get; } =
|
||||
new ConnectionsService(PuttySessionsManager.Instance);
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
|
||||
|
||||
public ConnectionTreeModel Deserialize(string xml, bool import)
|
||||
{
|
||||
if (string.IsNullOrEmpty(xml)) return null;
|
||||
try
|
||||
{
|
||||
LoadXmlConnectionData(xml);
|
||||
@@ -95,9 +96,11 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
|
||||
{
|
||||
CreateDecryptor(new RootNodeInfo(RootNodeType.Connection));
|
||||
connections = _decryptor.LegacyFullFileDecrypt(connections);
|
||||
_xmlDocument = new XmlDocument();
|
||||
if (connections != "")
|
||||
{
|
||||
_xmlDocument = new XmlDocument();
|
||||
_xmlDocument.LoadXml(connections);
|
||||
}
|
||||
}
|
||||
|
||||
private void ValidateConnectionFileVersion()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using WeifenLuo.WinFormsUI.Docking;
|
||||
@@ -11,7 +11,7 @@ using mRemoteNG.Messages;
|
||||
using mRemoteNG.Tools;
|
||||
using mRemoteNG.UI.Controls;
|
||||
using mRemoteNG.UI.Forms;
|
||||
|
||||
using mRemoteNG.Connection.Protocol.Winbox;
|
||||
|
||||
namespace mRemoteNG.Config.Settings
|
||||
{
|
||||
@@ -69,6 +69,7 @@ namespace mRemoteNG.Config.Settings
|
||||
SetKioskMode();
|
||||
|
||||
SetPuttyPath();
|
||||
SetWinboxPath();
|
||||
SetShowSystemTrayIcon();
|
||||
SetAutoSave();
|
||||
LoadExternalAppsFromXml();
|
||||
@@ -169,6 +170,11 @@ namespace mRemoteNG.Config.Settings
|
||||
: GeneralAppInfo.PuttyPath;
|
||||
}
|
||||
|
||||
private static void SetWinboxPath()
|
||||
{
|
||||
ProtocolWinbox.WinboxPath = GeneralAppInfo.WinboxPath;
|
||||
}
|
||||
|
||||
private void EnsureSettingsAreSavedInNewestVersion()
|
||||
{
|
||||
if (Properties.Settings.Default.DoUpgrade)
|
||||
|
||||
@@ -18,6 +18,7 @@ using mRemoteNG.Properties;
|
||||
using mRemoteNG.Tree;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using mRemoteNG.Tree.Root;
|
||||
using mRemoteNG.Connection.Protocol.Winbox;
|
||||
|
||||
|
||||
namespace mRemoteNG.Connection
|
||||
@@ -274,6 +275,8 @@ namespace mRemoteNG.Connection
|
||||
return (int)ProtocolPowerShell.Defaults.Port;
|
||||
case ProtocolType.IntApp:
|
||||
return (int)IntegratedProgram.Defaults.Port;
|
||||
case ProtocolType.Winbox:
|
||||
return (int)ProtocolWinbox.Defaults.Port;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -369,7 +372,7 @@ namespace mRemoteNG.Connection
|
||||
UserField = Settings.Default.ConDefaultUserField;
|
||||
Favorite = Settings.Default.ConDefaultFavorite;
|
||||
RDPStartProgram = Settings.Default.ConDefaultRDPStartProgram;
|
||||
RDPStartProgramWorkDir = Settings.Default.ConDefaultRDPStartProgram;
|
||||
RDPStartProgramWorkDir = Settings.Default.ConDefaultRDPStartProgramWorkDir;
|
||||
OpeningCommand = Settings.Default.OpeningCommand;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,17 +80,17 @@ namespace mRemoteNG.Connection
|
||||
{
|
||||
var x = connectionString.Split('@');
|
||||
uriBuilder.UserName = x[0];
|
||||
uriBuilder.Host = x[1];
|
||||
connectionString = x[1];
|
||||
}
|
||||
if (uriBuilder.Host.Contains(":"))
|
||||
if (connectionString.Contains(":"))
|
||||
{
|
||||
var x = uriBuilder.Host.Split(':');
|
||||
uriBuilder.Host = x[0];
|
||||
var x = connectionString.Split(':');
|
||||
connectionString = x[0];
|
||||
uriBuilder.Port = Convert.ToInt32(x[1]);
|
||||
}
|
||||
else
|
||||
uriBuilder.Host = connectionString;
|
||||
|
||||
|
||||
uriBuilder.Host = connectionString;
|
||||
|
||||
var newConnectionInfo = new ConnectionInfo();
|
||||
newConnectionInfo.CopyFrom(DefaultConnectionInfo.Instance);
|
||||
|
||||
@@ -99,12 +99,17 @@ namespace mRemoteNG.Connection
|
||||
: uriBuilder.Host;
|
||||
|
||||
newConnectionInfo.Protocol = protocol;
|
||||
newConnectionInfo.Hostname = uriBuilder.Host;
|
||||
newConnectionInfo.Username = uriBuilder.UserName;
|
||||
|
||||
if (uriBuilder.Port == -1)
|
||||
{
|
||||
newConnectionInfo.SetDefaultPort();
|
||||
}
|
||||
else
|
||||
{
|
||||
newConnectionInfo.Port = uriBuilder.Port;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(newConnectionInfo.Panel))
|
||||
newConnectionInfo.Panel = Language.General;
|
||||
|
||||
@@ -9,6 +9,7 @@ using System;
|
||||
using mRemoteNG.Connection.Protocol.PowerShell;
|
||||
using mRemoteNG.Properties;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using mRemoteNG.Connection.Protocol.Winbox;
|
||||
|
||||
namespace mRemoteNG.Connection.Protocol
|
||||
{
|
||||
@@ -49,6 +50,8 @@ namespace mRemoteNG.Connection.Protocol
|
||||
throw (new Exception(Language.NoExtAppDefined));
|
||||
}
|
||||
return new IntegratedProgram();
|
||||
case ProtocolType.Winbox:
|
||||
return new ProtocolWinbox();
|
||||
}
|
||||
|
||||
return default(ProtocolBase);
|
||||
|
||||
@@ -36,6 +36,9 @@ namespace mRemoteNG.Connection.Protocol
|
||||
PowerShell = 10,
|
||||
|
||||
[LocalizedAttributes.LocalizedDescription(nameof(Language.ExternalTool))]
|
||||
IntApp = 20
|
||||
IntApp = 20,
|
||||
|
||||
[LocalizedAttributes.LocalizedDescription(nameof(Language.Winbox))]
|
||||
Winbox = 11
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,243 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Messages;
|
||||
using mRemoteNG.Security.SymmetricEncryption;
|
||||
using mRemoteNG.Tools.Cmdline;
|
||||
using mRemoteNG.UI;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using mRemoteNG.Properties;
|
||||
|
||||
namespace mRemoteNG.Connection.Protocol.Winbox
|
||||
{
|
||||
public class ProtocolWinbox : ProtocolBase
|
||||
{
|
||||
public ProtocolWinbox() { }
|
||||
|
||||
public enum Defaults
|
||||
{
|
||||
Port = 8291
|
||||
}
|
||||
|
||||
private const int IDM_RECONF = 0x50; // PuTTY Settings Menu ID
|
||||
private readonly DisplayProperties _display = new DisplayProperties();
|
||||
|
||||
#region Public Properties
|
||||
|
||||
|
||||
public IntPtr WinboxHandle { get; set; }
|
||||
|
||||
private Process WinboxProcess { get; set; }
|
||||
|
||||
public static string WinboxPath { get; set; }
|
||||
|
||||
public bool Focused
|
||||
{
|
||||
get { return NativeMethods.GetForegroundWindow() == WinboxHandle; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Events & Handlers
|
||||
|
||||
private void ProcessExited(object sender, EventArgs e)
|
||||
{
|
||||
Event_Closed(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public override bool Connect()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
WinboxProcess = new Process
|
||||
{
|
||||
StartInfo =
|
||||
{
|
||||
UseShellExecute = false,
|
||||
FileName = WinboxPath,
|
||||
RedirectStandardOutput = true
|
||||
}
|
||||
};
|
||||
|
||||
var arguments = new CommandLineArguments { EscapeForShell = false };
|
||||
|
||||
var username = "";
|
||||
var password = "";
|
||||
var host = InterfaceControl.Info.Hostname;
|
||||
|
||||
if (!string.IsNullOrEmpty(InterfaceControl.Info?.Username))
|
||||
{
|
||||
username = InterfaceControl.Info.Username;
|
||||
}
|
||||
else
|
||||
{
|
||||
// ReSharper disable once SwitchStatementMissingSomeCases
|
||||
switch (Settings.Default.EmptyCredentials)
|
||||
{
|
||||
case "windows":
|
||||
username = Environment.UserName;
|
||||
break;
|
||||
case "custom":
|
||||
username = Settings.Default.DefaultUsername;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(InterfaceControl.Info?.Password))
|
||||
{
|
||||
password = InterfaceControl.Info.Password;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Settings.Default.EmptyCredentials == "custom")
|
||||
{
|
||||
var cryptographyProvider = new LegacyRijndaelCryptographyProvider();
|
||||
password = cryptographyProvider.Decrypt(Settings.Default.DefaultPassword,
|
||||
Runtime.EncryptionKey);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!InterfaceControl.Info.Port.Equals(Defaults.Port))
|
||||
{
|
||||
host += ":" + InterfaceControl.Info.Port.ToString();
|
||||
}
|
||||
arguments.Add(host, username, password);
|
||||
|
||||
WinboxProcess.StartInfo.Arguments = arguments.ToString();
|
||||
|
||||
WinboxProcess.EnableRaisingEvents = true;
|
||||
WinboxProcess.Exited += ProcessExited;
|
||||
|
||||
WinboxProcess.Start();
|
||||
WinboxProcess.WaitForInputIdle(Settings.Default.MaxPuttyWaitTime * 1000);
|
||||
while (!WinboxProcess.StandardOutput.EndOfStream)
|
||||
{
|
||||
var line = WinboxProcess.StandardOutput.ReadLine();
|
||||
Console.WriteLine(line);
|
||||
if (line.Contains("startServices done"))
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, "Winbox - Find connection done");
|
||||
break;
|
||||
}
|
||||
else if (line.Contains("disconnect"))
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.DebugMsg, "Winbox - Cannot Connect");
|
||||
break;
|
||||
}
|
||||
}
|
||||
var startTicks = Environment.TickCount;
|
||||
while (WinboxHandle.ToInt32() == 0 &
|
||||
Environment.TickCount < startTicks + Settings.Default.MaxPuttyWaitTime * 1000)
|
||||
{
|
||||
WinboxHandle = NativeMethods.FindWindowEx(InterfaceControl.Handle, new IntPtr(0), null, null);
|
||||
WinboxProcess.Refresh();
|
||||
WinboxHandle = WinboxProcess.MainWindowHandle;
|
||||
if (WinboxHandle.ToInt32() == 0)
|
||||
{
|
||||
Thread.Sleep(0);
|
||||
}
|
||||
}
|
||||
|
||||
NativeMethods.SetParent(WinboxHandle, InterfaceControl.Handle);
|
||||
|
||||
Resize(this, new EventArgs());
|
||||
base.Connect();
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, Language.ConnectionFailed + Environment.NewLine + ex.Message);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Focus()
|
||||
{
|
||||
try
|
||||
{
|
||||
NativeMethods.SetForegroundWindow(WinboxHandle);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, Language.PuttyFocusFailed + Environment.NewLine + ex.Message, true);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Resize(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (InterfaceControl.Size == Size.Empty)
|
||||
return;
|
||||
|
||||
//NativeMethods.MoveWindow(WinboxHandle, 0, 0, InterfaceControl.Width, InterfaceControl.Height, true);
|
||||
var scaledFrameBorderHeight = _display.ScaleHeight(SystemInformation.FrameBorderSize.Height);
|
||||
var scaledFrameBorderWidth = _display.ScaleWidth(SystemInformation.FrameBorderSize.Width);
|
||||
|
||||
NativeMethods.MoveWindow(WinboxHandle, -scaledFrameBorderWidth,
|
||||
-(SystemInformation.CaptionHeight + scaledFrameBorderHeight),
|
||||
InterfaceControl.Width + scaledFrameBorderWidth * 2,
|
||||
InterfaceControl.Height + SystemInformation.CaptionHeight +
|
||||
scaledFrameBorderHeight * 2,
|
||||
true);
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, Language.PuttyResizeFailed + Environment.NewLine + ex.Message, true);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Close()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (WinboxProcess.HasExited == false)
|
||||
{
|
||||
WinboxProcess.Kill();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, "Winbox - Kill process failed" + Environment.NewLine + ex.Message, true);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
WinboxProcess.Dispose();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddMessage(MessageClass.ErrorMsg, Language.PuttyDisposeFailed + Environment.NewLine + ex.Message, true);
|
||||
}
|
||||
|
||||
base.Close();
|
||||
}
|
||||
|
||||
public void ShowSettingsDialog()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Enums
|
||||
|
||||
protected enum Winbox_Protocol
|
||||
{
|
||||
winbox = 0,
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.App;
|
||||
using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.Resources.Language;
|
||||
|
||||
namespace mRemoteNG.Connection
|
||||
@@ -17,8 +18,7 @@ namespace mRemoteNG.Connection
|
||||
if (string.IsNullOrEmpty(connectionInfo.Panel))
|
||||
connectionInfo.Panel = Language.General;
|
||||
connectionInfo.IsQuickConnect = true;
|
||||
var connectionInitiator = new ConnectionInitiator();
|
||||
connectionInitiator.OpenConnection(connectionInfo, ConnectionInfo.Force.DoNotJump);
|
||||
Runtime.ConnectionInitiator.OpenConnection(connectionInfo, ConnectionInfo.Force.DoNotJump);
|
||||
}
|
||||
}
|
||||
}
|
||||
13
mRemoteNG/Language/Language.Designer.cs
generated
13
mRemoteNG/Language/Language.Designer.cs
generated
@@ -6353,7 +6353,18 @@ namespace mRemoteNG.Resources.Language {
|
||||
return ResourceManager.GetString("Windows", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Windows.
|
||||
/// </summary>
|
||||
internal static string Winbox
|
||||
{
|
||||
get
|
||||
{
|
||||
return ResourceManager.GetString("Winbox", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Working directory.
|
||||
/// </summary>
|
||||
|
||||
@@ -2223,4 +2223,7 @@ Nightly Channel includes Alphas, Betas & Release Candidates.</value>
|
||||
<data name="PropertyDescriptionEC2Region" xml:space="preserve">
|
||||
<value>fetch aws instance info from this region</value>
|
||||
</data>
|
||||
<data name="Winbox" xml:space="preserve">
|
||||
<value>Winbox</value>
|
||||
</data>
|
||||
</root>
|
||||
61
mRemoteNG/Properties/Settings.Designer.cs
generated
61
mRemoteNG/Properties/Settings.Designer.cs
generated
@@ -430,22 +430,19 @@ namespace mRemoteNG.Properties {
|
||||
this["ConDefaultProtocol"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("eu-central-1")]
|
||||
public string ConDefaultEC2Region
|
||||
{
|
||||
get
|
||||
{
|
||||
public string ConDefaultEC2Region {
|
||||
get {
|
||||
return ((string)(this["ConDefaultEC2Region"]));
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
this["ConDefaultEC2Region"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Default Settings")]
|
||||
@@ -3113,24 +3110,24 @@ namespace mRemoteNG.Properties {
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string ConDefaultRDPStartProgram {
|
||||
public string ConDefaultStartProgram {
|
||||
get {
|
||||
return ((string)(this["ConDefaultRDPStartProgram"]));
|
||||
return ((string)(this["ConDefaultStartProgram"]));
|
||||
}
|
||||
set {
|
||||
this["ConDefaultRDPStartProgram"] = value;
|
||||
this["ConDefaultStartProgram"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string ConDefaultRDPStartProgramWorkDir {
|
||||
public string ConDefaultStartProgramWorkDir {
|
||||
get {
|
||||
return ((string)(this["ConDefaultRDPStartProgramWorkDir"]));
|
||||
return ((string)(this["ConDefaultStartProgramWorkDir"]));
|
||||
}
|
||||
set {
|
||||
this["ConDefaultRDPStartProgramWorkDir"] = value;
|
||||
this["ConDefaultStartProgramWorkDir"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3241,5 +3238,41 @@ namespace mRemoteNG.Properties {
|
||||
this["OpeningCommand"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("dev")]
|
||||
public string CurrentUpdateChannelType {
|
||||
get {
|
||||
return ((string)(this["CurrentUpdateChannelType"]));
|
||||
}
|
||||
set {
|
||||
this["CurrentUpdateChannelType"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string ConDefaultRDPStartProgram {
|
||||
get {
|
||||
return ((string)(this["ConDefaultRDPStartProgram"]));
|
||||
}
|
||||
set {
|
||||
this["ConDefaultRDPStartProgram"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string ConDefaultRDPStartProgramWorkDir {
|
||||
get {
|
||||
return ((string)(this["ConDefaultRDPStartProgramWorkDir"]));
|
||||
}
|
||||
set {
|
||||
this["ConDefaultRDPStartProgramWorkDir"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -804,8 +804,16 @@
|
||||
<Value Profile="(Default)">EdgeChromium</Value>
|
||||
</Setting>
|
||||
<Setting Name="OpeningCommand" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">
|
||||
</Value>
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="CurrentUpdateChannelType" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">dev</Value>
|
||||
</Setting>
|
||||
<Setting Name="ConDefaultRDPStartProgram" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="ConDefaultRDPStartProgramWorkDir" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
@@ -17,7 +17,6 @@ namespace mRemoteNG.Tools
|
||||
{
|
||||
public class ExternalTool : INotifyPropertyChanged
|
||||
{
|
||||
private readonly IConnectionInitiator _connectionInitiator = new ConnectionInitiator();
|
||||
private string _displayName;
|
||||
private string _fileName;
|
||||
private bool _waitForExit;
|
||||
@@ -166,7 +165,7 @@ namespace mRemoteNG.Tools
|
||||
try
|
||||
{
|
||||
var newConnectionInfo = BuildConnectionInfoForIntegratedApp();
|
||||
_connectionInitiator.OpenConnection(newConnectionInfo);
|
||||
Runtime.ConnectionInitiator.OpenConnection(newConnectionInfo);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,6 @@ namespace mRemoteNG.Tools
|
||||
private readonly NotifyIcon _nI;
|
||||
private readonly ContextMenuStrip _cMen;
|
||||
private readonly ToolStripMenuItem _cMenCons;
|
||||
private readonly IConnectionInitiator _connectionInitiator = new ConnectionInitiator();
|
||||
private static readonly FrmMain FrmMain = FrmMain.Default;
|
||||
|
||||
public bool Disposed { get; private set; }
|
||||
@@ -129,7 +128,7 @@ namespace mRemoteNG.Tools
|
||||
if (((ToolStripMenuItem)sender).Tag is ContainerInfo) return;
|
||||
if (FrmMain.Visible == false)
|
||||
ShowForm();
|
||||
_connectionInitiator.OpenConnection((ConnectionInfo)((ToolStripMenuItem)sender).Tag);
|
||||
Runtime.ConnectionInitiator.OpenConnection((ConnectionInfo)((ToolStripMenuItem)sender).Tag);
|
||||
}
|
||||
|
||||
private static void cMenExit_Click(object sender, EventArgs e)
|
||||
|
||||
@@ -55,13 +55,11 @@ namespace mRemoteNG.UI.Controls
|
||||
private ToolStripMenuItem _cMenTreeApplyInheritanceToChildren;
|
||||
private ToolStripMenuItem _cMenTreeApplyDefaultInheritance;
|
||||
private readonly ConnectionTree.ConnectionTree _connectionTree;
|
||||
private readonly IConnectionInitiator _connectionInitiator;
|
||||
|
||||
|
||||
public ConnectionContextMenu(ConnectionTree.ConnectionTree connectionTree)
|
||||
{
|
||||
_connectionTree = connectionTree;
|
||||
_connectionInitiator = new ConnectionInitiator();
|
||||
InitializeComponent();
|
||||
ApplyLanguage();
|
||||
EnableShortcutKeys();
|
||||
@@ -692,75 +690,76 @@ namespace mRemoteNG.UI.Controls
|
||||
{
|
||||
var selectedNodeAsContainer = _connectionTree.SelectedNode as ContainerInfo;
|
||||
if (selectedNodeAsContainer != null)
|
||||
_connectionInitiator.OpenConnection(selectedNodeAsContainer, ConnectionInfo.Force.DoNotJump);
|
||||
Runtime.ConnectionInitiator.OpenConnection(selectedNodeAsContainer, ConnectionInfo.Force.DoNotJump);
|
||||
else
|
||||
_connectionInitiator.OpenConnection(_connectionTree.SelectedNode, ConnectionInfo.Force.DoNotJump);
|
||||
Runtime.ConnectionInitiator.OpenConnection(_connectionTree.SelectedNode, ConnectionInfo.Force.DoNotJump);
|
||||
}
|
||||
|
||||
private void OnConnectToConsoleSessionClicked(object sender, EventArgs e)
|
||||
{
|
||||
var selectedNodeAsContainer = _connectionTree.SelectedNode as ContainerInfo;
|
||||
if (selectedNodeAsContainer != null)
|
||||
_connectionInitiator.OpenConnection(selectedNodeAsContainer,
|
||||
ConnectionInfo.Force.UseConsoleSession |
|
||||
ConnectionInfo.Force.DoNotJump);
|
||||
Runtime.ConnectionInitiator.OpenConnection(selectedNodeAsContainer,
|
||||
ConnectionInfo.Force.UseConsoleSession |
|
||||
ConnectionInfo.Force.DoNotJump);
|
||||
else
|
||||
_connectionInitiator.OpenConnection(_connectionTree.SelectedNode,
|
||||
ConnectionInfo.Force.UseConsoleSession |
|
||||
ConnectionInfo.Force.DoNotJump);
|
||||
Runtime.ConnectionInitiator.OpenConnection(_connectionTree.SelectedNode,
|
||||
ConnectionInfo.Force.UseConsoleSession |
|
||||
ConnectionInfo.Force.DoNotJump);
|
||||
|
||||
}
|
||||
|
||||
private void OnDontConnectToConsoleSessionClicked(object sender, EventArgs e)
|
||||
{
|
||||
var selectedNodeAsContainer = _connectionTree.SelectedNode as ContainerInfo;
|
||||
if (selectedNodeAsContainer != null)
|
||||
_connectionInitiator.OpenConnection(selectedNodeAsContainer,
|
||||
ConnectionInfo.Force.DontUseConsoleSession |
|
||||
ConnectionInfo.Force.DoNotJump);
|
||||
Runtime.ConnectionInitiator.OpenConnection(selectedNodeAsContainer,
|
||||
ConnectionInfo.Force.DontUseConsoleSession |
|
||||
ConnectionInfo.Force.DoNotJump);
|
||||
else
|
||||
_connectionInitiator.OpenConnection(_connectionTree.SelectedNode,
|
||||
ConnectionInfo.Force.DontUseConsoleSession |
|
||||
ConnectionInfo.Force.DoNotJump);
|
||||
Runtime.ConnectionInitiator.OpenConnection(_connectionTree.SelectedNode,
|
||||
ConnectionInfo.Force.DontUseConsoleSession |
|
||||
ConnectionInfo.Force.DoNotJump);
|
||||
}
|
||||
|
||||
private void OnConnectInFullscreenClicked(object sender, EventArgs e)
|
||||
{
|
||||
var selectedNodeAsContainer = _connectionTree.SelectedNode as ContainerInfo;
|
||||
if (selectedNodeAsContainer != null)
|
||||
_connectionInitiator.OpenConnection(selectedNodeAsContainer,
|
||||
ConnectionInfo.Force.Fullscreen | ConnectionInfo.Force.DoNotJump);
|
||||
Runtime.ConnectionInitiator.OpenConnection(selectedNodeAsContainer,
|
||||
ConnectionInfo.Force.Fullscreen | ConnectionInfo.Force.DoNotJump);
|
||||
else
|
||||
_connectionInitiator.OpenConnection(_connectionTree.SelectedNode,
|
||||
ConnectionInfo.Force.Fullscreen | ConnectionInfo.Force.DoNotJump);
|
||||
Runtime.ConnectionInitiator.OpenConnection(_connectionTree.SelectedNode,
|
||||
ConnectionInfo.Force.Fullscreen | ConnectionInfo.Force.DoNotJump);
|
||||
}
|
||||
|
||||
private void OnConnectWithNoCredentialsClick(object sender, EventArgs e)
|
||||
{
|
||||
var selectedNodeAsContainer = _connectionTree.SelectedNode as ContainerInfo;
|
||||
if (selectedNodeAsContainer != null)
|
||||
_connectionInitiator.OpenConnection(selectedNodeAsContainer, ConnectionInfo.Force.NoCredentials);
|
||||
Runtime.ConnectionInitiator.OpenConnection(selectedNodeAsContainer, ConnectionInfo.Force.NoCredentials);
|
||||
else
|
||||
_connectionInitiator.OpenConnection(_connectionTree.SelectedNode, ConnectionInfo.Force.NoCredentials);
|
||||
Runtime.ConnectionInitiator.OpenConnection(_connectionTree.SelectedNode, ConnectionInfo.Force.NoCredentials);
|
||||
}
|
||||
|
||||
private void OnChoosePanelBeforeConnectingClicked(object sender, EventArgs e)
|
||||
{
|
||||
var selectedNodeAsContainer = _connectionTree.SelectedNode as ContainerInfo;
|
||||
if (selectedNodeAsContainer != null)
|
||||
_connectionInitiator.OpenConnection(selectedNodeAsContainer,
|
||||
ConnectionInfo.Force.OverridePanel |
|
||||
ConnectionInfo.Force.DoNotJump);
|
||||
Runtime.ConnectionInitiator.OpenConnection(selectedNodeAsContainer,
|
||||
ConnectionInfo.Force.OverridePanel |
|
||||
ConnectionInfo.Force.DoNotJump);
|
||||
else
|
||||
_connectionInitiator.OpenConnection(_connectionTree.SelectedNode,
|
||||
ConnectionInfo.Force.OverridePanel |
|
||||
ConnectionInfo.Force.DoNotJump);
|
||||
Runtime.ConnectionInitiator.OpenConnection(_connectionTree.SelectedNode,
|
||||
ConnectionInfo.Force.OverridePanel |
|
||||
ConnectionInfo.Force.DoNotJump);
|
||||
}
|
||||
|
||||
private void ConnectWithOptionsViewOnlyOnClick(object sender, EventArgs e)
|
||||
{
|
||||
var connectionTarget = _connectionTree.SelectedNode as ContainerInfo
|
||||
?? _connectionTree.SelectedNode;
|
||||
_connectionInitiator.OpenConnection(connectionTarget, ConnectionInfo.Force.ViewOnly);
|
||||
Runtime.ConnectionInitiator.OpenConnection(connectionTarget, ConnectionInfo.Force.ViewOnly);
|
||||
}
|
||||
|
||||
private void OnDisconnectClicked(object sender, EventArgs e)
|
||||
|
||||
@@ -24,21 +24,10 @@ namespace mRemoteNG.UI.Controls
|
||||
private ContextMenuStrip _mnuQuickConnectProtocol;
|
||||
private QuickConnectComboBox _cmbQuickConnect;
|
||||
private ContextMenuStrip _mnuConnections;
|
||||
private IConnectionInitiator _connectionInitiator = new ConnectionInitiator();
|
||||
private readonly ThemeManager _themeManager;
|
||||
private WeifenLuo.WinFormsUI.Docking.VisualStudioToolStripExtender vsToolStripExtender;
|
||||
private readonly DisplayProperties _display;
|
||||
|
||||
public IConnectionInitiator ConnectionInitiator
|
||||
{
|
||||
get => _connectionInitiator;
|
||||
set
|
||||
{
|
||||
if (value == null)
|
||||
return;
|
||||
_connectionInitiator = value;
|
||||
}
|
||||
}
|
||||
|
||||
public QuickConnectToolStrip()
|
||||
{
|
||||
@@ -208,7 +197,7 @@ namespace mRemoteNG.UI.Controls
|
||||
}
|
||||
|
||||
_cmbQuickConnect.Add(connectionInfo);
|
||||
ConnectionInitiator.OpenConnection(connectionInfo, ConnectionInfo.Force.DoNotJump);
|
||||
Runtime.ConnectionInitiator.OpenConnection(connectionInfo, ConnectionInfo.Force.DoNotJump);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -293,7 +282,7 @@ namespace mRemoteNG.UI.Controls
|
||||
case ContainerInfo _:
|
||||
return;
|
||||
case ConnectionInfo connectionInfo:
|
||||
ConnectionInitiator.OpenConnection(connectionInfo);
|
||||
Runtime.ConnectionInitiator.OpenConnection(connectionInfo);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@ using System.Windows.Forms;
|
||||
using mRemoteNG.App.Info;
|
||||
using mRemoteNG.Themes;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using System.Reflection;
|
||||
using mRemoteNG.Properties;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace mRemoteNG.UI.Forms
|
||||
{
|
||||
@@ -52,20 +55,49 @@ namespace mRemoteNG.UI.Forms
|
||||
|
||||
private void llLicense_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
Process.Start("https://github.com/mRemoteNG/mRemoteNG/blob/develop/COPYING.TXT");
|
||||
OpenUrl("https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/v" + Assembly.GetExecutingAssembly().GetName().Version.ToString().Substring(0, Assembly.GetExecutingAssembly().GetName().Version.ToString().Length - 2) + "-" + Settings.Default.CurrentUpdateChannelType + "/COPYING.txt");
|
||||
Close();
|
||||
}
|
||||
|
||||
private void llChangelog_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
Process.Start("https://github.com/mRemoteNG/mRemoteNG/blob/develop/CHANGELOG.md");
|
||||
OpenUrl("https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/v" + Assembly.GetExecutingAssembly().GetName().Version.ToString().Substring(0, Assembly.GetExecutingAssembly().GetName().Version.ToString().Length - 2) + "-" + Settings.Default.CurrentUpdateChannelType + "/CHANGELOG.md");
|
||||
Close();
|
||||
}
|
||||
|
||||
private void llCredits_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
Process.Start("https://github.com/mRemoteNG/mRemoteNG/blob/develop/CREDITS.md");
|
||||
OpenUrl("https://raw.githubusercontent.com/mRemoteNG/mRemoteNG/v" + Assembly.GetExecutingAssembly().GetName().Version.ToString().Substring(0, Assembly.GetExecutingAssembly().GetName().Version.ToString().Length - 2) + "-" + Settings.Default.CurrentUpdateChannelType + "/CREDITS.md");
|
||||
Close();
|
||||
}
|
||||
|
||||
private void OpenUrl(string url)
|
||||
{
|
||||
try
|
||||
{
|
||||
Process.Start(url);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// hack because of this: https://github.com/dotnet/corefx/issues/10361
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
url = url.Replace("&", "^&");
|
||||
Process.Start(new ProcessStartInfo("cmd", $"/c start {url}") { CreateNoWindow = true });
|
||||
}
|
||||
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||
{
|
||||
Process.Start("xdg-open", url);
|
||||
}
|
||||
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
||||
{
|
||||
Process.Start("open", url);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
5
mRemoteNG/UI/Forms/frmMain.Designer.cs
generated
5
mRemoteNG/UI/Forms/frmMain.Designer.cs
generated
@@ -32,7 +32,6 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
mRemoteNG.Connection.ConnectionInitiator connectionInitiator1 = new mRemoteNG.Connection.ConnectionInitiator();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain));
|
||||
this.pnlDock = new WeifenLuo.WinFormsUI.Docking.DockPanel();
|
||||
this.msMain = new System.Windows.Forms.MenuStrip();
|
||||
@@ -84,8 +83,7 @@
|
||||
this.msMain.Text = "Main Toolbar";
|
||||
//
|
||||
// fileMenu
|
||||
//
|
||||
this.fileMenu.ConnectionInitiator = null;
|
||||
//
|
||||
this.fileMenu.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3);
|
||||
this.fileMenu.Name = "mMenFile";
|
||||
this.fileMenu.Size = new System.Drawing.Size(37, 19);
|
||||
@@ -152,7 +150,6 @@
|
||||
// _quickConnectToolStrip
|
||||
//
|
||||
this._quickConnectToolStrip.BackColor = System.Drawing.SystemColors.Control;
|
||||
this._quickConnectToolStrip.ConnectionInitiator = connectionInitiator1;
|
||||
this._quickConnectToolStrip.Dock = System.Windows.Forms.DockStyle.None;
|
||||
this._quickConnectToolStrip.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
this._quickConnectToolStrip.Location = new System.Drawing.Point(114, 25);
|
||||
|
||||
@@ -280,9 +280,7 @@ namespace mRemoteNG.UI.Forms
|
||||
|
||||
private void SetMenuDependencies()
|
||||
{
|
||||
var connectionInitiator = new ConnectionInitiator();
|
||||
fileMenu.TreeWindow = Windows.TreeForm;
|
||||
fileMenu.ConnectionInitiator = connectionInitiator;
|
||||
|
||||
viewMenu.TsExternalTools = _externalToolsToolStrip;
|
||||
viewMenu.TsQuickConnect = _quickConnectToolStrip;
|
||||
@@ -292,8 +290,6 @@ namespace mRemoteNG.UI.Forms
|
||||
|
||||
toolsMenu.MainForm = this;
|
||||
toolsMenu.CredentialProviderCatalog = Runtime.CredentialProviderCatalog;
|
||||
|
||||
_quickConnectToolStrip.ConnectionInitiator = connectionInitiator;
|
||||
}
|
||||
|
||||
//Theming support
|
||||
|
||||
@@ -22,7 +22,6 @@ namespace mRemoteNG.UI.Menu
|
||||
private ToolStripSeparator _mMenFileSep1;
|
||||
|
||||
public ConnectionTreeWindow TreeWindow { get; set; }
|
||||
public IConnectionInitiator ConnectionInitiator { get; set; }
|
||||
|
||||
public FileMenu()
|
||||
{
|
||||
|
||||
@@ -32,7 +32,6 @@ namespace mRemoteNG.UI.Menu
|
||||
public ToolStrip TsMultiSsh { get; set; }
|
||||
public FullscreenHandler FullscreenHandler { get; set; }
|
||||
public FrmMain MainForm { get; set; }
|
||||
public IConnectionInitiator ConnectionInitiator { get; set; }
|
||||
|
||||
|
||||
public ViewMenu()
|
||||
@@ -317,7 +316,7 @@ namespace mRemoteNG.UI.Menu
|
||||
if (!(window is ConnectionWindow connectionWindow))
|
||||
return;
|
||||
|
||||
connectionWindow.reconnectAll(ConnectionInitiator);
|
||||
connectionWindow.reconnectAll(Runtime.ConnectionInitiator);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,8 +48,9 @@ namespace mRemoteNG.UI.Tabs
|
||||
set
|
||||
{
|
||||
currentPanel = value;
|
||||
Runtime.MessageCollector.AddMessage(Messages.MessageClass.DebugMsg,
|
||||
"Panel got focused: " + currentPanel.TabText);
|
||||
//Disabled due to interaction with popups that would show this information and cause a softlock
|
||||
//Runtime.MessageCollector.AddMessage(Messages.MessageClass.DebugMsg,
|
||||
// "Panel got focused: " + currentPanel.TabText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ namespace mRemoteNG.UI.Window
|
||||
{
|
||||
public partial class ConnectionTreeWindow
|
||||
{
|
||||
private readonly IConnectionInitiator _connectionInitiator = new ConnectionInitiator();
|
||||
private ThemeManager _themeManager;
|
||||
private bool _sortedAz = true;
|
||||
|
||||
@@ -126,7 +125,7 @@ namespace mRemoteNG.UI.Window
|
||||
{
|
||||
ConnectionTree.NodeDeletionConfirmer =
|
||||
new SelectedConnectionDeletionConfirmer(prompt => CTaskDialog.MessageBox(
|
||||
Application.ProductName,prompt,"",ETaskDialogButtons.YesNo,ESysIcons.Question));
|
||||
Application.ProductName, prompt, "", ETaskDialogButtons.YesNo, ESysIcons.Question));
|
||||
ConnectionTree.KeyDown += TvConnections_KeyDown;
|
||||
ConnectionTree.KeyPress += TvConnections_KeyPress;
|
||||
SetTreePostSetupActions();
|
||||
@@ -142,8 +141,8 @@ namespace mRemoteNG.UI.Window
|
||||
new RootNodeExpander()
|
||||
};
|
||||
|
||||
if (Settings.Default.OpenConsFromLastSession && !Settings.Default.NoReconnect)
|
||||
actions.Add(new PreviousSessionOpener(_connectionInitiator));
|
||||
if (Settings.Default.OpenConsFromLastSession && !Settings.Default.NoReconnect && !Settings.Default.AlwaysShowPanelSelectionDlg)
|
||||
actions.Add(new PreviousSessionOpener(Runtime.ConnectionInitiator));
|
||||
|
||||
ConnectionTree.PostSetupActions = actions;
|
||||
}
|
||||
@@ -157,15 +156,15 @@ namespace mRemoteNG.UI.Window
|
||||
};
|
||||
|
||||
if (Settings.Default.SingleClickOnConnectionOpensIt)
|
||||
singleClickHandlers.Add(new OpenConnectionClickHandler(_connectionInitiator));
|
||||
singleClickHandlers.Add(new OpenConnectionClickHandler(Runtime.ConnectionInitiator));
|
||||
else
|
||||
doubleClickHandlers.Add(new OpenConnectionClickHandler(_connectionInitiator));
|
||||
doubleClickHandlers.Add(new OpenConnectionClickHandler(Runtime.ConnectionInitiator));
|
||||
|
||||
if (Settings.Default.SingleClickSwitchesToOpenConnection)
|
||||
singleClickHandlers.Add(new SwitchToConnectionClickHandler(_connectionInitiator));
|
||||
singleClickHandlers.Add(new SwitchToConnectionClickHandler(Runtime.ConnectionInitiator));
|
||||
|
||||
ConnectionTree.SingleClickHandler = new TreeNodeCompositeClickHandler {ClickHandlers = singleClickHandlers};
|
||||
ConnectionTree.DoubleClickHandler = new TreeNodeCompositeClickHandler {ClickHandlers = doubleClickHandlers};
|
||||
ConnectionTree.SingleClickHandler = new TreeNodeCompositeClickHandler { ClickHandlers = singleClickHandlers };
|
||||
ConnectionTree.DoubleClickHandler = new TreeNodeCompositeClickHandler { ClickHandlers = doubleClickHandlers };
|
||||
}
|
||||
|
||||
private void ConnectionsServiceOnConnectionsLoaded(object o, ConnectionsLoadedEventArgs connectionsLoadedEventArgs)
|
||||
@@ -237,7 +236,7 @@ namespace mRemoteNG.UI.Window
|
||||
private void FavoriteMenuItem_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (((ToolStripMenuItem)sender).Tag is ContainerInfo) return;
|
||||
_connectionInitiator.OpenConnection((ConnectionInfo)((ToolStripMenuItem)sender).Tag);
|
||||
Runtime.ConnectionInitiator.OpenConnection((ConnectionInfo)((ToolStripMenuItem)sender).Tag);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -269,19 +268,19 @@ namespace mRemoteNG.UI.Window
|
||||
ConnectionTree.Focus();
|
||||
break;
|
||||
case Keys.Up:
|
||||
{
|
||||
var match = ConnectionTree.NodeSearcher.PreviousMatch();
|
||||
JumpToNode(match);
|
||||
e.Handled = true;
|
||||
break;
|
||||
}
|
||||
{
|
||||
var match = ConnectionTree.NodeSearcher.PreviousMatch();
|
||||
JumpToNode(match);
|
||||
e.Handled = true;
|
||||
break;
|
||||
}
|
||||
case Keys.Down:
|
||||
{
|
||||
var match = ConnectionTree.NodeSearcher.NextMatch();
|
||||
JumpToNode(match);
|
||||
e.Handled = true;
|
||||
break;
|
||||
}
|
||||
{
|
||||
var match = ConnectionTree.NodeSearcher.NextMatch();
|
||||
JumpToNode(match);
|
||||
e.Handled = true;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
TvConnections_KeyDown(sender, e);
|
||||
break;
|
||||
@@ -365,7 +364,7 @@ namespace mRemoteNG.UI.Window
|
||||
e.Handled = true;
|
||||
if (SelectedNode == null)
|
||||
return;
|
||||
_connectionInitiator.OpenConnection(SelectedNode);
|
||||
Runtime.ConnectionInitiator.OpenConnection(SelectedNode);
|
||||
}
|
||||
else if (e.Control && e.KeyCode == Keys.F)
|
||||
{
|
||||
@@ -382,4 +381,4 @@ namespace mRemoteNG.UI.Window
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ namespace mRemoteNG.UI.Window
|
||||
{
|
||||
public partial class ConnectionWindow : BaseWindow
|
||||
{
|
||||
private readonly IConnectionInitiator _connectionInitiator = new ConnectionInitiator();
|
||||
private VisualStudioToolStripExtender vsToolStripExtender;
|
||||
private readonly ToolStripRenderer _toolStripProfessionalRenderer = new ToolStripProfessionalRenderer();
|
||||
|
||||
@@ -232,33 +231,33 @@ namespace mRemoteNG.UI.Window
|
||||
switch (DockState)
|
||||
{
|
||||
case DockState.Float:
|
||||
{
|
||||
if (_documentHandlersAdded)
|
||||
{
|
||||
FrmMain.Default.ResizeBegin -= Connection_ResizeBegin;
|
||||
FrmMain.Default.ResizeEnd -= Connection_ResizeEnd;
|
||||
_documentHandlersAdded = false;
|
||||
}
|
||||
if (_documentHandlersAdded)
|
||||
{
|
||||
FrmMain.Default.ResizeBegin -= Connection_ResizeBegin;
|
||||
FrmMain.Default.ResizeEnd -= Connection_ResizeEnd;
|
||||
_documentHandlersAdded = false;
|
||||
}
|
||||
|
||||
DockHandler.FloatPane.FloatWindow.ResizeBegin += Connection_ResizeBegin;
|
||||
DockHandler.FloatPane.FloatWindow.ResizeEnd += Connection_ResizeEnd;
|
||||
_floatHandlersAdded = true;
|
||||
break;
|
||||
}
|
||||
DockHandler.FloatPane.FloatWindow.ResizeBegin += Connection_ResizeBegin;
|
||||
DockHandler.FloatPane.FloatWindow.ResizeEnd += Connection_ResizeEnd;
|
||||
_floatHandlersAdded = true;
|
||||
break;
|
||||
}
|
||||
case DockState.Document:
|
||||
{
|
||||
if (_floatHandlersAdded)
|
||||
{
|
||||
DockHandler.FloatPane.FloatWindow.ResizeBegin -= Connection_ResizeBegin;
|
||||
DockHandler.FloatPane.FloatWindow.ResizeEnd -= Connection_ResizeEnd;
|
||||
_floatHandlersAdded = false;
|
||||
}
|
||||
if (_floatHandlersAdded)
|
||||
{
|
||||
DockHandler.FloatPane.FloatWindow.ResizeBegin -= Connection_ResizeBegin;
|
||||
DockHandler.FloatPane.FloatWindow.ResizeEnd -= Connection_ResizeEnd;
|
||||
_floatHandlersAdded = false;
|
||||
}
|
||||
|
||||
FrmMain.Default.ResizeBegin += Connection_ResizeBegin;
|
||||
FrmMain.Default.ResizeEnd += Connection_ResizeEnd;
|
||||
_documentHandlersAdded = true;
|
||||
break;
|
||||
}
|
||||
FrmMain.Default.ResizeBegin += Connection_ResizeBegin;
|
||||
FrmMain.Default.ResizeEnd += Connection_ResizeEnd;
|
||||
_documentHandlersAdded = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -725,7 +724,7 @@ namespace mRemoteNG.UI.Window
|
||||
{
|
||||
var interfaceControl = GetInterfaceControl();
|
||||
if (interfaceControl == null) return;
|
||||
_connectionInitiator.OpenConnection(interfaceControl.Info, ConnectionInfo.Force.DoNotJump);
|
||||
Runtime.ConnectionInitiator.OpenConnection(interfaceControl.Info, ConnectionInfo.Force.DoNotJump);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -746,7 +745,7 @@ namespace mRemoteNG.UI.Window
|
||||
}
|
||||
|
||||
Invoke(new Action(() => Prot_Event_Closed(interfaceControl.Protocol)));
|
||||
_connectionInitiator.OpenConnection(interfaceControl.Info, ConnectionInfo.Force.DoNotJump);
|
||||
Runtime.ConnectionInitiator.OpenConnection(interfaceControl.Info, ConnectionInfo.Force.DoNotJump);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -790,4 +789,4 @@ namespace mRemoteNG.UI.Window
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<ApplicationIcon>Icons\mRemoteNG.ico</ApplicationIcon>
|
||||
<Version>1.77.3</Version>
|
||||
<Description>Multi-protocol remote connections manager</Description>
|
||||
<Copyright>2020 mRemoteNG Dev Team, 2010-2013 Riley McArdle, 2007-2009 Felix Deimel</Copyright>
|
||||
<Copyright>2022 mRemoteNG Dev Team, 2010-2013 Riley McArdle, 2007-2009 Felix Deimel</Copyright>
|
||||
<PackageLicenseFile>COPYING.TXT</PackageLicenseFile>
|
||||
<PackageProjectUrl>https://mremoteng.org/</PackageProjectUrl>
|
||||
<Platforms>x64</Platforms>
|
||||
|
||||
BIN
mRemoteNG/winbox.exe
Normal file
BIN
mRemoteNG/winbox.exe
Normal file
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 8.4 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 3.1 KiB |
@@ -269,14 +269,10 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
|
||||
case ProtocolType.VNC:
|
||||
expectedProperties.AddRange(new []
|
||||
{
|
||||
nameof(ConnectionInfo.Username),
|
||||
nameof(ConnectionInfo.Password),
|
||||
nameof(ConnectionInfo.Port),
|
||||
nameof(ConnectionInfo.VNCSmartSizeMode),
|
||||
nameof(ConnectionInfo.VNCViewOnly),
|
||||
nameof(ConnectionInfo.UserViaAPI),
|
||||
nameof(ConnectionInfo.EC2InstanceId),
|
||||
nameof(ConnectionInfo.EC2Region)
|
||||
nameof(ConnectionInfo.VNCViewOnly)
|
||||
});
|
||||
break;
|
||||
case ProtocolType.SSH1:
|
||||
@@ -289,8 +285,6 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
|
||||
nameof(ConnectionInfo.PuttySession),
|
||||
nameof(ConnectionInfo.OpeningCommand),
|
||||
nameof(ConnectionInfo.UserViaAPI),
|
||||
nameof(ConnectionInfo.EC2InstanceId),
|
||||
nameof(ConnectionInfo.EC2Region)
|
||||
});
|
||||
break;
|
||||
case ProtocolType.SSH2:
|
||||
@@ -305,8 +299,6 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
|
||||
nameof(ConnectionInfo.EC2InstanceId),
|
||||
nameof(ConnectionInfo.EC2Region),
|
||||
nameof(ConnectionInfo.UserViaAPI),
|
||||
nameof(ConnectionInfo.EC2InstanceId),
|
||||
nameof(ConnectionInfo.EC2Region)
|
||||
});
|
||||
break;
|
||||
case ProtocolType.Telnet:
|
||||
@@ -323,7 +315,6 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
|
||||
expectedProperties.AddRange(new []
|
||||
{
|
||||
nameof(ConnectionInfo.UserViaAPI),
|
||||
nameof(ConnectionInfo.Username),
|
||||
nameof(ConnectionInfo.Password),
|
||||
nameof(ConnectionInfo.Port),
|
||||
nameof(ConnectionInfo.RenderingEngine),
|
||||
@@ -333,7 +324,6 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
|
||||
expectedProperties.AddRange(new[]
|
||||
{
|
||||
nameof(ConnectionInfo.UserViaAPI),
|
||||
nameof(ConnectionInfo.Username),
|
||||
nameof(ConnectionInfo.Password),
|
||||
nameof(ConnectionInfo.Domain),
|
||||
nameof(ConnectionInfo.Port),
|
||||
@@ -343,7 +333,6 @@ namespace mRemoteNGTests.UI.Window.ConfigWindowTests
|
||||
expectedProperties.AddRange(new[]
|
||||
{
|
||||
nameof(ConnectionInfo.UserViaAPI),
|
||||
nameof(ConnectionInfo.Username),
|
||||
nameof(ConnectionInfo.Password),
|
||||
nameof(ConnectionInfo.Domain),
|
||||
nameof(ConnectionInfo.Port),
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0-preview-20211130-02" />
|
||||
<PackageReference Include="NSubstitute" Version="4.2.2" />
|
||||
<PackageReference Include="NUnit" Version="3.13.2" />
|
||||
<PackageReference Include="NUnit.Console" Version="3.13.2" />
|
||||
<PackageReference Include="NUnit.ConsoleRunner" Version="3.13.2" />
|
||||
<PackageReference Include="NUnit.Console" Version="3.14.0" />
|
||||
<PackageReference Include="NUnit.ConsoleRunner" Version="3.14.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.2.0" />
|
||||
<PackageReference Include="coverlet.collector" Version="3.1.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
|
||||
Reference in New Issue
Block a user